sdk: Refactor AbstractObjectProvider#430
sdk: Refactor AbstractObjectProvider#430moritzsommer wants to merge 7 commits intoeclipse-basyx:developfrom
Conversation
s-heppner
left a comment
There was a problem hiding this comment.
I'm fine with the current design, except for the small nitpicks I have in the comments.
I also agree that the newly created methods and classes should be used everywhere in our code.
However: We absolutely need the old methods retained wrapping the new methods with a deprecation warning, otherwise we need to release this as a version 3.0.0, which I don't think we should.
This applies to the methods from:
DictObjectStoreSetObjectStoreLocalFileObjectStore- ...
and all other methods that have been refactored.
Previously, the `AbstractObjectProvider` only worked with `Identifiables`, which made it incompatible with the new version of the AAS metamodel. This renames and restructures both the `AbstractObjectProvider` and the `AbstractObjectStore`. In all non-abstract subclasses where `Object` appears in the class or method name, it has been replaced with `Identifiable`. Old classes are still available with a deprecation warning. Moreover, `AbstractObjectProvider` and `AbstractObjectStore` are now generic to be able to handle more classes than just `Identifiables`. In order to handle the new `AASDescriptor`, a new class `HasIdentifier` has been added. It is intended to be an abstract superclass for all classes that have an identifier, but are not `Identifiables`. As of now, this PR is intended to serve as a basis for discussion. Therefore, the documentation has not yet been adapted. Fixes eclipse-basyx#428
There was a problem hiding this comment.
LGTM. Is this ready to be merged now?
Btw, it looks like your Linter is configured to a shorter line length than defined (historically) in our project. We demand a maximum 120 characters per line, as per our CI (therefore, shorter is fine as well.)
My local linter is also set to a line length of 120 characters. However, I never split words or other structural elements of the documentation, e.g. |
Previously, the
AbstractObjectProvideronly worked withIdentifiables, which made it incompatible with the new version of the AAS metamodel.This renames and restructures both the
AbstractObjectProviderand theAbstractObjectStore. In all non-abstract subclasses whereObjectappears in the class or method name, it has been replaced withIdentifiable. Old classes are still available with a deprecation warning. The refactoring includes:DictObjectStore->DictIdentifiableStoreSetObjectStore->SetIdentifiableStoreLocalFileObjectStore->LocalFileIdentifiableStoreCouchDBObjectStore->CouchDBIdentifiableStoreMoreover,
AbstractObjectProviderandAbstractObjectStoreare now generic to be able to handle more classes than justIdentifiables.In order to handle the new
AASDescriptor, a new classHasIdentifierhas been added. It is intended to be an abstract superclass for all classes that have an identifier, but are notIdentifiables.The docs, comments and variable names have been adapted accordingly.
Fixes #428