Skip to content

Commit 7e248a1

Browse files
authored
Upgrade to uv
1 parent a7ab34d commit 7e248a1

File tree

10 files changed

+1239
-43
lines changed

10 files changed

+1239
-43
lines changed

.github/workflows/pythonpublish.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,29 +24,27 @@ jobs:
2424
uses: actions/setup-python@v5
2525
with:
2626
python-version: '3.x'
27+
- name: Install uv
28+
uses: astral-sh/setup-uv@v5
2729
- name: Install dependencies
2830
run: |
29-
python -m pip install --upgrade pip
30-
pip install setuptools wheel twine
31+
uv pip install --upgrade pip
32+
uv pip install setuptools wheel twine
3133
3234
- name: Make sure unit tests succeed
3335
run: |
3436
git config --global user.name "Github Action"
3537
git config --global user.email "[email protected]"
36-
pip install -r requirements_dev.txt
37-
pip install .
38-
pytest
38+
uv run pytest
3939
4040
- name: Build
4141
run: |
42-
pip install build setuptools
43-
python -m build
42+
uv build
4443
4544
# See https://docs.pypi.org/trusted-publishers/using-a-publisher/
4645
- name: Publish package distributions to PyPI
4746
uses: pypa/gh-action-pypi-publish@release/v1
4847

4948
- name: Deploy mkdocs site
5049
run: |
51-
pip install -r requirements_dev.txt
52-
mkdocs gh-deploy --force
50+
uv run mkdocs gh-deploy --force

.github/workflows/scheduled_unittests.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ jobs:
2727
pip3 install --upgrade pip
2828
pip3 install --upgrade setuptools
2929
pip3 install --upgrade wheel
30-
pip3 install -r requirements_dev.txt
31-
pip3 install .
30+
pip3 install ".[dev]"
3231
3332
- name: Run unit tests
3433
run: |

.github/workflows/unittests.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ jobs:
2323
pip3 install --upgrade pip
2424
pip3 install --upgrade setuptools
2525
pip3 install --upgrade wheel
26-
pip3 install -r requirements_dev.txt
27-
pip3 install .
26+
pip3 install ".[dev]"
2827
2928
- name: Run unit tests
3029
run: |

.github/workflows/unittests_codecov.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ jobs:
3131
pip3 install --upgrade pip
3232
pip3 install --upgrade setuptools
3333
pip3 install --upgrade wheel
34-
pip install -r requirements_dev.txt
35-
pip3 install .
34+
pip3 install ".[dev]"
3635
3736
- name: Generate coverage report
3837
run: |

CONTRIBUTING.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,16 @@ Thanks for considering to contribute to this project! Some guidelines:
77
- This package tries to be as simple as possible for the user (hide any complexity from the user). New options are only added when there is clear value to the majority of users.
88
- When issues or pull requests are not going to be resolved or merged, they should be closed as soon as possible. This is kinder than deciding this after a long period. Our issue tracker should reflect work to be done.
99

10+
## Setup
11+
12+
We use [uv to manage dependencies](https://docs.astral.sh/uv/getting-started/installation/).
13+
1014
## Unit Tests
1115

12-
Make sure to install an editable version before running the tests:
16+
To run the unit tests, use:
1317

1418
```python
15-
pip install -r requirements_dev.txt
16-
pip install -e .
17-
pytest --cov=mkdocs_git_revision_date_localized_plugin --cov-report term-missing tests/
19+
uv run pytest --cov=mkdocs_git_revision_date_localized_plugin --cov-report term-missing tests/
1820
```
1921

2022
If it makes sense, writing tests for your PRs is always appreciated and will help get them merged.
@@ -25,14 +27,14 @@ To quickly serve a test website with your latest changes to the plugin use the s
2527
For example:
2628

2729
```python
28-
pip install -r tests/test_requirements.txt
29-
pip install -e .
30-
mkdocs serve -f tests/fixtures/basic_project/mkdocs.yml
30+
uv run mkdocs serve -f tests/fixtures/basic_project/mkdocs.yml
3131
```
3232

3333
## Code Style
3434

3535
Make sure your code *roughly* follows [PEP-8](https://www.python.org/dev/peps/pep-0008/)
3636
and keeps things consistent with the rest of the code.
3737

38+
We run `ruff format` to automatically style the code.
39+
3840
We use Google-style docstrings.

MANIFEST.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
include requirements.txt
21
include mkdocs_git_revision_date_localized_plugin/js/*.js
32
include mkdocs_git_revision_date_localized_plugin/css/*.css

pyproject.toml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,20 @@ classifiers=[
3131
"License :: OSI Approved :: MIT License",
3232
]
3333

34-
dynamic = ["version","dependencies","optional-dependencies"]
34+
dynamic = ["version"]
35+
dependencies = [
36+
"babel>=2.7.0",
37+
"gitpython>=3.1.44",
38+
"mkdocs>=1.0",
39+
"pytz>=2025.1",
40+
]
3541

3642
[project.urls]
3743
"Homepage" = "https://github.com/timvink/mkdocs-git-revision-date-localized-plugin"
3844

3945
[tool.setuptools.dynamic]
4046
version = {attr = "mkdocs_git_revision_date_localized_plugin.__version__"}
4147

42-
dependencies={file = ["requirements.txt"]}
43-
44-
optional-dependencies.dev={file = ["requirements_dev.txt"]}
45-
optional-dependencies.base={file = ["requirements.txt"]}
46-
optional-dependencies.all={file = ["requirements.txt", "requirements_dev.txt"]}
47-
4848
[tool.pytest.ini_options]
4949
markers = [
5050
"serial",
@@ -114,5 +114,13 @@ fix = true
114114

115115
[tool.uv]
116116
dev-dependencies = [
117+
"click>=8.1.8",
118+
"codecov>=2.1.13",
119+
"mkdocs-gen-files>=0.5.0",
120+
"mkdocs-git-authors-plugin>=0.9.2",
121+
"mkdocs-material>=9.6.7",
122+
"mkdocs-static-i18n>=1.3.0",
123+
"pytest>=8.3.5",
124+
"pytest-cov>=5.0.0",
117125
"ruff",
118-
]
126+
]

requirements.txt

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

requirements_dev.txt

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

0 commit comments

Comments
 (0)