Skip to content

Latest commit

 

History

History
151 lines (104 loc) · 3.02 KB

CONTRIBUTING.md

File metadata and controls

151 lines (104 loc) · 3.02 KB

CONTRIBUTING

Contibutions are welcome. Thank you for helping make the project better!


Installation

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.


Running

Just use pixi to run tasks (defined in pyproject.toml) command, e.g.:

pixi run test

OR

pixi run lab

Making Changes

Step 1: Update dependencies

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",
]

Step 2: Run Unit Tests

Make sure the unit tests are passing:

pixi run test

Step 3: Fix Lint Issues

Make sure the code is well formatted (fix manually if needed):

pixi run lint

Step 4: Test Build

Test docs are building locally:

pixi run build-docs

Test distribution is building locally:

pixi run build-dist

Step 5: Test Release

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-...

Step 5: Commit / Pull Request

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

Release

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