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

search_quantities from class properties #497

Open
sanbrock opened this issue Jan 7, 2025 · 1 comment
Open

search_quantities from class properties #497

sanbrock opened this issue Jan 7, 2025 · 1 comment
Assignees
Labels

Comments

@sanbrock
Copy link
Collaborator

sanbrock commented Jan 7, 2025

Search quantities are collected via traversing the Entry. Problems:

  • an object is visited only once. Hence, if an object is assigned to different nodes in the tree, its properties are made searchable under only one name (or concept).
  • properties are collected from object instances and not from the class properties. Hence, properties are listed under a name (or concept) also if they would not belong to that concept (but only to a specialised and extended concept).

Eg:

  • if Entry is a subclass of Step, and data.Em.steps[0]=data.Em.ENTRY[0]
    data.Em.steps.xxx is collected, but
    data.Em.ENTRY.xxx is not.
  • if Step.xxx is defined, but Steps.yyy is not, and Entry.yyy is defined
    data.ENTRY.xxx,
    data.ENTRY.yyy, and
    data.steps.xxx
    shall be collected, but
    data.steps.yyy
    shall not be collected for searchability.

Solution:

  • traversing shall visit the same object even multiple times if it appears multiple times in the tree (but only once along a specific branch - to avoid endless loops)
  • only class properties shall be collected as search_quantities, and not all object properties.
@sanbrock
Copy link
Collaborator Author

sanbrock commented Jan 7, 2025

an alternative:
create a copy instead of using a python reference:
steps[0]=ENTRY[0].m_copy()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants