-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add validation directory (moved from rms-webtools repo) * Add command line tool to show opus products output with the given absolute path of a filespec. * - Update test framework for opus products on COCIRS. - Add '--update' param in pytest command line to create the golden copy by using the current opus products output. - Fixed the output of show_opus_products.py * Update opus_products test for pds3file to use the new test framework that read and compare with golden copies of expected results. All golden copies can be updated using '--update' param when calling pytest or coverage. * Update run_tests_coverage.sh to take in '--update' param. When '--udpate' is passed in, the script will update the opus products golden copies. * - Update pds4file opus products test framework to compare results with the expected golden copies. - Add '--update' param in pytest to update the golden copies based on the current opus products output. * Update show_opus_products.py to print pretty results in table format using tabulate package. * Create these top level functions in PdsFile class to set parameters in the subclasses: use_shelves_only, require_shelves, set_logger, set_easylogger * Reorganize the code by creating read_or_update_golden_copy function to either read or update the golden copy of the test results. * Add test_associated_abspaths with the new test framework for all pds3 rules. * Refractor the code by moving the general pdsfile test functions or helpers that can be applied to both Pds3File and Pds4File testings to pdsfile/pdsfile_test_helper.py. * Add test_opus_id_to_primary_logical_path to pds3file rules/VG_28xx.py * Convert all golden copies of test results from .py to .txt files. * Write the golden copies of test results using pprint so that each file of a category is in its own line in the file. * In show_opus_products.py, add these options - "--logical-path": pass in logical path for pdsfile instantiation. - "-pds3": a flag to instantiate a Pds3File instance - "-pds4": a flag to instantiate a Pds4File instance - "--pprint": a flag to display output using pprint * Update the param descriptions in show_opus_products.py * Update the display table by removing the horizontal line between each product of the same category. Now each product file of the same opus type will be in different lines with no horizontal separator lines between them. * Add "--opus-types" options for show_opus_products.py, it will display the opus products output belong to the given opus types. If wrong opus types are given, it will desplay warning. * Clean up the code style in show_opus_products.py * Clean up the string quotations in show_opus_products.py * Fixed typo in the error messages in show_opus_products.py * Fixed COISS_2001.targz & COISS_2001_previews.targz input cases for from_path function. * Fixed input case for checksums/archives/whatever to properly cache the category 'checksums-archives-.*' in the preload stage (inside _complete) * Fixed the input case COISS_0xxx/v1 for from_path, it will now return volumes/COISS_0xxx_v1 instead of volumes/COISS_0xxx/v1 * Update test for from_path * Remove unused print in pdsfile.py * Clean up uranus_occs_earthbased.py and remove redundant COCIRS folder * Modify require_shelves and use_shelves_only under pdsfile.py to take in only one status parameter to set both Pds3File and Pds4File attributes to the same status. * Update show_opus_products to take in multiple file paths, could be absolute paths or logical paths and could be pds3 or pds4, and display all their outputs. Also add an option to display output in narrow table so that files with long name won't break the table in narrow screen. * Add tests or comment to fix the untested code revealed by code coverage in these files: - Bug fixed in test_opus_id_to_primary_logical_path in rules/COCIRS_xxx.py - Tests and comments added in DATA_SET_ID in rules/COUVIS_0xxx.py - Tests added in OPUS_ID_TO_PRIMARY_LOGICAL_PATH in rules/COVIMS_0xxx.py * Add tests to test_filename_keylen in test_pds3file_whitebox.py and fixed a bug in FILENAME_KEYLEN in rules/COISS_xxxx.py * Update all test/test_.* files to have 100% coverage * Remove functions not used, and Remove the code branch that will never be reach. * Update comments from line 3446-3440 in pdsfile.py * Removed commented out code at line 4250 in from_path function. * Clean up show_opus_products.py and add .flake8 * Remove test_opus_products_count tests. --------- Co-authored-by: Robert French <[email protected]>
- Loading branch information
1 parent
f0c6842
commit fe5ed96
Showing
77 changed files
with
2,353 additions
and
3,328 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
[run] | ||
branch = True | ||
omit = | ||
**/tests/*.py | ||
|
||
[html] | ||
Title = Coverage Report for PdsFile | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[flake8] | ||
max-line-length: 90 | ||
|
||
per-file-ignores = | ||
# continuation line under-indented for visual indent | ||
show_opus_products.py: E128 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.