Skip to content

Commit adb1725

Browse files
committed
ENH: update of doc
1 parent 86d2ad7 commit adb1725

File tree

2 files changed

+25
-13
lines changed

2 files changed

+25
-13
lines changed

doc/source/userguide/contributing.rst

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@
22
Contributing to Pyrad
33
========================
44

5-
Pyrad is an open project and all contributions are welcome.
5+
Pyrad is an open project and all contributions are welcome.
66

77
Please check our `User manual <https://github.com/MeteoSwiss/pyrad/blob/master/additional_doc/pyrad_user_manual.pdf>`_ to get started!
8+
9+
Code quality
10+
"""""""""""""""""""""""""
11+
12+
The code of pyrad is quality-checked with `ruff <https://docs.astral.sh/ruff/>`_ (PEP8) and `black <https://github.com/psf/black>`_ (code formatting).
13+
Any code that does not follow these guidelines will make the CI of the commit or PR fail. The best way to avoid this is to install pre-commit hooks that will run ruff and black for every local commit you make.
14+
15+
To install the pre-commit hooks simply go to the root directory or your pyrad repository (the one with the .git directory) and run::
16+
17+
pip install pre-commit
18+
pre-commit install

doc/source/userguide/installation.rst

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ RSL_PATH
118118
Path to the RSL library which is used by some routines of Py-ART. Please be aware that this library is deprecated, and the Py-ART is currently
119119
working on an alternative.
120120

121+
PYRAD_DEBUG
122+
If you set the value of this environment variable to 1, the pdb debugger will be automatically started if any exception or warning is triggered during the execution of pyrad
123+
121124
A good way to avoid redefining these environment variables everytime you want to use Pyrad/Py-ART, is to define them in your .bashrc file.
122125

123126

@@ -155,25 +158,25 @@ From the source
155158
Getting the code
156159
"""""""""""""""""""""""""
157160

158-
To get a copy of the Pyrad superproject simply place yourself in the desired working directory (It is strongly recommended to use your $HOME in order to be able to use
161+
To get a copy of the Pyrad superproject simply place yourself in the desired working directory (It is strongly recommended to use your $HOME in order to be able to use
159162
some of the Pyrad tools) and type::
160163

161-
git clone --recursive https://github.com/MeteoSwiss/pyrad.git
164+
git clone --recursive https://github.com/MeteoSwiss/pyrad.git
162165

163166
The recursive keyword fetches automatically all the submodules depending on the main superproject.
164167

165-
Regular users should use the “master” branches of both Pyrad and Py-ART. To check that you use
168+
Regular users should use the “master” branches of both Pyrad and Py-ART. To check that you use
166169
the “master” branch of Pyrad place yourself in the root directory of the project and type::
167170
git branch
168171

169172
And eventually::
170173

171174
git checkout master
172175

173-
And to check that you use the “master” branch of Py-ART go to the directory src/pyart and repeat the
176+
And to check that you use the “master” branch of Py-ART go to the directory src/pyart and repeat the
174177
procedure above
175178

176-
MeteoSwiss developers should use instead the “dev” branch for both Pyrad and Py-ART. PyTDA only
179+
MeteoSwiss developers should use instead the “dev” branch for both Pyrad and Py-ART. PyTDA only
177180
has a master branch.
178181

179182
Compilation
@@ -185,19 +188,17 @@ For the initial compilation of the software activate the conda environment, i.e.
185188
Then go to pyrad/src and execute::
186189
make_all.sh
187190

188-
This command takes care of compiling, Py-ART, PyTDA and Pyrad. To compile them separately you
191+
This command takes care of compiling, Py-ART, PyTDA and Pyrad. To compile them separately you
189192
can use the scripts make_pyart.sh, make_pytda.sh and make_pyrad.sh or compile them separately by moving to all subdirectory of pyrad/src and run::
190193

191-
python -m pip install .
194+
python -m pip install .
192195

193196

194-
Py-ART has a default config file called default_config.py located in folder pyart. If you would like to
195-
work with a different config file you have to specify the location in the variable PYART_CONFIG in
196-
your conda environment file.
197+
Py-ART has a default config file called default_config.py located in folder pyart. If you would like to
198+
work with a different config file you have to specify the location in the variable PYART_CONFIG in
199+
your conda environment file.
197200

198201
For example::
199202
export PYART_CONFIG= [Pyrad_path]/config/pyart/mch_config.py
200203

201204
The Pyrad library has its own config file in the aforementioned path
202-
203-

0 commit comments

Comments
 (0)