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

started alias of main package for imports #266

Merged
merged 1 commit into from Apr 14, 2024
Merged

Conversation

JohnGriffiths
Copy link
Collaborator

just need to have a top-level folder eegexpy

and then add relative imports through an __init__.py

probably are going to have a lot of stuf in that __init__.py

from eegnb.analysis.utils import *



Copy link
Collaborator

Choose a reason for hiding this comment

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

You should specify a __all__ variable here with the intended "exports" of the package (what will be imported with from eegexpy import *).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Can you elaborate?

I had hoped the import * would give me all of the eegnb imports and that would be the only line needed

In practice that didn't work. Unclear why. From reading it seemed it could be that the modules inside eegnb are doing relative imports. So it looks like I will need to explicitly do a load of imports in this init to get it to mirror eegnb

@JohnGriffiths JohnGriffiths marked this pull request as ready for review April 14, 2024 20:58
@JohnGriffiths
Copy link
Collaborator Author

merging for now as I want to do a demo :S

can continue to assess the imports question

@JohnGriffiths JohnGriffiths merged commit 8421b6c into develop Apr 14, 2024
5 of 6 checks passed
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

2 participants