Skip to content

Commit 23f4758

Browse files
authored
Manage project with rye. (#100)
1 parent 5325591 commit 23f4758

File tree

10 files changed

+197
-86
lines changed

10 files changed

+197
-86
lines changed

.github/workflows/main.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,21 @@ on:
1818

1919
jobs:
2020

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

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

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ tests/test_jupyter/*.txt
2020
.mypy_cache
2121
.pytest_cache
2222
.ruff_cache
23+
.venv

.pre-commit-config.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,6 @@ repos:
7777
types-setuptools,
7878
]
7979
pass_filenames: false
80-
- repo: https://github.com/mgedmin/check-manifest
81-
rev: "0.49"
82-
hooks:
83-
- id: check-manifest
84-
args: [--no-build-isolation]
85-
additional_dependencies: [setuptools-scm, toml, wheel]
8680
- repo: meta
8781
hooks:
8882
- id: check-hooks-apply

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.12.2

MANIFEST.in

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

docs/source/changes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ releases are available on [PyPI](https://pypi.org/project/pytask-parallel) and
2222
- {pull}`99` changes that all tasks that are ready are being scheduled. It improves
2323
interactions with adaptive scaling. {issue}`98` does handle the resulting issues: no
2424
strong adherence to priorities, no pending status.
25+
- {pull}`100` adds project management with rye.
2526

2627
## 0.4.1 - 2024-01-12
2728

environment.yml

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

pyproject.toml

Lines changed: 42 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
[build-system]
2-
build-backend = "setuptools.build_meta"
3-
requires = ["setuptools>=64", "setuptools_scm[toml]>=8"]
4-
51
[project]
62
name = "pytask_parallel"
73
description = "Parallelize the execution of tasks with pytask."
@@ -20,7 +16,7 @@ dependencies = [
2016
"loky",
2117
"pluggy>=1.0.0",
2218
"pytask>=0.4.5",
23-
"rich"
19+
"rich",
2420
]
2521
dynamic = ["version"]
2622

@@ -29,19 +25,20 @@ name = "Tobias Raabe"
2925
3026

3127
[project.optional-dependencies]
28+
coiled = ["coiled>=0.9.4"]
3229
dask = ["dask[complete]", "distributed"]
3330
docs = [
34-
"furo",
35-
"ipython",
36-
"matplotlib",
37-
"myst-parser",
38-
"nbsphinx",
39-
"sphinx",
40-
"sphinx-click",
41-
"sphinx-copybutton",
42-
"sphinx-design>=0.3",
43-
"sphinx-toolbox",
44-
"sphinxext-opengraph",
31+
"furo",
32+
"ipython",
33+
"matplotlib",
34+
"myst-parser",
35+
"nbsphinx",
36+
"sphinx",
37+
"sphinx-click",
38+
"sphinx-copybutton",
39+
"sphinx-design>=0.3",
40+
"sphinx-toolbox",
41+
"sphinxext-opengraph",
4542
]
4643
test = [
4744
"pytask-parallel[all]",
@@ -76,15 +73,36 @@ ignore = ["src/pytask_parallel/_version.py"]
7673
[project.entry-points.pytask]
7774
pytask_parallel = "pytask_parallel.plugin"
7875

79-
[tool.setuptools.package-dir]
80-
"" = "src"
76+
[build-system]
77+
requires = ["hatchling", "hatch_vcs"]
78+
build-backend = "hatchling.build"
79+
80+
[tool.rye]
81+
managed = true
82+
dev-dependencies = [
83+
"s3fs>=2024.3.1",
84+
]
85+
86+
[tool.rye.scripts]
87+
clean-docs = { cmd = "rm -rf docs/build" }
88+
build-docs = { cmd = "sphinx-build -b html docs/source docs/build" }
89+
90+
[tool.hatch.build.hooks.vcs]
91+
version-file = "src/pytask_parallel/_version.py"
92+
93+
[tool.hatch.build.targets.sdist]
94+
exclude = ["tests"]
95+
only-packages = true
96+
97+
[tool.hatch.build.targets.wheel]
98+
exclude = ["tests"]
99+
only-packages = true
81100

82-
[tool.setuptools.packages.find]
83-
where = ["src"]
84-
namespaces = false
101+
[tool.hatch.version]
102+
source = "vcs"
85103

86-
[tool.setuptools_scm]
87-
version_file = "src/pytask_parallel/_version.py"
104+
[tool.hatch.metadata]
105+
allow-direct-references = true
88106

89107
[tool.mypy]
90108
files = ["src", "tests"]
@@ -108,9 +126,7 @@ unsafe-fixes = true
108126

109127
[tool.ruff.lint]
110128
extend-ignore = [
111-
# Others.
112129
"ANN101", # type annotating self
113-
"ANN102", # type annotating cls
114130
"ANN401", # flake8-annotate typing.Any
115131
"COM812", # Comply with ruff-format.
116132
"ISC001", # Comply with ruff-format.
@@ -120,6 +136,7 @@ select = ["ALL"]
120136
[tool.ruff.lint.per-file-ignores]
121137
"tests/*" = ["D", "ANN", "PLR2004", "S101"]
122138
"docs/source/conf.py" = ["INP001"]
139+
"docs_src/*" = ["ARG001", "D", "INP001", "S301"]
123140

124141
[tool.ruff.lint.isort]
125142
force-single-line = true

requirements-dev.lock

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# generated by rye
2+
# use `rye lock` or `rye sync` to update this lockfile
3+
#
4+
# last locked with the following flags:
5+
# pre: false
6+
# features: []
7+
# all-features: false
8+
# with-sources: false
9+
10+
-e file:.
11+
aiobotocore==2.12.3
12+
# via s3fs
13+
aiohttp==3.9.4
14+
# via aiobotocore
15+
# via s3fs
16+
aioitertools==0.11.0
17+
# via aiobotocore
18+
aiosignal==1.3.1
19+
# via aiohttp
20+
attrs==23.2.0
21+
# via aiohttp
22+
# via pytask
23+
# via pytask-parallel
24+
botocore==1.34.69
25+
# via aiobotocore
26+
click==8.1.7
27+
# via click-default-group
28+
# via pytask
29+
# via pytask-parallel
30+
click-default-group==1.2.4
31+
# via pytask
32+
cloudpickle==3.0.0
33+
# via loky
34+
# via pytask-parallel
35+
frozenlist==1.4.1
36+
# via aiohttp
37+
# via aiosignal
38+
fsspec==2024.3.1
39+
# via s3fs
40+
greenlet==3.0.3
41+
# via sqlalchemy
42+
idna==3.7
43+
# via yarl
44+
jmespath==1.0.1
45+
# via botocore
46+
loky==3.4.1
47+
# via pytask-parallel
48+
markdown-it-py==3.0.0
49+
# via rich
50+
mdurl==0.1.2
51+
# via markdown-it-py
52+
multidict==6.0.5
53+
# via aiohttp
54+
# via yarl
55+
networkx==3.3
56+
# via pytask
57+
optree==0.11.0
58+
# via pytask
59+
packaging==24.0
60+
# via pytask
61+
pluggy==1.4.0
62+
# via pytask
63+
# via pytask-parallel
64+
pygments==2.17.2
65+
# via rich
66+
pytask==0.4.7
67+
# via pytask-parallel
68+
python-dateutil==2.9.0.post0
69+
# via botocore
70+
rich==13.7.1
71+
# via pytask
72+
# via pytask-parallel
73+
s3fs==2024.3.1
74+
six==1.16.0
75+
# via python-dateutil
76+
sqlalchemy==2.0.29
77+
# via pytask
78+
typing-extensions==4.11.0
79+
# via optree
80+
# via sqlalchemy
81+
urllib3==2.2.1
82+
# via botocore
83+
wrapt==1.16.0
84+
# via aiobotocore
85+
yarl==1.9.4
86+
# via aiohttp

requirements.lock

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# generated by rye
2+
# use `rye lock` or `rye sync` to update this lockfile
3+
#
4+
# last locked with the following flags:
5+
# pre: false
6+
# features: []
7+
# all-features: false
8+
# with-sources: false
9+
10+
-e file:.
11+
attrs==23.2.0
12+
# via pytask
13+
# via pytask-parallel
14+
click==8.1.7
15+
# via click-default-group
16+
# via pytask
17+
# via pytask-parallel
18+
click-default-group==1.2.4
19+
# via pytask
20+
cloudpickle==3.0.0
21+
# via loky
22+
# via pytask-parallel
23+
greenlet==3.0.3
24+
# via sqlalchemy
25+
loky==3.4.1
26+
# via pytask-parallel
27+
markdown-it-py==3.0.0
28+
# via rich
29+
mdurl==0.1.2
30+
# via markdown-it-py
31+
networkx==3.3
32+
# via pytask
33+
optree==0.11.0
34+
# via pytask
35+
packaging==24.0
36+
# via pytask
37+
pluggy==1.4.0
38+
# via pytask
39+
# via pytask-parallel
40+
pygments==2.17.2
41+
# via rich
42+
pytask==0.4.7
43+
# via pytask-parallel
44+
rich==13.7.1
45+
# via pytask
46+
# via pytask-parallel
47+
sqlalchemy==2.0.29
48+
# via pytask
49+
typing-extensions==4.11.0
50+
# via optree
51+
# via sqlalchemy

0 commit comments

Comments
 (0)