diff --git a/Python/README.md b/Python/README.md index 13c3143e8624dd7cf578599a312815afdff60e6a..1f421371a2a71ef94d83e5a1cdd7f8bf9ab27f7a 100644 --- a/Python/README.md +++ b/Python/README.md @@ -19,7 +19,7 @@ You can verify that the installation was successful by trying to import `corsika python -c 'import corsika' -# Running the Tests +## Running the Tests If you wish to develop new features in `corsika`, you will also need to install some additional dependencies so you can run our unit tests. These can be @@ -30,3 +30,27 @@ installed with Once that is completed, you can run the unit tests directory from the `corsika` directory python -m pytest tests + +## Development Guide + +`corsika` is a type Python package with type-checking using +[Mypy](mypy-lang.org) and all code is formatted with the +[Black](https://black.readthedocs.io/en/stable/) formatter. + +All code must pass these checks, as well as several others, before it can be +merged into CORSIKA. A `Makefile` is provided to simplify running these in +tasks. + + make mypy # this will run the mypy type checker + + make isort # this will automatically sort `import` statements + + make black # this will automatically format your code + + make flake # this checks that all code passes our linting rules + + make tests # this runs our test suite + +Lastly, we provide an `all` target that runs *all* of the above in the sequence shown above: + + make all # run all of the above tests