Removing duplicates in name, code/functionality and removing DPG folder - #209
Open
prabhath-c wants to merge 3 commits into
Open
Removing duplicates in name, code/functionality and removing DPG folder#209prabhath-c wants to merge 3 commits into
prabhath-c wants to merge 3 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #209 +/- ##
==========================================
+ Coverage 41.07% 43.26% +2.19%
==========================================
Files 93 88 -5
Lines 11670 11079 -591
==========================================
Hits 4793 4793
+ Misses 6877 6286 -591 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Follow-up to 48831d6 (Tier A, byte-identical copies). Tier B covers the 12 node groups that shared a name across the structured tree and the dpg2026 fork but had since been edited on one side, so the two behaved differently under one name. Each group was reviewed individually against the two bodies, their call sites and their post-migration git history; the surviving copy keeps the canonical import path, so no consumer changes its imports. SplitTrainingAndTesting linearfit.py took fork's multi-line message SaveStructures assyst2/structures took fork's `return df` IterToDataFrame controls.py kept: maintained line, 10 callers CalcPhaseDiagram landau/plot.py kept: no stray matplotlib import MinMaxIndices linearfit.py took fork's docstring, if/else TransitionTemperature landau/plot.py kept: returns Tm, not a Figure List5 utilities.py took fork's form (port -> list_out) PlotConcPhaseDiagram landau/plot.py kept + gained `concavity` arg IdealSolution landau/phases.py took fork's form LinePhase landau/phases.py took fork's form PhasesFromDataFrame landau/phases.py took fork's version + make_phase, adding concentration_parameters=None PlotMuPhaseDiagram landau/plot.py took fork's form (port -> fig) Two output ports were renamed as a result: List5 "list" -> "list_out" and PlotMuPhaseDiagram "plot" -> "fig". Neither had a caller anywhere in the repo or in the surrounding notebooks. Cleanup of modules the deletions emptied. All five were unreferenced, are not pulled in by any __init__.py, and their surviving private helpers are duplicated in the live modules (_iterate_node in controls.py, guess_mu_range in landau/plot.py): dpg2026/basic/list.py, basic/math.py, basic/loop.py dpg2026/thermodynamics/landau.py dpg2026/atomistic/fitting/dataset.py The last one was a latent NameError rather than dead weight: its only remaining function, make_linearfit, was byte-identical to the live copy in linearfit.py and called six nodes that no longer existed in that module. Also fixed the inverted border check in PlotMuPhaseDiagram, which queried "not border" in the branch that had just established the column is absent. Workflows were validated statically: every pyiron_nodes import in all 38 files resolves, and every node argument and .outputs.<label> reference matches a real signature and port. Nothing was broken by the Tier B work. The two electrochemistry workflows were already broken before it and are repaired here - add_water_film/add_neon_layer were renamed to AddWaterFilm/AddNeonLayer without the call sites following. markdown_files/ documents the procedure so it can be repeated for Tier C and Tier D, and the node conventions these decisions revealed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request refactors several workflow and module imports to improve code organization and clarity. The main changes involve moving the
GenericOptimizerSettingsandElementInputclasses from thepyiron_nodes.dpg2026namespace to thepyiron_nodes.atomistic.assystnamespace, updating their implementations, and adjusting all affected workflow scripts accordingly. Additionally, several plotting functions are streamlined for consistency, and redundant or outdated class definitions are removed from theassyst2module.Key changes:
Refactoring and import updates
GenericOptimizerSettingsfrompyiron_nodes.dpg2026.atomistic.calculator.optimizetopyiron_nodes.atomistic.assyst.calculators, updated its implementation to useas_inp_dataclass_node, and updated all workflow scripts to import from the new location. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17]ElementInputfrom a dataclass inpyiron_nodes.dpg2026.atomistic.assyst.stoichiometryto a function inpyiron_nodes.atomistic.assyst.structures, updating its interface and return type. All affected workflows now import from the new location. [1] [2]Code cleanup and removal
GpawInput,GenericOptimizerSettings, andM3gnetConfigfrompyiron_nodes.atomistic.assyst2.calculatorsto avoid confusion and redundancy. [1] [2]Plotting function improvements
pyiron_nodes.atomistic.assyst.plotto consistently use@as_function_node("plot")and returnplt.show()instead of raw data, ensuring unified behavior and clearer output. [1] [2] [3] [4] [5]Miscellaneous
Workflows/assyst.pyto usepyiron_nodes.math_utils.Multiplyinstead of the deprecatedpyiron_nodes.dpg2026.basic.math.Multiply.These changes collectively improve code maintainability, modularity, and clarity across the affected modules and workflows.