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

Add allowed-value constraints tutorial #508

Merged

Conversation

aj-stein-nist
Copy link
Collaborator

@aj-stein-nist aj-stein-nist commented Jan 11, 2024

Committer Notes

Begin the allowed-value constraints tutorial and potentially others, pending feedback. Closes #292.

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Have you squashed any non-relevant commits and commit messages? [instructions]
  • Do all automated CI/CD checks pass?

Changes to Core Features:

  • Have you included examples of how to use your new feature(s)? The website changes are specifically for a tutorial demonstrating examples.
  • Have you updated all website](https://pages.nist.gov/metaschema) and readme documentation affected by the changes you made? Changes to the website can be made in the website/content directory of your branch. This is a website change.
  • Have you added an explanation of what your changes do and why you'd like us to include them? This is a documentation update.
  • Have you written new tests for your core changes, as applicable? N/A this is a documentation update.

@aj-stein-nist aj-stein-nist self-assigned this Jan 11, 2024
@aj-stein-nist aj-stein-nist linked an issue Jan 11, 2024 that may be closed by this pull request
5 tasks
@aj-stein-nist
Copy link
Collaborator Author

I would like feedback before removing the draft status and final review.

  1. Specific, actionable grammar and spelling changes are always welcome. 😛
  2. After expanding our required and recommended value strategies, do we encourage me or require me to add a third section on "extending" constraint definitions and handling conflicts? That seems like an advanced topic, but relevant to the constraints tutorial here.
  3. Should I continue beyond allowed-values constraints tutorials and come up with examples of <index/>, <is-unique/>, <expect/>, and <matches/> or should that be separately scoped work for a separate tutorial or, as is convenient for me, include it here? (this will be Tutorial 2, I am implying with this answer you recommend the subject matter be Tutorial 3, or even 5 or 6 in a different order of complexity.)

@aj-stein-nist aj-stein-nist force-pushed the 292-allowed-values-tutorial branch 4 times, most recently from a636def to 56bc56d Compare January 16, 2024 21:33
Add introduction and section about how to defined mandatory, required
values for `allowed-values allow-other="no"` for the first segment of
the tutorial.
Add introduction and section about how to defined mandatory, recommended
values for `allowed-values allow-other="yes"` for the first segment of
the tutorial.

Added a conclusion for wrap-up given the current draft contents.
@aj-stein-nist
Copy link
Collaborator Author

I also did some touch-ups on this to relabel the introduction correctly, highlight changes to the model, and more interestingly highlight relevant changes to the example document instances. I didn't realize the tabs and highlight wrapped directives were native Hugo configuration with the templates we use working out of the box, so I added that as well and it just works.

image

image

image

Copy link
Collaborator

@david-waltermire david-waltermire left a comment

Choose a reason for hiding this comment

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

This looks great! Thank you so much for all the hard work on this.

I provided some non-blocking feedback, which could be addressed in another iteration. I believe this tutorial could be released as-is.

website/content/tutorials/2-constraints/_index.md Outdated Show resolved Hide resolved
website/content/tutorials/2-constraints/_index.md Outdated Show resolved Hide resolved
@aj-stein-nist
Copy link
Collaborator Author

Sorry for the delays, I will try to touch this up before the community call today.

@aj-stein-nist
Copy link
Collaborator Author

Re #508 (comment), I only got feedback from @david-waltermire that I should separate out the constraint type tutorials and not keep them in one massive tutorial. As this is tutorial 2, follow-on constraint tutorials will be 3, 4, or maybe 5 respectively. Will ask in today's meeting for more feedback but likely move to merge this once I apply PR recommendations and mark for final review and tentative merge. I will open new issues for the follow-on tutorials.

@aj-stein-nist aj-stein-nist changed the title Begin constraints tutorial Add allowed-value constraints tutorial Jan 19, 2024
@aj-stein-nist aj-stein-nist mentioned this pull request Jan 19, 2024
5 tasks
1. Make second model with allow-other scaffold and include previous
model version with arch change, don't make the model changes logically
separate.
1. Add detail to conclusion paragraph and explicitly defined learning
objectives and that they were met.
1. Not explicit to review but caught when touching up models: make sure
the model version numbers in `<schema-version/>` in the tutorials bump
up with each change to make sense and signify a change. (NOTE: The bumps
are in patch number, not minor number, which is odd open review issue
to check that later).
@aj-stein-nist
Copy link
Collaborator Author

aj-stein-nist commented Jan 20, 2024

Sorry for the delay, this is ready for final review with feedback from Updated in 889758b and feedback integrated.

@aj-stein-nist aj-stein-nist mentioned this pull request Feb 5, 2024
7 tasks
@david-waltermire david-waltermire added this pull request to the merge queue Feb 6, 2024
Merged via the queue into usnistgov:develop with commit b00e84f Feb 6, 2024
3 checks passed
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.

Allowed Values Tutorial
3 participants