-
Notifications
You must be signed in to change notification settings - Fork 168
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
Adds PDS4 template callback functions #4226
Merged
Merged
Conversation
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
jessemapel
commented
Dec 30, 2020
struct tm *tmbuf = gmtime(&startTime); | ||
char timestr[80]; | ||
strftime(timestr, 80, "%Y-%m-%dT%H:%M:%S", tmbuf); | ||
return string(timestr); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lifted from mrf2pds
jessemapel
commented
Dec 30, 2020
QRegExp timeRegex("\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}"); | ||
EXPECT_TRUE(QString::fromStdString(line).contains(timeRegex)) << "String [" << line << "] " | ||
<< "does not match the time format " | ||
<< "[YYYY-MM-DDTHH:MM:SS]."; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's an example output for a failure, this one I had the ouput file contain the MD5 hash,
1729: /Users/jmapel/ISIS3/isis/tests/FunctionalTestsTopds4.cpp:43: Failure
1729: Value of: QString::fromStdString(line).contains(timeRegex)
1729: Actual: false
1729: Expected: true
1729: String [7ca9d00ad2b259d3c4bf95b6e5b477fd] does not match the time format [YYYY-MM-DDTHH:MM:SS].
scsides
approved these changes
Jan 4, 2021
scsides
added a commit
that referenced
this pull request
Jan 12, 2021
* Removed compile and deprication warnings. Fixes #4110 * temp add of to pds 4 test * Initial topds4 app and cmake updates to include inja (#4207) * Removed compile and deprication warnings. Fixes #4110 * temp add of to pds 4 test * Inintal topds4 app and cmake updates to include inja * Delete extra headers * Fixed inja include Co-authored-by: ssides <ssides@usgs.gov> * Added conda-forge inja * add template file * Adds PVL to JSON converters (#4212) * Pvl to JSON conversion * Renamed file * Added repeated elements and examples * Topds4 real parameters (#4223) * now has some real parameters * removed inja files * Add full orex pds4 template (#4233) * now has some real parameters * removed inja files * full orex xml * add full orex template * Added callbacks and tests (#4226) * Adds Xml2Json capability to topds4 branch (#4228) * Inintal topds4 app and cmake updates to include inja * Delete extra headers * Fixed inja include * Added basic working XMLToJson functionality * Updated to work with many nested levels of different amounts of repeated tags * Add support for unsupported xml edge cases * Add tests that work to test mutliple nested repeated values conversion * cleanup * Update to include no-text value cases to work in repeated-value cases * Update test * Break up tests * Fix typoes in comments * Normalized topds4 and added tests (#4234) * Removed data source args and added app log * Added simple tests for topds4 * Moved line * Added more template elements and callback for file size (#4236) * now has some real parameters * removed inja files * full orex xml * add full orex template * More template elements, and file size callback * Added Extra data source parameters to topds4 (#4239) * Added extra parameters * Added duplicate warnings * Fixed warning * Add writing a cube out to topds4 (#4241) * Basic cubeatt conversion * Add more useful function signature * Removed hardcoded path * Update based on feedback * Add better band test * Updated to fix failing tests and remove old testfiles * Add copy of topds4 templates to CMakeLists.txt (#4242) * Fixed callbacks and doc updates (#4243) * Fixed callbacks and doc updates * added some extra docs * Added original xml label and tests * Update cubeattribute to include an option to supply CubeAttributeInput directly (#4244) * Update cubeatt to add cubeattributeinput option. Also add tests for all function signatures available * Remove unnecessary comments * Update to use explicit array conversion. * Remove commented out code * Update CHANGELOG to include topds4 addition * Delete osirisrex.xml.tpl Removed temporary file * Delete 20190612T090019S776_map_L0pan.xml.full Remove temporary file * Delete 20190612T090019S776_map_L0pan.xml.tpl Remove temp file * Added mis-deleted file (#4249) * Update XmlToJson.cpp * Update topds4.xml * Update topds4.xml * Update topds4.xml * Add setting of virtual bands to topds4 and remove unneeded header file includes Co-authored-by: ssides <ssides@usgs.gov> Co-authored-by: Kristin Berry <kberry@usgs.gov>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds 3 callbacks:
and tests for each of them to topds4. Because the template reading is not in the branch yet, I hardcoded the templates and would uncomment each to check them. Once #4223 is merged I will get this merged with that and the tests should work properly.