Skip to content

Tabulator expansion#104

Draft
janssenhenning wants to merge 14 commits into
developfrom
tabulator-improvement
Draft

Tabulator expansion#104
janssenhenning wants to merge 14 commits into
developfrom
tabulator-improvement

Conversation

@janssenhenning
Copy link
Copy Markdown
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
Copy Markdown

codecov Bot commented Jan 23, 2022

Codecov Report

❌ Patch coverage is 0% with 197 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.94%. Comparing base (ed1765c) to head (9372b06).
⚠️ Report is 471 commits behind head on develop.

Additional details and impacted files
@@             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     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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
@janssenhenning janssenhenning force-pushed the tabulator-improvement branch from 3ccf158 to 1c02cbf Compare April 7, 2022 14:59
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.

1 participant