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

[MRG] Added data check on axes in test_gui.py #726

Merged
merged 8 commits into from
Mar 13, 2024

Conversation

samadpls
Copy link
Contributor

@samadpls samadpls commented Mar 12, 2024

Fixes issue #697

  • added check for data on axes in test_gui.py

@jasmainak
Copy link
Collaborator

@gtdang can you review?

Signed-off-by: samadpls <[email protected]>
@codecov-commenter
Copy link

codecov-commenter commented Mar 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.44%. Comparing base (df99e07) to head (51b6ee5).
Report is 1 commits behind head on master.

❗ Current head 51b6ee5 differs from pull request most recent head 09d1e1e. Consider uploading reports for the commit 09d1e1e to get more accurate results

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #726      +/-   ##
==========================================
+ Coverage   89.06%   89.44%   +0.37%     
==========================================
  Files          28       28              
  Lines        5068     5068              
==========================================
+ Hits         4514     4533      +19     
+ Misses        554      535      -19     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gtdang
Copy link
Collaborator

gtdang commented Mar 12, 2024

This change is not needed as there is already a check for the default figure production in test_gui_add_figure.

The default figures are the figures that are automatically generated after running a simulation. The figures that need to be checked are the figures that the user can manually create using the Visualization tab. See image below.
Screenshot 2024-03-12 at 10 33 34 AM

Of this list "current dipole" and "histogram" don't need checks as they are part of the default set of plots. The others will need to have unique test functions developed except for the spectrogram, which already has a unique test test_gui_adaptive_spectrogram. However the spectrogram does need to have a check for if data is plotted.

@rythorpe
Copy link
Contributor

Also, @samadpls, if you use the word "fixes" or "closes" followed by the issue tag, GH will automatically detect it and close the associated issue when your PR gets merged. Just a fun trick! 😄

@samadpls
Copy link
Contributor Author

@gtdang, thank you for your suggestions. 🙌🏻 I have added the test cases for the mentioned plots above. Please let me know if there's anything else I need to address

@gtdang gtdang self-requested a review March 12, 2024 20:01
Signed-off-by: samadpls <[email protected]>
hnn_core/tests/test_gui.py Outdated Show resolved Hide resolved
@samadpls samadpls requested a review from gtdang March 13, 2024 11:37
hnn_core/tests/test_gui.py Outdated Show resolved Hide resolved
Signed-off-by: samadpls <[email protected]>
hnn_core/tests/test_gui.py Outdated Show resolved Hide resolved
@samadpls samadpls requested a review from gtdang March 13, 2024 15:03
@gtdang
Copy link
Collaborator

gtdang commented Mar 13, 2024

@jasmainak @dylansdaniels @ntolley Do we update the whats_new.rst for a change like this? Or only user-facing changes?

@jasmainak
Copy link
Collaborator

No updates to whats_new.rst ... it's only for user facing changes!

@samadpls samadpls requested a review from jasmainak March 13, 2024 18:53


@pytest.mark.parametrize("viz_type", ["layer2 dipole", "layer5 dipole",
"spikes", "PSD", "network"])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol ... I'm glad I made you do this ;-)

Copy link
Collaborator

@jasmainak jasmainak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good except the last nitpick ... I'll let @gtdang hit the "Squash and merge" button if he is happy.

Great first contribution! Shoot us an email to start discussing the GSoC project. @ntolley is your point person for that.

Copy link
Collaborator

@gtdang gtdang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@gtdang gtdang changed the title [TEST] Added data check on axes in test_gui.py [MRG] Added data check on axes in test_gui.py Mar 13, 2024
@gtdang
Copy link
Collaborator

gtdang commented Mar 13, 2024

Looks good except the last nitpick ... I'll let @gtdang hit the "Squash and merge" button if he is happy.

Great first contribution! Shoot us an email to start discussing the GSoC project. @ntolley is your point person for that.

Squash and not rebase?

@jasmainak
Copy link
Collaborator

We want to keep the commit history clean ... the diff should have been one or two commits. Rebase and merge is good when it's a bigger PR and we want to track the history of the changes.

@gtdang gtdang merged commit 21dcea5 into jonescompneurolab:master Mar 13, 2024
9 checks passed
gtdang pushed a commit to brown-ccv/hnn-core-ccv that referenced this pull request Mar 19, 2024
* add data check on axes in `test_gui.py`

Signed-off-by: samadpls <[email protected]>

* refactored

Signed-off-by: samadpls <[email protected]>

* Added tests for GUI visualization features

Signed-off-by: samadpls <[email protected]>

* fixed linting error

Signed-off-by: samadpls <[email protected]>

* added doc string

Signed-off-by: samadpls <[email protected]>

* Remove unnecessary code assertions

Signed-off-by: samadpls <[email protected]>

* Refactor visualization test

Signed-off-by: samadpls <[email protected]>

* refactor

---------

Signed-off-by: samadpls <[email protected]>
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

Successfully merging this pull request may close these issues.

5 participants