Skip to content

Commit

Permalink
Allow schema file to be a general URI
Browse files Browse the repository at this point in the history
This allows it to be read from anywhere supported by ResourcePath.
  • Loading branch information
timj committed Aug 30, 2023
1 parent 6758148 commit 3087b14
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/lsst/ap/association/packageAlerts.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ class PackageAlertsConfig(pexConfig.Config):
"""
schemaFile = pexConfig.Field(
dtype=str,
doc="Schema definition file for the avro alerts.",
default=alertPack.get_path_to_latest_schema()
doc="Schema definition file URI for the avro alerts.",
default=str(alertPack.get_uri_to_latest_schema())
)
minCutoutSize = pexConfig.RangeField(
dtype=int,
Expand All @@ -75,7 +75,7 @@ class PackageAlertsTask(pipeBase.Task):

def __init__(self, **kwargs):
super().__init__(**kwargs)
self.alertSchema = alertPack.Schema.from_file(self.config.schemaFile)
self.alertSchema = alertPack.Schema.from_uri(self.config.schemaFile)
os.makedirs(self.config.alertWriteLocation, exist_ok=True)

@timeMethod
Expand Down

0 comments on commit 3087b14

Please sign in to comment.