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

Case insensitive schema dict #15

Merged
merged 38 commits into from Feb 8, 2021
Merged

Conversation

janssenhenning
Copy link
Contributor

@janssenhenning janssenhenning commented Feb 1, 2021

Fixes #12

  • Introduced CaseInsensitiveDict type (Custom subclass of collections.UserDict) to schema dictionaries to be able to find attribute or tag paths easily. Only changed entries directly indexed by attribute/tag names
  • Attribute paths now include attribute names directly
  • xpath construction functions in fleur_schema_parser_functions.py now use sets to make duplicate handling easier
  • Moved tag_name option from evaluate_attribute to get_attrib_xpath

TODO:

  • Expand get_tag_xpath and get_attrib_xpath tests to include case insensitivity
  • Update documentation (I'm pretty sure I mentioned case sensitivity)

Fix order bug due to usage of sets in xpath construction (list conversion from set does not guarantee order)
… pprint has an option to sort dict keys in python 3.8+, which should also work with UserDicts. I will keep this in mind
…that the attribute xpaths now contain the attribute names also moved hte tag_name option of evaluate_attribute to get_attrib_xpath
… dict, check type of the changed keys explicitely
@codecov-io
Copy link

codecov-io commented Feb 2, 2021

Codecov Report

Merging #15 (c137a93) into develop (d8ba76a) will increase coverage by 0.68%.
The diff coverage is 97.58%.

@@             Coverage Diff             @@
##           develop      #15      +/-   ##
===========================================
+ Coverage    70.60%   71.28%   +0.68%     
===========================================
  Files           68       71       +3     
  Lines         8915     9141     +226     
===========================================
+ Hits          6294     6516     +222     
- Misses        2621     2625       +4     

@janssenhenning janssenhenning merged commit ab6345f into develop Feb 8, 2021
@janssenhenning janssenhenning deleted the case_insensitive_schema_dict branch February 8, 2021 19:46
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.

None yet

2 participants