kittensynth 0.1.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.
Files changed (47) hide show
  1. kittensynth-0.1.0/.codecrate.toml +24 -0
  2. kittensynth-0.1.0/.github/workflows/python-publish.yml +62 -0
  3. kittensynth-0.1.0/.github/workflows/test.yml +25 -0
  4. kittensynth-0.1.0/.gitignore +220 -0
  5. kittensynth-0.1.0/.ledger/ledger.toml +24 -0
  6. kittensynth-0.1.0/.ledger/releaseledger/.ledger-project.toml +6 -0
  7. kittensynth-0.1.0/.ledger/releaseledger/config.toml +57 -0
  8. kittensynth-0.1.0/.ledger/releaseledger/data/.ledger-project.toml +6 -0
  9. kittensynth-0.1.0/.ledger/taskledger/.ledger-project.toml +6 -0
  10. kittensynth-0.1.0/.ledger/taskledger/config.toml +7 -0
  11. kittensynth-0.1.0/.pre-commit-config.yaml +64 -0
  12. kittensynth-0.1.0/LICENSE +201 -0
  13. kittensynth-0.1.0/NOTICE +4 -0
  14. kittensynth-0.1.0/PKG-INFO +189 -0
  15. kittensynth-0.1.0/README.md +148 -0
  16. kittensynth-0.1.0/docs/Makefile +32 -0
  17. kittensynth-0.1.0/docs/architecture.md +31 -0
  18. kittensynth-0.1.0/docs/conf.py +101 -0
  19. kittensynth-0.1.0/docs/make.bat +113 -0
  20. kittensynth-0.1.0/docs/make.py +89 -0
  21. kittensynth-0.1.0/docs/onnxvoice-contract.md +29 -0
  22. kittensynth-0.1.0/docs/requirements.txt +5 -0
  23. kittensynth-0.1.0/kittensynth/__init__.py +24 -0
  24. kittensynth-0.1.0/kittensynth/__main__.py +33 -0
  25. kittensynth-0.1.0/kittensynth/_onnxvoice.py +195 -0
  26. kittensynth-0.1.0/kittensynth/config.py +17 -0
  27. kittensynth-0.1.0/kittensynth/errors.py +22 -0
  28. kittensynth-0.1.0/kittensynth/py.typed +0 -0
  29. kittensynth-0.1.0/kittensynth/types.py +47 -0
  30. kittensynth-0.1.0/kittensynth/voice.py +199 -0
  31. kittensynth-0.1.0/kittensynth/voice_bank.py +70 -0
  32. kittensynth-0.1.0/kittensynth.egg-info/PKG-INFO +189 -0
  33. kittensynth-0.1.0/kittensynth.egg-info/SOURCES.txt +45 -0
  34. kittensynth-0.1.0/kittensynth.egg-info/dependency_links.txt +1 -0
  35. kittensynth-0.1.0/kittensynth.egg-info/entry_points.txt +2 -0
  36. kittensynth-0.1.0/kittensynth.egg-info/requires.txt +24 -0
  37. kittensynth-0.1.0/kittensynth.egg-info/scm_file_list.json +41 -0
  38. kittensynth-0.1.0/kittensynth.egg-info/scm_version.json +8 -0
  39. kittensynth-0.1.0/kittensynth.egg-info/top_level.txt +1 -0
  40. kittensynth-0.1.0/pyproject.toml +87 -0
  41. kittensynth-0.1.0/setup.cfg +4 -0
  42. kittensynth-0.1.0/tests/test_dependency_boundary.py +15 -0
  43. kittensynth-0.1.0/tests/test_types.py +21 -0
  44. kittensynth-0.1.0/tests/test_version.py +11 -0
  45. kittensynth-0.1.0/tests/test_voice.py +80 -0
  46. kittensynth-0.1.0/tests/test_voice_bank.py +19 -0
  47. kittensynth-0.1.0/tools/check_release_artifacts.py +96 -0
@@ -0,0 +1,24 @@
1
+ [codecrate]
2
+ output = "context_kittensynth.md"
3
+ keep_docstrings = true
4
+ dedupe = true
5
+ respect_gitignore = true
6
+ exclude = ["*/.venv/*", "context_kittensynth.*"]
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,62 @@
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
+ runs-on: ubuntu-latest
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+ with:
20
+ ref: ${{ github.event.release.tag_name }}
21
+ fetch-depth: 0
22
+ - uses: actions/setup-python@v5
23
+ with:
24
+ python-version: "3.13"
25
+ - name: Resolve release version
26
+ id: release
27
+ env:
28
+ RELEASE_TAG: ${{ github.event.release.tag_name }}
29
+ shell: bash
30
+ run: |
31
+ set -euo pipefail
32
+ if [[ ! "$RELEASE_TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+([a-zA-Z0-9.-]+)?$ ]]; then
33
+ echo "::error::Expected release tag v<version>, got '$RELEASE_TAG'"
34
+ exit 1
35
+ fi
36
+ echo "version=${RELEASE_TAG#v}" >> "$GITHUB_OUTPUT"
37
+ - run: python -m pip install --upgrade pip build twine packaging
38
+ - run: rm -rf dist && python -m build --sdist --wheel
39
+ - run: |
40
+ python tools/check_release_artifacts.py dist --expected-version "${{ steps.release.outputs.version }}"
41
+ python -m twine check dist/*
42
+ - uses: actions/upload-artifact@v4
43
+ with:
44
+ name: release-dists-${{ github.event.release.tag_name }}
45
+ path: dist/*
46
+ if-no-files-found: error
47
+
48
+ publish:
49
+ needs: build
50
+ runs-on: ubuntu-latest
51
+ permissions:
52
+ contents: read
53
+ id-token: write
54
+ steps:
55
+ - uses: actions/download-artifact@v4
56
+ with:
57
+ name: release-dists-${{ github.event.release.tag_name }}
58
+ path: dist
59
+ - uses: pypa/gh-action-pypi-publish@v1.14.1
60
+ with:
61
+ password: ${{ secrets.PYPI_API_TOKEN }}
62
+ attestations: false
@@ -0,0 +1,25 @@
1
+ name: test
2
+ on: [push, pull_request]
3
+ permissions:
4
+ contents: read
5
+
6
+ jobs:
7
+ core:
8
+ runs-on: ${{ matrix.os }}
9
+ strategy:
10
+ fail-fast: false
11
+ matrix:
12
+ os: [ubuntu-latest, macos-latest, windows-latest]
13
+ python: ["3.10", "3.12", "3.13"]
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+ with:
17
+ fetch-depth: 0
18
+ - uses: actions/setup-python@v5
19
+ with:
20
+ python-version: ${{ matrix.python }}
21
+ - run: python -m pip install --upgrade pip
22
+ - run: python -m pip install -e ".[dev]"
23
+ - run: python -m pytest
24
+ - run: python -m ruff check kittensynth tests
25
+ - run: python -m build
@@ -0,0 +1,220 @@
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_kittensynth*.*
220
+ kittensynth/_version.py
@@ -0,0 +1,24 @@
1
+ schema_version = 3
2
+
3
+ [project]
4
+ uuid = "75a33862-754f-457b-9a64-f8523b0a42a6"
5
+ name = "kittensynth"
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,6 @@
1
+ schema_version = 1
2
+ layout_version = 3
3
+ project_uuid = "75a33862-754f-457b-9a64-f8523b0a42a6"
4
+ tool = "releaseledger"
5
+ mount = "config"
6
+ storage = "project"
@@ -0,0 +1,57 @@
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
+ tag_creation = "local"
50
+ default_base = "previous_release_tag"
51
+ default_head = "HEAD"
52
+ previous_tag_patterns = ["v{version}", "{version}"]
53
+ include_merges = "nontrivial"
54
+ require_clean_worktree = false
55
+ max_commits = 500
56
+ max_diff_chars_per_commit = 12000
57
+ candidate_status = "draft"
@@ -0,0 +1,6 @@
1
+ schema_version = 1
2
+ layout_version = 3
3
+ project_uuid = "75a33862-754f-457b-9a64-f8523b0a42a6"
4
+ tool = "releaseledger"
5
+ mount = "data"
6
+ storage = "project"
@@ -0,0 +1,6 @@
1
+ schema_version = 1
2
+ layout_version = 3
3
+ project_uuid = "75a33862-754f-457b-9a64-f8523b0a42a6"
4
+ tool = "taskledger"
5
+ mount = "config"
6
+ storage = "project"
@@ -0,0 +1,7 @@
1
+ # Project-local Taskledger configuration.
2
+ # Storage topology belongs to Ledgercore; branch state belongs to data/state.toml.
3
+ config_version = 3
4
+
5
+ [ledger]
6
+ code = 'tl'
7
+ name = 'taskledger'
@@ -0,0 +1,64 @@
1
+ exclude: |
2
+ # NOT INSTALLABLE ADDONS
3
+ # END NOT INSTALLABLE ADDONS
4
+ # Files and folders generated by bots, to avoid loops
5
+ ^setup/|/static/description/index\.html$|
6
+ # We don't want to mess with tool-generated files
7
+ .svg$|/tests/([^/]+/)?cassettes/|^.copier-answers.yml$|^.github/|
8
+ # Maybe reactivate this when all README files include prettier ignore tags?
9
+ ^README\.md$|
10
+ # Repos using Sphinx to generate docs don't need prettying
11
+ ^docs/_templates/.*\.html$|
12
+ # Don't bother non-technical authors with formatting issues in docs
13
+ readme/.*\.(rst|md)$|
14
+ # Ignore build and dist directories in addons
15
+ /build/|/dist/|/dev/|/notebooks/
16
+ # You don't usually want a bot to modify your legal texts
17
+ (LICENSE.*|COPYING.*)|
18
+ default_language_version:
19
+ python: python3
20
+ repos:
21
+ - repo: local
22
+ hooks:
23
+ - id: ruff-check
24
+ name: ruff check
25
+ entry: ruff check --exit-non-zero-on-fix --force-exclude
26
+ language: system
27
+ types_or: [python, pyi]
28
+ - id: ruff-format
29
+ name: ruff format
30
+ entry: ruff format --force-exclude
31
+ language: system
32
+ types_or: [python, pyi]
33
+ - repo: https://github.com/asottile/pyupgrade
34
+ rev: v3.21.2
35
+ hooks:
36
+ - id: pyupgrade
37
+ args: [--py310-plus]
38
+ - repo: https://github.com/pre-commit/pre-commit-hooks
39
+ rev: v6.0.0
40
+ hooks:
41
+ - id: check-toml
42
+ - id: check-yaml
43
+ - id: end-of-file-fixer
44
+ - id: trailing-whitespace
45
+ - id: check-symlinks
46
+ - id: check-xml
47
+ - id: mixed-line-ending
48
+ args: ["--fix=lf"]
49
+ - id: debug-statements
50
+ - id: check-case-conflict
51
+ - id: check-docstring-first
52
+ - id: check-executables-have-shebangs
53
+ - id: check-merge-conflict
54
+ - repo: https://github.com/pre-commit/mirrors-prettier
55
+ rev: v4.0.0-alpha.8
56
+ hooks:
57
+ - id: prettier
58
+ name: prettier (with plugin-xml)
59
+ additional_dependencies:
60
+ - "prettier@2.7.1"
61
+ - "@prettier/plugin-xml@2.2.0"
62
+ args:
63
+ - --plugin=@prettier/plugin-xml
64
+ files: \.(css|htm|html|js|json|jsx|less|md|scss|toml|ts|xml|yaml|yml)$