-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: Project did not migrate to
pyproject.toml
The project still used `setup.py` and `setup.cfg`. This branch: 1. Migrates to pyproject.toml and `hatch`. 2. Updates workflows accordingly. 3. Changes README from reStructuredText to the easier Markdown. 4. Updates dependencies.
- Loading branch information
Showing
9 changed files
with
361 additions
and
247 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Test code quality | ||
|
||
on: | ||
push: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
code-quality: | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Workaround github issue https://github.com/actions/runner-images/issues/7192 | ||
run: sudo echo RESET grub-efi/install_devices | sudo debconf-communicate grub-pc | ||
|
||
- name: Install pip and hatch | ||
run: | | ||
sudo apt-get install -y python3-pip | ||
pip3 install hatch hatch-vcs | ||
- name: Cache dependencies | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-code-quality-${{ hashFiles('pyproject.toml') }} | ||
restore-keys: | | ||
${{ runner.os }}-code-quality- | ||
- name: Install required system packages only for Ubuntu Linux | ||
run: sudo apt-get install -y libsecp256k1-dev | ||
|
||
- name: Run Hatch lint | ||
run: hatch run linting:all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Pytest and code Coverage | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
schedule: | ||
# Run every night at 04:00 (GitHub Actions timezone) | ||
# in order to catch when unfrozen dependency updates | ||
# break the use of the library. | ||
- cron: '4 0 * * *' | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
os: [ macos-11, macos-12, macos-13, macos-14, ubuntu-20.04, ubuntu-22.04, ubuntu-24.04 ] | ||
runs-on: ${{matrix.os}} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: sudo apt-get install -y python3-pip libsecp256k1-dev | ||
- run: python -m pip install --upgrade pip hatch coverage | ||
|
||
# Only run coverage on one OS | ||
- run: hatch run testing:test | ||
if: matrix.python-version != '3.11' | ||
- run: hatch run testing:cov | ||
if: matrix.os == 'ubuntu-24.04' | ||
- uses: codecov/[email protected] | ||
if: matrix.os == 'ubuntu-24.04' | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
slug: aleph-im/aleph-sdk-python |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ on: | |
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-20.04 | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# aleph-client | ||
|
||
Python Client for the [aleph.im network](https://www.aleph.im), next generation network of | ||
decentralized big data applications. Developement follows the [Aleph | ||
Whitepaper](https://github.com/aleph-im/aleph-whitepaper). | ||
|
||
## Documentation | ||
|
||
Documentation can be found on https://docs.aleph.im/tools/aleph-client/ | ||
|
||
## Requirements | ||
|
||
### Linux | ||
|
||
Some cryptographic functionalities use curve secp256k1 and require | ||
installing [libsecp256k1](https://github.com/bitcoin-core/secp256k1). | ||
|
||
> apt-get install -y python3-pip libsecp256k1-dev | ||
### macOs | ||
|
||
> brew tap cuber/homebrew-libsecp256k1 | ||
> brew install libsecp256k1 | ||
## Installation | ||
|
||
Using pip and [PyPI](https://pypi.org/project/aleph-client/): | ||
|
||
> pip install aleph-client | ||
## Installation for development | ||
|
||
If you want NULS2 support you will need to install nuls2-python | ||
(currently only available on github): | ||
|
||
> pip install git+https://github.com/aleph-im/nuls2-python.git | ||
To install from source and still be able to modify the source code: | ||
|
||
> pip install -e . | ||
## Using Docker | ||
|
||
Use the Aleph client and it\'s CLI from within Docker or Podman with: | ||
|
||
> docker run --rm -ti -v $(pwd)/<data:/data> ghcr.io/aleph-im/aleph-client/aleph-client:master --help | ||
Warning: This will use an ephemeral key pair that will be discarded when | ||
stopping the container. |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.