stringz 0.1.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.
- stringz-0.1.1/.copier-answers.yml +20 -0
- stringz-0.1.1/.gitattributes +2 -0
- stringz-0.1.1/.github/workflows/ci.yml +110 -0
- stringz-0.1.1/.github/workflows/docs.yml +55 -0
- stringz-0.1.1/.github/workflows/release.yml +222 -0
- stringz-0.1.1/.gitignore +40 -0
- stringz-0.1.1/.project-words.txt +1 -0
- stringz-0.1.1/.python-version +1 -0
- stringz-0.1.1/.vscode/extensions.json +15 -0
- stringz-0.1.1/.vscode/launch.json +21 -0
- stringz-0.1.1/.vscode/md-admonitions.code-snippets +38 -0
- stringz-0.1.1/.vscode/md-figures.code-snippets +34 -0
- stringz-0.1.1/.vscode/py-comments.code-snippets +51 -0
- stringz-0.1.1/.vscode/settings.json +55 -0
- stringz-0.1.1/CHANGELOG.md +12 -0
- stringz-0.1.1/LICENSE.txt +18 -0
- stringz-0.1.1/PKG-INFO +72 -0
- stringz-0.1.1/README.md +49 -0
- stringz-0.1.1/cliff.toml +56 -0
- stringz-0.1.1/codecov.yml +27 -0
- stringz-0.1.1/docs/api_reference/index.md +9 -0
- stringz-0.1.1/docs/api_reference/truncated_string.md +13 -0
- stringz-0.1.1/docs/guide/index.md +9 -0
- stringz-0.1.1/docs/guide/truncated_strings.md +95 -0
- stringz-0.1.1/docs/index.md +36 -0
- stringz-0.1.1/docs/installation.md +19 -0
- stringz-0.1.1/docs/static/html/main.html +5 -0
- stringz-0.1.1/docs/static/images/banner.svg +4 -0
- stringz-0.1.1/docs/static/images/favicon.png +0 -0
- stringz-0.1.1/docs/static/images/logo.svg +4 -0
- stringz-0.1.1/docs/static/images/strings.drawio +77 -0
- stringz-0.1.1/docs/static/stylesheets/custom.css +41 -0
- stringz-0.1.1/pyproject.toml +125 -0
- stringz-0.1.1/src/stringz/__init__.py +1 -0
- stringz-0.1.1/src/stringz/_truncated_string.py +163 -0
- stringz-0.1.1/tests/__init__.py +0 -0
- stringz-0.1.1/tests/test_truncated_string.py +187 -0
- stringz-0.1.1/uv.lock +957 -0
- stringz-0.1.1/zensical.toml +159 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
|
|
2
|
+
_commit: c13c340
|
|
3
|
+
_src_path: gh:/johandielangman/ppt
|
|
4
|
+
contact_email: johan@datatreehouse.org
|
|
5
|
+
github_username: johandielangman
|
|
6
|
+
package_name: stringz
|
|
7
|
+
project_author: Johandielangman
|
|
8
|
+
project_description: Utilities library for working with strings
|
|
9
|
+
project_name: stringz
|
|
10
|
+
project_python_version: '3.12'
|
|
11
|
+
project_slug: stringz
|
|
12
|
+
python_versions:
|
|
13
|
+
- '3.12'
|
|
14
|
+
- '3.13'
|
|
15
|
+
- '3.14'
|
|
16
|
+
- '3.15'
|
|
17
|
+
supported_operating_systems:
|
|
18
|
+
- Windows
|
|
19
|
+
- macOS
|
|
20
|
+
- Linux
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
# Called by release.yml so a release is gated on the exact same checks.
|
|
9
|
+
workflow_call:
|
|
10
|
+
secrets:
|
|
11
|
+
CODECOV_TOKEN:
|
|
12
|
+
required: true
|
|
13
|
+
|
|
14
|
+
permissions: {}
|
|
15
|
+
|
|
16
|
+
concurrency:
|
|
17
|
+
# github.workflow resolves to the *caller* when invoked via workflow_call,
|
|
18
|
+
# so this never collides with the release workflow's own group.
|
|
19
|
+
group: ci-${{ github.workflow }}-${{ github.ref }}
|
|
20
|
+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
21
|
+
|
|
22
|
+
env:
|
|
23
|
+
FORCE_COLOR: "1"
|
|
24
|
+
UV_LOCKED: "1" # fail if uv.lock is out of date with pyproject.toml
|
|
25
|
+
|
|
26
|
+
jobs:
|
|
27
|
+
lint:
|
|
28
|
+
name: Lint
|
|
29
|
+
runs-on: ubuntu-latest
|
|
30
|
+
timeout-minutes: 10
|
|
31
|
+
permissions:
|
|
32
|
+
contents: read
|
|
33
|
+
steps:
|
|
34
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
35
|
+
with:
|
|
36
|
+
persist-credentials: false
|
|
37
|
+
- uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
|
|
38
|
+
- run: uv sync --no-default-groups --group lint
|
|
39
|
+
- run: uv run ruff check --output-format=github .
|
|
40
|
+
- run: uv run ruff format --check .
|
|
41
|
+
- run: uv run ty check
|
|
42
|
+
|
|
43
|
+
test:
|
|
44
|
+
name: Test (${{ matrix.os }}, py${{ matrix.python-version }})
|
|
45
|
+
runs-on: ${{ matrix.os }}
|
|
46
|
+
timeout-minutes: 15
|
|
47
|
+
permissions:
|
|
48
|
+
contents: read
|
|
49
|
+
strategy:
|
|
50
|
+
fail-fast: false
|
|
51
|
+
matrix:
|
|
52
|
+
os: [windows-latest, macos-latest, ubuntu-latest]
|
|
53
|
+
python-version: ["3.12", "3.13", "3.14", "3.15"]
|
|
54
|
+
steps:
|
|
55
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
56
|
+
with:
|
|
57
|
+
persist-credentials: false
|
|
58
|
+
- uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
|
|
59
|
+
with:
|
|
60
|
+
python-version: ${{ matrix.python-version }}
|
|
61
|
+
- run: uv sync --no-default-groups --group test
|
|
62
|
+
- name: Run tests
|
|
63
|
+
run: uv run pytest --doctest-modules --cov --cov-report=xml --junitxml=junit.xml
|
|
64
|
+
|
|
65
|
+
- name: Upload coverage
|
|
66
|
+
if: ${{ !cancelled() }}
|
|
67
|
+
uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1
|
|
68
|
+
with:
|
|
69
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
|
70
|
+
files: coverage.xml
|
|
71
|
+
flags: ${{ runner.os }},py${{ matrix.python-version }}
|
|
72
|
+
name: ${{ runner.os }}-py${{ matrix.python-version }}
|
|
73
|
+
# Fork PRs upload tokenless and may be rejected; everything else must upload.
|
|
74
|
+
fail_ci_if_error: ${{ github.event_name != 'pull_request' }}
|
|
75
|
+
|
|
76
|
+
- name: Upload test results
|
|
77
|
+
if: ${{ !cancelled() }}
|
|
78
|
+
uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1
|
|
79
|
+
with:
|
|
80
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
|
81
|
+
report_type: test_results
|
|
82
|
+
files: junit.xml
|
|
83
|
+
flags: ${{ runner.os }},py${{ matrix.python-version }}
|
|
84
|
+
|
|
85
|
+
package:
|
|
86
|
+
name: Package
|
|
87
|
+
runs-on: ubuntu-latest
|
|
88
|
+
timeout-minutes: 10
|
|
89
|
+
permissions:
|
|
90
|
+
contents: read
|
|
91
|
+
steps:
|
|
92
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
93
|
+
with:
|
|
94
|
+
persist-credentials: false
|
|
95
|
+
- uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
|
|
96
|
+
- run: uv build --no-sources
|
|
97
|
+
- name: Check distribution metadata
|
|
98
|
+
run: uvx twine check --strict dist/*
|
|
99
|
+
|
|
100
|
+
# Single required status check for branch protection.
|
|
101
|
+
ci-passed:
|
|
102
|
+
name: CI passed
|
|
103
|
+
if: always()
|
|
104
|
+
needs: [lint, test, package]
|
|
105
|
+
runs-on: ubuntu-latest
|
|
106
|
+
timeout-minutes: 2
|
|
107
|
+
steps:
|
|
108
|
+
- name: Check job results
|
|
109
|
+
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
|
|
110
|
+
run: exit 1
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
name: Docs
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
# Every push to main refreshes the "dev" docs.
|
|
5
|
+
push:
|
|
6
|
+
branches: [main]
|
|
7
|
+
paths:
|
|
8
|
+
- docs/**
|
|
9
|
+
- src/**
|
|
10
|
+
- zensical.toml
|
|
11
|
+
- .github/workflows/docs.yml
|
|
12
|
+
workflow_dispatch:
|
|
13
|
+
# release.yml calls this with a version to publish versioned docs + the "latest" alias.
|
|
14
|
+
workflow_call:
|
|
15
|
+
inputs:
|
|
16
|
+
version:
|
|
17
|
+
description: Release version to publish (without the leading "v")
|
|
18
|
+
type: string
|
|
19
|
+
required: true
|
|
20
|
+
|
|
21
|
+
permissions: {}
|
|
22
|
+
|
|
23
|
+
jobs:
|
|
24
|
+
deploy:
|
|
25
|
+
name: Deploy ${{ inputs.version || 'dev' }} docs
|
|
26
|
+
runs-on: ubuntu-latest
|
|
27
|
+
timeout-minutes: 10
|
|
28
|
+
permissions:
|
|
29
|
+
contents: write # mike pushes to the gh-pages branch
|
|
30
|
+
concurrency:
|
|
31
|
+
group: gh-pages
|
|
32
|
+
cancel-in-progress: false
|
|
33
|
+
steps:
|
|
34
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 # zizmor: ignore[artipacked] -- mike needs credentials to push gh-pages
|
|
35
|
+
with:
|
|
36
|
+
ref: ${{ inputs.version && format('v{0}', inputs.version) || github.ref }}
|
|
37
|
+
fetch-depth: 0 # mike needs the gh-pages branch
|
|
38
|
+
- uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
|
|
39
|
+
- run: uv sync --locked --no-default-groups --group docs --no-install-project
|
|
40
|
+
- name: Configure git
|
|
41
|
+
run: |
|
|
42
|
+
git config user.name "github-actions[bot]"
|
|
43
|
+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
44
|
+
|
|
45
|
+
- name: Deploy dev docs
|
|
46
|
+
if: ${{ !inputs.version }}
|
|
47
|
+
run: uv run mike deploy --push dev
|
|
48
|
+
|
|
49
|
+
- name: Deploy release docs
|
|
50
|
+
if: ${{ inputs.version }}
|
|
51
|
+
env:
|
|
52
|
+
VERSION: ${{ inputs.version }}
|
|
53
|
+
run: |
|
|
54
|
+
uv run mike deploy --push --update-aliases "$VERSION" latest
|
|
55
|
+
uv run mike set-default --push latest
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
run-name: Release (${{ inputs.bump }})
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
workflow_dispatch:
|
|
6
|
+
inputs:
|
|
7
|
+
bump:
|
|
8
|
+
description: >-
|
|
9
|
+
patch/minor/major = stable release ·
|
|
10
|
+
*-rc = start a release candidate (0.1.3 → 0.2.0rc1) ·
|
|
11
|
+
rc = next candidate (0.2.0rc1 → 0.2.0rc2) ·
|
|
12
|
+
stable = promote candidate (0.2.0rc2 → 0.2.0)
|
|
13
|
+
type: choice
|
|
14
|
+
options: [patch, minor, major, patch-rc, minor-rc, major-rc, rc, stable]
|
|
15
|
+
default: patch
|
|
16
|
+
|
|
17
|
+
permissions: {}
|
|
18
|
+
|
|
19
|
+
concurrency:
|
|
20
|
+
group: release
|
|
21
|
+
cancel-in-progress: false
|
|
22
|
+
|
|
23
|
+
# No FORCE_COLOR here: uv honours it even when piped, so $(uv version --short)
|
|
24
|
+
# would capture ANSI escape codes into the version string.
|
|
25
|
+
env:
|
|
26
|
+
NO_COLOR: "1"
|
|
27
|
+
|
|
28
|
+
jobs:
|
|
29
|
+
prepare:
|
|
30
|
+
name: Prepare
|
|
31
|
+
runs-on: ubuntu-latest
|
|
32
|
+
timeout-minutes: 5
|
|
33
|
+
permissions:
|
|
34
|
+
contents: read
|
|
35
|
+
outputs:
|
|
36
|
+
version: ${{ steps.version.outputs.version }}
|
|
37
|
+
prerelease: ${{ steps.version.outputs.prerelease }}
|
|
38
|
+
bump-args: ${{ steps.version.outputs.bump-args }}
|
|
39
|
+
steps:
|
|
40
|
+
- name: Require main
|
|
41
|
+
if: github.ref != 'refs/heads/main'
|
|
42
|
+
run: |
|
|
43
|
+
echo "::error::Releases must be started from main (got ${GITHUB_REF})"
|
|
44
|
+
exit 1
|
|
45
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
46
|
+
with:
|
|
47
|
+
persist-credentials: false
|
|
48
|
+
fetch-depth: 0
|
|
49
|
+
- uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
|
|
50
|
+
with:
|
|
51
|
+
enable-cache: false
|
|
52
|
+
- name: Compute next version
|
|
53
|
+
id: version
|
|
54
|
+
env:
|
|
55
|
+
BUMP: ${{ inputs.bump }}
|
|
56
|
+
run: |
|
|
57
|
+
case "$BUMP" in
|
|
58
|
+
*-rc) args="--bump ${BUMP%-rc} --bump rc" ;;
|
|
59
|
+
*) args="--bump $BUMP" ;;
|
|
60
|
+
esac
|
|
61
|
+
current=$(uv version --short --color never)
|
|
62
|
+
# uv rejects invalid transitions itself (e.g. "rc" or "stable" from a stable version).
|
|
63
|
+
version=$(uv version --short --color never --dry-run --no-sync $args)
|
|
64
|
+
|
|
65
|
+
# Guard against anything but a plain X.Y.Z[{a,b,rc}N] leaking into tags, URLs and job names.
|
|
66
|
+
if ! [[ "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+((a|b|rc)[0-9]+)?$ ]]; then
|
|
67
|
+
echo "::error::Unexpected version string: $(printf '%q' "$version")"
|
|
68
|
+
exit 1
|
|
69
|
+
fi
|
|
70
|
+
|
|
71
|
+
if git rev-parse -q --verify "refs/tags/v$version" >/dev/null; then
|
|
72
|
+
echo "::error::Tag v$version already exists"
|
|
73
|
+
exit 1
|
|
74
|
+
fi
|
|
75
|
+
|
|
76
|
+
prerelease=false
|
|
77
|
+
[[ "$version" =~ (a|b|rc)[0-9]+$ ]] && prerelease=true
|
|
78
|
+
|
|
79
|
+
{
|
|
80
|
+
echo "version=$version"
|
|
81
|
+
echo "prerelease=$prerelease"
|
|
82
|
+
echo "bump-args=$args"
|
|
83
|
+
} >> "$GITHUB_OUTPUT"
|
|
84
|
+
echo "### Releasing \`v$version\` (from \`$current\`, pre-release: $prerelease)" >> "$GITHUB_STEP_SUMMARY"
|
|
85
|
+
|
|
86
|
+
ci:
|
|
87
|
+
name: CI
|
|
88
|
+
needs: prepare
|
|
89
|
+
uses: ./.github/workflows/ci.yml
|
|
90
|
+
permissions:
|
|
91
|
+
contents: read
|
|
92
|
+
secrets:
|
|
93
|
+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
94
|
+
|
|
95
|
+
tag:
|
|
96
|
+
name: Tag v${{ needs.prepare.outputs.version }}
|
|
97
|
+
needs: [prepare, ci]
|
|
98
|
+
runs-on: ubuntu-latest
|
|
99
|
+
timeout-minutes: 5
|
|
100
|
+
permissions:
|
|
101
|
+
contents: write
|
|
102
|
+
env:
|
|
103
|
+
VERSION: ${{ needs.prepare.outputs.version }}
|
|
104
|
+
BUMP_ARGS: ${{ needs.prepare.outputs.bump-args }}
|
|
105
|
+
steps:
|
|
106
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 # zizmor: ignore[artipacked] -- this job pushes the release commit + tag
|
|
107
|
+
with:
|
|
108
|
+
# Release exactly the commit CI tested. If main moved meanwhile, the push fails.
|
|
109
|
+
ref: ${{ github.sha }}
|
|
110
|
+
fetch-depth: 0
|
|
111
|
+
- uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
|
|
112
|
+
with:
|
|
113
|
+
enable-cache: false
|
|
114
|
+
- name: Bump version
|
|
115
|
+
run: |
|
|
116
|
+
uv version --no-sync $BUMP_ARGS
|
|
117
|
+
test "$(uv version --short --color never)" = "$VERSION"
|
|
118
|
+
- name: Generate changelog and release notes
|
|
119
|
+
run: |
|
|
120
|
+
uv run --frozen --only-group release git-cliff --tag "v$VERSION" --output CHANGELOG.md
|
|
121
|
+
uv run --frozen --only-group release git-cliff --tag "v$VERSION" --unreleased --strip all --output RELEASE_NOTES.md
|
|
122
|
+
cat RELEASE_NOTES.md >> "$GITHUB_STEP_SUMMARY"
|
|
123
|
+
- name: Commit, tag and push
|
|
124
|
+
run: |
|
|
125
|
+
git config user.name "github-actions[bot]"
|
|
126
|
+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
127
|
+
git add pyproject.toml uv.lock CHANGELOG.md
|
|
128
|
+
git commit -m "chore(release): v$VERSION"
|
|
129
|
+
git tag -a "v$VERSION" -m "v$VERSION"
|
|
130
|
+
git push --atomic origin HEAD:main "v$VERSION"
|
|
131
|
+
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
132
|
+
with:
|
|
133
|
+
name: release-notes
|
|
134
|
+
path: RELEASE_NOTES.md
|
|
135
|
+
if-no-files-found: error
|
|
136
|
+
|
|
137
|
+
build:
|
|
138
|
+
name: Build
|
|
139
|
+
needs: [prepare, tag]
|
|
140
|
+
runs-on: ubuntu-latest
|
|
141
|
+
timeout-minutes: 5
|
|
142
|
+
permissions:
|
|
143
|
+
contents: read
|
|
144
|
+
steps:
|
|
145
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
146
|
+
with:
|
|
147
|
+
ref: v${{ needs.prepare.outputs.version }}
|
|
148
|
+
persist-credentials: false
|
|
149
|
+
- uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
|
|
150
|
+
with:
|
|
151
|
+
enable-cache: false
|
|
152
|
+
- run: uv build --no-sources
|
|
153
|
+
- name: Verify built version
|
|
154
|
+
env:
|
|
155
|
+
VERSION: ${{ needs.prepare.outputs.version }}
|
|
156
|
+
run: |
|
|
157
|
+
ls dist/
|
|
158
|
+
ls dist/*-"$VERSION"-py3-none-any.whl dist/*-"$VERSION".tar.gz
|
|
159
|
+
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
160
|
+
with:
|
|
161
|
+
name: dist
|
|
162
|
+
path: dist/
|
|
163
|
+
if-no-files-found: error
|
|
164
|
+
|
|
165
|
+
publish-pypi:
|
|
166
|
+
name: Publish to PyPI
|
|
167
|
+
needs: [prepare, build]
|
|
168
|
+
runs-on: ubuntu-latest
|
|
169
|
+
timeout-minutes: 10
|
|
170
|
+
environment:
|
|
171
|
+
name: pypi
|
|
172
|
+
url: https://pypi.org/project/stringz/${{ needs.prepare.outputs.version }}/
|
|
173
|
+
permissions:
|
|
174
|
+
id-token: write # trusted publishing + attestations
|
|
175
|
+
steps:
|
|
176
|
+
- uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
|
|
177
|
+
with:
|
|
178
|
+
enable-cache: false
|
|
179
|
+
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
|
|
180
|
+
with:
|
|
181
|
+
name: dist
|
|
182
|
+
path: dist/
|
|
183
|
+
- name: Generate PEP 740 attestations
|
|
184
|
+
uses: astral-sh/attest-action@39b6ce43875c196a579e31635b11aa2a2036384a # v0.0.7
|
|
185
|
+
- name: Publish
|
|
186
|
+
run: uv publish
|
|
187
|
+
|
|
188
|
+
github-release:
|
|
189
|
+
name: GitHub release
|
|
190
|
+
needs: [prepare, publish-pypi]
|
|
191
|
+
runs-on: ubuntu-latest
|
|
192
|
+
timeout-minutes: 5
|
|
193
|
+
permissions:
|
|
194
|
+
contents: write
|
|
195
|
+
env:
|
|
196
|
+
GH_TOKEN: ${{ github.token }}
|
|
197
|
+
GH_REPO: ${{ github.repository }}
|
|
198
|
+
TAG: v${{ needs.prepare.outputs.version }}
|
|
199
|
+
PRERELEASE: ${{ needs.prepare.outputs.prerelease }}
|
|
200
|
+
steps:
|
|
201
|
+
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
|
|
202
|
+
with:
|
|
203
|
+
path: artifacts/
|
|
204
|
+
- name: Create release
|
|
205
|
+
run: |
|
|
206
|
+
if [ "$PRERELEASE" = "true" ]; then flag=--prerelease; else flag=--latest; fi
|
|
207
|
+
gh release create "$TAG" artifacts/dist/* \
|
|
208
|
+
--verify-tag \
|
|
209
|
+
--title "$TAG" \
|
|
210
|
+
--notes-file artifacts/release-notes/RELEASE_NOTES.md \
|
|
211
|
+
$flag
|
|
212
|
+
|
|
213
|
+
docs:
|
|
214
|
+
name: Docs
|
|
215
|
+
needs: [prepare, publish-pypi]
|
|
216
|
+
# Pre-releases don't get versioned docs; "dev" already tracks main.
|
|
217
|
+
if: needs.prepare.outputs.prerelease == 'false'
|
|
218
|
+
uses: ./.github/workflows/docs.yml
|
|
219
|
+
permissions:
|
|
220
|
+
contents: write
|
|
221
|
+
with:
|
|
222
|
+
version: ${{ needs.prepare.outputs.version }}
|
stringz-0.1.1/.gitignore
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Python-generated files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[oc]
|
|
4
|
+
build/
|
|
5
|
+
dist/
|
|
6
|
+
wheels/
|
|
7
|
+
*.egg-info
|
|
8
|
+
|
|
9
|
+
# Virtual environments
|
|
10
|
+
.venv
|
|
11
|
+
.env
|
|
12
|
+
*.env.*
|
|
13
|
+
!.env.example
|
|
14
|
+
|
|
15
|
+
# Streamlit secrets
|
|
16
|
+
**/.streamlit/secrets.toml
|
|
17
|
+
|
|
18
|
+
# Database
|
|
19
|
+
.sqlite/*.db
|
|
20
|
+
|
|
21
|
+
# Big json files
|
|
22
|
+
full_describe.json
|
|
23
|
+
|
|
24
|
+
# Gitkeep
|
|
25
|
+
|
|
26
|
+
# MkDocs
|
|
27
|
+
site/
|
|
28
|
+
.cache/
|
|
29
|
+
|
|
30
|
+
.vscode/**
|
|
31
|
+
!.vscode/extensions.json
|
|
32
|
+
!.vscode/settings.json
|
|
33
|
+
!.vscode/launch.json
|
|
34
|
+
!*.code-snippets
|
|
35
|
+
.coverage
|
|
36
|
+
|
|
37
|
+
tests/temp/**
|
|
38
|
+
*.db
|
|
39
|
+
|
|
40
|
+
!.gitkeep
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
stringz
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.12
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"recommendations": [
|
|
3
|
+
"streetsidesoftware.code-spell-checker",
|
|
4
|
+
"streetsidesoftware.code-spell-checker-british-english",
|
|
5
|
+
"esbenp.prettier-vscode",
|
|
6
|
+
"dbaeumer.vscode-eslint",
|
|
7
|
+
"charliermarsh.ruff",
|
|
8
|
+
"ms-python.python",
|
|
9
|
+
"ms-python.vscode-pylance",
|
|
10
|
+
"ms-python.debugpy",
|
|
11
|
+
"njpwerner.autodocstring",
|
|
12
|
+
"usernamehw.errorlens"
|
|
13
|
+
],
|
|
14
|
+
"unwantedRecommendations": ["ms-python.flake8"]
|
|
15
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.2.0",
|
|
3
|
+
"configurations": [
|
|
4
|
+
{
|
|
5
|
+
"name": "Docs",
|
|
6
|
+
"type": "debugpy",
|
|
7
|
+
"request": "launch",
|
|
8
|
+
"module": "zensical",
|
|
9
|
+
"args": ["serve"]
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"name": "Python: Debug Tests",
|
|
13
|
+
"type": "debugpy",
|
|
14
|
+
"request": "launch",
|
|
15
|
+
"program": "${file}",
|
|
16
|
+
"purpose": ["debug-test"],
|
|
17
|
+
"console": "integratedTerminal",
|
|
18
|
+
"justMyCode": true
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Admonition": {
|
|
3
|
+
"prefix": "adm",
|
|
4
|
+
"scope": "markdown",
|
|
5
|
+
"body": ["!!! ${1|note,abstract,info,tip,success,question,warning,failure,danger,bug,example,quote|} \"${2:Title}\"", "", " ${3:Content}"],
|
|
6
|
+
"description": "Admonition block"
|
|
7
|
+
},
|
|
8
|
+
"Admonition - No Title": {
|
|
9
|
+
"prefix": "adm-no-title",
|
|
10
|
+
"scope": "markdown",
|
|
11
|
+
"body": ["!!! ${1|note,abstract,info,tip,success,question,warning,failure,danger,bug,example,quote|} \"\"", "", " ${2:Content}"],
|
|
12
|
+
"description": "Admonition without a title"
|
|
13
|
+
},
|
|
14
|
+
"Admonition - Collapsible": {
|
|
15
|
+
"prefix": "adm-collapsible",
|
|
16
|
+
"scope": "markdown",
|
|
17
|
+
"body": ["??? ${1|note,abstract,info,tip,success,question,warning,failure,danger,bug,example,quote|} \"${2:Title}\"", "", " ${3:Content}"],
|
|
18
|
+
"description": "Collapsible admonition (collapsed by default)"
|
|
19
|
+
},
|
|
20
|
+
"Admonition - Collapsible Expanded": {
|
|
21
|
+
"prefix": "adm-collapsible-open",
|
|
22
|
+
"scope": "markdown",
|
|
23
|
+
"body": ["???+ ${1|note,abstract,info,tip,success,question,warning,failure,danger,bug,example,quote|} \"${2:Title}\"", "", " ${3:Content}"],
|
|
24
|
+
"description": "Collapsible admonition (expanded by default)"
|
|
25
|
+
},
|
|
26
|
+
"Admonition - Inline Right": {
|
|
27
|
+
"prefix": "adm-inline-end",
|
|
28
|
+
"scope": "markdown",
|
|
29
|
+
"body": ["!!! ${1|note,abstract,info,tip,success,question,warning,failure,danger,bug,example,quote|} inline end \"${2:Title}\"", "", " ${3:Content}"],
|
|
30
|
+
"description": "Inline admonition floated to the right"
|
|
31
|
+
},
|
|
32
|
+
"Admonition - Inline Left": {
|
|
33
|
+
"prefix": "adm-inline",
|
|
34
|
+
"scope": "markdown",
|
|
35
|
+
"body": ["!!! ${1|note,abstract,info,tip,success,question,warning,failure,danger,bug,example,quote|} inline \"${2:Title}\"", "", " ${3:Content}"],
|
|
36
|
+
"description": "Inline admonition floated to the left"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Figure - Auto-numbered caption": {
|
|
3
|
+
"prefix": "fig",
|
|
4
|
+
"scope": "markdown",
|
|
5
|
+
"body": [
|
|
6
|
+
"{: class=\"img-${3|w50,w60,w75,w85,w100|} center\"}",
|
|
7
|
+
"",
|
|
8
|
+
"/// ${4:|caption,figure-caption} | #fig-${5:slug}",
|
|
9
|
+
"${6:Caption}",
|
|
10
|
+
"///"
|
|
11
|
+
],
|
|
12
|
+
"description": "Insert an auto-numbered figure with pymdownx.blocks.caption"
|
|
13
|
+
},
|
|
14
|
+
"Figure - Plain caption": {
|
|
15
|
+
"prefix": "fig-plain",
|
|
16
|
+
"scope": "markdown",
|
|
17
|
+
"body": [
|
|
18
|
+
"{: class=\"img-${3|w50,w60,w75,w85,w100|} center\"}",
|
|
19
|
+
"",
|
|
20
|
+
"/// caption",
|
|
21
|
+
"${4:Caption}",
|
|
22
|
+
"///"
|
|
23
|
+
],
|
|
24
|
+
"description": "Insert a figure with a plain caption (no auto-numbering)"
|
|
25
|
+
},
|
|
26
|
+
"Figure reference": {
|
|
27
|
+
"prefix": "fig-ref",
|
|
28
|
+
"scope": "markdown",
|
|
29
|
+
"body": [
|
|
30
|
+
"[Figure ${1:1}](#fig-${2:slug})"
|
|
31
|
+
],
|
|
32
|
+
"description": "Reference a figure by its anchor"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"File Banner": {
|
|
3
|
+
"scope": "python",
|
|
4
|
+
"prefix": "t-banner",
|
|
5
|
+
"body": [
|
|
6
|
+
"# ~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~",
|
|
7
|
+
"#",
|
|
8
|
+
"# Author: Johandielangman",
|
|
9
|
+
"# Date: $CURRENT_MONTH_NAME $CURRENT_YEAR",
|
|
10
|
+
"#",
|
|
11
|
+
"# ~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~",
|
|
12
|
+
"",
|
|
13
|
+
"$1"
|
|
14
|
+
],
|
|
15
|
+
"description": "Banner for top of file"
|
|
16
|
+
},
|
|
17
|
+
"Comment Header 1": {
|
|
18
|
+
"scope": "python",
|
|
19
|
+
"prefix": "t-header1",
|
|
20
|
+
"body": [
|
|
21
|
+
"# =============== // $1 // ==============="
|
|
22
|
+
],
|
|
23
|
+
"description": "A comment header"
|
|
24
|
+
},
|
|
25
|
+
"Comment Header 2": {
|
|
26
|
+
"scope": "python",
|
|
27
|
+
"prefix": "t-header2",
|
|
28
|
+
"body": [
|
|
29
|
+
"# ~.~.~.~.~.~.~.~ // $1 // ~.~.~.~.~.~.~.~"
|
|
30
|
+
],
|
|
31
|
+
"description": "A comment header"
|
|
32
|
+
},
|
|
33
|
+
"Comment Header 3": {
|
|
34
|
+
"scope": "python",
|
|
35
|
+
"prefix": "t-header3",
|
|
36
|
+
"body": [
|
|
37
|
+
"# ========================================",
|
|
38
|
+
"# $1",
|
|
39
|
+
"# ========================================"
|
|
40
|
+
],
|
|
41
|
+
"description": "A comment header"
|
|
42
|
+
},
|
|
43
|
+
"Comment Step": {
|
|
44
|
+
"scope": "python",
|
|
45
|
+
"prefix": "t-step",
|
|
46
|
+
"body": [
|
|
47
|
+
"# ====> $1"
|
|
48
|
+
],
|
|
49
|
+
"description": "A comment step"
|
|
50
|
+
},
|
|
51
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
// Git settings
|
|
3
|
+
"git.autofetch": true,
|
|
4
|
+
// Ruff settings - config lives in pyproject.toml
|
|
5
|
+
"ruff.configuration": "${workspaceFolder}/pyproject.toml",
|
|
6
|
+
// Mypy settings - auto-discovers mypy.ini in workspace root
|
|
7
|
+
"python.analysis.typeCheckingMode": "standard",
|
|
8
|
+
// Python testing settings
|
|
9
|
+
"python.testing.pytestEnabled": true,
|
|
10
|
+
"python.testing.unittestEnabled": false,
|
|
11
|
+
"python.testing.pytestArgs": [
|
|
12
|
+
"tests",
|
|
13
|
+
"src",
|
|
14
|
+
"--doctest-modules",
|
|
15
|
+
"--cov",
|
|
16
|
+
"--cov-config=pyproject.toml"
|
|
17
|
+
],
|
|
18
|
+
"[python]": {
|
|
19
|
+
"editor.defaultFormatter": "charliermarsh.ruff",
|
|
20
|
+
"editor.formatOnSave": true,
|
|
21
|
+
"editor.codeActionsOnSave": {
|
|
22
|
+
"source.organizeImports.ruff": "explicit",
|
|
23
|
+
"source.fixAll.ruff": "explicit"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"[markdown]": {
|
|
27
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
28
|
+
"editor.formatOnSave": true
|
|
29
|
+
},
|
|
30
|
+
// Code formatting
|
|
31
|
+
"editor.formatOnSave": true,
|
|
32
|
+
// Editor settings
|
|
33
|
+
"editor.rulers": [120],
|
|
34
|
+
"files.insertFinalNewline": true,
|
|
35
|
+
"files.trimTrailingWhitespace": true,
|
|
36
|
+
"files.eol": "\n",
|
|
37
|
+
// Codespell settings - explicit workspace paths
|
|
38
|
+
"cSpell.enabled": true,
|
|
39
|
+
"cSpell.language": "en-GB",
|
|
40
|
+
"cSpell.customDictionaries": {
|
|
41
|
+
"project-words": {
|
|
42
|
+
"name": "project-words",
|
|
43
|
+
"path": "${workspaceFolder}/.project-words.txt",
|
|
44
|
+
"addWords": true,
|
|
45
|
+
"scope": "workspace"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
// Error Lens settings
|
|
49
|
+
"errorLens.enabled": true,
|
|
50
|
+
"errorLens.enabledDiagnosticLevels": ["error", "warning", "info", "hint"],
|
|
51
|
+
"errorLens.onSave": true,
|
|
52
|
+
"errorLens.onSaveTimeout": 1000,
|
|
53
|
+
"errorLens.delay": 500,
|
|
54
|
+
"errorLens.followCursor": "allLines"
|
|
55
|
+
}
|