Setup

Installation

Clone the current repository as follows

git clone https://github.com/basp-group/SARA-dictionary.git
cd SARA-dictionary

Representative example and tests

An illustrative example of the use of the SARA and faceted SARA dictionary are provided in example.m script.

To launch the tests, run the runTest.m file.

Contributing

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 sdwt-doc --file environment.yml

## alternative using conda
# conda create -n sdwt-doc
# conda activate sdwt-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 the docs/build folder.

  • If needed, you can delete the conda environment as follows

conda env remove -n sdwt-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 sdwt-doc environment (see previous paragraph)
conda activate sdwt-doc
# run the following command from the root of the package (where the miss_hit.cfg file is)
mh_style --fix .