Skip to content
Snippets Groups Projects

Feature/couchdb update commit

Closed Sebastian Heppner requested to merge feature/couchdb_update_commit into master
3 unresolved threads

The update/commit functions for the adapter.couchdb-implementation. (As well as the updated model.base.Referable.update() function)

Edited by Michael Thies

Merge request reports

Merged results pipeline #293755 passed

Merged results pipeline passed for d9f089a3

Test coverage 89.00% from 1 job
Test summary results are being parsed

Closed by Michael ThiesMichael Thies 4 years ago (Oct 5, 2020 12:59pm UTC)

Merge details

  • The changes were not merged into master.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • 222 model.Identifier('https://acplt.org/Test_Submodel', model.IdentifierType.IRI))
    223
    224 # Change the SubmodelElement Capability, so that the local version is not the same as the one in the CouchDB
    225 assert (isinstance(submodel, couchdb.CouchDBSubmodel))
    226 capability = submodel.submodel_element.get_referable('ExampleCapability')
    227 capability.semantic_id = model.Reference((model.Key(type_=model.KeyElements.GLOBAL_REFERENCE,
    228 local=False,
    229 value='http://acplt.org/Capabilities/AnotherCapability',
    230 id_type=model.KeyType.IRDI),))
    231
    232 # Update the Submodel from the CouchDB
    233 submodel.update()
    234
    235 # Check that the update function updated the submodel correctly
    236 checker = AASDataChecker(raise_immediately=True)
    237 check_example_submodel(checker, submodel)
    • All the tests for referables are missing. The basic idea is that calling .update() or .commit() on a Property within a SubmodelElementCollection within a Submodel does also work. This is not tested here.

    • Please register or sign in to reply
  • 427 427 # #################################################################################################
    428 428 # Special object classes for Identifiable PyI40AAS objects retrieved from the CouchDBObjectStore
    429 429
    430 class CouchDBIdentifiable(model.Identifiable, metaclass=abc.ABCMeta):
    430 class CouchDBReferable(model.Referable, metaclass=abc.ABCMeta):
    • How is this class used? As far as I can see, this base class is not applied to the Referable objects which are returned from the CouchDB. However, this is required to make the implemented functionality work.

    • Please register or sign in to reply
  • added 1 commit

    • 5501f53d - adapter.couchdb.CouchDBIdentifiable: Rename update_identifiable() to update()

    Compare with previous version

  • added 1 commit

    • 01b7a181 - adapter.couchdb: Remove todo

    Compare with previous version

  • closed

  • Michael Thies changed the description

    changed the description

  • Please register or sign in to reply
    Loading