PhonologicalCorpusTools / SLPAA

5 stars 0 forks source link

Clean up and generalize Sign.updatemodule() #276

Closed kvesik closed 6 months ago

kvesik commented 6 months ago

Also just upon resolving this issue, not sure if this should be a new issue but I think we can rewrite Sign.updatemodule() to be much cleaner and work for all the modules.

Previously image

Rewritten to be more general and function the same for all module types. Didn't do much testing so I don't know if this will work for all our modules but from my first look it looks like all we do is confirm for all attributes of the module type, that we overwrite the current with the updated if they differ: image

Which should prevent us from having to do moduletype checks and make this extendable in the future.

Originally posted by @brdiep113 in https://github.com/PhonologicalCorpusTools/SLPAA/issues/244#issuecomment-1909057454

kvesik commented 6 months ago

Note that we should be able to ditch the call to updatemodule_sharedattributes() in this case as well.

@brdiep113 if you want to take this, please do (since you proposed the idea in the first place). But I'm also happy to wrap this up if you want to just clear your to-do list. Let me know. :)