ssmdconvert 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 (84) hide show
  1. ssmdconvert-0.1.0/.codecrate.toml +25 -0
  2. ssmdconvert-0.1.0/.github/workflows/codecov.yml +34 -0
  3. ssmdconvert-0.1.0/.github/workflows/pre-commit.yml +31 -0
  4. ssmdconvert-0.1.0/.github/workflows/python-publish.yml +56 -0
  5. ssmdconvert-0.1.0/.github/workflows/tests.yml +142 -0
  6. ssmdconvert-0.1.0/.gitignore +220 -0
  7. ssmdconvert-0.1.0/.pre-commit-config.yaml +64 -0
  8. ssmdconvert-0.1.0/LICENSE +201 -0
  9. ssmdconvert-0.1.0/MANIFEST.in +1 -0
  10. ssmdconvert-0.1.0/PKG-INFO +114 -0
  11. ssmdconvert-0.1.0/README.md +63 -0
  12. ssmdconvert-0.1.0/RELEASING.md +77 -0
  13. ssmdconvert-0.1.0/docs/Makefile +32 -0
  14. ssmdconvert-0.1.0/docs/api.md +156 -0
  15. ssmdconvert-0.1.0/docs/books.md +57 -0
  16. ssmdconvert-0.1.0/docs/bundle-format.md +77 -0
  17. ssmdconvert-0.1.0/docs/changelog.md +21 -0
  18. ssmdconvert-0.1.0/docs/conf.py +93 -0
  19. ssmdconvert-0.1.0/docs/index.md +31 -0
  20. ssmdconvert-0.1.0/docs/installation.md +43 -0
  21. ssmdconvert-0.1.0/docs/make.bat +113 -0
  22. ssmdconvert-0.1.0/docs/make.py +89 -0
  23. ssmdconvert-0.1.0/docs/requirements.txt +4 -0
  24. ssmdconvert-0.1.0/docs/usage.md +69 -0
  25. ssmdconvert-0.1.0/pyproject.toml +87 -0
  26. ssmdconvert-0.1.0/setup.cfg +4 -0
  27. ssmdconvert-0.1.0/ssmdconvert/__init__.py +64 -0
  28. ssmdconvert-0.1.0/ssmdconvert/__main__.py +4 -0
  29. ssmdconvert-0.1.0/ssmdconvert/_epub.py +107 -0
  30. ssmdconvert-0.1.0/ssmdconvert/_version.py +24 -0
  31. ssmdconvert-0.1.0/ssmdconvert/adapters/__init__.py +34 -0
  32. ssmdconvert-0.1.0/ssmdconvert/adapters/base.py +14 -0
  33. ssmdconvert-0.1.0/ssmdconvert/adapters/common.py +52 -0
  34. ssmdconvert-0.1.0/ssmdconvert/adapters/docx.py +52 -0
  35. ssmdconvert-0.1.0/ssmdconvert/adapters/epub.py +40 -0
  36. ssmdconvert-0.1.0/ssmdconvert/adapters/html.py +158 -0
  37. ssmdconvert-0.1.0/ssmdconvert/adapters/markdown.py +50 -0
  38. ssmdconvert-0.1.0/ssmdconvert/adapters/pdf.py +41 -0
  39. ssmdconvert-0.1.0/ssmdconvert/adapters/ssmd.py +28 -0
  40. ssmdconvert-0.1.0/ssmdconvert/adapters/text.py +29 -0
  41. ssmdconvert-0.1.0/ssmdconvert/books.py +112 -0
  42. ssmdconvert-0.1.0/ssmdconvert/bundle.py +601 -0
  43. ssmdconvert-0.1.0/ssmdconvert/chapter_selection.py +57 -0
  44. ssmdconvert-0.1.0/ssmdconvert/cli.py +262 -0
  45. ssmdconvert-0.1.0/ssmdconvert/converter.py +63 -0
  46. ssmdconvert-0.1.0/ssmdconvert/errors.py +30 -0
  47. ssmdconvert-0.1.0/ssmdconvert/models.py +99 -0
  48. ssmdconvert-0.1.0/ssmdconvert/py.typed +0 -0
  49. ssmdconvert-0.1.0/ssmdconvert/render.py +51 -0
  50. ssmdconvert-0.1.0/ssmdconvert/speech/__init__.py +19 -0
  51. ssmdconvert-0.1.0/ssmdconvert/speech/audit.py +183 -0
  52. ssmdconvert-0.1.0/ssmdconvert/speech/escaping.py +24 -0
  53. ssmdconvert-0.1.0/ssmdconvert/speech/models.py +115 -0
  54. ssmdconvert-0.1.0/ssmdconvert/speech/prepare.py +511 -0
  55. ssmdconvert-0.1.0/ssmdconvert.egg-info/PKG-INFO +114 -0
  56. ssmdconvert-0.1.0/ssmdconvert.egg-info/SOURCES.txt +82 -0
  57. ssmdconvert-0.1.0/ssmdconvert.egg-info/dependency_links.txt +1 -0
  58. ssmdconvert-0.1.0/ssmdconvert.egg-info/entry_points.txt +2 -0
  59. ssmdconvert-0.1.0/ssmdconvert.egg-info/requires.txt +32 -0
  60. ssmdconvert-0.1.0/ssmdconvert.egg-info/scm_file_list.json +94 -0
  61. ssmdconvert-0.1.0/ssmdconvert.egg-info/scm_version.json +8 -0
  62. ssmdconvert-0.1.0/ssmdconvert.egg-info/top_level.txt +1 -0
  63. ssmdconvert-0.1.0/tests/epub_support.py +89 -0
  64. ssmdconvert-0.1.0/tests/test_book_bundle.py +426 -0
  65. ssmdconvert-0.1.0/tests/test_book_cli.py +93 -0
  66. ssmdconvert-0.1.0/tests/test_book_conversion.py +58 -0
  67. ssmdconvert-0.1.0/tests/test_book_inspection.py +66 -0
  68. ssmdconvert-0.1.0/tests/test_book_selection.py +50 -0
  69. ssmdconvert-0.1.0/tests/test_cli.py +162 -0
  70. ssmdconvert-0.1.0/tests/test_converter_api.py +19 -0
  71. ssmdconvert-0.1.0/tests/test_core_import.py +18 -0
  72. ssmdconvert-0.1.0/tests/test_downstream_contract.py +52 -0
  73. ssmdconvert-0.1.0/tests/test_epub_adapter.py +114 -0
  74. ssmdconvert-0.1.0/tests/test_markdown_html.py +24 -0
  75. ssmdconvert-0.1.0/tests/test_optional_adapters.py +19 -0
  76. ssmdconvert-0.1.0/tests/test_packaging.py +46 -0
  77. ssmdconvert-0.1.0/tests/test_release_artifacts.py +125 -0
  78. ssmdconvert-0.1.0/tests/test_speech_preparation.py +408 -0
  79. ssmdconvert-0.1.0/tests/test_ssmd_adapter.py +60 -0
  80. ssmdconvert-0.1.0/tests/test_text_adapter.py +13 -0
  81. ssmdconvert-0.1.0/tests/typecheck/mypy.ini +8 -0
  82. ssmdconvert-0.1.0/tests/typecheck/public_api.py +51 -0
  83. ssmdconvert-0.1.0/tools/check_release_artifacts.py +225 -0
  84. ssmdconvert-0.1.0/tools/smoke_installed.py +108 -0
@@ -0,0 +1,25 @@
1
+ [codecrate]
2
+ output = "context_ssmdconvert.md"
3
+ keep_docstrings = true
4
+ dedupe = true
5
+ metadata = false
6
+ respect_gitignore = true
7
+ exclude = ["*/.venv/*", "context_ssmdconvert.*"]
8
+ gitignore_allow = ["ssmdconvert/_version.py"]
9
+ include = [
10
+ "**/*.py",
11
+ "**/*.toml",
12
+ "**/*.md",
13
+ "**/*.json",
14
+ "**/*.txt",
15
+ "**/*.csv",
16
+ "**/*.tsv",
17
+ "**/*.yaml",
18
+ "**/*.yml",
19
+ "**/*.ssmd",
20
+ "LICENSE",
21
+ ]
22
+ split_max_chars = 0
23
+ layout = "full"
24
+ profile = "portable-agent"
25
+ emit_standalone_unpacker = true
@@ -0,0 +1,34 @@
1
+ name: CodeCov
2
+ on:
3
+ push:
4
+ jobs:
5
+ run:
6
+ runs-on: ubuntu-latest
7
+ env:
8
+ OS: ubuntu-latest
9
+ steps:
10
+ - uses: actions/checkout@v7
11
+ - name: Set up Python
12
+ uses: actions/setup-python@v7
13
+ with:
14
+ python-version: "3.13"
15
+ - name: Upgrade pip
16
+ run: python -m pip install --upgrade pip
17
+ - name: Install package and test dependencies
18
+ run: python -m pip install -e ".[all,dev]"
19
+ - name: Run tests with coverage and JUnit output
20
+ id: tests
21
+ run: python -m pytest -m "not slow" --cov=ssmdconvert --cov-report=xml --junitxml=junit.xml
22
+ - name: Upload coverage to Codecov
23
+ if: ${{ !cancelled() && steps.tests.outcome != 'skipped' }}
24
+ uses: codecov/codecov-action@v5
25
+ with:
26
+ token: ${{ secrets.CODECOV_TOKEN }}
27
+ files: ./coverage.xml
28
+ - name: Upload test results to Codecov
29
+ if: ${{ !cancelled() && steps.tests.outcome != 'skipped' }}
30
+ uses: codecov/codecov-action@v5
31
+ with:
32
+ token: ${{ secrets.CODECOV_TOKEN }}
33
+ report_type: test_results
34
+ files: ./junit.xml
@@ -0,0 +1,31 @@
1
+ name: pre-commit
2
+
3
+ on:
4
+ pull_request:
5
+ push:
6
+
7
+ jobs:
8
+ pre-commit:
9
+ runs-on: ubuntu-latest
10
+
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+
14
+ - uses: actions/setup-python@v5
15
+ with:
16
+ python-version: "3.13"
17
+
18
+ - uses: actions/setup-node@v4
19
+ with:
20
+ node-version: "20"
21
+
22
+ - name: Install Python tools
23
+ run: |
24
+ python -m pip install --upgrade pip
25
+ python -m pip install "ruff==0.16.0"
26
+
27
+ - name: Install Node tools
28
+ run: |
29
+ npm install -g prettier@2.7.1 @prettier/plugin-xml@2.2.0 eslint
30
+
31
+ - uses: pre-commit/action@v3.0.1
@@ -0,0 +1,56 @@
1
+ name: Upload Python Package
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ permissions:
8
+ contents: read
9
+
10
+ jobs:
11
+ deploy:
12
+ runs-on: ubuntu-latest
13
+ environment:
14
+ name: pypi
15
+ url: https://pypi.org/p/ssmdconvert
16
+ permissions:
17
+ contents: read
18
+ id-token: write
19
+ steps:
20
+ - name: Check out release
21
+ uses: actions/checkout@v7
22
+ with:
23
+ fetch-depth: 0
24
+ - name: Set up Python
25
+ uses: actions/setup-python@v7
26
+ with:
27
+ python-version: "3.13"
28
+ - name: Install build tooling
29
+ run: python -m pip install --upgrade pip build twine
30
+ - name: Build package
31
+ run: |
32
+ rm -rf dist
33
+ python -m build
34
+ - name: Check built distributions
35
+ run: python -m twine check dist/*
36
+ - name: Validate release artifacts
37
+ env:
38
+ RELEASE_TAG: ${{ github.event.release.tag_name }}
39
+ run: python tools/check_release_artifacts.py
40
+ - name: Install and smoke-test the built wheel
41
+ run: |
42
+ smoke_env="$RUNNER_TEMP/ssmdconvert-wheel-smoke"
43
+ python -m venv "$smoke_env"
44
+ "$smoke_env/bin/python" -m pip install --upgrade pip
45
+ "$smoke_env/bin/python" -m pip install "$GITHUB_WORKSPACE"/dist/*.whl
46
+ cd "$RUNNER_TEMP"
47
+ "$smoke_env/bin/python" -c "import ssmdconvert; print(ssmdconvert.__version__)"
48
+ "$smoke_env/bin/ssmdconvert" --version
49
+ "$smoke_env/bin/ssmdconvert" --help
50
+ "$smoke_env/bin/python" "$GITHUB_WORKSPACE/tools/smoke_installed.py"
51
+ "$smoke_env/bin/python" -m pip check
52
+ - name: Publish package to PyPI
53
+ uses: pypa/gh-action-pypi-publish@v1.14.1
54
+ with:
55
+ password: ${{ secrets.PYPI_API_TOKEN }}
56
+ attestations: false
@@ -0,0 +1,142 @@
1
+ name: Run tests
2
+ on:
3
+ push:
4
+ pull_request:
5
+ workflow_call:
6
+ jobs:
7
+ tests:
8
+ runs-on: ${{ matrix.os }}
9
+ strategy:
10
+ fail-fast: false
11
+ matrix:
12
+ os: [ubuntu-latest, windows-latest, macos-latest]
13
+ python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
14
+ install-mode: [core, all]
15
+ steps:
16
+ - uses: actions/checkout@v7
17
+ - name: Set up Python
18
+ uses: actions/setup-python@v7
19
+ with:
20
+ python-version: ${{ matrix.python-version }}
21
+ - name: Upgrade pip
22
+ run: python -m pip install --upgrade pip
23
+ - name: Install core package and test dependencies
24
+ if: matrix.install-mode == 'core'
25
+ run: python -m pip install -e ".[dev]"
26
+ - name: Install package with optional extras and test dependencies
27
+ if: matrix.install-mode == 'all'
28
+ run: python -m pip install -e ".[all,dev]"
29
+ - name: Compile
30
+ run: python -m compileall -q ssmdconvert tests
31
+ - name: Test
32
+ run: python -m pytest -m "not slow"
33
+
34
+ typecheck:
35
+ runs-on: ubuntu-latest
36
+ steps:
37
+ - uses: actions/checkout@v7
38
+ - name: Set up Python
39
+ uses: actions/setup-python@v7
40
+ with:
41
+ python-version: "3.13"
42
+ - name: Upgrade pip
43
+ run: python -m pip install --upgrade pip
44
+ - name: Install package and type-check dependencies
45
+ run: python -m pip install -e ".[dev]"
46
+ - name: Type-check public API
47
+ run: python -m mypy --config-file tests/typecheck/mypy.ini tests/typecheck/public_api.py
48
+
49
+ docs:
50
+ runs-on: ubuntu-latest
51
+ steps:
52
+ - uses: actions/checkout@v7
53
+ - name: Set up Python
54
+ uses: actions/setup-python@v7
55
+ with:
56
+ python-version: "3.13"
57
+ - name: Upgrade pip
58
+ run: python -m pip install --upgrade pip
59
+ - name: Install package and development dependencies
60
+ run: python -m pip install -e ".[dev,speech]"
61
+ - name: Install documentation dependencies
62
+ run: python -m pip install -r docs/requirements.txt
63
+ - name: Build documentation
64
+ run: python -m sphinx -W --keep-going -b html docs docs/_build/html
65
+
66
+
67
+ base-smoke:
68
+ runs-on: ubuntu-latest
69
+ steps:
70
+ - uses: actions/checkout@v7
71
+ - name: Set up Python
72
+ uses: actions/setup-python@v7
73
+ with:
74
+ python-version: "3.13"
75
+ - name: Upgrade pip
76
+ run: python -m pip install --upgrade pip
77
+ - name: Install the base package without extras
78
+ run: python -m pip install .
79
+ - name: Smoke-test installed core formats and book workflows
80
+ run: python tools/smoke_installed.py
81
+ - name: Check installed CLI entry point
82
+ run: |
83
+ ssmdconvert --version
84
+ ssmdconvert --help
85
+
86
+ extras:
87
+ runs-on: ubuntu-latest
88
+ strategy:
89
+ fail-fast: false
90
+ matrix:
91
+ extra: [speech, pdf, docx]
92
+ steps:
93
+ - uses: actions/checkout@v7
94
+ - name: Set up Python
95
+ uses: actions/setup-python@v7
96
+ with:
97
+ python-version: "3.13"
98
+ - name: Upgrade pip
99
+ run: python -m pip install --upgrade pip
100
+ - name: Install package, tests, and selected extra
101
+ run: python -m pip install -e ".[dev,${{ matrix.extra }}]"
102
+ - name: Test speech extra
103
+ if: matrix.extra == 'speech'
104
+ run: python -m pytest tests/test_speech_preparation.py
105
+ - name: Test PDF extra import
106
+ if: matrix.extra == 'pdf'
107
+ run: python -c "import pypdf"
108
+ - name: Test DOCX extra adapter
109
+ if: matrix.extra == 'docx'
110
+ run: python -m pytest tests/test_optional_adapters.py
111
+
112
+ minimum-dependencies:
113
+ runs-on: ubuntu-latest
114
+ steps:
115
+ - uses: actions/checkout@v7
116
+ - name: Set up Python
117
+ uses: actions/setup-python@v7
118
+ with:
119
+ python-version: "3.10"
120
+ - name: Upgrade pip
121
+ run: python -m pip install --upgrade pip
122
+ - name: Install declared runtime dependency floors
123
+ run: python -m pip install "ssmd==0.9.2" "epub2text==0.2.8" "typer==0.20.*"
124
+ - name: Install package and test dependencies
125
+ run: python -m pip install -e ".[dev]"
126
+ - name: Test core contracts at minimum dependency versions
127
+ run: >-
128
+ python -m pytest
129
+ tests/test_ssmd_adapter.py
130
+ tests/test_converter_api.py
131
+ tests/test_epub_adapter.py
132
+ tests/test_book_conversion.py
133
+ tests/test_book_inspection.py
134
+ tests/test_book_selection.py
135
+ tests/test_book_bundle.py
136
+ tests/test_cli.py
137
+ - name: Install speech dependency floor
138
+ run: |
139
+ python -m pip install "spokenform==0.4.3"
140
+ python -m pip install -e ".[speech]"
141
+ - name: Test speech extra at its minimum version
142
+ run: python -m pytest tests/test_speech_preparation.py
@@ -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
+ ssmdconvert/_version.py
220
+ context_ssmdconvert*.*
@@ -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/|/notnebooks/
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)$