DSD-DBS / py-capellambse

A Python 3 headless implementation of the Capella modeling tool.
https://dsd-dbs.github.io/py-capellambse/
Apache License 2.0
50 stars 8 forks source link

Declarative: Rename modify to set #394

Closed huyenngn closed 3 months ago

huyenngn commented 3 months ago

sync set should be called sync modify modify should be called set. it's weird that it has to be:

- parent: !uuid blahblah
  modify:
    description: "hey"

for parent, but for find it's:

- find:
    name: blah
  set:
    description: "hey"

even though they both do the same thing.

it should instead be:

- parent: !uuid blahblah
  set:
    description: "hey"
Wuestengecko commented 3 months ago

it's weird that it has to be "modify" for parent, but for sync it has to be "set"

That's actually a good point, I didn't realize this during #387. But I do think that "set" makes more sense specifically in the sync context (because we might not have anything to modify yet), so we should rather rename "modify" to "set" instead (and keep "modify" as alias).