chore: reorg to add amorphouspy.pipelines#345
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
In preparation of addition of an `amorphouspy.parallel` subpackage,
which will depend on `executorlib`, we reorganize the code in
`amorphouspy`.
In particular
- `workflows/` is renamed to `simulations/` in accordance with the docs
and to avoid confusion with explicit workflow code that depends on
`executorlib`
- `parallel/` folder stub is introduced
- `analysis/` becomes `structure_characterization`
- `structure/` becomes `structure_generation`
- several other cleanups
```
amorphouspy/
├── __init__.py
├── _utils.py # merged mass.py + shared.py
├── neighbors.py
├── io/
│ ├── __init__.py
│ └── lammps.py # was io_utils.py
├── parallel/
│ └── __init__.py # stub for future executorlib code
├── potentials/ # unchanged
├── simulation/ # was workflows/
│ ├── lammps.py # was workflows/shared.py
│ ├── md.py
│ ├── meltquench.py
│ ├── meltquench_protocols.py
│ ├── cte.py
│ ├── cte_helpers.py
│ ├── elastic.py # was elastic_mod.py
│ └── viscosity.py
├── structure_characterization/ # was analysis/
│ ├── averaging.py
│ ├── bond_angle_distribution.py
│ ├── cavities.py
│ ├── cte.py
│ ├── pipeline.py # was workflows/structural_analysis.py
│ ├── projected_rdf.py
│ ├── qn_network_connectivity.py
│ ├── radial_distribution_functions.py
│ ├── rings.py
│ └── structure_factor.py
└── structure_generation/ # was structure/
├── composition.py
├── density.py
├── geometry.py
└── planner.py
```
Restructure the amorphouspy package from a flat/mixed layout into a
consistent domain-driven hierarchy that mirrors the scientific workflow:
atoms/ — atomic-level utilities (neighbors, mass, element types)
fabrication/ — glass structure creation (composition, density, geometry,
planner, melt-quench protocols & simulation)
lammps/ — LAMMPS infrastructure (runner, MD wrapper, I/O, potentials)
properties/ — computation of glass properties (CTE, elastic, viscosity,
structural/ for RDF, rings, Qn, bond angles, cavities,
structure factor, projected RDF)
pipelines/ — workflow orchestration (placeholder)
io.py — generic file writers (XYZ, distributions)
Key changes:
- _utils.py → split into atoms/mass.py and atoms/shared.py
- neighbors.py → atoms/neighbors.py
- structure_generation/ → fabrication/
- simulation/meltquench*.py → fabrication/
- simulation/lammps.py → lammps/runner.py
- simulation/md.py → lammps/md.py
- io_utils.py → split into io.py (generic writers) and lammps/io.py (LAMMPS readers)
- potentials/ → lammps/potentials/
- structure_characterization/ → properties/structural/
(radial_distribution_functions.py → rdf.py,
bond_angle_distribution.py → bond_angles.py,
qn_network_connectivity.py → qn.py,
pipeline.py → all.py)
- simulation/cte.py → properties/cte.py
- structure_characterization/cte.py → properties/cte_analysis.py
- simulation/elastic.py → properties/elastic.py
- simulation/viscosity.py → properties/viscosity.py
All imports updated across core library, tests, API package, notebooks,
and documentation. Updated pyproject.toml per-file-ignores to match new
paths. No backward-compatibility shims.
All 631 core tests and 85 API tests pass.
11d27a5 to
3f7ea08
Compare
|
@Atilaac This is a breaking change. If we keep the |
|
Thanks a lot @ltalirz! I will take an in depth look later. I will remove the breaking label for me this should matter more when we publish the paper and we have our first 1.0.0 release. For now as we do not have users at scale, it is not important. |
|
Ok, fine with me. No need to spend too much time on the review - if you spot anything you really don't like, let me know. Otherwise: the tests pass and this is does not have to be the final layout, we can always evolve. |
Atilaac
left a comment
There was a problem hiding this comment.
We might consider dropping io.py. I don't think it is needed. I am approving this for now.
I'll take care of it in a follow-up, when I start filling the |
In preparation of addition of an
amorphouspy.pipelinessubpackage, which will depend onexecutorlib, we reorganize the code inamorphouspy.In particular, we restructure the amorphouspy package from a flat/mixed layout into a
consistent domain-driven hierarchy that mirrors the scientific workflow:
atoms/ — atomic-level utilities (neighbors, mass, element types)
fabrication/ — glass structure creation (composition, density, geometry,
planner, melt-quench protocols & simulation)
lammps/ — LAMMPS infrastructure (runner, MD wrapper, I/O, potentials)
properties/ — computation of glass properties (CTE, elastic, viscosity,
structural/ for RDF, rings, Qn, bond angles, cavities,
structure factor, projected RDF)
pipelines/ — workflow orchestration (placeholder)
io.py — generic file writers (XYZ, distributions)
Key changes:
(radial_distribution_functions.py → rdf.py,
bond_angle_distribution.py → bond_angles.py,
qn_network_connectivity.py → qn.py,
pipeline.py → all.py)
All imports updated across core library, tests, API package, notebooks,
and documentation. Updated pyproject.toml per-file-ignores to match new
paths. No backward-compatibility shims.
All 631 core tests and 85 API tests pass.