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

Fermi #199

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Fermi #199

wants to merge 10 commits into from

Conversation

shb46
Copy link
Contributor

@shb46 shb46 commented Sep 20, 2024

Fermi GBM Schema for a single schema, "ALERT" - Initial Version

@shb46 shb46 marked this pull request as draft September 25, 2024 14:56
@shb46 shb46 self-assigned this Sep 25, 2024
@shb46 shb46 requested a review from jracusin October 1, 2024 00:56
"type": "string",
"description": "Date and time of notice creation [UTC, ISO 8601], ex YYYY-MM-DDTHH:MM:SS.ssssssZ"
},
"alert_tense": {
Copy link
Member

@Vidushi-GitHub Vidushi-GitHub Oct 2, 2024

Choose a reason for hiding this comment

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

It's already present in core schema, you just have to ref the schema.
Same for most of the properties below, rate_snr, trigger_time etc.

@Vidushi-GitHub
Copy link
Member

We have planned a mission page, where you can keep the content present at readme file.

@Vidushi-GitHub
Copy link
Member

Hi @shb46, sorry for the delayed response due to travel and vacation. Most of the stuff looks fine.
My main confusion about schema is why strict schema there and why you are re-writing core properties, instead of ref?

@shb46
Copy link
Contributor Author

shb46 commented Oct 2, 2024

Hi @Vidushi-GitHub,

Hope everything is well! Here are my replies:

We have planned a mission page, where you can keep the content present at readme file.

  • Can we have an instrument page as well? the lat and the GBM instruments are run by separate teams.
  • Can notice type have its own page?

Hi @shb46, sorry for the delayed response due to travel and vacation. Most of the stuff looks fine. My main confusion about schema is why strict schema there and why you are re-writing core properties, instead of ref?

Those are two independent schemas intended to describe the same notice type:

  • The "Kafka" one: fermi/gbm/FermiGBMAlert.schema.json

    • Makes $ref-s to the core schema.
    • Doesn't $ref the strict schema.
    • Validates new notices received by the Kafka server.
    • More permissive compared to the strict schema.
  • The "strict" schema: fermi/gbm/strict/FermiGBMAlert.schema.json:

    • Doesn't $ref the core schema, nor the "Kafka" schema.
    • Is less permissive than the Kafka schema.
    • Clarifies what to expect in a notice, incl. which core fields are not used.
    • Used by the producer, in addition to the Kafka schema.

[Edit:] I should rename the strict schema file so it has a different name.

@Vidushi-GitHub
Copy link
Member

Hi Boyan,
Could you please change the filename?
fermi/gcn/notices/fermi/gbm/FermiGBMAlert.schema.json to fermi/gcn/notices/fermi/gbm/alert.schema.json?

As it's already in fermi/gbm folder, again fermiGBM is redundant.

@Vidushi-GitHub
Copy link
Member

We have planned a mission page, where you can keep the content present at readme file.

  • Can we have an instrument page as well? the lat and the GBM instruments are run by separate teams.
  • Can notice type have its own page?

For Fermi mission page, we have information for GCN Classic Notices at https://gcn.nasa.gov/missions/fermi, and would move forward with updating it.
@jracusin shall we separate out GBM, LAT content into two mission pages as available at https://gcn.nasa.gov/missions/fermi Or, just update the existing one as single page?

@Vidushi-GitHub
Copy link
Member

Those are two independent schemas intended to describe the same notice type:

  • The "Kafka" one: fermi/gbm/FermiGBMAlert.schema.json

    • Makes $ref-s to the core schema.
    • Doesn't $ref the strict schema.
    • Validates new notices received by the Kafka server.
    • More permissive compared to the strict schema.
  • The "strict" schema: fermi/gbm/strict/FermiGBMAlert.schema.json:

    • Doesn't $ref the core schema, nor the "Kafka" schema.
    • Is less permissive than the Kafka schema.
    • Clarifies what to expect in a notice, incl. which core fields are not used.
    • Used by the producer, in addition to the Kafka schema.

[Edit:] I should rename the strict schema file so it has a different name.

I am trying to understand why do you wanna create two schemas for same notice types? What is advantage of not referring $ref or kafka schema? Would you produce same notices from two schemas?
Definitions/clarifications shouldn't be problem, that can be added in alert schema as well.

@lpsinger, @jracusin do you have comments on the same notices from different schemas, alert ($ref to core) and strict (own definitions)?

@shb46
Copy link
Contributor Author

shb46 commented Oct 10, 2024

@jracusin:
Re. separate GBM/LAT pages.
Please let me know if it is possible. If yes, we should get the consensus of the GBM and LAT teams before we make a change. I think it will work with or without a "mission" page, i.e. either one of:

  • Missions
  • Fermi
  • GBM
  • LAT

or

  • Missions
  • FermiGBM
  • FermiLAT

@shb46
Copy link
Contributor Author

shb46 commented Oct 10, 2024

@Vidushi-GitHub: File renamed. The JPG and MD files removed.

@shb46
Copy link
Contributor Author

shb46 commented Oct 11, 2024

@jracusin: P.S.: I'm not planning to change the mission page at this time.

@dakota002
Copy link
Contributor

Hi @shb46 , I have a couple additional requests for this update:

Can you rename the strict schema and examples as well:

  • gcn/notices/fermi/gbm/strict/FermiGBMStrictAlert.schema.json -> gcn/notices/fermi/gbm/strict/alert.schema.json
  • gcn/notices/fermi/gbm/strict/FermiGBMAlert1.example.json -> gcn/notices/fermi/gbm/strict/alert.FermiGBMAlert1.example.json
  • gcn/notices/fermi/gbm/strict/FermiGBMAlert2.example.json -> gcn/notices/fermi/gbm/strict/alert.FermiGBMAlert2.example.json
  • gcn/notices/fermi/gbm/strict/FermiGBMStrictAlert1.example.json -> gcn/notices/fermi/gbm/strict/alert.FermiGBMStrictAlert1.example.json
  • gcn/notices/fermi/gbm/strict/FermiGBMStrictAlert2.example.json -> gcn/notices/fermi/gbm/strict/alert.FermiGBMStrictAlert2.example.json

The schema name change reason is the same as the other schema as @Vidushi-GitHub mentioned, as the path already gives the name. As for the examples, the pattern of: alert.[any specific name for the example].example.json is recognized in our schema browser and parsers, and will help automate our docs.

Once this is all set, could you then squash your commits down to 1 single commit? I can assist in this if you have questions before doing so.

@shb46
Copy link
Contributor Author

shb46 commented Oct 11, 2024

Hi, @dakota002,

Please check the new file names before squashing.

@dakota002
Copy link
Contributor

Hi, @dakota002,

Please check the new file names before squashing.

The names look good to me!

@shb46
Copy link
Contributor Author

shb46 commented Oct 11, 2024

@dakota002: Did I squash it enough?

@dakota002
Copy link
Contributor

@dakota002: Did I squash it enough?

I don't believe so, I see 52 commits now. You may have pulled the history back into your branch before pushing it out. You should just run the command git push -f to assert that the new history is correct

@shb46
Copy link
Contributor Author

shb46 commented Oct 14, 2024

@dakota002: Can't figure it out. I'm going to need your help with this.

"type": "string",
"description": "Notice title"
},
"hitl": {
Copy link
Member

Choose a reason for hiding this comment

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

Would you like to rename it as "automatic", rather than providing a short form?
This field can be common in other missions as well and may create different name schemes.

@jracusin this field might be common for other missions, shall we add it in core schema?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Greetings, @Vidushi-GitHub and @jracusin:

To have it in the Core schema makes much more sense to me. (See: #202) In such case, we can simply drop it from this schema (GBM Alert) and survive until you decide on a name and update the Core. Some of our other notices use it regularly, but that is for the future.

So far, Fermi GBM has had it as "HITL" or "Human-in-the-Loop". I prefer to keep it this way. IMHO, "Automatic" inverts what people are used to receive and, secondly, the label is more ambiguous than "HITL". You should probably see if any other missions have an analog.

Copy link
Contributor

Choose a reason for hiding this comment

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

HITL was used in GCN Classic notices, so I'm okay with keeping it, as long as it's well described. It's not automatic, it is at least partially manual.

Copy link
Contributor

Choose a reason for hiding this comment

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

Could this instead be an enum with different types of localizations rather than a confusing boolean? e.g. flight, ground, HITL?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jracusin: Then we would be more stright forward to name it "human localization". HITL Is more general. I don't mind dropping it from the Alert. It should be in the Core anyway.

Copy link
Member

@Vidushi-GitHub Vidushi-GitHub Nov 5, 2024

Choose a reason for hiding this comment

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

After discussions "HILT" specific to GBM is fine.
Style looks inconsistent to other schema fields, if possible make the property name explicit like, human_in_loop or human_in_the_loop.

@shb46 are you considering to put it as enum?

Let's move this forward to some conclusion.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Vidushi-GitHub: I renamed the field and adjusted the description accordingly. I'm keeping it as a boolean.

Copy link
Member

@Vidushi-GitHub Vidushi-GitHub left a comment

Choose a reason for hiding this comment

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

It looks good to me.

The only issue we need to address is the strict schema being used.
Would you like to create it for validation purposes only, or do you plan to have an additional topic for strict schema for the team's use?

@shb46
Copy link
Contributor Author

shb46 commented Oct 28, 2024

Hi, @Vidushi-GitHub:

Regarding your latest comment.

It looks good to me.

Let's not forget the "hitl" field before approving, in case we decide to drop it.

The only issue we need to address is the strict schema being used. Would you like to create it for validation purposes only, or do you plan to have an additional topic for strict schema for the team's use?

The producer will validate against both the non-strict and the strict schemas at its end. Kafka can use only the non-strict. It also serves as a source-as-documentation.

@jracusin
Copy link
Contributor

We have planned a mission page, where you can keep the content present at readme file.

  • Can we have an instrument page as well? the lat and the GBM instruments are run by separate teams.
  • Can notice type have its own page?

For Fermi mission page, we have information for GCN Classic Notices at https://gcn.nasa.gov/missions/fermi, and would move forward with updating it. @jracusin shall we separate out GBM, LAT content into two mission pages as available at https://gcn.nasa.gov/missions/fermi Or, just update the existing one as single page?

No, we should modify the existing Fermi mission page, and can have sections for GBM & LAT.

@jracusin
Copy link
Contributor

Hi, @Vidushi-GitHub:

Regarding your latest comment.

It looks good to me.

Let's not forget the "hitl" field before approving, in case we decide to drop it.

The only issue we need to address is the strict schema being used. Would you like to create it for validation purposes only, or do you plan to have an additional topic for strict schema for the team's use?

The producer will validate against both the non-strict and the strict schemas at its end. Kafka can use only the non-strict. It also serves as a source-as-documentation.

Each schema is for a topic, so you cannot produce multiple schema to the same topic.

},
"minItems": 14,
"maxItems": 14,
"description": "Triggered detectors"
Copy link
Member

Choose a reason for hiding this comment

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

Please expand it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Vidushi-GitHub: Description improved.

},
"trigger_algorithm_number": {
"type": "number",
"description": "The criterion number that caused the flight software to trigger. Not to be confused with flight software or any other version number."
Copy link
Member

@Vidushi-GitHub Vidushi-GitHub Nov 5, 2024

Choose a reason for hiding this comment

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

please make it consistent with the above definition.

"on"
],
"event_name": ["GRB240824A"],
"hitl": false,
Copy link
Member

Choose a reason for hiding this comment

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

Please make the example field name consistent with schema.
Additionally, validate the schema against examples, in case any change is left out.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Vidushi-GitHub: Changed. Thank you for the reminder!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants