Skip to content

Commit

Permalink
docs(development): Tidy setup
Browse files Browse the repository at this point in the history
  • Loading branch information
asyrjasalo committed Jul 29, 2024
1 parent c3e504f commit e80f5c8
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 52 deletions.
16 changes: 16 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Contributing

You can use your favorite Python version manager (asdf, pyenv, ...) as long
as it follows `.python-version`.

Install [pre-commit](https://pre-commit.com/) if it is not already installed.

Install pre-commit hooks in your git working copy:

pre-commit install --hook-type pre-commit --hook-type commit-msg

Use [Conventional Commits](https://www.conventionalcommits.org/).

Create documentation as part of you pull request:

pdm docs
56 changes: 4 additions & 52 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,24 +121,8 @@ robot --outputdir results atest/

## Contributing

You can use your favorite Python version manager (asdf, pyenv, ...) as long
as it follows `.python-version`.

Install [pre-commit](https://pre-commit.com/) if not already installed:

python -m pip install --user pre-commit

Install pre-commit hooks in your git working copy:

pre-commit install --hook-type pre-commit
pre-commit install --hook-type commit-msg

Kindly create an [issue](https://github.com/asyrjasalo/RESTinstance/issues)
and then create a pull request.

Use [Conventional Commits](https://www.conventionalcommits.org/).

### Local development
and then create a pull request. See `CONTRIBUTING.md` for that.

Install [PDM](https://pdm-project.org/latest/):

Expand All @@ -148,55 +132,23 @@ Install dependencies:

pdm install

To run unit tests:

pdm test

Acceptance tests require you starting [mountebank](https://www.mbtest.org)
`testapi/` in another terminal first:

pdm testenv

To run acceptance tests:
To run all tests:

pdm atest
pdm tests

You can then debug mountebank requests and responses created by acceptance tests
You can debug mountebank requests and responses created by acceptance tests
at [localhost:2525](http://localhost:2525/imposters).

Arguments can be passed to `pytest` and `robot`, respectively:

pdm test -- test/<test_modulename>.py
pdm atest -- atest/<atest_suitefile>.robot

### Building a new version

Format source files in-place:

pdm format

Run all tests:

pdm tests

Recreate documentation:

pdm docs

Build source dist and wheel distributions:

pdm build

### Releasing to PyPI

You can release to TestPyPI first:

pdm publish --no-build --repository testpypi

Release to PyPI:

pdm publish --no-build

## Credits

RESTinstance is under
Expand Down

0 comments on commit e80f5c8

Please sign in to comment.