Setup
Installation
Clone the current repository as follows.
git clone https://github.com/basp-group/RI-measurement-operator.git
cd RI-measurement-operator
Representative examples and tests
To run a representative example, run the example.m
script. An example use of the NUFFT interface considered in this library is provided in the last section of the script.
To launch the tests, run the runTest.m
file.
Contributing
Source Code: https://github.com/basp-group/RI-measurement-operator
Building the documentation
Make sure any new functionality is properly documented using the
numpy
docstring style.To build the documentation, issue the folowing commands.
# setup conda environment to build the documentation
conda env create --name mo-doc --file environment.yml
## alternative using conda
# conda create -n mo-doc
# conda activate mo-doc
# conda install pip
# pip install miss_hit
# pip install -r requirement.txt
# building the documentation in html format
cd docs
make html
All the generated
.html
files are contained in thedocs/build
folder.If needed, you can delete the
conda
environment as follows
conda env remove -n mo-doc
Pushing the documentation online
Add a worktree
from the master
branch
# make sure the folder html does not exist before running the command
git worktree add docs/build/html gh-pages
cd docs/build/html
git add .
git commit -m "Build documentation as of $(git log '--format=format:%H' master -1)"
git push origin gh-pages
# delete the worktree
cd ../
git worktree remove html
Code layout
If you contribute code to the library (through a pull request), make sure any submitted code is properly formatted with the miss_hit package using the provided miss_hit.cfg
configuration file
# activate mo-doc environment (see previous paragraph)
conda activate mo-doc
# run the following command from the root of the package (where the miss_hit.cfg file is)
mh_style --fix .