Skip to content

Commit 50b7079

Browse files
committed
Add pytest and tests for config class
1 parent 4835d1c commit 50b7079

File tree

5 files changed

+503
-11
lines changed

5 files changed

+503
-11
lines changed

README.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ On the backend, a Python API based on Docker and FastAPI is serving the image wi
2020

2121
On the Inkplate 10, a script will then connect to the server on the local network via a WiFi connection, retrieve the image and display it on the E-Ink screen. The Inkplate 10 then goes to sleep to conserve battery for 60 minutes or until the wake button is pressed.
2222

23-
Some features of the dashboard:
23+
Some features of the dashboard:
2424

2525
* **Battery Life**: As with similar battery powered devices, the biggest question is the battery life. With the 3000mAh that comes with the manufacturer assembled Inkplate 10, we could potentially be looking at 6-8 month battery life. With this crazy battery life, there are much more options available. Perhaps solar power for unlimited battery life? Or reducing the refresh interval to 15 or 30min to increase the information timeliness?
2626

@@ -38,7 +38,7 @@ Some features of the dashboard:
3838

3939
5. As for the Inkplate, I'm not going to devote too much space here since there are [official resources that describe how to set it up](https://inkplate.readthedocs.io/en/latest/get-started.html). It may take some trial and error for those new to microcontroller programming but it's all worth it! Only the Arduino portion of the guide is relevant, and you'll need to be able to run *.ino scripts via Arduino IDE before proceeding. From there, run the `inkplate10.ino` file from the `inkplate10` folder from the Arduino IDE when connected to the Inkplate.
4040

41-
6. That's all! Your Magic Dashboard should now be refreshed every hour!
41+
6. That's all! Your Magic Dashboard should now be refreshed every hour!
4242

4343
## How to get the ICS URL
4444

@@ -93,6 +93,24 @@ docker compose -f docker-compose.dev.yml up --build
9393

9494
locally to start the application, API docs will be served at <http://localhost:5000/docs>.
9595

96+
## Testing
97+
98+
Run the tests locally:
99+
100+
```shell
101+
# Run all tests
102+
poetry run pytest
103+
104+
# Run tests with coverage report
105+
poetry run pytest --cov=src --cov-report=term-missing
106+
107+
# Run tests with verbose output
108+
poetry run pytest -v
109+
110+
# Run specific test files
111+
poetry run pytest tests/test_config.py
112+
```
113+
96114
### Linting & Formatting
97115

98116
```shell

0 commit comments

Comments
 (0)