stepup-queue 1.0.0__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.0/.editorconfig +18 -0
- stepup_queue-1.0.0/.github/requirements-old.txt +2 -0
- stepup_queue-1.0.0/.github/scripts/extract-notes.sh +27 -0
- stepup_queue-1.0.0/.github/workflows/mkdocs.yaml +72 -0
- stepup_queue-1.0.0/.github/workflows/pytest.yaml +45 -0
- stepup_queue-1.0.0/.github/workflows/release.yaml +145 -0
- stepup_queue-1.0.0/.gitignore +29 -0
- stepup_queue-1.0.0/.markdownlint-cli2.jsonc +15 -0
- stepup_queue-1.0.0/.pre-commit-config.yaml +41 -0
- stepup_queue-1.0.0/LICENSE +674 -0
- stepup_queue-1.0.0/PKG-INFO +52 -0
- stepup_queue-1.0.0/README.md +16 -0
- stepup_queue-1.0.0/docs/changelog.md +27 -0
- stepup_queue-1.0.0/docs/development.md +85 -0
- stepup_queue-1.0.0/docs/examples/slurm/.gitignore +5 -0
- stepup_queue-1.0.0/docs/examples/slurm/dynamic-template.sh +7 -0
- stepup_queue-1.0.0/docs/examples/slurm/plan.py +15 -0
- stepup_queue-1.0.0/docs/examples/slurm/static/slurmjob.sh +7 -0
- stepup_queue-1.0.0/docs/index.md +7 -0
- stepup_queue-1.0.0/docs/installation.md +20 -0
- stepup_queue-1.0.0/docs/license.md +21 -0
- stepup_queue-1.0.0/docs/usage.md +87 -0
- stepup_queue-1.0.0/mkdocs.yaml +100 -0
- stepup_queue-1.0.0/overrides/main.html +8 -0
- stepup_queue-1.0.0/pyproject.toml +94 -0
- stepup_queue-1.0.0/setup.cfg +4 -0
- stepup_queue-1.0.0/stepup/queue/__init__.py +20 -0
- stepup_queue-1.0.0/stepup/queue/actions.py +31 -0
- stepup_queue-1.0.0/stepup/queue/api.py +69 -0
- stepup_queue-1.0.0/stepup/queue/canceljobs.py +73 -0
- stepup_queue-1.0.0/stepup/queue/sbatch.py +336 -0
- stepup_queue-1.0.0/stepup_queue.egg-info/PKG-INFO +52 -0
- stepup_queue-1.0.0/stepup_queue.egg-info/SOURCES.txt +37 -0
- stepup_queue-1.0.0/stepup_queue.egg-info/dependency_links.txt +1 -0
- stepup_queue-1.0.0/stepup_queue.egg-info/entry_points.txt +5 -0
- stepup_queue-1.0.0/stepup_queue.egg-info/requires.txt +12 -0
- stepup_queue-1.0.0/stepup_queue.egg-info/top_level.txt +1 -0
- stepup_queue-1.0.0/tests/conftest.py +28 -0
- stepup_queue-1.0.0/tests/test_sbatch.py +85 -0
|
@@ -0,0 +1,18 @@
|
|
|
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
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
|
@@ -0,0 +1,72 @@
|
|
|
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
|
|
@@ -0,0 +1,45 @@
|
|
|
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
|
|
@@ -0,0 +1,145 @@
|
|
|
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/
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
|
@@ -0,0 +1,41 @@
|
|
|
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
|
+
- id: ruff
|
|
32
|
+
args: ["--fix", "--show-fixes"]
|
|
33
|
+
- repo: https://github.com/DavidAnson/markdownlint-cli2
|
|
34
|
+
rev: v0.17.2
|
|
35
|
+
hooks:
|
|
36
|
+
- id: markdownlint-cli2
|
|
37
|
+
require_serial: true
|
|
38
|
+
- repo: https://github.com/python-jsonschema/check-jsonschema
|
|
39
|
+
rev: 0.30.0
|
|
40
|
+
hooks:
|
|
41
|
+
- id: check-github-workflows
|