Skip to content

Latest commit

 

History

History
147 lines (90 loc) · 6.39 KB

README.md

File metadata and controls

147 lines (90 loc) · 6.39 KB

Home Guardian Social Image GitHub release Github Actions workflow status GitHub issues GitHub forks GitHub stars GitHub license GitHub code size in bytes GitHub repo size Twitter

home_guardian

Home Guardian, a smart intruder inspection system, ran on Python 3, Raspberry Pi.

Features

Here are the highlights of home_guardian:

  1. Inherited from modern and the latest newest Python technologies:

    Python - Python OpenCV - OpenCV

  2. Sending Email via Tom Email Service, email template engine powered by Jinjia2

  3. Data persistence with peewee, SQLite3 as local database

  4. Environment variable and configuration with pyhocon. Read ${ENVIRONMENT_VARIABLE} when startup

  5. Testing with pytest

  6. Formatting with black

  7. Import sorting with isort

  8. Static typing with mypy

  9. Linting with flake8

  10. Git hooks that run all the above with pre-commit

  11. Deployment ready with Docker

  12. Continuous Integration with GitHub Actions

  13. Universal logging configuration based on Loguru. Log sample is like,

    2021-11-09 10:57:55.362 | WARNING  | MainThread      | home_guardian.configuration.loguru_configuration:configure:61 - Loguru logging configured
    2021-11-09 10:57:55.367 | WARNING  | MainThread      | home_guardian.configuration.thread_pool_configuration:configure:18 - Thread pool executor with 8 workers, executor: <concurrent.futures.thread.ThreadPoolExecutor object at 0x10ad487c0>
    2021-11-09 10:57:55.603 | INFO     | MainThread      | home_guardian.repository.model.base.model:<module>:7 - SQLite database path: /Users/johnny/Projects/PyCharmProjects/home_guardian/home_guardian/_data/home_guardian.db
    2021-11-09 10:57:55.603 | WARNING  | MainThread      | home_guardian.repository.model.base.model:<module>:9 - Initialized db file: <peewee.SqliteDatabase object at 0x10ad48fa0>
    

Usage

  1. Clone or download this project.

    $ git clone https://github.com/johnnymillergh/python_boilerplater.git
  2. Build with newest PyCharm.

  3. Click the green triangle to Run.

Setup

  1. Install dependencies

    $ pipenv install --dev
  2. Setup pre-commit and pre-push hooks

    $ pipenv run pre-commit install -t pre-commit
    $ pipenv run pre-commit install -t pre-push

Useful Commands

Run unit test

$ pipenv run pytest --cov --cov-fail-under=50

Conventional Changelog CLI

  1. Install global dependencies (optional if installed):

    $ npm install -g conventional-changelog-cli
  2. This will not overwrite any previous changelogs. The above generates a changelog based on commits since the last semver tag that matches the pattern of "Feature", "Fix", "Performance Improvement" or "Breaking Changes".

    $ conventional-changelog -p angular -i CHANGELOG.md -s
  3. If this is your first time using this tool and you want to generate all previous changelogs, you could do:

    $ conventional-changelog -p angular -i CHANGELOG.md -s -r 0

CI (Continuous Integration)

  • GitHub Actions is for building project and running tests.
  • Travis CI is for publishing Docker Hub images of SNAPSHOT and RELEASE.

Maintainers

@johnnymillergh

Contributing

Feel free to dive in! Open an issue.

Contributors

This project exists thanks to all the people who contribute.

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]

Credits

This package was created with Cookiecutter and the sourcery-ai/python-best-practices-cookiecutter project template.

Inspired by How to set up a perfect Python project.

Icon from flaticon - Shield, home.

License

Apache License © Johnny Miller

2021 - Present