hafnia 0.1.19__tar.gz → 0.1.24__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {hafnia-0.1.19 → hafnia-0.1.24}/.github/workflows/build.yaml +2 -2
- hafnia-0.1.19/.github/workflows/publish_release.yaml → hafnia-0.1.24/.github/workflows/check_release.yaml +23 -7
- {hafnia-0.1.19 → hafnia-0.1.24}/.github/workflows/ci_cd.yaml +19 -27
- {hafnia-0.1.19 → hafnia-0.1.24}/.github/workflows/lint.yaml +1 -1
- {hafnia-0.1.19 → hafnia-0.1.24}/.github/workflows/publish_docker.yaml +3 -3
- {hafnia-0.1.19 → hafnia-0.1.24}/.github/workflows/publish_pypi.yaml +1 -1
- {hafnia-0.1.19 → hafnia-0.1.24}/.github/workflows/tests.yaml +2 -2
- {hafnia-0.1.19 → hafnia-0.1.24}/.pre-commit-config.yaml +6 -1
- {hafnia-0.1.19 → hafnia-0.1.24}/PKG-INFO +1 -1
- {hafnia-0.1.19 → hafnia-0.1.24}/pyproject.toml +1 -1
- {hafnia-0.1.19 → hafnia-0.1.24}/uv.lock +1210 -1210
- {hafnia-0.1.19 → hafnia-0.1.24}/.devcontainer/devcontainer.json +0 -0
- {hafnia-0.1.19 → hafnia-0.1.24}/.devcontainer/hooks/post_create +0 -0
- {hafnia-0.1.19 → hafnia-0.1.24}/.github/dependabot.yaml +0 -0
- {hafnia-0.1.19 → hafnia-0.1.24}/.github/workflows/Dockerfile +0 -0
- {hafnia-0.1.19 → hafnia-0.1.24}/.gitignore +0 -0
- {hafnia-0.1.19 → hafnia-0.1.24}/.python-version +0 -0
- {hafnia-0.1.19 → hafnia-0.1.24}/.vscode/extensions.json +0 -0
- {hafnia-0.1.19 → hafnia-0.1.24}/.vscode/launch.json +0 -0
- {hafnia-0.1.19 → hafnia-0.1.24}/.vscode/settings.json +0 -0
- {hafnia-0.1.19 → hafnia-0.1.24}/LICENSE +0 -0
- {hafnia-0.1.19 → hafnia-0.1.24}/README.md +0 -0
- {hafnia-0.1.19 → hafnia-0.1.24}/docs/cli.md +0 -0
- {hafnia-0.1.19 → hafnia-0.1.24}/docs/release.md +0 -0
- {hafnia-0.1.19 → hafnia-0.1.24}/docs/s2m.md +0 -0
- {hafnia-0.1.19 → hafnia-0.1.24}/examples/dataset_builder.py +0 -0
- {hafnia-0.1.19 → hafnia-0.1.24}/examples/example_load_dataset.py +0 -0
- {hafnia-0.1.19 → hafnia-0.1.24}/examples/example_logger.py +0 -0
- {hafnia-0.1.19 → hafnia-0.1.24}/examples/example_torchvision_dataloader.py +0 -0
- {hafnia-0.1.19 → hafnia-0.1.24}/examples/script2model/pytorch/Dockerfile +0 -0
- {hafnia-0.1.19 → hafnia-0.1.24}/examples/script2model/pytorch/src/lib/train_utils.py +0 -0
- {hafnia-0.1.19 → hafnia-0.1.24}/examples/script2model/pytorch/src/scripts/train.py +0 -0
- {hafnia-0.1.19 → hafnia-0.1.24}/src/cli/__init__.py +0 -0
- {hafnia-0.1.19 → hafnia-0.1.24}/src/cli/__main__.py +0 -0
- {hafnia-0.1.19 → hafnia-0.1.24}/src/cli/config.py +0 -0
- {hafnia-0.1.19 → hafnia-0.1.24}/src/cli/consts.py +0 -0
- {hafnia-0.1.19 → hafnia-0.1.24}/src/cli/data_cmds.py +0 -0
- {hafnia-0.1.19 → hafnia-0.1.24}/src/cli/experiment_cmds.py +0 -0
- {hafnia-0.1.19 → hafnia-0.1.24}/src/cli/profile_cmds.py +0 -0
- {hafnia-0.1.19 → hafnia-0.1.24}/src/cli/runc_cmds.py +0 -0
- {hafnia-0.1.19 → hafnia-0.1.24}/src/hafnia/__init__.py +0 -0
- {hafnia-0.1.19 → hafnia-0.1.24}/src/hafnia/data/__init__.py +0 -0
- {hafnia-0.1.19 → hafnia-0.1.24}/src/hafnia/data/factory.py +0 -0
- {hafnia-0.1.19 → hafnia-0.1.24}/src/hafnia/experiment/__init__.py +0 -0
- {hafnia-0.1.19 → hafnia-0.1.24}/src/hafnia/experiment/hafnia_logger.py +0 -0
- {hafnia-0.1.19 → hafnia-0.1.24}/src/hafnia/http.py +0 -0
- {hafnia-0.1.19 → hafnia-0.1.24}/src/hafnia/log.py +0 -0
- {hafnia-0.1.19 → hafnia-0.1.24}/src/hafnia/platform/__init__.py +0 -0
- {hafnia-0.1.19 → hafnia-0.1.24}/src/hafnia/platform/api.py +0 -0
- {hafnia-0.1.19 → hafnia-0.1.24}/src/hafnia/platform/builder.py +0 -0
- {hafnia-0.1.19 → hafnia-0.1.24}/src/hafnia/platform/download.py +0 -0
- {hafnia-0.1.19 → hafnia-0.1.24}/src/hafnia/platform/executor.py +0 -0
- {hafnia-0.1.19 → hafnia-0.1.24}/src/hafnia/platform/experiment.py +0 -0
- {hafnia-0.1.19 → hafnia-0.1.24}/src/hafnia/torch_helpers.py +0 -0
- {hafnia-0.1.19 → hafnia-0.1.24}/src/hafnia/utils.py +0 -0
- {hafnia-0.1.19 → hafnia-0.1.24}/tests/test_builder.py +0 -0
- {hafnia-0.1.19 → hafnia-0.1.24}/tests/test_check_example_scripts.py +0 -0
- {hafnia-0.1.19 → hafnia-0.1.24}/tests/test_cli.py +0 -0
- {hafnia-0.1.19 → hafnia-0.1.24}/tests/test_executor.py +0 -0
- {hafnia-0.1.19 → hafnia-0.1.24}/tests/test_mdi_logger.py +0 -0
- {hafnia-0.1.19 → hafnia-0.1.24}/tests/test_samples.py +0 -0
|
@@ -18,7 +18,7 @@ jobs:
|
|
|
18
18
|
package-version: ${{ steps.extract-version.outputs.package_version }}
|
|
19
19
|
steps:
|
|
20
20
|
- uses: actions/checkout@v4.2.2
|
|
21
|
-
- uses: actions/setup-python@v5.
|
|
21
|
+
- uses: actions/setup-python@v5.6.0
|
|
22
22
|
with:
|
|
23
23
|
python-version-file: ${{ inputs.python-version-file }}
|
|
24
24
|
|
|
@@ -29,7 +29,7 @@ jobs:
|
|
|
29
29
|
echo "package_version=$VERSION" >> $GITHUB_OUTPUT
|
|
30
30
|
|
|
31
31
|
- name: Install uv
|
|
32
|
-
uses: astral-sh/setup-uv@
|
|
32
|
+
uses: astral-sh/setup-uv@v6
|
|
33
33
|
with:
|
|
34
34
|
version: 0.6.8
|
|
35
35
|
|
|
@@ -1,20 +1,26 @@
|
|
|
1
|
-
name:
|
|
1
|
+
name: Check Release and Publish
|
|
2
2
|
on:
|
|
3
3
|
workflow_call:
|
|
4
4
|
inputs:
|
|
5
5
|
package-version:
|
|
6
6
|
required: true
|
|
7
7
|
type: string
|
|
8
|
-
|
|
8
|
+
outputs:
|
|
9
|
+
make_release:
|
|
10
|
+
description: "Whether to create a new release"
|
|
11
|
+
value: ${{ jobs.release.outputs.make_release }}
|
|
12
|
+
|
|
9
13
|
permissions:
|
|
10
14
|
contents: write
|
|
11
15
|
|
|
12
16
|
jobs:
|
|
13
17
|
release:
|
|
14
18
|
runs-on: ubuntu-latest
|
|
19
|
+
outputs:
|
|
20
|
+
make_release: ${{ steps.check_release.outputs.make_release }}
|
|
15
21
|
steps:
|
|
16
22
|
- name: Download package artifact
|
|
17
|
-
uses: actions/download-artifact@v4.
|
|
23
|
+
uses: actions/download-artifact@v4.3.0
|
|
18
24
|
with:
|
|
19
25
|
name: python-package
|
|
20
26
|
path: dist/
|
|
@@ -37,11 +43,21 @@ jobs:
|
|
|
37
43
|
echo "Checking if release tag exists: $TAG"
|
|
38
44
|
|
|
39
45
|
if gh release view "$TAG" --repo="$GITHUB_REPOSITORY" &>/dev/null; then
|
|
40
|
-
echo "
|
|
41
|
-
|
|
46
|
+
echo "Release $TAG already exists. Skipping release creation."
|
|
47
|
+
echo "make_release=false" >> $GITHUB_OUTPUT
|
|
48
|
+
else
|
|
49
|
+
echo "Release does not exist. Will create new release."
|
|
50
|
+
echo "make_release=true" >> $GITHUB_OUTPUT
|
|
42
51
|
fi
|
|
43
|
-
|
|
52
|
+
|
|
44
53
|
- name: Create GitHub Release
|
|
54
|
+
if: steps.check_release.outputs.make_release == 'true'
|
|
45
55
|
env:
|
|
46
56
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
47
|
-
run:
|
|
57
|
+
run: |
|
|
58
|
+
TAG="v${{ inputs.package-version }}"
|
|
59
|
+
echo "Creating release tag: $TAG"
|
|
60
|
+
|
|
61
|
+
gh release create "$TAG" --repo="$GITHUB_REPOSITORY" \
|
|
62
|
+
--title="${GITHUB_REPOSITORY#*/} ${{ inputs.package-version }}" \
|
|
63
|
+
--generate-notes
|
|
@@ -44,30 +44,34 @@ jobs:
|
|
|
44
44
|
with:
|
|
45
45
|
python-version-file: "pyproject.toml"
|
|
46
46
|
|
|
47
|
-
publish-
|
|
48
|
-
name: Publish
|
|
47
|
+
publish-docker-staging:
|
|
48
|
+
name: Publish Docker Image to Staging
|
|
49
49
|
needs: build
|
|
50
|
+
secrets: inherit
|
|
50
51
|
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
|
51
|
-
uses: ./.github/workflows/
|
|
52
|
+
uses: ./.github/workflows/publish_docker.yaml
|
|
52
53
|
with:
|
|
53
|
-
|
|
54
|
+
python-version-file: "pyproject.toml"
|
|
55
|
+
package-version: ${{ needs.build.outputs.package-version }}
|
|
56
|
+
environment: "staging"
|
|
54
57
|
|
|
55
|
-
|
|
56
|
-
name:
|
|
58
|
+
check-release:
|
|
59
|
+
name: Check if Release Exists
|
|
57
60
|
needs: build
|
|
58
61
|
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
|
59
|
-
uses: ./.github/workflows/
|
|
62
|
+
uses: ./.github/workflows/check_release.yaml
|
|
60
63
|
with:
|
|
61
|
-
|
|
64
|
+
package-version: ${{ needs.build.outputs.package-version }}
|
|
62
65
|
|
|
63
|
-
publish-
|
|
64
|
-
name: Publish
|
|
65
|
-
needs:
|
|
66
|
-
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
|
67
|
-
uses: ./.github/workflows/
|
|
66
|
+
publish-pypi:
|
|
67
|
+
name: Publish Package to PyPI
|
|
68
|
+
needs: [build, check-release]
|
|
69
|
+
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && needs.check-release.outputs.make_release == 'true'
|
|
70
|
+
uses: ./.github/workflows/publish_pypi.yaml
|
|
68
71
|
with:
|
|
69
|
-
|
|
70
|
-
|
|
72
|
+
environment: pypi
|
|
73
|
+
|
|
74
|
+
|
|
71
75
|
publish-docker-production:
|
|
72
76
|
name: Publish Docker Image to Production
|
|
73
77
|
needs: [build, publish-pypi]
|
|
@@ -79,15 +83,3 @@ jobs:
|
|
|
79
83
|
package-version: ${{ needs.build.outputs.package-version }}
|
|
80
84
|
environment: "production"
|
|
81
85
|
|
|
82
|
-
|
|
83
|
-
publish-docker-staging:
|
|
84
|
-
name: Publish Docker Image to Staging
|
|
85
|
-
needs: [build, publish-pypi-test]
|
|
86
|
-
secrets: inherit
|
|
87
|
-
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
|
88
|
-
uses: ./.github/workflows/publish_docker.yaml
|
|
89
|
-
with:
|
|
90
|
-
python-version-file: "pyproject.toml"
|
|
91
|
-
package-version: ${{ needs.build.outputs.package-version }}
|
|
92
|
-
environment: "staging"
|
|
93
|
-
|
|
@@ -25,13 +25,13 @@ jobs:
|
|
|
25
25
|
runs-on: ubuntu-latest
|
|
26
26
|
steps:
|
|
27
27
|
- uses: actions/checkout@v4.2.2
|
|
28
|
-
- uses: actions/setup-python@v5.
|
|
28
|
+
- uses: actions/setup-python@v5.6.0
|
|
29
29
|
id: python
|
|
30
30
|
with:
|
|
31
31
|
python-version-file: ${{ inputs.python-version-file }}
|
|
32
32
|
|
|
33
33
|
- name: Download package artifact
|
|
34
|
-
uses: actions/download-artifact@v4.
|
|
34
|
+
uses: actions/download-artifact@v4.3.0
|
|
35
35
|
with:
|
|
36
36
|
name: python-package
|
|
37
37
|
path: dist/
|
|
@@ -60,7 +60,7 @@ jobs:
|
|
|
60
60
|
uses: docker/setup-buildx-action@v3.10.0
|
|
61
61
|
|
|
62
62
|
- name: Build and push
|
|
63
|
-
uses: docker/build-push-action@v6.
|
|
63
|
+
uses: docker/build-push-action@v6.16.0
|
|
64
64
|
env:
|
|
65
65
|
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
|
|
66
66
|
ECR_REPOSITORY: mdi-runtime
|
|
@@ -12,11 +12,11 @@ jobs:
|
|
|
12
12
|
runs-on: ubuntu-latest
|
|
13
13
|
steps:
|
|
14
14
|
- uses: actions/checkout@v4.2.2
|
|
15
|
-
- uses: actions/setup-python@v5.
|
|
15
|
+
- uses: actions/setup-python@v5.6.0
|
|
16
16
|
with:
|
|
17
17
|
python-version-file: ${{ inputs.python-version-file }}
|
|
18
18
|
- name: Install uv
|
|
19
|
-
uses: astral-sh/setup-uv@
|
|
19
|
+
uses: astral-sh/setup-uv@v6
|
|
20
20
|
with:
|
|
21
21
|
version: 0.6.8
|
|
22
22
|
- name: Install the project
|