-
Notifications
You must be signed in to change notification settings - Fork 44
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
draft schema design #950
draft schema design #950
Conversation
Codecov ReportPatch and project coverage have no change.
Additional details and impacted files@@ Coverage Diff @@
## main #950 +/- ##
=====================================
Coverage 5.63% 5.63%
=====================================
Files 99 99
Lines 2414 2414
Branches 295 295
=====================================
Hits 136 136
Misses 2276 2276
Partials 2 2
☔ View full report in Codecov by Sentry. |
A useful link to have somewhere in this documentation: https://www.learnjsonschema.com/2020-12/ |
Will add schema related step at New Notice Producers. |
0144db6
to
d70a2c0
Compare
For submitting schema, we need to add something about making a PR with their branch, that's what initiates our review. Also do we really need the details of exactly how to use git? |
884ae49
to
7776f0b
Compare
45e1aff
to
8170391
Compare
Done! |
@lpsinger This pull request is ready for review! I am attaching screenshots for reference. Seperate attachments for HealPix page is removed for now, which will require parsing healpix instructions from you and @israelmcmc. |
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.
Please rebase. Sorry, we just merged #840, which touched nearly all of the route modules.
No problem. |
208a7f4
to
71cd4de
Compare
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.
The FAQ items are great, but I am not sure that they belong in the FAQ. I think a tutorial or primer on writing JSON Schema would be more useful. Then, your content for the FAQ entry titled "Which option, "allOf", "anyOf", or "oneOf" should be used?" would go into a section of the primer on inheritance.
app/routes/docs.faq.md
Outdated
@@ -66,6 +66,30 @@ This warning means that there have not been any recent alerts on that topic. | |||
|
|||
To get started, [sign in or sign up](https://gcn.nasa.gov/login) and then select 'Email Notifications' from account dropdown menu. See also [GCN Circular 32517](https://gcn.gsfc.nasa.gov/gcn3/32517.gcn3). | |||
|
|||
## Notice Producers | |||
|
|||
### Which unit system is recommended to be used? |
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.
Eliminate passive voice.
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.
This will be moved from FAQ to tutorial page.
app/routes/docs.faq.md
Outdated
|
||
We recommend utilizing the "allOf" option, as none of the properties in the core schema are required. However, this flexibility, with no required property, can lead to false positives when "anyOf" is used, as anything will technically validate against it. | ||
|
||
### How can I refer the coincident detection with another instrument? |
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.
This sentence seems non-grammatical. @jracusin, would you please help re-word it?
app/routes/docs.producers._index.mdx
Outdated
data = str({ | ||
'$schema':'your/schema', | ||
'key':'value' | ||
... | ||
}).encode() # any bytes |
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.
No, that's not how you serialize a data structure to JSON in Python. Use json.dumps
.
I don't think that you need to explicitly encode it to bytes. If memory servers, Producer.produce
happily accepts either strings or bytes. (Please test that.)
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.
json.dumps update done!
We tested producer.produce with a string and it threw errors when not a byte string
@dakota002 please check this is true
@lpsinger do you suggest that FAQ related to notice producers should be placed under New Notice Producers as Tutorial Section (similar as schema document)? @jracusin @dakota002 |
cf65949
to
335c0bd
Compare
1434f52
to
106c403
Compare
@lpsinger and @dakota002 I accidentally closed this branch, I was working on rebase! Don't deploy it! |
That's alright, @Vidushi-GitHub. You closed it, but you didn't merge it. You could re-open it if you want to. |
#921 in progress