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

TST/FIX: ArchiveSearchWidget & TraceFileConvert Tests #84

Merged
merged 16 commits into from
Nov 8, 2024

Conversation

zdomke
Copy link
Collaborator

@zdomke zdomke commented Nov 4, 2024

Adding tests for ArchiveSearchWidget and ArchiveResultsTableModel.

Fixing issues that came up during testing:

  • In config.py & config.json:
    • Remove archiver_urls because I realized they aren't being used anywhere in the project and could cause confusion
  • In archive_search.py:
    • Change the method of getting the logger to prevent getting a duplicate
    • Fix ArchiveResultsTableModel.rowCount implementation because it requires an argument when it should default to an empty QModelIndex
    • Populate ArchiveSearchWidget.archive_url_textedit with $PYDM_ARCHIVER_URL instead of hardcoding the URL
    • In ArchiveSearchWidget.request_archiver_info, make some wildcards work for 1+ characters instead of just 1 character

@zdomke
Copy link
Collaborator Author

zdomke commented Nov 4, 2024

Note:
Tests for default model values and model validity will fail with the current version of PyDM (at the time of writing this) as some PyDM models will still return empty QVariants when a request is invalid. I have already made a PR for this: slaclab/pydm#1122

Second Note:
Some other test may fail due to a bug in FormulaCurveItems. I already have a PR to fix this bug as well. We can ignore tests with the same error message as the PR:
slaclab/pydm#1124

@zdomke zdomke changed the title TST/FIX: ArchiveSearchWidget Tests TST/FIX: ArchiveSearchWidget & TraceFileConvert Tests Nov 7, 2024
@zdomke
Copy link
Collaborator Author

zdomke commented Nov 8, 2024

Adding tests for TraceFileConvert.

Additional fixes that came up during testing

  • In plot_config.py:
    • Convert legend_chckbx.stateChanged signals to bool because it caused an issue in exported files
  • In trace_file_convert.py:
    • Improve remove_null_values
    • StripTool files with no curves throw a ValueError
    • Fix error with imported formula colors in Java Archive Viewer files

@zdomke zdomke merged commit 6716d1f into slaclab:main Nov 8, 2024
1 of 7 checks passed
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.

1 participant