diff --git a/README.md b/README.md index 3ce49e50249d8625b1c7a31d9a0cddb091e00009..32dcab898a7156c792beaba6faf5be99e2708aa6 100644 --- a/README.md +++ b/README.md @@ -2,16 +2,44 @@ ## Documentation -For more details about this package, make sure to see the documentation available at https://teklia.gitlab.io/atr/dan/. - -## Installation - To use DAN in your own scripts, install it using pip: ```console pip install -e . ``` +For more details about this package, make sure to see the documentation available at https://teklia.gitlab.io/atr/dan/. + +## Development +For development and tests purpose it may be useful to install the project as a editable package with pip. + +* Use a virtualenv (e.g. with virtualenvwrapper `mkvirtualenv -a . dan`) +* Install `dan` as a package (e.g. `pip install -e .`) + +### Linter +Code syntax is analyzed before submitting the code.\ +To run the linter tools suite you may use pre-commit. +```shell +pip install pre-commit +pre-commit run -a +``` + +### Run tests +Tests are executed with `tox` using [pytest](https://pytest.org). +To install `tox`, +```shell +pip install tox +tox +``` + +To reload the test virtual environment you can use `tox -r` + +Run a single test module: `tox -- <test_path>` +Run a single test: `tox -- <test_path>::<test_function>` + +The tests use a large file stored via [Git-LFS](https://docs.gitlab.com/ee/topics/git/lfs/). Make sure to run `git-lfs pull` before running them. + + ## Inference To apply DAN to an image, one needs to first add a few imports and to load an image. Note that the image should be in RGB.