Skip to content

build: add import linter check#31062

Merged
mumarkhan999 merged 3 commits intomasterfrom
umar/add-import-linter-check
Dec 7, 2022
Merged

build: add import linter check#31062
mumarkhan999 merged 3 commits intomasterfrom
umar/add-import-linter-check

Conversation

@mumarkhan999
Copy link
Contributor

@mumarkhan999 mumarkhan999 commented Sep 29, 2022

Ticket Link: https://openedx.atlassian.net/browse/BOM-2576

Description:
In order to empower refactoring, restructuring, and extraction of edx-platform code, we would like to be able to analyze and make assertions about what code depends on what. One way to do this is by computing the digraph of Python import statements in our codebase, and failing PR builds if unwanted imports exist in the graph. This is exactly what the tool import-linter will allow us to do.

Note:
For now, we're ignoring the existing imports which are breaking the check of independence.

Screenshots

  • If there is any forbidden import the check will fail like this

Screen Shot 2022-10-04 at 4 41 31 PM

@mumarkhan999 mumarkhan999 force-pushed the umar/add-import-linter-check branch from f98cdd4 to 0a00c18 Compare October 4, 2022 09:07
@mumarkhan999 mumarkhan999 changed the title Add import linter check build: add import linter check Oct 4, 2022
@mumarkhan999 mumarkhan999 force-pushed the umar/add-import-linter-check branch 5 times, most recently from 6635490 to db0ee54 Compare October 4, 2022 11:42
@mumarkhan999 mumarkhan999 force-pushed the umar/add-import-linter-check branch from 114983a to 6834cd8 Compare October 20, 2022 08:58
Copy link
Contributor

@jmbowman jmbowman left a comment

Choose a reason for hiding this comment

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

Argh, sorry about the overdue review on this; looks like a great start!

Once it's rebased and merged, I'll poke a few people who are likely to be interested and figure out where we want to go next with this.

@mumarkhan999 mumarkhan999 force-pushed the umar/add-import-linter-check branch from 79fa89b to 70e9af7 Compare December 6, 2022 11:40
@mumarkhan999 mumarkhan999 force-pushed the umar/add-import-linter-check branch from 70e9af7 to 16b387b Compare December 7, 2022 06:42
@mumarkhan999 mumarkhan999 merged commit 9c27944 into master Dec 7, 2022
@mumarkhan999 mumarkhan999 deleted the umar/add-import-linter-check branch December 7, 2022 07:07
@edx-pipeline-bot
Copy link
Contributor

EdX Release Notice: This PR has been deployed to the staging environment in preparation for a release to production.

@edx-pipeline-bot
Copy link
Contributor

EdX Release Notice: This PR has been deployed to the production environment.

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.

5 participants