Skip to content

Commit

Permalink
v0.6.2
Browse files Browse the repository at this point in the history
better logging when accessing env variables
  • Loading branch information
SCHWMAX committed Nov 21, 2024
1 parent 200c7c9 commit 9855913
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
sha$${{ github.sha }}
sha$${{ env.SHORT_COMMIT }}
date$${{ env.CURRENT_DATE }}
v0.6.1
v0.6.2
- name: Login to Docker Hub
uses: docker/login-action@v3
Expand Down
2 changes: 1 addition & 1 deletion DataModels.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ class BaslerCameraSettings(CameraCommunication, CameraSettings, CameraImageAcqui
pass


class BaslerCameraParams(CameraCommunication, CameraSettings, CameraImageAcquisition):
class BaslerCameraParams(BaslerCameraSettings):
pass
# TODO: validator pixel format

Expand Down
6 changes: 5 additions & 1 deletion utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ def get_env_variable(key: Union[str, List[str]], default_value, check_for_prefix
# name of the environment variable to look for
nm = f"{prefix}{ky}"
if nm in os.environ:
return cast(os.environ[nm])
value = cast(os.environ[nm])
print(f"Found environment variable {nm} found. Using value: {value}")
return value
print(f"No environment variable {key} found. Using default value: {default_value}")
return default_value


Expand Down Expand Up @@ -151,6 +154,7 @@ def setup_logging(

# first log message
logger_.info(f"Logging configured: level={log_level}, file={log_file}")
logger_.debug(f"Environment variables: {os.environ}")

return logger_

Expand Down

0 comments on commit 9855913

Please sign in to comment.