diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 9331efd..5f756ca 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -22,7 +22,6 @@ are used for versioning (schema follows below): - Add benchmarks section to the main README. - Improve docs. Add a dedicated section on files creation. -- Minor clean-up. - Test against Django 5.1. - Clean-up. diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index f9647d7..fe3bfab 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -9,6 +9,8 @@ Contributor guidelines .. _doc8: https://doc8.readthedocs.io/ .. _ruff: https://beta.ruff.rs/docs/ .. _pip-tools: https://pip-tools.readthedocs.io/ +.. _uv: https://docs.astral.sh/uv/ +.. _tox: https://tox.wiki .. _issues: https://github.com/barseghyanartur/fake.py/issues .. _discussions: https://github.com/barseghyanartur/fake.py/discussions .. _pull request: https://github.com/barseghyanartur/fake.py/pulls @@ -29,8 +31,8 @@ TL;DR: .. code-block:: sh - pip install pipx --user # Install pipx - pipx install pre-commit # Install pre-commit + curl -LsSf https://astral.sh/uv/install.sh | sh # Install uv + uv tool install pre-commit # Install pre-commit pre-commit install # Install pre-commit hooks Installing `pre-commit`_ will ensure you adhere to the project code quality @@ -51,7 +53,7 @@ Still, if you want to run checks manually: Requirements ------------ -Requirements are compiled using `pip-tools`_. +Requirements are compiled using `uv`_. .. code-block:: sh @@ -77,7 +79,7 @@ Testing Check `testing`_. If you introduce changes or fixes, make sure to test them locally using -all supported environments. For that use tox. +all supported environments. For that use `tox`_. .. code-block:: sh diff --git a/tox.ini b/tox.ini index 07e64c0..729eabb 100644 --- a/tox.ini +++ b/tox.ini @@ -1,63 +1,72 @@ [tox] -envlist = py39,py310,py311,py312,py313 +envlist = + py{39,310,311,312,313} + py{39,310,311,312,313}-{customization,dataclasses,django,hypothesis,lazyfuzzy,pydantic,sqlalchemy,sqlmodel,tortoise} skip_build = True [testenv] +passenv = * +allowlist_externals=* commands = - source $(VENV) - pytest -vrx --dagnose - python manage.py test + cd {toxinidir} && {envpython} -m pip install -e .[all] + {envpython} -m pytest -vrx -[testenv:customization-test] +[testenv:py{39,310,311,312,313}-customization] +changedir = examples/customization commands = - cd examples/customization/ - source $(VENV) - python manage.py test + sh -c 'cd {toxinidir} && {envpython} -m pip install -e .[all]' + {envpython} manage.py test -[testenv:dataclasses-test] +[testenv:py{39,310,311,312,313}-dataclasses] +changedir = examples/dataclasses commands = - cd examples/dataclasses/ - source $(VENV) - python manage.py test + sh -c 'cd {toxinidir} && {envpython} -m pip install -e .[all]' + {envpython} manage.py test -[testenv:django-test] +[testenv:py{39,310,311,312,313}-django] +changedir = examples/django commands = - cd examples/django/ - source $(VENV) - ./manage.py test + sh -c 'cd {toxinidir} && {envpython} -m pip install -e .[all]' + {envpython} -m pip install -r requirements.in + {envpython} manage.py test -[testenv:hypothesis-test] +[testenv:py{39,310,311,312,313}-hypothesis] +changedir = examples/hypothesis commands = - cd examples/hypothesis/ - source $(VENV) - python manage.py test + sh -c 'cd {toxinidir} && {envpython} -m pip install -e .[all]' + {envpython} -m pip install -r requirements.in + {envpython} manage.py test -[testenv:lazyfuzzy-test] +[testenv:py{39,310,311,312,313}-lazyfuzzy] +changedir = examples/lazyfuzzy commands = - cd examples/lazyfuzzy/ - source $(VENV) - python manage.py test + sh -c 'cd {toxinidir} && {envpython} -m pip install -e .[all]' + {envpython} manage.py test -[testenv:pydantic-test] +[testenv:py{39,310,311,312,313}-pydantic] +changedir = examples/pydantic commands = - cd examples/pydantic/ - source $(VENV) - python manage.py test + sh -c 'cd {toxinidir} && {envpython} -m pip install -e .[all]' + {envpython} -m pip install -r requirements.in + {envpython} manage.py test -[testenv:sqlalchemy-test] +[testenv:py{39,310,311,312,313}-sqlalchemy] +changedir = examples/sqlalchemy commands = - cd examples/sqlalchemy/ - source $(VENV) - python manage.py test + sh -c 'cd {toxinidir} && {envpython} -m pip install -e .[all]' + {envpython} -m pip install -r requirements.in + {envpython} manage.py test -[testenv:sqlmodel-test] +[testenv:py{39,310,311,312,313}-sqlmodel] +changedir = examples/sqlmodel commands = - cd examples/sqlmodel/ - source $(VENV) - python manage.py test + sh -c 'cd {toxinidir} && {envpython} -m pip install -e .[all]' + {envpython} -m pip install -r requirements.in + {envpython} manage.py test -[testenv:tortoise-test] +[testenv:py{39,310,311,312,313}-tortoise] +changedir = examples/tortoise commands = - cd examples/tortoise/ - source $(VENV) - python manage.py test + sh -c 'cd {toxinidir} && {envpython} -m pip install -e .[all]' + {envpython} -m pip install -r requirements.in + {envpython} manage.py test