Skip to content

Commit 6e0b420

Browse files
committed
BLD Convert to pyproject.toml and uv for testing
1 parent e798d87 commit 6e0b420

File tree

7 files changed

+652
-103
lines changed

7 files changed

+652
-103
lines changed

.github/workflows/python-package.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ jobs:
66
build:
77
runs-on: ubuntu-latest
88
strategy:
9+
fail-fast: false
910
matrix:
1011
python-version:
1112
- '3.6'
@@ -18,18 +19,18 @@ jobs:
1819
- '3.13'
1920

2021
steps:
21-
- uses: actions/checkout@v2
22-
- name: Set up Python ${{ matrix.python-version }}
23-
uses: actions/setup-python@v2
22+
- uses: actions/checkout@v4
23+
- name: Install uv
24+
uses: astral-sh/setup-uv@v5
2425
with:
2526
python-version: ${{ matrix.python-version }}
27+
version: "0.5.29"
28+
enable-cache: true
29+
cache-dependency-glob: "uv.lock"
2630
- name: Install dependencies and Jug
2731
run: |
28-
python -m pip install --upgrade pip
29-
python -m pip install pytest
30-
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
31-
if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi
32-
pip install .
32+
uv sync --all-extras --dev
33+
uv pip install flake8 pytest
3334
- name: Start Redis
3435
uses: supercharge/redis-github-action@1.1.0
3536
with:

bin/jug-execute

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

jug/jug.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,13 @@ def main(argv=None):
269269
sys.exit(retval)
270270

271271

272+
def main_execute():
273+
import sys
274+
args = sys.argv[:]
275+
args.insert(1, 'execute')
276+
return main(args)
277+
278+
272279
if __name__ == '__main__':
273280
try:
274281
main()

pyproject.toml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
[build-system]
2+
requires = ["setuptools>=42"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "Jug"
7+
dynamic = ['version']
8+
description = "A Task Based Parallelization Framework"
9+
readme = "README.rst"
10+
license = {text = "MIT"}
11+
authors = [
12+
{name = "Luis Pedro Coelho", email = "luis@luispedro.org"}
13+
]
14+
requires-python = ">=3.5"
15+
classifiers = [
16+
"Development Status :: 5 - Production/Stable",
17+
"Environment :: Console",
18+
"Operating System :: POSIX",
19+
"Operating System :: OS Independent",
20+
"Programming Language :: Python",
21+
"Programming Language :: Python :: 3",
22+
"Programming Language :: Python :: 3.5",
23+
"Programming Language :: Python :: 3.6",
24+
"Programming Language :: Python :: 3.7",
25+
"Programming Language :: Python :: 3.8",
26+
"Programming Language :: Python :: 3.9",
27+
"Programming Language :: Python :: 3.10",
28+
"Programming Language :: Python :: 3.11",
29+
"Programming Language :: Python :: 3.12",
30+
"Topic :: Scientific/Engineering",
31+
"Topic :: Software Development",
32+
"Topic :: System :: Distributed Computing",
33+
"Intended Audience :: Science/Research",
34+
]
35+
36+
dependencies = [
37+
]
38+
39+
[project.optional-dependencies]
40+
dev = [
41+
"pytest",
42+
"numpy",
43+
"pyyaml",
44+
"redis",
45+
]
46+
47+
[project.urls]
48+
Homepage = "https://jug.readthedocs.io"
49+
50+
[project.scripts]
51+
jug = "jug.jug:main"
52+
jug-execute = "jug.jug:main_execute"
53+
54+
[tool.setuptools]
55+
packages = [
56+
'jug',
57+
'jug.subcommands',
58+
'jug.internal',
59+
'jug.backends',
60+
'jug.tests',
61+
'jug.hooks',
62+
'jug.tests.jugfiles',
63+
]
64+
65+
include-package-data = true
66+
67+
[tool.setuptools.dynamic]
68+
version = {attr = "jug.jug_version.__version__"}
69+

setup.py

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

test-requirements.txt

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

0 commit comments

Comments
 (0)