Skip to content

utils/__init__.py eager psychopy imports block cross-module reuse #21

@HugoFara

Description

@HugoFara

Hi, I noticed sim/context_helpers.py::_resolve_deadline() is a copy of utils/trials.py::resolve_deadline(), but can't be deduplicated because utils/__init__.py eagerly imports display and experiment (both require psychopy). Any import through psyflow.utils pulls in psychopy, breaking sim/'s pure-Python guarantee.

Would you be open to lazy-loading display/experiment in utils/__init__.py, using the same __getattr__ pattern as psyflow/__init__.py? Happy to submit a PR.

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