-
Notifications
You must be signed in to change notification settings - Fork 5
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
Feature: new search modes #291
Conversation
* wrote the new search mode in `cript.API.search()` * wrote documentation for it * added the search mode to `SearchModes` enum * wrote placeholder test for it, but note sure how to test this search mode yet for every environment
Merging to
|
* wrote a new fixture that will get the cript project, turn it into a node, and give it to the test to use * the CRIPT project will exist on all environments of CRIPT
* `CHILD_NODE_TYPE_WITHIN_PARENT` * `CHILD_CONTAINS_NAME_WITHIN_PARENT` * `CHILD_WITH_EXACT_NAME_WITHIN_PARENT`
* `CHILD_NODE_TYPE_WITHIN_PARENT` * wrote documentation and test * `CHILD_WITH_EXACT_NAME_WITHIN_PARENT` * wrote documentation and test
* `CHILD_NODE_TYPE_WITHIN_PARENT` * `CHILD_WITH_EXACT_NAME_WITHIN_PARENT`
…rgument `value_to_search` or `parent_node`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you lay out to me, why we need the searches with the parent?
You need the parent already present to use it with the SDK.
So, why use the API to fetch the children?
find_children
does the same thing locally.
I don't see the need for this and it adds more complex codes.
Also if we offer two options to do the same thing, user get confused.
|
if you don't like the interface, write wrappers that internally call |
we don't have to have it, but I saw that the API endpoints exist so I thought lets put it into the SDK why not. I do agree that it does add more code, but it could be helpful. We can weigh the pros and cons and figure out if we want it or not, it's not a big deal to me. Reasons why it could be helpful:
|
lets make a decision on this soon because if we wait too long we might end up with a lot of merge conflicts |
I don't think I am the right person to make this decision. |
@dylanwal can I get your thoughts on this? We are a bit stuck and not sure which decision would be best |
@dylanwal feel free to correct if I'm wrong. Basically the situation that we found is that @InnocentBug and I are both right and wrong, and our workflow could use improvements to be better and more efficient. If the user is working with However, the current scenario that I have coded is that I pull down the entire project node with I think the ideal way of doing this is to maybe only get the bare project node with its basic attributes and nothing else, or just the UUID, and then using that to do the API search, so we can only get the materials and not have to pull down the entire node, but if we already have the entire node then a local search works better. @InnocentBug does this make sense? what are your thoughts? |
Description
added search mode:
CHILD_NODE_TYPE_WITHIN_PARENT
CHILD_WITH_EXACT_NAME_WITHIN_PARENT
CHILD_CONTAINS_NAME_WITHIN_PARENT
Changes
cript.API.search()
cript.API.search()
SearchMode
enumvalue_to_search
was required and the user forgot to input itScreenshots
Tests
Known Issues
_is_node_schema_valid()
too many times, and when I just change that method topass
it speeds things up by a lotif
is making it harder to read, hard to keep track of, and does not capture all error casesNotes
@beartype
for search for now because it causes more issues than it fixesChecklist
CONTRIBUTORS.md
) in the pull request source branch.