diff --git a/Makefile b/Makefile deleted file mode 100644 index 41fb87c..0000000 --- a/Makefile +++ /dev/null @@ -1,37 +0,0 @@ -# SPDX-FileCopyrightText: 2013-2022 Miguel Gonzalez -# -# SPDX-License-Identifier: CC0-1.0 - -PYTHON := .venv/bin/python - -default: test - -install: - python -m venv .venv - ${PYTHON} -m pip install --upgrade pip setuptools wheel - ${PYTHON} -m pip install docutils pygments - ${PYTHON} -m pip install build twine check-wheel-contents - -release: clean test build - @echo Check: - @echo '' - @echo '[ ] Change log updated.' - @echo '[ ] Version bumped (bumpversion patch).' - @echo '[ ] Updated GitHub (git push).' - @echo '' - @echo 'Finally:' - @echo '' - @echo '[ ] Upload to PyPI (twine upload dist/*).' - -test: install - ${PYTHON} test_dj_email_url.py - ${PYTHON} -m docutils README.rst --halt=info >/dev/null - ${PYTHON} -m docutils CHANGELOG.rst --halt=info >/dev/null - -build: install - ${PYTHON} -m build --sdist --wheel . - ${PYTHON} -m check_wheel_contents dist/*.whl - -clean: - rm -f README.rst.html - rm -f dist/* diff --git a/README.rst b/README.rst index 00d73b2..f3796fa 100644 --- a/README.rst +++ b/README.rst @@ -223,6 +223,25 @@ File backend The file backend is the only one which needs a path. The url path is store in ``EMAIL_FILE_PATH`` key. + +Running the tests +================= + +Fork, then clone the repo: + +.. code:: bash + + git clone git@github.com:put-your-user-here/dj-email-url.git + +Then you can run the tests with the *just* command runner: + +.. code:: bash + + just test + +If you don't have *just* installed, +you can look in the ``justfile`` for the commands that are run. + License ======= diff --git a/justfile b/justfile new file mode 100644 index 0000000..fa8383e --- /dev/null +++ b/justfile @@ -0,0 +1,39 @@ +# SPDX-FileCopyrightText: 2013-2022 Miguel Gonzalez +# +# SPDX-License-Identifier: CC0-1.0 + +python := ".venv/bin/python" + +default: test + +install: + test -e {{python}} || python -m venv .venv + {{python}} -m pip install --upgrade pip setuptools wheel + {{python}} -m pip install docutils pygments + +requirements-build: install + {{python}} -m pip install build twine check-wheel-contents + +release: clean test build + @echo Check: + @echo '' + @echo '[ ] Change log updated.' + @echo '[ ] Version bumped (bumpversion patch).' + @echo '[ ] Updated GitHub (git push).' + @echo '' + @echo 'Finally:' + @echo '' + @echo '[ ] Upload to PyPI (twine upload dist/*).' + +test: install + {{python}} test_dj_email_url.py + {{python}} -m docutils README.rst --halt=info >/dev/null + {{python}} -m docutils CHANGELOG.rst --halt=info >/dev/null + +build: requirements-build + {{python}} -m build --sdist --wheel . + {{python}} -m check_wheel_contents dist/*.whl + +clean: + rm -f README.rst.html + rm -f dist/*