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

github pages based schema browser #25

Merged
merged 3 commits into from Sep 29, 2021
Merged

github pages based schema browser #25

merged 3 commits into from Sep 29, 2021

Conversation

fritzm
Copy link
Contributor

@fritzm fritzm commented Sep 18, 2021

This is a functional replacement for the now-decommissioned statically-rendered schema browser, built on github pages for the sdm_schemas repo.

Github handles the rendering and serving of the pages, updating them automatically when commits are made to master in the sdm_schemas repo. No additional tooling, services, workflow, or github actions are required. The schema pages are rendered directly from the felis yamls within the repository, which are easily consumed and processed by the jekyll site generator used by github pages.

The main adds here are a top-level _config.yml file, and a new browser/ subdirectory which contains the jekyll config and templates. Schemas made visible in the browser are curated by providing a short markdown description for each desired to be shown in the browser/ subdirectory (see baseline.md, dp01.md, and hsc.md in this PR for examples.) A cleanup commit removing obsolete files and pushing others into a deprecated/ subdirectory is also included here.

For a live example of these pages, see https://fritzm.github.io/sdm_schemas/browser which is running out of a clone of sdm_schemas where these changes are merged to master and github pages have been enabled. If this PR is merged, turning on github pages on the sdm_schemas repo will make the schema browser appear at https://lsst.github.io/sdm_schemas/browser.

@ktlim
Copy link
Contributor

ktlim commented Sep 18, 2021

Three quick comments:

  1. The old browser showed things on a table by table basis, so it was clear what you were looking at when you were in the middle of a long table. Is there some way of highlighting the currently-visible table in the sidebar or of having a persistent header in the right panel?
  2. The old schema browser had a column for "not null". It doesn't look like this is available from Felis.
  3. The old browser had sortable columns in its table. I'm not sure how useful that feature is, but it wouldn't hurt to include it.

browser/index.md Outdated Show resolved Hide resolved
<ul>
<li><a href=".">Schema Browser</a></li>
<ul>
<li><a href="">{{ page.title }}</a></li>
Copy link
Contributor

@ktlim ktlim Sep 18, 2021

Choose a reason for hiding this comment

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

Include the hash or tag/version somewhere? Are we ever going to need to refer to past versions of sdm_schemas?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, that is a (the most?) serious drawback of this approach: one version (master/main) only. Something based on lsst-the-docs would be superior in this regard. This solution is proposed as a low effort stopgap.

browser/assets/css/style2.scss Outdated Show resolved Hide resolved
_config.yml Outdated Show resolved Hide resolved
@ktlim
Copy link
Contributor

ktlim commented Sep 18, 2021

Please make sure to select "Enforce HTTPS" in the GitHub Pages settings.

@fritzm
Copy link
Contributor Author

fritzm commented Sep 18, 2021

  1. The old browser showed things on a table by table basis, so it was clear what you were looking at when you were in the middle of a long table. Is there some way of highlighting the currently-visible table in the sidebar or of having a persistent header in the right panel?
  1. The old browser had sortable columns in its table. I'm not sure how useful that feature is, but it wouldn't hurt to include it.

Would need to add a little JS for both of ^these, I think? I (or other) could pursue this on a subsequent ticket. (That said, perhaps that effort would be better spent looking into a replacement solution based on e.g. lsst-the-docs.)

  1. The old schema browser had a column for "not null". It doesn't look like this is available from Felis.

Hmm, that seems a significant lacuna in Felis?

@fritzm
Copy link
Contributor Author

fritzm commented Sep 18, 2021

Please make sure to select "Enforce HTTPS" in the GitHub Pages settings.

wilco

@fritzm fritzm force-pushed the tickets/DM-31822 branch 2 times, most recently from 9d1fd5e to 6881101 Compare September 20, 2021 23:21
@fritzm fritzm merged commit 622fabc into master Sep 29, 2021
@fritzm fritzm deleted the tickets/DM-31822 branch September 29, 2021 20:34
@jonathansick
Copy link
Member

We could deploy this to LSST the Docs instead quite easily (it's what Rubin uses instead of GitHub Pages). Just let me know if you want to do that.

@fritzm
Copy link
Contributor Author

fritzm commented Oct 1, 2021

Thanks @jonathansick -- that is certainly probably best in the end, but I was unsure what exactly was needed.

In particular, ability to select versions rendered from different tags/branches would be pretty useful. And, of course, being stylistically aligned with everything else is also always a plus.

Would we want to rework to some other rendering system than Jekyll for that?

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