Compare commits

...

2 Commits

Author SHA1 Message Date
Histausse d7ebe08091 add tests 2023-05-15 22:41:42 +02:00
Histausse a4dfffb40d reference to poetry in readme 2023-05-15 22:00:30 +02:00
6 changed files with 19 additions and 6 deletions

View File

@ -1,7 +1,5 @@
# TODO: # TODO:
- edit readme to use poetry
- tests
- add AGPL - add AGPL
- add CI - add CI
- add flake - add flake

View File

@ -26,6 +26,7 @@ wheels/
*.egg *.egg
# virtualenv # virtualenv
.venv/
venv/ venv/
# mypy # mypy

View File

@ -18,13 +18,14 @@ This project if a free software released under the {{ cookiecutter.open_source_l
## Dev ## Dev
If you want to tinker with this project, you can clone it and install it in editable mode: This project is managed by [poetry](https://python-poetry.org/).
To open a shell in a venv of the project:
``` ```
git clone {{ cookiecutter.project_url }}.git git clone {{ cookiecutter.project_url }}.git
cd {{ cookiecutter.project_slug }} cd {{ cookiecutter.project_slug }}
python -m venv venv && source venv/bin/activate poetry shell
pip install -e .[dev] poetry install
``` ```
### Test ### Test
@ -32,8 +33,9 @@ pip install -e .[dev]
Tests are run using `pytest`: Tests are run using `pytest`:
``` ```
pytest poetry run pytest
``` ```
{% endif %} {% endif %}
## Author ## Author

View File

@ -17,6 +17,13 @@ python = "^3.10"
[tool.poetry.scripts] [tool.poetry.scripts]
{{ cookiecutter.project_slug }} = "{{ cookiecutter.project_slug }}.cli:main" {{ cookiecutter.project_slug }} = "{{ cookiecutter.project_slug }}.cli:main"
[tool.poetry.group.dev.dependencies]
pytest = "*"
pytest-cov = "*"
[tool.pytest.ini_options]
addopts = "--cov"
[build-system] [build-system]
requires = ["poetry-core"] requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api" build-backend = "poetry.core.masonry.api"

View File

@ -0,0 +1,4 @@
import {{ cookiecutter.project_slug }}
def test_dummy():
assert True

View File

@ -1,5 +1,6 @@
import argparse import argparse
def main(): def main():
""" Console entrypoint for {{cookiecutter.project_slug}}.""" """ Console entrypoint for {{cookiecutter.project_slug}}."""
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()