Contibutions are welcome. Thank you for helping make the project better!
This project relies on pixi
, which needs to be installed:
curl -fsSL https://pixi.sh/install.sh | bash
That's it! You are now ready to go.
Just use pixi
to run tasks (defined in pyproject.toml
) command, e.g.:
pixi run test
OR
pixi run lab
If needed, update any project dependencies in the pyproject.toml
(they will automatically be picked up by pixi
):
[project]
dependencies = [
"bqplot",
"ipywidgets",
"jupyterlab",
]
[project.optional-dependencies]
plot = [
"openmdao",
]
Make sure the unit tests are passing:
pixi run test
Make sure the code is well formatted (fix manually if needed):
pixi run lint
Test docs are building locally:
pixi run build-docs
Test distribution is building locally:
pixi run build-dist
Test release on testpypi
:
pixi run release
This will require creating an API token on testpypi
:
- In your account settings, go to the API tokens section and select "Add API token"
Then use that token to configure your local .pyprc
file:
[distutils]
index-servers =
testpypi
[testpypi]
repository: https://test.pypi.org/legacy/
username: __token__
password: pypi-...
Commit changes. CI is triggered on push:
git add -u
git status
git commit -m "description"
git push
Create a PR on GitHub when ready
Only project owners and administrators can make new releases.
The release process has been automated via Github Actions. In summary, a new release is created by pushing a new tag to the remote (e.g. v0.0.1
), which triggers a test-build-deploy workflow that publishes to pypi.org
, GitHub Pages
and Github Release
. Tag pattern must be v*
.
NOTE: either pypi and testpypi need to be setup for trusted publishing or Github must be provided an API token to enable communication between GitHub, TestPyPI, and PyPI. Currently, the latter is used.
Assuming master
is locally up-to-date, manually update the pyproject.toml version number:
version = "0.0.1"
For now, this must also be done manually in src/ipysensitivityprofiler/__init__.py
:
__version__ = "0.0.1"
Push the version change to the remote:
git add -u
git commit -m "changed version to v0.0.1"
git push
Tag commit for release and push to trigger release pipeline:
git tag v0.0.1
git push origin v0.0.1