Contributing Guide#
We appreciate your help in improving this document and our library!
Please open an issue if you face any problems or have suggestions for improvements. We are always happy to help.
If you are interested in contributing code or documentation, we strongly recommend that you install a development version of FanInSAR in a development environment. If you are unfamiliar with the git/github workflow, please see Github’s guide to contributing to projects.
This guide assumes familiarity with the Github workflow and focuses on aspects specific to contributing to FanInSAR.
Get Latest Source Code#
You can get the latest development source code from our Github repository. Fork the repository and clone the forked repository to your local machine:
git clone https://github.com/<your github user name>/FanInSAR
Create a Dedicated Environment#
We strongly recommend that you create a virtual environment for developing FanInSAR to isolate it from other Python installations on your system.
Create a new virtual environment using conda:
conda create -n faninsar python=3.10
Activate the environment:
conda activate faninsar
Install Dependencies#
Most of the FanInSAR dependencies are listed in pyproject.toml and can be
installed from those files:
python -m pip install ".[dev]"
FanInSAR requires that setuptools is installed. It is
usually packaged with python, but if necessary can be installed using pip:
python -m pip install setuptools
Install for Development#
Editable installs means that the environment Python will always use the most recently changed version of your code. To install Sphinx Gallery in editable mode, ensure you are in the sphinx-gallery directory
cd FanInSAR
Then install using the editable flag:
python -m pip install -e .
Run Tests#
Check that you are all set by running the tests:
python -m pytest
Install pre-commit hooks#
pre-commit hooks check for things like spelling and formatting in contributed code and documentation. To set up pre-commit hooks:
pre-commit install
This will install the pre-commit hooks in your local repository. You can run the hooks manually with:
pre-commit run --all-files
Testing#
All code contributions should be tested. We use the pytest testing framework to build test
pages. Tests can be found in faninsar/tests.
Build the documentation#
If you are contributing to the documentation, you can build the docs locally to see how your changes will look.
To build the docs, run:
cd docs
make html
After building the docs, you can view them by opening _build/html/index.html in your browser.
To clean up the build files and generated galleries, run:
make clean
Contributing#
When contributing to FanInSAR, please follow the Contributor Covenant in all your interactions with the project.