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

update tests #76

Merged
merged 4 commits into from
Nov 1, 2023
Merged

update tests #76

merged 4 commits into from
Nov 1, 2023

Conversation

orbeckst
Copy link
Member

  • update deprecacted pckg_resources use (fix update deprecated use of pkg_resources #75 )

  • 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.

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.
Copy link

codecov bot commented Oct 31, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (225ec81) 56.06% compared to head (4921450) 56.18%.
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #76      +/-   ##
==========================================
+ Coverage   56.06%   56.18%   +0.11%     
==========================================
  Files          12       12              
  Lines         371      372       +1     
  Branches       51       51              
==========================================
+ Hits          208      209       +1     
  Misses        160      160              
  Partials        3        3              
Files Coverage Δ
MDAnalysisData/base.py 98.33% <100.00%> (+0.02%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@orbeckst
Copy link
Member Author

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

@orbeckst
Copy link
Member Author

(I don't have more time to work on this right now. Help is welcome!)

@IAlibay
Copy link
Member

IAlibay commented Oct 31, 2023

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.

@pep8speaks
Copy link

Hello @orbeckst! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 210:80: E501 line too long (83 > 79 characters)

Line 1:1: W391 blank line at end of file

@orbeckst orbeckst requested a review from IAlibay November 1, 2023 02:21
@IAlibay IAlibay merged commit 3db4354 into master Nov 1, 2023
11 checks passed
@IAlibay IAlibay deleted the update-tests branch November 1, 2023 05:28
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.

update deprecated use of pkg_resources
3 participants