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

improve appearance #239

Merged
merged 12 commits into from
Nov 13, 2021
Merged

improve appearance #239

merged 12 commits into from
Nov 13, 2021

Conversation

OriolAbril
Copy link
Member

@OriolAbril OriolAbril commented Oct 14, 2021

Work on the overall appearance of the website.

  • Add "view on github", "launch on binder" and "open with collab" badges to all posts. Only
    notebooks with the post directive will have this. Partial resolution of Guidance/standardization of "front matter" #200, and it is automated.
    • binder env still needs to be configured though.
  • Add postcard information to the left sidebar. This will include tags and categories (thus this fixes Show tags and categories within notebook posts #235) but it could
    be interesting to include authors too as discussed in Standardize authorship attribution #198.
    • The current proposal is a bit clunky but might work well enough. It does have a bit of repeated info though which is not ideal. I have basically hijacked the ablog template to include the authors with a link to #authors which should then be set and contain the authorship info, links to the profiles of authors...
  • Make the sidebar scrollable, see Only the toctree section of the left sidebar is scrollable pydata/pydata-sphinx-theme#500 This will soon be fixed directly by the theme in a much more pretty way than what I first did here.
  • Fix logos and PyMC3 instances in sphinx config; the notebooks and tags still need updating.

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@OriolAbril
Copy link
Member Author

Here is how the spline example looks like for example: https://pymc-examples--239.org.readthedocs.build/en/239/splines/spline.html which is where I have added authors to the post directive to show how it looks like cc @tjburch

@tjburch
Copy link
Contributor

tjburch commented Oct 14, 2021

@OriolAbril I really like the look of having authors in the sidebar! Would it be annoying to have a separate tag for original author and then one for supplemental contributors? e.g. in this example, I just fixed some plots - I feel a little bad appearing side-by-side with the original author. Maybe this is a null point, since the contributions are at the end and not worth worrying about though.

@OriolAbril
Copy link
Member Author

Would it be annoying to have a separate tag for original author and then one for supplemental contributors?

That would mean modifying the ablog extension which is something above my skills

@tjburch
Copy link
Contributor

tjburch commented Oct 14, 2021

oof yeah, not worth it. Great as-is then.

@martinacantaro
Copy link

This is not a hard preference, but I would prefer authorship to be at the end of the notebook, and in line with this proposal. I like it better because it has more nuance than displaying the names of everybody who made a contribution, which would put someone who fixed a typo at the same level of someone who created the entire thing.

I think this is useful for readers in cases where they want to know who did the main work for a notebook (for example, if they need to quote the notebook, or if they want to get in touch with the author).

Also, I think for the purposes of documentation it's not as important to display authorship prominently, so I would leave the sidebar for categories and tags.

@OriolAbril
Copy link
Member Author

OriolAbril commented Nov 5, 2021

todos:

  • update the requirements to codeautolink released version, not github
  • add doi link and code to html_config once we have them. There is an issue with the webhook right now and they have not been generated even after my fake releases.
  • (for someone else who knows pre-commit to do) Add a pre-commit check to ensure all notebooks end with the include page_footer directive and if possible add it automatically when missing.
  • with metadata, list of tags and categories... the bottom categories end up hidden. This will be automatically fixed by the next release of the pydata theme so it's a todo that will solve itself alone

@OriolAbril
Copy link
Member Author

OriolAbril commented Nov 5, 2021

Now realized a bit of info on codeautolink is probably in order. It is a sphinx extension that automatically converts the python objects from the libraries configured on intersphinx-mappings to links to their relevant api pages. It is very new and still needs some tweaks, but it is very active and works perfectly well.

Here are some examples form their docs: https://sphinx-codeautolink.readthedocs.io/en/latest/examples.html

@OriolAbril OriolAbril linked an issue Nov 8, 2021 that may be closed by this pull request
@OriolAbril OriolAbril linked an issue Nov 8, 2021 that may be closed by this pull request
@OriolAbril
Copy link
Member Author

Ready to merge and I'll merge this weekend even without any other approving review.

@@ -4,16 +4,12 @@
"cell_type": "markdown",
Copy link
Member

Choose a reason for hiding this comment

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

that are tied togehter at their boundaries
                  ☝

Reply via ReviewNB

Copy link
Member

@michaelosthege michaelosthege left a comment

Choose a reason for hiding this comment

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

Found a typo that was there before.

Also the spline notebook still uses "PyMC3", not sure if you want to change that already.

@OriolAbril
Copy link
Member Author

Also the spline notebook still uses "PyMC3", not sure if you want to change that already.

We'll need to rerun them all with v4, so we can take care of that then. So far I have not updated that anywhere in notebooks, only in readme and templates.

@OriolAbril OriolAbril merged commit f20876a into main Nov 13, 2021
@OriolAbril OriolAbril deleted the appearance branch November 13, 2021 17:00
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