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

[ENH] Generate glossary page from schema #923

Merged
merged 7 commits into from
Dec 15, 2021

Conversation

tsalo
Copy link
Member

@tsalo tsalo commented Nov 2, 2021

Closes #900.

This is just a first draft. It does not include links from the glossary back to the specification text, or even collect info about where the terms are used in the text.

I've included anchors for each of the object definitions, so it should be fairly easy to link to the appropriate place in the glossary from things like tables in the text.

Changes proposed:

  • Create new appendix, Glossary, with all schema objects rendered.
  • Replace single underscore used to delineate metadata fields with the same name, but different definitions, with two underscores, to match the convention proposed in [SCHEMA] Add TSV column files #827.
  • Add descriptions for a couple of objects where that field was empty.
  • Add functions to generate the glossary from the schema.

@tsalo
Copy link
Member Author

tsalo commented Nov 3, 2021

Alternatively, I could organize them by type first, instead of including the type after the term, in parentheses. Not sure which would be preferable.

EDIT: Also, in a perfect world, there would be some way to access the relevant place within the associated YAML file, like "source" links in Sphinx-generated documentation.

@Remi-Gau
Copy link
Collaborator

Remi-Gau commented Dec 8, 2021

Had a quick look and am generally in favor of this, as it might help users in general.

Does that make the entities appendix page rerundant though?

@Remi-Gau
Copy link
Collaborator

Remi-Gau commented Dec 8, 2021

I could organize them by type first, instead of including the type after the term, in parentheses. Not sure which would be preferable.

A way to dynamically sort / filter them by type or whatever other criterion would be the best but not sure how feasible it is in MkDocs and would have to be nuked for the PDF rendering.

I would start with alphabetical and progressively improve later.

@sappelhoff
Copy link
Member

Does that make the entities appendix page rerundant though?

I don't think this makes the "entities" appendix redundant - these are essentially different pieces of information, aren't they?

I would start with alphabetical and progressively improve later.

agreed!

nuked for the PDF rendering.

@tsalo could you please rebase this PR on master (or merge master) so that we can see how the rendered PDF looks like?

Thanks!

@sappelhoff sappelhoff added this to the 1.7.0 milestone Dec 9, 2021
@tsalo
Copy link
Member Author

tsalo commented Dec 9, 2021

A way to dynamically sort / filter them by type or whatever other criterion would be the best

@Remi-Gau that's definitely in the wishlist, along with links back to sections of the specification that use each term.

I would start with alphabetical and progressively improve later.

Sounds good. I'll keep it as-is then.

@tsalo could you please rebase this PR on master (or merge master) so that we can see how the rendered PDF looks like?

@sappelhoff done!

@Remi-Gau
Copy link
Collaborator

Remi-Gau commented Dec 9, 2021

Does that make the entities appendix page rerundant though?

I don't think this makes the "entities" appendix redundant - these are essentially different pieces of information, aren't they?

Well let's just say that the entities page is a subset of the glossary. See the example of the hemisphere entity below.

I don' think it is necessarily an issue though.

@tsalo
Copy link
Member Author

tsalo commented Dec 9, 2021

Eventually, it would be great to have the glossary replace the Entities appendix. Imagine hovering your mouse over a term in the specification and the glossary entry pops up! However, at the moment, I think the glossary is just too big and difficult to navigate for users to rely on it for something as common as checking entity definitions.

EDIT: There are some plugins that should make hover tooltips possible, like md-tooltips, md-tooltips-link, and mkdocs-tooltips.

@sappelhoff sappelhoff marked this pull request as ready for review December 9, 2021 18:26
@tsalo tsalo added the schema Issues related to the YAML schema representation of the specification. Patch version release. label Dec 14, 2021
@tsalo
Copy link
Member Author

tsalo commented Dec 15, 2021

@sappelhoff would you rather I wait on @effigies's review or can we merge now that there are two approvals?

@sappelhoff sappelhoff merged commit 7489ff5 into bids-standard:master Dec 15, 2021
@sappelhoff
Copy link
Member

Let's merge :-) 🚀 Thanks @tsalo

@tsalo tsalo deleted the glossary branch December 15, 2021 16:14
@tsalo tsalo added the schema-code Updates or changes to the code used to parse, filter, and render the schema. label Apr 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
schema Issues related to the YAML schema representation of the specification. Patch version release. schema-code Updates or changes to the code used to parse, filter, and render the schema.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create index page based on the schema
3 participants