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

[MAINTENANCE] enable TRYceratops linting rules #9684

Merged
merged 6 commits into from Apr 1, 2024

Conversation

JennyTee
Copy link
Contributor

@JennyTee JennyTee commented Apr 1, 2024

Enable TRYceratops linting rules for better exception handling & raising.

  • Description of PR changes above includes a link to an existing GitHub issue
  • PR title is prefixed with one of: [BUGFIX], [FEATURE], [DOCS], [MAINTENANCE], [CONTRIB]
  • Code is linted - run invoke lint (uses ruff format + ruff check)
  • Appropriate tests and docs have been updated

For more information about contributing, see Contribute.

After you submit your PR, keep the page open and monitor the statuses of the various checks made by our continuous integration process at the bottom of the page. Please fix any issues that come up and reach out on Slack if you need help. Thanks for contributing!

Copy link

netlify bot commented Apr 1, 2024

Deploy Preview for niobium-lead-7998 canceled.

Name Link
🔨 Latest commit 78a8bae
🔍 Latest deploy log https://app.netlify.com/sites/niobium-lead-7998/deploys/660b15f213e9a00008eab969

Copy link

codecov bot commented Apr 1, 2024

Codecov Report

Attention: Patch coverage is 26.13308% with 766 lines in your changes are missing coverage. Please review.

Project coverage is 82.55%. Comparing base (fb6cbb4) to head (78a8bae).

Files Patch % Lines
great_expectations/self_check/util.py 2.94% 33 Missing ⚠️
great_expectations/data_context/types/base.py 3.57% 27 Missing ⚠️
...data_context/data_context/abstract_data_context.py 35.00% 26 Missing ⚠️
great_expectations/dataset/util.py 0.00% 23 Missing ⚠️
...tions/data_context/store/gx_cloud_store_backend.py 12.50% 21 Missing ⚠️
great_expectations/execution_engine/util.py 0.00% 21 Missing ⚠️
...column_aggregate_metrics/column_quantile_values.py 0.00% 20 Missing ⚠️
great_expectations/expectations/metrics/util.py 0.00% 19 Missing ⚠️
great_expectations/core/batch.py 37.50% 15 Missing ⚠️
...ns/execution_engine/sqlalchemy_execution_engine.py 21.05% 15 Missing ⚠️
... and 173 more
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #9684   +/-   ##
========================================
  Coverage    82.55%   82.55%           
========================================
  Files          511      511           
  Lines        46396    46396           
========================================
  Hits         38303    38303           
  Misses        8093     8093           
Flag Coverage Δ
3.10 64.61% <14.27%> (ø)
3.11 64.61% <14.27%> (ø)
3.11 athena or clickhouse or openpyxl or pyarrow or project or sqlite or aws_creds 53.97% <2.41%> (ø)
3.11 aws_deps 48.99% <1.15%> (ø)
3.11 big 63.99% <4.43%> (ø)
3.11 databricks 48.21% <0.48%> (ø)
3.11 filesystem 63.78% <7.71%> (ø)
3.11 mssql 47.43% <1.54%> (ø)
3.11 mysql 47.48% <1.54%> (ø)
3.11 postgresql 54.26% <2.79%> (ø)
3.11 snowflake 48.74% <0.57%> (-0.01%) ⬇️
3.11 spark 60.65% <4.91%> (ø)
3.11 trino 53.90% <1.92%> (ø)
3.8 64.62% <14.27%> (ø)
3.8 athena or clickhouse or openpyxl or pyarrow or project or sqlite or aws_creds 53.98% <2.41%> (ø)
3.8 aws_deps 49.00% <1.15%> (ø)
3.8 big 64.00% <4.43%> (ø)
3.8 databricks 48.22% <0.48%> (ø)
3.8 filesystem 63.78% <7.71%> (ø)
3.8 mssql 47.41% <1.54%> (ø)
3.8 mysql 47.47% <1.54%> (ø)
3.8 postgresql 54.25% <2.79%> (ø)
3.8 snowflake 48.76% <0.57%> (+<0.01%) ⬆️
3.8 spark 60.61% <4.91%> (ø)
3.8 trino 53.89% <1.92%> (ø)
3.9 64.60% <14.27%> (ø)
cloud 0.00% <0.00%> (ø)
docs-basic 54.49% <0.57%> (ø)
docs-creds-needed 55.07% <0.57%> (ø)
docs-spark 54.59% <0.57%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -282,6 +282,7 @@ lint.select = [
# https://docs.astral.sh/ruff/rules/#numpy-specific-rules-npy
"NPY", # NumPy-specific rules TODO: Enable after fixing or ignoring errors
"NPY201", # numpy 2.0 compatibility (see https://numpy.org/devdocs/numpy_2_0_migration_guide.html#ruff-plugin) -- Explicitly listed to view preview rule errors
"TRY", # TRYceratops
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the main change that enables TRYceratops

@JennyTee JennyTee changed the title add try to pypoject.toml; skip try003 for test files [MAINTENANCE] add try to pypoject.toml; skip try003 for test files Apr 1, 2024
@JennyTee JennyTee requested a review from Kilo59 April 1, 2024 20:10
@JennyTee JennyTee self-assigned this Apr 1, 2024
@JennyTee JennyTee changed the title [MAINTENANCE] add try to pypoject.toml; skip try003 for test files [MAINTENANCE] add try to pypoject.toml, skip try003 for test files Apr 1, 2024
@JennyTee JennyTee marked this pull request as ready for review April 1, 2024 20:22
Copy link
Member

@Kilo59 Kilo59 left a comment

Choose a reason for hiding this comment

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

🙌 🎊

Copy link
Member

@anthonyburdi anthonyburdi left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for keeping the noqa additions to a single commit, much easier to review the config changes.

@@ -15,6 +15,7 @@ lint.extend-ignore = [
"PLR2004", # magic value comparison is common test pattern
"PLR0913", # too many arguments
"RUF015", # element index slice is common test pattern
"TRY003", # long messages in tests are ok
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ignoring TRY003 errors (Avoid specifying long messages outside the exception class) in test files

@JennyTee JennyTee changed the title [MAINTENANCE] add try to pypoject.toml, skip try003 for test files [MAINTENANCE] enable TRYceratops linting rules Apr 1, 2024
@JennyTee JennyTee added this pull request to the merge queue Apr 1, 2024
Merged via the queue into develop with commit 2bbfb50 Apr 1, 2024
207 of 242 checks passed
@JennyTee JennyTee deleted the m/_/enable-try-rules branch April 1, 2024 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants