aicore / Template-PythonProject

Template for python project
GNU Affero General Public License v3.0
1 stars 5 forks source link
build-tool python template template-project unit-test

Python template

Building and testing

Prerequisites

for ubuntu/bash:

echo 'export PATH=$PATH:/<path/to/pyb/bin>' >> ~/.bashrc

this is usually /home//.local/bin

source ~/.bashrc

To build,clean and run tests, use the following command:

Build and test

pyb install_dependencies 
# Pyb should work without pyb install_dependencies, but unfortunately it doesnt.
# See details: here https://github.com/pybuilder/pybuilder/issues/727 
pyb -v

Clean builds :

Reset environment :

working with the build system

Running Python Lint Checks

IDE/Editor setup

Pycharm/intellij

Support is present in source. .idea files are avilable when you clone this repo. Just open the folder in pycharm.

Vim

Project structure

Adding dependencies

Writing tests

Follow the above two links on details on how to write tests.

Writing integration tests

Running tests with coverage

Credits