Skip to content

Commit 836d587

Browse files
authored
chore: auto-format YAML and Markdown files (#473)
1 parent d206240 commit 836d587

9 files changed

+60
-55
lines changed

.github/workflows/connector-tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ jobs:
9696
name: "Check: '${{matrix.connector}}' (skip=${{needs.cdk_changes.outputs['src'] == 'false' || needs.cdk_changes.outputs[matrix.cdk_extra] == 'false'}})"
9797
permissions:
9898
checks: write
99-
contents: write # Required for creating commit statuses
99+
contents: write # Required for creating commit statuses
100100
pull-requests: read
101101
steps:
102102
- name: Abort if extra not changed (${{matrix.cdk_extra}})

.github/workflows/docker-build-check.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
jobs:
99
docker-build-check:
10-
name: SDM Docker Image Build # Renamed job to be more descriptive
10+
name: SDM Docker Image Build # Renamed job to be more descriptive
1111
runs-on: ubuntu-24.04
1212
steps:
1313
- name: Checkout code

.github/workflows/pypi_publish.yml

-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ jobs:
4242
name: Build Python Package
4343
runs-on: ubuntu-24.04
4444
steps:
45-
4645
- name: Checkout CDK Repo
4746
uses: actions/checkout@v4
4847
with:

.github/workflows/python_dependency_analysis.yml

+16-16
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,20 @@ jobs:
1919
name: Dependency Analysis with Deptry
2020
runs-on: ubuntu-24.04
2121
steps:
22-
- name: Checkout code
23-
uses: actions/checkout@v4
24-
- name: Set up Python
25-
uses: actions/setup-python@v5
26-
with:
27-
python-version: '3.10'
28-
- name: Set up Poetry
29-
uses: Gr1N/setup-poetry@v9
30-
with:
31-
poetry-version: "2.0.1"
32-
- name: Install dependencies
33-
run: poetry install --all-extras
22+
- name: Checkout code
23+
uses: actions/checkout@v4
24+
- name: Set up Python
25+
uses: actions/setup-python@v5
26+
with:
27+
python-version: "3.10"
28+
- name: Set up Poetry
29+
uses: Gr1N/setup-poetry@v9
30+
with:
31+
poetry-version: "2.0.1"
32+
- name: Install dependencies
33+
run: poetry install --all-extras
3434

35-
# Job-specific step(s):
36-
- name: Run Deptry
37-
run: |
38-
poetry run deptry .
35+
# Job-specific step(s):
36+
- name: Run Deptry
37+
run: |
38+
poetry run deptry .

.github/workflows/semantic_pr_check.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
Build
4040
tests
4141
Tests
42-
42+
4343
- name: Check for "do not merge" in PR title
4444
if: ${{ github.event.pull_request.draft == false }}
4545
uses: actions/github-script@v6

.github/workflows/slash_command_dispatch.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
- \`/test\` - Runs the test suite
5252
- \`/poetry-lock\` - Re-locks dependencies and updates the poetry.lock file
5353
- \`/help\` - Shows this help message"
54-
54+
5555
if [[ "${{ github.event.comment.body }}" == "/help" ]]; then
5656
echo "body=$HELP_TEXT" >> $GITHUB_OUTPUT
5757
else

debug_manifest/README.md

+36-31
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## For VSCode
44

55
### Set Up the debugger configuration (one-time setup step)
6+
67
To configure the debugger in VSCode to run the `debug_manifest`, follow these steps:
78

89
1. Clone or Open the existing `airbyte-python-cdk` project in VSCode.
@@ -13,50 +14,54 @@ To configure the debugger in VSCode to run the `debug_manifest`, follow these st
1314

1415
```json
1516
{
16-
"version": "0.2.0",
17-
"configurations": [
18-
{
19-
"name": "Python: Debug Manifest",
20-
"type": "debugpy",
21-
"request": "launch",
22-
"console": "integratedTerminal",
23-
"cwd": "${workspaceFolder}/debug_manifest",
24-
"python": "<PATH_TO_CDK_ENV>/bin/python",
25-
"module": "debug_manifest",
26-
"args": [
27-
// SPECIFY THE COMMAND: [spec, check, discover, read]
28-
"read",
29-
// SPECIFY THE CONFIG
30-
"--config",
31-
// PATH TO THE CONFIG FILE
32-
"resources/config.json",
33-
// SPECIFY THE CATALOG
34-
"--catalog",
35-
// PATH TO THE CATALOG FILE
36-
"resources/catalog.json",
37-
// SPECIFY THE STATE (optional)
38-
// "--state",
39-
// PATH TO THE STATE FILE
40-
// "resources/state.json",
41-
// ADDITIONAL FLAGS, like `--debug` (optional)
42-
"--debug"
43-
],
44-
}
45-
]
17+
"version": "0.2.0",
18+
"configurations": [
19+
{
20+
"name": "Python: Debug Manifest",
21+
"type": "debugpy",
22+
"request": "launch",
23+
"console": "integratedTerminal",
24+
"cwd": "${workspaceFolder}/debug_manifest",
25+
"python": "<PATH_TO_CDK_ENV>/bin/python",
26+
"module": "debug_manifest",
27+
"args": [
28+
// SPECIFY THE COMMAND: [spec, check, discover, read]
29+
"read",
30+
// SPECIFY THE CONFIG
31+
"--config",
32+
// PATH TO THE CONFIG FILE
33+
"resources/config.json",
34+
// SPECIFY THE CATALOG
35+
"--catalog",
36+
// PATH TO THE CATALOG FILE
37+
"resources/catalog.json",
38+
// SPECIFY THE STATE (optional)
39+
// "--state",
40+
// PATH TO THE STATE FILE
41+
// "resources/state.json",
42+
// ADDITIONAL FLAGS, like `--debug` (optional)
43+
"--debug"
44+
]
45+
}
46+
]
4647
}
4748
```
4849

4950
6. Save the `launch.json` file.
5051
7. Install `CDK dependencies` by running `poetry install --all-extras`
5152
8. Replace the `"python": "<PATH_TO_CDK_ENV>/bin/python"` with the correct interpreter `PATH` pointing to the `CDK env` installed from Step `7` (use `which python` to have the complete python path), to wire the CDK env to the debugger. Alternatively you can switch the default interpreter you use in your IDE.
53+
5254
### Set up the necessary resources to use within the manifest-only connector
53-
* These resources are ignored by `git`, in the `.gitignore`, thus should not be committed
55+
56+
- These resources are ignored by `git`, in the `.gitignore`, thus should not be committed
57+
5458
1. Put the `config.json` inside the `/airbyte_cdk/debug_manifest/resources` (this will hold the `source input configuration`).
5559
2. Put the `catalog.json` inside the `/airbyte_cdk/debug_manifest/resources` (this will hold the `configured catalog` for the target source).
5660
3. Put the `manifest.yaml` inside the `/airbyte_cdk/debug_manifest/resources`
5761
4. (Optional) Put the `state.json` inside the `/airbyte_cdk/debug_manifest/resources`
5862

5963
## Debugging Steps
64+
6065
1. Set any necessary breakpoints in your code, or `CDK` components code.
6166
2. Press `F5` / `Shift + CMD + D` / click the green play button in the `Run and Debug` view to start debugging.
6267
3. Iterate over the `2` and `3`, to debug your `manifest-only` source.

docs/CONTRIBUTING.md

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Here are some tips to get started using the project dependencies and development
1919
1. Unit tests can be run via `poetry run pytest`.
2020

2121
Note: By default in Poetry 2.0, `poetry lock` only refreshes the lockfile without pulling new versions. This is the same behavior as the previous `poetry lock --no-update` command.
22+
2223
1. You can use "Poe" tasks to perform common actions such as lint checks (`poetry run poe lint`), autoformatting (`poetry run poe format-fix`), etc. For a list of tasks you can run, try `poetry run poe list`.
2324

2425
Note that installing all extras is required to run the full suite of unit tests.

pyproject.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,12 @@ build-package = {cmd = "poetry build", help = "Build the python package: source
131131
build = {sequence = ["assemble", "build-package"], help = "Run all tasks to build the package."}
132132

133133
# Format check tasks
134-
_format-check-ruff = {cmd = "ruff format --check .", help = "Check formatting with Ruff."}
134+
_format-check-ruff = {cmd = "poetry run ruff format --check .", help = "Check formatting with Ruff."}
135135
_format-check-prettier = {cmd = "npx prettier . --check", help = "Check formatting with prettier."}
136136
format-check = {sequence = ["_format-check-ruff", "_format-check-prettier"], help = "Check formatting for all file types.", ignore_fail = "return_non_zero"}
137137

138138
# Format fix tasks
139-
_format-fix-ruff = {cmd = "ruff format .", help = "Format with Ruff."}
139+
_format-fix-ruff = {cmd = "poetry run ruff format .", help = "Format with Ruff."}
140140
_format-fix-prettier = {cmd = "npx prettier . --write", help = "Format with prettier."}
141141
format-fix = {sequence = ["_format-fix-ruff", "_format-fix-prettier"], help = "Format all file types.", ignore_fail = "return_non_zero"}
142142

@@ -162,7 +162,7 @@ fix-and-check = {sequence = ["fix-all", "check-all"], help = "Lint-fix and forma
162162

163163
pytest = {cmd = "poetry run coverage run -m pytest --durations=10", help = "Run all pytest tests."}
164164
pytest-fast = {cmd = "poetry run coverage run -m pytest --durations=5 --exitfirst -m 'not flaky and not slow and not requires_creds'", help = "Run pytest tests, failing fast and excluding slow tests."}
165-
unit-test-with-cov = {cmd = "pytest -s unit_tests --cov=airbyte_cdk --cov-report=term --cov-config ./pyproject.toml", help = "Run unit tests and create a coverage report."}
165+
unit-test-with-cov = {cmd = "poetry run pytest -s unit_tests --cov=airbyte_cdk --cov-report=term --cov-config ./pyproject.toml", help = "Run unit tests and create a coverage report."}
166166

167167
# Combined check tasks (other)
168168

0 commit comments

Comments
 (0)