Skip to content

Commit

Permalink
updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
witlox committed Oct 31, 2024
1 parent 1925980 commit f07eaa0
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docs/CreateVirtualEnv.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ Steps:
4. Install the required packages (`poetry install`)
- If you want to install the development dependencies as well, you can run `poetry install --with dev`
- If you want to install with only testing dependencies, you can run `poetry install --with test`
5. Run the project (`horao`)
5. Run the project (`poetry run python horao/main.py`)

## Note on testing

In order to install the testing dependencies you can run the following command `poetry install --with test`.
You can run the tests using the `poetry run pytest` command. This will run the tests in a virtual environment and ensure that the tests are run in a clean environment.

### Coverage
A coverage report can be generated by running `poetry run coverage run -m pytest` and then `poetry run coverage report`. This will show the coverage of the tests.
A coverage report is automatically generated when running `pytest`.
24 changes: 23 additions & 1 deletion docs/Development.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,29 @@
# Development notes

## Swagger definition
## Redoc definition
All of the API calls are commented redoc style in the code.
When running with the DEBUG flag, redoc is available at the `/docs` endpoint.

## Python checks
The project is checked with the following tools:
- Coding style: [Black](https://black.readthedocs.io/en/stable/index.html)
- Type checking: [Mypy](https://mypy.readthedocs.io/en/stable/index.html)
- Linting: [Flake8](https://flake8.pycqa.org/en/latest/)
- Testing: [Pytest](https://docs.pytest.org/en/stable/)
- Coverage: [pytest-cov](https://pytest-cov.readthedocs.io/en/latest/)

# Environments
The project is managed using [Poetry](https://python-poetry.org/).
The environment variables are managed via poetry using [poetry-dotenv-plugin](https://github.com/mpeteuil/poetry-dotenv-plugin).
## Poetry
There are 3 specific environment flags that are configured in the `pyproject.toml` file:
- default: all packages necessary to run the code in production
- dev: all packages necessary to run the code in development with the checks
- test: all packages necessary to run the tests and coverage
## DotEnv
There are 2 dotenv files that are supplied:
- `.env` for development
- `.env.production` for production (with recommended settings)

## Launch tests

Expand Down

0 comments on commit f07eaa0

Please sign in to comment.