Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hypothesis library is missing when creating a bundle #263

Open
tpitkanen opened this issue Mar 30, 2022 · 0 comments
Open

hypothesis library is missing when creating a bundle #263

tpitkanen opened this issue Mar 30, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@tpitkanen
Copy link
Member

tpitkanen commented Mar 30, 2022

Description

hypothesis is listed as a dev dependency in Pipfile, which means it's only needed for development, but not for using Potku. This should be fine, but it causes problems when creating a bundle for distribution: the bundling script uses the release configuration, but it also runs the unit tests. As hypothesis is a testing library, all tests that require it fail, causing the bundling to fail.

hypothesis was added in PR #243 for issue #214.

Resolution

I see three possible solutions:

  1. Add hypothesis to normal dependencies. Tests will work, but it'll get included in the release build.
  2. Skip tests that use hypothesis when creating the bundle. Tests won't fail and hypothesis will not be added to the release build, but some tests won't be run.
  3. Configure the bundling script to run the tests using dev dependencies. Tests will be run, but this will slow down the bunding because two pipenvs will be created. Also, I don't have the time to figure out how to do this.

The first option is the easiest and won't cause gaps in test coverage, so I think I'll pick that one for now. Someone else could look into the third option later on. Option two seems bad all-around.

@tpitkanen tpitkanen added the bug Something isn't working label Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant