Skip to content

Repository files navigation

WLSS backend lib

badge badge badge badge

Library used by WLSS backend.

Table of Contents

Installation

System requirements

First time setup

Run linters

Run tests


This library is developed to be internally used by wlss backend. That's one of the reasons why it's not pushed to python index.

As of now it can be installed from GitHub. For example if you use Poetry you can add following line to your pyproject.toml:

# note that "branch" may differ depending on your purposes
wlss = {git="https://github.com/week-password/wlss-backend-lib.git", branch="develop"}

and then do a usual poetry stuff like updating lock file and installing new dependencies.

To develop this project you need to have the following software installed.

Before start to setup project you have to meet System requirements.

Go to the project root directory.

  1. Set up local environment:
# Set up git user for this repository
# change values below to your name and email
git config user.name "John Doe"
git config user.email "john.doe@mail.com"

# Create virtual environment and install dependencies.
poetry install --with lint,test

# Activate virtual environment.
poetry shell
  1. Upgrade pip within virtual environment:
pip install --upgrade pip

To run linters you need to do all steps from First time setup section.

Linters order below is a preferred way to run and fix them one by one.

Run any linter you need or all of them at once:

# Run mypy.
mypy

# Run ruff.
ruff check src tests

# Run flake8.
flake8

To run tests you need to do all steps from First time setup section.

You can choose one of the following ways of running tests:

  • Tests with summary coverage.
pytest --cov=src
  • Tests with html coverage report:
pytest --cov=src ; coverage html
  • Tests with execution contexts in report:
pytest --cov=src --cov-context=test ; coverage html --show-contexts --no-skip-covered

About

Library supposed to be used by WLSS backend services.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages