rgpycrumbs.eon.plot_config¶
Declarative TOML plot configuration for eOn CLIs.
Shared style/render knobs live under [shared] (or at the top level).
Command-specific inputs/outputs live under [neb], [min], or [saddle].
Merge order (later wins for explicit CLI overrides only):
shared defaults < command defaults < [shared] + [command] from file
< Click parameters whose source is not DEFAULT
`{versionadded} 1.8.2
`
Attributes¶
Functions¶
|
Load a TOML plot config file into a plain dict of sections. |
|
|
|
|
|
Split a loaded TOML mapping into shared and command-specific layers. |
|
Build the resolved settings mapping for a plot command. |
|
Return Click parameters whose source is not the decorator default. |
|
Resolve settings for a Click command callback. |
|
Merge settings for command then call *runner*(settings). |
|
CLI path: |
|
Build a keyword-only library entry that shares |
Module Contents¶
- rgpycrumbs.eon.plot_config.load_plot_config(path: str | pathlib.Path) dict[str, Any][source]¶
Load a TOML plot config file into a plain dict of sections.
- rgpycrumbs.eon.plot_config.extract_config_layers(data: dict[str, Any], command: str) tuple[dict[str, Any], dict[str, Any]][source]¶
Split a loaded TOML mapping into shared and command-specific layers.
- rgpycrumbs.eon.plot_config.merge_plot_settings(command: str, *, config_path: str | pathlib.Path | None = None, config_data: dict[str, Any] | None = None, cli_overrides: dict[str, Any] | None = None, passthrough: dict[str, Any] | None = None) dict[str, Any][source]¶
Build the resolved settings mapping for a plot command.
Parameters¶
- command
One of
neb,min,saddle.- config_path
Optional TOML file path (ignored when config_data is given).
- config_data
Already-loaded TOML mapping (for tests).
- cli_overrides
Parameters explicitly set on the CLI (non-default Click source).
- passthrough
Remaining Click parameter values (defaults) used to fill gaps for command-specific path/identity options that are not in the schema.
- rgpycrumbs.eon.plot_config.click_nondefault_overrides(ctx: Any, params: dict[str, Any]) dict[str, Any][source]¶
Return Click parameters whose source is not the decorator default.
- rgpycrumbs.eon.plot_config.resolve_from_click(command: str, ctx: Any, *, config: str | pathlib.Path | None, **params: Any) dict[str, Any][source]¶
Resolve settings for a Click command callback.
- rgpycrumbs.eon.plot_config.run_plot(command: str, runner: Any, *, config: str | pathlib.Path | None = None, **overrides: Any) Any[source]¶
Merge settings for command then call *runner*(settings).
Shared by the library
plot_*entry points. runner is typicallyplot_*_from_settings.
- rgpycrumbs.eon.plot_config.run_from_click(command: str, runner: Any, ctx: Any, *, config: str | pathlib.Path | None = None, **params: Any) Any[source]¶
CLI path:
resolve_from_clickthen *runner*(settings).
- rgpycrumbs.eon.plot_config.library_plot(command: str, runner: Any) Any[source]¶
Build a keyword-only library entry that shares
run_plot().
- rgpycrumbs.eon.plot_config.MINIMAL_CONFIG_EXAMPLE = Multiline-String[source]¶
Show Value
"""# Minimal rgpkgs eOn plot config (TOML) # Use: rgpycrumbs eon plt-neb --config plot.toml # rgpycrumbs eon plt-min --config plot.toml # # Prefer this file for surface-fit knobs instead of growing CLI flags. # auto_thin defaults to false (opt-in); max_surface_points caps the GP fit set. [shared] energy_unit = "eV" theme = "ruhi" dpi = 200 figsize = [5.37, 5.37] strip_renderer = "xyzrender" xyzrender_config = "paton" ira_kmax = 14.0 # Surface fit (chemparseplot plot_landscape_surface / single-ended landscapes) auto_thin = false max_surface_points = 64 [neb] con_file = "neb.con" plot_type = "landscape" output_file = "neb_landscape.pdf" title = "NEB path" plot_structures = "crit_points" surface_type = "grad_imq" [min] job_dir = ["minimization_run"] plot_type = "landscape" output = "min_landscape.pdf" prefix = "minimization" surface_type = "grad_imq" # Opt in for dense eOn write_movies force-eval clouds: # auto_thin = true # max_surface_points = 64 [saddle] job_dir = ["saddle_run"] plot_type = "profile" output = "saddle_profile.pdf" """