Skip to content

Commit 029266f

Browse files
committed
add codespell local workflow, fix documentation indentation
Signed-off-by: Lance Drane <[email protected]>
1 parent 08a414c commit 029266f

File tree

3 files changed

+48
-34
lines changed

3 files changed

+48
-34
lines changed

pdm.lock

Lines changed: 12 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 31 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -46,33 +46,6 @@ Issues = "https://github.com/INTERSECT-SDK/python-sdk/issues"
4646
amqp = ["pika>=1.3.2,<2.0.0"]
4747
docs = ["sphinx>=5.3.0", "furo>=2023.3.27"]
4848

49-
[tool.pdm.dev-dependencies]
50-
lint = [
51-
"pre-commit>=3.3.1",
52-
"ruff==0.5.7",
53-
"mypy>=1.10.0",
54-
"types-paho-mqtt>=1.6.0.20240106",
55-
]
56-
test = ["pytest>=7.3.2", "pytest-cov>=4.1.0", "httpretty>=1.1.4"]
57-
58-
59-
[tool.pdm.scripts]
60-
test-all = "pytest tests/ --cov=src/intersect_sdk/ --cov-fail-under=80 --cov-report=html:reports/htmlcov/ --cov-report=xml:reports/coverage_report.xml --junitxml=reports/junit.xml"
61-
test-all-debug = "pytest tests/ --cov=src/intersect_sdk/ --cov-fail-under=80 --cov-report=html:reports/htmlcov/ --cov-report=xml:reports/coverage_report.xml --junitxml=reports/junit.xml -s"
62-
test-unit = "pytest tests/unit --cov=src/intersect_sdk/"
63-
test-e2e = "pytest tests/e2e --cov=src/intersect_sdk/"
64-
lint = { composite = ["lint-format", "lint-ruff", "lint-mypy"] }
65-
lint-format = "ruff format"
66-
lint-ruff = "ruff check --fix"
67-
lint-mypy = "mypy src/intersect_sdk/"
68-
69-
[tool.pdm.build]
70-
package-dir = "src"
71-
72-
[tool.pdm.version]
73-
source = "file"
74-
path = "src/intersect_sdk/version.py"
75-
7649
[tool.ruff]
7750
line-length = 100
7851
format = { quote-style = 'single' }
@@ -194,13 +167,43 @@ exclude_also = [
194167
'except.* ImportError', # these are usually used to throw a "friendlier" error and are not really worth testing
195168
]
196169

170+
171+
[tool.pdm.dev-dependencies]
172+
lint = [
173+
"pre-commit>=3.3.1",
174+
"ruff==0.5.7",
175+
"mypy>=1.10.0",
176+
"types-paho-mqtt>=1.6.0.20240106",
177+
"codespell>=2.3.0",
178+
]
179+
test = ["pytest>=7.3.2", "pytest-cov>=4.1.0", "httpretty>=1.1.4"]
180+
181+
182+
[tool.pdm.scripts]
183+
test-all = "pytest tests/ --cov=src/intersect_sdk/ --cov-fail-under=80 --cov-report=html:reports/htmlcov/ --cov-report=xml:reports/coverage_report.xml --junitxml=reports/junit.xml"
184+
test-all-debug = "pytest tests/ --cov=src/intersect_sdk/ --cov-fail-under=80 --cov-report=html:reports/htmlcov/ --cov-report=xml:reports/coverage_report.xml --junitxml=reports/junit.xml -s"
185+
test-unit = "pytest tests/unit --cov=src/intersect_sdk/"
186+
test-e2e = "pytest tests/e2e --cov=src/intersect_sdk/"
187+
lint = { composite = ["lint-format", "lint-ruff", "lint-mypy", "lint-spelling"] }
188+
lint-format = "ruff format"
189+
lint-ruff = "ruff check --fix"
190+
lint-mypy = "mypy src/intersect_sdk/"
191+
lint-spelling = "codespell -w docs examples src tests *.md -S docs/_build"
192+
193+
[tool.pdm.build]
194+
package-dir = "src"
195+
196+
[tool.pdm.version]
197+
source = "file"
198+
path = "src/intersect_sdk/version.py"
199+
197200
[build-system]
198201
requires = ["pdm-backend"]
199202
build-backend = "pdm.backend"
200203

201204
[tool.codespell]
202205
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
203-
skip = '.git*,*.lock'
206+
skip = '.git*,*.lock,.venv,.*cache/*,./docs/_build/*'
204207
check-hidden = true
205208
# ignore-regex = ''
206209
# ignore-words-list = ''

src/intersect_sdk/schema.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ def get_schema_from_capability_implementations(
4848
4949
The generated schema is currently not a complete replica of the AsyncAPI spec. See https://www.asyncapi.com/docs/reference/specification/v2.6.0 for the complete specification.
5050
Some key differences:
51-
- We utilize three custom fields: "capabilities", "events", and "status".
52-
- "capabilities" contains a dictionary: the keys of this dictionary are capability names. The values are dictionaries with the "description" property being a string which describes the capability,
53-
and a "channels" property which more closely follows the AsyncAPI specification of the top-level value "channels".
54-
- "events" is a key-value dictionary: the keys represent the event name, the values represent the associated schema of the event type. Events are currently shared across all capabilities.
55-
- "status" will have a value of the status schema - if no status has been defined, a null schema is used.
51+
- We utilize three custom fields: "capabilities", "events", and "status".
52+
- "capabilities" contains a dictionary: the keys of this dictionary are capability names. The values are dictionaries with the "description" property being a string which describes the capability,
53+
and a "channels" property which more closely follows the AsyncAPI specification of the top-level value "channels".
54+
- "events" is a key-value dictionary: the keys represent the event name, the values represent the associated schema of the event type. Events are currently shared across all capabilities.
55+
- "status" will have a value of the status schema - if no status has been defined, a null schema is used.
5656
5757
Params:
5858
- capability_types - list of classes (not objects) of capabilities. We do not require capabilities to be instantiated here, in case the instantiation of a capability has external dependencies.

0 commit comments

Comments
 (0)