-
Notifications
You must be signed in to change notification settings - Fork 0
Support ZTF lite schema
#88
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
base: main
Are you sure you want to change the base?
Conversation
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferences |
pittgoogle/registry.py
Outdated
| """ | ||
| class_name = schema_name[0].upper() + schema_name[1:] + "Schema" | ||
| schema_name_parts = schema_name.split(".") | ||
| class_name = ( |
There was a problem hiding this comment.
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".
Related to #89
To Do:
Alertand 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."default"option forAlert.schema_name. I think it's redundant withNoneand thus just confusing.Alert.getraise a warning if a key is passed that is not one of our generic field names.