Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uv, tox and Python 3.12 #168

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
9 changes: 9 additions & 0 deletions docs/xocto/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@ of this workflow:
This is why typically in shared projects version releases are separated into
their own pull requests.

## Altering dependencies

* Edit `pyproject.toml`.
* `make sync_requirements` to refresh `requirements.txt`.
* `make install test format_check lint_check mypy`.
Copy link
Contributor

Choose a reason for hiding this comment

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

It's probably worth copying the makefile targets from the CookieCutterPackage repo:
https://github.com/octoenergy/cookiecutter-kraken-package/blob/main/%7B%7B%20cookiecutter.repo_name%20%7D%7D/makefile


When you are ready, commit both `pyproject.toml` and
`requirements.txt`.

## Publishing

### Version number
Expand Down
6 changes: 4 additions & 2 deletions makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
install:
pip install pip==23.3.1
pip install -e '.[dev,docs]'
pip install uv==0.2.34
uv pip install -r requirements.txt --editable .
Copy link
Contributor Author

@quicklizard99 quicklizard99 Aug 12, 2024

Choose a reason for hiding this comment

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

I would prefer this to be uv pip sync requirements.txt but without --editable . CI fails with importlib.metadata.PackageNotFoundError: xocto.


sync_requirements:
uv pip compile --output-file=requirements.txt --extra=dev pyproject.toml

# CI step wrappers

Expand Down
300 changes: 300 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,300 @@
# This file was autogenerated by uv via the following command:
# uv pip compile --output-file=requirements.txt --extra=dev pyproject.toml
annotated-types==0.7.0
# via pydantic
anyio==4.4.0
# via starlette
asgiref==3.8.1
# via django
attrs==24.2.0
# via
# cattrs
# ddtrace
# hypothesis
backports-tarfile==1.2.0
# via jaraco-context
boto3==1.26.53
# via
# xocto (pyproject.toml)
# moto
botocore==1.29.53
# via
# xocto (pyproject.toml)
# boto3
# moto
# s3transfer
bytecode==0.15.1
# via ddtrace
cattrs==23.2.3
# via ddtrace
certifi==2024.7.4
# via requests
cffi==1.17.0
# via
# cryptography
# pact-python
cfgv==3.4.0
# via pre-commit
charset-normalizer==3.3.2
# via requests
click==8.1.7
# via
# pact-python
# uvicorn
cryptography==43.0.0
# via moto
ddsketch==3.0.1
# via ddtrace
ddtrace==2.10.4
# via xocto (pyproject.toml)
deprecated==1.2.14
# via opentelemetry-api
distlib==0.3.8
# via virtualenv
django==4.2.15
# via xocto (pyproject.toml)
docutils==0.21.2
# via readme-renderer
duckdb==1.0.0
# via xocto (pyproject.toml)
envier==0.5.2
# via ddtrace
et-xmlfile==1.1.0
# via openpyxl
exceptiongroup==1.2.2
# via
# anyio
# cattrs
# hypothesis
# pytest
fastapi==0.112.0
# via pact-python
filelock==3.15.4
# via virtualenv
h11==0.14.0
# via uvicorn
hypothesis==6.62.1
# via xocto (pyproject.toml)
identify==2.6.0
# via pre-commit
idna==3.7
# via
# anyio
# requests
# yarl
importlib-metadata==8.2.0
# via
# keyring
# twine
iniconfig==2.0.0
# via pytest
jaraco-classes==3.4.0
# via keyring
jaraco-context==5.3.0
# via keyring
jaraco-functools==4.0.2
# via keyring
jinja2==3.1.4
# via moto
jmespath==1.0.1
# via
# boto3
# botocore
keyring==25.3.0
# via twine
markdown-it-py==3.0.0
# via rich
markupsafe==2.1.5
# via
# jinja2
# werkzeug
mdurl==0.1.2
# via markdown-it-py
more-itertools==10.4.0
# via
# jaraco-classes
# jaraco-functools
moto==4.1.0
# via xocto (pyproject.toml)
multidict==6.0.5
# via yarl
mypy==1.10.0
# via xocto (pyproject.toml)
mypy-boto3-s3==1.34.120
# via xocto (pyproject.toml)
mypy-extensions==1.0.0
# via mypy
nh3==0.2.18
# via readme-renderer
nodeenv==1.9.1
# via pre-commit
numpy==1.22.2
# via
# xocto (pyproject.toml)
# pandas
# pyarrow
openpyxl==3.1.5
# via xocto (pyproject.toml)
opentelemetry-api==1.16.0
# via ddtrace
packaging==24.1
# via pytest
pact-python==2.2.1
# via xocto (pyproject.toml)
pandas==2.0.3
# via xocto (pyproject.toml)
pkginfo==1.11.1
# via twine
platformdirs==4.2.2
# via virtualenv
pluggy==1.5.0
# via pytest
pre-commit==3.8.0
# via xocto (pyproject.toml)
protobuf==5.27.3
# via ddtrace
psutil==6.0.0
# via pact-python
psycopg2==2.9.9
# via xocto (pyproject.toml)
pyarrow==17.0.0
# via xocto (pyproject.toml)
pyarrow-stubs==10.0.1.6
# via xocto (pyproject.toml)
pycparser==2.22
# via cffi
pydantic==2.8.2
# via fastapi
pydantic-core==2.20.1
# via pydantic
pygments==2.18.0
# via
# readme-renderer
# rich
pytest==8.0.2
# via
# xocto (pyproject.toml)
# pytest-django
# pytest-mock
pytest-django==4.8.0
# via xocto (pyproject.toml)
pytest-mock==3.12.0
# via xocto (pyproject.toml)
python-dateutil==2.9.0.post0
# via
# xocto (pyproject.toml)
# botocore
# moto
# pandas
# time-machine
python-magic==0.4.27
# via xocto (pyproject.toml)
pytz==2024.1
# via
# xocto (pyproject.toml)
# pandas
pyyaml==6.0.2
# via
# moto
# pre-commit
# responses
readme-renderer==44.0
# via twine
requests==2.32.3
# via
# moto
# pact-python
# requests-toolbelt
# responses
# twine
requests-toolbelt==1.0.0
# via twine
responses==0.25.3
# via moto
rfc3986==2.0.0
# via twine
rich==13.7.1
# via twine
ruff==0.4.9
# via xocto (pyproject.toml)
s3transfer==0.6.2
# via boto3
setuptools==72.1.0
# via opentelemetry-api
six==1.16.0
# via
# ddsketch
# ddtrace
# pact-python
# python-dateutil
sniffio==1.3.1
# via anyio
sortedcontainers==2.4.0
# via hypothesis
sqlparse==0.5.1
# via django
starlette==0.37.2
# via fastapi
structlog==24.4.0
# via xocto (pyproject.toml)
time-machine==2.14.1
# via xocto (pyproject.toml)
tomli==2.0.1
# via
# mypy
# pytest
twine==4.0.2
# via xocto (pyproject.toml)
types-openpyxl==3.0.4.5
# via xocto (pyproject.toml)
types-python-dateutil==2.8.19.20240106
# via xocto (pyproject.toml)
types-pytz==2024.1.0.20240203
# via xocto (pyproject.toml)
types-requests==2.28.11.8
# via xocto (pyproject.toml)
types-urllib3==1.26.25.14
# via types-requests
typing-extensions==4.12.2
# via
# anyio
# asgiref
# bytecode
# cattrs
# ddtrace
# fastapi
# mypy
# mypy-boto3-s3
# pact-python
# pydantic
# pydantic-core
# starlette
# uvicorn
tzdata==2024.1
# via pandas
urllib3==1.26.19
# via
# botocore
# requests
# responses
# twine
uvicorn==0.30.5
# via pact-python
virtualenv==20.26.3
# via pre-commit
werkzeug==3.0.3
# via moto
wheel==0.38.4
# via xocto (pyproject.toml)
wrapt==1.16.0
# via deprecated
xlrd==2.0.1
# via xocto (pyproject.toml)
xmltodict==0.13.0
# via
# ddtrace
# moto
yarl==1.9.4
# via pact-python
zipp==3.19.2
# via importlib-metadata