-
Notifications
You must be signed in to change notification settings - Fork 272
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
Update docs #2373
Merged
Merged
Update docs #2373
Changes from 33 commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
0c13026
Update environment.yml and setup.cfg to latest version of sphinx
aknierim 501f2a9
Moved docs/_static/theme_overrides.css to docs/_static/ctapipe.css
aknierim 135df80
Added logos dark/light
aknierim 11275ed
Updated docs, added version switcher
aknierim c1eef15
Update setup.cfg pydata dependency
aknierim a76a43d
Added sphinx-design
aknierim c60a81e
Update environment.yml and setup.cfg to latest version of sphinx
aknierim 658fb6a
Moved docs/_static/theme_overrides.css to docs/_static/ctapipe.css
aknierim d2a6d54
Added logos dark/light
aknierim b97b531
Updated docs, added version switcher
aknierim 40aab03
Update setup.cfg pydata dependency
aknierim bc9d6d7
Added sphinx-design
aknierim 1050126
Merge branch 'update-docs' of github.com:aknierim/ctapipe into update…
aknierim 07ce4ba
Fixed sphinx warning for ctapipe.compat.StrEnum
aknierim c025fe3
Fixed sphinx warnings for `ctapipe.instrument`
aknierim 2aed4de
Attempt at a temporary workaround
aknierim 8b60b9a
Added ``:noindex:`` option to certain rst files
aknierim f3f6d00
Workarounds for duplicate reference warnings
aknierim 958e5d9
Fix heading issue
aknierim 1618eb1
Not adding to __all__ fixes automodapi warnings
aknierim a99555b
Change back to automodapi, rework docs front page
aknierim 246639f
Ignore unused import warnings
aknierim 3c0223b
Fix isort failing in ctapipe/instrument/camera/__init__.py
aknierim 099f601
Remove html_sidebars option from conf.py
aknierim 57d348f
Fix duplicated reference warning for muon components
maxnoe c0dc668
Fix broken html syntax in Component.__repr_html__
maxnoe 2f16d23
Clear notebook outputs
maxnoe 4f5f051
Fix add_css_file call in docs/conf.py
maxnoe 63b9e63
Fix Tool repr_html and add html escaping
maxnoe beb5fad
Simplify __init__.py
maxnoe 02798cb
Remove version switcher from navbar
aknierim a089c49
Add sidebar to all pages
aknierim 61547d2
Fix for failed CI/lint
aknierim 22d2062
Move content of caution admonition to announcement banner
aknierim 2a6b6ed
Add sphinx conf path to .readthedocs.yml
aknierim 854a84e
Add sidebars again
aknierim c782ba0
Add navbar version switcher
aknierim 05cc382
Fix versions in switcher.json
aknierim File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
from .description import CameraDescription | ||
from .geometry import CameraGeometry, UnknownPixelShapeWarning, PixelShape | ||
from .readout import CameraReadout | ||
from .description import CameraDescription # noqa: F401 | ||
from .geometry import CameraGeometry, PixelShape, UnknownPixelShapeWarning # noqa: F401 | ||
from .readout import CameraReadout # noqa: F401 | ||
|
||
# commented out due to sphinx issue with classes being defined in 3 places | ||
__all__ = [ | ||
"CameraDescription", | ||
"CameraGeometry", | ||
"PixelShape", | ||
"UnknownPixelShapeWarning", | ||
"CameraReadout", | ||
# "CameraDescription", | ||
# "CameraGeometry", | ||
# "PixelShape", | ||
# "UnknownPixelShapeWarning", | ||
# "CameraReadout", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* override table width restrictions */ | ||
@media screen and (min-width: 767px) { | ||
|
||
.wy-table-responsive table td { | ||
/* !important prevents the common CSS stylesheets from overriding | ||
this as on RTD they are loaded after this stylesheet */ | ||
white-space: normal !important; | ||
} | ||
|
||
.wy-table-responsive { | ||
overflow: visible !important; | ||
} | ||
} | ||
|
||
/* sphinx-design */ | ||
.sd-card { | ||
border-radius: 5px; | ||
padding: 30px 10px 20px 10px; | ||
margin: 10px 0px; | ||
} | ||
|
||
.sd-card .sd-card-header .sd-card-text { | ||
margin: 0px; | ||
} | ||
|
||
.sd-card .sd-card-header { | ||
border: none; | ||
text-align: center; | ||
font-size: var(--pst-font-size-h4); | ||
font-weight: bold; | ||
padding: 0.5rem 0rem 0.5rem 0rem; | ||
} | ||
|
||
.sd-card .sd-card-footer { | ||
border: none; | ||
} | ||
|
||
.sd-card .sd-card-footer .sd-card-text { | ||
max-width: 220px; | ||
margin-left: auto; | ||
margin-right: auto; | ||
} | ||
|
||
html[data-theme="dark"] .sd-shadow-sm { | ||
--sd-color-shadow: #6e6e6e; | ||
} | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
* Switched to ``PyData`` theme for docs | ||
* Updated ``Sphinx`` to version 6.2.1 | ||
* Updated front page of docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This is a bit of a waste of space: there is no content in the sidebar for most of the pages
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.
The version switcher is there. We had an alternative version, but that would require manually curating a json file of versions.
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.
Yeah, you're right, but this is currently the only way to get the version switcher from RTD. The way I see it, we currently have three options:
We go back and reimplement the dropdown menu I previously added. This however would mean that we have to add any new version to a JSON file by hand.
We use the flyout menu from RTD, thus making it necessary to have the sidebar on all pages.
We use the flyout menu only on specific pages like the front page and for example the API docs.
I'm not sure which option is the best as I guess all of them have their drawbacks...
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.
Hmm, this works fine in the vodf pages I created.. Not sure how I configured it, but there the switcher is floating on the lower-right corner: https://vodf.readthedocs.io/en/latest/ (and also in the top-bar)
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.
Of course the ethical ads don't appear though
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 tried to figure out why the behaviour is so different from your vodf pages today but couldn't find anything. My only guess would be different behaviour when using
Sphinx 4.5
andPyData 0.10
for the vodf pages versus the ctapipe docs withSphinx 6.2.1
andPyData 0.13.3
...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.
The version switcher in the navbar on the vodf pages is of course the same one that uses the manually curated json file. But the version switcher from RTD is what boggles my mind.
At least from what I gathered from the PyData theme dev docs and an open issue, they are currently working on a way to make the RTD version switcher more customizable, or at least movable from the sidebar. But for the time being it should actually only appear in the primary sidebar (if not hidden) on the left.
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.
Who knows? I can try updating the VODF docs and see if it disappears... You're right that it's not quite the same version.
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.
But we can deal with that in a later PR, for now it's fine.