Development process#
This project follows the standard open-source project github workflow, which is described in other projects like scikit-image.
Important
If you use generative AI in any point of the process, be sure to read and comply with our AI policy.
Create your GitHub account and upload your SSH keys.
Clone your GitHub repository on your local computer:
git clone git@github.com:<your_user_name>/silx cd silx
Run the tests to make sure the silx test suite pass on your computer.
Open an issue in
https://github.com/silx-kit/silx/issuesto inform the maintainers of your intentions.Create a local branch to start working on your issue:
git branch my_feature.Code, enjoy and ensure to write tests for the new code and that it does not break the current test suite.
Push your local branch to your GitHub account:
git push origin my_feature.Create a pull request (PR) from your feature branch on GitHub to trigger the review process. Indicate this PR is related to the issue you opened in 6. Make sure to follow the Pull Request title format.
Discuss with the maintainer who is reviewing your code using the GitHub interface.
If you encounter any problems or have any questions you can always ask on the Issues page.
Install silx for development#
Install build dependencies:
pip install meson-python ninja cython
Install silx in editable mode with the development dependencies:
pip install --no-build-isolation --editable .[dev]
Note
If the project “entry points” are modified, the project must be re-installed.
See also
Format the code#
To format the code, use black:
black .
Build the documentation#
From the silx project root folder, run Sphinx:
sphinx-build doc/source/ build/html
Note
To re-generate the example script screenshots, build the documentation with the
environment variable DIRECTIVE_SNAPSHOT_QT set to True.
Run the tests#
From the silx project root folder, use pytest:
Warning
GUI tests are part of the complete test suite and will make windows appear and disappear very quickly.
Do not run these if you have a history of epilepsy or motion sickness
To run the complete test suite:
pytestTo run a specfic test:
pytest <src/silx/path/to/test_file.py::test_function>
To run the tests of an installed version of silx, run the following from the Python interpreter:
import silx.test
silx.test.run_tests()
Pull Request title format#
To ease release notes authoring, when creating a Pull Request (PR), please use the following syntax for the title:
<Subpackage/Module/Topic>: <Action> <summary of the main change affecting silx's users>
With:
Subpackage/Topic: One of:
A subpackage or a module: Use the fully qualified name of the subpackage or module of silx the PR is changing. For example:
silx.gui.qtorsilx.gui.plot.PlotWidget.A topic: If changes do not affect a particular subpackage or module, provide the topic of the change. This can be for example:
Build,Documentation,CI,… or the name of a silx application (e.g.,silx view).
Action: How the changes affect the project from a silx user point of view. Prefer using one of the following actions:
Added: For new feature or new APIs
Deprecated
Removed
Changed
Improved
Refactored
Fixed
Summary: A short description of the main change that will be included in the release notes.