Closed trevorb1 closed 4 months ago
We have this bit of code in a few places:
snapshot_config = snakemake.config["snapshots"] sns_start = pd.to_datetime(snapshot_config["start"]) sns_end = pd.to_datetime(snapshot_config["end"]) sns_inclusive = snapshot_config["inclusive"] snapshots = pd.date_range( freq="h", start=sns_start, end=sns_end, inclusive=sns_inclusive, )
We should probably turn it into a utility function that we just pass in the snapshot_config variable and we get the datetime out
snapshot_config
def create_snapshots(snapshot_config: Dict[str,str]) -> pd.date_range return pd.date_range( freq="h", start=pd.to_datetime(snapshot_config["start"]), end=pd.to_datetime(snapshot_config["end"]), inclusive=snapshot_config["inclusive"], )
No response
Feature Request
We have this bit of code in a few places:
We should probably turn it into a utility function that we just pass in the
snapshot_config
variable and we get the datetime outSuggested Solution
Additional Info
No response