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
build-package = {cmd = "poetry build", help = "Build the python package: source and wheels archives."}
140
137
build = {sequence = ["assemble", "build-package"], help = "Run all tasks to build the package."}
141
138
142
139
# Format check tasks
140
+
format-check = {sequence = ["_format-check-ruff", "_format-check-prettier"], help = "Check formatting for all file types via Ruff and Prettier.", ignore_fail = "return_non_zero"}
143
141
_format-check-ruff = {cmd = "poetry run ruff format --check .", help = "Check formatting with Ruff."}
144
142
_format-check-prettier = {cmd = "npx prettier . --check", help = "Check formatting with prettier."}
145
-
format-check = {sequence = ["_format-check-ruff", "_format-check-prettier"], help = "Check formatting for all file types.", ignore_fail = "return_non_zero"}
146
143
147
144
# Format fix tasks
145
+
format-fix = {sequence = ["_format-fix-ruff", "_format-fix-prettier"], help = "Format all file types via Ruff and Prettier.", ignore_fail = "return_non_zero"}
148
146
_format-fix-ruff = {cmd = "poetry run ruff format .", help = "Format with Ruff."}
149
147
_format-fix-prettier = {cmd = "npx prettier . --write", help = "Format with prettier."}
150
-
format-fix = {sequence = ["_format-fix-ruff", "_format-fix-prettier"], help = "Format all file types.", ignore_fail = "return_non_zero"}
151
148
152
149
# Linting/Typing check tasks
153
-
_lint-ruff = {cmd = "poetry run ruff check .", help = "Lint with Ruff."}
150
+
lint = {cmd = "poetry run ruff check .", help = "Lint with Ruff."}
154
151
type-check = {cmd = "poetry run mypy airbyte_cdk", help = "Type check modified files with mypy."}
155
-
lint = {sequence = ["_lint-ruff", "type-check"], help = "Lint all code. Includes type checking.", ignore_fail = "return_non_zero"}
156
-
157
-
# Lockfile check task
158
-
check-lockfile = {cmd = "poetry check", help = "Check the poetry lock file."}
159
152
160
153
# Linting/Typing fix tasks
161
-
lint-fix = { cmd = "poetry run ruff check --fix .", help = "Auto-fix any lint issues that Ruff can automatically resolve (excluding 'unsafe' fixes)." }
162
-
lint-fix-unsafe = { cmd = "poetry run ruff check --fix --unsafe-fixes .", help = "Lint-fix modified files, including 'unsafe' fixes. It is recommended to first commit any pending changes and then always manually review any unsafe changes applied." }
154
+
lint-fix = { cmd = "poetry run ruff check --fix .", help = "Auto-fix any lint issues that Ruff can automatically resolve (excluding 'unsafe' fixes) with Ruff." }
155
+
lint-fix-unsafe = { cmd = "poetry run ruff check --fix --unsafe-fixes .", help = "Lint-fix modified files, including 'unsafe' fixes with Ruff. It is recommended to first commit any pending changes and then always manually review any unsafe changes applied." }
163
156
164
157
# ruff fix everything (ignoring non-Python fixes)
165
158
ruff-fix = { sequence = ["lint-fix", "_format-fix-ruff"], help = "Lint-fix and format-fix all code." }
166
159
167
-
# Combined Check and Fix tasks
160
+
# Lockfile check task
161
+
_check-lockfile = {cmd = "poetry check", help = "Check the poetry lock file."}
168
162
169
-
check-all = {sequence = ["lint", "format-check", "type-check", "check-lockfile"], help = "Lint, format, and type-check modified files.", ignore_fail = "return_non_zero"}
163
+
# Combined Check and Fix tasks
164
+
check-all = {sequence = ["lint", "format-check", "type-check", "_check-lockfile"], help = "Lint, format, and type-check modified files.", ignore_fail = "return_non_zero"}
170
165
fix-all = {sequence = ["format-fix", "lint-fix"], help = "Lint-fix and format-fix modified files, ignoring unsafe fixes.", ignore_fail = "return_non_zero"}
171
166
fix-and-check = {sequence = ["fix-all", "check-all"], help = "Lint-fix and format-fix, then re-check to see if any issues remain.", ignore_fail = "return_non_zero"}
172
167
173
168
# PyTest tasks
174
-
175
169
pytest = {cmd = "poetry run coverage run -m pytest --durations=10", help = "Run all pytest tests."}
176
-
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."}
170
+
pytest-fast = {cmd = "poetry run coverage run -m pytest --skipslow --durations=5 --exitfirst -m 'not flaky and not slow and not requires_creds'", help = "Run pytest tests, failing fast and excluding slow tests."}
177
171
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."}
178
172
179
173
# Combined check tasks (other)
180
174
181
175
# TODO: find a version of the modified mypy check that works both locally and in CI.
182
-
check-local = {sequence = ["lint", "type-check", "check-lockfile", "unit-test-with-cov"], help = "Lint all code, type-check modified files, and run unit tests."}
183
-
check-ci = {sequence = ["check-lockfile", "build", "lint", "unit-test-with-cov"], help = "Build the package, lint and run unit tests. Does not include type-checking."}
176
+
check-local = {sequence = ["lint", "type-check", "_check-lockfile", "unit-test-with-cov"], help = "Lint all code, type-check modified files, and run unit tests."}
177
+
check-ci = {sequence = ["_check-lockfile", "build", "lint", "unit-test-with-cov"], help = "Build the package, lint and run unit tests. Does not include type-checking."}
184
178
185
179
# Build and check
186
180
pre-push = {sequence = ["build", "check-local"], help = "Run all build and check tasks."}
0 commit comments