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

dev(ingest): move from isort to ruff #12364

Merged
merged 2 commits into from
Jan 16, 2025
Merged

Conversation

anshbansal
Copy link
Collaborator

Took some hit and trials to come as close to original sorting but minimum these 4 changes were still made.

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
  • For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

@github-actions github-actions bot added the ingestion PR or Issue related to the ingestion of metadata label Jan 16, 2025
Copy link

codecov bot commented Jan 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

Files with missing lines Coverage Δ
...n/src/datahub/ingestion/source/ge_data_profiler.py 72.12% <100.00%> (ø)
...gestion/src/datahub/sql_parsing/sqlglot_lineage.py 93.97% <100.00%> (ø)
...ingestion/src/datahub/sql_parsing/sqlglot_utils.py 90.47% <100.00%> (ø)

... and 5 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2226820...236cca5. Read the comment docs.

@sgomezvillamor
Copy link
Contributor

I see other references to isort in master not addressed in this PR
https://github.com/search?q=repo%3Adatahub-project%2Fdatahub%20isort&type=code

Should we fully remove them?

@datahub-cyborg datahub-cyborg bot added pending-submitter-response Issue/request has been reviewed but requires a response from the submitter and removed needs-review Label for PRs that need review from a maintainer. labels Jan 16, 2025
@anshbansal
Copy link
Collaborator Author

@sgomezvillamor Those are separate modules. I am doing this right now only for metadata-ingestion

@datahub-cyborg datahub-cyborg bot added pending-submitter-merge and removed pending-submitter-response Issue/request has been reviewed but requires a response from the submitter labels Jan 16, 2025
@anshbansal anshbansal merged commit 765bf80 into master Jan 16, 2025
204 of 265 checks passed
@anshbansal anshbansal deleted the ab-2025-jan-16-move-to-isort branch January 16, 2025 11:18
@@ -12,6 +10,7 @@
import traceback
import unittest.mock
import uuid
from datahub.utilities._markupsafe_compat import MARKUPSAFE_PATCHED
Copy link
Collaborator

@hsheth2 hsheth2 Jan 17, 2025

Choose a reason for hiding this comment

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

this is actually a pretty dangerous change - we're applying patches to third-party libraries, so we need to make sure that those patches get applied first. so moving the import down is not actually safe.

we'll need to use custom isort sections for this https://docs.astral.sh/ruff/settings/#lint_isort_sections

Copy link
Collaborator

Choose a reason for hiding this comment

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

also note that this is only required for metadata-ingestion - this specific config does not need to be copied across to every module

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ingestion PR or Issue related to the ingestion of metadata pending-submitter-merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants