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

Tabulator expansion #104

Draft
wants to merge 14 commits into
base: develop
Choose a base branch
from
Draft

Tabulator expansion #104

wants to merge 14 commits into from

Conversation

janssenhenning
Copy link
Contributor

@janssenhenning janssenhenning commented Jan 23, 2022

This PR tries to consolidate the Tabulator class in masci-tools/aiida-jutools. @Irratzo I hope you don't mind. I just noticed that the base class was essentially empty, which wastes a lot of potential.
Most of the non-aiida specific code is moved into the abstract base class in masci-tools. Now the design requires implementing two functions

  • autolist: as before for a default set of paths to include
  • get_keypath: specifies how to extract a given path from an item to be tabulated (See examples at the bottom of tabulator.py)

TODO:

  • To start I essentially dropped all the error handling that is in the NodeTabulator
  • Datatypes as mentioned in the docstring are also not implemented
  • It should be relatively easy to add tests for this implementation

@codecov
Copy link

codecov bot commented Jan 23, 2022

Codecov Report

Merging #104 (9372b06) into develop (ed1765c) will decrease coverage by 0.43%.
The diff coverage is 0.00%.

@@             Coverage Diff             @@
##           develop     #104      +/-   ##
===========================================
- Coverage    82.38%   81.94%   -0.44%     
===========================================
  Files          131      131              
  Lines        24303    24433     +130     
===========================================
  Hits         20022    20022              
- Misses        4281     4411     +130     

janssenhenning and others added 13 commits April 7, 2022 16:59
…nto abstract class

This way the superclass provides huge benefit as is shown by the example of a tabulator for NamedTuple
(Even though this is not as impressive with the presence of the _asdict method of Namedtuple)
get_keypath is not a good name for extracting the actual value for a given keypath
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

1 participant