Skip to content

Commit c85fae9

Browse files
Add sonar as git submodule and configure dependencies
- Add sonar repo as git submodule at ./sonar - Update connector-sdk dependency to use submodule path - Add pytest-asyncio to dev dependencies for async test execution - Configure Deptry to ignore connector-sdk in DEP002 rule - Exclude sonar submodule from ruff checks and pytest collection - Move ruff select rules to [lint] section per deprecation warning This is a temporary solution to make connector-sdk available locally. User will add GitHub secret to CI for submodule access. Co-Authored-By: AJ Steers <aj@airbyte.io>
1 parent ac23073 commit c85fae9

File tree

5 files changed

+35
-6
lines changed

5 files changed

+35
-6
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "sonar"]
2+
path = sonar
3+
url = https://github.com/airbytehq/sonar.git

.ruff.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
target-version = "py310"
44
preview = true
55
line-length = 100
6+
exclude = [
7+
"sonar", # Git submodule, not part of PyAirbyte codebase
8+
]
69

10+
[lint]
711
select = [
812
# For rules reference, see https://docs.astral.sh/ruff/rules/
913
"A", # flake8-builtins
@@ -61,8 +65,6 @@ select = [
6165
"W", # pycodestyle (warnings)
6266
"YTT", # flake8-2020
6367
]
64-
65-
[lint]
6668
ignore = [
6769
# For rules reference, see https://docs.astral.sh/ruff/rules/
6870

poetry.lock

Lines changed: 22 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ fastmcp = ">=2.11.3,<3.0.0"
5656
uv = ">=0.5.0,<0.9.0"
5757

5858
[tool.poetry.group.integrations.dependencies]
59-
connector-sdk = {path = "../sonar/connector-sdk", develop = true}
59+
connector-sdk = {path = "./sonar/connector-sdk", develop = true}
6060

6161
[tool.poetry.group.dev.dependencies]
6262
coverage = "^7.5.1"
@@ -69,6 +69,7 @@ pandas-stubs = "^2.1.4.231218"
6969
pdoc = "^16.0.0"
7070
poethepoet = ">=0.26.1,<0.32.0"
7171
pytest = "^8.2.0"
72+
pytest-asyncio = "^0.23.0"
7273
pytest-docker = "^3.1.1"
7374
pytest-mock = "^3.14.0"
7475
pytest-timeout = "^2.3.1"
@@ -91,7 +92,7 @@ build-backend = "poetry_dynamic_versioning.backend"
9192
# - No test can take longer than 10 minutes (600 seconds)
9293
# - Markers must be declared explicitly
9394
# - Generate junit test results at a deterministic location
94-
addopts = "-rs --strict-markers --timeout=600 --junit-xml=build/test-results/test-results.xml"
95+
addopts = "-rs --strict-markers --timeout=600 --junit-xml=build/test-results/test-results.xml --ignore=sonar"
9596
markers = [
9697
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
9798
"super_slow: these super slow tests will not run in CI; they will only ever run on-demand",
@@ -185,4 +186,6 @@ DEP002 = [
185186
"sqlalchemy-bigquery",
186187
# Used as subprocess tool, not imported directly:
187188
"uv",
189+
# Optional dependency in integrations group, imported lazily:
190+
"connector-sdk",
188191
]

sonar

Submodule sonar added at bd956ec

0 commit comments

Comments
 (0)