/photo-classifier

Extract data from your photos and show photos on map where taken

Primary LanguageMakefile

photo-classifier

Extract data from your photos and show photos on map where taken

Pre-install dependencies

  1. make - commands control tool
  2. poetry - requirements manager and virtualenv management tool
  3. python 3.8+ - python pre-installed on your machine
  4. pre-commit - (optional) development dependency for checking code quality before commit

Getting started

Skeleton of Python CLI app project including:

  • poetry-based dependency and virtual machines management
  • unit tests with code coverage report
  • linting (blake, isort, flake8, mypy)
  • CI/CD including linting and unit tests checks (integrated with GitHub Actions according to Git Flow rules)
  • Makefile with most useful preconfigured development and CI/CD commands

Install pre-commit hooks

make pre-commit

Create virtualenv and install dependencies

make deps

Run app locally

One command make run for:

  • creating virtualenv using poetry (one off action)
  • install all the python requirements inside the virtualenv (one off action)
  • install CLI app locally inside virtualenv and run it

Install app globally in the system and run

make install
photo-classifier --version
photo-classifier

Code checks (static code analysis)

make lint
make cov

Restart project from scratch

make clean

Developer guide

Project includes

  • poetry-based dependency and virtual machines management
  • pytest-based unit tests with code coverage report and HTML-based test report
  • static code analysis (linting) (blake, isort, flake8, mypy)
  • CI/CD including linting and unit tests checks (integrated with GitHub Actions according to Git Flow rules)
  • Makefile with most useful preconfigured development and CI/CD commands
  • mkdocs-based automatically generated documentation (use make docs or make docs-run)
  • pre-commit-based code checks during git commit
  • poetry-based - publishing to PyPi

All dev commands

  • make help - print descriptions of all make commands
  • make pre-commit - install pre-commit hooks (see .pre-commit-config.yaml)
  • make deps - install project dependencies
  • make build - build python distribution and wheels
  • make publish - publish lib to the PyPI (pip repo)
    • PYPI_USERNAME and PYPI_PASSWORD env vars MUST be exported before publishing
    • if you would like to set private PyPI (pip repo) please set your repo URL to the pypirepo using: poetry config repositories.pypirepo https://test.pypi.org/legacy/
  • make docs - generate mkdocs-based documentation and save to site/index.html
  • make docs-run - run mkdocs-based doc in the local server
  • make format - format code according to PEP-8 style
  • make lint - check wehther code is formatted according to PEP-8 style
  • make run - run the CLI app from locally installed virtualenv
  • make install - install the CLI app into the system global path
  • make clean - clean full project's virtualenv and dependencies