Please follow this workflow when contributing to skops:
- Fork the repository under your own user
- Clone the repository locally
- Create a new branch for your changes
- Add your changes to the branch
- Commit your changes
- Push your branch to the remote repository
- Create a pull request on GitHub
Don't hesitate to ping @skops-dev/maintainers in your issues and pull requests if you don't receive a review in a timely manner. We try to review all pull requests as soon as we can.
If you have permissions, you should almost never merge your own pull request unless it's a hotfix and needs to be merged really quick and it's not a major change.
Otherwise pull requests can be merged if at least one other person has approved it on GitHub. Please don't merge them until all outstanding comments are addressed or the discussions are concluded and people have agreed to tackle them in future pull requests.
If you intend to work on an issue, leave a comment and state your intentions. Also feel free to ask for clarifications if you're not sure what the issue entails. If you don't understand an issue, it's on us, not on you!
Following these steps you can prepare a dev environment for yourself to contribute to skops.
mamba create -c conda-forge -n skops python=3.10
mamba activate skops
python -m pip install -e ".[tests,docs]"
# add pre-commit hooks
mamba install -c conda-forge pre-commit
pre-commit install
You can also replace the above mamba commands with conda if you don't have mamba installed.
skops uses pytest as its test runner, just run it from the project root:
pytest
Certain tests require internet access to run, and they typically take slightly
longer to run than other tests. If you'd like to skip those tests, you can add
-m not network
to your pytest
command, or -m network
to only run
those tests. For example, you can run all tests except the ones requiring
internet with:
pytest -m "not network"
Releases are created using manual GitHub workflows. As a maintainer, follow these steps:
Check and update the
docs/changes.rst
For a major release, create a new branch with the name "0.version.X", e.g. "0.2.X". This branch will have all tags for all releases under 0.2.
Bump the version defined in
skops/__init__.py
Git grep for any TODO's that need fixing before the release (e.g. deprecations). You can do this, for example by:
git grep -n TODO
Create a PR with all the changes and have it reviewed and merged
Create a tag with the format "v0.version", e.g. "v0.2", and push it to the remote repository. Use this tag for releasing the package. If there is a minor release under the same branch, it would be "v0.2.1" for example.
Use the GitHub action to create a new release on TestPyPI. Check it for correctness on test.pypi.
Use the GitHub action to create a new release on PyPI. Check it for correctness pypi.
Create a new release on GitHub
Update the patch version of the package to a new dev version, e.g. from
v0.3.0
tov0.3.dev1
- Check that the new stable branch of documentation was built correctly on readthedocs, and make sure all relevant releases are active.