|
16 | 16 | ) |
17 | 17 |
|
18 | 18 |
|
| 19 | +class OutputFileType(str, Enum): |
| 20 | + """Valid output file types for saving data.""" |
| 21 | + |
| 22 | + csv = "csv" |
| 23 | + parquet = "parquet" |
| 24 | + |
| 25 | + |
19 | 26 | class Calibrator(str, Enum): |
20 | 27 | """Setting a calibrator class for typer. |
21 | 28 |
|
@@ -53,13 +60,13 @@ def main( |
53 | 60 | input: pathlib.Path = typer.Argument( |
54 | 61 | ..., help="Path to the input data.", exists=True |
55 | 62 | ), |
56 | | - output: Optional[pathlib.Path] = typer.Option( |
| 63 | + output: pathlib.Path = typer.Option( |
57 | 64 | None, |
58 | 65 | "-o", |
59 | 66 | "--output", |
60 | 67 | help="Path where data will be saved. Supports .csv and .parquet formats.", |
61 | 68 | ), |
62 | | - output_filetype: Optional[str] = typer.Option( |
| 69 | + output_filetype: OutputFileType = typer.Option( |
63 | 70 | None, |
64 | 71 | "-O", |
65 | 72 | "--output-filetype", |
@@ -141,13 +148,13 @@ def main( |
141 | 148 | orchestrator.run( |
142 | 149 | input=input, |
143 | 150 | output=output, |
144 | | - calibrator=calibrator.value if calibrator else None, |
| 151 | + calibrator=calibrator.value if calibrator else None, # type: ignore[arg-type] # Covered by Calibrator Enum class |
145 | 152 | activity_metric=activity_metric.value, |
146 | 153 | thresholds=None if thresholds is None else thresholds, |
147 | 154 | epoch_length=epoch_length, |
148 | | - nonwear_algorithm=nonwear_algorithms, |
| 155 | + nonwear_algorithm=nonwear_algorithms, # type: ignore[arg-type] # Covered by NonwearAlgorithm Enum class |
149 | 156 | verbosity=log_level, |
150 | | - output_filetype=output_filetype, |
| 157 | + output_filetype=output_filetype, # type: ignore[arg-type] # Covered by OutputFileType Enum class |
151 | 158 | ) |
152 | 159 |
|
153 | 160 |
|
|
0 commit comments