Skip to content

Use config.json instead of files in postprocessing - #314

Draft
max-models wants to merge 5 commits into
develfrom
293-clean-up-the-pickled-files-created-in-the-sim-init
Draft

Use config.json instead of files in postprocessing#314
max-models wants to merge 5 commits into
develfrom
293-clean-up-the-pickled-files-created-in-the-sim-init

Conversation

@max-models

@max-models max-models commented Aug 3, 2026

Copy link
Copy Markdown
Member

Solves the following issue(s):

Closes #293

Core changes:

Instead of exporting all the classes as pickled binary objects, export the main information about the simulation as a json file called config.json

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR switches the simulation metadata persistence/ingestion path from multiple pickle “*.bin” artifacts to a single config.json, and updates post-processing to reconstruct simulation configuration from that JSON when no parameters.py is present.

Changes:

  • Stop writing multiple pickled config artifacts (*.bin) and instead write a config.json based on Simulation.to_dict().
  • Update post-processing parameter import logic to load EnvironmentOptions, Time, Domain, FluidEquilibrium, TensorProductGrid, DerhamOptions, and StruphyModel from config.json.
  • Remove direct dependence on struphy.geometry.domains / struphy.fields_background.equils for reconstructing domain/equilibrium in post-processing.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
src/struphy/simulation/sim.py Replace pickled config output with JSON config serialization to config.json.
src/struphy/post_processing/post_processing_tools.py Replace “*.bin” config loading with config.json loading and object reconstruction via from_dict.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/struphy/simulation/sim.py Outdated
Comment thread src/struphy/post_processing/post_processing_tools.py Outdated
Comment thread src/struphy/post_processing/post_processing_tools.py
Comment thread src/struphy/simulation/sim.py Outdated
max-models and others added 3 commits August 3, 2026 10:18
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@max-models
max-models marked this pull request as draft August 3, 2026 09:08
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.

Clean up the pickled files created in the sim init

2 participants