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

Remove all import * #19

Closed
sobolevnrm opened this issue Apr 27, 2020 · 3 comments
Closed

Remove all import * #19

sobolevnrm opened this issue Apr 27, 2020 · 3 comments

Comments

@sobolevnrm
Copy link
Member

The import * are inhibiting refactoring.

sobolevnrm referenced this issue in Electrostatics/apbs-pdb2pqr Apr 27, 2020
See #578.

Didn't break any tests that weren't already broken.

Tagged with "TODO" some functions in utilities.py that should be
replaced with numpy.  See #565.
sobolevnrm referenced this issue in Electrostatics/apbs-pdb2pqr Apr 27, 2020
This cleans up the code but does not help with the import * issue
mentioned in #578.

In particular, when the "import *" is removed from aa.py, the tests
start to fail with an error indicating no heavy atoms in the molecule.
sobolevnrm referenced this issue in Electrostatics/apbs-pdb2pqr Apr 27, 2020
This cleans up the code but does not help with the import * issue
mentioned in #578.

When the following import statements are removed, the tests start to
fail with "no heavy atom" errors:

* aa.py - `from .structures import *`
* protein.py - `from .aa import *`

Some routines (particularly in utilities.py) have also been flagged with
TODO comments as candidates for replacement with numpy.  See #565.
sobolevnrm referenced this issue in Electrostatics/apbs-pdb2pqr Apr 27, 2020
Still haven't identified the source of the problem for #578.
@sobolevnrm
Copy link
Member Author

pdb2pqr

This is a (horrible) dependency graph as of 47ed03dd9b143bc094f30840a8d17818e831ba7c

The two import * dependencies that are still causing problems are shown in red. If these are replaced with more selective imports, the test cases fail with errors indicating missing heavy atoms. If these are included as-is, the code works.

@intendo
Copy link
Contributor

intendo commented Apr 27, 2020

I think some of the packages may already be in the system cache. I wonder if the try/except example in https://stackoverflow.com/a/33547682 would work?

sobolevnrm referenced this issue in Electrostatics/apbs-pdb2pqr May 1, 2020
There is still a big problem with import * statements. See #578.
sobolevnrm referenced this issue in Electrostatics/apbs-pdb2pqr May 3, 2020
Working towards #578.
@sobolevnrm sobolevnrm transferred this issue from Electrostatics/apbs-pdb2pqr Jul 3, 2020
@intendo
Copy link
Contributor

intendo commented Aug 17, 2020

I can't find any more import * in any of the Python files. I think we can close this one.

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

No branches or pull requests

2 participants