Skip to content

Commit 4a0ad82

Browse files
authored
Manage project with rye. (#596)
1 parent 3e2d415 commit 4a0ad82

11 files changed

+777
-97
lines changed

.github/workflows/main.yml

+15
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,21 @@ on:
1515

1616
jobs:
1717

18+
build-package:
19+
name: Build & verify package
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
with:
25+
fetch-depth: 0
26+
27+
- uses: hynek/build-and-inspect-python-package@v2
28+
id: baipp
29+
30+
outputs:
31+
python-versions: ${{ steps.baipp.outputs.supported_python_classifiers_json_array }}
32+
1833
run-tests:
1934

2035
name: Run tests for ${{ matrix.os }} on ${{ matrix.python-version }}

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ src/_pytask/_version.py
2222
*.pkl
2323

2424
tests/test_jupyter/*.txt
25+
.venv

.pre-commit-config.yaml

-6
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,6 @@ repos:
9393
- id: codespell
9494
additional_dependencies: [tomli]
9595
exclude: (\.ipynb)
96-
- repo: https://github.com/mgedmin/check-manifest
97-
rev: "0.49"
98-
hooks:
99-
- id: check-manifest
100-
args: [--no-build-isolation]
101-
additional_dependencies: [setuptools-scm, toml, wheel]
10296
- repo: meta
10397
hooks:
10498
- id: check-hooks-apply

.python-version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.12.2

.readthedocs.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: 2
33
build:
44
os: ubuntu-22.04
55
tools:
6-
python: "3.10"
6+
python: "3.12"
77

88
sphinx:
99
configuration: docs/source/conf.py

MANIFEST.in

-15
This file was deleted.

docs/source/changes.md

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ releases are available on [PyPI](https://pypi.org/project/pytask) and
3939
- {pull}`593` recreate `PythonNode`s every run since they carry the `_NoDefault` enum as
4040
the value whose state is `None`.
4141
- {pull}`594` publishes `NodeLoadError`.
42+
- {pull}`596` add project management with rye.
4243

4344
## 0.4.7 - 2024-03-19
4445

environment.yml

-53
This file was deleted.

pyproject.toml

+22-22
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
[build-system]
2-
build-backend = "setuptools.build_meta"
3-
requires = ["setuptools>=64", "setuptools_scm>=8"]
4-
5-
[tool.setuptools_scm]
6-
version_file = "src/_pytask/_version.py"
7-
81
[project]
92
name = "pytask"
103
description = "In its highest aspirations, pytask tries to be pytest as a build system."
@@ -90,18 +83,30 @@ Tracker = "https://github.com/pytask-dev/pytask/issues"
9083
[project.scripts]
9184
pytask = "pytask:cli"
9285

93-
[tool.setuptools]
94-
include-package-data = true
95-
zip-safe = false
96-
platforms = ["unix", "linux", "osx", "win32"]
97-
license-files = ["LICENSE"]
86+
[build-system]
87+
requires = ["hatchling", "hatch_vcs"]
88+
build-backend = "hatchling.build"
89+
90+
[tool.rye]
91+
managed = true
92+
dev-dependencies = []
93+
94+
[tool.hatch.build.hooks.vcs]
95+
version-file = "src/_pytask/_version.py"
9896

99-
[tool.setuptools.package-dir]
100-
"" = "src"
97+
[tool.hatch.build.targets.sdist]
98+
exclude = ["tests"]
99+
only-packages = true
101100

102-
[tool.setuptools.packages.find]
103-
where = ["src"]
104-
namespaces = false
101+
[tool.hatch.build.targets.wheel]
102+
only-include = ["src"]
103+
sources = ["src"]
104+
105+
[tool.hatch.version]
106+
source = "vcs"
107+
108+
[tool.hatch.metadata]
109+
allow-direct-references = true
105110

106111
[tool.ruff]
107112
target-version = "py38"
@@ -125,7 +130,6 @@ ignore = [
125130
"SLF001", # access private members.
126131
]
127132

128-
129133
[tool.ruff.lint.per-file-ignores]
130134
"src/_pytask/_hashlib.py" = ["ALL"]
131135
"src/_pytask/capture.py" = ["PGH003"]
@@ -173,7 +177,6 @@ no_implicit_optional = true
173177
warn_redundant_casts = true
174178
warn_unused_ignores = true
175179

176-
177180
[[tool.mypy.overrides]]
178181
module = "tests.*"
179182
disallow_untyped_defs = false
@@ -193,9 +196,6 @@ skip = "*.js,*/termynal.css"
193196
[tool.refurb]
194197
python_version = "3.8"
195198

196-
[tool.check-manifest]
197-
ignore = ["src/_pytask/_version.py"]
198-
199199
[tool.coverage.report]
200200
exclude_also = [
201201
"pragma: no cover",

0 commit comments

Comments
 (0)