Create the virtual environment with python 3.7 version and install requirements:
mkvirtualenv [-a project_path] [-i package] [-r requirements_file] [virtualenv options] ENVNAME
So as an example:
mkvirtualenv -r requirements.txt --python=python3.7 luope-env
Activate the venv:
workon luope-env
Configure and enable git hooks (NOTE: python 3.7 is mandatory!):
pre-commit install
Finally, to run the tests simply run:
tox
All done. :)
├── bitbucket-pipelines.yml - file that automates remote builds and testing directly in bitbucket pipeline
├── luope_module
│ ├── ai - module core
│ └── util - auxiliary utilities
│ └── prerequisites.py - condition and required types check
├── pyproject.toml - configuration file for black pre-commit hook
├── README.md
├── requirements.txt - requirements for the repo
├── research
│ ├── notebooks - folder for exploration jupyter notebooks
│ └── scripts - folder for exploration scripts
├── setup.py - file to install module with usage
├── test - test files, must have test_ as prefix for tox to find them
│ ├── test_*.py
└── tox.ini - tox configuration file, with python 3.7 testing env
To create the tar.gz file:
python setup.py sdist
pip install dist/luope_module-SNAPSHOT.tar.gz
Otherwise just install it: (where setup.py is located)
pip install .
- master merged clean branch with successful build, not for working;
Every feature/bug most have a trello card and the branch naming convention is:
- feature/card#_description
- bugfix/card#_description
Every pull request must be review by 2 reviewers and both local tox and Bitbucket builds must be successful before merging in master branch.
Every time a new module related requirement is needed, it should be added both to the requirements file and in the required packages in setup.py.