batchembed 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.
@@ -0,0 +1,128 @@
1
+ name: CI
2
+
3
+ on:
4
+ pull_request:
5
+ branches: [main]
6
+ push:
7
+ branches: [main]
8
+ tags: ["v*"]
9
+
10
+ jobs:
11
+ # Build validation: runs on PRs and on manual release tags. Skipped for
12
+ # plain pushes to main, since those are handled by release/build-release
13
+ # below (a merge to main isn't publishable until semantic-release decides
14
+ # it's a release).
15
+ build:
16
+ if: github.event_name != 'push' || github.ref_type == 'tag'
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+ with:
21
+ fetch-depth: 0
22
+ fetch-tags: true
23
+ - uses: astral-sh/setup-uv@v5
24
+ - run: uv build
25
+ - uses: actions/upload-artifact@v4
26
+ with:
27
+ name: dist
28
+ path: dist/
29
+
30
+ # Trunk-based auto-release: on every push to main, inspect the commits
31
+ # since the last tag using Conventional Commits. If they warrant a
32
+ # release (feat/fix/BREAKING CHANGE), tag the next version and create a
33
+ # GitHub release. No-op (released=false) for chore/docs-only merges.
34
+ release:
35
+ if: github.event_name == 'push' && github.ref == 'refs/heads/main'
36
+ runs-on: ubuntu-latest
37
+ concurrency:
38
+ group: release-main
39
+ cancel-in-progress: false
40
+ permissions:
41
+ contents: write
42
+ outputs:
43
+ released: ${{ steps.release.outputs.released }}
44
+ tag: ${{ steps.release.outputs.tag }}
45
+ steps:
46
+ - uses: actions/checkout@v4
47
+ with:
48
+ fetch-depth: 0
49
+ fetch-tags: true
50
+ ref: main
51
+ - run: git reset --hard ${{ github.sha }}
52
+ - id: release
53
+ uses: python-semantic-release/python-semantic-release@v10.6.1
54
+ with:
55
+ github_token: ${{ secrets.GITHUB_TOKEN }}
56
+ # No commit lands on main from this step: it only tags the
57
+ # exact commit that triggered the run and creates a GitHub
58
+ # Release (which gets its own notes independent of this).
59
+ # Otherwise the tag ends up one commit ahead of what
60
+ # build-release checks out, breaking hatch-vcs's version.
61
+ commit: false
62
+ changelog: false
63
+
64
+ build-release:
65
+ needs: release
66
+ if: needs.release.outputs.released == 'true'
67
+ runs-on: ubuntu-latest
68
+ steps:
69
+ - uses: actions/checkout@v4
70
+ with:
71
+ fetch-depth: 0
72
+ fetch-tags: true
73
+ - uses: astral-sh/setup-uv@v5
74
+ - run: uv build
75
+ - uses: actions/upload-artifact@v4
76
+ with:
77
+ name: dist
78
+ path: dist/
79
+
80
+ # Manual release candidates (scripts/release.sh minor --rc, tags like
81
+ # v1.2.3-rc.1) go to TestPyPI.
82
+ publish-testpypi:
83
+ needs: build
84
+ if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref_name, '-rc.')
85
+ runs-on: ubuntu-latest
86
+ environment: testpypi
87
+ permissions:
88
+ id-token: write
89
+ steps:
90
+ - uses: actions/download-artifact@v4
91
+ with:
92
+ name: dist
93
+ path: dist/
94
+ - uses: astral-sh/setup-uv@v5
95
+ - run: uv publish --publish-url https://test.pypi.org/legacy/
96
+
97
+ # Manual final release tags (scripts/release.sh patch|minor|major) go to
98
+ # PyPI. Kept as a manual override alongside the automatic path below.
99
+ publish-pypi-tag:
100
+ needs: build
101
+ if: startsWith(github.ref, 'refs/tags/v') && !contains(github.ref_name, '-rc.')
102
+ runs-on: ubuntu-latest
103
+ environment: pypi
104
+ permissions:
105
+ id-token: write
106
+ steps:
107
+ - uses: actions/download-artifact@v4
108
+ with:
109
+ name: dist
110
+ path: dist/
111
+ - uses: astral-sh/setup-uv@v5
112
+ - run: uv publish
113
+
114
+ # Automatic trunk-based release, published as soon as semantic-release
115
+ # tags a new version on main.
116
+ publish-pypi-auto:
117
+ needs: build-release
118
+ runs-on: ubuntu-latest
119
+ environment: pypi
120
+ permissions:
121
+ id-token: write
122
+ steps:
123
+ - uses: actions/download-artifact@v4
124
+ with:
125
+ name: dist
126
+ path: dist/
127
+ - uses: astral-sh/setup-uv@v5
128
+ - run: uv publish
@@ -0,0 +1,36 @@
1
+ name: PR Title
2
+
3
+ on:
4
+ pull_request:
5
+ types: [opened, edited, synchronize, reopened]
6
+
7
+ jobs:
8
+ check:
9
+ name: Validate PR title
10
+ runs-on: ubuntu-latest
11
+ permissions:
12
+ pull-requests: write
13
+ steps:
14
+ - uses: amannn/action-semantic-pull-request@v6
15
+ env:
16
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17
+ with:
18
+ types: |
19
+ feat
20
+ fix
21
+ docs
22
+ style
23
+ refactor
24
+ perf
25
+ test
26
+ build
27
+ ci
28
+ chore
29
+ revert
30
+ requireScope: false
31
+ # The PR title is what lands on main as the squash commit
32
+ # message, so this is what semantic-release actually parses.
33
+ subjectPattern: ^(?![A-Z]).+$
34
+ subjectPatternError: >-
35
+ The subject "{subject}" found in the pull request title "{title}"
36
+ should start with a lowercase letter.
@@ -0,0 +1,11 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *.egg-info/
4
+ .eggs/
5
+ build/
6
+ dist/
7
+ .venv/
8
+ venv/
9
+ .mypy_cache/
10
+ .pytest_cache/
11
+ .idea/
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Alex Lilburn
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,32 @@
1
+ Metadata-Version: 2.4
2
+ Name: batchembed
3
+ Version: 1.0.0
4
+ Summary: Placeholder package (name reservation).
5
+ Project-URL: Homepage, https://github.com/alexlilburn/batchembed-python
6
+ Author-email: Alex Lilburn <alexlilburn@me.com>
7
+ License: MIT
8
+ License-File: LICENSE
9
+ Classifier: Development Status :: 1 - Planning
10
+ Classifier: Programming Language :: Python :: 3
11
+ Requires-Python: >=3.9
12
+ Description-Content-Type: text/markdown
13
+
14
+ # batchembed
15
+
16
+ Placeholder package. Nothing to see here yet.
17
+
18
+ ## Releasing
19
+
20
+ Versions are derived entirely from git tags (`hatch-vcs`) — there is no
21
+ version field to edit.
22
+
23
+ - **Automatic (trunk-based):** every merge to `main` is analyzed by
24
+ [python-semantic-release](https://python-semantic-release.readthedocs.io/)
25
+ against [Conventional Commits](https://www.conventionalcommits.org/). A
26
+ `feat:` commit bumps minor, `fix:` bumps patch, and a `BREAKING CHANGE:`
27
+ footer (or `!` after the type) bumps major. If nothing releasable landed
28
+ (e.g. only `chore:`/`docs:`), no release happens. A release publishes to
29
+ PyPI automatically.
30
+ - **Manual override:** `scripts/release.sh patch|minor|major [--rc]` tags
31
+ and pushes a version by hand. Add `--rc` to cut a release candidate
32
+ (`vX.Y.Z-rc.N`), which publishes to TestPyPI instead of PyPI.
@@ -0,0 +1,19 @@
1
+ # batchembed
2
+
3
+ Placeholder package. Nothing to see here yet.
4
+
5
+ ## Releasing
6
+
7
+ Versions are derived entirely from git tags (`hatch-vcs`) — there is no
8
+ version field to edit.
9
+
10
+ - **Automatic (trunk-based):** every merge to `main` is analyzed by
11
+ [python-semantic-release](https://python-semantic-release.readthedocs.io/)
12
+ against [Conventional Commits](https://www.conventionalcommits.org/). A
13
+ `feat:` commit bumps minor, `fix:` bumps patch, and a `BREAKING CHANGE:`
14
+ footer (or `!` after the type) bumps major. If nothing releasable landed
15
+ (e.g. only `chore:`/`docs:`), no release happens. A release publishes to
16
+ PyPI automatically.
17
+ - **Manual override:** `scripts/release.sh patch|minor|major [--rc]` tags
18
+ and pushes a version by hand. Add `--rc` to cut a release candidate
19
+ (`vX.Y.Z-rc.N`), which publishes to TestPyPI instead of PyPI.
@@ -0,0 +1,36 @@
1
+ [build-system]
2
+ requires = ["hatchling", "hatch-vcs"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "batchembed"
7
+ dynamic = ["version"]
8
+ description = "Placeholder package (name reservation)."
9
+ readme = "README.md"
10
+ requires-python = ">=3.9"
11
+ license = { text = "MIT" }
12
+ authors = [
13
+ { name = "Alex Lilburn", email = "alexlilburn@me.com" },
14
+ ]
15
+ classifiers = [
16
+ "Development Status :: 1 - Planning",
17
+ "Programming Language :: Python :: 3",
18
+ ]
19
+
20
+ [project.urls]
21
+ Homepage = "https://github.com/alexlilburn/batchembed-python"
22
+
23
+ [tool.hatch.build.targets.wheel]
24
+ packages = ["src/batchembed"]
25
+
26
+ [tool.hatch.version]
27
+ source = "vcs"
28
+
29
+ [tool.hatch.version.raw-options]
30
+ version_scheme = "no-guess-dev"
31
+ local_scheme = "no-local-version"
32
+
33
+ [tool.semantic_release]
34
+ tag_format = "v{version}"
35
+ commit_parser = "conventional"
36
+ major_on_zero = true
@@ -0,0 +1,40 @@
1
+ #!/usr/bin/env bash
2
+ # Tags the next version and pushes it, which triggers CI to publish.
3
+ #
4
+ # Usage:
5
+ # scripts/release.sh patch|minor|major [--rc]
6
+ #
7
+ # Examples:
8
+ # scripts/release.sh patch # v0.1.0 -> v0.1.1, publishes to PyPI
9
+ # scripts/release.sh minor --rc # v0.1.1 -> v0.2.0-rc.1, publishes to TestPyPI
10
+ set -euo pipefail
11
+
12
+ bump="${1:?usage: release.sh <patch|minor|major> [--rc]}"
13
+ rc="${2:-}"
14
+
15
+ git fetch --tags --quiet
16
+
17
+ latest=$(git tag --list 'v[0-9]*.[0-9]*.[0-9]*' --sort=-v:refname | grep -Ev -- '-rc\.' | head -n1 || true)
18
+ latest=${latest:-v0.0.0}
19
+ IFS='.' read -r major minor patch <<< "${latest#v}"
20
+
21
+ case "$bump" in
22
+ major) major=$((major + 1)); minor=0; patch=0 ;;
23
+ minor) minor=$((minor + 1)); patch=0 ;;
24
+ patch) patch=$((patch + 1)) ;;
25
+ *) echo "bump must be one of: patch, minor, major" >&2; exit 1 ;;
26
+ esac
27
+
28
+ version="v${major}.${minor}.${patch}"
29
+
30
+ if [[ "$rc" == "--rc" ]]; then
31
+ n=1
32
+ while git rev-parse "${version}-rc.${n}" >/dev/null 2>&1; do
33
+ n=$((n + 1))
34
+ done
35
+ version="${version}-rc.${n}"
36
+ fi
37
+
38
+ echo "Tagging ${version}"
39
+ git tag -a "$version" -m "Release ${version}"
40
+ git push origin "$version"
@@ -0,0 +1,6 @@
1
+ from importlib.metadata import PackageNotFoundError, version
2
+
3
+ try:
4
+ __version__ = version("batchembed")
5
+ except PackageNotFoundError:
6
+ __version__ = "0.0.0"
@@ -0,0 +1,7 @@
1
+ version = 1
2
+ revision = 1
3
+ requires-python = ">=3.9"
4
+
5
+ [[package]]
6
+ name = "batchembed"
7
+ source = { editable = "." }