Installation¶
Cloning STEVDB¶
First, clone the repository in your computer:
git clone https://github.com/asimazbunzel/stevdb.git
or
git clone git@github.com:asimazbunzel/stevdb.git
depending if you have git set up or you are using an SSH key.
Installing STEVDB¶
Once the repository is cloned in a local directory, cd into this new directory and run the following code
pip install -U stevdb
This will create the executable db-manager that controls the creation of tables in a database that must have been created with the STEVMA code
Then, you can run
db-manager --help
or with Poetry
poetry run db-manager --help
Note
USE A CONDA ENVIRONMENT
The usage of a conda environment is strongly recommended as it will automatically handle the different versions of the libraries needed by the code to work
STEVDB development¶
Here is how to set up STEVDB for development purposes. See also Contributing for how to
prepare your GitHub fork of the module.
Makefile usage¶
Makefile contains a lot of functions for faster development.
Download and remove Poetry
To download and install Poetry run:
make poetry-download
To uninstall
make poetry-remove
Install all dependencies and pre-commit hooks
Install requirements:
make install
Pre-commit hooks coulb be installed after git init via
make pre-commit-install
Codestyle
Automatic formatting uses pyupgrade, isort and black.
make codestyle
# or use synonym
make formatting
Codestyle checks only, without rewriting files:
make check-codestyle
Note
check-codestyle uses isort, black and darglint library
Update all dev libraries to the latest version using one comand
make update-dev-deps
Code security
make check-safety
This command launches Poetry integrity checks as well as identifies security issues with Safety and Bandit.
make check-safety
Type checks
Run mypy static type checker
make mypy
And many more ! See much more information on this template