Move to EasyList#360
Open
rozyczko wants to merge 2 commits into
Open
Conversation
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 migrates the sample and model classes away from the deprecated
easyscience.ObjBaseandeasyscience.CollectionBasepipeline, updating them to use the newModelBaseandEasyListfoundations. This change modernizes the core architecture, improves consistency in parameter handling, and introduces a breaking change to the serialized project file format. Backward compatibility with older project files is intentionally dropped, and the code now enforces schema versioning. The pull request also updates property access patterns throughout the codebase and clarifies several internal APIs.Migration to new base classes and API improvements:
Model,Material,Layer,Sample,ModelCollection, etc.) are rewritten to inherit fromModelBaseandEasyListinstead of the deprecated bases. This includes a refactor ofModelto useBaseCoreandModelCollectionto use the new collection pattern.Parameter(such asMaterial.sld,MaterialMixture.fraction, andLayerAreaPerMolecule.area_per_molecule) now consistently expose theParameterobject. The tutorials and code are updated to access the value via.value.BaseCollection.remove(index)method is renamed toremove_at(index)to avoid confusion with the standardremove(value).Serialization and backward compatibility:
file_formatversion (bumped to 2). Attempting to load older project files raises a clear error, as the new model structure is not backward compatible.Internal API and property refactoring:
Modelclass now uses explicit property getters and setters forsample,scale, andbackgroundto ensure serialization round-trips and encapsulation.ModelCollectionclass manages color indices more robustly and exposesnext_color_indexas a property for serialization.get_parameters()is now considered legacy; new code should useget_all_parameters().Documentation and tutorial updates:
.valueaccess pattern for parameter properties.Cleanup and minor changes: