Skip to content

Commit

Permalink
Switching from rye to uv.
Browse files Browse the repository at this point in the history
  • Loading branch information
abingham committed Sep 11, 2024
1 parent 2f55f9f commit b34c667
Show file tree
Hide file tree
Showing 10 changed files with 1,684 additions and 339 deletions.
30 changes: 17 additions & 13 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,19 @@ jobs:
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v2
with:
python-version: ${{ matrix.python-version }}
- uses: wntrblm/nox@2022.8.7
- name: Lint with flake8
run: nox -s lint
version: "latest"
enable-cache: true
- name: Install Python
run: uv python install ${{ matrix.python-version }}
- name: Install dependencies
run: uv sync -i https://pypi.org/simple # Ignore download URLs in uv.lock.
- name: Lint with ruff
run: uv run ruff check src/cosmic_ray
- name: Test with pytest
run: nox -s tests-${{ matrix.python-version }} -- --run-slow
run: uv run pytest tests --run-slow

pypi-publish:
name: Upload release to PyPI
Expand All @@ -40,14 +44,14 @@ jobs:
id-token: write
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.12
uses: actions/setup-python@v4
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v2
with:
python-version: 3.12
version: "latest"
enable-cache: true
- name: "Build distribution"
run: |
python -m pip install --upgrade pip
python -m pip install build
python -m build
uv pip install build
uv run python -m build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
23 changes: 0 additions & 23 deletions noxfile.py

This file was deleted.

27 changes: 11 additions & 16 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,19 +64,17 @@ local = "cosmic_ray.distribution.local:LocalDistributor"
[project.urls]
repository = "https://github.com/sixty-north/cosmic-ray"

[tool]
rye = { dev-dependencies = [
"hypothesis>=6.108.4",
"pytest>=8.3.1",
"pytest-mock>=3.14.0",
"flake8>=7.1.0",
"flake8-pyproject>=1.2.3",
"ruff>=0.5.4",
"bump-my-version>=0.24.3",
"nox>=2024.4.15",
"sphinx>=7.1.2",
"sphinx-rtd-theme>=2.0.0",
] }
[tool.uv]
dev-dependencies = [
"bump-my-version",
"hypothesis",
"nox",
"pytest",
"pytest-mock",
"ruff",
"sphinx",
"sphinx-rtd-theme",
]

[tool.setuptools.packages.find]
where = ["src"]
Expand All @@ -98,8 +96,5 @@ tag_message = "Bump version: {current_version} → {new_version}"
[[tool.bumpversion.files]]
filename = "src/cosmic_ray/version.py"

[tool.flake8]
max-line-length = 120

[tool.ruff]
line-length = 120
200 changes: 0 additions & 200 deletions requirements-dev.lock

This file was deleted.

73 changes: 0 additions & 73 deletions requirements.lock

This file was deleted.

11 changes: 0 additions & 11 deletions requirements.txt

This file was deleted.

Loading

0 comments on commit b34c667

Please sign in to comment.