Skip to content

Test suite always requires 4C dependencies #197

@sbrandstaeter

Description

@sbrandstaeter

Description of the Issue:

Running pytest -k sobol_indices_ishigami should not require any 4C related code.

However, I was not able to run the test suite due to the following error message:

======================================================================================================================================== ERRORS =========================================================================================================================================
_________________________________________________________________________________________________ ERROR collecting tests/integration_tests/fourc/test_fourc_mc_random_material_field.py _________________________________________________________________________________________________
ImportError while importing test module '/home/a11bsebr/workspace/queens/tests/integration_tests/fourc/test_fourc_mc_random_material_field.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
src/queens_interfaces/fourc/random_material_preprocessor.py:21: in <module>
    from fourcipp.fourc_input import FourCInput
E   ModuleNotFoundError: No module named 'fourcipp'

The above exception was the direct cause of the following exception:
../../mambaforge/envs/queens/lib/python3.11/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/integration_tests/fourc/test_fourc_mc_random_material_field.py:32: in <module>
    from queens_interfaces.fourc.random_material_preprocessor import (
src/queens_interfaces/fourc/random_material_preprocessor.py:23: in <module>
    raise ImportError(
E   ImportError: The required packages to construct random fields in QUEENS for 4C are not installed. Please install them via 
E    pip install -e .[fourc]

While pip installing the dependencies as suggested solved the problem, this should not be necessary.

Proposed Solution:

No response

Action Items:

No response

Related Issues:

No response

Interested Parties:

@gilrrei

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: openNo solution for this issue has been providedtopic: testingIssue/PR related to testing and pytesttype: usabilityIssue/PR to improve usability

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions