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

v0.5.6 #598

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ def readme():
"typer==0.4.1",
"tqdm==4.63.0",
"transitions==0.8.11",
"pyngrok==7.0.3",
"numba==0.56.0",
"Jinja2==3.1.3",
"xhtml2pdf==0.2.11",
Expand Down
10 changes: 0 additions & 10 deletions ulc_mm_package/QtGUI/dev_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@

from ulc_mm_package.image_processing.processing_constants import FLOWRATE

from ulc_mm_package.utilities.ngrok_utils import make_tcp_tunnel, NgrokError
from ulc_mm_package.utilities.email_utils import send_ngrok_email

from ulc_mm_package.neural_nets.AutofocusInference import AutoFocus
import ulc_mm_package.neural_nets.neural_network_constants as nn_constants

Expand Down Expand Up @@ -636,13 +633,6 @@ def __init__(self, *args, **kwargs):
# Misc
self.fan.turn_on_all()
self.btnExit.clicked.connect(self.exit)
try:
ngrok_address = make_tcp_tunnel()
send_ngrok_email()
except NgrokError as e:
print(f"Ngrok error : {e}")
ngrok_address = "-ngrok error-"
self.lblngrok.setText(f"{ngrok_address}")

# Set slider min/max
self.min_exposure_us = 100
Expand Down
23 changes: 2 additions & 21 deletions ulc_mm_package/QtGUI/oracle.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""" High-level state machine manager.
"""High-level state machine manager.

The Oracle sees all and knows all.
It owns all GUI windows, threads, and worker objects (ScopeOp and Acquisition).
Expand Down Expand Up @@ -70,8 +70,6 @@
AUTOFOCUS_MODEL_DIR,
YOGO_MODEL_DIR,
)
from ulc_mm_package.utilities.email_utils import send_ngrok_email, EmailError
from ulc_mm_package.utilities.ngrok_utils import make_tcp_tunnel, NgrokError

from ulc_mm_package.QtGUI.scope_op import ScopeOp
from ulc_mm_package.QtGUI.form_gui import FormGUI
Expand Down Expand Up @@ -159,24 +157,7 @@ def __init__(self):
self.next_state()

def _init_tcp(self):
try:
tcp_addr = make_tcp_tunnel()
self.logger.info(f"SSH address is {tcp_addr}.")
self.liveview_window.update_tcp(tcp_addr)
send_ngrok_email()
except NgrokError as e:
self.logger.warning(
f"SSH address could not be found - {e}. This can be safely ignored."
)
self.liveview_window.update_tcp("unavailable")
except EmailError as e:
self.logger.warning(
f"SSH address could not be emailed - {e}. This can be safely ignored."
)
except Exception as e:
self.logger.warning(
f"Unexpected error while setting up TCP: {e}. This can be safely ignored."
)
self.liveview_window.update_tcp("unavailable")

def _check_lock(self):
if path.isfile(LOCKFILE):
Expand Down
1 change: 1 addition & 0 deletions ulc_mm_package/hardware/scope_routines.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,7 @@ def periodic_autobrightness_routine(
if counter >= processing_constants.PERIODIC_AB_PERIOD_NUM_FRAMES:
autobrightness.autobrightness_pid_control(img)
curr_img_brightness = autobrightness.prev_mean_img_brightness
counter = 0

def checkPressureDifference(
self, mscope: MalariaScope, ambient_pressure: float
Expand Down
4 changes: 0 additions & 4 deletions ulc_mm_package/scope_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,6 @@ def IMG_HEIGHT(self) -> int:
if VERBOSE:
PER_IMAGE_METADATA_KEYS.extend(PER_IMAGE_TIMING_KEYS)

# ================ Environment variables ================ #
NGROK_AUTH_TOKEN_ENV_VAR = "NGROK_AUTH_TOKEN"
EMAIL_PW_TOKEN = "GMAIL_TOKEN"

# ================ SSD directory constants ================ #
SSD_NAME = "SamsungSSD"
if SIMULATION:
Expand Down
180 changes: 0 additions & 180 deletions ulc_mm_package/utilities/email_utils.py

This file was deleted.

Loading