blackboardx 0.2.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.
- blackboardx-0.2.0/.editorconfig +15 -0
- blackboardx-0.2.0/.gitattributes +3 -0
- blackboardx-0.2.0/.github/ISSUE_TEMPLATE/bug.yml +39 -0
- blackboardx-0.2.0/.github/ISSUE_TEMPLATE/config.yml +1 -0
- blackboardx-0.2.0/.github/ISSUE_TEMPLATE/feature.yml +18 -0
- blackboardx-0.2.0/.github/PULL_REQUEST_TEMPLATE.md +17 -0
- blackboardx-0.2.0/.github/dependabot.yml +10 -0
- blackboardx-0.2.0/.github/workflows/ci.yml +51 -0
- blackboardx-0.2.0/.github/workflows/publish.yml +25 -0
- blackboardx-0.2.0/.github/workflows/release-please.yml +22 -0
- blackboardx-0.2.0/.github/workflows/title-lint.yml +28 -0
- blackboardx-0.2.0/.gitignore +43 -0
- blackboardx-0.2.0/.pre-commit-config.yaml +22 -0
- blackboardx-0.2.0/.release-please-manifest.json +3 -0
- blackboardx-0.2.0/CHANGELOG.md +21 -0
- blackboardx-0.2.0/CONTRIBUTING.md +62 -0
- blackboardx-0.2.0/LICENSE +202 -0
- blackboardx-0.2.0/Makefile +15 -0
- blackboardx-0.2.0/PKG-INFO +116 -0
- blackboardx-0.2.0/README.md +97 -0
- blackboardx-0.2.0/docs/adr/0001-scope.md +38 -0
- blackboardx-0.2.0/docs/adr/0002-control-component-design.md +55 -0
- blackboardx-0.2.0/docs/adr/0003-delivery-and-stale-timers.md +28 -0
- blackboardx-0.2.0/docs/adr/0004-distribution-name.md +26 -0
- blackboardx-0.2.0/docs/adr/0005-publishing.md +31 -0
- blackboardx-0.2.0/pyproject.toml +62 -0
- blackboardx-0.2.0/release-please-config.json +12 -0
- blackboardx-0.2.0/src/blackboard/__init__.py +128 -0
- blackboardx-0.2.0/src/blackboard/_board.py +215 -0
- blackboardx-0.2.0/src/blackboard/_clock.py +107 -0
- blackboardx-0.2.0/src/blackboard/_control.py +1018 -0
- blackboardx-0.2.0/src/blackboard/_model.py +78 -0
- blackboardx-0.2.0/src/blackboard/py.typed +0 -0
- blackboardx-0.2.0/tests/test_board.py +283 -0
- blackboardx-0.2.0/tests/test_clock.py +107 -0
- blackboardx-0.2.0/tests/test_completion.py +458 -0
- blackboardx-0.2.0/tests/test_control.py +259 -0
- blackboardx-0.2.0/tests/test_model.py +361 -0
- blackboardx-0.2.0/tests/test_notification.py +514 -0
- blackboardx-0.2.0/tests/test_public_api.py +13 -0
- blackboardx-0.2.0/uv.lock +1044 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
name: Bug report
|
|
2
|
+
description: Behavior that disagrees with the documentation or the specification
|
|
3
|
+
labels: ["type:fix"]
|
|
4
|
+
body:
|
|
5
|
+
- type: input
|
|
6
|
+
id: version
|
|
7
|
+
attributes:
|
|
8
|
+
label: blackboardx version
|
|
9
|
+
description: The installed version, from `pip show blackboardx`
|
|
10
|
+
validations:
|
|
11
|
+
required: true
|
|
12
|
+
- type: input
|
|
13
|
+
id: python
|
|
14
|
+
attributes:
|
|
15
|
+
label: Python version
|
|
16
|
+
validations:
|
|
17
|
+
required: true
|
|
18
|
+
- type: textarea
|
|
19
|
+
id: reproduction
|
|
20
|
+
attributes:
|
|
21
|
+
label: Reproduction
|
|
22
|
+
description: The smallest code that shows the behavior
|
|
23
|
+
render: python
|
|
24
|
+
validations:
|
|
25
|
+
required: true
|
|
26
|
+
- type: textarea
|
|
27
|
+
id: expected
|
|
28
|
+
attributes:
|
|
29
|
+
label: Expected behavior
|
|
30
|
+
description: What the documentation says happens
|
|
31
|
+
validations:
|
|
32
|
+
required: true
|
|
33
|
+
- type: textarea
|
|
34
|
+
id: actual
|
|
35
|
+
attributes:
|
|
36
|
+
label: Actual behavior
|
|
37
|
+
description: What happens instead, with the full traceback where one exists
|
|
38
|
+
validations:
|
|
39
|
+
required: true
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
blank_issues_enabled: false
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
name: Feature request
|
|
2
|
+
description: A capability the library lacks
|
|
3
|
+
labels: ["type:feat"]
|
|
4
|
+
body:
|
|
5
|
+
- type: textarea
|
|
6
|
+
id: problem
|
|
7
|
+
attributes:
|
|
8
|
+
label: Problem
|
|
9
|
+
description: What you are trying to do and what stops you
|
|
10
|
+
validations:
|
|
11
|
+
required: true
|
|
12
|
+
- type: textarea
|
|
13
|
+
id: surface
|
|
14
|
+
attributes:
|
|
15
|
+
label: Proposed surface
|
|
16
|
+
description: The names and calls you would expect to use, where you have a shape in mind
|
|
17
|
+
validations:
|
|
18
|
+
required: false
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<!-- The title is a Conventional Commit subject. It becomes the squashed commit on main and the release note. -->
|
|
2
|
+
|
|
3
|
+
## Change
|
|
4
|
+
|
|
5
|
+
<!-- What changes, for a reader deciding whether it affects them. -->
|
|
6
|
+
|
|
7
|
+
Closes #
|
|
8
|
+
|
|
9
|
+
## Checklist
|
|
10
|
+
|
|
11
|
+
- [ ] A test that failed before the change covers each behavior change.
|
|
12
|
+
- [ ] Documentation affected by the change is updated in this pull request.
|
|
13
|
+
- [ ] Each new direct dependency is justified below, and the lockfile is updated in this pull request.
|
|
14
|
+
|
|
15
|
+
## Dependency justification
|
|
16
|
+
|
|
17
|
+
<!-- Delete this section when the change adds no direct dependency. State what the dependency does, and why the standard library or an existing dependency does not serve. -->
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
name: ci
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches: [main]
|
|
6
|
+
push:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
pre-commit:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
17
|
+
- uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
|
|
18
|
+
with:
|
|
19
|
+
python-version: "3.11"
|
|
20
|
+
- uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
|
21
|
+
with:
|
|
22
|
+
path: ~/.cache/pre-commit
|
|
23
|
+
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
|
|
24
|
+
- run: make setup
|
|
25
|
+
- run: uv run pre-commit run --all-files --show-diff-on-failure
|
|
26
|
+
|
|
27
|
+
audit:
|
|
28
|
+
runs-on: ubuntu-latest
|
|
29
|
+
steps:
|
|
30
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
31
|
+
- uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
|
|
32
|
+
with:
|
|
33
|
+
python-version: "3.11"
|
|
34
|
+
- run: uv export --frozen --no-emit-project --format requirements-txt -o requirements-audit.txt
|
|
35
|
+
- run: uv run --frozen pip-audit --strict -r requirements-audit.txt
|
|
36
|
+
|
|
37
|
+
test:
|
|
38
|
+
runs-on: ubuntu-latest
|
|
39
|
+
strategy:
|
|
40
|
+
fail-fast: false
|
|
41
|
+
matrix:
|
|
42
|
+
python-version: ["3.11", "3.12", "3.13", "3.14"]
|
|
43
|
+
steps:
|
|
44
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
45
|
+
- uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
|
|
46
|
+
with:
|
|
47
|
+
python-version: ${{ matrix.python-version }}
|
|
48
|
+
- run: make setup
|
|
49
|
+
- run: make lint
|
|
50
|
+
- run: make typecheck
|
|
51
|
+
- run: make test
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
name: publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
publish:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
environment: pypi
|
|
14
|
+
permissions:
|
|
15
|
+
contents: read
|
|
16
|
+
# Trusted publishing exchanges this OIDC token for a short-lived PyPI
|
|
17
|
+
# credential; no long-lived secret exists in the repository.
|
|
18
|
+
id-token: write
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
21
|
+
- uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
|
|
22
|
+
- name: check the tag names the packaged version
|
|
23
|
+
run: test "v$(uv version --short)" = "$GITHUB_REF_NAME"
|
|
24
|
+
- run: uv build
|
|
25
|
+
- uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
name: release-please
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: write
|
|
9
|
+
pull-requests: write
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
release-please:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
steps:
|
|
15
|
+
- uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5.0.0
|
|
16
|
+
with:
|
|
17
|
+
# A pull request opened with the default GITHUB_TOKEN triggers no CI runs.
|
|
18
|
+
# Adding a RELEASE_PLEASE_TOKEN repository secret (a fine-grained PAT with
|
|
19
|
+
# contents and pull-requests write) restores CI on release pull requests.
|
|
20
|
+
token: ${{ secrets.RELEASE_PLEASE_TOKEN || github.token }}
|
|
21
|
+
config-file: release-please-config.json
|
|
22
|
+
manifest-file: .release-please-manifest.json
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
name: title-lint
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
types: [opened, edited, synchronize, reopened]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
pull-requests: read
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
title-lint:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6.1.1
|
|
15
|
+
env:
|
|
16
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
17
|
+
with:
|
|
18
|
+
types: |
|
|
19
|
+
feat
|
|
20
|
+
fix
|
|
21
|
+
docs
|
|
22
|
+
test
|
|
23
|
+
chore
|
|
24
|
+
refactor
|
|
25
|
+
ci
|
|
26
|
+
build
|
|
27
|
+
perf
|
|
28
|
+
revert
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Instruction, specification, and standard documents. Local to the working copy, never committed.
|
|
2
|
+
CLAUDE.md
|
|
3
|
+
shared-solution-model.md
|
|
4
|
+
CODING_STANDARD.MD
|
|
5
|
+
WRITING-LOGIC-STANDARD.MD
|
|
6
|
+
WRITING-STYLE-STANDARD.MD
|
|
7
|
+
Concept/
|
|
8
|
+
Use Case/
|
|
9
|
+
|
|
10
|
+
# Agent and editor local state
|
|
11
|
+
.claude/
|
|
12
|
+
.cursor/
|
|
13
|
+
.idea/
|
|
14
|
+
.vscode/
|
|
15
|
+
|
|
16
|
+
# Python bytecode and build output
|
|
17
|
+
__pycache__/
|
|
18
|
+
*.py[cod]
|
|
19
|
+
*$py.class
|
|
20
|
+
build/
|
|
21
|
+
dist/
|
|
22
|
+
*.egg-info/
|
|
23
|
+
.eggs/
|
|
24
|
+
|
|
25
|
+
# Environments
|
|
26
|
+
.venv/
|
|
27
|
+
venv/
|
|
28
|
+
.env
|
|
29
|
+
.env.*
|
|
30
|
+
|
|
31
|
+
# Tooling caches
|
|
32
|
+
.pytest_cache/
|
|
33
|
+
.mypy_cache/
|
|
34
|
+
.ruff_cache/
|
|
35
|
+
.coverage
|
|
36
|
+
.coverage.*
|
|
37
|
+
htmlcov/
|
|
38
|
+
coverage.xml
|
|
39
|
+
.tox/
|
|
40
|
+
.nox/
|
|
41
|
+
|
|
42
|
+
# OS
|
|
43
|
+
.DS_Store
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: local
|
|
3
|
+
hooks:
|
|
4
|
+
- id: ruff-format
|
|
5
|
+
name: ruff format
|
|
6
|
+
entry: uv run ruff format --check .
|
|
7
|
+
language: system
|
|
8
|
+
pass_filenames: false
|
|
9
|
+
- id: ruff-check
|
|
10
|
+
name: ruff check
|
|
11
|
+
entry: uv run ruff check .
|
|
12
|
+
language: system
|
|
13
|
+
pass_filenames: false
|
|
14
|
+
- id: mypy
|
|
15
|
+
name: mypy
|
|
16
|
+
entry: uv run mypy src tests
|
|
17
|
+
language: system
|
|
18
|
+
pass_filenames: false
|
|
19
|
+
- repo: https://github.com/gitleaks/gitleaks
|
|
20
|
+
rev: 83d9cd684c87d95d656c1458ef04895a7f1cbd8e # v8.30.1
|
|
21
|
+
hooks:
|
|
22
|
+
- id: gitleaks
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [0.2.0](https://github.com/MoeinRoghani/blackboard/compare/v0.1.0...v0.2.0) (2026-08-17)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **board:** add the board with levels, registers, and one total order ([#19](https://github.com/MoeinRoghani/blackboard/issues/19)) ([b7f65bf](https://github.com/MoeinRoghani/blackboard/commit/b7f65bf0989782f9e3bdfe9a1cd9ef0a3e19c5a6)), closes [#9](https://github.com/MoeinRoghani/blackboard/issues/9)
|
|
9
|
+
* **control:** admission, the write path, and the audit ([#26](https://github.com/MoeinRoghani/blackboard/issues/26)) ([e60733f](https://github.com/MoeinRoghani/blackboard/commit/e60733f226b02a0c25734ffa32aaa67b508f17cc)), closes [#21](https://github.com/MoeinRoghani/blackboard/issues/21)
|
|
10
|
+
* **control:** completion, budgets, and run outcomes ([#31](https://github.com/MoeinRoghani/blackboard/issues/31)) ([417c652](https://github.com/MoeinRoghani/blackboard/commit/417c652cfc7b843a3817edfe8dd0781d536e9587)), closes [#23](https://github.com/MoeinRoghani/blackboard/issues/23)
|
|
11
|
+
* **control:** registry, notification, and acknowledgment ([#27](https://github.com/MoeinRoghani/blackboard/issues/27)) ([97abf74](https://github.com/MoeinRoghani/blackboard/commit/97abf74a7877a09edfb21bef98915cb329439b0d)), closes [#22](https://github.com/MoeinRoghani/blackboard/issues/22)
|
|
12
|
+
* **model:** model creation from the six declarations ([#32](https://github.com/MoeinRoghani/blackboard/issues/32)) ([ab08957](https://github.com/MoeinRoghani/blackboard/commit/ab08957b683b2eec3a21cf134659648c9e19b966)), closes [#24](https://github.com/MoeinRoghani/blackboard/issues/24)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Documentation
|
|
16
|
+
|
|
17
|
+
* absolute license link for the PyPI project page ([#35](https://github.com/MoeinRoghani/blackboard/issues/35)) ([10b96aa](https://github.com/MoeinRoghani/blackboard/commit/10b96aa3b48357141334c0edd0303d082e256451)), closes [#34](https://github.com/MoeinRoghani/blackboard/issues/34)
|
|
18
|
+
* ADR 0001, project scope ([#18](https://github.com/MoeinRoghani/blackboard/issues/18)) ([20446b8](https://github.com/MoeinRoghani/blackboard/commit/20446b8cfd7d30c65c74027a30af4df710c85e7b)), closes [#8](https://github.com/MoeinRoghani/blackboard/issues/8)
|
|
19
|
+
* CONTRIBUTING ([#16](https://github.com/MoeinRoghani/blackboard/issues/16)) ([901a1be](https://github.com/MoeinRoghani/blackboard/commit/901a1be59e0ecd6e61071c61a1cc8fb976ae43cb)), closes [#7](https://github.com/MoeinRoghani/blackboard/issues/7)
|
|
20
|
+
* README ([#20](https://github.com/MoeinRoghani/blackboard/issues/20)) ([7c9912a](https://github.com/MoeinRoghani/blackboard/commit/7c9912a384320f993843d92aaccebba1e10fdf8f)), closes [#6](https://github.com/MoeinRoghani/blackboard/issues/6)
|
|
21
|
+
* the release and publish procedure ([#37](https://github.com/MoeinRoghani/blackboard/issues/37)) ([bba2d6b](https://github.com/MoeinRoghani/blackboard/commit/bba2d6b21d8abc9da3e5eb1629f46e845aae5078)), closes [#36](https://github.com/MoeinRoghani/blackboard/issues/36)
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
## Setup
|
|
4
|
+
|
|
5
|
+
`make setup` takes a clean checkout to a working state: it creates the environment from the lockfile and installs the pre-commit hooks. `make lint`, `make typecheck`, and `make test` run the same checks CI runs.
|
|
6
|
+
|
|
7
|
+
## Change flow
|
|
8
|
+
|
|
9
|
+
1. Every change starts as a GitHub issue stating the observable outcome. Work without an issue does not start.
|
|
10
|
+
2. The branch comes off current `main` and is named `<type>/<issue>-<slug>`, for example `feat/9-board`.
|
|
11
|
+
3. The test is written first and fails against the unmodified code.
|
|
12
|
+
4. The lockfile, the documentation, and the public surface land in the same commit as the change that requires them.
|
|
13
|
+
5. `make lint typecheck test` passes locally before the pull request opens. Local green is the precondition for opening the pull request, not a substitute for CI.
|
|
14
|
+
6. When `main` has moved, the branch is rebased on it. `main` is never merged into the branch.
|
|
15
|
+
7. The pull request title is a Conventional Commit subject; a check validates it. The body carries `Closes #<issue>`, one keyword per issue, because the squash merge discards commit messages and the body survives.
|
|
16
|
+
8. A pull request merges only when every check has passed, whatever the reason for a failure.
|
|
17
|
+
9. The merge is a squash. GitHub deletes the remote branch on merge; `git switch main && git pull --ff-only && git fetch --prune` then removes the local one.
|
|
18
|
+
|
|
19
|
+
## Review
|
|
20
|
+
|
|
21
|
+
The maintainer is sole. GitHub forbids approving one's own pull request, so no approval is requested, and a pull request merges on green CI alone. The issue link, the title check, and CI still apply to every pull request. When a second maintainer exists, required approvals replace this rule.
|
|
22
|
+
|
|
23
|
+
## Releases
|
|
24
|
+
|
|
25
|
+
release-please owns the version and `CHANGELOG.md`; neither is edited by hand. Merging a releasable commit to `main` opens or updates a release pull request, and merging that pull request cuts the release. `fix:` bumps the patch version and `feat:` bumps the minor version. While the major version is 0, a breaking change also bumps the minor version. A breaking change carries `!` in the subject and a `BREAKING CHANGE:` footer stating the migration, both together.
|
|
26
|
+
|
|
27
|
+
### What merging the release pull request does
|
|
28
|
+
|
|
29
|
+
The merge starts a chain that ends on PyPI, and no step of it is run by hand.
|
|
30
|
+
|
|
31
|
+
1. release-please writes the new version into `pyproject.toml` and `.release-please-manifest.json`, writes the changelog entries from the squashed commit subjects, tags the commit `v<version>`, and publishes a GitHub release.
|
|
32
|
+
2. Publishing that release triggers `.github/workflows/publish.yml`, which checks out the tagged commit.
|
|
33
|
+
3. The workflow compares the tag against the version the package metadata declares and stops when they disagree, so a tag can never name a version other than the one it publishes.
|
|
34
|
+
4. `uv build` produces the sdist and the wheel from that commit, and the workflow uploads both to PyPI.
|
|
35
|
+
|
|
36
|
+
Nothing is built or uploaded from a working copy. A maintainer who runs `uv build` locally is inspecting the artifact, not releasing it.
|
|
37
|
+
|
|
38
|
+
### Trusted publishing
|
|
39
|
+
|
|
40
|
+
The upload carries no credential. The workflow asks GitHub for an OpenID Connect token describing the repository, the workflow file, and the environment that requested it; PyPI compares that description against the publisher registered for the project and issues a credential that expires with the upload. No API token exists for this project, and none is stored in the repository, so there is nothing to leak or rotate.
|
|
41
|
+
|
|
42
|
+
The registration on PyPI, under the project's Publishing settings, is:
|
|
43
|
+
|
|
44
|
+
| Field | Value |
|
|
45
|
+
| --- | --- |
|
|
46
|
+
| PyPI project | `blackboardx` |
|
|
47
|
+
| Owner | `MoeinRoghani` |
|
|
48
|
+
| Repository | `blackboard` |
|
|
49
|
+
| Workflow | `publish.yml` |
|
|
50
|
+
| Environment | `pypi` |
|
|
51
|
+
|
|
52
|
+
The repository holds a deployment environment named `pypi`, and the workflow's `environment:` key, the environment in the repository, and the environment registered on PyPI carry the same name. A change to any one of the five values above breaks the upload until the other side matches it.
|
|
53
|
+
|
|
54
|
+
Before the project existed on PyPI these values were registered as a *pending publisher*, which is the form PyPI offers for a name that no project holds yet. The first upload created the project and converted it into an ordinary publisher on that project.
|
|
55
|
+
|
|
56
|
+
### A release that fails
|
|
57
|
+
|
|
58
|
+
Where the failure falls decides the remedy, because PyPI accepts a version once and never replaces it.
|
|
59
|
+
|
|
60
|
+
A workflow that fails before the upload, on the version check or the build, has published nothing. Correct the cause on `main` and cut the next release; re-running the job against the same tag also works when the cause was transient.
|
|
61
|
+
|
|
62
|
+
A version already on PyPI cannot be replaced, re-uploaded, or corrected in place, even after deletion. A defect in a published version is fixed by releasing the next version. A published version that must not be used is *yanked* on PyPI, which leaves it installable by exact pin for anyone who already depends on it while removing it from resolution for everyone else.
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|