networkg consists of three main layers:
- The Rust core, which implements all graph logic.
- PyO3 Python bindings.
- The Python layer, which provides documentation and type hints to the Python bindings.
Developing networkg requires Python 3.7+, and cargo.
Install development dependencies using:
pip install -r requirements-dev.txt
Actions such as testing, linting and building are managed by nox. To build and install networkg in your current virtual envirionemt, run:
nox --session install
To list all available sessions run:
nox --list
Running nox before making a pull request can save you some time by detecting problems before they are caught by the GitHub Action workflows.
Another way to avoid submitting code that will fail CI is to enable pre-commit, which will run automated checks against any code you try to commit:
pre-commit install
New releases of networkg are published to PyPi using GitHub actions. The release process has two steps:
- Bump the version number of the package in Cargo.toml.
- Create a new release on GitHub.
When a new release is created, a GitHub Action workflow will automatically build wheels for multiple distributions, and publish them to PyPi.