Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,26 @@ Please, see [CONTRIBUTING.md](CONTRIBUTING.md) for more details on:

You can create new projects starting from this repository,
so you can use a consistent CI and checks for different projects.
To enable the virtual environment, use this command:

```bash
poetry install
```

To use the virtual environment, use this command:

```bash
poetry shell
```

To add a dependency, use this command:

```bash
poetry add <package>
```

When install or add dependencies, file `poetry.lock` is created. This file is used to track all dependencies used
in the project, so is a good practice commit it in the repository.

Besides all the explanations in the [CONTRIBUTING.md](CONTRIBUTING.md) file, you can use the docker-compose file
(e.g. if you prefer to use docker instead of installing the tools locally)
Expand Down
22 changes: 22 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

[tool.poetry]
Copy link

@CastixGitHub CastixGitHub Aug 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong section? (a legacy one?)
looked weird and https://python-poetry.org/docs/basic-usage/ uses [project]

name = "python-cookiecutter"
version = "0.0.1"
description = "This is a Python Cookiecutter reposityr"
authors = [
"A user <me@me.com>"
]
readme = "README.md"
classifiers = [
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
]
[tool.poetry.dependencies]
python = "^3.11"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@henryx We need to support at least py3.8.

Copy link
Contributor

@ilovelinux ilovelinux Feb 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ioggstream consider adding this information somewhere in the README.md

Consider that Python 3.8 already reached EOL: https://endoflife.date/python


[tool.poetry.group.test.dependencies]
tox = "^4.4.7"
pytest = "^7.2.2"
2 changes: 0 additions & 2 deletions requirements-dev.txt

This file was deleted.

Empty file removed requirements.txt
Empty file.
33 changes: 22 additions & 11 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
[tox]
envlist = py3, safety
skipsdist=True
envlist =
py3
safety

skipsdist = True

[testenv]
description = run unit tests
usedevelop = True
deps =
-rrequirements.txt
-rrequirements-dev.txt
pytest>=7
pytest-sugar

# Uncomment here to set an extra PIP_INDEX_URL
# setenv =
Expand All @@ -17,19 +22,25 @@ setenv =
# To show pytest logs in console, use
# tox -- --log-cli-level=DEBUG
commands =
pytest {posargs}
pytest {posargs}

# Because safety need to work on requirements.txt, and tox doesn't permit to
# redirect output, we need to create a temporary file reporting all dependencies
[testenv:safety]
deps =
-rrequirements.txt
-rrequirements-dev.txt
safety
deps = safety

allowlist_externals =
poetry
safety
bash

setenv =
PYTHONPATH=:.:

commands =
safety check --short-report -r requirements.txt
poetry export -f requirements.txt -o requirements.txt
safety check --short-report -r requirements.txt
bash -c "rm requirements.txt"

[flake8]
# Ignore long lines in flake8 because
Expand Down Expand Up @@ -59,7 +70,7 @@ passenv =

commands =
# rm dist -rf
python setup.py bdist_wheel # sdist, or whatever
poetry build -f wheel # or sdist
twine upload {posargs} dist/*


Expand Down