Skip to content

Commit a5ec1f5

Browse files
committed
chore: modernized build
1 parent 9aba8f3 commit a5ec1f5

File tree

11 files changed

+1425
-194
lines changed

11 files changed

+1425
-194
lines changed

.github/actions/setup_environment/action.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ inputs:
77
runs:
88
using: composite
99
steps:
10-
- name: Setup Python
11-
uses: actions/setup-python@v5
10+
- name: Install uv
11+
uses: astral-sh/setup-uv@v6
1212
with:
13+
version: "0.8.9"
1314
python-version: ${{ inputs.python-version }}
15+
enable-cache: true
1416

15-
- name: Install CI Dependencies
17+
- name: Install the project
1618
shell: bash
17-
run: |
18-
pip install -r ci_requirements.txt
19-
echo "/home/runner/.local/bin" >> $GITHUB_PATH
19+
run: uv sync --locked --all-extras --dev

.github/workflows/build_and_upload_wheel.yml

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

.github/workflows/release_public.yml

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

.github/workflows/release_test.yml

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

.github/workflows/run_linting.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
uses: ./.github/actions/setup_environment
2121

2222
- name: Lint
23-
run: pre-commit run --all-files
23+
run: uv run pre-commit run --all-files
2424

2525
- name: Required modifications
2626
if: ${{ failure() }}

.github/workflows/run_tests.yml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,11 @@ jobs:
2828
with:
2929
python-version: ${{ matrix.python-version }}
3030

31-
- name: Install Dependencies
32-
run: |
33-
pip install -r requirements.txt
34-
35-
- name: Install Project
36-
run: |
37-
pip install .
38-
3931
- name: Run tests & coverage
4032
run: |
41-
coverage run -m pytest --no-header -v test
42-
coverage report -m -i
43-
coverage html -i
33+
uv run coverage run -m pytest --no-header -v test
34+
uv run coverage report -m -i
35+
uv run coverage html -i
4436
4537
- name: Archive coverage results
4638
if: startsWith(matrix.os, 'ubuntu')

.pre-commit-config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11

22
repos:
33
- repo: https://github.com/pre-commit/pre-commit-hooks
4-
rev: v4.5.0
4+
rev: v5.0.0
55
hooks:
66
- id: trailing-whitespace
77
- id: end-of-file-fixer
88

99
- repo: https://github.com/asottile/pyupgrade
10-
rev: v3.15.2
10+
rev: v3.20.0
1111
hooks:
1212
- id: pyupgrade
1313
args: [--py37-plus]
1414

1515
- repo: https://github.com/omnilib/ufmt
16-
rev: v2.5.1
16+
rev: v2.8.0
1717
hooks:
1818
- id: ufmt
1919
additional_dependencies:
20-
- black == 23.1.0
20+
- black == 25.1.0
2121
- usort == 1.1.0b2
2222

2323
- repo: https://github.com/pycqa/flake8
24-
rev: 7.0.0
24+
rev: 7.2.0
2525
hooks:
2626
- id: flake8

ci_requirements.txt

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

pyproject.toml

Lines changed: 31 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,50 @@
11
[build-system]
2-
requires = ["setuptools", "packaging", "wheel", "build", "pre-commit", "pytest"]
3-
build-backend = "setuptools.build_meta"
2+
requires = ["hatchling"]
3+
build-backend = "hatchling.build"
44

55
[project]
66
name = "dmlcloud"
7+
description = "Painless distributed training with torch"
8+
version = "0.4"
79
authors = [
8-
{name = "Sebastian Hoffmann"}
10+
{ name = "Sebastian Hoffmann", email = "[email protected]"},
911
]
10-
description = "Distributed torch training using horovod and slurm"
12+
maintainers = [
13+
{ name = "Sebastian Hoffmann", email = "[email protected]"},
14+
]
15+
readme = "README.md"
16+
license-files = ["LICENSE"]
17+
1118
requires-python = ">=3.10"
12-
license = {file = "LICENSE"}
13-
keywords = ["pytorch", "torch.distributed", "slurm", "distributed training", "deep learning"]
14-
classifiers = [
15-
"Development Status :: 3 - Alpha",
16-
"License :: OSI Approved :: BSD License",
17-
"Operating System :: MacOS",
18-
"Operating System :: POSIX :: Linux",
19-
"Programming Language :: Python :: 3.10",
20-
"Topic :: Scientific/Engineering :: Artificial Intelligence",
19+
dependencies = [
20+
"torch~=2.5",
21+
"torchmetrics~=1.6",
22+
"progress_table>=2.2.0",
23+
"numpy",
24+
"xarray",
25+
"nvidia-ml-py",
2126
]
22-
dynamic = ["version", "readme", "dependencies"]
2327

2428
[project.urls]
2529
Repository = "https://github.com/sehoffmann/dmlcloud"
2630

2731
[project.scripts]
2832
dmlrun = "dmlcloud.run:main"
2933

30-
[tool.setuptools.packages.find]
31-
include = ["dmlcloud*"]
32-
namespaces = false
33-
34-
[tool.setuptools.dynamic]
35-
version = {attr = "dmlcloud.__version__"}
36-
readme = {file = ["README.md"], content-type = "text/markdown"}
37-
dependencies = {file = ["requirements.txt"]}
34+
[dependency-groups]
35+
dev = [
36+
"pre-commit",
37+
"pytest",
38+
"coverage",
39+
"sphinx",
40+
"sphinx-rtd-theme",
41+
"sphinx-autodoc-typehints",
42+
]
3843

3944
[tool.black]
4045
skip-string-normalization = true
4146
line-length = 120
42-
target-version = ["py310"]
47+
target-version = ["py310", "py311", "py312", "py313"]
48+
49+
[tool.uv]
50+
python-preference = "managed"

requirements.txt

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

0 commit comments

Comments
 (0)