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

Automate testing of em-public-dashboard plots #173

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

iantei
Copy link
Contributor

@iantei iantei commented Oct 29, 2024

  • Initial setup of Github Action
    • Introduce test_with_docker.yml file
    • Calls when we have git push or pull request in main branch
    • Calls up docker-compose.tests.yml which will subsequently call start_tests.sh, that will trigger pytest for test_plots.py
  • Initial unit test cases for plots.py using pytest and coverage
    • Since pytest will be directly run through python file, rather than notebook. Updated plots.py to allow this.
    • Execute unit test using pytest for initial function of calculate_pct() and merge_small_entries()

Current coverage progress:

notebook-server-1  | ======================== 6 passed, 12 warnings in 1.94s ========================
notebook-server-1  | Name                                    Stmts   Miss  Cover
notebook-server-1  | -----------------------------------------------------------
notebook-server-1  | /usr/src/app/saved-notebooks/plots.py     303    248    18%
notebook-server-1  | test_plots.py                              48      0   100%
notebook-server-1  | -----------------------------------------------------------
notebook-server-1  | TOTAL                                     351    248    29%

@iantei iantei marked this pull request as ready for review October 29, 2024 22:53
…since emission is two directory above the current test_*.py files directory. Used importlib as the parent directory has - in saved-notebooks.
@iantei iantei changed the title Automate dashboard plots Automate testing of em-public-dashboard plots Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: PRs for review by peers
Development

Successfully merging this pull request may close these issues.

1 participant