Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ jobs:
- name: Run linters
if: matrix.python == '3.11'
run: make lint
- name: Run type checker
if: matrix.python == '3.11'
run: make typecheck
- name: Run unit tests with coverage
run: COVERAGE=1 make test
- name: Generate coverage report (85%) # Coverage threshold should only increase over time — never decrease it!
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
.PHONY: help install install-uv check-license lint \
.PHONY: help install install-uv check-license lint typecheck \
test test-integration test-integration-setup test-integration-exec test-integration-cleanup test-integration-rebuild \
test-s3 test-adls test-gcs test-coverage coverage-report test test-notebook\
docs-serve docs-build notebook notebook-infra \
Expand Down Expand Up @@ -97,6 +97,9 @@ check-license: ## Check license headers
lint: ## Run code linters via prek (pre-commit hooks)
uv run $(PYTHON_ARG) prek run -a

typecheck: ## Run the ty type checker
uv run $(PYTHON_ARG) ty check --exit-zero-on-warning

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we probably should remove --exit-zero-on-warning later otherwise this wont enforce 😄

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed it, but that's not fully the case. The ty docs say ty will only exit with 1 if it finds violations with severity error or higher. if that flag is enabled.

Nonetheless, I removed the flag + added a couple more ignores. We can punt that decision depending on how much churn it makes.


# ===============
# Testing Section
# ===============
Expand Down
22 changes: 21 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ dev = [
"papermill>=2.6.0",
"nbformat>=5.10.0",
"ipykernel>=6.29.0",
"ty==0.0.92",
"ty==1.0.0",
]
# for mkdocs
docs = [
Expand Down Expand Up @@ -287,6 +287,26 @@ extra-paths = ["vendor"]
# mkdocs_gen_files are only installed with the docs dependency group
allowed-unresolved-imports = ["pyiceberg_core.datafusion", "griffe", "mkdocs_gen_files"]

[tool.ty.rules]
# Rules that currently report errors are disabled so ty can run in CI; re-enable each one as its errors are fixed
abstract-class-instantiation = "ignore"
incompatible-method-override = "ignore"
incompatible-mutable-override = "ignore"
invalid-argument-type = "ignore"
invalid-assignment = "ignore"
invalid-explicit-return = "ignore"
invalid-generic-class = "ignore"
invalid-type-form = "ignore"
lost-keyword-for-regular-parameter = "ignore"
missing-argument = "ignore"
missing-attribute = "ignore"
missing-module-member = "ignore"
missing-union-attribute = "ignore"
no-matching-overload = "ignore"
not-callable = "ignore"
not-subscriptable = "ignore"
unsupported-operator = "ignore"

[tool.coverage.run]
source = ['pyiceberg/']

Expand Down
52 changes: 26 additions & 26 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading