Skip to content

Commit

Permalink
Allow to set data logging options via environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
albireox committed Oct 9, 2024
1 parent d8b5169 commit d6bd951
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## Next version

### ✨ Improved

* Add custom help section `"Post-fill data logging"`.
* Allow to set data logging options via environment variables.


## 0.2.0 - 2024-10-08

### 🚀 New
Expand Down
11 changes: 8 additions & 3 deletions src/lvmcryo/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,32 +347,37 @@ async def ln2(
rich_help_panel="Logging",
),
] = True,
#
# Post-fill data options
#
write_data: Annotated[
bool,
Option(
"--write-data",
envvar="LVMCRYO_WRITE_DATA",
help="Saves cryostat pressures and temperatures taken during purge/fill "
"to a parquet file.",
rich_help_panel="Logging",
rich_help_panel="Post-fill data logging",
),
] = False,
data_path: Annotated[
Optional[pathlib.Path],
Option(
envvar="LVMCRYO_DATA_PATH",
exists=False,
help="Path where to save the data. Implies --write-data. "
"Defaults to a path relative to the log path.",
rich_help_panel="Logging",
rich_help_panel="Post-fill data logging",
),
] = None,
data_extra_time: Annotated[
float,
Option(
envvar="LVMCRYO_DATA_EXTRA_TIME",
help="Additional time to take cryostat data after the "
"action has been completed. The command will not complete until "
"data collection has finished.",
rich_help_panel="Logging",
rich_help_panel="Post-fill data logging",
),
] = 60,
):
Expand Down

0 comments on commit d6bd951

Please sign in to comment.