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/fix pydantic for testing #42

Closed
orbeckst opened this issue Sep 18, 2023 · 3 comments
Closed

update/fix pydantic for testing #42

orbeckst opened this issue Sep 18, 2023 · 3 comments

Comments

@orbeckst
Copy link

The tests for the MDAKit #41 fail because some issues with pydantic. See also MDAnalysis/MDAKits#47 (comment) .

==================================== ERRORS ====================================
_________________ ERROR collecting mdsapt/tests/test_config.py _________________
/usr/share/miniconda3/envs/test/lib/python3.9/site-packages/_pytest/runner.py:341: in from_call
    result: Optional[TResult] = func()
/usr/share/miniconda3/envs/test/lib/python3.9/site-packages/_pytest/runner.py:372: in <lambda>
    call = CallInfo.from_call(lambda: list(collector.collect()), "collect")
/usr/share/miniconda3/envs/test/lib/python3.9/site-packages/_pytest/python.py:531: in collect
    self._inject_setup_module_fixture()
/usr/share/miniconda3/envs/test/lib/python3.9/site-packages/_pytest/python.py:545: in _inject_setup_module_fixture
    self.obj, ("setUpModule", "setup_module")
/usr/share/miniconda3/envs/test/lib/python3.9/site-packages/_pytest/python.py:310: in obj
    self._obj = obj = self._getobj()
/usr/share/miniconda3/envs/test/lib/python3.9/site-packages/_pytest/python.py:528: in _getobj
    return self._importtestmodule()
/usr/share/miniconda3/envs/test/lib/python3.9/site-packages/_pytest/python.py:617: in _importtestmodule
    mod = import_path(self.path, mode=importmode, root=self.config.rootpath)
/usr/share/miniconda3/envs/test/lib/python3.9/site-packages/_pytest/pathlib.py:567: in import_path
    importlib.import_module(module_name)
/usr/share/miniconda3/envs/test/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1030: in _gcd_import
    ???
<frozen importlib._bootstrap>:1007: in _find_and_load
    ???
<frozen importlib._bootstrap>:972: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:228: in _call_with_frames_removed
    ???
<frozen importlib._bootstrap>:1030: in _gcd_import
    ???
<frozen importlib._bootstrap>:1007: in _find_and_load
    ???
<frozen importlib._bootstrap>:972: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:228: in _call_with_frames_removed
    ???
<frozen importlib._bootstrap>:1030: in _gcd_import
    ???
<frozen importlib._bootstrap>:1007: in _find_and_load
    ???
<frozen importlib._bootstrap>:986: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:680: in _load_unlocked
    ???
<frozen importlib._bootstrap_external>:850: in exec_module
    ???
<frozen importlib._bootstrap>:228: in _call_with_frames_removed
    ???
mdsapt/__init__.py:8: in <module>
    from .config import Config, load_from_yaml_file
mdsapt/config.py:132: in <module>
    class RangeFrameSelection(BaseModel):
mdsapt/config.py:145: in RangeFrameSelection
    @root_validator()
/usr/share/miniconda3/envs/test/lib/python3.9/site-packages/pydantic/deprecated/class_validators.py:228: in root_validator
    raise PydanticUserError(
E   pydantic.errors.PydanticUserError: If you use `@root_validator` with pre=False (the default) you MUST specify `skip_on_failure=True`. Note that `@root_validator` is deprecated and should be replaced with `@model_validator`.
E   
E   For further information visit https://errors.pydantic.dev/2.3/u/root-validator-pre-skip
@orbeckst orbeckst changed the title update/fix pydantic update/fix pydantic for testing Sep 18, 2023
@ALescoulie
Copy link
Member

I'll get started on this once my MDA pull request is finished, I haven't really touched this project in a while

@ALescoulie
Copy link
Member

ALescoulie commented Nov 8, 2023

I just merged a fix to this issue written by @ifd3f. She determined that there was an issue with a transitive dependency issue with pydantic as well as root_validator being deprecated. I'll do a release to patch this issue today. Once MD-SAPT is installable we can add it to the MDAKits repo. Sorry for the delay in fixing this, we'll get this wrapped up soon!

@ALescoulie
Copy link
Member

I forgot to close this issues earlier but this was fixed by @ifd3f in v2.0.3. We also have a conda-forge deployment, so I'll make sure to finish the registration process.

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