piperg2p 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.
- piperg2p-0.1.1/.codecrate.toml +24 -0
- piperg2p-0.1.1/.github/workflows/codecov.yml +28 -0
- piperg2p-0.1.1/.github/workflows/pre-commit.yml +26 -0
- piperg2p-0.1.1/.github/workflows/python-publish.yml +113 -0
- piperg2p-0.1.1/.github/workflows/test.yml +135 -0
- piperg2p-0.1.1/.gitignore +219 -0
- piperg2p-0.1.1/.ledger/ledger.toml +24 -0
- piperg2p-0.1.1/.ledger/releaseledger/.ledger-project.toml +6 -0
- piperg2p-0.1.1/.ledger/releaseledger/config.toml +56 -0
- piperg2p-0.1.1/.ledger/releaseledger/data/.ledger-project.toml +6 -0
- piperg2p-0.1.1/.ledger/releaseledger/data/ledgers/main/events/events.jsonl +6 -0
- piperg2p-0.1.1/.ledger/releaseledger/data/ledgers/main/releases/v0.1.0/audit/commit-audit.yaml +692 -0
- piperg2p-0.1.1/.ledger/releaseledger/data/ledgers/main/releases/v0.1.0/entries/entry-0001.md +26 -0
- piperg2p-0.1.1/.ledger/releaseledger/data/ledgers/main/releases/v0.1.0/entries/entry-0002.md +26 -0
- piperg2p-0.1.1/.ledger/releaseledger/data/ledgers/main/releases/v0.1.0/entries/entry-0003.md +26 -0
- piperg2p-0.1.1/.ledger/releaseledger/data/ledgers/main/releases/v0.1.0/entries/entry-0004.md +26 -0
- piperg2p-0.1.1/.ledger/releaseledger/data/ledgers/main/releases/v0.1.0/entries/entry-0005.md +26 -0
- piperg2p-0.1.1/.ledger/releaseledger/data/ledgers/main/releases/v0.1.0/entries/entry-0006.md +28 -0
- piperg2p-0.1.1/.ledger/releaseledger/data/ledgers/main/releases/v0.1.0/entries/entry-0007.md +24 -0
- piperg2p-0.1.1/.ledger/releaseledger/data/ledgers/main/releases/v0.1.0/entries/entry-0008.md +26 -0
- piperg2p-0.1.1/.ledger/releaseledger/data/ledgers/main/releases/v0.1.0/entries/entry-0009.md +24 -0
- piperg2p-0.1.1/.ledger/releaseledger/data/ledgers/main/releases/v0.1.0/entries/entry-0010.md +24 -0
- piperg2p-0.1.1/.ledger/releaseledger/data/ledgers/main/releases/v0.1.0/entries/entry-0011.md +24 -0
- piperg2p-0.1.1/.ledger/releaseledger/data/ledgers/main/releases/v0.1.0/entries/entry-0012.md +25 -0
- piperg2p-0.1.1/.ledger/releaseledger/data/ledgers/main/releases/v0.1.0/entries/entry-0013.md +24 -0
- piperg2p-0.1.1/.ledger/releaseledger/data/ledgers/main/releases/v0.1.0/release.md +27 -0
- piperg2p-0.1.1/.ledger/releaseledger/work/v0.1.0/audit-decisions.yaml +213 -0
- piperg2p-0.1.1/.ledger/releaseledger/work/v0.1.0/audit.yaml +549 -0
- piperg2p-0.1.1/.ledger/releaseledger/work/v0.1.0/entries.yaml +83 -0
- piperg2p-0.1.1/.ledger/releaseledger/work/v0.1.0/evidence/20bd516.patch +438 -0
- piperg2p-0.1.1/.ledger/releaseledger/work/v0.1.0/evidence/2fc2f73.patch +2931 -0
- piperg2p-0.1.1/.ledger/releaseledger/work/v0.1.0/evidence/3064cf6.patch +2055 -0
- piperg2p-0.1.1/.ledger/releaseledger/work/v0.1.0/evidence/3b30ded.patch +16 -0
- piperg2p-0.1.1/.ledger/releaseledger/work/v0.1.0/evidence/4cbc654.patch +211 -0
- piperg2p-0.1.1/.ledger/releaseledger/work/v0.1.0/evidence/5d05d1c.patch +18 -0
- piperg2p-0.1.1/.ledger/releaseledger/work/v0.1.0/evidence/5db1eaf.patch +36 -0
- piperg2p-0.1.1/.ledger/releaseledger/work/v0.1.0/evidence/5f8a77a.patch +2467 -0
- piperg2p-0.1.1/.ledger/releaseledger/work/v0.1.0/evidence/797d205.patch +239 -0
- piperg2p-0.1.1/.ledger/releaseledger/work/v0.1.0/evidence/882bbcb.patch +57 -0
- piperg2p-0.1.1/.ledger/releaseledger/work/v0.1.0/evidence/aeba14b.patch +70 -0
- piperg2p-0.1.1/.ledger/releaseledger/work/v0.1.0/evidence/baf294f.patch +1961 -0
- piperg2p-0.1.1/.ledger/releaseledger/work/v0.1.0/evidence/bfe84b1.patch +1351 -0
- piperg2p-0.1.1/.ledger/releaseledger/work/v0.1.0/evidence/e08deb1.patch +1548 -0
- piperg2p-0.1.1/.ledger/releaseledger/work/v0.1.0/evidence/eb23e15.patch +123 -0
- piperg2p-0.1.1/.ledger/releaseledger/work/v0.1.0/evidence/ecb05c3.patch +28 -0
- piperg2p-0.1.1/.ledger/releaseledger/work/v0.1.0/evidence/manifest.json +478 -0
- piperg2p-0.1.1/.ledger/releaseledger/work/v0.1.0/range.json +13 -0
- piperg2p-0.1.1/.ledger/taskledger/.ledger-project.toml +6 -0
- piperg2p-0.1.1/.ledger/taskledger/config.toml +7 -0
- piperg2p-0.1.1/.pre-commit-config.yaml +64 -0
- piperg2p-0.1.1/LICENSE +201 -0
- piperg2p-0.1.1/PKG-INFO +141 -0
- piperg2p-0.1.1/README.md +102 -0
- piperg2p-0.1.1/benchmarks/__init__.py +0 -0
- piperg2p-0.1.1/benchmarks/benchmark_espeak.py +214 -0
- piperg2p-0.1.1/benchmarks/benchmark_reference.py +230 -0
- piperg2p-0.1.1/benchmarks/data/core.json +133 -0
- piperg2p-0.1.1/benchmarks/data/espeak_core.json +13 -0
- piperg2p-0.1.1/benchmarks/data/espeak_sentences.json +19 -0
- piperg2p-0.1.1/benchmarks/data/piper_compose.json +10 -0
- piperg2p-0.1.1/benchmarks/goldens/.gitkeep +0 -0
- piperg2p-0.1.1/benchmarks/goldens/espeak_ipa3_en-us.json +13 -0
- piperg2p-0.1.1/benchmarks/reference/__init__.py +3 -0
- piperg2p-0.1.1/benchmarks/reference/candidate.py +34 -0
- piperg2p-0.1.1/benchmarks/reference/compare.py +77 -0
- piperg2p-0.1.1/benchmarks/reference/corpus.py +16 -0
- piperg2p-0.1.1/benchmarks/reference/espeak.py +99 -0
- piperg2p-0.1.1/benchmarks/reference/golden.py +19 -0
- piperg2p-0.1.1/benchmarks/reference/report.py +36 -0
- piperg2p-0.1.1/benchmarks/reference/types.py +23 -0
- piperg2p-0.1.1/docs/README.md +3 -0
- piperg2p-0.1.1/docs/api/backends.md +7 -0
- piperg2p-0.1.1/docs/api/config.md +3 -0
- piperg2p-0.1.1/docs/api/core.md +22 -0
- piperg2p-0.1.1/docs/api/diagnostics.md +3 -0
- piperg2p-0.1.1/docs/changelog.md +30 -0
- piperg2p-0.1.1/docs/compatibility.md +15 -0
- piperg2p-0.1.1/docs/contributing.md +10 -0
- piperg2p-0.1.1/docs/encoding.md +11 -0
- piperg2p-0.1.1/docs/espeak.md +14 -0
- piperg2p-0.1.1/docs/index.md +18 -0
- piperg2p-0.1.1/docs/installation.md +53 -0
- piperg2p-0.1.1/docs/lexicons.md +87 -0
- piperg2p-0.1.1/docs/phoneme-types.md +15 -0
- piperg2p-0.1.1/docs/provenance.md +23 -0
- piperg2p-0.1.1/docs/quickstart.md +66 -0
- piperg2p-0.1.1/docs/raw-phonemes.md +45 -0
- piperg2p-0.1.1/docs/reference-benchmark.md +40 -0
- piperg2p-0.1.1/docs/voice-config.md +14 -0
- piperg2p-0.1.1/examples/README.md +14 -0
- piperg2p-0.1.1/examples/_common.py +19 -0
- piperg2p-0.1.1/examples/cache_and_batch.py +13 -0
- piperg2p-0.1.1/examples/debug_mode_demo.py +13 -0
- piperg2p-0.1.1/examples/demo_both_features.py +14 -0
- piperg2p-0.1.1/examples/espeak_fallback.py +11 -0
- piperg2p-0.1.1/examples/explicit_language_spans.py +14 -0
- piperg2p-0.1.1/examples/external_annotations.py +14 -0
- piperg2p-0.1.1/examples/lexicon_selection.py +7 -0
- piperg2p-0.1.1/examples/marker_demo.py +16 -0
- piperg2p-0.1.1/examples/mixed_language_auto.py +16 -0
- piperg2p-0.1.1/examples/new_api_demo.py +15 -0
- piperg2p-0.1.1/examples/result_inspection.py +16 -0
- piperg2p-0.1.1/examples/structured_stress.py +13 -0
- piperg2p-0.1.1/piperg2p/__init__.py +156 -0
- piperg2p-0.1.1/piperg2p/api.py +306 -0
- piperg2p-0.1.1/piperg2p/backends/__init__.py +13 -0
- piperg2p-0.1.1/piperg2p/backends/base.py +14 -0
- piperg2p-0.1.1/piperg2p/backends/espeak/__init__.py +19 -0
- piperg2p-0.1.1/piperg2p/backends/espeak/backend.py +122 -0
- piperg2p-0.1.1/piperg2p/backends/espeak/base.py +9 -0
- piperg2p-0.1.1/piperg2p/backends/espeak/clauses.py +81 -0
- piperg2p-0.1.1/piperg2p/backends/espeak/cli.py +71 -0
- piperg2p-0.1.1/piperg2p/backends/espeak/discovery.py +140 -0
- piperg2p-0.1.1/piperg2p/backends/espeak/manager.py +5 -0
- piperg2p-0.1.1/piperg2p/backends/espeak/native.py +224 -0
- piperg2p-0.1.1/piperg2p/backends/text.py +22 -0
- piperg2p-0.1.1/piperg2p/cache.py +87 -0
- piperg2p-0.1.1/piperg2p/codec.py +170 -0
- piperg2p-0.1.1/piperg2p/config.py +274 -0
- piperg2p-0.1.1/piperg2p/diagnostics.py +34 -0
- piperg2p-0.1.1/piperg2p/errors.py +75 -0
- piperg2p-0.1.1/piperg2p/frontend.py +202 -0
- piperg2p-0.1.1/piperg2p/language_routing.py +65 -0
- piperg2p-0.1.1/piperg2p/lexicons/__init__.py +27 -0
- piperg2p-0.1.1/piperg2p/lexicons/base.py +93 -0
- piperg2p-0.1.1/piperg2p/lexicons/g2lex.py +194 -0
- piperg2p-0.1.1/piperg2p/lexicons/lexphon.py +173 -0
- piperg2p-0.1.1/piperg2p/lexicons/overlay.py +193 -0
- piperg2p-0.1.1/piperg2p/lexicons/registry.py +112 -0
- piperg2p-0.1.1/piperg2p/lexicons/spans.py +63 -0
- piperg2p-0.1.1/piperg2p/markers.py +71 -0
- piperg2p-0.1.1/piperg2p/raw_blocks.py +157 -0
- piperg2p-0.1.1/piperg2p/registry.py +56 -0
- piperg2p-0.1.1/piperg2p/spans.py +301 -0
- piperg2p-0.1.1/piperg2p/stress.py +32 -0
- piperg2p-0.1.1/piperg2p/types.py +184 -0
- piperg2p-0.1.1/piperg2p.egg-info/PKG-INFO +141 -0
- piperg2p-0.1.1/piperg2p.egg-info/SOURCES.txt +174 -0
- piperg2p-0.1.1/piperg2p.egg-info/dependency_links.txt +1 -0
- piperg2p-0.1.1/piperg2p.egg-info/requires.txt +24 -0
- piperg2p-0.1.1/piperg2p.egg-info/scm_file_list.json +171 -0
- piperg2p-0.1.1/piperg2p.egg-info/scm_version.json +8 -0
- piperg2p-0.1.1/piperg2p.egg-info/top_level.txt +1 -0
- piperg2p-0.1.1/pyproject.toml +68 -0
- piperg2p-0.1.1/setup.cfg +4 -0
- piperg2p-0.1.1/tests/test_annotations.py +22 -0
- piperg2p-0.1.1/tests/test_benchmark_reference.py +61 -0
- piperg2p-0.1.1/tests/test_cache.py +43 -0
- piperg2p-0.1.1/tests/test_clause_backend.py +96 -0
- piperg2p-0.1.1/tests/test_codec.py +33 -0
- piperg2p-0.1.1/tests/test_codec_contracts.py +61 -0
- piperg2p-0.1.1/tests/test_config.py +93 -0
- piperg2p-0.1.1/tests/test_dependency_contract.py +32 -0
- piperg2p-0.1.1/tests/test_espeak_backend_selection.py +128 -0
- piperg2p-0.1.1/tests/test_espeak_benchmark.py +70 -0
- piperg2p-0.1.1/tests/test_espeak_exact_contract.py +86 -0
- piperg2p-0.1.1/tests/test_examples.py +10 -0
- piperg2p-0.1.1/tests/test_examples_contract.py +33 -0
- piperg2p-0.1.1/tests/test_ids_to_phonemes.py +34 -0
- piperg2p-0.1.1/tests/test_independence.py +8 -0
- piperg2p-0.1.1/tests/test_language_routing.py +20 -0
- piperg2p-0.1.1/tests/test_lexicon_adapters.py +206 -0
- piperg2p-0.1.1/tests/test_lexicon_overlay.py +139 -0
- piperg2p-0.1.1/tests/test_lexicon_overlay_extra.py +108 -0
- piperg2p-0.1.1/tests/test_lexicon_spans.py +24 -0
- piperg2p-0.1.1/tests/test_markers.py +29 -0
- piperg2p-0.1.1/tests/test_overrides.py +40 -0
- piperg2p-0.1.1/tests/test_public_api_consistency.py +25 -0
- piperg2p-0.1.1/tests/test_raw_frontend.py +61 -0
- piperg2p-0.1.1/tests/test_raw_spacing.py +37 -0
- piperg2p-0.1.1/tests/test_real_optional_integration.py +60 -0
- piperg2p-0.1.1/tests/test_semantic_ownership.py +62 -0
- piperg2p-0.1.1/tests/test_stress.py +17 -0
- piperg2p-0.1.1/tests/test_tokenize.py +16 -0
- piperg2p-0.1.1/tests/test_version.py +14 -0
- piperg2p-0.1.1/tools/check_release_artifacts.py +115 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
[codecrate]
|
|
2
|
+
output = "context_piperg2p.md"
|
|
3
|
+
keep_docstrings = true
|
|
4
|
+
dedupe = true
|
|
5
|
+
respect_gitignore = true
|
|
6
|
+
exclude = ["*/.venv/*", "context_piperg2p.*"]
|
|
7
|
+
include = [
|
|
8
|
+
"**/*.py",
|
|
9
|
+
"**/*.json",
|
|
10
|
+
"**/*.toml",
|
|
11
|
+
"**/*.rst",
|
|
12
|
+
"**/*.md",
|
|
13
|
+
"**/*.yaml",
|
|
14
|
+
"**/*.yml",
|
|
15
|
+
"**/py.typed",
|
|
16
|
+
"**/NOTICE",
|
|
17
|
+
"**/NOTICE.*",
|
|
18
|
+
"**/MANIFEST.in",
|
|
19
|
+
"LICENSE*",
|
|
20
|
+
]
|
|
21
|
+
split_max_chars = 2500000
|
|
22
|
+
layout = "full"
|
|
23
|
+
profile = "portable-agent"
|
|
24
|
+
emit_standalone_unpacker = true
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
name: Coverage
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
pull_request:
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
run:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v4
|
|
15
|
+
- name: Setup Python
|
|
16
|
+
uses: actions/setup-python@v5
|
|
17
|
+
with:
|
|
18
|
+
python-version: "3.12"
|
|
19
|
+
- name: Install dependencies
|
|
20
|
+
run: |
|
|
21
|
+
python -m pip install --upgrade pip
|
|
22
|
+
python -m pip install -e ".[dev]"
|
|
23
|
+
- name: Generate coverage report
|
|
24
|
+
run: python -m pytest --cov=piperg2p --cov-branch --cov-report=term-missing --cov-report=xml --cov-fail-under=80
|
|
25
|
+
- name: Upload coverage to Codecov
|
|
26
|
+
uses: codecov/codecov-action@v5
|
|
27
|
+
with:
|
|
28
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
name: pre-commit
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
push:
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
pre-commit:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
|
|
17
|
+
- uses: actions/setup-python@v5
|
|
18
|
+
with:
|
|
19
|
+
python-version: "3.13"
|
|
20
|
+
|
|
21
|
+
- name: Install Python tools
|
|
22
|
+
run: |
|
|
23
|
+
python -m pip install --upgrade pip
|
|
24
|
+
python -m pip install "ruff==0.16.0"
|
|
25
|
+
|
|
26
|
+
- uses: pre-commit/action@v3.0.1
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
name: Upload Python Package
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
concurrency:
|
|
11
|
+
group: pypi-${{ github.event.release.tag_name }}
|
|
12
|
+
cancel-in-progress: false
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
build:
|
|
16
|
+
name: Build release distributions
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
timeout-minutes: 15
|
|
19
|
+
steps:
|
|
20
|
+
- name: Check out release tag
|
|
21
|
+
uses: actions/checkout@v7
|
|
22
|
+
with:
|
|
23
|
+
ref: ${{ github.event.release.tag_name }}
|
|
24
|
+
fetch-depth: 0
|
|
25
|
+
persist-credentials: false
|
|
26
|
+
|
|
27
|
+
- name: Set up Python
|
|
28
|
+
uses: actions/setup-python@v7
|
|
29
|
+
with:
|
|
30
|
+
python-version: "3.13"
|
|
31
|
+
|
|
32
|
+
- name: Resolve release version
|
|
33
|
+
id: release
|
|
34
|
+
env:
|
|
35
|
+
RELEASE_TAG: ${{ github.event.release.tag_name }}
|
|
36
|
+
shell: bash
|
|
37
|
+
run: |
|
|
38
|
+
set -euo pipefail
|
|
39
|
+
|
|
40
|
+
if [[ ! "$RELEASE_TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+([a-zA-Z0-9.-]+)?$ ]]; then
|
|
41
|
+
echo "::error::Unsupported release tag '$RELEASE_TAG'; expected v<version>"
|
|
42
|
+
exit 1
|
|
43
|
+
fi
|
|
44
|
+
|
|
45
|
+
RELEASE_VERSION="${RELEASE_TAG#v}"
|
|
46
|
+
echo "version=$RELEASE_VERSION" >> "$GITHUB_OUTPUT"
|
|
47
|
+
|
|
48
|
+
- name: Install build tooling
|
|
49
|
+
run: python -m pip install --upgrade pip build twine packaging
|
|
50
|
+
|
|
51
|
+
- name: Build package
|
|
52
|
+
run: |
|
|
53
|
+
rm -rf dist
|
|
54
|
+
python -m build --sdist --wheel
|
|
55
|
+
|
|
56
|
+
- name: Validate release artifacts
|
|
57
|
+
env:
|
|
58
|
+
RELEASE_VERSION: ${{ steps.release.outputs.version }}
|
|
59
|
+
run: |
|
|
60
|
+
python tools/check_release_artifacts.py \
|
|
61
|
+
dist \
|
|
62
|
+
--expected-version "$RELEASE_VERSION"
|
|
63
|
+
python -m twine check dist/*
|
|
64
|
+
|
|
65
|
+
- name: Verify release semantic-dependency isolation
|
|
66
|
+
run: |
|
|
67
|
+
python -m venv /tmp/piperg2p-release-test
|
|
68
|
+
/tmp/piperg2p-release-test/bin/python -m pip install --upgrade pip
|
|
69
|
+
/tmp/piperg2p-release-test/bin/python -m pip install dist/*.whl
|
|
70
|
+
/tmp/piperg2p-release-test/bin/python - <<'PY'
|
|
71
|
+
from importlib.metadata import PackageNotFoundError, version
|
|
72
|
+
|
|
73
|
+
import piperg2p
|
|
74
|
+
|
|
75
|
+
for package in ("numeralform", "spokenform"):
|
|
76
|
+
try:
|
|
77
|
+
installed = version(package)
|
|
78
|
+
except PackageNotFoundError:
|
|
79
|
+
continue
|
|
80
|
+
raise AssertionError(
|
|
81
|
+
f"{package} must not be installed as a PiperG2P dependency: {installed}"
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
print("piperg2p", piperg2p.__version__)
|
|
85
|
+
PY
|
|
86
|
+
- name: Upload validated release distributions
|
|
87
|
+
uses: actions/upload-artifact@v7
|
|
88
|
+
with:
|
|
89
|
+
name: release-dists-${{ github.event.release.tag_name }}
|
|
90
|
+
path: dist/*
|
|
91
|
+
if-no-files-found: error
|
|
92
|
+
retention-days: 7
|
|
93
|
+
|
|
94
|
+
publish:
|
|
95
|
+
name: Publish release to PyPI
|
|
96
|
+
needs: build
|
|
97
|
+
runs-on: ubuntu-latest
|
|
98
|
+
timeout-minutes: 10
|
|
99
|
+
permissions:
|
|
100
|
+
contents: read
|
|
101
|
+
id-token: write
|
|
102
|
+
steps:
|
|
103
|
+
- name: Download validated release distributions
|
|
104
|
+
uses: actions/download-artifact@v8
|
|
105
|
+
with:
|
|
106
|
+
name: release-dists-${{ github.event.release.tag_name }}
|
|
107
|
+
path: dist
|
|
108
|
+
|
|
109
|
+
- name: Publish package to PyPI
|
|
110
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
111
|
+
with:
|
|
112
|
+
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
113
|
+
attestations: false
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
name: test
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
pull_request:
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
core:
|
|
9
|
+
runs-on: ${{ matrix.os }}
|
|
10
|
+
strategy:
|
|
11
|
+
fail-fast: false
|
|
12
|
+
matrix:
|
|
13
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
14
|
+
python: ['3.10', '3.11', '3.12', '3.13']
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
with:
|
|
18
|
+
fetch-depth: 0
|
|
19
|
+
- uses: actions/setup-python@v5
|
|
20
|
+
with:
|
|
21
|
+
python-version: ${{ matrix.python }}
|
|
22
|
+
- run: python -m pip install --upgrade pip
|
|
23
|
+
- run: python -m pip install -e '.[dev]'
|
|
24
|
+
- run: python -m pytest -q
|
|
25
|
+
- run: python -m build
|
|
26
|
+
|
|
27
|
+
espeak-exact:
|
|
28
|
+
runs-on: ubuntu-latest
|
|
29
|
+
steps:
|
|
30
|
+
- uses: actions/checkout@v4
|
|
31
|
+
with:
|
|
32
|
+
fetch-depth: 0
|
|
33
|
+
- uses: actions/setup-python@v5
|
|
34
|
+
with:
|
|
35
|
+
python-version: '3.12'
|
|
36
|
+
- run: sudo apt-get update
|
|
37
|
+
- run: sudo apt-get install --yes espeak-ng libespeak-ng-dev
|
|
38
|
+
- run: python -m pip install --upgrade pip
|
|
39
|
+
- run: python -m pip install -e '.[dev]'
|
|
40
|
+
- run: python -m pytest -q tests/test_clause_backend.py tests/test_espeak_exact_contract.py tests/test_real_optional_integration.py
|
|
41
|
+
- run: espeak-ng --version
|
|
42
|
+
- run: python benchmarks/benchmark_espeak.py --quick --suite core --candidate cli --reference-source golden --golden benchmarks/goldens/espeak_ipa3_en-us.json --format summary
|
|
43
|
+
- run: ruff check .
|
|
44
|
+
- run: python -m build
|
|
45
|
+
|
|
46
|
+
lexicons:
|
|
47
|
+
runs-on: ubuntu-latest
|
|
48
|
+
steps:
|
|
49
|
+
- uses: actions/checkout@v4
|
|
50
|
+
with:
|
|
51
|
+
fetch-depth: 0
|
|
52
|
+
- uses: actions/setup-python@v5
|
|
53
|
+
with:
|
|
54
|
+
python-version: '3.12'
|
|
55
|
+
- run: python -m pip install --upgrade pip
|
|
56
|
+
- run: python -m pip install -e '.[dev,lexicons]'
|
|
57
|
+
- run: python -m pytest -q tests/test_lexicon_adapters.py tests/test_lexicon_spans.py tests/test_lexicon_overlay.py tests/test_lexicon_overlay_extra.py tests/test_real_optional_integration.py
|
|
58
|
+
- run: ruff check .
|
|
59
|
+
|
|
60
|
+
direct-g2lex:
|
|
61
|
+
runs-on: ubuntu-latest
|
|
62
|
+
steps:
|
|
63
|
+
- uses: actions/checkout@v4
|
|
64
|
+
with:
|
|
65
|
+
fetch-depth: 0
|
|
66
|
+
- uses: actions/setup-python@v5
|
|
67
|
+
with:
|
|
68
|
+
python-version: '3.12'
|
|
69
|
+
- run: python -m pip install --upgrade pip
|
|
70
|
+
- run: python -m pip install -e '.[dev,g2lex]'
|
|
71
|
+
- run: python -m pytest -q tests/test_lexicon_adapters.py tests/test_real_optional_integration.py
|
|
72
|
+
- run: ruff check .
|
|
73
|
+
|
|
74
|
+
reference:
|
|
75
|
+
runs-on: ubuntu-latest
|
|
76
|
+
steps:
|
|
77
|
+
- uses: actions/checkout@v4
|
|
78
|
+
with:
|
|
79
|
+
fetch-depth: 0
|
|
80
|
+
- uses: actions/setup-python@v5
|
|
81
|
+
with:
|
|
82
|
+
python-version: '3.12'
|
|
83
|
+
- run: python -m pip install -e '.[dev]'
|
|
84
|
+
- run: python benchmarks/benchmark_reference.py --output reference-report.json
|
|
85
|
+
- uses: actions/upload-artifact@v4
|
|
86
|
+
with:
|
|
87
|
+
name: reference-report
|
|
88
|
+
path: reference-report.json
|
|
89
|
+
|
|
90
|
+
artifact:
|
|
91
|
+
needs: [core, direct-g2lex, reference]
|
|
92
|
+
runs-on: ubuntu-latest
|
|
93
|
+
steps:
|
|
94
|
+
- uses: actions/checkout@v4
|
|
95
|
+
with:
|
|
96
|
+
fetch-depth: 0
|
|
97
|
+
- uses: actions/setup-python@v5
|
|
98
|
+
with:
|
|
99
|
+
python-version: '3.12'
|
|
100
|
+
- run: python -m pip install --upgrade pip
|
|
101
|
+
- run: python -m pip install -e '.[dev]'
|
|
102
|
+
- run: rm -rf dist && python -m build
|
|
103
|
+
- run: python tools/check_release_artifacts.py dist
|
|
104
|
+
- run: python -m twine check dist/*
|
|
105
|
+
- run: python -m venv /tmp/piperg2p-wheel-test
|
|
106
|
+
- run: /tmp/piperg2p-wheel-test/bin/python -m pip install --no-deps dist/*.whl
|
|
107
|
+
- run: >-
|
|
108
|
+
/tmp/piperg2p-wheel-test/bin/python -c
|
|
109
|
+
"from importlib.metadata import version; import piperg2p; assert piperg2p.__version__ == version('piperg2p'); print(piperg2p.__version__)"
|
|
110
|
+
- run: >-
|
|
111
|
+
/tmp/piperg2p-wheel-test/bin/python -c
|
|
112
|
+
"from piperg2p import PiperFrontend, VoiceConfig; print(PiperFrontend(VoiceConfig.from_dict({'phoneme_type': 'text', 'num_symbols': 4, 'num_speakers': 1, 'audio': {'sample_rate': 22050}, 'phoneme_id_map': {'_': 0, '^': 1, '$': 2, 'a': 3}})).phonemize('a').ids)"
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
- name: Verify wheel semantic-dependency isolation
|
|
117
|
+
run: |
|
|
118
|
+
python -m venv /tmp/piperg2p-wheel-deps
|
|
119
|
+
/tmp/piperg2p-wheel-deps/bin/python -m pip install --upgrade pip
|
|
120
|
+
/tmp/piperg2p-wheel-deps/bin/python -m pip install dist/*.whl
|
|
121
|
+
/tmp/piperg2p-wheel-deps/bin/python - <<'PY'
|
|
122
|
+
from importlib.metadata import PackageNotFoundError, version
|
|
123
|
+
import piperg2p
|
|
124
|
+
|
|
125
|
+
for package in ("numeralform", "spokenform"):
|
|
126
|
+
try:
|
|
127
|
+
installed = version(package)
|
|
128
|
+
except PackageNotFoundError:
|
|
129
|
+
continue
|
|
130
|
+
raise AssertionError(
|
|
131
|
+
f"{package} must not be installed as a PiperG2P dependency: {installed}"
|
|
132
|
+
)
|
|
133
|
+
|
|
134
|
+
print("piperg2p", piperg2p.__version__)
|
|
135
|
+
PY
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py.cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
88
|
+
# .python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
# Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# UV
|
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
100
|
+
# commonly ignored for libraries.
|
|
101
|
+
# uv.lock
|
|
102
|
+
|
|
103
|
+
# poetry
|
|
104
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
105
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
106
|
+
# commonly ignored for libraries.
|
|
107
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
108
|
+
# poetry.lock
|
|
109
|
+
# poetry.toml
|
|
110
|
+
|
|
111
|
+
# pdm
|
|
112
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
113
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
114
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
115
|
+
# pdm.lock
|
|
116
|
+
# pdm.toml
|
|
117
|
+
.pdm-python
|
|
118
|
+
.pdm-build/
|
|
119
|
+
|
|
120
|
+
# pixi
|
|
121
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
122
|
+
# pixi.lock
|
|
123
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
124
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
125
|
+
.pixi
|
|
126
|
+
|
|
127
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
128
|
+
__pypackages__/
|
|
129
|
+
|
|
130
|
+
# Celery stuff
|
|
131
|
+
celerybeat-schedule
|
|
132
|
+
celerybeat.pid
|
|
133
|
+
|
|
134
|
+
# Redis
|
|
135
|
+
*.rdb
|
|
136
|
+
*.aof
|
|
137
|
+
*.pid
|
|
138
|
+
|
|
139
|
+
# RabbitMQ
|
|
140
|
+
mnesia/
|
|
141
|
+
rabbitmq/
|
|
142
|
+
rabbitmq-data/
|
|
143
|
+
|
|
144
|
+
# ActiveMQ
|
|
145
|
+
activemq-data/
|
|
146
|
+
|
|
147
|
+
# SageMath parsed files
|
|
148
|
+
*.sage.py
|
|
149
|
+
|
|
150
|
+
# Environments
|
|
151
|
+
.env
|
|
152
|
+
.envrc
|
|
153
|
+
.venv
|
|
154
|
+
env/
|
|
155
|
+
venv/
|
|
156
|
+
ENV/
|
|
157
|
+
env.bak/
|
|
158
|
+
venv.bak/
|
|
159
|
+
|
|
160
|
+
# Spyder project settings
|
|
161
|
+
.spyderproject
|
|
162
|
+
.spyproject
|
|
163
|
+
|
|
164
|
+
# Rope project settings
|
|
165
|
+
.ropeproject
|
|
166
|
+
|
|
167
|
+
# mkdocs documentation
|
|
168
|
+
/site
|
|
169
|
+
|
|
170
|
+
# mypy
|
|
171
|
+
.mypy_cache/
|
|
172
|
+
.dmypy.json
|
|
173
|
+
dmypy.json
|
|
174
|
+
|
|
175
|
+
# Pyre type checker
|
|
176
|
+
.pyre/
|
|
177
|
+
|
|
178
|
+
# pytype static type analyzer
|
|
179
|
+
.pytype/
|
|
180
|
+
|
|
181
|
+
# Cython debug symbols
|
|
182
|
+
cython_debug/
|
|
183
|
+
|
|
184
|
+
# PyCharm
|
|
185
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
186
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
187
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
188
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
189
|
+
# .idea/
|
|
190
|
+
|
|
191
|
+
# Abstra
|
|
192
|
+
# Abstra is an AI-powered process automation framework.
|
|
193
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
194
|
+
# Learn more at https://abstra.io/docs
|
|
195
|
+
.abstra/
|
|
196
|
+
|
|
197
|
+
# Visual Studio Code
|
|
198
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
199
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
200
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
201
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
202
|
+
# .vscode/
|
|
203
|
+
# Temporary file for partial code execution
|
|
204
|
+
tempCodeRunnerFile.py
|
|
205
|
+
|
|
206
|
+
# Ruff stuff:
|
|
207
|
+
.ruff_cache/
|
|
208
|
+
|
|
209
|
+
# PyPI configuration file
|
|
210
|
+
.pypirc
|
|
211
|
+
|
|
212
|
+
# Marimo
|
|
213
|
+
marimo/_static/
|
|
214
|
+
marimo/_lsp/
|
|
215
|
+
__marimo__/
|
|
216
|
+
|
|
217
|
+
# Streamlit
|
|
218
|
+
.streamlit/secrets.toml
|
|
219
|
+
context_piperg2p*.*
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
schema_version = 3
|
|
2
|
+
|
|
3
|
+
[project]
|
|
4
|
+
uuid = "a4becda2-bf20-4ebf-ae03-69d9792fad7f"
|
|
5
|
+
name = "piperg2p"
|
|
6
|
+
|
|
7
|
+
[ledgers.taskledger.mounts.data]
|
|
8
|
+
storage = "external"
|
|
9
|
+
root = "../ledger"
|
|
10
|
+
|
|
11
|
+
[ledgers.taskledger.mounts.runtime]
|
|
12
|
+
storage = "user-data"
|
|
13
|
+
|
|
14
|
+
[ledgers.taskledger.mounts.logs]
|
|
15
|
+
storage = "user-data"
|
|
16
|
+
|
|
17
|
+
[ledgers.taskledger.mounts.indexes]
|
|
18
|
+
storage = "cache"
|
|
19
|
+
|
|
20
|
+
[ledgers.releaseledger.mounts.data]
|
|
21
|
+
storage = "project"
|
|
22
|
+
|
|
23
|
+
[ledgers.releaseledger.mounts.indexes]
|
|
24
|
+
storage = "cache"
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
config_version = 2
|
|
2
|
+
# Branch-scoped release state. This block is safe to commit.
|
|
3
|
+
ledger_ref = "main"
|
|
4
|
+
ledger_parent_ref = ""
|
|
5
|
+
ledger_branch_guard = "off"
|
|
6
|
+
# Cross-ledger identity. Local record IDs stay unchanged.
|
|
7
|
+
|
|
8
|
+
[ledger]
|
|
9
|
+
code = "rl"
|
|
10
|
+
# Release defaults.
|
|
11
|
+
|
|
12
|
+
[release]
|
|
13
|
+
default_changelog = "CHANGELOG.md"
|
|
14
|
+
default_status = "planned"
|
|
15
|
+
allow_dirty_worktree = true
|
|
16
|
+
# Changelog build defaults.
|
|
17
|
+
|
|
18
|
+
[changelog]
|
|
19
|
+
output = "docs/changelog.md"
|
|
20
|
+
header = ""
|
|
21
|
+
body = """## {% if release.date %}[{{ release.version }}] - {{ release.date }}{% else %}[{{ release.version }}] - Unreleased{% endif %}
|
|
22
|
+
|
|
23
|
+
{% for group in groups %}
|
|
24
|
+
### {{ group.title }}
|
|
25
|
+
{% for entry in group.entries %}
|
|
26
|
+
- {% if entry.breaking %}**BREAKING:** {% endif %}{{ entry.summary }}
|
|
27
|
+
{% endfor %}
|
|
28
|
+
|
|
29
|
+
{% endfor %}
|
|
30
|
+
"""
|
|
31
|
+
footer = "<!-- generated by releaseledger -->"
|
|
32
|
+
trim = true
|
|
33
|
+
render_always = false
|
|
34
|
+
postprocessors = []
|
|
35
|
+
standard = ""
|
|
36
|
+
group_mode = "extended"
|
|
37
|
+
link_references = false
|
|
38
|
+
repository_url = ""
|
|
39
|
+
tag_prefix = "v"
|
|
40
|
+
compare_url_template = ""
|
|
41
|
+
release_url_template = ""
|
|
42
|
+
preamble = ""
|
|
43
|
+
semver = false
|
|
44
|
+
unreleased = true
|
|
45
|
+
# Git-first release evidence.
|
|
46
|
+
|
|
47
|
+
[git]
|
|
48
|
+
enabled = true
|
|
49
|
+
default_base = "previous_release_tag"
|
|
50
|
+
default_head = "HEAD"
|
|
51
|
+
previous_tag_patterns = ["v{version}", "{version}"]
|
|
52
|
+
include_merges = "nontrivial"
|
|
53
|
+
require_clean_worktree = false
|
|
54
|
+
max_commits = 500
|
|
55
|
+
max_diff_chars_per_commit = 12000
|
|
56
|
+
candidate_status = "draft"
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{"data":{"status":"planned"},"event":"release.created","event_id":"event-0001","record_revisions":{"release:v0.1.0":1},"release_version":"v0.1.0","schema_version":2}
|
|
2
|
+
{"data":{"fields":["git_base_ref","git_base_sha","git_commit_count","git_head_ref","git_head_sha","git_range"]},"event":"release.updated","event_id":"event-0002","record_revisions":{"release:v0.1.0":2},"release_version":"v0.1.0","schema_version":2}
|
|
3
|
+
{"data":{"row_count":16},"event":"audit.created","event_id":"event-0003","record_revisions":{"commit_audit_sheet":1},"release_version":"v0.1.0","schema_version":2}
|
|
4
|
+
{"data":{"updated_rows":16},"event":"audit.updated","event_id":"event-0004","record_revisions":{"commit_audit_sheet":2},"release_version":"v0.1.0","schema_version":2}
|
|
5
|
+
{"data":{"entry_ids":["entry-0001","entry-0002","entry-0003","entry-0004","entry-0005","entry-0006","entry-0007","entry-0008","entry-0009","entry-0010","entry-0011","entry-0012","entry-0013"],"synced_audit_rows":16},"event":"entry.batch_added","event_id":"event-0005","record_revisions":{"commit_audit_sheet":3,"entry:v0.1.0/entry-0001":1,"entry:v0.1.0/entry-0002":1,"entry:v0.1.0/entry-0003":1,"entry:v0.1.0/entry-0004":1,"entry:v0.1.0/entry-0005":1,"entry:v0.1.0/entry-0006":1,"entry:v0.1.0/entry-0007":1,"entry:v0.1.0/entry-0008":1,"entry:v0.1.0/entry-0009":1,"entry:v0.1.0/entry-0010":1,"entry:v0.1.0/entry-0011":1,"entry:v0.1.0/entry-0012":1,"entry:v0.1.0/entry-0013":1,"release:v0.1.0":3},"release_version":"v0.1.0","schema_version":2}
|
|
6
|
+
{"data":{"released_at":"2026-09-13"},"event":"release.finalized","event_id":"event-0006","record_revisions":{"release:v0.1.0":4},"release_version":"v0.1.0","schema_version":2}
|