Skip to content

Commit

Permalink
split README and DEVELOPMENT (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxOstrowski authored Feb 20, 2024
1 parent 0c319d9 commit fb1855b
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 41 deletions.
41 changes: 41 additions & 0 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
@@ -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

47 changes: 6 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions init.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def replace(filepath):
"setup.cfg",
"noxfile.py",
"README.md",
"DEVELOPMENT.md",
"LICENSE",
".pre-commit-config.yaml",
".coveragerc",
Expand Down

0 comments on commit fb1855b

Please sign in to comment.