diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md new file mode 100644 index 0000000..9c01784 --- /dev/null +++ b/DEVELOPMENT.md @@ -0,0 +1,41 @@ +## Development + +To improve code quality, we use [nox] to run linters, type checkers, unit +tests, documentation and more. We recommend installing nox using [pipx] to have +it available globally. + +```bash +# install +python -m pip install pipx +python -m pipx install nox + +# run all sessions +nox + +# list all sessions +nox -l + +# run individual session +nox -s session_name + +# run individual session (reuse install) +nox -Rs session_name +``` + +Note that the nox sessions create [editable] installs. In case there are issues, +try recreating environments by dropping the `-R` option. If your project is +incompatible with editable installs, adjust the `noxfile.py` to disable them. + +We also provide a [pre-commit][pre] config to autoformat code upon commits. It +can be set up using the following commands: + +```bash +python -m pipx install pre-commit +pre-commit install +``` + +[nox]: https://nox.thea.codes/en/stable/index.html +[pipx]: https://pypa.github.io/pipx/ +[pre]: https://pre-commit.com/ +[editable]: https://setuptools.pypa.io/en/latest/userguide/development_mode.html + diff --git a/README.md b/README.md index 4f10057..056e0e7 100644 --- a/README.md +++ b/README.md @@ -11,53 +11,18 @@ ## Installation -```bash -pip install . -``` - -## Usage +To install the project, run ```bash -fillname -h +pip install . ``` -## Development - -To improve code quality, we use [nox] to run linters, type checkers, unit -tests, documentation and more. We recommend installing nox using [pipx] to have -it available globally. - -```bash -# install -python -m pip install pipx -python -m pipx install nox - -# run all sessions -nox - -# list all sessions -nox -l +Further details, please refer to the [development instructions](DEVELOPMENT.md). -# run individual session -nox -s session_name - -# run individual session (reuse install) -nox -Rs session_name -``` - -Note that the nox sessions create [editable] installs. In case there are issues, -try recreating environments by dropping the `-R` option. If your project is -incompatible with editable installs, adjust the `noxfile.py` to disable them. +## Usage -We also provide a [pre-commit][pre] config to autoformat code upon commits. It -can be set up using the following commands: +Run the following for basic usage information: ```bash -python -m pipx install pre-commit -pre-commit install +fillname -h ``` - -[nox]: https://nox.thea.codes/en/stable/index.html -[pipx]: https://pypa.github.io/pipx/ -[pre]: https://pre-commit.com/ -[editable]: https://setuptools.pypa.io/en/latest/userguide/development_mode.html diff --git a/init.py b/init.py index 0e4f437..7d74434 100755 --- a/init.py +++ b/init.py @@ -48,6 +48,7 @@ def replace(filepath): "setup.cfg", "noxfile.py", "README.md", + "DEVELOPMENT.md", "LICENSE", ".pre-commit-config.yaml", ".coveragerc",