Closed orbeckst closed 1 year ago
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
225ec81
) 56.06% compared to head (4921450
) 56.18%. Report is 1 commits behind head on master.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Only works for Python 3.12, at least the way I wrote it. Failures like
=================================== FAILURES ===================================
____________________________ test_read_description _____________________________
def test_read_description():
> descr = base._read_description("adk_equilibrium.rst")
MDAnalysisData/tests/test_base.py:48:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
MDAnalysisData/base.py:210: in _read_description
path = importlib.resources.files(__name__) / description_dir / filename
/opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/importlib/resources/_common.py:22: in files
return from_package(get_package(package))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
package = 'MDAnalysisData.base'
def get_package(package):
# type: (Package) -> types.ModuleType
"""Take a package name or module object and return the module.
Raise an exception if the resolved module is not a package.
"""
resolved = resolve(package)
if wrap_spec(resolved).submodule_search_locations is None:
> raise TypeError(f'{package!r} is not a package')
E TypeError: 'MDAnalysisData.base' is not a package
/opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/importlib/resources/_common.py:55: TypeError
(I don't have more time to work on this right now. Help is welcome!)
I've opened PR #78 into this PR which has the right fix, I'm not 100% sure the missing __init__.py
file matters, but switching from __name__
to MDAnalysisData
does.
Hello @orbeckst! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
MDAnalysisData/base.py
:Line 210:80: E501 line too long (83 > 79 characters)
MDAnalysisData/descr/__init__.py
:
potential reference value fix
fix reference DESCR length for YiiP test
The YiiP test failed locally for me. I adjusted the reference number of characters in the DESCR file (same as with wc) but because these tests are NOT run in CI, I am not 100% sure if this is correct or a local issue.
I added comments to test_datasets.py about limitations and how to execute locally.