Skip to content

Latest commit

 

History

History
54 lines (40 loc) · 2.18 KB

CONTRIBUTING.rst

File metadata and controls

54 lines (40 loc) · 2.18 KB

Contributing

Contributions to jsonargparse are very welcome, be it just to create issues for reporting bugs and proposing enhancements, or more directly by creating pull requests.

If you intend to work with the source code, note that this project does not include any requirements.txt file. This is by intention. To make it very clear what are the requirements for different use cases, all the requirements of the project are stored in the file setup.cfg. The basic runtime requirements are defined in section [options] in the install_requires entry. All extras requires for optional features listed in :ref:`installation` are stored in section [options.extras_require]. Also there are test, test_no_urls, dev and doc entries in the same [options.extras_require] section which lists requirements for testing, development and documentation building.

The recommended way to work with the source code is the following. First clone the repository, then create a virtual environment, activate it and finally install the development requirements. More precisely the steps are:

git clone https://github.com/omni-us/jsonargparse.git
cd jsonargparse
virtualenv -p python3 venv
. venv/bin/activate

The crucial step is installing the requirements which would be done by running:

pip install -e ".[dev,all]"

Please also install the pre-commit git hook scripts so that unit tests and code checks are automatically run locally. This is done as follows:

pre-commit install

Running the unit tests can be done either using using tox or the setup.py script. The unit tests are also installed with the package, thus can be run in a production system.

tox                            # Run tests using tox
./setup.py test_coverage       # Run tests and generate coverage report
python3 -m jsonargparse_tests  # Run tests for installed package