This repository contains various problem sets (aka tasks or challenges) for the Python training course. These challenges will help you to improve your skills in some basic Python topics. Many tasks are collected from authors' interview experience.
This section describes the general usage of the project.
It's recommended to use poetry with this project. Otherwise you are to do some additional work while installing dependencies and configuring internal packages.
Once you've cloned the repository to your local machine install dependencies:
poetry install
This will also install internal packages for future tests.
For whose, who prefer to use pip as a package manager, it's supported. However it's not a primary package manager for this project, so problems may still appear - please, report to bug tracker in case of any.
You will need to install project dependencies and source code. To do this use commands:
pip install -r requirements.txt pip install -e .
There are few dependencies installed to check the code health:
- pytest-cov
- mypy
- pylint
They are acting as stand-alone commands, available from your terminal with poetry:
poetry run pytest poetry run mypy poetry run pylint src
tox aims to automate and standardize testing in Python. It is a generic virtualenv management and test command line tool you can use for:
- checking that your package installs correctly with different Python versions and interpreters
- running your tests in each of the environments, configuring your test tool of choice
- acting as a frontend to Continuous Integration servers, greatly reducing boilerplate and merging CI and shell-based testing.
It's also include to the project's deps, run it with:
poetry run tox
/problem-sets |-- src/ |-- tests/
There are two major directories: src and tests. Any useful code should be included to the source (src). Test cases for functions, classes etc. should lie inside of tests directory. It's ok to created nested packages within these directories if needed.
For more details refer to contributing guide.