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
Fleur inp.xml converter #88
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
janssenhenning
force-pushed
the
inpxml-converter
branch
from
October 21, 2021 18:32
004b121
to
6c51a91
Compare
Codecov Report
@@ Coverage Diff @@
## develop #88 +/- ##
===========================================
+ Coverage 80.44% 80.86% +0.41%
===========================================
Files 121 125 +4
Lines 21656 22386 +730
===========================================
+ Hits 17421 18102 +681
- Misses 4235 4284 +49 |
conversion not yet working Only the generation of what to do is kind of done but also rough
- Added creation of tags (with specification of attributes) - fix several inconsistencies in resolve_ambiguouities Still missing: - Creating/moving attributes (are detected but nothing is done in the actual conversion) - Between schemas the enforced order can also change this needs to be detected (And corrected at the very end of the conversion since the intermediate steps could lead to a lot of inconsistencies)
Next up clean up conversion - Create private function to create tags from a simple xpath with parent creation, since this should only be used in this specific circumstance, where we cannot rely on any one schema dictionasry fro complete order information - Moving attributes - Detect changing order (could also just recursively go over the whole file and look for the places where order does not match ()since this should require no user input) - Incompatible types (int -> bool and similar)
…he end of the conversion and not caring in the intermediate steps
… by reconverting everything into the namedtuples
THis way a conversion from Max4 to Max5 is possible under the right circumstances (There is a kpointlist and the bravais matrix explicitely)
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
janssenhenning
force-pushed
the
inpxml-converter
branch
from
October 22, 2021 13:46
8967b6a
to
f4d38c9
Compare
The file is not split up again instead the whole tree is written into one file
for more information, see https://pre-commit.ci
…umns are always there
Removing tags/attributes first can lead to tags attributes to be moved to disappear Now the elements are gathered beforehand and then reinserted
for more information, see https://pre-commit.ci
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 PR adds a commandline tool based on the Schema dictionaries for converting inp.xml files between different file versions. Avalable in the click cli via
masci-tools inpxml
For this a conversion is needed, which describes what to do, which is either available as a json file or if not can be created via a series of interactive command line inputs. Conversions are at the moment assumed to be unique for each versionn pair and direction
TODO: