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

Version 0.12.0 #120

Merged
merged 9 commits into from
Oct 17, 2023
Merged

Version 0.12.0 #120

merged 9 commits into from
Oct 17, 2023

Conversation

sunildkumar
Copy link
Member

No description provided.

brandon-groundlight and others added 7 commits October 12, 2023 15:20
* initial commit

* added ask_async to submit_image_query

* Automatically reformatting code

* added ask async method

* Automatically reformatting code

* added integration tests (requires BE merge first)

* Automatically reformatting code

* satisfying mypy

* Automatically reformatting code

* fix comments

* change what type of exception test is catching

* Automatically reformatting code

* fix imports organization issue

* fix implementation - wait must be 0 not None

* Automatically reformatting code

* forgot to make wait=0 in relevant test

* feedback from PR review

* Automatically reformatting code

* ensure want_async is a serializable bool

* add description

* updated sphinx reqs to render some of the dependencies

* updated docstring for ask_async and fixed small sphinx bugs in other folk's docstrings

* Tests aren't passing because I didn't update the autogenerated code to expect a new param

* Revert "Tests aren't passing because I didn't update the autogenerated code to expect a new param"

This reverts commit 2477fd5.

* fix generated

* Automatically reformatting code

* fix lint

* Automatically reformatting code

* Revert "Automatically reformatting code"

This reverts commit cb9359e.

* Revert "fix generated"

This reverts commit 935c036.

* Revert "Revert "Tests aren't passing because I didn't update the autogenerated code to expect a new param""

This reverts commit 07670e3.

* Revert "Tests aren't passing because I didn't update the autogenerated code to expect a new param"

This reverts commit 2477fd5.

* Revert "updated docstring for ask_async and fixed small sphinx bugs in other folk's docstrings"

This reverts commit 67e3edd.

* third time at generated docs is the charm

* Automatically reformatting code

* finish making tests work

* Automatically reformatting code

---------

Co-authored-by: Auto-format Bot <[email protected]>
* Add basic catch if api token isn't specified when cli is called

* Pushes Groundlight class instantiation up until the function is actually called with arguments.
This means that the entire help args are available even if we can't instantiate the class (no api key)

* Fixed misunderstanding with metaprogramming, added tests

* Addressing comments

---------

Co-authored-by: Auto-format Bot <[email protected]>
* Adding ask_confident and ask_fast

* Automatically reformatting code

* Fixing ask_ml behavior

* Adding to test

* Automatically reformatting code

* set default wait for ask_ml

* Unhide wait functions, merging logic, fixed iq_is_answered logic

* Automatically reformatting code

* Rewriting doc strings in Sphinx style

* ask_fast to ask_ml in the tests

* fixed sphinx docstring return types

* Cleaning the lint trap

* Last bits of lint

* Making iq submission with inspection work with newly optional patience time

* single char typo

* Reorder functions to trick Git's LCS alg to be correct

* Automatically reformatting code

---------

Co-authored-by: Auto-format Bot <[email protected]>
Comment on lines +362 to +366
if wait > 0:
if confidence_threshold is None:
threshold = self.get_detector(detector).confidence_threshold
else:
threshold = confidence_threshold
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@brandon-groundlight why only query for confidence threshold for waits > 0? I guess to save time if the customer is trying to submit fast?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The next line is in the if statement too. If wait is set to 0 (or less) then we're not going to make a call to wait_for_confident_result and since we don't make that call we don't need the threshold value.

human_review: Optional[str] = None,
inspection_id: Optional[str] = None,
) -> ImageQuery:
"""
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It appears my example usage docstring disappeared...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it's been added below!

Copy link
Collaborator

@brandon-groundlight brandon-groundlight left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but I wrote half of it

Copy link
Contributor

@mjvogelsong mjvogelsong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did a pretty quick look-through since the code has already been reviewed in sub-PRs. But looks good!

Comment on lines +14 to +18
"[python]": {
"editor.codeActionsOnSave": {
"source.organizeImports": false
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we turning this off?

@@ -48,6 +48,7 @@ sphinx-rtd-theme = {version = "1.3.0", python = ">=3.9.0,<4.0"}
autodoc-pydantic = {version = "2.0.1", python = ">=3.9.0,<4.0"}
pydantic = "^2.0"
toml = "0.10.2"
pillow = "^9.0.0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is pillow needed for building sphinx docs?

Comment on lines +408 to +411
- url: https://device.positronix.ai/device-api
description: Device Prod
- url: https://device.integ.positronix.ai/device-api
description: Device Integ
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove these -- they're old and deprecated.

human_review: Optional[str] = None,
inspection_id: Optional[str] = None,
) -> ImageQuery:
"""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it's been added below!

@brandon-groundlight brandon-groundlight merged commit bfac10f into main Oct 17, 2023
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants