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

Packaging issue: modules not visible #91

Closed
oesteban opened this issue Mar 29, 2020 · 2 comments
Closed

Packaging issue: modules not visible #91

oesteban opened this issue Mar 29, 2020 · 2 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@oesteban
Copy link
Collaborator

It seems modules (i.e., python files) are not automatically visible in their package (e.g., nitransforms.io, unless explicit imports are set in the __init__.py of the package.

In other words, this code:

from nitransforms.manip import TransformChain

doesn't work, unless we add the line

from . import manip

to nitransforms/__init__.py.

I might be misinterpreting how the default packaging works, but I believe we have some bad setting in the setup.cfg instead.

I know @effigies has dealt quite a bit with setuptools, pep517, etc. - any quick ideas of why this is happening? or this is actually not a bug?

@oesteban oesteban added the bug Something isn't working label Mar 29, 2020
@oesteban oesteban added this to the 20.0.0rc3 milestone Mar 29, 2020
oesteban added a commit to oesteban/nitransforms that referenced this issue Mar 29, 2020
Add modules to the ``__init__.py`` of root and ``nitransforms.io`` so
that they are visible for import.

References: nipy#91
oesteban added a commit to oesteban/nitransforms that referenced this issue Mar 29, 2020
Add modules to the ``__init__.py`` of root and ``nitransforms.io`` so
that they are visible for import.

References: nipy#91
@oesteban oesteban modified the milestones: 20.0.0rc4, 20.0.0rc3 Mar 29, 2020
@effigies
Copy link
Member

You've put an __all__ in __init__.py. That seems likely to make things hard to access.

oesteban added a commit that referenced this issue Mar 29, 2020
MAINT: Add imports of modules in ``__init__.py`` to workaround #91
@oesteban
Copy link
Collaborator Author

Okay, in fact not a bug. Thanks for the clarification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants