stepup-queue 1.0.4__tar.gz → 1.0.6__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.
- stepup_queue-1.0.6/MANIFEST.in +16 -0
- {stepup_queue-1.0.4 → stepup_queue-1.0.6}/PKG-INFO +3 -2
- {stepup_queue-1.0.4 → stepup_queue-1.0.6}/pyproject.toml +5 -1
- {stepup_queue-1.0.4 → stepup_queue-1.0.6}/stepup/queue/actions.py +6 -3
- {stepup_queue-1.0.4 → stepup_queue-1.0.6}/stepup/queue/api.py +11 -0
- {stepup_queue-1.0.4 → stepup_queue-1.0.6}/stepup/queue/sbatch.py +17 -7
- {stepup_queue-1.0.4 → stepup_queue-1.0.6}/stepup_queue.egg-info/PKG-INFO +3 -2
- stepup_queue-1.0.6/stepup_queue.egg-info/SOURCES.txt +15 -0
- {stepup_queue-1.0.4 → stepup_queue-1.0.6}/stepup_queue.egg-info/requires.txt +1 -1
- stepup_queue-1.0.4/.editorconfig +0 -18
- stepup_queue-1.0.4/.github/requirements-old.txt +0 -2
- stepup_queue-1.0.4/.github/scripts/extract-notes.sh +0 -27
- stepup_queue-1.0.4/.github/workflows/mkdocs.yaml +0 -72
- stepup_queue-1.0.4/.github/workflows/pytest.yaml +0 -45
- stepup_queue-1.0.4/.github/workflows/release.yaml +0 -145
- stepup_queue-1.0.4/.gitignore +0 -29
- stepup_queue-1.0.4/.markdownlint-cli2.jsonc +0 -15
- stepup_queue-1.0.4/.pre-commit-config.yaml +0 -42
- stepup_queue-1.0.4/docs/changelog.md +0 -61
- stepup_queue-1.0.4/docs/development.md +0 -85
- stepup_queue-1.0.4/docs/examples/slurm-basic/.gitignore +0 -6
- stepup_queue-1.0.4/docs/examples/slurm-basic/README.md +0 -50
- stepup_queue-1.0.4/docs/examples/slurm-basic/dynamic-template.sh +0 -9
- stepup_queue-1.0.4/docs/examples/slurm-basic/fail/slurmjob.sh +0 -8
- stepup_queue-1.0.4/docs/examples/slurm-basic/pass/slurmjob.py +0 -11
- stepup_queue-1.0.4/docs/examples/slurm-basic/plan.py +0 -19
- stepup_queue-1.0.4/docs/examples/slurm-perpetual/.gitignore +0 -6
- stepup_queue-1.0.4/docs/examples/slurm-perpetual/README.md +0 -58
- stepup_queue-1.0.4/docs/examples/slurm-perpetual/plan.py +0 -8
- stepup_queue-1.0.4/docs/examples/slurm-perpetual/step1/slurmjob.sh +0 -10
- stepup_queue-1.0.4/docs/examples/slurm-perpetual/step2/slurmjob.sh +0 -11
- stepup_queue-1.0.4/docs/examples/slurm-perpetual/workflow.sh +0 -55
- stepup_queue-1.0.4/docs/index.md +0 -7
- stepup_queue-1.0.4/docs/installation.md +0 -20
- stepup_queue-1.0.4/docs/license.md +0 -21
- stepup_queue-1.0.4/docs/stepup.queue.api.md +0 -6
- stepup_queue-1.0.4/docs/usage.md +0 -98
- stepup_queue-1.0.4/mkdocs.yaml +0 -105
- stepup_queue-1.0.4/overrides/main.html +0 -8
- stepup_queue-1.0.4/stepup_queue.egg-info/SOURCES.txt +0 -46
- stepup_queue-1.0.4/tests/conftest.py +0 -28
- stepup_queue-1.0.4/tests/test_sbatch.py +0 -87
- {stepup_queue-1.0.4 → stepup_queue-1.0.6}/LICENSE +0 -0
- {stepup_queue-1.0.4 → stepup_queue-1.0.6}/README.md +0 -0
- {stepup_queue-1.0.4 → stepup_queue-1.0.6}/setup.cfg +0 -0
- {stepup_queue-1.0.4 → stepup_queue-1.0.6}/stepup/queue/__init__.py +0 -0
- {stepup_queue-1.0.4 → stepup_queue-1.0.6}/stepup/queue/canceljobs.py +0 -0
- {stepup_queue-1.0.4 → stepup_queue-1.0.6}/stepup_queue.egg-info/dependency_links.txt +0 -0
- {stepup_queue-1.0.4 → stepup_queue-1.0.6}/stepup_queue.egg-info/entry_points.txt +0 -0
- {stepup_queue-1.0.4 → stepup_queue-1.0.6}/stepup_queue.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Exclude documentation and development files
|
|
2
|
+
prune .github
|
|
3
|
+
prune .vscode
|
|
4
|
+
prune docs
|
|
5
|
+
prune overrides
|
|
6
|
+
exclude .editorconfig
|
|
7
|
+
exclude .gitignore
|
|
8
|
+
exclude .markdownlint-cli2.jsonc
|
|
9
|
+
exclude .pre-commit-config.yaml
|
|
10
|
+
exclude mkdocs.yaml
|
|
11
|
+
|
|
12
|
+
# Exclude tests for now. (Could be useful later for conda package.)
|
|
13
|
+
prune tests
|
|
14
|
+
|
|
15
|
+
# Exclude common build artifacts and cache files
|
|
16
|
+
global-exclude *.py[cod] __pycache__ *.so
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: stepup-queue
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.6
|
|
4
4
|
Summary: StepUp Queue integrates queued jobs into a StepUp workflow.
|
|
5
5
|
Author-email: Toon Verstraelen <toon.verstraelen@ugent.be>
|
|
6
6
|
License-Expression: GPL-3.0-or-later
|
|
@@ -19,11 +19,12 @@ Classifier: Programming Language :: Python :: 3
|
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.11
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.12
|
|
21
21
|
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
22
23
|
Classifier: Topic :: Software Development :: Build Tools
|
|
23
24
|
Requires-Python: >=3.11
|
|
24
25
|
Description-Content-Type: text/markdown
|
|
25
26
|
License-File: LICENSE
|
|
26
|
-
Requires-Dist: stepup<4.0.0,>=3.
|
|
27
|
+
Requires-Dist: stepup<4.0.0,>=3.1.3
|
|
27
28
|
Provides-Extra: dev
|
|
28
29
|
Requires-Dist: psutil; extra == "dev"
|
|
29
30
|
Requires-Dist: pytest; extra == "dev"
|
|
@@ -23,11 +23,12 @@ classifiers = [
|
|
|
23
23
|
"Programming Language :: Python :: 3.11",
|
|
24
24
|
"Programming Language :: Python :: 3.12",
|
|
25
25
|
"Programming Language :: Python :: 3.13",
|
|
26
|
+
"Programming Language :: Python :: 3.14",
|
|
26
27
|
"Topic :: Software Development :: Build Tools",
|
|
27
28
|
]
|
|
28
29
|
dependencies = [
|
|
29
30
|
# Ensure changes to these dependencies are reflected in .github/requirements-old.txt
|
|
30
|
-
"stepup>=3.
|
|
31
|
+
"stepup>=3.1.3,<4.0.0",
|
|
31
32
|
]
|
|
32
33
|
dynamic = ["version"]
|
|
33
34
|
|
|
@@ -88,6 +89,9 @@ ignore = [
|
|
|
88
89
|
"TRY301", # https://docs.astral.sh/ruff/rules/raise-within-try/
|
|
89
90
|
]
|
|
90
91
|
|
|
92
|
+
[tool.ruff.lint.isort]
|
|
93
|
+
known-first-party = ["stepup"]
|
|
94
|
+
|
|
91
95
|
[tool.setuptools]
|
|
92
96
|
packages = ["stepup.queue"]
|
|
93
97
|
|
|
@@ -26,7 +26,6 @@ import shlex
|
|
|
26
26
|
|
|
27
27
|
from path import Path
|
|
28
28
|
|
|
29
|
-
from stepup.core.utils import string_to_bool
|
|
30
29
|
from stepup.core.worker import WorkThread
|
|
31
30
|
|
|
32
31
|
from .canceljobs import read_jobid_cluster
|
|
@@ -38,9 +37,13 @@ def sbatch(argstr: str, work_thread: WorkThread) -> int:
|
|
|
38
37
|
parser = argparse.ArgumentParser()
|
|
39
38
|
parser.add_argument("ext", nargs="?", default=".sh")
|
|
40
39
|
parser.add_argument("--rc", default=None)
|
|
40
|
+
default_onchange = os.getenv("STEPUP_QUEUE_ONCHANGE", "raise")
|
|
41
|
+
parser.add_argument(
|
|
42
|
+
"--onchange", default=default_onchange, choices=["raise", "resubmit", "ignore"]
|
|
43
|
+
)
|
|
41
44
|
args = parser.parse_args(shlex.split(argstr))
|
|
42
45
|
|
|
43
|
-
if
|
|
46
|
+
if args.onchange == "resubmit":
|
|
44
47
|
with contextlib.suppress(InpDigestError):
|
|
45
48
|
return submit_once_and_wait(work_thread, args.ext, args.rc)
|
|
46
49
|
# Cancel running job (if any), clean log and resubmit
|
|
@@ -48,4 +51,4 @@ def sbatch(argstr: str, work_thread: WorkThread) -> int:
|
|
|
48
51
|
job_id, cluster = read_jobid_cluster(path_log)
|
|
49
52
|
work_thread.runsh(f"scancel -M {cluster} {job_id}")
|
|
50
53
|
path_log.remove_p()
|
|
51
|
-
return submit_once_and_wait(work_thread, args.ext, args.rc)
|
|
54
|
+
return submit_once_and_wait(work_thread, args.ext, args.rc, args.onchange != "ignore")
|
|
@@ -37,6 +37,7 @@ def sbatch(
|
|
|
37
37
|
env: Collection[str] | str = (),
|
|
38
38
|
out: Collection[str] | str = (),
|
|
39
39
|
vol: Collection[str] | str = (),
|
|
40
|
+
onchange: str | None = None,
|
|
40
41
|
optional: bool = False,
|
|
41
42
|
pool: str | None = None,
|
|
42
43
|
block: bool = False,
|
|
@@ -61,6 +62,9 @@ def sbatch(
|
|
|
61
62
|
|
|
62
63
|
See `step()` documentation in StepUp Core for all optional arguments.
|
|
63
64
|
and the return value.
|
|
65
|
+
Note that the `inp`, `out` and `vol` arguments are extended
|
|
66
|
+
with the files mentioned above and that any additional files you specify
|
|
67
|
+
are interpreted relative to the working directory.
|
|
64
68
|
|
|
65
69
|
Parameters
|
|
66
70
|
----------
|
|
@@ -76,6 +80,9 @@ def sbatch(
|
|
|
76
80
|
If multiple instructions are needed, put them in a file, e.g. `rc.sh`
|
|
77
81
|
and pass it here as `source rc.sh`.
|
|
78
82
|
In this case, you usually also want to include `rc.sh` in the `inp` list.
|
|
83
|
+
onchange
|
|
84
|
+
Policy when a the inputs of a previously submitted job have changed.
|
|
85
|
+
Must be one of `"raise"`, `"resubmit"` or `"ignore"`.
|
|
79
86
|
"""
|
|
80
87
|
if ext == "":
|
|
81
88
|
ext = ".sh"
|
|
@@ -88,6 +95,10 @@ def sbatch(
|
|
|
88
95
|
action += f" {ext}"
|
|
89
96
|
if rc is not None:
|
|
90
97
|
action += f" --rc={shlex.quote(rc)}"
|
|
98
|
+
if onchange is not None:
|
|
99
|
+
if onchange not in ["raise", "resubmit", "ignore"]:
|
|
100
|
+
raise ValueError(f"Invalid onchange policy {onchange}.")
|
|
101
|
+
action += f" --onchange={onchange}"
|
|
91
102
|
return step(
|
|
92
103
|
action,
|
|
93
104
|
inp=[f"slurmjob{ext}", *string_to_list(inp)],
|
|
@@ -36,11 +36,14 @@ SCONTROL_FAILED = "The command `scontrol show job` failed!\n"
|
|
|
36
36
|
DEBUG = string_to_bool(os.getenv("STEPUP_SBATCH_DEBUG", "0"))
|
|
37
37
|
CACHE_TIMEOUT = int(os.getenv("STEPUP_SBATCH_CACHE_TIMEOUT", "30"))
|
|
38
38
|
POLLING_INTERVAL = int(os.getenv("STEPUP_SBATCH_POLLING_INTERVAL", "10"))
|
|
39
|
-
TIME_MARGIN = int(os.getenv("STEPUP_SBATCH_TIME_MARGIN", "
|
|
39
|
+
TIME_MARGIN = int(os.getenv("STEPUP_SBATCH_TIME_MARGIN", "15"))
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
def submit_once_and_wait(
|
|
43
|
-
work_thread: WorkThread,
|
|
43
|
+
work_thread: WorkThread,
|
|
44
|
+
job_ext: str,
|
|
45
|
+
sbatch_rc: str | None = None,
|
|
46
|
+
validate_inp_digest: bool = True,
|
|
44
47
|
) -> int:
|
|
45
48
|
"""Submit a job and wait for it to complete. When called a second time, just wait.
|
|
46
49
|
|
|
@@ -53,6 +56,9 @@ def submit_once_and_wait(
|
|
|
53
56
|
sbatch_rc
|
|
54
57
|
A resource configuration needed before calling sbatch.
|
|
55
58
|
This is executed in the same shell, right before calling sbatch.
|
|
59
|
+
validate_inp_digest
|
|
60
|
+
If False, the input digest is not checked.
|
|
61
|
+
This is useful when the job script is modified but the changes are harmless.
|
|
56
62
|
|
|
57
63
|
Returns
|
|
58
64
|
-------
|
|
@@ -63,7 +69,7 @@ def submit_once_and_wait(
|
|
|
63
69
|
# Read previously logged steps
|
|
64
70
|
path_log = Path("slurmjob.log")
|
|
65
71
|
if path_log.is_file():
|
|
66
|
-
previous_lines =
|
|
72
|
+
previous_lines = read_log(path_log, validate_inp_digest)
|
|
67
73
|
else:
|
|
68
74
|
previous_lines = []
|
|
69
75
|
_init_log(path_log)
|
|
@@ -105,7 +111,7 @@ def submit_once_and_wait(
|
|
|
105
111
|
return int(returncode)
|
|
106
112
|
|
|
107
113
|
|
|
108
|
-
def
|
|
114
|
+
def read_log(path_log: str, do_inp_digest: bool = True) -> list[str]:
|
|
109
115
|
"""Read lines from a previously created log file."""
|
|
110
116
|
lines = []
|
|
111
117
|
with open(path_log) as f:
|
|
@@ -114,9 +120,11 @@ def _read_log(path_log: str) -> list[str]:
|
|
|
114
120
|
except StopIteration as exc:
|
|
115
121
|
raise ValueError("Existing log file is empty.") from exc
|
|
116
122
|
try:
|
|
117
|
-
|
|
123
|
+
inp_digest = next(f).strip()
|
|
118
124
|
except StopIteration as exc:
|
|
119
|
-
raise ValueError("Existing
|
|
125
|
+
raise ValueError("Existing has no input digest.") from exc
|
|
126
|
+
if do_inp_digest:
|
|
127
|
+
check_log_inp_digest(inp_digest)
|
|
120
128
|
for line in f:
|
|
121
129
|
line = line.strip()
|
|
122
130
|
lines.append(line)
|
|
@@ -177,7 +185,9 @@ def _read_or_poll_status(
|
|
|
177
185
|
# Call scontrol and parse its response.
|
|
178
186
|
rndsleep()
|
|
179
187
|
status_time, status = get_status(work_thread, jobid, cluster)
|
|
180
|
-
if status
|
|
188
|
+
# Log only if the status changed, and is not invalid or unlisted.
|
|
189
|
+
# These two statuses are (potentially) transient and should not be logged.
|
|
190
|
+
if status != last_status and status not in ["invalid", "unlisted"]:
|
|
181
191
|
log_step(path_log, status)
|
|
182
192
|
done = (status_time > submit_time + TIME_MARGIN) and (
|
|
183
193
|
status not in ["PENDING", "CONFIGURING", "RUNNING", "invalid"]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: stepup-queue
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.6
|
|
4
4
|
Summary: StepUp Queue integrates queued jobs into a StepUp workflow.
|
|
5
5
|
Author-email: Toon Verstraelen <toon.verstraelen@ugent.be>
|
|
6
6
|
License-Expression: GPL-3.0-or-later
|
|
@@ -19,11 +19,12 @@ Classifier: Programming Language :: Python :: 3
|
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.11
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.12
|
|
21
21
|
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
22
23
|
Classifier: Topic :: Software Development :: Build Tools
|
|
23
24
|
Requires-Python: >=3.11
|
|
24
25
|
Description-Content-Type: text/markdown
|
|
25
26
|
License-File: LICENSE
|
|
26
|
-
Requires-Dist: stepup<4.0.0,>=3.
|
|
27
|
+
Requires-Dist: stepup<4.0.0,>=3.1.3
|
|
27
28
|
Provides-Extra: dev
|
|
28
29
|
Requires-Dist: psutil; extra == "dev"
|
|
29
30
|
Requires-Dist: pytest; extra == "dev"
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
MANIFEST.in
|
|
3
|
+
README.md
|
|
4
|
+
pyproject.toml
|
|
5
|
+
stepup/queue/__init__.py
|
|
6
|
+
stepup/queue/actions.py
|
|
7
|
+
stepup/queue/api.py
|
|
8
|
+
stepup/queue/canceljobs.py
|
|
9
|
+
stepup/queue/sbatch.py
|
|
10
|
+
stepup_queue.egg-info/PKG-INFO
|
|
11
|
+
stepup_queue.egg-info/SOURCES.txt
|
|
12
|
+
stepup_queue.egg-info/dependency_links.txt
|
|
13
|
+
stepup_queue.egg-info/entry_points.txt
|
|
14
|
+
stepup_queue.egg-info/requires.txt
|
|
15
|
+
stepup_queue.egg-info/top_level.txt
|
stepup_queue-1.0.4/.editorconfig
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# EditorConfig is awesome: https://EditorConfig.org
|
|
2
|
-
|
|
3
|
-
root = true
|
|
4
|
-
|
|
5
|
-
[*]
|
|
6
|
-
end_of_line = lf
|
|
7
|
-
insert_final_newline = true
|
|
8
|
-
charset = utf-8
|
|
9
|
-
indent_style = space
|
|
10
|
-
indent_size = 4
|
|
11
|
-
max_line_length = 100
|
|
12
|
-
|
|
13
|
-
[Makefile]
|
|
14
|
-
indent_style = tab
|
|
15
|
-
|
|
16
|
-
[{*.json,*.yml,*.yaml}]
|
|
17
|
-
indent_style = space
|
|
18
|
-
indent_size = 2
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# Usage: .github/scripts/extract-notes.sh OWNER/SLUG GITREF
|
|
3
|
-
|
|
4
|
-
IFS='/'; read -ra REPOSITORY <<<"${1}"
|
|
5
|
-
OWNER=${REPOSITORY[0]}
|
|
6
|
-
SLUG=${REPOSITORY[1]}
|
|
7
|
-
GITREF=${2}
|
|
8
|
-
|
|
9
|
-
if [[ "${GITREF}" == refs/tags/* ]]; then
|
|
10
|
-
TAG="${GITREF#refs/tags/}"
|
|
11
|
-
VERSION="${TAG#v}"
|
|
12
|
-
MACRO_MESO=$(echo "${VERSION}" | cut -d. -f1,2)
|
|
13
|
-
else
|
|
14
|
-
TAG="unreleased"
|
|
15
|
-
VERSION="Unreleased"
|
|
16
|
-
MACRO_MESO="dev"
|
|
17
|
-
fi
|
|
18
|
-
|
|
19
|
-
# Extract the release notes from the changelog
|
|
20
|
-
sed -n "/## \[${VERSION}\]/, /## /{ /##/!p }" docs/changelog.md > notes.md
|
|
21
|
-
|
|
22
|
-
# Add a link to the release notes
|
|
23
|
-
URL="https://${OWNER}.github.io/${SLUG}/${MACRO_MESO}/changelog/#${TAG}"
|
|
24
|
-
echo "See [docs/changelog/#${TAG}](${URL}) for more details." >> notes.md
|
|
25
|
-
|
|
26
|
-
# Remove leading and trailing empty lines
|
|
27
|
-
sed -e :a -e '/./,$!d;/^\n*$/{$d;N;};/\n$/ba' -i notes.md
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
# This workflow assumes that you deploy the documentation from the gh-pages branch.
|
|
2
|
-
|
|
3
|
-
name: mkdocs
|
|
4
|
-
on:
|
|
5
|
-
push:
|
|
6
|
-
branches:
|
|
7
|
-
# Run on the main branch ...
|
|
8
|
-
- main
|
|
9
|
-
tags:
|
|
10
|
-
# ... and on release tags ...
|
|
11
|
-
- 'v*'
|
|
12
|
-
paths:
|
|
13
|
-
# ... and only if relevant files have changed.
|
|
14
|
-
- stepup/**
|
|
15
|
-
- docs/**
|
|
16
|
-
- mkdocs.yaml
|
|
17
|
-
- pyproject.toml
|
|
18
|
-
- .github/workflows/mkdocs.yaml
|
|
19
|
-
pull_request:
|
|
20
|
-
# Run tests on pull requests ...
|
|
21
|
-
paths:
|
|
22
|
-
# ... only if relevant files have changed.
|
|
23
|
-
- stepup/**
|
|
24
|
-
- docs/**
|
|
25
|
-
- mkdocs.yaml
|
|
26
|
-
- pyproject.toml
|
|
27
|
-
- .github/workflows/mkdocs.yaml
|
|
28
|
-
|
|
29
|
-
permissions:
|
|
30
|
-
contents: write
|
|
31
|
-
|
|
32
|
-
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
|
|
33
|
-
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
|
|
34
|
-
concurrency:
|
|
35
|
-
group: pages
|
|
36
|
-
cancel-in-progress: false
|
|
37
|
-
|
|
38
|
-
jobs:
|
|
39
|
-
build:
|
|
40
|
-
runs-on: ubuntu-latest
|
|
41
|
-
steps:
|
|
42
|
-
# Get the source
|
|
43
|
-
- uses: actions/checkout@v4
|
|
44
|
-
- uses: actions/setup-python@v5
|
|
45
|
-
with:
|
|
46
|
-
python-version: 3.x
|
|
47
|
-
|
|
48
|
-
# Prepare the environment for building docs.
|
|
49
|
-
- name: Setup Pages
|
|
50
|
-
id: pages
|
|
51
|
-
uses: actions/configure-pages@v5
|
|
52
|
-
- name: Install development version
|
|
53
|
-
run: pip install -e .[dev]
|
|
54
|
-
|
|
55
|
-
# Update the site using to the gh-pages branch with mike.
|
|
56
|
-
- name: Get the docs branch
|
|
57
|
-
run: git fetch --depth=1 origin gh-pages
|
|
58
|
-
- name: Configure Git user for documentation commit
|
|
59
|
-
run: |
|
|
60
|
-
git config --global user.name 'github-actions[bot]'
|
|
61
|
-
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
|
|
62
|
-
- name: Build mkdocs
|
|
63
|
-
run: mike deploy dev
|
|
64
|
-
- name: Push gh-pages branch with development version of docs
|
|
65
|
-
if: github.ref == 'refs/heads/main'
|
|
66
|
-
run: git push origin gh-pages
|
|
67
|
-
- name: Deploy gh-pages branch with stable version of docs
|
|
68
|
-
if: startsWith(github.ref, 'refs/tags/v')
|
|
69
|
-
run: |
|
|
70
|
-
VERSION="${GITHUB_REF#refs/tags/v}"
|
|
71
|
-
MACRO_MESO=$(echo "${VERSION}" | cut -d. -f1,2)
|
|
72
|
-
mike deploy ${MACRO_MESO} -u stable -p
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
name: pytest
|
|
2
|
-
on:
|
|
3
|
-
push:
|
|
4
|
-
branches:
|
|
5
|
-
# Run tests for change on the main branch ...
|
|
6
|
-
- main
|
|
7
|
-
tags-ignore:
|
|
8
|
-
# ... but not for tags (avoids duplicate work) ...
|
|
9
|
-
- '**'
|
|
10
|
-
paths:
|
|
11
|
-
# ... and only if relevant files have changed.
|
|
12
|
-
- stepup/**
|
|
13
|
-
- tests/**
|
|
14
|
-
- pyproject.toml
|
|
15
|
-
- .github/workflows/pytest.yaml
|
|
16
|
-
pull_request:
|
|
17
|
-
# Run tests on pull requests ...
|
|
18
|
-
paths:
|
|
19
|
-
# ... only if relevant files have changed.
|
|
20
|
-
- stepup/**
|
|
21
|
-
- tests/**
|
|
22
|
-
- pyproject.toml
|
|
23
|
-
- .github/workflows/pytest.yaml
|
|
24
|
-
|
|
25
|
-
jobs:
|
|
26
|
-
tests:
|
|
27
|
-
strategy:
|
|
28
|
-
matrix:
|
|
29
|
-
python-version: ['3.11', '3.13']
|
|
30
|
-
runs-on: ubuntu-latest
|
|
31
|
-
steps:
|
|
32
|
-
- uses: actions/checkout@v4
|
|
33
|
-
- name: Set up Python ${{ matrix.python-version }}
|
|
34
|
-
uses: actions/setup-python@v5
|
|
35
|
-
with:
|
|
36
|
-
python-version: ${{ matrix.python-version }}
|
|
37
|
-
- name: Install oldest versions of supported dependencies
|
|
38
|
-
if: ${{ matrix.python-version == '3.11'}}
|
|
39
|
-
run: pip install -r .github/requirements-old.txt
|
|
40
|
-
- name: Install development version
|
|
41
|
-
run: pip install -e .[dev]
|
|
42
|
-
- name: Run pytest
|
|
43
|
-
# Enfore strict checks instead of trying to repair fixable issues.
|
|
44
|
-
# RPC timeout is set shorter to speed up tests in case of failures.
|
|
45
|
-
run: STEPUP_DEBUG=1 STEPUP_SYNC_RPC_TIMEOUT=10 pytest -vv
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
# This workflow is adapted from:
|
|
2
|
-
# https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
|
|
3
|
-
|
|
4
|
-
name: release
|
|
5
|
-
on:
|
|
6
|
-
push:
|
|
7
|
-
branches:
|
|
8
|
-
- main
|
|
9
|
-
tags:
|
|
10
|
-
- 'v*'
|
|
11
|
-
|
|
12
|
-
env:
|
|
13
|
-
# This is not critical
|
|
14
|
-
# It is used only for showing URLs in GitHub Actions web interface.
|
|
15
|
-
PYPI_NAME: stepup-queue
|
|
16
|
-
TITLE: StepUp Queue
|
|
17
|
-
|
|
18
|
-
jobs:
|
|
19
|
-
build:
|
|
20
|
-
name: Build distribution
|
|
21
|
-
runs-on: ubuntu-latest
|
|
22
|
-
|
|
23
|
-
steps:
|
|
24
|
-
- uses: actions/checkout@v4
|
|
25
|
-
with:
|
|
26
|
-
fetch-depth: 0
|
|
27
|
-
- name: Set up Python
|
|
28
|
-
uses: actions/setup-python@v5
|
|
29
|
-
with:
|
|
30
|
-
python-version: '3.11'
|
|
31
|
-
- name: Install pypa/build
|
|
32
|
-
run: >-
|
|
33
|
-
python -m pip install build
|
|
34
|
-
- name: Build package
|
|
35
|
-
run: >-
|
|
36
|
-
python -m build
|
|
37
|
-
- name: Store the distribution packages
|
|
38
|
-
uses: actions/upload-artifact@v4
|
|
39
|
-
with:
|
|
40
|
-
name: python-package-distributions
|
|
41
|
-
path: dist/
|
|
42
|
-
- name: Run release notes script
|
|
43
|
-
run: >-
|
|
44
|
-
.github/scripts/extract-notes.sh
|
|
45
|
-
'${{ github.repository }}'
|
|
46
|
-
'${{ github.ref }}'
|
|
47
|
-
- name: Store the release notes
|
|
48
|
-
uses: actions/upload-artifact@v4
|
|
49
|
-
with:
|
|
50
|
-
name: release-notes
|
|
51
|
-
path: notes.md
|
|
52
|
-
|
|
53
|
-
publish-to-pypi:
|
|
54
|
-
name: Publish Python distribution to PyPI
|
|
55
|
-
if: startsWith(github.ref, 'refs/tags/v') # only publish to PyPI on tag pushes
|
|
56
|
-
needs:
|
|
57
|
-
- build
|
|
58
|
-
runs-on: ubuntu-latest
|
|
59
|
-
environment:
|
|
60
|
-
name: pypi
|
|
61
|
-
url: https://pypi.org/p/${{ env.PYPI_NAME }}
|
|
62
|
-
permissions:
|
|
63
|
-
id-token: write
|
|
64
|
-
|
|
65
|
-
steps:
|
|
66
|
-
- name: Download all the dists
|
|
67
|
-
uses: actions/download-artifact@v4
|
|
68
|
-
with:
|
|
69
|
-
name: python-package-distributions
|
|
70
|
-
path: dist/
|
|
71
|
-
- name: Publish distribution to PyPI
|
|
72
|
-
uses: pypa/gh-action-pypi-publish@release/v1
|
|
73
|
-
|
|
74
|
-
github-release:
|
|
75
|
-
name: >-
|
|
76
|
-
Sign the Python distribution with Sigstore
|
|
77
|
-
and upload them to GitHub Release
|
|
78
|
-
needs:
|
|
79
|
-
- publish-to-pypi
|
|
80
|
-
runs-on: ubuntu-latest
|
|
81
|
-
|
|
82
|
-
permissions:
|
|
83
|
-
contents: write
|
|
84
|
-
id-token: write
|
|
85
|
-
|
|
86
|
-
steps:
|
|
87
|
-
- name: Download all the dists
|
|
88
|
-
uses: actions/download-artifact@v4
|
|
89
|
-
with:
|
|
90
|
-
name: python-package-distributions
|
|
91
|
-
path: dist/
|
|
92
|
-
- name: Download the release notes
|
|
93
|
-
uses: actions/download-artifact@v4
|
|
94
|
-
with:
|
|
95
|
-
name: release-notes
|
|
96
|
-
- name: Sign the dists with Sigstore
|
|
97
|
-
uses: sigstore/gh-action-sigstore-python@v3.0.0
|
|
98
|
-
with:
|
|
99
|
-
inputs: >-
|
|
100
|
-
./dist/*.tar.gz
|
|
101
|
-
./dist/*.whl
|
|
102
|
-
- name: Create GitHub Release
|
|
103
|
-
env:
|
|
104
|
-
GITHUB_TOKEN: ${{ github.token }}
|
|
105
|
-
run: >-
|
|
106
|
-
gh release create '${{ github.ref_name }}'
|
|
107
|
-
--repo '${{ github.repository }}'
|
|
108
|
-
--title '${{ env.TITLE }} ${{ github.ref_name }}'
|
|
109
|
-
--notes-file notes.md
|
|
110
|
-
- name: Upload artifact signatures to GitHub Release
|
|
111
|
-
env:
|
|
112
|
-
GITHUB_TOKEN: ${{ github.token }}
|
|
113
|
-
# Upload to GitHub Release using the `gh` CLI.
|
|
114
|
-
# `dist/` contains the built packages, and the
|
|
115
|
-
# sigstore-produced signatures and certificates.
|
|
116
|
-
run: >-
|
|
117
|
-
gh release upload
|
|
118
|
-
'${{ github.ref_name }}'
|
|
119
|
-
dist/**
|
|
120
|
-
--repo '${{ github.repository }}'
|
|
121
|
-
|
|
122
|
-
publish-to-testpypi:
|
|
123
|
-
name: Publish Python distribution to TestPyPI
|
|
124
|
-
if: ${{ github.ref == 'refs/heads/main' && github.repository_owner == 'reproducible-reporting'}}
|
|
125
|
-
needs:
|
|
126
|
-
- build
|
|
127
|
-
runs-on: ubuntu-latest
|
|
128
|
-
|
|
129
|
-
environment:
|
|
130
|
-
name: testpypi
|
|
131
|
-
url: https://test.pypi.org/p/${{ env.PYPI_NAME }}
|
|
132
|
-
|
|
133
|
-
permissions:
|
|
134
|
-
id-token: write
|
|
135
|
-
|
|
136
|
-
steps:
|
|
137
|
-
- name: Download all the dists
|
|
138
|
-
uses: actions/download-artifact@v4
|
|
139
|
-
with:
|
|
140
|
-
name: python-package-distributions
|
|
141
|
-
path: dist/
|
|
142
|
-
- name: Publish distribution to TestPyPI
|
|
143
|
-
uses: pypa/gh-action-pypi-publish@release/v1
|
|
144
|
-
with:
|
|
145
|
-
repository-url: https://test.pypi.org/legacy/
|
stepup_queue-1.0.4/.gitignore
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
# Local dev environment
|
|
2
|
-
.envrc
|
|
3
|
-
.idea
|
|
4
|
-
.local
|
|
5
|
-
tmp
|
|
6
|
-
site/
|
|
7
|
-
venv/
|
|
8
|
-
.venv/
|
|
9
|
-
.ruff_cache
|
|
10
|
-
.pytest_cache
|
|
11
|
-
notes.md
|
|
12
|
-
|
|
13
|
-
# Python and packaging
|
|
14
|
-
__pycache__
|
|
15
|
-
*.egg-info
|
|
16
|
-
dist
|
|
17
|
-
build
|
|
18
|
-
_version.py
|
|
19
|
-
|
|
20
|
-
# StepUp specifics
|
|
21
|
-
docs/.stepup
|
|
22
|
-
|
|
23
|
-
# Temporary files
|
|
24
|
-
*.swp
|
|
25
|
-
|
|
26
|
-
# NodeJS (for markdownlint)
|
|
27
|
-
node_modules/
|
|
28
|
-
package-lock.json
|
|
29
|
-
package.json
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
repos:
|
|
2
|
-
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
3
|
-
rev: v5.0.0
|
|
4
|
-
hooks:
|
|
5
|
-
- id: check-added-large-files
|
|
6
|
-
- id: check-ast
|
|
7
|
-
- id: check-case-conflict
|
|
8
|
-
- id: check-executables-have-shebangs
|
|
9
|
-
- id: check-json
|
|
10
|
-
- id: check-merge-conflict
|
|
11
|
-
- id: check-symlinks
|
|
12
|
-
- id: check-toml
|
|
13
|
-
- id: check-vcs-permalinks
|
|
14
|
-
- id: debug-statements
|
|
15
|
-
- id: detect-private-key
|
|
16
|
-
- id: destroyed-symlinks
|
|
17
|
-
- id: end-of-file-fixer
|
|
18
|
-
- id: fix-byte-order-marker
|
|
19
|
-
- id: mixed-line-ending
|
|
20
|
-
- id: pretty-format-json
|
|
21
|
-
args: ["--autofix", "--no-sort-keys"]
|
|
22
|
-
- id: trailing-whitespace
|
|
23
|
-
- repo: https://github.com/Lucas-C/pre-commit-hooks
|
|
24
|
-
rev: v1.5.5
|
|
25
|
-
hooks:
|
|
26
|
-
- id: remove-crlf
|
|
27
|
-
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
28
|
-
rev: v0.8.4
|
|
29
|
-
hooks:
|
|
30
|
-
- id: ruff-format
|
|
31
|
-
exclude: "^docs/examples/slurm-basic/pass/slurmjob.py$"
|
|
32
|
-
- id: ruff
|
|
33
|
-
args: ["--fix", "--show-fixes"]
|
|
34
|
-
- repo: https://github.com/DavidAnson/markdownlint-cli2
|
|
35
|
-
rev: v0.17.2
|
|
36
|
-
hooks:
|
|
37
|
-
- id: markdownlint-cli2
|
|
38
|
-
require_serial: true
|
|
39
|
-
- repo: https://github.com/python-jsonschema/check-jsonschema
|
|
40
|
-
rev: 0.30.0
|
|
41
|
-
hooks:
|
|
42
|
-
- id: check-github-workflows
|