Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static code validation for python projects failing #1460

Open
pravindahal opened this issue Nov 28, 2023 · 2 comments
Open

Static code validation for python projects failing #1460

pravindahal opened this issue Nov 28, 2023 · 2 comments
Labels
technical debt Issue relates to technical debt

Comments

@pravindahal
Copy link
Contributor

pravindahal commented Nov 28, 2023

Eg: https://github.com/coopnorge/python-bigquery-extras/actions/runs/6920199806/job/18824420755

poetry run mypy --show-error-codes --show-error-context --pretty ./src ./tests ./docs
Warning: Found deprecated key 'default' or 'secondary' in pyproject.toml configuration for source engineering-pypi. Please provide the key 'priority' instead. Accepted values are: 'default', 'primary', 'secondary', 'supplemental', 'explicit'.
Warning: Found deprecated priority 'secondary' for source 'engineering-pypi' in pyproject.toml. Consider changing the priority to one of the non-deprecated values: 'default', 'primary', 'supplemental', 'explicit'.
Warning: In a future version of Poetry, PyPI will be disabled automatically if at least one custom source is configured with another priority than 'explicit'. In order to avoid a breaking change and make your pyproject.toml forward compatible, add PyPI explicitly via 'poetry source add pypi'. By the way, this has the advantage that you can set the priority of PyPI as with any other source.
src/coopnorge/extras/bigquery_v1beta1/_base.py: note: In class "BigQueryBase":
src/coopnorge/extras/bigquery_v1beta1/_base.py:7: error: Class cannot subclass
"AvroBaseModel" (has type "Any")  [misc]
    class BigQueryBase(dataclasses_avroschema.avrodantic.AvroBaseModel):
                       ^
Found 1 error in 1 file (checked 7 source files)
make: *** [Makefile:[42](https://github.com/coopnorge/python-bigquery-extras/actions/runs/6920199806/job/18824420755#step:9:43): validate-static] Error 1
Error: Process completed with exit code 2.

The culprit was status check wrongly reported as successful even though the build skipped for this dependabot update: https://github.com/coopnorge/python-bigquery-extras/pull/282.

@pravindahal pravindahal changed the title CI for python projects failing Static code validation for python projects failing Nov 28, 2023
@pravindahal pravindahal self-assigned this Nov 29, 2023
@pravindahal pravindahal added the technical debt Issue relates to technical debt label Nov 29, 2023
@pravindahal
Copy link
Contributor Author

https://github.com/coopnorge/python-bigquery-extras/pull/295 reverts the library back to when it was succeeding. While the builds will succeed for now, we need to make sure that the mypy checks are updated to fix this permanently.

@pravindahal
Copy link
Contributor Author

Updating to latest mypy causes this issue: https://github.com/coopnorge/python-bigquery-extras/pull/292

@pravindahal pravindahal removed their assignment Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
technical debt Issue relates to technical debt
Projects
None yet
Development

No branches or pull requests

1 participant