Contributing to Seldon Core¶
Before opening a pull request consider:
Is the change important and ready enough to ask the community to spend time reviewing?
Have you searched for existing, related issues and pull requests?
Is the change being proposed clearly explained and motivated?
When you contribute code, you affirm that the contribution is your original work and that you license the work to the project under the project’s open source license. Whether or not you state this explicitly, by submitting any copyrighted material via pull request, email, or other means you agree to license the material under the project’s open source license and warrant that you have the legal authority to do so.
Our process to manage release notes is modelled after how the Kubernetes project handles them. This process can be separated into 2 separate phases:
Adding notes on each PR. Happens at PR creation time.
Compiling all PR notes before a release. Happens at release time.
Adding notes on each PR¶
When a PR is created, a Prow / Lighthouse
plugin will check if there
is a populated
release-note block in the PR body such as:
```release-note Some public-facing release note. ```
If there isn’t, the PR will be labelled as
Note that to speed things up, the default PR
will create an empty
release-notes block for you.
For PRs that don’t need public-facing release notes (e.g. fixes on the
integration tests), you can use the
/release-note-none Prow command.
There are a number of conventions that we can use so that the changes are more semantic. These are mainly based around keywords which will affect how the release notes will get displayed.
Use the words
Deprecatedto describe the contents of the PR. For example:
```release-note Added metadata support to Python wrapper ```
Use the expression
Action requiredto describe breaking changes. For example:
```release-note Action required: The helm value `createResources` has been renamed `managerCreateResources`. ```
We use pre-commit to handle a number of Git hooks which ensure that all changes to the codebase follow Seldon’s code conventions. It is recommended to set these up before making any change to the codebase. Extra checks down the line will stop the build if the code is not compliant to the style guide of each language in the repository.
To install it, follow the official instructions. Once installed, run:
$ pre-commit install
This will read the hooks defined in
.pre-commit-config.yaml and install them
accordingly on your local repository.
Regardless of the package you are working on, we abstract the main tasks to a
Therefore, in order to run the tests, you should be able to just do:
$ make test
We use pytest as our main test runner.
However, to ensure that tests run on the same version of the package that final
users will download from
pip and pypi.org, we use
tox on top of it.
To install both (plus other required plugins), just run:
$ make install_dev
tox we can run the entire test suite over different environments,
isolated between them.
You can see the different ones we currently use on the
You can run your tests across all these environments using the standard
make test mentioned above.
Alternatively, if you want to pass any extra parameters, you can also run
One of the caveats of
tox is that, as the number of environments grows, so
does the time it takes to finish running the tests.
As a solution, during local development it may be recommended to run
on your own environment.
You can do so as: