-
Notifications
You must be signed in to change notification settings - Fork 34
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
Internet connection alert #227
Conversation
bcipy/helpers/system_utils.py
Outdated
REMOTE_SERVER = "https://github.com/CAMBI-tech/BciPy/" | ||
|
||
|
||
def is_connected(hostname: str = "one.one.one.one", port=80) -> bool: |
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.
REMOTE_SERVER could be the default here
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.
Turns out this doesn't work if I'm on OHSU's VPN and it thought I was not on the internet. I updated this to use the "1.1.1.1" DNS resolver and it works both on and off VPN.
bcipy/main.py
Outdated
@@ -22,6 +22,31 @@ | |||
log = logging.getLogger(__name__) | |||
|
|||
|
|||
def preconditions_ok(parameters) -> bool: |
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.
What do you think of moving this to helpers/validate.py
. We use a similar pattern for validating experiments. Another option for the method name: validate_bcipy_session
or similar to be more explicit
…ity test to work with VPN
Overview
Added an alert when the user's computer has an active internet connection.
Ticket
https://www.pivotaltracker.com/story/show/182200897
Contributions
Test