Skip to content

Manage project with rye. #100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,21 @@ on:

jobs:

build-package:
name: Build & verify package
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: hynek/build-and-inspect-python-package@v2
id: baipp

outputs:
python-versions: ${{ steps.baipp.outputs.supported_python_classifiers_json_array }}

run-tests:

name: Run tests for ${{ matrix.os }} on ${{ matrix.python-version }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ tests/test_jupyter/*.txt
.mypy_cache
.pytest_cache
.ruff_cache
.venv
6 changes: 0 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,6 @@ repos:
types-setuptools,
]
pass_filenames: false
- repo: https://github.com/mgedmin/check-manifest
rev: "0.49"
hooks:
- id: check-manifest
args: [--no-build-isolation]
additional_dependencies: [setuptools-scm, toml, wheel]
- repo: meta
hooks:
- id: check-hooks-apply
Expand Down
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.12.2
12 changes: 0 additions & 12 deletions MANIFEST.in

This file was deleted.

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

## 0.4.1 - 2024-01-12

Expand Down
43 changes: 0 additions & 43 deletions environment.yml

This file was deleted.

67 changes: 42 additions & 25 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
[build-system]
build-backend = "setuptools.build_meta"
requires = ["setuptools>=64", "setuptools_scm[toml]>=8"]

[project]
name = "pytask_parallel"
description = "Parallelize the execution of tasks with pytask."
Expand All @@ -20,7 +16,7 @@ dependencies = [
"loky",
"pluggy>=1.0.0",
"pytask>=0.4.5",
"rich"
"rich",
]
dynamic = ["version"]

Expand All @@ -29,19 +25,20 @@ name = "Tobias Raabe"
email = "[email protected]"

[project.optional-dependencies]
coiled = ["coiled>=0.9.4"]
dask = ["dask[complete]", "distributed"]
docs = [
"furo",
"ipython",
"matplotlib",
"myst-parser",
"nbsphinx",
"sphinx",
"sphinx-click",
"sphinx-copybutton",
"sphinx-design>=0.3",
"sphinx-toolbox",
"sphinxext-opengraph",
"furo",
"ipython",
"matplotlib",
"myst-parser",
"nbsphinx",
"sphinx",
"sphinx-click",
"sphinx-copybutton",
"sphinx-design>=0.3",
"sphinx-toolbox",
"sphinxext-opengraph",
]
test = [
"pytask-parallel[all]",
Expand Down Expand Up @@ -76,15 +73,36 @@ ignore = ["src/pytask_parallel/_version.py"]
[project.entry-points.pytask]
pytask_parallel = "pytask_parallel.plugin"

[tool.setuptools.package-dir]
"" = "src"
[build-system]
requires = ["hatchling", "hatch_vcs"]
build-backend = "hatchling.build"

[tool.rye]
managed = true
dev-dependencies = [
"s3fs>=2024.3.1",
]

[tool.rye.scripts]
clean-docs = { cmd = "rm -rf docs/build" }
build-docs = { cmd = "sphinx-build -b html docs/source docs/build" }

[tool.hatch.build.hooks.vcs]
version-file = "src/pytask_parallel/_version.py"

[tool.hatch.build.targets.sdist]
exclude = ["tests"]
only-packages = true

[tool.hatch.build.targets.wheel]
exclude = ["tests"]
only-packages = true

[tool.setuptools.packages.find]
where = ["src"]
namespaces = false
[tool.hatch.version]
source = "vcs"

[tool.setuptools_scm]
version_file = "src/pytask_parallel/_version.py"
[tool.hatch.metadata]
allow-direct-references = true

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

[tool.ruff.lint]
extend-ignore = [
# Others.
"ANN101", # type annotating self
"ANN102", # type annotating cls
"ANN401", # flake8-annotate typing.Any
"COM812", # Comply with ruff-format.
"ISC001", # Comply with ruff-format.
Expand All @@ -120,6 +136,7 @@ select = ["ALL"]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["D", "ANN", "PLR2004", "S101"]
"docs/source/conf.py" = ["INP001"]
"docs_src/*" = ["ARG001", "D", "INP001", "S301"]

[tool.ruff.lint.isort]
force-single-line = true
Expand Down
86 changes: 86 additions & 0 deletions requirements-dev.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# generated by rye
# use `rye lock` or `rye sync` to update this lockfile
#
# last locked with the following flags:
# pre: false
# features: []
# all-features: false
# with-sources: false

-e file:.
aiobotocore==2.12.3
# via s3fs
aiohttp==3.9.4
# via aiobotocore
# via s3fs
aioitertools==0.11.0
# via aiobotocore
aiosignal==1.3.1
# via aiohttp
attrs==23.2.0
# via aiohttp
# via pytask
# via pytask-parallel
botocore==1.34.69
# via aiobotocore
click==8.1.7
# via click-default-group
# via pytask
# via pytask-parallel
click-default-group==1.2.4
# via pytask
cloudpickle==3.0.0
# via loky
# via pytask-parallel
frozenlist==1.4.1
# via aiohttp
# via aiosignal
fsspec==2024.3.1
# via s3fs
greenlet==3.0.3
# via sqlalchemy
idna==3.7
# via yarl
jmespath==1.0.1
# via botocore
loky==3.4.1
# via pytask-parallel
markdown-it-py==3.0.0
# via rich
mdurl==0.1.2
# via markdown-it-py
multidict==6.0.5
# via aiohttp
# via yarl
networkx==3.3
# via pytask
optree==0.11.0
# via pytask
packaging==24.0
# via pytask
pluggy==1.4.0
# via pytask
# via pytask-parallel
pygments==2.17.2
# via rich
pytask==0.4.7
# via pytask-parallel
python-dateutil==2.9.0.post0
# via botocore
rich==13.7.1
# via pytask
# via pytask-parallel
s3fs==2024.3.1
six==1.16.0
# via python-dateutil
sqlalchemy==2.0.29
# via pytask
typing-extensions==4.11.0
# via optree
# via sqlalchemy
urllib3==2.2.1
# via botocore
wrapt==1.16.0
# via aiobotocore
yarl==1.9.4
# via aiohttp
51 changes: 51 additions & 0 deletions requirements.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# generated by rye
# use `rye lock` or `rye sync` to update this lockfile
#
# last locked with the following flags:
# pre: false
# features: []
# all-features: false
# with-sources: false

-e file:.
attrs==23.2.0
# via pytask
# via pytask-parallel
click==8.1.7
# via click-default-group
# via pytask
# via pytask-parallel
click-default-group==1.2.4
# via pytask
cloudpickle==3.0.0
# via loky
# via pytask-parallel
greenlet==3.0.3
# via sqlalchemy
loky==3.4.1
# via pytask-parallel
markdown-it-py==3.0.0
# via rich
mdurl==0.1.2
# via markdown-it-py
networkx==3.3
# via pytask
optree==0.11.0
# via pytask
packaging==24.0
# via pytask
pluggy==1.4.0
# via pytask
# via pytask-parallel
pygments==2.17.2
# via rich
pytask==0.4.7
# via pytask-parallel
rich==13.7.1
# via pytask
# via pytask-parallel
sqlalchemy==2.0.29
# via pytask
typing-extensions==4.11.0
# via optree
# via sqlalchemy