Skip to content

Commit 269d0cb

Browse files
authored
Merge pull request #4148 from t20100/update-doc
Documentation: Updated installation and contribution documentation
2 parents a96820b + d908d5d commit 269d0cb

10 files changed

Lines changed: 143 additions & 434 deletions

File tree

.github/pull_request_template.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
<!--
2-
Thank you for your pull request!
3-
4-
Please use a Pull Request title that follows the requested syntax since it will be included in the release notes), see:
5-
https://github.com/silx-kit/silx/blob/main/CONTRIBUTING.rst#pull-request-title-format
6-
-->
1+
<!-- Thank you for your pull request! -->
72

83
Checklist:
94

CONTRIBUTING.rst

Lines changed: 53 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
How to contribute to *silx*
2-
===========================
1+
How to contribute
2+
=================
33

4-
This document describes how to contribute to the *silx* project.
5-
The process is similar to many other open-source projects like *numpy*, just lighter as the project is smaller, so you won't be surprised with the pipeline.
64

7-
*scikit-image* provides a nice tutorial in `their own CONTRIBUTING guide`_.
5+
Development process
6+
-------------------
87

8+
This project follows the standard open-source project github workflow,
9+
which is described in other projects like `scikit-image <https://scikit-image.org/docs/stable/development/contribute.html>`_.
910

10-
1. Create your GitHub account `https://help.github.com/categories/setup/`
11-
and upload your SSH keys.
11+
1. Create your `GitHub <https://github.com/>`_ account and upload your SSH keys.
1212

13-
2. Fork the silx project from `https://github.com/silx-kit/silx/`.
14-
The button is on the top right of the page.
13+
2. Fork the silx project from https://github.com/silx-kit/silx/.
1514

16-
3. Clone your GitHub version locally on the computer you intend to work on.
15+
3. Clone your GitHub repository on yout local computer.
1716

1817
.. code-block:: bash
1918
2019
git clone git@github.com/<your_user_name>/silx
20+
cd silx
2121
2222
4. Install the dependencies defined in *requirements-dev.txt*.
2323

@@ -42,16 +42,17 @@ The process is similar to many other open-source projects like *numpy*, just lig
4242

4343
10. Create a pull request (PR) from your feature branch on GitHub to trigger
4444
the review process. Indicate this PR is related to the issue you opened in 6.
45+
Make sure to follow the `Pull Request title format`_.
4546

4647
11. Discuss with the maintainer who is reviewing your code using the GitHub interface.
4748

48-
If you encounter any problems or have any questions you can always ask on the `Issues page`_.
49+
If you encounter any problems or have any questions you can always ask on the `Issues page <https://github.com/silx-kit/silx/issues>`_.
4950

5051

5152
Pull Request title format
5253
-------------------------
5354

54-
To ease release notes authoring, please use the following syntax for the title of your Pull Requests (PR)::
55+
To ease release notes authoring, when creating a Pull Request (PR), please use the following syntax for the title::
5556

5657
<Subpackage/Module/Topic>: <Action> <summary of the main change affecting silx's users>
5758

@@ -79,8 +80,46 @@ With:
7980

8081
- **Summary**: A short description of the main change as you would like to read it from release notes.
8182

82-
.. _their own CONTRIBUTING guide: https://github.com/scikit-image/scikit-image/blob/3736339272b9d129f98fc723b508ac5490c171fa/CONTRIBUTING.rst
83-
.. _Issues page: https://github.com/silx-kit/silx/issues
83+
84+
Code formatting
85+
---------------
86+
87+
To format the code, use `black <https://black.readthedocs.io>`_.
88+
89+
90+
How-to build the documentation
91+
------------------------------
92+
93+
To build the documentation, using `Sphinx <http://www.sphinx-doc.org/>`_, run:
94+
95+
.. code-block:: bash
96+
97+
pip install . # Make sure to install the same version as the source
98+
sphinx-build doc/source/ build/html
99+
100+
.. note::
101+
102+
To re-generate the example script screenshots, build the documentation with the
103+
environment variable ``DIRECTIVE_SNAPSHOT_QT`` set to ``True``.
104+
105+
106+
How-to run the tests
107+
--------------------
108+
109+
To run the tests of an installed version of *silx*, run the following on the python interpreter:
110+
111+
.. code-block:: python
112+
113+
import silx.test
114+
silx.test.run_tests()
115+
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+
119+
.. code-block:: bash
120+
121+
python ./run_tests.py
122+
84123
85124
How-to make a release
86125
---------------------

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ License
9999
-------
100100

101101
The source code of *silx* is licensed under the MIT license.
102-
See the `LICENSE <https://github.com/silx-kit/silx/blob/master/LICENSE>`_ and
103-
`copyright <https://github.com/silx-kit/silx/blob/master/copyright>`_ files for details.
102+
See the `LICENSE <https://github.com/silx-kit/silx/blob/main/LICENSE>`_ and
103+
`copyright <https://github.com/silx-kit/silx/blob/main/copyright>`_ files for details.
104104

105105
Citation
106106
--------

doc/source/applications/view.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ Custom plot selection
5151
5252
Plot custom curves from selected 1D datasets.
5353
54-
How to access :
55-
............
54+
How to access
55+
.............
5656

5757
.. grid :: 1 2 2 2
5858

doc/source/contributing.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.. include:: ../../CONTRIBUTING.rst

doc/source/index.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,28 @@ You can install **silx** via `pip <https://pypi.org/project/pip>`_, `conda <http
2929
3030
pip install silx[full]
3131
32+
See :ref:`Installation with pip`
33+
3234
.. tab-item:: conda
3335

3436
.. code-block:: bash
3537
3638
conda install -c conda-forge silx
3739
40+
See :ref:`Installation with conda`
41+
42+
3843
.. tab-item:: Debian & Ubuntu
3944

4045
.. code-block:: bash
4146
4247
sudo apt-get install silx
4348
49+
See :ref:`Installation on Debian & Ubuntu`
50+
4451
|silx_installer_btn| or decompress the |silx_archive|.
4552

53+
4654
:ref:`Applications`
4755
-------------------
4856

0 commit comments

Comments
 (0)