@@ -10,30 +10,23 @@ which is described in other projects like `scikit-image <https://scikit-image.or
10
10
11
11
1. Create your `GitHub <https://github.com/ >`_ account and upload your SSH keys.
12
12
13
- 2. Fork the silx project from https://github.com/silx-kit/silx/.
13
+ 2. ` Fork the silx project < https://github.com/silx-kit/silx/fork >`_ .
14
14
15
- 3. Clone your GitHub repository on yout local computer.
15
+ 3. Clone your GitHub repository on your local computer:
16
16
17
- .. code-block :: bash
17
+ .. code-block :: bash
18
18
19
- git clone [email protected] / < your_user_name> /silx
20
- cd silx
19
+ git clone [email protected] : < your_user_name> /silx
20
+ cd silx
21
21
22
- 4. Install the dependencies defined in * requirements-dev.txt * .
22
+ 4. ` Install silx for development `_ .
23
23
24
- .. code-block :: bash
25
-
26
- pip install -r requirements-dev.txt
27
-
28
- 5. Make sure the silx test suite pass on your computer using the ``python3 run_tests.py `` or
29
- ``python3 run_tests.py silx.gui.test.test_qt `` if you want to test only a subset of it.
30
- You can use ``python /path/to/silx/bootstrap.py script.py `` to test your scripts without
31
- installing silx, but the test suite is required to pass.
24
+ 5. `Run the tests `_ to make sure the silx test suite pass on your computer.
32
25
33
26
6. Open an issue in ``https://github.com/silx-kit/silx/issues `` to inform the
34
27
maintainers of your intentions.
35
28
36
- 7. Create a local branch to start working on your issue ``git branch my_feature ``.
29
+ 7. Create a local branch to start working on your issue: ``git branch my_feature ``.
37
30
38
31
8. Code, enjoy but ensure that the new code is tested and does not break
39
32
the current test suite.
@@ -49,52 +42,40 @@ which is described in other projects like `scikit-image <https://scikit-image.or
49
42
If you encounter any problems or have any questions you can always ask on the `Issues page <https://github.com/silx-kit/silx/issues >`_.
50
43
51
44
52
- Pull Request title format
53
- -------------------------
45
+ Install silx for development
46
+ ----------------------------
54
47
55
- To ease release notes authoring, when creating a Pull Request (PR), please use the following syntax for the title ::
48
+ 1. Install ` build dependencies < https://mesonbuild.com/meson-python/how-to-guides/editable-installs.html#build-dependencies >`_ ::
56
49
57
- <Subpackage/Module/Topic>: <Action> <summary of the main change affecting silx's users>
50
+ pip install meson-python ninja cython
58
51
52
+ 2. Install silx in `editable mode <https://peps.python.org/pep-0660/ >`_ with the development dependencies::
59
53
60
- With:
54
+ pip install --no-build-isolation --editable .[dev]
61
55
62
- - ** Subpackage/Topic **: One of :
56
+ .. note : :
63
57
64
- - A subpackage or a module: Use the fully qualified name of the subpackage or module of silx the PR is changing.
65
- For example: ``silx.gui.qt `` or ``silx.gui.plot.PlotWidget ``.
66
- - A topic: If changes do not affect a particular subpackage or module, provide the topic of the change.
67
- This can be for example: ``Build ``, ``Documentation ``, ``CI ``,... or the name of a silx application (e.g., ``silx view ``).
58
+ If the project "entry points" are modified, the project must be re-installed.
68
59
69
- - **Action **: How the changes affects the project from a silx user point of view.
70
- Prefer using one of the following actions:
60
+ .. seealso ::
71
61
72
- - **Added **: For new feature or new APIs
73
- - **Deprecated **
74
- - **Removed **
75
- - **Changed **
76
- - **Improved **
77
- - **Refactored **
78
- - **Fixed **
79
- - More: If none of the previous actions match your changes, please use another keyword.
62
+ `Meson editable installs <https://mesonbuild.com/meson-python/how-to-guides/editable-installs.html >`_
80
63
81
- - **Summary **: A short description of the main change as you would like to read it from release notes.
82
64
83
-
84
- Code formatting
65
+ Format the code
85
66
---------------
86
67
87
- To format the code, use `black <https://black.readthedocs.io >`_.
68
+ To format the code, use `black <https://black.readthedocs.io >`_::
88
69
70
+ black .
89
71
90
- How-to build the documentation
91
- ------------------------------
92
72
93
- To build the documentation, using `Sphinx <http://www.sphinx-doc.org/ >`_, run:
73
+ Build the documentation
74
+ -----------------------
94
75
95
- .. code-block :: bash
76
+ - `Install silx for development `_.
77
+ - From the silx project root folder, run `Sphinx <http://www.sphinx-doc.org/ >`_::
96
78
97
- pip install . # Make sure to install the same version as the source
98
79
sphinx-build doc/source/ build/html
99
80
100
81
.. note ::
@@ -103,22 +84,64 @@ To build the documentation, using `Sphinx <http://www.sphinx-doc.org/>`_, run:
103
84
environment variable ``DIRECTIVE_SNAPSHOT_QT `` set to ``True ``.
104
85
105
86
106
- How-to run the tests
107
- --------------------
87
+ Run the tests
88
+ -------------
89
+
90
+ - `Install silx for development `_.
91
+ - From the silx project root folder, use `pytest <https://docs.pytest.org/en/stable/how-to/usage.html >`_:
92
+
93
+ .. warning ::
94
+
95
+ GUI tests are part of the complete test suite and will make windows appear and disappear very quickly.
96
+
97
+ **Do not run these if you have a history of epilepsy or motion sickness **
98
+
99
+ * To run the complete test suite::
100
+
101
+ pytest
102
+
103
+ * To run a specfic test::
104
+
105
+ pytest <src/silx/path/to/test_file.py> # or
106
+ pytest --pyargs <silx.subpackage.test.test_module>
108
107
109
- To run the tests of an installed version of *silx *, run the following on the python interpreter:
108
+ To run the tests of an installed version of *silx *, run the following from the Python interpreter:
110
109
111
110
.. code-block :: python
112
111
113
112
import silx.test
114
113
silx.test.run_tests()
115
114
116
- To run the test suite of a development version, use the *run_tests.py * script at
117
- the root of the source project.
118
115
119
- .. code-block :: bash
116
+ Pull Request title format
117
+ -------------------------
118
+
119
+ To ease release notes authoring, when creating a Pull Request (PR), please use the following syntax for the title::
120
+
121
+ <Subpackage/Module/Topic>: <Action> <summary of the main change affecting silx's users>
122
+
123
+
124
+ With:
125
+
126
+ - **Subpackage/Topic **: One of:
127
+
128
+ - A subpackage or a module: Use the fully qualified name of the subpackage or module of silx the PR is changing.
129
+ For example: ``silx.gui.qt `` or ``silx.gui.plot.PlotWidget ``.
130
+ - A topic: If changes do not affect a particular subpackage or module, provide the topic of the change.
131
+ This can be for example: ``Build ``, ``Documentation ``, ``CI ``,... or the name of a silx application (e.g., ``silx view ``).
132
+
133
+ - **Action **: How the changes affect the project from a silx user point of view.
134
+ Prefer using one of the following actions:
135
+
136
+ - **Added **: For new feature or new APIs
137
+ - **Deprecated **
138
+ - **Removed **
139
+ - **Changed **
140
+ - **Improved **
141
+ - **Refactored **
142
+ - **Fixed **
120
143
121
- python ./run_tests.py
144
+ - ** Summary **: A short description of the main change that will be included in the release notes.
122
145
123
146
124
147
How-to make a release
0 commit comments