Skip to content
This repository was archived by the owner on Feb 19, 2023. It is now read-only.

Commit 4874707

Browse files
committed
added test coverage and updated readme
1 parent c89fdad commit 4874707

3 files changed

Lines changed: 74 additions & 7 deletions

File tree

README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ Features:
2121

2222
_uses Python3.6+, Docker, and Docker-compose_
2323

24-
1. Create a virtual environment for dependencies with `python3 -m venv .venv/`. Activate it with `source .venv/bin/activate`
25-
2. Dependencies are managed with [Poetry](https://python-poetry.org). Install dependencies with `poetry install`
26-
3. Run `pre-commit install` to configure git commit hooks (for `flake8` checking and `black` formatting)
27-
4. Copy `default.env` to a new file `.env`
24+
1. Create a virtual environment for dependencies with `python3 -m venv .venv/`. Activate it with `source .venv/bin/activate`.
25+
2. Dependencies are managed with [Poetry](https://python-poetry.org). Install dependencies with `poetry install`.
26+
3. Run `pre-commit install` to configure git commit hooks (for `flake8` checking and `black` formatting).
27+
4. Copy `default.env` to a new file `.env`.
2828
5. Run `docker-compose up -d database` to run a local PostgreSQL instance for testing and development.
29-
6. Run test suite with `pytest` _(also initializes database)_.
30-
7. Run the application with `python3 app/main.py`
29+
6. Initialize the database with `python3 app/utils/init_db.py`.
30+
7. Run the application with `python3 app/main.py`.
3131

3232
View documentation at `http://localhost:8000/docs`
3333

@@ -39,6 +39,9 @@ View documentation at `http://localhost:8000/docs`
3939
4. Build the project with `docker build -t microauth .`
4040
5. Run with `docker run -p 8000:8000 -d microauth`
4141

42+
### Tests
43+
44+
Run test suite with `pytest --cov=app tests/`.
4245

4346

4447
### Email Resets (Optional)

poetry.lock

Lines changed: 64 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ flake8 = "^3.7.9"
2727
pre-commit = "^2.2.0"
2828
requests = "^2.23.0"
2929
testcontainers = "^2.6.0"
30+
pytest-cov = "^2.8.1"
3031

3132
[build-system]
3233
requires = ["poetry>=0.12"]

0 commit comments

Comments
 (0)