Poetry demo
Poetry - инструмент для управления зависимостями в Python проектах (аналог встроенного pip).
pip install poetry
# для первичной установки
poetry install
# для обновления
poetry update
poetry run demo
usage: demo [-h] [--random {int,real}] [--output OUTPUT] [a] [b] [n] [k]
Dynamic histogram work demo
positional arguments:
a The left boundary of the uniform distribution of a random variable
b The right boundary of the uniform distribution of a random variable
n Number of histogram intervals
k The number of points per one interval of the dynamic histogram
options:
-h, --help show this help message and exit
--random {int,real}, -r {int,real}
Set type of random variable: integer(int) or real(real)
--output OUTPUT, -o OUTPUT
The name of the file in which information about the difference between normal and dynamic histograms will be placed
poetry run pytest
poetry run black --check ./trasil
poetry run isort --check ./trasil
# Create package
poetry build
# Install
pip install dist/poetry_demo-<version>-py3-none-any.whl
demo
from trasil.dynamichistogram import ClassicHistogram
Doit demo
Doit - менеджер заданий. Действия задаются в файле dodo.py в корне проекта
Если пишет bash: doit: command not found
- запускать через poetry run doit
doit list
doit check-style
doit test
doit build
doit publish