Skip to content

sicara/VTB

Repository files navigation

vtb

teach sicara's biz profiles tech

Project requirements

Pyenv and Python 3.9.13

  • Install pyenv to manage your Python versions and virtual environments:

    curl -sSL https://pyenv.run | bash
    • If you are on MacOS and experiencing errors on python install with pyenv, follow this comment
    • Add these lines to your ~/.bashrc or ~/.zshrc to be able to activate pyenv virtualenv:
      eval "$(pyenv init -)"
      eval "$(pyenv virtualenv-init -)"
      eval "$(pyenv init --path)"
    • Restart your shell
  • Install the right version of Python with pyenv:

    pyenv install 3.9.13

Install poetry

  • Install Poetry to manage your dependencies and tooling configs:
    curl -sSL https://install.python-poetry.org | python - --version 1.2.2

Installation

Create a virtual environment

Create your virtual environment and link it to your project folder:

pyenv virtualenv 3.9.13 vtb
pyenv local vtb

Now, every time you are in your project directory your virtualenv will be activated thanks to pyenv!

Install Python dependencies through poetry

poetry install --no-root

Install git hooks (running before commit and push commands)

poetry run pre-commit install

Testing

To run unit tests, run pytest with:

pytest tests --cov src

or

make test

Formatting and static analysis

Code formatting with black

To check code formatting, run black with:

black . --check

or

make black

You can also integrate it to your IDE to reformat your code each time you save a file.

Static analysis with pylint

To run static analysis, run pylint with:

pylint src tests

or

make lint

Order imports with isort

To check the imports order, run isort with:

isort . --check

or

make isort

Type checking with mypy

To type check your code, run mypy with:

mypy src --explicit-package-bases --namespace-packages

or

make mypy

About

teach sicara's biz profiles how to tech

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published