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-25280: Adapt to new alert_packet API #85

Merged
merged 1 commit into from
Jun 5, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion python/lsst/ap/association/packageAlerts.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ class PackageAlertsConfig(pexConfig.Config):
dtype=str,
doc="Schema definition file for the avro alerts.",
default=os.path.join(getPackageDir("alert_packet"),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think whilst this solution fixes the immediate problem it doesn't seem to me like the right solution long term. If alert_packet is installed properly then you should be using pkg_resources to locate the schemas and if they are in a zip file you will need to get a handle to the contents and not a file itself. I guess this works because of the other fix in alert_packet where you don't us python setup.py at all but copy everything over without involving setuptools.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with all of those statements.

"schema/latest/lsst.alert.avsc"),
"schema",
*[str(x) for x in alertPack.get_latest_schema_version()],
"lsst.alert.avsc")
)
minCutoutSize = pexConfig.RangeField(
dtype=int,
Expand Down