Skip to content

CI should test installed version of Python API, not local copy #1226

@paulromano

Description

@paulromano

Right now when we install OpenMC on Travis CI, we use pip install -e. The reason for this is that if we do a normal pip install, pytest won't actually pick it up because of the way that our directories are structured (explanation here). Since our tests/ directory is a package by virtue of having an __init__.py file, this causes pytest to add the root directory of our repo to sys.path, which means import openmc will always get that local version, not an installed one. To get around this, one possible solution is to move our openmc/ directory into a src/ directory as recommended here, but we already have a src/ directory for C++ files. We could have src_cpp/ and src_python/?

The risk to not doing this is that we're never really testing an installed version, and it can be easy to mess things up (e.g., forgetting to put files in MANIFEST.in).

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