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

Fix GUI and plasma tests #1173

Merged
merged 3 commits into from
May 28, 2020
Merged

Conversation

epassaro
Copy link
Member

@epassaro epassaro commented May 27, 2020

Description

Plasma tests are fixed by removing the following lines in tardis/io/atom_data/base.py:

# Sort the dataframe before indexing to improve performance
lines.sort_index(inplace=True)

GUI test fixed by adding an if statement before importing modules that requires QT_API:

if 'QT_API' in os.environ:
    from tardis.gui.widgets import Tardis
    from tardis.gui.datahandler import SimpleTableModel

Then, forced to skip test_gui.py by removing export QT_API=pyqt from simple_test_framework.yml (we should re-activate this test on another PR).

Motivation and Context

Sorting introduced in #1141 makes plasma tests fail, but went unnoticed because a bug introduced in #1068 (fixed by #1162).

Combined with the failing test_gui.py the pipeline became hard to debug.

How Has This Been Tested?

  1. Go to the list of merged PRs: https://github.com/tardis-sn/tardis/pulls?q=is%3Apr+is%3Amerged.
  2. Run plasma tests for every recent PR and bisect the bug:
git checkout upstream/pr/1141
pytest tardis/plasma --tardis-refdata=/path/to/refdata
  1. Apply the above mentioned changes for the GUI and run:
pytest tardis --tardis-refdata=/path/to/refdata
  1. All tests must pass now.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have assigned/requested two reviewers for this pull request.

@epassaro epassaro mentioned this pull request May 27, 2020
@epassaro epassaro changed the title Fix plasma tests Fix GUI and plasma tests May 27, 2020
@epassaro epassaro self-assigned this May 27, 2020
@epassaro epassaro requested review from marxwillia and Rodot- May 27, 2020 23:43
@ebjordi
Copy link
Contributor

ebjordi commented May 28, 2020

Excellent

displayName: 'TARDIS test'
- script: |
bash <(curl -s https://codecov.io/bash)
displayName: 'Upload to codecov.io'
Copy link
Member Author

Choose a reason for hiding this comment

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

Sorry, YAML was formatted by VSCode. The only change here is the removal of the export QT_API=pyqt line.

Copy link
Contributor

Choose a reason for hiding this comment

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

This is fine, could you make a note of it in the PR so no one in the future is confused why this looks like such a big change?

Copy link
Contributor

@Rodot- Rodot- left a comment

Choose a reason for hiding this comment

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

These changes look fine, though they seem to really just be masking the issues with the gui, but I suppose fixing those is another problem.

Copy link
Contributor

@marxwillia marxwillia left a comment

Choose a reason for hiding this comment

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

Tests pass, new code looks clean. Excellent catch on the bug introduced by sorting the lines in atom_data/base.py. Future optimization attempts should keep this in mind.

@marxwillia marxwillia merged commit 9dee5b1 into tardis-sn:master May 28, 2020
atharva-2001 pushed a commit to atharva-2001/tardis that referenced this pull request Oct 1, 2021
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.

4 participants