Skip to content

Commit 29d2cd9

Browse files
Switch to uv export for requirements generation.
1 parent 1eea39b commit 29d2cd9

File tree

9 files changed

+71
-23
lines changed

9 files changed

+71
-23
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ jobs:
2121

2222
- name: Setup dependencies
2323
run: |
24-
uv pip install --system --break-system-packages -r ./.requirements/${{ matrix.python-version }}-${{ runner.os }}.txt
25-
uv pip install --system --break-system-packages pytest pytest-md pytest-emoji
24+
uv export --resolution ${{ matrix.python-version }} > requirements.txt
25+
uv pip install --system --break-system-packages -r requirements.txt
2626
2727
- name: Run pytest
2828
uses: pavelzw/pytest-action@510c5e90c360a185039bea56ce8b3e7e51a16507 # v2.2.0
@@ -32,3 +32,4 @@ jobs:
3232
matrix:
3333
os: [ubuntu-latest, macos-latest, windows-latest]
3434
python-version: [3.12]
35+
resolution: [highest, lowest-direct]

.requirements/3.12-Linux.txt

Lines changed: 0 additions & 2 deletions
This file was deleted.

.requirements/3.12-Windows.txt

Lines changed: 0 additions & 2 deletions
This file was deleted.

.requirements/3.12-macOS.txt

Lines changed: 0 additions & 2 deletions
This file was deleted.

Makefile

Lines changed: 0 additions & 5 deletions
This file was deleted.

doc/philosophy/introspection.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,8 @@ necessarily listed chronologically):
2626
- Created a develop branch.
2727
- Set up sensible rulesets for branches.
2828
- Created a template for GitHub issues that are development tasks.
29-
- Created a Makefile.
30-
- Created a `make requirements` command to make platform-specific requirements files.
3129
- Ran `uv init --name usethis`.
3230
- Ran `uv python pin 3.12.4`.
33-
- Created a `.requirements` directory with Python version and OS specific files.
3431

3532
## Add GitHub Actions CI
3633

@@ -64,8 +61,7 @@ on:
6461
- Created a tests folder.
6562
- Added a trivial test module `test_nothing.py`.
6663
- Add a trivial test `test_pass` to the test module.
67-
- Add step to CI to install pytest
68-
- Add step to CI to install pytest-md and pytest-emoji (used by Action).
64+
- Add pytest, pytest-md and pytest-emoji as dev deependencies.
6965
- Confirm pytest is working with `pytest tests` in the CLI.
7066
- Add <https://github.com/pavelzw/pytest-action> to set up pytest in CI, using the
7167
correct CLI args to pytest.

pyproject.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,8 @@ requires = ["hatchling"]
1111
build-backend = "hatchling.build"
1212

1313
[tool.uv]
14-
dev-dependencies = ["pytest>=8.3.2"]
14+
dev-dependencies = [
15+
"pytest>=8.3.2",
16+
"pytest-md>=0.2.0",
17+
"pytest-emoji>=0.2.0",
18+
]

requirements.txt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# This file was autogenerated via `uv export`.
2+
-e .
3+
colorama==0.4.6 ; sys_platform == 'win32' \
4+
--hash=sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44 \
5+
--hash=sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6
6+
iniconfig==2.0.0 \
7+
--hash=sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3 \
8+
--hash=sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374
9+
packaging==24.1 \
10+
--hash=sha256:026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002 \
11+
--hash=sha256:5b8f2217dbdbd2f7f384c41c628544e6d52f2d0f53c6d0c3ea61aa5d1d7ff124
12+
pluggy==1.5.0 \
13+
--hash=sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1 \
14+
--hash=sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669
15+
pytest==8.3.2 \
16+
--hash=sha256:c132345d12ce551242c87269de812483f5bcc87cdbb4722e48487ba194f9fdce \
17+
--hash=sha256:4ba08f9ae7dcf84ded419494d229b48d0903ea6407b030eaec46df5e6a73bba5
18+
pytest-emoji==0.2.0 \
19+
--hash=sha256:e1bd4790d87649c2d09c272c88bdfc4d37c1cc7c7a46583087d7c510944571e8 \
20+
--hash=sha256:6e34ed21970fa4b80a56ad11417456bd873eb066c02315fe9df0fafe6d4d4436
21+
pytest-md==0.2.0 \
22+
--hash=sha256:3b248d5b360ea5198e05b4f49c7442234812809a63137ec6cdd3643a40cf0112 \
23+
--hash=sha256:4c4cd16fea6d1485e87ee254558712c804a96d2aa9674b780e7eb8fb6526e1d1

uv.lock

Lines changed: 39 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)