Skip to content

[Major] No testing #8

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

Closed
vigji opened this issue Jan 4, 2024 · 4 comments
Closed

[Major] No testing #8

vigji opened this issue Jan 4, 2024 · 4 comments

Comments

@vigji
Copy link

vigji commented Jan 4, 2024

The repo currently has no test modules, which is a major flow and would be highly recommended for deploying reliable and maintainable code.

Would you consider add testing modules to the codebase, and integrate a testing workflow using GitHub Actions?

@niksirbi
Copy link

niksirbi commented Jan 9, 2024

Agreed, this is a major issue.
I recommend at least starting with some smoke tests for the most important functionalities/workflows.

@calebweinreb
Copy link
Owner

Thanks for the suggestions! To address this, we have now added tests (#17). The test modules include:

  • test_gui.py: Launches the GUI and loads a data-light example dataset with video, heatmap and trace plot. Currently this module does not include simulated GUI interactions.
  • test_io.py: Creates a new SNUB project and runs through a basic project-building workflow, including addition of a heatmap, scatter plot and video. The test passes if these steps complete without error.
  • test_nwb.py: Downloads an NWB file using the DANDI API and then converts the file into a SNUB dataset. The test passes if these steps complete without error. The test is essentially equivalent to the second example from the docs (https://github.com/calebweinreb/SNUB/blob/nwb/docs/source/nwb.rst)

@niksirbi
Copy link

I ran the tests locally and measured a test coverage of 54% (using pytest-cov). That's a great start!
I opened a separate issue #19 where I suggest separating the "dev" dependencies (e.g. pytest), from the ones users require.

Ideally, you would want to run these tests across OS platforms and Python versions (e.g. using GitHub's CI features), but I'm fine with you adding those later.

@vigji
Copy link
Author

vigji commented Feb 5, 2024

I think this is a great start for testing, enough to at least check out basic functioning is someone wants to contribute to the project. Agreed that multiple platforms can come later, I'll close this for now!

@vigji vigji closed this as completed Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants