You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: debug_manifest/README.md
+36-31
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,7 @@
3
3
## For VSCode
4
4
5
5
### Set Up the debugger configuration (one-time setup step)
6
+
6
7
To configure the debugger in VSCode to run the `debug_manifest`, follow these steps:
7
8
8
9
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
13
14
14
15
```json
15
16
{
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
+
]
46
47
}
47
48
```
48
49
49
50
6. Save the `launch.json` file.
50
51
7. Install `CDK dependencies` by running `poetry install --all-extras`
51
52
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
+
52
54
### 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
+
54
58
1. Put the `config.json` inside the `/airbyte_cdk/debug_manifest/resources` (this will hold the `source input configuration`).
55
59
2. Put the `catalog.json` inside the `/airbyte_cdk/debug_manifest/resources` (this will hold the `configured catalog` for the target source).
56
60
3. Put the `manifest.yaml` inside the `/airbyte_cdk/debug_manifest/resources`
57
61
4. (Optional) Put the `state.json` inside the `/airbyte_cdk/debug_manifest/resources`
58
62
59
63
## Debugging Steps
64
+
60
65
1. Set any necessary breakpoints in your code, or `CDK` components code.
61
66
2. Press `F5` / `Shift + CMD + D` / click the green play button in the `Run and Debug` view to start debugging.
62
67
3. Iterate over the `2` and `3`, to debug your `manifest-only` source.
Copy file name to clipboardExpand all lines: docs/CONTRIBUTING.md
+1
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,7 @@ Here are some tips to get started using the project dependencies and development
19
19
1. Unit tests can be run via `poetry run pytest`.
20
20
21
21
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
+
22
23
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`.
23
24
24
25
Note that installing all extras is required to run the full suite of unit tests.
Copy file name to clipboardExpand all lines: pyproject.toml
+3-3
Original file line number
Diff line number
Diff line change
@@ -131,12 +131,12 @@ build-package = {cmd = "poetry build", help = "Build the python package: source
131
131
build = {sequence = ["assemble", "build-package"], help = "Run all tasks to build the package."}
132
132
133
133
# 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."}
135
135
_format-check-prettier = {cmd = "npx prettier . --check", help = "Check formatting with prettier."}
136
136
format-check = {sequence = ["_format-check-ruff", "_format-check-prettier"], help = "Check formatting for all file types.", ignore_fail = "return_non_zero"}
137
137
138
138
# 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."}
140
140
_format-fix-prettier = {cmd = "npx prettier . --write", help = "Format with prettier."}
141
141
format-fix = {sequence = ["_format-fix-ruff", "_format-fix-prettier"], help = "Format all file types.", ignore_fail = "return_non_zero"}
142
142
@@ -162,7 +162,7 @@ fix-and-check = {sequence = ["fix-all", "check-all"], help = "Lint-fix and forma
162
162
163
163
pytest = {cmd = "poetry run coverage run -m pytest --durations=10", help = "Run all pytest tests."}
164
164
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."}
0 commit comments