Skip to content

Commit 957fb23

Browse files
Switch to uv export for requirements generation. (#11)
* Switch to uv export for requirements generation. * Remove requirements file * Use correct matrix variable in CI
1 parent 1eea39b commit 957fb23

File tree

8 files changed

+48
-23
lines changed

8 files changed

+48
-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.resolution }} > 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+
]

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)