ModernElectron / WarpX

Modern Electron's WarpX repository serves as both a fork of the WarpX code (an advanced electromagnetic Particle-In-Cell code - see https://ecp-warpx.github.io) and the repository for a set of tools used in simulating thermionic devices (mewarpx).
https://mewarpx.readthedocs.io/en/latest/index.html
Other
0 stars 1 forks source link

Dump runinfo as json instead of dill pickle #178

Closed KZhu-ME closed 2 years ago

KZhu-ME commented 2 years ago

This should make it easier to load runinfo files in the future.

codecov-commenter commented 2 years ago

Codecov Report

Merging #178 (0b69374) into memaster (29b6985) will increase coverage by 0.13%. The diff coverage is 95.12%.

@@             Coverage Diff              @@
##           memaster     #178      +/-   ##
============================================
+ Coverage     79.67%   79.81%   +0.13%     
============================================
  Files            30       31       +1     
  Lines          3882     3918      +36     
============================================
+ Hits           3093     3127      +34     
- Misses          789      791       +2     
Impacted Files Coverage Δ
mewarpx/mewarpx/utils_store/json_util.py 94.28% <94.28%> (ø)
mewarpx/mewarpx/_version.py 100.00% <100.00%> (ø)
mewarpx/mewarpx/runinfo.py 80.76% <100.00%> (+0.12%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 29b6985...0b69374. Read the comment docs.

KZhu-ME commented 2 years ago

Should we consider doing the same for the FluxDiag file? If it can trivially use the same wrapper it might be worth doing so now, otherwise we can wait until there's a problem.

The FluxDiag would be more complicated since it would need to be decoded back into a FluxDiag object, for restarts. Also, the FluxDiag dpkl file seems to be mostly used for restarting runs with flux diags which would require the same version of mewarpx to be used anyway.

peterscherpelz commented 2 years ago

Sounds good, and I would guess that RunInfo previously was encoding even more complicated objects than FluxDiag does (whereas now it's been dramatically simplified), so we may never have an issue with FluxDiag.