Skip to content

Commit

Permalink
Splits production and development requirements, makes versioning virt…
Browse files Browse the repository at this point in the history
…ual (#11)
  • Loading branch information
chrisguidry authored Aug 2, 2024
1 parent cc7696c commit 04c7457
Show file tree
Hide file tree
Showing 11 changed files with 319 additions and 359 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ __pycache__
.pytest_cache
.python-version
.vscode
.ruff_cache
11 changes: 7 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ endif

mv .bookkeeping/uv.next .bookkeeping/uv

.bookkeeping/development.txt: .bookkeeping/uv requirements.txt pyproject.toml
.bookkeeping/development.txt: .bookkeeping/uv requirements-dev.txt pyproject.toml
mkdir -p .bookkeeping
cat requirements.txt > .bookkeeping/development.txt.next
cat requirements-dev.txt > .bookkeeping/development.txt.next

uv pip sync .bookkeeping/development.txt.next

Expand All @@ -24,8 +24,11 @@ endif

mv .bookkeeping/development.txt.next .bookkeeping/development.txt

%.txt: %.in .bookkeeping/uv
uv pip compile --resolver=backtracking --upgrade --output-file $@ $<
requirements.txt: requirements.in .bookkeeping/uv
uv pip compile requirements.in --output-file $@

requirements-dev.txt: requirements.txt requirements-dev.in .bookkeeping/uv
uv pip compile requirements.txt requirements-dev.in --output-file $@

.git/hooks/pre-commit: .bookkeeping/development.txt
pre-commit install
Expand Down
4 changes: 3 additions & 1 deletion prefect_operator/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from prefect_operator._version import __version__ # noqa: F401
from setuptools_scm import get_version

__version__ = get_version()

DEFAULT_PREFECT_VERSION = "3.0.0rc13"
17 changes: 0 additions & 17 deletions prefect_operator/_version.py

This file was deleted.

10 changes: 7 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@ requires-python = ">=3.11"

dynamic = ["version"]

[tool.setuptools_scm]
version_file = "prefect_operator/_version.py"

[project.scripts]
prefect-operator = "prefect_operator.__main__:main"

[tool.pytest.ini_options]
minversion = "8.3"
addopts = "--cov prefect_operator --cov tests --cov-branch --cov-report=term-missing"
testpaths = [
"tests"
]
9 changes: 9 additions & 0 deletions requirements-dev.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
ipython
mypy
pre-commit
pytest
pytest-coverage
ruff
types-pyyaml
yamlfix
uv
264 changes: 264 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,264 @@
# This file was autogenerated by uv via the following command:
# uv pip compile requirements.txt requirements-dev.in --output-file requirements-dev.txt
-e .
# via -r requirements.txt
aiohappyeyeballs==2.3.4
# via
# -r requirements.txt
# aiohttp
aiohttp==3.10.0
# via
# -r requirements.txt
# kopf
aiosignal==1.3.1
# via
# -r requirements.txt
# aiohttp
annotated-types==0.7.0
# via
# -r requirements.txt
# pydantic
anyio==4.4.0
# via
# -r requirements.txt
# httpx
asttokens==2.4.1
# via stack-data
attrs==23.2.0
# via
# -r requirements.txt
# aiohttp
cachetools==5.4.0
# via
# -r requirements.txt
# google-auth
certifi==2024.7.4
# via
# -r requirements.txt
# httpcore
# httpx
# kubernetes
# requests
cfgv==3.4.0
# via pre-commit
charset-normalizer==3.3.2
# via
# -r requirements.txt
# requests
click==8.1.7
# via
# -r requirements.txt
# kopf
# maison
# yamlfix
coverage==7.6.0
# via pytest-cov
decorator==5.1.1
# via ipython
distlib==0.3.8
# via virtualenv
distro==1.9.0
# via ruyaml
executing==2.0.1
# via stack-data
filelock==3.15.4
# via virtualenv
frozenlist==1.4.1
# via
# -r requirements.txt
# aiohttp
# aiosignal
google-auth==2.32.0
# via
# -r requirements.txt
# kubernetes
h11==0.14.0
# via
# -r requirements.txt
# httpcore
httpcore==1.0.5
# via
# -r requirements.txt
# httpx
httpx==0.27.0
# via -r requirements.txt
identify==2.6.0
# via pre-commit
idna==3.7
# via
# -r requirements.txt
# anyio
# httpx
# requests
# yarl
iniconfig==2.0.0
# via pytest
ipython==8.26.0
# via -r requirements-dev.in
iso8601==2.1.0
# via
# -r requirements.txt
# kopf
jedi==0.19.1
# via ipython
kopf==1.37.2
# via -r requirements.txt
kubernetes==30.1.0
# via -r requirements.txt
maison==1.4.3
# via yamlfix
matplotlib-inline==0.1.7
# via ipython
multidict==6.0.5
# via
# -r requirements.txt
# aiohttp
# yarl
mypy==1.11.1
# via -r requirements-dev.in
mypy-extensions==1.0.0
# via mypy
nodeenv==1.9.1
# via pre-commit
oauthlib==3.2.2
# via
# -r requirements.txt
# kubernetes
# requests-oauthlib
packaging==24.1
# via
# -r requirements.txt
# pytest
# setuptools-scm
parso==0.8.4
# via jedi
pexpect==4.9.0
# via ipython
platformdirs==4.2.2
# via virtualenv
pluggy==1.5.0
# via pytest
pre-commit==3.8.0
# via -r requirements-dev.in
prompt-toolkit==3.0.47
# via ipython
ptyprocess==0.7.0
# via pexpect
pure-eval==0.2.3
# via stack-data
pyasn1==0.6.0
# via
# -r requirements.txt
# pyasn1-modules
# rsa
pyasn1-modules==0.4.0
# via
# -r requirements.txt
# google-auth
pydantic==2.8.2
# via
# -r requirements.txt
# maison
pydantic-core==2.20.1
# via
# -r requirements.txt
# pydantic
pygments==2.18.0
# via ipython
pytest==8.3.2
# via
# -r requirements-dev.in
# pytest-cov
pytest-cov==5.0.0
# via pytest-cover
pytest-cover==3.0.0
# via pytest-coverage
pytest-coverage==0.0
# via -r requirements-dev.in
python-dateutil==2.9.0.post0
# via
# -r requirements.txt
# kubernetes
python-json-logger==2.0.7
# via
# -r requirements.txt
# kopf
pyyaml==6.0.1
# via
# -r requirements.txt
# kopf
# kubernetes
# pre-commit
requests==2.32.3
# via
# -r requirements.txt
# kubernetes
# requests-oauthlib
requests-oauthlib==2.0.0
# via
# -r requirements.txt
# kubernetes
rsa==4.9
# via
# -r requirements.txt
# google-auth
ruff==0.5.5
# via -r requirements-dev.in
ruyaml==0.91.0
# via yamlfix
setuptools==72.1.0
# via
# -r requirements.txt
# ruyaml
# setuptools-scm
setuptools-scm==8.1.0
# via -r requirements.txt
six==1.16.0
# via
# -r requirements.txt
# asttokens
# kubernetes
# python-dateutil
sniffio==1.3.1
# via
# -r requirements.txt
# anyio
# httpx
stack-data==0.6.3
# via ipython
toml==0.10.2
# via maison
traitlets==5.14.3
# via
# ipython
# matplotlib-inline
types-pyyaml==6.0.12.20240724
# via -r requirements-dev.in
typing-extensions==4.12.2
# via
# -r requirements.txt
# kopf
# mypy
# pydantic
# pydantic-core
urllib3==2.2.2
# via
# -r requirements.txt
# kubernetes
# requests
uv==0.2.33
# via -r requirements-dev.in
virtualenv==20.26.3
# via pre-commit
wcwidth==0.2.13
# via prompt-toolkit
websocket-client==1.8.0
# via
# -r requirements.txt
# kubernetes
yamlfix==1.16.0
# via -r requirements-dev.in
yarl==1.9.4
# via
# -r requirements.txt
# aiohttp
13 changes: 2 additions & 11 deletions requirements.in
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
httpx
kopf
kubernetes
prefect==3.0.0rc13
pydantic
pyyaml
setuptools_scm

-e .

# development
ipython
mypy
pre-commit
pytest
ruff
types-pyyaml
yamlfix
uv
Loading

0 comments on commit 04c7457

Please sign in to comment.