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

Commit 0c691c2

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

3 files changed

Lines changed: 84 additions & 17 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: 74 additions & 11 deletions
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
@@ -19,6 +19,7 @@ sendgrid = "^6.3.0"
1919
sqlalchemy = "^1.3.16"
2020
ujson = "^2.0.3"
2121
uvicorn = "^0.11.5"
22+
pytest-cov = "^2.8.1"
2223

2324
[tool.poetry.dev-dependencies]
2425
pytest = "^5.2"

0 commit comments

Comments
 (0)