diff --git a/{{ cookiecutter.project_slug }}/README.md b/{{ cookiecutter.project_slug }}/README.md index a718cc6..4e5c514 100644 --- a/{{ cookiecutter.project_slug }}/README.md +++ b/{{ cookiecutter.project_slug }}/README.md @@ -15,6 +15,25 @@ pip install git+{{ cookiecutter.project_url }}.git ## License This project if a free software released under the {{ cookiecutter.open_source_license }}. + +## Dev + +If you want to tinker with this project, you can clone it and install it in editable mode: + +``` +git clone {{ cookiecutter.project_url }}.git +cd {{ cookiecutter.project_slug }} +python -m venv venv && source venv/bin/activate +pip install -e .[dev] +``` + +### Test + +Tests are run using `pytest`: + +``` +pytest +``` {% endif %} ## Author @@ -24,3 +43,4 @@ This project if a free software released under the {{ cookiecutter.open_source_l ## Security If you discover a potential security issue in this project, please contact {{ cookiecutter.email }}. + diff --git a/{{ cookiecutter.project_slug }}/pyproject.toml b/{{ cookiecutter.project_slug }}/pyproject.toml index 86f8343..c29604a 100644 --- a/{{ cookiecutter.project_slug }}/pyproject.toml +++ b/{{ cookiecutter.project_slug }}/pyproject.toml @@ -14,9 +14,20 @@ readme = "README.md" requires-python = ">={{ cookiecutter.python_min_version }}" dependencies = [] +[project.optional-dependencies] +test = [ + "pytest >=7.2.2", +] +dev = ["{{ cookiecutter.project_slug }}[test]"] + [project.urls] "Homepage" = "{{ cookiecutter.project_url }}" "Bug Tracker" = "{{ cookiecutter.project_url }}/issues" [project.scripts] {{ cookiecutter.project_slug }} = "{{ cookiecutter.project_slug }}.cli:main" + +[tool.pytest.ini_options] +addopts = [ + "--import-mode=importlib", +] diff --git a/{{ cookiecutter.project_slug }}/tests/test_{{ cookiecutter.project_slug }}.py b/{{ cookiecutter.project_slug }}/tests/test_{{ cookiecutter.project_slug }}.py new file mode 100644 index 0000000..35c1b8d --- /dev/null +++ b/{{ cookiecutter.project_slug }}/tests/test_{{ cookiecutter.project_slug }}.py @@ -0,0 +1,4 @@ +import {{ cookiecutter.project_slug }} + +def test_dummy(): + assert True