digitalhub-runtime-python 0.9.0b1__tar.gz → 0.15.0b2__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.
- digitalhub_runtime_python-0.15.0b2/.github/scripts/bump.sh +40 -0
- digitalhub_runtime_python-0.15.0b2/.github/scripts/changelog.sh +7 -0
- digitalhub_runtime_python-0.15.0b2/.github/scripts/cliff.toml +78 -0
- digitalhub_runtime_python-0.15.0b2/.github/workflows/release.yml +146 -0
- digitalhub_runtime_python-0.15.0b2/.github/workflows/run_local_test.yml +42 -0
- digitalhub_runtime_python-0.15.0b2/.github/workflows/test_release.yml +85 -0
- digitalhub_runtime_python-0.15.0b2/.gitignore +171 -0
- digitalhub_runtime_python-0.15.0b2/AUTHORS +5 -0
- digitalhub_runtime_python-0.15.0b2/CONTRIBUTING +11 -0
- digitalhub_runtime_python-0.15.0b2/COPYRIGHT +6 -0
- digitalhub_runtime_python-0.15.0b2/LICENSE +201 -0
- digitalhub_runtime_python-0.15.0b2/PKG-INFO +277 -0
- digitalhub_runtime_python-0.15.0b2/README.md +53 -0
- digitalhub_runtime_python-0.15.0b2/digitalhub_runtime_python/__init__.py +29 -0
- digitalhub_runtime_python-0.15.0b2/digitalhub_runtime_python/entities/__init__.py +3 -0
- digitalhub_runtime_python-0.15.0b2/digitalhub_runtime_python/entities/_base/__init__.py +3 -0
- digitalhub_runtime_python-0.15.0b2/digitalhub_runtime_python/entities/_base/runtime_entity/__init__.py +3 -0
- digitalhub_runtime_python-0.15.0b2/digitalhub_runtime_python/entities/_base/runtime_entity/builder.py +46 -0
- digitalhub_runtime_python-0.15.0b2/digitalhub_runtime_python/entities/_commons/__init__.py +3 -0
- {digitalhub_runtime_python-0.9.0b1 → digitalhub_runtime_python-0.15.0b2}/digitalhub_runtime_python/entities/_commons/enums.py +8 -2
- digitalhub_runtime_python-0.15.0b2/digitalhub_runtime_python/entities/function/__init__.py +3 -0
- digitalhub_runtime_python-0.15.0b2/digitalhub_runtime_python/entities/function/python/__init__.py +3 -0
- {digitalhub_runtime_python-0.9.0b1 → digitalhub_runtime_python-0.15.0b2}/digitalhub_runtime_python/entities/function/python/builder.py +8 -6
- {digitalhub_runtime_python-0.9.0b1 → digitalhub_runtime_python-0.15.0b2}/digitalhub_runtime_python/entities/function/python/entity.py +14 -0
- {digitalhub_runtime_python-0.9.0b1 → digitalhub_runtime_python-0.15.0b2}/digitalhub_runtime_python/entities/function/python/models.py +6 -1
- {digitalhub_runtime_python-0.9.0b1 → digitalhub_runtime_python-0.15.0b2}/digitalhub_runtime_python/entities/function/python/spec.py +7 -3
- {digitalhub_runtime_python-0.9.0b1 → digitalhub_runtime_python-0.15.0b2}/digitalhub_runtime_python/entities/function/python/status.py +4 -0
- {digitalhub_runtime_python-0.9.0b1 → digitalhub_runtime_python-0.15.0b2}/digitalhub_runtime_python/entities/function/python/utils.py +70 -6
- digitalhub_runtime_python-0.15.0b2/digitalhub_runtime_python/entities/run/__init__.py +3 -0
- digitalhub_runtime_python-0.15.0b2/digitalhub_runtime_python/entities/run/_base/__init__.py +3 -0
- {digitalhub_runtime_python-0.9.0b1/digitalhub_runtime_python/entities/run/python_run → digitalhub_runtime_python-0.15.0b2/digitalhub_runtime_python/entities/run/_base}/builder.py +7 -3
- {digitalhub_runtime_python-0.9.0b1/digitalhub_runtime_python/entities/run/python_run → digitalhub_runtime_python-0.15.0b2/digitalhub_runtime_python/entities/run/_base}/entity.py +12 -47
- {digitalhub_runtime_python-0.9.0b1/digitalhub_runtime_python/entities/run/python_run → digitalhub_runtime_python-0.15.0b2/digitalhub_runtime_python/entities/run/_base}/spec.py +22 -28
- {digitalhub_runtime_python-0.9.0b1/digitalhub_runtime_python/entities/run/python_run → digitalhub_runtime_python-0.15.0b2/digitalhub_runtime_python/entities/run/_base}/status.py +6 -1
- {digitalhub_runtime_python-0.9.0b1/digitalhub_runtime_python/entities/run/python_run → digitalhub_runtime_python-0.15.0b2/digitalhub_runtime_python/entities/run/_base}/utils.py +4 -0
- digitalhub_runtime_python-0.15.0b2/digitalhub_runtime_python/entities/run/build/__init__.py +3 -0
- digitalhub_runtime_python-0.15.0b2/digitalhub_runtime_python/entities/run/build/builder.py +25 -0
- digitalhub_runtime_python-0.15.0b2/digitalhub_runtime_python/entities/run/build/entity.py +36 -0
- digitalhub_runtime_python-0.15.0b2/digitalhub_runtime_python/entities/run/build/spec.py +15 -0
- digitalhub_runtime_python-0.15.0b2/digitalhub_runtime_python/entities/run/build/status.py +13 -0
- digitalhub_runtime_python-0.15.0b2/digitalhub_runtime_python/entities/run/job/__init__.py +3 -0
- digitalhub_runtime_python-0.15.0b2/digitalhub_runtime_python/entities/run/job/builder.py +25 -0
- digitalhub_runtime_python-0.15.0b2/digitalhub_runtime_python/entities/run/job/entity.py +69 -0
- digitalhub_runtime_python-0.15.0b2/digitalhub_runtime_python/entities/run/job/spec.py +15 -0
- digitalhub_runtime_python-0.15.0b2/digitalhub_runtime_python/entities/run/job/status.py +13 -0
- digitalhub_runtime_python-0.15.0b2/digitalhub_runtime_python/entities/run/serve/__init__.py +3 -0
- digitalhub_runtime_python-0.15.0b2/digitalhub_runtime_python/entities/run/serve/builder.py +25 -0
- digitalhub_runtime_python-0.15.0b2/digitalhub_runtime_python/entities/run/serve/entity.py +86 -0
- digitalhub_runtime_python-0.15.0b2/digitalhub_runtime_python/entities/run/serve/spec.py +15 -0
- digitalhub_runtime_python-0.15.0b2/digitalhub_runtime_python/entities/run/serve/status.py +13 -0
- digitalhub_runtime_python-0.15.0b2/digitalhub_runtime_python/entities/task/__init__.py +3 -0
- digitalhub_runtime_python-0.15.0b2/digitalhub_runtime_python/entities/task/build/__init__.py +3 -0
- {digitalhub_runtime_python-0.9.0b1/digitalhub_runtime_python/entities/task/python_build → digitalhub_runtime_python-0.15.0b2/digitalhub_runtime_python/entities/task/build}/builder.py +7 -3
- {digitalhub_runtime_python-0.9.0b1/digitalhub_runtime_python/entities/task/python_build → digitalhub_runtime_python-0.15.0b2/digitalhub_runtime_python/entities/task/build}/entity.py +6 -2
- {digitalhub_runtime_python-0.9.0b1/digitalhub_runtime_python/entities/task/python_build → digitalhub_runtime_python-0.15.0b2/digitalhub_runtime_python/entities/task/build}/spec.py +5 -11
- {digitalhub_runtime_python-0.9.0b1/digitalhub_runtime_python/entities/task/python_build → digitalhub_runtime_python-0.15.0b2/digitalhub_runtime_python/entities/task/build}/status.py +4 -0
- digitalhub_runtime_python-0.15.0b2/digitalhub_runtime_python/entities/task/job/__init__.py +3 -0
- {digitalhub_runtime_python-0.9.0b1/digitalhub_runtime_python/entities/task/python_job → digitalhub_runtime_python-0.15.0b2/digitalhub_runtime_python/entities/task/job}/builder.py +7 -3
- {digitalhub_runtime_python-0.9.0b1/digitalhub_runtime_python/entities/task/python_job → digitalhub_runtime_python-0.15.0b2/digitalhub_runtime_python/entities/task/job}/entity.py +6 -2
- {digitalhub_runtime_python-0.9.0b1/digitalhub_runtime_python/entities/task/python_job → digitalhub_runtime_python-0.15.0b2/digitalhub_runtime_python/entities/task/job}/models.py +4 -0
- digitalhub_runtime_python-0.15.0b2/digitalhub_runtime_python/entities/task/job/spec.py +19 -0
- {digitalhub_runtime_python-0.9.0b1/digitalhub_runtime_python/entities/task/python_job → digitalhub_runtime_python-0.15.0b2/digitalhub_runtime_python/entities/task/job}/status.py +4 -0
- digitalhub_runtime_python-0.15.0b2/digitalhub_runtime_python/entities/task/serve/__init__.py +3 -0
- {digitalhub_runtime_python-0.9.0b1/digitalhub_runtime_python/entities/task/python_serve → digitalhub_runtime_python-0.15.0b2/digitalhub_runtime_python/entities/task/serve}/builder.py +7 -3
- {digitalhub_runtime_python-0.9.0b1/digitalhub_runtime_python/entities/task/python_serve → digitalhub_runtime_python-0.15.0b2/digitalhub_runtime_python/entities/task/serve}/entity.py +6 -2
- {digitalhub_runtime_python-0.9.0b1/digitalhub_runtime_python/entities/task/python_serve → digitalhub_runtime_python-0.15.0b2/digitalhub_runtime_python/entities/task/serve}/spec.py +11 -12
- {digitalhub_runtime_python-0.9.0b1/digitalhub_runtime_python/entities/task/python_serve → digitalhub_runtime_python-0.15.0b2/digitalhub_runtime_python/entities/task/serve}/status.py +4 -0
- digitalhub_runtime_python-0.15.0b2/digitalhub_runtime_python/runtimes/__init__.py +3 -0
- {digitalhub_runtime_python-0.9.0b1 → digitalhub_runtime_python-0.15.0b2}/digitalhub_runtime_python/runtimes/builder.py +4 -0
- {digitalhub_runtime_python-0.9.0b1 → digitalhub_runtime_python-0.15.0b2}/digitalhub_runtime_python/runtimes/runtime.py +9 -9
- digitalhub_runtime_python-0.15.0b2/digitalhub_runtime_python/utils/configuration.py +345 -0
- {digitalhub_runtime_python-0.9.0b1 → digitalhub_runtime_python-0.15.0b2}/digitalhub_runtime_python/utils/inputs.py +84 -8
- {digitalhub_runtime_python-0.9.0b1 → digitalhub_runtime_python-0.15.0b2}/digitalhub_runtime_python/utils/outputs.py +26 -29
- {digitalhub_runtime_python-0.9.0b1 → digitalhub_runtime_python-0.15.0b2}/digitalhub_runtime_python/utils/utils.py +42 -0
- {digitalhub_runtime_python-0.9.0b1 → digitalhub_runtime_python-0.15.0b2}/pyproject.toml +25 -14
- digitalhub_runtime_python-0.15.0b2/test/instances/entities/function/function-python-git.json +35 -0
- digitalhub_runtime_python-0.15.0b2/test/instances/entities/function/function-python-local.json +35 -0
- digitalhub_runtime_python-0.15.0b2/test/instances/entities/function/function-python-zip.json +35 -0
- digitalhub_runtime_python-0.15.0b2/test/instances/entities/run/run-python+build:run.json +920 -0
- digitalhub_runtime_python-0.15.0b2/test/instances/entities/run/run-python+job:run.json +472 -0
- digitalhub_runtime_python-0.15.0b2/test/instances/entities/run/run-python+serve:run.json +1965 -0
- digitalhub_runtime_python-0.15.0b2/test/instances/entities/task/task-python+build.json +69 -0
- digitalhub_runtime_python-0.15.0b2/test/instances/entities/task/task-python+job.json +72 -0
- digitalhub_runtime_python-0.15.0b2/test/instances/entities/task/task-python+serve.json +74 -0
- digitalhub_runtime_python-0.15.0b2/test/instances/test_validate.py +134 -0
- digitalhub_runtime_python-0.9.0b1/LICENSE.txt +0 -216
- digitalhub_runtime_python-0.9.0b1/PKG-INFO +0 -234
- digitalhub_runtime_python-0.9.0b1/README.md +0 -1
- digitalhub_runtime_python-0.9.0b1/digitalhub_runtime_python/__init__.py +0 -22
- digitalhub_runtime_python-0.9.0b1/digitalhub_runtime_python/entities/__init__.py +0 -0
- digitalhub_runtime_python-0.9.0b1/digitalhub_runtime_python/entities/_base/__init__.py +0 -0
- digitalhub_runtime_python-0.9.0b1/digitalhub_runtime_python/entities/_base/runtime_entity/__init__.py +0 -0
- digitalhub_runtime_python-0.9.0b1/digitalhub_runtime_python/entities/_base/runtime_entity/builder.py +0 -27
- digitalhub_runtime_python-0.9.0b1/digitalhub_runtime_python/entities/_commons/__init__.py +0 -0
- digitalhub_runtime_python-0.9.0b1/digitalhub_runtime_python/entities/function/__init__.py +0 -0
- digitalhub_runtime_python-0.9.0b1/digitalhub_runtime_python/entities/function/python/__init__.py +0 -0
- digitalhub_runtime_python-0.9.0b1/digitalhub_runtime_python/entities/run/__init__.py +0 -0
- digitalhub_runtime_python-0.9.0b1/digitalhub_runtime_python/entities/run/python_run/__init__.py +0 -0
- digitalhub_runtime_python-0.9.0b1/digitalhub_runtime_python/entities/task/__init__.py +0 -0
- digitalhub_runtime_python-0.9.0b1/digitalhub_runtime_python/entities/task/python_build/__init__.py +0 -0
- digitalhub_runtime_python-0.9.0b1/digitalhub_runtime_python/entities/task/python_job/__init__.py +0 -0
- digitalhub_runtime_python-0.9.0b1/digitalhub_runtime_python/entities/task/python_job/spec.py +0 -54
- digitalhub_runtime_python-0.9.0b1/digitalhub_runtime_python/entities/task/python_serve/__init__.py +0 -0
- digitalhub_runtime_python-0.9.0b1/digitalhub_runtime_python/runtimes/__init__.py +0 -0
- digitalhub_runtime_python-0.9.0b1/digitalhub_runtime_python/utils/configuration.py +0 -181
- digitalhub_runtime_python-0.9.0b1/digitalhub_runtime_python/utils/env.py +0 -3
- digitalhub_runtime_python-0.9.0b1/digitalhub_runtime_python.egg-info/PKG-INFO +0 -234
- digitalhub_runtime_python-0.9.0b1/digitalhub_runtime_python.egg-info/SOURCES.txt +0 -55
- digitalhub_runtime_python-0.9.0b1/digitalhub_runtime_python.egg-info/dependency_links.txt +0 -1
- digitalhub_runtime_python-0.9.0b1/digitalhub_runtime_python.egg-info/requires.txt +0 -1
- digitalhub_runtime_python-0.9.0b1/digitalhub_runtime_python.egg-info/top_level.txt +0 -1
- digitalhub_runtime_python-0.9.0b1/setup.cfg +0 -4
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Extract version
|
|
2
|
+
VERSION=$(bumpver show -n --environ | grep CUR | awk '{gsub(/CURRENT_VERSION=/, ""); print}')
|
|
3
|
+
|
|
4
|
+
# Check if version include beta tag
|
|
5
|
+
if [[ $VERSION == *"b"* ]];
|
|
6
|
+
then HAS_BETA_TAG=1;
|
|
7
|
+
else HAS_BETA_TAG=0;
|
|
8
|
+
fi
|
|
9
|
+
|
|
10
|
+
# Evaluate version bumping request
|
|
11
|
+
case $1 in
|
|
12
|
+
new-beta-major|new-beta-minor|new-beta-patch)
|
|
13
|
+
rel=$(echo $1 | awk '{gsub(/new-beta-/, ""); print}')
|
|
14
|
+
if [ $HAS_BETA_TAG -eq 0 ];
|
|
15
|
+
then
|
|
16
|
+
bumpver update -n --$rel --tag=beta
|
|
17
|
+
else
|
|
18
|
+
echo "You can create a new beta from a final version! Current version: $VERSION"; exit 1;
|
|
19
|
+
fi
|
|
20
|
+
;;
|
|
21
|
+
final)
|
|
22
|
+
if [ $HAS_BETA_TAG -eq 1 ];
|
|
23
|
+
then
|
|
24
|
+
bumpver update -n --tag=final
|
|
25
|
+
else
|
|
26
|
+
echo "You can create a final version from a beta version! Current version: $VERSION"; exit 1;
|
|
27
|
+
fi
|
|
28
|
+
;;
|
|
29
|
+
upgrade-beta)
|
|
30
|
+
if [ $HAS_BETA_TAG -eq 1 ];
|
|
31
|
+
then
|
|
32
|
+
bumpver update -n --tag-num
|
|
33
|
+
else
|
|
34
|
+
echo "You can upgrade a beta from a beta version! Current version: $VERSION"; exit 1;
|
|
35
|
+
fi
|
|
36
|
+
;;
|
|
37
|
+
major|minor|patch)
|
|
38
|
+
bumpver update -n --$1 --tag=final
|
|
39
|
+
;;
|
|
40
|
+
esac
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# git-cliff ~ default configuration file
|
|
2
|
+
# https://git-cliff.org/docs/configuration
|
|
3
|
+
#
|
|
4
|
+
# Lines starting with "#" are comments.
|
|
5
|
+
# Configuration options are organized into tables and keys.
|
|
6
|
+
# See documentation for more information on available options.
|
|
7
|
+
|
|
8
|
+
[changelog]
|
|
9
|
+
# template for the changelog header
|
|
10
|
+
header = """
|
|
11
|
+
Changelog\n
|
|
12
|
+
"""
|
|
13
|
+
# template for the changelog body
|
|
14
|
+
# https://keats.github.io/tera/docs/#introduction
|
|
15
|
+
body = """
|
|
16
|
+
## {{ version | trim_start_matches(pat="v") }} - {{ timestamp | date(format="%Y-%m-%d") }}
|
|
17
|
+
{% if previous %}\
|
|
18
|
+
{% if previous.commit_id and commit_id %}
|
|
19
|
+
[{{ previous.commit_id | truncate(length=7, end="") }}]({{ previous.commit_id }})...\
|
|
20
|
+
[{{ commit_id | truncate(length=7, end="") }}]({{ commit_id }})
|
|
21
|
+
{% endif %}\
|
|
22
|
+
{% endif %}\
|
|
23
|
+
{% for group, commits in commits | group_by(attribute="group") %}
|
|
24
|
+
### {{ group | upper_first }}
|
|
25
|
+
{% for commit in commits %}
|
|
26
|
+
- {{ commit.message | split(pat="\n") | first | upper_first | trim }} ([{{ commit.id | truncate(length=7, end="") }}]({{ commit.id }}))\
|
|
27
|
+
{% for footer in commit.footers -%}
|
|
28
|
+
, {{ footer.token }}{{ footer.separator }}{{ footer.value }}\
|
|
29
|
+
{% endfor %}\
|
|
30
|
+
{% endfor %}
|
|
31
|
+
{% endfor %}\n
|
|
32
|
+
"""
|
|
33
|
+
# template for the changelog footer
|
|
34
|
+
footer = """"""
|
|
35
|
+
# remove the leading and trailing s
|
|
36
|
+
trim = true
|
|
37
|
+
# postprocessors
|
|
38
|
+
postprocessors = [
|
|
39
|
+
# { pattern = '<REPO>', replace = "https://github.com/orhun/git-cliff" }, # replace repository URL
|
|
40
|
+
]
|
|
41
|
+
# render body even when there are no releases to process
|
|
42
|
+
# render_always = true
|
|
43
|
+
# output file path
|
|
44
|
+
# output = "test.md"
|
|
45
|
+
|
|
46
|
+
[git]
|
|
47
|
+
# parse the commits based on https://www.conventionalcommits.org
|
|
48
|
+
conventional_commits = true
|
|
49
|
+
# filter out the commits that are not conventional
|
|
50
|
+
filter_unconventional = true
|
|
51
|
+
# process each line of a commit as an individual commit
|
|
52
|
+
split_commits = false
|
|
53
|
+
# regex for preprocessing the commit messages
|
|
54
|
+
commit_preprocessors = [
|
|
55
|
+
# Replace issue numbers
|
|
56
|
+
#{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](<REPO>/issues/${2}))"},
|
|
57
|
+
# Check spelling of the commit with https://github.com/crate-ci/typos
|
|
58
|
+
# If the spelling is incorrect, it will be automatically fixed.
|
|
59
|
+
#{ pattern = '.*', replace_command = 'typos --write-changes -' },
|
|
60
|
+
]
|
|
61
|
+
# regex for parsing and grouping commits
|
|
62
|
+
commit_parsers = [
|
|
63
|
+
{ message = "^feat", group = "<!-- 0 --> Features" },
|
|
64
|
+
{ message = "^fix", group = "<!-- 1 --> Bug Fixes" },
|
|
65
|
+
{ message = "^perf", group = "<!-- 2 --> Performance" },
|
|
66
|
+
{ message = "^build", group = "<!-- 3 --> Build" },
|
|
67
|
+
{ message = "^doc", group = "<!-- 4 --> Documentation" },
|
|
68
|
+
{ message = "^BREAKING", group = "<!-- 5 --> Breaking Changes" },
|
|
69
|
+
{ message = ".*", group = "<!-- 10 --> Other" , skip = true },
|
|
70
|
+
]
|
|
71
|
+
# filter out the commits that are not matched by commit parsers
|
|
72
|
+
filter_commits = false
|
|
73
|
+
# sort the tags topologically
|
|
74
|
+
topo_order = false
|
|
75
|
+
# sort the commits inside sections by oldest/newest order
|
|
76
|
+
sort_commits = "oldest"
|
|
77
|
+
ignore_tags = ".*b.*"
|
|
78
|
+
use_branch_tags = true
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
name: Release on PyPI and GitHub
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
inputs:
|
|
6
|
+
release-type:
|
|
7
|
+
description: "Release type"
|
|
8
|
+
required: true
|
|
9
|
+
default: "tag-num"
|
|
10
|
+
type: choice
|
|
11
|
+
options:
|
|
12
|
+
- major
|
|
13
|
+
- minor
|
|
14
|
+
- patch
|
|
15
|
+
- upgrade-beta
|
|
16
|
+
- new-beta-major
|
|
17
|
+
- new-beta-minor
|
|
18
|
+
- new-beta-patch
|
|
19
|
+
- final
|
|
20
|
+
skip-pypi:
|
|
21
|
+
description: "If true, skip publishing to PyPI"
|
|
22
|
+
default: false
|
|
23
|
+
type: boolean
|
|
24
|
+
|
|
25
|
+
jobs:
|
|
26
|
+
bumpver-pyproject:
|
|
27
|
+
runs-on: ubuntu-latest
|
|
28
|
+
outputs:
|
|
29
|
+
version: ${{ steps.current-version.outputs.version }}
|
|
30
|
+
steps:
|
|
31
|
+
- uses: actions/checkout@v4
|
|
32
|
+
- uses: actions/setup-python@v5
|
|
33
|
+
with:
|
|
34
|
+
python-version: "3.10"
|
|
35
|
+
|
|
36
|
+
- name: Install bumpver
|
|
37
|
+
run: python -m pip install bumpver
|
|
38
|
+
|
|
39
|
+
# Evaluate input and bumpver accordingly
|
|
40
|
+
- name: Execute script bumpver
|
|
41
|
+
run: ./.github/scripts/bump.sh ${{ inputs.release-type }}
|
|
42
|
+
|
|
43
|
+
# Store current version for later use
|
|
44
|
+
- name: Current version
|
|
45
|
+
id: current-version
|
|
46
|
+
run: |
|
|
47
|
+
ver=$(bumpver show -n --environ | grep CUR | awk '{gsub(/CURRENT_VERSION=/, ""); print}')
|
|
48
|
+
echo "version=${ver}" >> "$GITHUB_OUTPUT"
|
|
49
|
+
|
|
50
|
+
# Commit modifications to pyproject.toml
|
|
51
|
+
- name: Commit changes
|
|
52
|
+
run: |
|
|
53
|
+
git config user.name "$GITHUB_ACTOR"
|
|
54
|
+
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
|
|
55
|
+
git commit -a -m "bump: new version ${{ steps.current-version.outputs.version }}"
|
|
56
|
+
git push
|
|
57
|
+
|
|
58
|
+
build-n-publish:
|
|
59
|
+
name: Build and publish
|
|
60
|
+
if: ${{ !inputs.skip-pypi }}
|
|
61
|
+
needs: bumpver-pyproject
|
|
62
|
+
runs-on: ubuntu-latest
|
|
63
|
+
steps:
|
|
64
|
+
# Force with ref as https://github.com/orgs/community/discussions/110853
|
|
65
|
+
- uses: actions/checkout@v4
|
|
66
|
+
with:
|
|
67
|
+
ref: ${{ github.ref }}
|
|
68
|
+
- uses: actions/setup-python@v5
|
|
69
|
+
with:
|
|
70
|
+
python-version: "3.10"
|
|
71
|
+
|
|
72
|
+
# Build wheel to upload
|
|
73
|
+
- name: Install build and build a binary wheel
|
|
74
|
+
run: python -m pip install build && python -m build
|
|
75
|
+
|
|
76
|
+
# Publish to PyPI
|
|
77
|
+
- name: Publish distribution to PyPI
|
|
78
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
79
|
+
with:
|
|
80
|
+
password: ${{ secrets.PYPI_TOKEN }}
|
|
81
|
+
|
|
82
|
+
tag-and-release:
|
|
83
|
+
name: Tag and release on Github
|
|
84
|
+
needs: [bumpver-pyproject]
|
|
85
|
+
runs-on: ubuntu-latest
|
|
86
|
+
steps:
|
|
87
|
+
- uses: actions/checkout@v4
|
|
88
|
+
with:
|
|
89
|
+
ref: ${{ github.ref }}
|
|
90
|
+
fetch-depth: 0
|
|
91
|
+
|
|
92
|
+
- uses: actions/setup-python@v5
|
|
93
|
+
with:
|
|
94
|
+
python-version: "3.10"
|
|
95
|
+
|
|
96
|
+
- name: Install cliff
|
|
97
|
+
run: python -m pip install git-cliff
|
|
98
|
+
|
|
99
|
+
- name: Generate a changelog
|
|
100
|
+
env:
|
|
101
|
+
VERSION: ${{ needs.bumpver-pyproject.outputs.version }}
|
|
102
|
+
BETA: ${{ inputs.release-type == 'upgrade-beta' || startsWith(inputs.release-type, 'new-beta')}}
|
|
103
|
+
run: ./.github/scripts/changelog.sh ${{ env.VERSION }} ${{ env.BETA }}
|
|
104
|
+
|
|
105
|
+
- name: Create Release
|
|
106
|
+
id: create_release
|
|
107
|
+
uses: softprops/action-gh-release@v2
|
|
108
|
+
env:
|
|
109
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
110
|
+
VERSION: ${{ needs.bumpver-pyproject.outputs.version }}
|
|
111
|
+
BETA: ${{ inputs.release-type == 'upgrade-beta' || startsWith(inputs.release-type, 'new-beta')}}
|
|
112
|
+
with:
|
|
113
|
+
name: ${{ env.VERSION }}
|
|
114
|
+
tag_name: ${{ env.VERSION }}
|
|
115
|
+
body_path: CHANGELOG.md
|
|
116
|
+
draft: false
|
|
117
|
+
prerelease: ${{ env.BETA }}
|
|
118
|
+
|
|
119
|
+
# Send a trigger to python wrapper repo
|
|
120
|
+
trigger:
|
|
121
|
+
runs-on: ubuntu-latest
|
|
122
|
+
needs: [bumpver-pyproject, build-n-publish]
|
|
123
|
+
steps:
|
|
124
|
+
- uses: actions/checkout@v4
|
|
125
|
+
- name: Trigger Workflow in Another Repository
|
|
126
|
+
run: |
|
|
127
|
+
# Set the required variables
|
|
128
|
+
repo_owner="scc-digitalhub"
|
|
129
|
+
event_type="trigger-workflow"
|
|
130
|
+
lib_name="python"
|
|
131
|
+
lib_vers=${{ needs.bumpver-pyproject.outputs.version }}
|
|
132
|
+
branch=${{ github.ref }}
|
|
133
|
+
|
|
134
|
+
# Define the repositories to trigger
|
|
135
|
+
repos=( "digitalhub-tests" "digitalhub-serverless" "digitalhub-sdk-wrapper-hera")
|
|
136
|
+
|
|
137
|
+
# Loop over the repositories and trigger the workflow
|
|
138
|
+
for repo in "${repos[@]}"; do
|
|
139
|
+
curl -L \
|
|
140
|
+
-X POST \
|
|
141
|
+
-H "Accept: application/vnd.github+json" \
|
|
142
|
+
-H "Authorization: Bearer ${{ secrets.TRIGGER_PAT }}" \
|
|
143
|
+
-H "X-GitHub-Api-Version: 2022-11-28" \
|
|
144
|
+
https://api.github.com/repos/$repo_owner/$repo/dispatches \
|
|
145
|
+
-d "{\"event_type\": \"$event_type\", \"client_payload\": {\"lib_name\": \"$lib_name\", \"lib_vers\": \"$lib_vers\", \"branch\": \"$branch\"}}"
|
|
146
|
+
done
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
name: Run Unit Local Test via Pytest
|
|
2
|
+
|
|
3
|
+
on: [push]
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
build:
|
|
7
|
+
runs-on: ubuntu-latest
|
|
8
|
+
strategy:
|
|
9
|
+
matrix:
|
|
10
|
+
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
|
11
|
+
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
15
|
+
uses: actions/setup-python@v5
|
|
16
|
+
with:
|
|
17
|
+
python-version: ${{ matrix.python-version }}
|
|
18
|
+
# You can test your matrix by printing the current Python version
|
|
19
|
+
- name: Display Python version
|
|
20
|
+
run: python -c "import sys; print(sys.version)"
|
|
21
|
+
- name: Install dependencies
|
|
22
|
+
run: |
|
|
23
|
+
python -m pip install --upgrade pip
|
|
24
|
+
python -m pip install .[dev]
|
|
25
|
+
- name: Lint with Ruff
|
|
26
|
+
run: |
|
|
27
|
+
pip install ruff
|
|
28
|
+
ruff check --output-format=github .
|
|
29
|
+
continue-on-error: true
|
|
30
|
+
- name: Get schema files from core
|
|
31
|
+
run: |
|
|
32
|
+
wget https://github.com/scc-digitalhub/digitalhub-core/archive/main.zip
|
|
33
|
+
7z x main.zip
|
|
34
|
+
rm main.zip
|
|
35
|
+
mv digitalhub-core-main/schemas/specs test/instances/schemas
|
|
36
|
+
rm -r digitalhub-core-main
|
|
37
|
+
- name: Test with pytest
|
|
38
|
+
run: |
|
|
39
|
+
coverage run -m pytest test -v -s
|
|
40
|
+
- name: Generate Coverage Report
|
|
41
|
+
run: |
|
|
42
|
+
coverage report -m
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
name: Test release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
inputs:
|
|
6
|
+
release-type:
|
|
7
|
+
description: "Release type"
|
|
8
|
+
required: true
|
|
9
|
+
default: "tag-num"
|
|
10
|
+
type: choice
|
|
11
|
+
options:
|
|
12
|
+
- major
|
|
13
|
+
- minor
|
|
14
|
+
- patch
|
|
15
|
+
- upgrade-beta
|
|
16
|
+
- new-beta-major
|
|
17
|
+
- new-beta-minor
|
|
18
|
+
- new-beta-patch
|
|
19
|
+
- final
|
|
20
|
+
skip-pypi:
|
|
21
|
+
description: "If true, skip publishing to PyPI"
|
|
22
|
+
default: false
|
|
23
|
+
type: boolean
|
|
24
|
+
|
|
25
|
+
jobs:
|
|
26
|
+
bumpver-pyproject:
|
|
27
|
+
runs-on: ubuntu-latest
|
|
28
|
+
outputs:
|
|
29
|
+
version: ${{ steps.current-version.outputs.version }}
|
|
30
|
+
steps:
|
|
31
|
+
- uses: actions/checkout@v4
|
|
32
|
+
- uses: actions/setup-python@v5
|
|
33
|
+
with:
|
|
34
|
+
python-version: "3.10"
|
|
35
|
+
|
|
36
|
+
- name: Install bumpver
|
|
37
|
+
run: python -m pip install bumpver
|
|
38
|
+
|
|
39
|
+
# Evaluate input and bumpver accordingly
|
|
40
|
+
- name: Execute script bumpver
|
|
41
|
+
run: ./.github/scripts/bump.sh ${{ inputs.release-type }}
|
|
42
|
+
|
|
43
|
+
# Store current version for later use
|
|
44
|
+
- name: Current version
|
|
45
|
+
id: current-version
|
|
46
|
+
run: |
|
|
47
|
+
ver=$(bumpver show -n --environ | grep CUR | awk '{gsub(/CURRENT_VERSION=/, ""); print}')
|
|
48
|
+
echo "version=${ver}" >> "$GITHUB_OUTPUT"
|
|
49
|
+
|
|
50
|
+
tag-and-release:
|
|
51
|
+
name: Tag and release on Github
|
|
52
|
+
needs: [bumpver-pyproject]
|
|
53
|
+
runs-on: ubuntu-latest
|
|
54
|
+
steps:
|
|
55
|
+
- uses: actions/checkout@v4
|
|
56
|
+
with:
|
|
57
|
+
ref: ${{ github.ref }}
|
|
58
|
+
fetch-depth: 0
|
|
59
|
+
|
|
60
|
+
- uses: actions/setup-python@v5
|
|
61
|
+
with:
|
|
62
|
+
python-version: "3.10"
|
|
63
|
+
|
|
64
|
+
- name: Install cliff
|
|
65
|
+
run: python -m pip install git-cliff
|
|
66
|
+
|
|
67
|
+
- name: Generate a changelog
|
|
68
|
+
env:
|
|
69
|
+
VERSION: ${{ needs.bumpver-pyproject.outputs.version }}
|
|
70
|
+
BETA: ${{ inputs.release-type == 'upgrade-beta' || startsWith(inputs.release-type, 'new-beta')}}
|
|
71
|
+
run: ./.github/scripts/changelog.sh ${{ env.VERSION }} ${{ env.BETA }}
|
|
72
|
+
|
|
73
|
+
- name: Create Release
|
|
74
|
+
id: create_release
|
|
75
|
+
uses: softprops/action-gh-release@v2
|
|
76
|
+
env:
|
|
77
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
78
|
+
VERSION: ${{ needs.bumpver-pyproject.outputs.version }}
|
|
79
|
+
BETA: ${{ inputs.release-type == 'upgrade-beta' || startsWith(inputs.release-type, 'new-beta')}}
|
|
80
|
+
with:
|
|
81
|
+
name: ${{ env.VERSION }}
|
|
82
|
+
tag_name: ${{ env.VERSION }}
|
|
83
|
+
body_path: CHANGELOG.md
|
|
84
|
+
draft: false
|
|
85
|
+
prerelease: ${{ env.BETA }}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
/build
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py,cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
#docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
88
|
+
# .python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
#Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# poetry
|
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
100
|
+
# commonly ignored for libraries.
|
|
101
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
102
|
+
#poetry.lock
|
|
103
|
+
|
|
104
|
+
# pdm
|
|
105
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
106
|
+
#pdm.lock
|
|
107
|
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
|
108
|
+
# in version control.
|
|
109
|
+
# https://pdm.fming.dev/#use-with-ide
|
|
110
|
+
.pdm.toml
|
|
111
|
+
|
|
112
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
113
|
+
__pypackages__/
|
|
114
|
+
|
|
115
|
+
# Celery stuff
|
|
116
|
+
celerybeat-schedule
|
|
117
|
+
celerybeat.pid
|
|
118
|
+
|
|
119
|
+
# SageMath parsed files
|
|
120
|
+
*.sage.py
|
|
121
|
+
|
|
122
|
+
# Environments
|
|
123
|
+
.env
|
|
124
|
+
.venv
|
|
125
|
+
env/
|
|
126
|
+
venv/
|
|
127
|
+
ENV/
|
|
128
|
+
env.bak/
|
|
129
|
+
venv.bak/
|
|
130
|
+
|
|
131
|
+
# Spyder project settings
|
|
132
|
+
.spyderproject
|
|
133
|
+
.spyproject
|
|
134
|
+
|
|
135
|
+
# Rope project settings
|
|
136
|
+
.ropeproject
|
|
137
|
+
|
|
138
|
+
# mkdocs documentation
|
|
139
|
+
/site
|
|
140
|
+
|
|
141
|
+
# mypy
|
|
142
|
+
.mypy_cache/
|
|
143
|
+
.dmypy.json
|
|
144
|
+
dmypy.json
|
|
145
|
+
|
|
146
|
+
# Pyre type checker
|
|
147
|
+
.pyre/
|
|
148
|
+
|
|
149
|
+
# pytype static type analyzer
|
|
150
|
+
.pytype/
|
|
151
|
+
|
|
152
|
+
# Cython debug symbols
|
|
153
|
+
cython_debug/
|
|
154
|
+
|
|
155
|
+
# PyCharm
|
|
156
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
157
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
158
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
159
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
160
|
+
#.idea/
|
|
161
|
+
|
|
162
|
+
# pylint
|
|
163
|
+
.pylintrc
|
|
164
|
+
|
|
165
|
+
.ruff_cache
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
TODO
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
.vscode
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
AUTHORS
|
|
2
|
+
|
|
3
|
+
This project is developed and maintained by DSLab – Fondazione Bruno Kessler, with contributions from the open source community. A complete list of contributors is available in the project’s commit history and pull requests.
|
|
4
|
+
|
|
5
|
+
For questions or inquiries, please contact: digitalhub@fbk.eu
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
CONTRIBUTING
|
|
2
|
+
|
|
3
|
+
To report a bug or request a feature, please first check the existing issues to avoid duplicates. If none exist, open a new issue with a clear title and a detailed description, including any steps to reproduce if it's a bug.
|
|
4
|
+
|
|
5
|
+
To contribute code, start by forking the repository. Clone your fork locally and create a new branch for your changes. Make sure your commits follow the Conventional Commits v1.0 (https://www.conventionalcommits.org/en/v1.0.0/) specification to keep history readable and consistent.
|
|
6
|
+
|
|
7
|
+
Once your changes are ready, push your branch to your fork and open a pull request against the main branch. Be sure to include a summary of what you changed and why. If your pull request addresses an issue, mention it in the description (e.g., “Closes #123”).
|
|
8
|
+
|
|
9
|
+
Please note that new contributors may be asked to sign a Contributor License Agreement (CLA) before their pull requests can be merged. This helps us ensure compliance with open source licensing standards.
|
|
10
|
+
|
|
11
|
+
We appreciate contributions and help in improving the project!
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
COPYRIGHT
|
|
2
|
+
|
|
3
|
+
Copyright © 2025 DSLab – Fondazione Bruno Kessler and individual contributors.
|
|
4
|
+
|
|
5
|
+
This project is licensed under the Apache License, Version 2.0.
|
|
6
|
+
You may not use this file except in compliance with the License. Ownership of contributions remains with the original authors and is governed by the terms of the Apache 2.0 License, including the requirement to grant a license to the project.
|