Conversation
| return starttime.split("+")[0] | ||
|
|
||
| def read_groups_run(self) -> str: | ||
| def read_groups_run(self) -> List[str]: |
There was a problem hiding this comment.
Various collection types from typing (List, Dict, etc) are now (Python 3.9+) considered legacy syntax in favour of built-in generic collection types (list, dict, etc).
https://docs.python.org/3/whatsnew/3.9.html#type-hinting-generics-in-standard-collections
We don't support anything for Python<3.9, do we? If we do, then I suggest we include from __future__ import annotations for backward compatibility, and use the build-in collection types.
There was a problem hiding this comment.
There'll be quite a few to update, so let's change those in another PR
There was a problem hiding this comment.
Do you want to make an Issue for this so it doesn't get forgotten?
| groups = ["suite_default"] | ||
| return groups | ||
|
|
||
| def get_task_states(self) -> Dict[str, str]: |
| self.task_states: Dict[str, str] = self.get_task_states() | ||
| self.groups: str = self.read_groups_run() | ||
| self.groups: List[str] = self.read_groups_run() | ||
| self.rose_data: Dict[str, str] = self.read_rose_conf() | ||
| self.dependencies: Dict[str, Dict] = self.read_dependencies() |
jennyhickson
left a comment
There was a problem hiding this comment.
LGTM. Successfully parses the testing for MetOffice/lfric_core#170.
Add a default for the groups run if the cylc variable can't be found.
The variable not being found is most likely because the suite was run without
-z g=so used the suite's default group. This can change per repo, so label it withsuite_default.