Skip to content

Missing __init__.py for mellea/stdlib #329

@psschwei

Description

@psschwei

When trying to run the tests, got the following error.

$ CICD=1 pytest
=========================================================================== test session starts ===========================================================================
platform linux -- Python 3.12.8, pytest-9.0.0, pluggy-1.6.0
rootdir: /home/paulschw/generative-computing/mellea
configfile: pyproject.toml
plugins: asyncio-1.3.0, anyio-4.11.0, nbmake-1.5.5, Faker-37.12.0
asyncio: mode=Mode.AUTO, debug=False, asyncio_default_fixture_loop_scope=None, asyncio_default_test_loop_scope=function
collected 338 items / 1 error / 1 skipped

================================================================================= ERRORS ==================================================================================
______________________________________________________ ERROR collecting mellea/stdlib/components/test_based_eval.py _______________________________________________________
ImportError while importing test module '/home/paulschw/generative-computing/mellea/mellea/stdlib/components/test_based_eval.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
../../.local/share/uv/python/cpython-3.12.8-linux-x86_64-gnu/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
mellea/stdlib/components/__init__.py:4: in <module>
    from ...core import (
E   ImportError: attempted relative import beyond top-level package
============================================================================ Skipped Examples =============================================================================
Examples with the following names were skipped because they cannot be easily run in the pytest framework; please run them manually:
__init__.py
pii_serve.py
simple_rag_with_filter.py
mcp_example.py
101_example.py
client.py
========================================================================= short test summary info =========================================================================
ERROR mellea/stdlib/components/test_based_eval.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
====================================================================== 1 skipped, 1 error in 23.38s =======================================================================

Re-adding the mellea/stdlib/__init__.py file seemed to fix it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions