-
Notifications
You must be signed in to change notification settings - Fork 890
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
Hint user to upgrade every 7 days for HINT_ACTIVITY_NAME #1407
Conversation
16906af
hint_for_update() | ||
with ThreadPoolExecutor(max_workers=concurrent_count) as pool: | ||
pool.submit(check_latest_version) | ||
|
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.
Will there be cases check_latest_version not finished when running the following line?
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.
No, we won't check since Clement suggests may not break user because of get pypi.
mock_datetime.datetime.strptime.return_value = datetime.datetime.now() - datetime.timedelta(days=8) | ||
mock_datetime.timedelta.return_value = datetime.timedelta(days=7) | ||
hint_for_update() | ||
with ThreadPoolExecutor(max_workers=concurrent_count) as pool: |
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.
How does max_workers impact check_latest_version
's behavior?
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.
Actually, this is added when hint_for_update and check_latest_version need to be run in one thread pool and I need check the file is well writen in max_workers. Will update this test in later pr.
This pull request includes several changes to the
promptflow
package, adding new test methods, constants, and modules related to version hinting and checking. The most important changes include adding a new test method with parameterized values, adding new constants to theAvailableIDE
class, and adding a new module for version hinting and checking.Main changes:
src/promptflow/tests/sdk_cli_test/unittests/test_utils.py
: Added a new test methodtest_concurrent_hint_for_update
with parameterized values forconcurrent_count
.src/promptflow/promptflow/_constants.py
: Added new constants related to version hinting and checking in theAvailableIDE
class.src/promptflow/promptflow/_utils/version_hint_utils.py
: Added a new moduleversion_hint_utils.py
with functions for version hinting and checking.Please add an informative description that covers that changes made by the pull request and link all relevant issues.
All Promptflow Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines