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

Reorg module metadata and test directory to avoid namespace clashes #33

Merged
merged 1 commit into from
Dec 3, 2024

Conversation

clebergnu
Copy link
Contributor

@clebergnu clebergnu commented Dec 3, 2024

Because some tools, such as pylint, will mimic the import of Python modules, they can get confused on the test directory structure, and confuse it with the file containing the module implementation.

For instance, because there is currently:

autils/archive/ar.py

And:

tests/autils/archive/ar.py

Pylint may consider the later to be the former. Because we don't need the autils component in the tests directory, and because it's not expected that this repo will contain anything other than module implementations under the "autils" component, the simplest solution is to drop it.

For consistency, this also drops it from the metadata directory.

@clebergnu clebergnu force-pushed the lint_avoid_conflicts branch 2 times, most recently from eef1cfc to 42b115d Compare December 3, 2024 07:21
Because some tools, such as pylint, will mimic the import of Python
modules, they can get confused on the test directory structure, and
confuse it with the file containing the module implementation.

For instance, because there is currently:

   autils/archive/ar.py

And:

   tests/autils/archive/ar.py

Pylint may consider the later to be the former.  Because we don't need
the autils component in the tests, and because it's not expected that
this repo will contain anything other than module implementations
under the "autils" component, the simplest solution is to drop
it.

For consistency, this also drops it from the metadata directory.

Signed-off-by: Cleber Rosa <[email protected]>
@clebergnu clebergnu force-pushed the lint_avoid_conflicts branch from 42b115d to a90c81c Compare December 3, 2024 07:23
@clebergnu clebergnu changed the title Lint avoid conflicts Lint: avoid conflicts Dec 3, 2024
@clebergnu clebergnu changed the title Lint: avoid conflicts Reorg module metadata and test directory to avoid namespace clashes Dec 3, 2024
@clebergnu clebergnu self-assigned this Dec 3, 2024
@clebergnu clebergnu marked this pull request as ready for review December 3, 2024 07:26
Copy link
Contributor

@harvey0100 harvey0100 left a comment

Choose a reason for hiding this comment

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

LGTM - have adjusted website workflow towards new structure also in PR.
avocado-framework/avocado-framework.github.io#33

Copy link
Contributor

@richtja richtja left a comment

Choose a reason for hiding this comment

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

Hi @clebergnu, thanks for the quick fix. This is a very interesting issue and I have learned something new today.

@richtja richtja merged commit e806e53 into avocado-framework:main Dec 3, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done 109
Development

Successfully merging this pull request may close these issues.

3 participants