This is an exmple project for packaging my own python project.
- Install
build
if you need to build the project:pip install build
.
Run the following command to install the package.
poetry install --only-root
Run the following command to build the package.
poetry build
Then dist
directory will be created under the root in which the package is installed by the following command.
poetry add dist/template_py_package-0.1.0-py3-none-any.whl
The filename depends on the settings written in the pyproject.toml
.
Run the following command to install the package and the dependencies.
poetry install
Run the following command.
poetry run pytest
.
The following command would be preferred if you need the coverage-report.
poetry run pytest --cov=. --cov-report term-missing
for seeing the report on your console, or
poetry run pytest --cov=. --cov-report=html
for outputting html files.