Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ PYTHON = python3

# .PHONY defines parts of the makefile that are not dependant on any specific file
# This is most often used to store functions
.PHONY = all help setup format lint format-n-lint test-n-cover pre-commit
.PHONY = all help setup format lint format-n-lint test-n-cover pre-commit clean

# Defining an array variable
FILES = input output
IGNORED_FILES_AND_FOLDERS = .mypy_cache/ .pytest_cache/ htmlcov/ logs/ .coverage

# Defines the default target that `make` will to try to make, or in the case of a phony target, execute the specified commands
# This target is executed whenever we just type `make`
Expand Down Expand Up @@ -115,3 +115,10 @@ pre-commit: #: Run pre-commit checks : format, lint, test, cover
make test-n-cover
@echo "\n$(BOLD_CYAN)Pre commit jobs completed$(RESET_STYLES) 👍"
@echo "\n"


clean: #: Clean unnecessary files
@echo "\n$(BOLD_CYAN)Cleaning unnecessary files$(RESET_STYLES) 🚿"
rm -rf $(IGNORED_FILES_AND_FOLDERS)
@echo "\n"

6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Tools
[![API Specs](https://img.shields.io/badge/specs-flasgger-6D9A00?style=flat&logo=swagger&logoColor=white)](https://github.com/flasgger/flasgger)
[![Tests: pytest](https://img.shields.io/badge/%20tests-pytest-%23009BDB?style=flat)](https://docs.pytest.org/en/latest/contents.html)
[![Coverage: pytest-cov](https://img.shields.io/badge/%20coverage-pytest--cov-%23009BDB?style=flat)](https://docs.pytest.org/en/latest/contents.html)
[![Version Handling: tbump](https://img.shields.io/badge/%20version%20handling-tbump-%23009BDB?style=flat)](https://docs.pytest.org/en/latest/contents.html)


Usage Guide
Expand Down Expand Up @@ -84,6 +85,11 @@ To be updated

Contributing
------------------------------------------------------------------------------
1. Stargaze this repository
1. Fork this repository
1. Commit your changes
1. Create pull request to `development` branch

[![](https://sourcerer.io/fame/pritam001/pritam001/pyflask-microservice-base/images/0)](https://sourcerer.io/fame/pritam001/pritam001/pyflask-microservice-base/links/0)
[![](https://sourcerer.io/fame/pritam001/pritam001/pyflask-microservice-base/images/1)](https://sourcerer.io/fame/pritam001/pritam001/pyflask-microservice-base/links/1)
[![](https://sourcerer.io/fame/pritam001/pritam001/pyflask-microservice-base/images/2)](https://sourcerer.io/fame/pritam001/pritam001/pyflask-microservice-base/links/2)
Expand Down
3 changes: 3 additions & 0 deletions requirements/dev-requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,6 @@ pytest

# This plugin produces coverage reports. Compared to just using coverage run, this plugin does some extras
pytest-cov

# bump software releases
tbump
13 changes: 11 additions & 2 deletions requirements/dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,18 @@
#
appdirs==1.4.4 # via black, virtualenv
astroid==2.4.2 # via pylint
attrs==19.3.0 # via black, flake8-eradicate, pytest
attrs==19.3.0 # via black, flake8-eradicate, pytest, tbump
autoflake==1.3.1 # via -r requirements/dev-requirements.in
bandit==1.6.2 # via -r requirements/dev-requirements.in
black==19.10b0 # via -r requirements/dev-requirements.in
cfgv==3.2.0 # via pre-commit
cli-ui==0.10.3 # via tbump
click==7.1.2 # via black
colorama==0.4.3 # via radon
colorama==0.4.3 # via cli-ui, radon
contextlib2==0.6.0.post1 # via schema
coverage==5.2.1 # via pytest-cov
distlib==0.3.1 # via virtualenv
docopt==0.6.2 # via tbump
eradicate==1.0 # via flake8-eradicate
filelock==3.0.12 # via virtualenv
flake8-blind-except==0.1.1 # via -r requirements/dev-requirements.in
Expand Down Expand Up @@ -45,6 +48,7 @@ mypy-extensions==0.4.3 # via mypy
mypy==0.782 # via -r requirements/dev-requirements.in
nodeenv==1.4.0 # via pre-commit
packaging==20.4 # via pytest
path==13.3.0 # via tbump
pathspec==0.8.0 # via black
pbr==5.4.5 # via stevedore
pep8-naming==0.11.1 # via -r requirements/dev-requirements.in
Expand All @@ -61,12 +65,17 @@ pyyaml==5.3.1 # via bandit, pre-commit
r2c-py-ast==0.1.0b1 # via flake8-flask
radon==4.2.0 # via -r requirements/dev-requirements.in
regex==2020.7.14 # via black
schema==0.7.2 # via tbump
six==1.15.0 # via astroid, bandit, flake8-print, mando, packaging, virtualenv
smmap==3.0.4 # via gitdb
stevedore==3.2.0 # via bandit
tabulate==0.8.7 # via cli-ui
tbump==6.1.1 # via -r requirements/dev-requirements.in
toml==0.10.1 # via black, pre-commit, pylint, pytest
tomlkit==0.5.11 # via tbump
typed-ast==1.4.1 # via black, mypy
typing-extensions==3.7.4.2 # via mypy
unidecode==1.1.1 # via cli-ui
virtualenv==20.0.30 # via pre-commit
wrapt==1.12.1 # via astroid

Expand Down
2 changes: 1 addition & 1 deletion settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"default": {
"DEBUG": true,
"VERSION": "0.0.1",
"VERSION": "0.1.2",
"PROFILER": {
"flask-profiler": true,
"line-profiler": true,
Expand Down
40 changes: 40 additions & 0 deletions tbump.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Uncomment this if your project is hosted on GitHub:
# github_url = https://github.com/<user or organization>/<project>/

[version]
current = "0.1.2"

# Example of a semver regexp.
# Make sure this matches current_version before
# using tbump
regex = '''
(?P<major>\d+)
\.
(?P<minor>\d+)
\.
(?P<patch>\d+)
'''

[git]
message_template = "Bump to {new_version}"
tag_template = "v{new_version}"

# For each file to patch, add a [[file]] config section containing
# the path of the file, relative to the tbump.toml location.
[[file]]
src = "settings.json"
search = '"VERSION": "{current_version}"'

# You can specify a list of commands to
# run after the files have been patched
# and before the git commit is made

[[before_commit]]
name = "Run all tests"
cmd = "make test-n-cover"

# Or run some commands after the git tag and the branch
# have been pushed:
# [[after_push]]
# name = "publish"
# cmd = "./publish.sh"