feat: Copy/archive input XML files into the output directory#4030
Open
feat: Copy/archive input XML files into the output directory#4030
Conversation
Rename the archive output directory "archive_inputFiles" instead of "inputFiles". This prevents the archived XML files to unintentionally overwrite the standard "inputFiles" in GEOS/ when running with `-o .` where '.' is GEOS/ location
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
ProblemManager::generateDocumentation() used to create the XSD schema has undesired side-effects on the Problem. To mitigate this, the archiving has been moved after the basicSetup() in the main.cpp, and creates an isolated ProblemManager (like the tests) that will not propagate the side-effects, and make us able to copy the XSD schema to the archive.
Apparently, writing < and > between an existing XML tag in a code comment, like <Included> causes the doxygen test to fail.
This file contains hidden or 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
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.
(Previously #4003)
This PR proposes to archive the XML input deck to the output directory, so that every set of results is accompanied by the exact input that produced it.
When GEOS is run with the new archive command line option (
-a LEVEL), all XML input files (and every files that are included via the<Included>XML tag) are flattened into a single file in a timestamped directory.Following suggestions from @rrsettgast and @bd713, the XML input files are "flattened" into a single XML file.
The following command line argument is added to specifiy the level of archiving wanted:
Given a run like:
The following is created:
Previous proposition
This PR proposes to automatically archive the XML input deck to the output directory, so that every set of results is accompanied by the exact input that produced it.
When GEOS is run with an output directory specified (
-o <dir>), all XML input files (and every files that are included via the<Included>XML tag) are copied into the output directory with a timestamp.Given a run like:
The following is created:
When included files are "behind" the input tree of the main XML, the following structure is proposed:
Files outside the input tree (reached via
../) are prefixed with__for every../fromfoo.xml.