-
Notifications
You must be signed in to change notification settings - Fork 72
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
Use the Jupyter book sphinx theme instead of RTD #227
Conversation
The theme is a lot nicer and more modern. It has builtin a lot of the hacks we made to the template to add download and edit buttons. A few things to finish: * Check if the google analytics code is inserted * Check links to edit sphinx gallery content
Nice! It looks way cleaner. Does it have a dark mode? 👀 haha
I've served the docs locally and checked that the Google analytics script is loaded in the |
Makes it easier to regenerate without losing the sphinx-gallery build
This is the easiest way to do it. Includes custom styling for the version number
There can be conflicts between the docs requirements and older Python versions. Since we don't want to leave sphinx unpinned to avoid hard to spot regressions in the docs. This way, it's not installed when running tests, only when building the docs
I'm sure they'd love a PR adding that 😉
I kept it since that is one of the few indicators we have of how many people find and use the projects. The download numbers are kind of meaningless with CI and citations are sparse. If we ever go for grant funding, this is a number that should include. The compromise is that we don't gather IP data.
The edit button for sphinx-gallery output is broken since the sources aren't really in the repo. This is something that would best added to the original template rather than us baking our own custom solution. So I'm fine with it being broken for now (nobody ever used those links anyway). What do you think? Other than that, I think this is done. We can start using the new style in the docs now and improving the layout in subsequent PRs. This was surprisingly smooth and not much work at all 🙂 |
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.
I kept it since that is one of the few indicators we have of how many people find and use the projects. The download numbers are kind of meaningless with CI and citations are sparse. If we ever go for grant funding, this is a number that should include. The compromise is that we don't gather IP data.
Ok, I get it. We can discuss this later, but another step we could do is to try to move away from Google Analytics to a more transparent data gathering tool.
The edit button for sphinx-gallery output is broken since the sources aren't really in the repo. This is something that would best added to the original template rather than us baking our own custom solution. So I'm fine with it being broken for now (nobody ever used those links anyway). What do you think?
I agree. If anyone is willing to solve a problem with one of our examples, I expect they would find the Contributing guidelines and open an issue or PR to solve it.
I think this is ready to go. I just left a minor comment related to the copyright notice.
After that, I think this is ready to be merged.
doc/conf.py
Outdated
# Project information | ||
# ----------------------------------------------------------------------------- | ||
project = "Harmonica" | ||
copyright = f"{datetime.date.today().year}, The {project} Developers" |
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.
I think we decided to keep the birth year of the project on the copyright notices, right?
I've been searching for alternatives but couldn't find anything that was free or didn't require setting up our own server. If you find anything, let me know!
Fixed and merging now! |
Same here. That's why I wonder if by saving a few bucks using Google Analytics we are transforming our users data into the way to pay for the service 🙃 |
The theme is a lot nicer and more modern. It has builtin a lot of the hacks we made to the template to add download and edit buttons. We could also do away with most of our custom templating and CSS tweaks. This opens up the possibility for further style improvements in the future (using admonitions, panels, etc).
Notable changes:
index.rst
instead ofconf.py
(this means no icons and different titles but still looks nice)Related to fatiando/maintenance#13
Reminders:
make format
andmake check
to make sure the code follows the style guide.doc/api/index.rst
and the base__init__.py
file for the package.AUTHORS.md
file (if you haven't already) in case you'd like to be listed as an author on the Zenodo archive of the next release.