Skip to content

Conversation

@hernandezc1
Copy link
Contributor

@hernandezc1 hernandezc1 commented Apr 7, 2025

Related to #89

To Do:

  • (Chris) Add a schema map for the ZTF lite schema.
  • (Troy) Idea for organization: Add StetsonJ statistics to LSST science pipeline Pitt-Google-Broker#271 (comment).
  • (Troy) Implement support for that schema map in Alert and other classes. Hopefully most methods will be able to handle the new map without any trouble but I'm guessing there will be a few that need some tweaking. The important methods to focus on are those that will be needed by the cloud run implementation of the ZTF SuperNNova module being developed in Use Cloud Run for ZTF's SuperNNova module Pitt-Google-Broker#265.
  • (Troy) Try removing the "default" option for Alert.schema_name. I think it's redundant with None and thus just confusing.
  • (Troy) Issues identified when altering alert content #97 is a more general issue (not only for ZTF alerts), but there's a lot of overlap with the above so it should probably be addressed at the same time.
  • Make Alert.get raise a warning if a key is passed that is not one of our generic field names.

@codacy-production
Copy link

codacy-production bot commented Apr 7, 2025

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.00%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (f6f4767) 958 663 69.21%
Head commit (80c23f3) 958 (+0) 663 (+0) 69.21% (+0.00%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#88) 0 0 ∅ (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

@hernandezc1 hernandezc1 requested a review from troyraen April 7, 2025 20:15
@hernandezc1 hernandezc1 self-assigned this Apr 7, 2025
@hernandezc1 hernandezc1 added the enhancement New feature or request label Apr 7, 2025
@hernandezc1 hernandezc1 changed the title Add ZTF lite schema map Support ZTFlite schema Apr 15, 2025
@hernandezc1 hernandezc1 changed the title Support ZTFlite schema Support ZTF lite schema Apr 15, 2025
"""
class_name = schema_name[0].upper() + schema_name[1:] + "Schema"
schema_name_parts = schema_name.split(".")
class_name = (
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Pointing out that both:
class_name = schema_name[0].upper() + schema_name[1:] + "Schema" and

schema_name_parts = schema_name.split(".")
class_name = (
    schema_name_parts[0].capitalize()
    + "".join(part for part in schema_name_parts[1:])
    + "Schema"
)

will not work if schema_name = "elasticc.v0_9_1.brokerClassification" or schema_name = "elasticc.v0_9_1.alert".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants