skcoord 0.0.1__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.
- skcoord-0.0.1/.github/workflows/ci.yml +67 -0
- skcoord-0.0.1/.github/workflows/publish.yml +131 -0
- skcoord-0.0.1/.gitignore +22 -0
- skcoord-0.0.1/LICENSE +674 -0
- skcoord-0.0.1/PKG-INFO +61 -0
- skcoord-0.0.1/README.md +37 -0
- skcoord-0.0.1/pyproject.toml +62 -0
- skcoord-0.0.1/setup.cfg +4 -0
- skcoord-0.0.1/src/skcoord/__init__.py +63 -0
- skcoord-0.0.1/src/skcoord/agent_card.py +326 -0
- skcoord-0.0.1/src/skcoord/atomic_io.py +54 -0
- skcoord-0.0.1/src/skcoord/card.py +659 -0
- skcoord-0.0.1/src/skcoord/card_store.py +894 -0
- skcoord-0.0.1/src/skcoord/cmdb.py +359 -0
- skcoord-0.0.1/src/skcoord/coordination.py +1129 -0
- skcoord-0.0.1/src/skcoord/itil.py +1892 -0
- skcoord-0.0.1/src/skcoord.egg-info/PKG-INFO +61 -0
- skcoord-0.0.1/src/skcoord.egg-info/SOURCES.txt +23 -0
- skcoord-0.0.1/src/skcoord.egg-info/dependency_links.txt +1 -0
- skcoord-0.0.1/src/skcoord.egg-info/requires.txt +1 -0
- skcoord-0.0.1/src/skcoord.egg-info/scm_file_list.json +20 -0
- skcoord-0.0.1/src/skcoord.egg-info/scm_version.json +8 -0
- skcoord-0.0.1/src/skcoord.egg-info/top_level.txt +1 -0
- skcoord-0.0.1/tests/test_smoke.py +56 -0
- skcoord-0.0.1/tests/test_staged_lane.py +38 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [master, main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [master, main]
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
# Consistent SKWorld CI pattern (CR-4.6): lint (blocking, this repo is clean) +
|
|
13
|
+
# test (clean targeted venv) + build. Companion publish.yml handles tagged releases.
|
|
14
|
+
jobs:
|
|
15
|
+
lint:
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
with:
|
|
20
|
+
# setuptools-scm derives the version from the git tag, so a
|
|
21
|
+
# shallow checkout would yield a placeholder like 0.1.dev1 and
|
|
22
|
+
# break dependency resolution against pinned siblings.
|
|
23
|
+
fetch-depth: 0
|
|
24
|
+
fetch-tags: true
|
|
25
|
+
- uses: actions/setup-python@v5
|
|
26
|
+
with:
|
|
27
|
+
python-version: "3.12"
|
|
28
|
+
- run: pip install ruff
|
|
29
|
+
- run: ruff check src/ tests/
|
|
30
|
+
|
|
31
|
+
test:
|
|
32
|
+
runs-on: ubuntu-latest
|
|
33
|
+
strategy:
|
|
34
|
+
matrix:
|
|
35
|
+
python-version: ["3.10", "3.12"]
|
|
36
|
+
steps:
|
|
37
|
+
- uses: actions/checkout@v4
|
|
38
|
+
with:
|
|
39
|
+
# setuptools-scm derives the version from the git tag, so a
|
|
40
|
+
# shallow checkout would yield a placeholder like 0.1.dev1 and
|
|
41
|
+
# break dependency resolution against pinned siblings.
|
|
42
|
+
fetch-depth: 0
|
|
43
|
+
fetch-tags: true
|
|
44
|
+
- uses: actions/setup-python@v5
|
|
45
|
+
with:
|
|
46
|
+
python-version: ${{ matrix.python-version }}
|
|
47
|
+
- name: Install in a clean venv
|
|
48
|
+
run: pip install -e . pytest
|
|
49
|
+
- name: Test
|
|
50
|
+
run: python -m pytest tests/ -q
|
|
51
|
+
|
|
52
|
+
build:
|
|
53
|
+
runs-on: ubuntu-latest
|
|
54
|
+
steps:
|
|
55
|
+
- uses: actions/checkout@v4
|
|
56
|
+
with:
|
|
57
|
+
# setuptools-scm derives the version from the git tag, so a
|
|
58
|
+
# shallow checkout would yield a placeholder like 0.1.dev1 and
|
|
59
|
+
# break dependency resolution against pinned siblings.
|
|
60
|
+
fetch-depth: 0
|
|
61
|
+
fetch-tags: true
|
|
62
|
+
- uses: actions/setup-python@v5
|
|
63
|
+
with:
|
|
64
|
+
python-version: "3.12"
|
|
65
|
+
- run: pip install build twine
|
|
66
|
+
- run: python -m build
|
|
67
|
+
- run: python -m twine check dist/*
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: ["main"]
|
|
6
|
+
tags: ["v*"]
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
# Trusted Publishing (OIDC) — configure a PyPI pending publisher for this project:
|
|
13
|
+
# owner=smilinTux workflow=publish.yml environment=pypi
|
|
14
|
+
# No PyPI token is used. A tagged release only needs to build + pass twine check.
|
|
15
|
+
concurrency:
|
|
16
|
+
# Never let two releases race: a second push to main waits rather than
|
|
17
|
+
# computing the same "next" tag from a stale view of the tag list.
|
|
18
|
+
group: publish-${{ github.ref }}
|
|
19
|
+
cancel-in-progress: false
|
|
20
|
+
|
|
21
|
+
jobs:
|
|
22
|
+
# ---------------------------------------------------------------------- #
|
|
23
|
+
# Cut the release tag. Only on a push to main; skipped on a tag push.
|
|
24
|
+
# ---------------------------------------------------------------------- #
|
|
25
|
+
tag:
|
|
26
|
+
if: github.ref == 'refs/heads/main'
|
|
27
|
+
runs-on: ubuntu-latest
|
|
28
|
+
permissions:
|
|
29
|
+
contents: write
|
|
30
|
+
outputs:
|
|
31
|
+
tagged: ${{ steps.bump.outputs.tagged }}
|
|
32
|
+
steps:
|
|
33
|
+
- uses: actions/checkout@v4
|
|
34
|
+
with:
|
|
35
|
+
# Full history + tags, or `git describe` cannot see the latest tag and
|
|
36
|
+
# every run would compute v0.0.1.
|
|
37
|
+
fetch-depth: 0
|
|
38
|
+
fetch-tags: true
|
|
39
|
+
- id: bump
|
|
40
|
+
name: Cut the next patch tag if HEAD is not already tagged
|
|
41
|
+
run: |
|
|
42
|
+
set -euo pipefail
|
|
43
|
+
git config user.name "github-actions[bot]"
|
|
44
|
+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
45
|
+
|
|
46
|
+
latest="$(git describe --tags --abbrev=0 --match 'v[0-9]*' 2>/dev/null || echo '')"
|
|
47
|
+
head_sha="$(git rev-parse HEAD)"
|
|
48
|
+
|
|
49
|
+
if [ -n "$latest" ] && [ "$(git rev-list -n1 "$latest")" = "$head_sha" ]; then
|
|
50
|
+
echo "HEAD is already $latest; nothing to release."
|
|
51
|
+
echo "tagged=false" >> "$GITHUB_OUTPUT"
|
|
52
|
+
exit 0
|
|
53
|
+
fi
|
|
54
|
+
|
|
55
|
+
base="${latest:-v0.0.0}"
|
|
56
|
+
ver="${base#v}"
|
|
57
|
+
IFS='.' read -r major minor patch <<< "$ver"
|
|
58
|
+
major="${major:-0}"; minor="${minor:-0}"; patch="${patch:-0}"
|
|
59
|
+
next="v${major}.${minor}.$((patch + 1))"
|
|
60
|
+
while git rev-parse -q --verify "refs/tags/$next" >/dev/null 2>&1; do
|
|
61
|
+
patch=$((patch + 1))
|
|
62
|
+
next="v${major}.${minor}.$((patch + 1))"
|
|
63
|
+
done
|
|
64
|
+
|
|
65
|
+
echo "Cutting $next at ${head_sha:0:8} (previous: ${latest:-none})"
|
|
66
|
+
git tag -a "$next" -m "release: $next from main"
|
|
67
|
+
git push origin "$next"
|
|
68
|
+
echo "tagged=true" >> "$GITHUB_OUTPUT"
|
|
69
|
+
|
|
70
|
+
build:
|
|
71
|
+
needs: [tag]
|
|
72
|
+
# `always()` is required because `needs` on a SKIPPED job would otherwise
|
|
73
|
+
# skip this one on the tag-push path.
|
|
74
|
+
if: >-
|
|
75
|
+
always() && !cancelled() &&
|
|
76
|
+
(needs.tag.result == 'skipped' || needs.tag.outputs.tagged == 'true')
|
|
77
|
+
runs-on: ubuntu-latest
|
|
78
|
+
steps:
|
|
79
|
+
- uses: actions/checkout@v4
|
|
80
|
+
with:
|
|
81
|
+
# setuptools-scm derives the version from the tag, so the tag the job
|
|
82
|
+
# above just pushed must be visible here or the build would produce a
|
|
83
|
+
# dev version with a local segment (+g<sha>), which PyPI rejects.
|
|
84
|
+
fetch-depth: 0
|
|
85
|
+
fetch-tags: true
|
|
86
|
+
- name: Refuse to publish a tag that is not on main
|
|
87
|
+
# The local pre-push hook is a symlink into each clone's working tree, so
|
|
88
|
+
# a clone that has not pulled the main-only fix keeps cutting tags at
|
|
89
|
+
# feature-branch tips and pushing them. This is the server-side backstop:
|
|
90
|
+
# it holds no matter what any developer's clone does.
|
|
91
|
+
#
|
|
92
|
+
# Override with the ALLOW_OFF_MAIN_RELEASE repository variable if a
|
|
93
|
+
# release ever legitimately needs to come off a maintenance branch.
|
|
94
|
+
if: startsWith(github.ref, 'refs/tags/')
|
|
95
|
+
run: |
|
|
96
|
+
set -euo pipefail
|
|
97
|
+
if [ "${{ vars.ALLOW_OFF_MAIN_RELEASE }}" = "1" ]; then
|
|
98
|
+
echo "ALLOW_OFF_MAIN_RELEASE=1 is set; skipping the on-main check."
|
|
99
|
+
exit 0
|
|
100
|
+
fi
|
|
101
|
+
git fetch --no-tags origin main:refs/remotes/origin/main
|
|
102
|
+
if git merge-base --is-ancestor "$GITHUB_SHA" refs/remotes/origin/main; then
|
|
103
|
+
echo "OK: ${GITHUB_REF_NAME} (${GITHUB_SHA:0:8}) is on main."
|
|
104
|
+
exit 0
|
|
105
|
+
fi
|
|
106
|
+
echo "::error::${GITHUB_REF_NAME} points at ${GITHUB_SHA:0:8}, which is NOT on main. Refusing to publish."
|
|
107
|
+
echo "::error::A tag cut off a feature branch must not become a release. Delete the tag, merge to main, and let the main push cut the release."
|
|
108
|
+
exit 1
|
|
109
|
+
- uses: actions/setup-python@v5
|
|
110
|
+
with:
|
|
111
|
+
python-version: "3.12"
|
|
112
|
+
- run: python -m pip install --upgrade build twine
|
|
113
|
+
- run: python -m build
|
|
114
|
+
- run: python -m twine check dist/*
|
|
115
|
+
- uses: actions/upload-artifact@v4
|
|
116
|
+
with:
|
|
117
|
+
name: dist
|
|
118
|
+
path: dist/
|
|
119
|
+
|
|
120
|
+
pypi-publish:
|
|
121
|
+
needs: build
|
|
122
|
+
runs-on: ubuntu-latest
|
|
123
|
+
environment: pypi
|
|
124
|
+
permissions:
|
|
125
|
+
id-token: write
|
|
126
|
+
steps:
|
|
127
|
+
- uses: actions/download-artifact@v4
|
|
128
|
+
with:
|
|
129
|
+
name: dist
|
|
130
|
+
path: dist/
|
|
131
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
skcoord-0.0.1/.gitignore
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
__pycache__/
|
|
2
|
+
*.pyc
|
|
3
|
+
*.pyo
|
|
4
|
+
*.egg-info/
|
|
5
|
+
dist/
|
|
6
|
+
build/
|
|
7
|
+
.eggs/
|
|
8
|
+
*.egg
|
|
9
|
+
.venv/
|
|
10
|
+
.env
|
|
11
|
+
.pytest_cache/
|
|
12
|
+
.mypy_cache/
|
|
13
|
+
.ruff_cache/
|
|
14
|
+
.coverage
|
|
15
|
+
htmlcov/
|
|
16
|
+
~/
|
|
17
|
+
|
|
18
|
+
.stfolder
|
|
19
|
+
.stignore
|
|
20
|
+
# but DO ship the bundled Syncthing ignore templates under defaults/
|
|
21
|
+
!src/skcapstone/defaults/.stignore
|
|
22
|
+
!src/skcapstone/defaults/**/.stignore
|