Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

model.base: improve NamespaceSet #155

Merged
merged 3 commits into from
Nov 14, 2023

Conversation

zrgt
Copy link
Contributor

@zrgt zrgt commented Nov 8, 2023

Refactor NamespaceSet

  • Refactored NamespaceSet.add() as it was too big
      - Extracted some methods, in particular _execute_item_del_hook. I used the method also in other places
  • As we check different constraints for uniqueness in the namespace, I defined ATTRIBUTES_CONSTRAINT_IDS. The dict will be used when throwing exception. The solution with the dict is temporary, we need other solution here.
  • Use correct constraint ids for each NamespaceSet in tests, use "0" if not constraint id is suitable

- Refactored `NamespaceSet.add()` as too big
  - Extracted some methods, in particular `_execute_item_del_hook`. I used the method also in other places
- As we check different constraints for uniqueness in the namespace, I defined ATTRIBUTES_CONSTRAINT_IDS. The dict will be used when throwing exception. The solution with the dict is temporary, we need other solution here.
- Use correct constraint ids for each NamespaceSet in tests, use 000 if not constraint id is suitable
@s-heppner
Copy link
Contributor

Looks good to me.

@s-heppner s-heppner merged commit defe3b7 into eclipse-basyx:improve/V30 Nov 14, 2023
6 checks passed
@s-heppner s-heppner deleted the improve/namespaceset_ branch November 14, 2023 12:37
@s-heppner s-heppner added the v3.0 label Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants