sphinx-config-schema 0.0.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.
Files changed (42) hide show
  1. sphinx_config_schema-0.0.1/.cspell.json +47 -0
  2. sphinx_config_schema-0.0.1/.editorconfig +17 -0
  3. sphinx_config_schema-0.0.1/.envrc +2 -0
  4. sphinx_config_schema-0.0.1/.github/dependabot.yml +19 -0
  5. sphinx_config_schema-0.0.1/.github/release-drafter.yml +39 -0
  6. sphinx_config_schema-0.0.1/.github/workflows/cd.yml +33 -0
  7. sphinx_config_schema-0.0.1/.github/workflows/ci.yml +36 -0
  8. sphinx_config_schema-0.0.1/.github/workflows/clean-caches.yml +22 -0
  9. sphinx_config_schema-0.0.1/.github/workflows/lock.yml +21 -0
  10. sphinx_config_schema-0.0.1/.github/workflows/pr-linting.yml +14 -0
  11. sphinx_config_schema-0.0.1/.github/workflows/release-drafter.yml +16 -0
  12. sphinx_config_schema-0.0.1/.gitignore +25 -0
  13. sphinx_config_schema-0.0.1/.pre-commit-config.yaml +83 -0
  14. sphinx_config_schema-0.0.1/.prettierignore +1 -0
  15. sphinx_config_schema-0.0.1/.prettierrc.yml +4 -0
  16. sphinx_config_schema-0.0.1/.python-version +1 -0
  17. sphinx_config_schema-0.0.1/.vscode/extensions.json +32 -0
  18. sphinx_config_schema-0.0.1/.vscode/settings.json +43 -0
  19. sphinx_config_schema-0.0.1/LICENSE +21 -0
  20. sphinx_config_schema-0.0.1/PKG-INFO +78 -0
  21. sphinx_config_schema-0.0.1/README.md +47 -0
  22. sphinx_config_schema-0.0.1/docs/.gitignore +1 -0
  23. sphinx_config_schema-0.0.1/docs/_static/favicon.ico +0 -0
  24. sphinx_config_schema-0.0.1/docs/_templates/view-on-github.html +12 -0
  25. sphinx_config_schema-0.0.1/docs/conf.py +105 -0
  26. sphinx_config_schema-0.0.1/docs/example.schema.json +47 -0
  27. sphinx_config_schema-0.0.1/docs/index.md +132 -0
  28. sphinx_config_schema-0.0.1/pyproject.toml +385 -0
  29. sphinx_config_schema-0.0.1/setup.cfg +4 -0
  30. sphinx_config_schema-0.0.1/src/sphinx_config_schema/__init__.py +658 -0
  31. sphinx_config_schema-0.0.1/src/sphinx_config_schema/_static/config-schema.css +12 -0
  32. sphinx_config_schema-0.0.1/src/sphinx_config_schema/py.typed +0 -0
  33. sphinx_config_schema-0.0.1/src/sphinx_config_schema/version.py +24 -0
  34. sphinx_config_schema-0.0.1/src/sphinx_config_schema.egg-info/PKG-INFO +78 -0
  35. sphinx_config_schema-0.0.1/src/sphinx_config_schema.egg-info/SOURCES.txt +40 -0
  36. sphinx_config_schema-0.0.1/src/sphinx_config_schema.egg-info/dependency_links.txt +1 -0
  37. sphinx_config_schema-0.0.1/src/sphinx_config_schema.egg-info/requires.txt +5 -0
  38. sphinx_config_schema-0.0.1/src/sphinx_config_schema.egg-info/scm_file_list.json +36 -0
  39. sphinx_config_schema-0.0.1/src/sphinx_config_schema.egg-info/scm_version.json +8 -0
  40. sphinx_config_schema-0.0.1/src/sphinx_config_schema.egg-info/top_level.txt +1 -0
  41. sphinx_config_schema-0.0.1/tests/test_build.py +150 -0
  42. sphinx_config_schema-0.0.1/tests/test_render.py +93 -0
@@ -0,0 +1,47 @@
1
+ {
2
+ "enableFiletypes": [
3
+ "git-commit",
4
+ "github-actions-workflow",
5
+ "julia",
6
+ "jupyter"
7
+ ],
8
+ "flagWords": [
9
+ "analyse",
10
+ "colour",
11
+ "comparision",
12
+ "favour",
13
+ "flavour",
14
+ "hte",
15
+ "optimise",
16
+ "paramater",
17
+ "parmater",
18
+ "transision",
19
+ "transisions"
20
+ ],
21
+ "ignorePaths": [
22
+ "**/.cspell.json",
23
+ "*.ico",
24
+ ".editorconfig",
25
+ ".envrc",
26
+ ".github/dependabot.yml",
27
+ ".gitignore",
28
+ ".pre-commit-config.yaml",
29
+ ".prettierignore",
30
+ ".vscode/*",
31
+ "docs/_templates/*",
32
+ "docs/conf.py",
33
+ "pyproject.toml"
34
+ ],
35
+ "ignoreWords": [
36
+ "compwa",
37
+ "prereleased",
38
+ "pydantic",
39
+ "pypa",
40
+ "pypi",
41
+ "toctree"
42
+ ],
43
+ "language": "en-US",
44
+ "useGitignore": true,
45
+ "version": "0.2",
46
+ "words": ["docstrings", "pyproject", "rawsource"]
47
+ }
@@ -0,0 +1,17 @@
1
+ root = true
2
+
3
+ [*]
4
+ end_of_line = lf
5
+ indent_size = 2
6
+ indent_style = space
7
+ insert_final_newline = true
8
+ trim_trailing_whitespace = true
9
+
10
+ [*.{py,toml}]
11
+ indent_size = 4
12
+
13
+ [LICENSE]
14
+ indent_size = unset
15
+
16
+ [uv.lock]
17
+ indent_size = 4
@@ -0,0 +1,2 @@
1
+ uv sync --all-extras --quiet
2
+ source .venv/bin/activate
@@ -0,0 +1,19 @@
1
+ version: 2
2
+
3
+ multi-ecosystem-groups:
4
+ lock:
5
+ assignees: [redeboer]
6
+ commit-message: { prefix: MAINT }
7
+ schedule: { interval: quarterly }
8
+
9
+ updates:
10
+ - package-ecosystem: github-actions
11
+ directory: "/"
12
+ labels: [⬆️ Lock]
13
+ multi-ecosystem-group: lock
14
+ patterns: ["*"]
15
+ - package-ecosystem: pre-commit
16
+ directory: "/"
17
+ labels: [⬆️ Lock]
18
+ multi-ecosystem-group: lock
19
+ patterns: ["*"]
@@ -0,0 +1,39 @@
1
+ name-template: sphinx-config-schema $NEXT_PATCH_VERSION
2
+ tag-template: $NEXT_PATCH_VERSION
3
+
4
+ references:
5
+ - main
6
+ - epic/*
7
+
8
+ categories:
9
+ - title: ✨ New features
10
+ label: ✨ Feature
11
+ - title: ⚠️ Enhancements and optimizations
12
+ label: ⚙️ Enhancement
13
+ - title: ⚠️ API changes
14
+ label: ⚠️ Interface
15
+ - title: ⚠️ Changes that may affect behavior
16
+ label: ❗ Behavior
17
+ - title: 🐛 Bug fixes
18
+ label: 🐛 Bug
19
+ - title: 📝 Documentation
20
+ label: 📝 Docs
21
+ - title: 🔨 Maintenance
22
+ labels:
23
+ - 🔨 Maintenance
24
+ - ⬆️ Lock
25
+ - title: 🖱️ Developer Experience
26
+ label: 🖱️ DX
27
+
28
+ change-template: "- $TITLE (#$NUMBER)"
29
+
30
+ replacers:
31
+ - search: /([A-Z]+!?:\s*)(.*)/g
32
+ replace: $2
33
+
34
+ sort-direction: ascending
35
+
36
+ template: |
37
+ $CHANGES
38
+
39
+ _The full changelog as commits can be found [here](https://github.com/ComPWA/sphinx-config-schema/compare/$PREVIOUS_TAG...$NEXT_PATCH_VERSION)._
@@ -0,0 +1,33 @@
1
+ name: CD
2
+
3
+ on:
4
+ release:
5
+ types:
6
+ - prereleased
7
+ - released
8
+
9
+ jobs:
10
+ milestone:
11
+ if: startsWith(github.ref, 'refs/tags')
12
+ uses: ComPWA/actions/.github/workflows/close-milestone.yml@483174d7f7f9c0ddbe59643584fdac25004cf887 # v4.1.7
13
+ package-name:
14
+ uses: ComPWA/actions/.github/workflows/get-pypi-name.yml@483174d7f7f9c0ddbe59643584fdac25004cf887 # v4.1.7
15
+ pypi:
16
+ environment:
17
+ name: PyPI
18
+ url: https://pypi.org/p/${{ needs.package-name.outputs.name }}
19
+ if: startsWith(github.ref, 'refs/tags')
20
+ name: Publish to PyPI
21
+ needs:
22
+ - package-name
23
+ permissions:
24
+ id-token: write
25
+ runs-on: ubuntu-24.04
26
+ steps:
27
+ - uses: ComPWA/actions/build-pypi-distribution@483174d7f7f9c0ddbe59643584fdac25004cf887 # v4.1.7
28
+ - uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3
29
+ push:
30
+ if: startsWith(github.ref, 'refs/tags') && !github.event.release.prerelease
31
+ permissions:
32
+ contents: write
33
+ uses: ComPWA/actions/.github/workflows/push-to-version-branches.yml@483174d7f7f9c0ddbe59643584fdac25004cf887 # v4.1.7
@@ -0,0 +1,36 @@
1
+ name: CI
2
+
3
+ concurrency:
4
+ group: ${{ github.workflow }}-${{ github.ref }}
5
+ cancel-in-progress: |-
6
+ ${{ github.ref != format('refs/heads/{0}', github.event.repository.default_branch) }}
7
+
8
+ on:
9
+ push:
10
+ branches:
11
+ - main
12
+ - epic/*
13
+ - "[0-9]+.[0-9]+.x"
14
+ pull_request:
15
+ branches:
16
+ - main
17
+ - epic/*
18
+ - "[0-9]+.[0-9]+.x"
19
+ workflow_dispatch:
20
+
21
+ jobs:
22
+ doc:
23
+ uses: ComPWA/actions/.github/workflows/ci-docs.yml@483174d7f7f9c0ddbe59643584fdac25004cf887 # v4.1.7
24
+ permissions:
25
+ pages: write
26
+ id-token: write
27
+ with:
28
+ gh-pages: true
29
+ style:
30
+ secrets:
31
+ token: ${{ secrets.PAT }}
32
+ uses: ComPWA/actions/.github/workflows/style.yml@483174d7f7f9c0ddbe59643584fdac25004cf887 # v4.1.7
33
+ test:
34
+ uses: ComPWA/actions/.github/workflows/test.yml@483174d7f7f9c0ddbe59643584fdac25004cf887 # v4.1.7
35
+ with:
36
+ macos-python-version: "3.11"
@@ -0,0 +1,22 @@
1
+ name: Clean caches
2
+
3
+ on:
4
+ pull_request:
5
+ types:
6
+ - closed
7
+ workflow_dispatch:
8
+ inputs:
9
+ ref:
10
+ description: Clean caches for this branch name or ref
11
+ required: false
12
+ type: string
13
+
14
+ jobs:
15
+ cleanup:
16
+ name: Remove caches
17
+ runs-on: ubuntu-slim
18
+ steps:
19
+ - uses: ComPWA/actions/clean-caches@483174d7f7f9c0ddbe59643584fdac25004cf887 # v4.1.7
20
+ with:
21
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22
+ ref: ${{ inputs.ref }}
@@ -0,0 +1,21 @@
1
+ name: Update
2
+
3
+ concurrency:
4
+ group: ${{ github.workflow }}-${{ github.ref }}
5
+ cancel-in-progress: |-
6
+ ${{ github.ref != format('refs/heads/{0}', github.event.repository.default_branch) }}
7
+
8
+ on:
9
+ pull_request:
10
+ branches:
11
+ - main
12
+ - epic/*
13
+ paths:
14
+ - .pre-commit-config.yaml
15
+ workflow_dispatch:
16
+
17
+ jobs:
18
+ lock:
19
+ uses: ComPWA/actions/.github/workflows/lock.yml@483174d7f7f9c0ddbe59643584fdac25004cf887 # v4.1.7
20
+ secrets:
21
+ token: ${{ secrets.PAT }}
@@ -0,0 +1,14 @@
1
+ name: PR linting
2
+ on:
3
+ pull_request:
4
+ types:
5
+ - edited
6
+ - labeled
7
+ - opened
8
+ - reopened
9
+ - synchronize
10
+ - unlabeled
11
+
12
+ jobs:
13
+ lint-pr:
14
+ uses: ComPWA/actions/.github/workflows/pr-linting.yml@483174d7f7f9c0ddbe59643584fdac25004cf887 # v4.1.7
@@ -0,0 +1,16 @@
1
+ name: Release Drafter
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ - epic/*
8
+ workflow_dispatch:
9
+
10
+ jobs:
11
+ update_release_draft:
12
+ runs-on: ubuntu-slim
13
+ steps:
14
+ - uses: release-drafter/release-drafter@978bb0b30c5ee8cdd332ced253758157150d43f0 # v7.10.0
15
+ env:
16
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,25 @@
1
+ __pycache__/
2
+ .agents/
3
+ .claude/
4
+ .codex/
5
+ .coverage
6
+ .coverage.*
7
+ .eggs/
8
+ .fuse_*
9
+ .idea/
10
+ .lycheecache
11
+ .pytest_cache/
12
+ *.egg-info/
13
+ *.pyc
14
+ **.code-workspace
15
+ *build/
16
+ *venv/
17
+ AGENTS.md
18
+ CLAUDE.md
19
+ coverage.xml
20
+ dist/
21
+ htmlcov/
22
+ prof/
23
+ pyvenv*/
24
+ uv.lock
25
+ version.py
@@ -0,0 +1,83 @@
1
+ ci:
2
+ autofix_commit_msg: "MAINT: implement pre-commit autofixes"
3
+ autoupdate_commit_msg: "MAINT: upgrade lock files"
4
+ autoupdate_schedule: quarterly
5
+ skip:
6
+ - tombi-format
7
+ - tombi-lint
8
+ - ty
9
+
10
+ repos:
11
+ - repo: meta
12
+ hooks:
13
+ - id: check-hooks-apply
14
+ - id: check-useless-excludes
15
+
16
+ - repo: https://github.com/ComPWA/policy
17
+ rev: 0.10.2
18
+ hooks:
19
+ - id: check-dev-files
20
+
21
+ - repo: https://github.com/astral-sh/ruff-pre-commit
22
+ rev: v0.17.3
23
+ hooks:
24
+ - id: ruff-check
25
+ args: [--fix]
26
+ - id: ruff-format
27
+
28
+ - repo: https://github.com/pre-commit/pre-commit-hooks
29
+ rev: v6.0.0
30
+ hooks:
31
+ - id: check-ast
32
+ - id: check-case-conflict
33
+ - id: check-json
34
+ - id: check-merge-conflict
35
+ - id: check-toml
36
+ - id: check-vcs-permalinks
37
+ - id: check-yaml
38
+ - id: debug-statements
39
+ - id: end-of-file-fixer
40
+ - id: mixed-line-ending
41
+ - id: name-tests-test
42
+ name: Tests should start with test_
43
+ args: ["--django"]
44
+ - id: trailing-whitespace
45
+
46
+ - repo: https://github.com/tombi-toml/tombi-pre-commit
47
+ rev: v1.9.8
48
+ hooks:
49
+ - id: tombi-format
50
+ - id: tombi-lint
51
+ args: [--error-on-warnings]
52
+
53
+ - repo: https://github.com/ComPWA/prettier-pre-commit
54
+ rev: v3.9.10
55
+ hooks:
56
+ - id: prettier
57
+
58
+ - repo: https://github.com/streetsidesoftware/cspell-cli
59
+ rev: v10.4.0
60
+ hooks:
61
+ - id: cspell
62
+
63
+ - repo: https://github.com/LilSpazJoekp/docstrfmt
64
+ rev: v2.2.1
65
+ hooks:
66
+ - id: docstrfmt
67
+
68
+ - repo: https://github.com/editorconfig-checker/editorconfig-checker.python
69
+ rev: 3.11.1
70
+ hooks:
71
+ - id: editorconfig-checker
72
+ name: editorconfig
73
+ alias: ec
74
+ exclude: >-
75
+ (?x)^(
76
+ .*\.py
77
+ )$
78
+
79
+ - repo: https://github.com/astral-sh/ty-pre-commit
80
+ rev: v0.0.95
81
+ hooks:
82
+ - id: ty
83
+ args: [--group=types, --no-default-groups]
@@ -0,0 +1 @@
1
+ LICENSE
@@ -0,0 +1,4 @@
1
+ overrides:
2
+ - files: ["*.schema.json"]
3
+ options:
4
+ objectWrap: collapse
@@ -0,0 +1 @@
1
+ 3.14
@@ -0,0 +1,32 @@
1
+ {
2
+ "recommendations": [
3
+ "astral-sh.ty",
4
+ "charliermarsh.ruff",
5
+ "eamodio.gitlens",
6
+ "esbenp.prettier-vscode",
7
+ "executablebookproject.myst-highlight",
8
+ "github.vscode-github-actions",
9
+ "github.vscode-pull-request-github",
10
+ "mhutchie.git-graph",
11
+ "ms-python.python",
12
+ "ms-vscode.live-server",
13
+ "soulcode.vscode-unwanted-extensions",
14
+ "stkb.rewrap",
15
+ "streetsidesoftware.code-spell-checker",
16
+ "tombi-toml.tombi"
17
+ ],
18
+ "unwantedRecommendations": [
19
+ "davidanson.vscode-markdownlint",
20
+ "garaioag.garaio-vscode-unwanted-recommendations",
21
+ "ms-python.black-formatter",
22
+ "ms-python.flake8",
23
+ "ms-python.isort",
24
+ "ms-python.mypy-type-checker",
25
+ "ms-python.pylint",
26
+ "ms-python.vscode-pylance",
27
+ "ryanluker.vscode-coverage-gutters",
28
+ "tamasfe.even-better-toml",
29
+ "travisillig.vscode-json-stable-stringify",
30
+ "tyriar.sort-lines"
31
+ ]
32
+ }
@@ -0,0 +1,43 @@
1
+ {
2
+ "[git-commit]": {
3
+ "editor.rulers": [72],
4
+ "rewrap.wrappingColumn": 72
5
+ },
6
+ "[json]": {
7
+ "editor.wordWrap": "on"
8
+ },
9
+ "[python]": {
10
+ "editor.codeActionsOnSave": {
11
+ "source.organizeImports": "explicit"
12
+ },
13
+ "editor.defaultFormatter": "charliermarsh.ruff"
14
+ },
15
+ "[toml]": {
16
+ "editor.defaultFormatter": "tombi-toml.tombi"
17
+ },
18
+ "diffEditor.experimental.showMoves": true,
19
+ "editor.formatOnSave": true,
20
+ "github-actions.workflows.pinned.workflows": [".github/workflows/ci.yml"],
21
+ "gitlens.telemetry.enabled": false,
22
+ "livePreview.defaultPreviewPath": "docs/_build/html",
23
+ "notebook.codeActionsOnSave": {
24
+ "notebook.source.organizeImports": "explicit"
25
+ },
26
+ "notebook.formatOnSave.enabled": true,
27
+ "python.defaultInterpreterPath": ".venv/bin/python",
28
+ "python.terminal.activateEnvironment": false,
29
+ "python.testing.pytestArgs": ["--numprocesses=auto"],
30
+ "python.testing.pytestEnabled": true,
31
+ "python.testing.unittestEnabled": false,
32
+ "redhat.telemetry.enabled": false,
33
+ "rewrap.wrappingColumn": 88,
34
+ "ruff.enable": true,
35
+ "ruff.importStrategy": "fromEnvironment",
36
+ "ruff.organizeImports": true,
37
+ "telemetry.telemetryLevel": "off",
38
+ "testing.coverageToolbarEnabled": true,
39
+ "testing.showCoverageInExplorer": true,
40
+ "ty.completions.autoImport": false,
41
+ "ty.diagnosticMode": "workspace",
42
+ "ty.importStrategy": "fromEnvironment"
43
+ }
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 ComPWA
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,78 @@
1
+ Metadata-Version: 2.4
2
+ Name: sphinx-config-schema
3
+ Version: 0.0.1
4
+ Summary: Render a JSON schema as a copyable TOML, YAML, or JSON example with tooltips in Sphinx
5
+ Author: Common Partial Wave Analysis
6
+ License-Expression: MIT
7
+ Project-URL: Changelog, https://github.com/ComPWA/sphinx-config-schema/releases
8
+ Project-URL: Documentation, https://compwa.github.io/sphinx-config-schema
9
+ Project-URL: Issues, https://github.com/ComPWA/sphinx-config-schema/issues
10
+ Project-URL: Source, https://github.com/ComPWA/sphinx-config-schema
11
+ Keywords: json-schema,sphinx,toml,yaml
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Framework :: Sphinx :: Extension
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Programming Language :: Python :: 3.13
18
+ Classifier: Programming Language :: Python :: 3.14
19
+ Classifier: Programming Language :: Python :: 3.15
20
+ Classifier: Topic :: Documentation :: Sphinx
21
+ Classifier: Typing :: Typed
22
+ Requires-Python: >=3.11
23
+ Description-Content-Type: text/markdown
24
+ License-File: LICENSE
25
+ Requires-Dist: docutils
26
+ Requires-Dist: pygments
27
+ Requires-Dist: sphinx
28
+ Requires-Dist: sphinx-tippy
29
+ Requires-Dist: typing-extensions
30
+ Dynamic: license-file
31
+
32
+ # sphinx-config-schema
33
+
34
+ [![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
35
+ [![PyPI package](https://badge.fury.io/py/sphinx-config-schema.svg)](https://pypi.org/project/sphinx-config-schema)
36
+ [![Supported Python versions](https://img.shields.io/pypi/pyversions/sphinx-config-schema)](https://pypi.org/project/sphinx-config-schema)
37
+ [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/ComPWA/sphinx-config-schema/main.svg)](https://results.pre-commit.ci/latest/github/ComPWA/sphinx-config-schema/main)
38
+ [![CI status](https://github.com/ComPWA/sphinx-config-schema/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/ComPWA/sphinx-config-schema/actions/workflows/ci.yml?query=branch%3Amain)
39
+ [![Spelling checked](https://img.shields.io/badge/cspell-checked-brightgreen.svg)](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
40
+ [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
41
+ [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
42
+ [![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)
43
+ [![ty](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ty/main/assets/badge/v0.json)](https://github.com/astral-sh/ty)
44
+
45
+ `sphinx-config-schema` is a [Sphinx](https://www.sphinx-doc.org) extension that renders a [JSON schema](https://json-schema.org) as a copyable TOML, YAML, or JSON example. Each key shows the description of its setting as a tooltip and links to itself as a permalink.
46
+
47
+ ```bash
48
+ pip install sphinx-config-schema
49
+ ```
50
+
51
+ Then add the extension to your `conf.py`:
52
+
53
+ ```python
54
+ extensions = [
55
+ "sphinx_config_schema",
56
+ ]
57
+ ```
58
+
59
+ and render a schema in a reStructuredText page:
60
+
61
+ ```rst
62
+ .. config-schema:: example.schema.json
63
+ :caption: pyproject.toml
64
+ :table: tool.example
65
+ :format: toml
66
+ ```
67
+
68
+ or in a MyST Markdown page:
69
+
70
+ ````md
71
+ ```{config-schema} example.schema.json
72
+ :caption: pyproject.toml
73
+ :table: tool.example
74
+ :format: toml
75
+ ```
76
+ ````
77
+
78
+ See [compwa.github.io/sphinx-config-schema](https://compwa.github.io/sphinx-config-schema) for the documentation and a rendered example.
@@ -0,0 +1,47 @@
1
+ # sphinx-config-schema
2
+
3
+ [![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
4
+ [![PyPI package](https://badge.fury.io/py/sphinx-config-schema.svg)](https://pypi.org/project/sphinx-config-schema)
5
+ [![Supported Python versions](https://img.shields.io/pypi/pyversions/sphinx-config-schema)](https://pypi.org/project/sphinx-config-schema)
6
+ [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/ComPWA/sphinx-config-schema/main.svg)](https://results.pre-commit.ci/latest/github/ComPWA/sphinx-config-schema/main)
7
+ [![CI status](https://github.com/ComPWA/sphinx-config-schema/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/ComPWA/sphinx-config-schema/actions/workflows/ci.yml?query=branch%3Amain)
8
+ [![Spelling checked](https://img.shields.io/badge/cspell-checked-brightgreen.svg)](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
9
+ [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
10
+ [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
11
+ [![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)
12
+ [![ty](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ty/main/assets/badge/v0.json)](https://github.com/astral-sh/ty)
13
+
14
+ `sphinx-config-schema` is a [Sphinx](https://www.sphinx-doc.org) extension that renders a [JSON schema](https://json-schema.org) as a copyable TOML, YAML, or JSON example. Each key shows the description of its setting as a tooltip and links to itself as a permalink.
15
+
16
+ ```bash
17
+ pip install sphinx-config-schema
18
+ ```
19
+
20
+ Then add the extension to your `conf.py`:
21
+
22
+ ```python
23
+ extensions = [
24
+ "sphinx_config_schema",
25
+ ]
26
+ ```
27
+
28
+ and render a schema in a reStructuredText page:
29
+
30
+ ```rst
31
+ .. config-schema:: example.schema.json
32
+ :caption: pyproject.toml
33
+ :table: tool.example
34
+ :format: toml
35
+ ```
36
+
37
+ or in a MyST Markdown page:
38
+
39
+ ````md
40
+ ```{config-schema} example.schema.json
41
+ :caption: pyproject.toml
42
+ :table: tool.example
43
+ :format: toml
44
+ ```
45
+ ````
46
+
47
+ See [compwa.github.io/sphinx-config-schema](https://compwa.github.io/sphinx-config-schema) for the documentation and a rendered example.
@@ -0,0 +1 @@
1
+ /api/
@@ -0,0 +1,12 @@
1
+ {# Links to the page source on GitHub, derived from the edit-this-page URL. #}
2
+ {% if sourcename is defined and theme_use_edit_page_button==true and
3
+ page_source_suffix %}
4
+ <div class="tocsection viewongithub">
5
+ <a
6
+ href="{{ get_edit_provider_and_url()[1] | replace('/edit/' ~ github_version ~ '/', '/blob/' ~ github_view_rev ~ '/', 1) }}"
7
+ >
8
+ <i class="fa-brands fa-github"></i>
9
+ View on GitHub
10
+ </a>
11
+ </div>
12
+ {% endif %}