Skip to content

A dummy project to introduce various DevOps tools and Best Practices to Python developers.

Notifications You must be signed in to change notification settings

lazyoracle/fakeproj

Repository files navigation

fakeproj: DevOps for Dummies

unit test integration test coverage codecov complexity test build test

Code style: black Documentation Status Maintenance GitHub issues PRs Welcome

PyPI version fury.io PyPI license PyPI pyversions GitHub release

A dummy project to introduce various DevOps tools and Best Practices to Python developers. Follow along with the tutorial on fakeproj.readthedocs.io

Installation

pip install .

Developer Setup

pip install -r requirements.txt
pip install -e .

Git hooks

pip install pre-commit
pre-commit install
ln -s ../../.githooks/commit-msg .git/hooks/commit-msg
chmod +x .git/hooks/commit-msg
rm .git/hooks/commit-msg.sample

Testing

pytest -s -v --cov=fakeproj test/

There are markers for individual modules from the library, eg,

pytest -v -m "goodmodule" --cov=fakeproj test/

Benchmarks

Benchmarks can be run locally using asv run, followed by asv publish and asv preview.

The benchmarks are also available to view online at here.

To update the online dashboard by pushing the latest benchmarks, use asv gh-pages

Complexity

radon cc -a .
xenon --max-absolute B --max-modules B --max-average A .

Docstrings

docstr-coverage .

GitHub Actions

  • Unit Testing (Python 3.6, 3.7, 3.8 on ubuntu:latest)
  • Code Coverage
  • Code Complexity (Maximum CC of B/B/A)
  • Build Testing (Python 3.6, 3.7, 3.8 on {ubuntu, macos, windows}:latest)

Code Formatting

This project uses Black for Code Formatting

To-Do

  • Populate Docs