Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-36457: Use globs instead of regexes for dataset type patterns #279

Merged
merged 1 commit into from
Aug 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions python/lsst/analysis/tools/tasks/gatherResourceUsage.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
import numpy as np
import pandas as pd
from lsst.daf.butler import Butler, DatasetRef, DatasetType
from lsst.daf.butler.utils import globToRegex
from lsst.pex.config import Field, ListField
from lsst.pipe.base import (
Instrument,
Expand Down Expand Up @@ -573,10 +572,9 @@ def __init__(
# build the pipeline.
input_dataset_types: Any
if not dataset_type_names:
base_dataset_type_filter = re.compile(r"\w+_metadata")
input_dataset_types = base_dataset_type_filter
input_dataset_types = "*_metadata"
else:
input_dataset_types = [globToRegex(expr) for expr in dataset_type_names]
input_dataset_types = dataset_type_names
pipeline_graph = PipelineGraph()
metadata_refs: dict[str, set[DatasetRef]] = {}
consolidate_config = ConsolidateResourceUsageConfig()
Expand Down
Loading