Skip to content

osdagbridge.core is unimportable: core/__init__.py imports a non-existent models module #11

Description

@aadityayadav2004

Summary

src/osdagbridge/core/__init__.py executes from .models import *, but there is no models module in osdagbridge.core. Importing osdagbridge.core — or any submodule beneath it — raises ModuleNotFoundError, so the core package cannot be used at all on a fresh checkout of main.

Reproduction

On a clean checkout of main (2cb7ddc):

git clone https://github.com/osdag-admin/OsdagBridge.git
cd OsdagBridge
python -m venv .venv && source .venv/bin/activate
pip install -e .
python -c "import osdagbridge.core"

Actual

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File ".../src/osdagbridge/core/__init__.py", line 2, in <module>
    from .models import *
ModuleNotFoundError: No module named 'osdagbridge.core.models'

Confirmed on macOS (Apple Silicon), Python 3.11.

Expected

import osdagbridge.core succeeds, and submodules such as osdagbridge.core.bridge_types.plate_girder.dto are importable.

Why the test suite does not catch this

All seven test modules under tests/ are placeholders of the form:

def test_placeholder_io():
    assert True

None of them import the package, so pytest reports 6 passing tests against a package that cannot be imported. Any test that imports from osdagbridge.core fails at collection time instead.

Suggested fix

Remove the star import, since submodules are imported explicitly by their consumers:

"""Core package for OsdagBridge."""

Alternatively, add the intended models module if one was planned — but the current state is a hard import failure either way.

Happy to open a PR with the one-line fix plus a smoke test that imports the package, so this cannot regress silently.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions