This instructions are for linux base systems. (Linux, MacOS, BSD, etc.)
Run make virtualenv
to create a virtual environment.
then activate it with source .venv/bin/activate
.
Run make install
to install the project in develop mode.
Run make test
to run the tests.
Run git checkout -b {TASK_ID}/{TASK_DESCRIPTION
TASK_ID
: jira task IDTASK_DESCRIPTION
: task's brief description
Example: git checkout -b BILL-1111/building_python_boilerplate
TASK_ID
=BILL-1111
TASK_DESCRIPTION
=building_python_boilerplate
Edit the files using your preferred editor.
Run make format
to format the code.
Run make lint
to run the linter.
Run make test
to run the tests.
Ensure code coverage report shows 100%
coverage, add tests to your PR.
This project uses conventional git commit messages.
Example: fix(package): update setup.py arguments 🎉
(emojis are fine too)
Run git push origin BILL-1111/building_python_boilerplate
On git.paas.vn, click on Pull Request
button.
This project comes with a Makefile
that contains a number of useful utility.
❯ make
Usage: make <target>
Targets:
help: ## Show the help.
virtualenv: ## Create a virtual environment.
install: ## Install the project in dev mode.
format: ## Format code using black & isort.
lint: ## Run black, mypy, pylint linters.
format_changes: ## Format modified code using darker & isort.
lint_changes: ## Run darker, mypy, pylint linters on modified code.
test: ## Run tests and generate coverage report.
release: ## Create a new tag for release.
init: ## Initialize the project based on an application template.
This project uses semantic versioning and tags releases with X.Y.Z
To trigger a new release all you need to do is.
- Run the tests to ensure everything is working.
- Run
make release
to create a new tag. git push -u origin HEAD --tags
to push it to the remote repo
The make release
will ask you the version number to create the tag, ex: type 0.1.1
when you are asked.
CAUTION: The make release will change local changelog files and commit all the unstaged changes you have.