-
Notifications
You must be signed in to change notification settings - Fork 74
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
Syntax highlighting in docs #1768
Conversation
eae572d
to
fd63719
Compare
Codecov ReportBase: 87.77% // Head: 87.79% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #1768 +/- ##
==========================================
+ Coverage 87.77% 87.79% +0.01%
==========================================
Files 95 95
Lines 10162 10149 -13
==========================================
- Hits 8920 8910 -10
+ Misses 1242 1239 -3
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Doc only change does not need a change log entry. The doc changes would appear to user anyway and does not change the actual package functionality. Please remove the change log changes and squash it out. Thanks! |
fd63719
to
72ef2b4
Compare
version conflicts with other packages you may have installed, for example:: | ||
version conflicts with other packages you may have installed, for example: | ||
|
||
.. code-block:: bash |
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 am not sure if this does anything different in GitHub view but I guess it does not hurt.
@@ -70,7 +70,7 @@ Importing data via the API | |||
|
|||
Alternatively, users who work in a coding environment like a Jupyter | |||
notebook can access the Cubeviz helper class API. Using this API, users can | |||
load data into the application through code with the :meth:`~jdaviz.configs.specviz.helper.Specviz.load_spectrum` | |||
load data into the application through code with the :py:meth:`~jdaviz.configs.specviz.helper.Specviz.load_spectrum` |
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.
Don't think :py:
is strictly necessary but I guess it doesn't hurt?
Co-authored-by: P. L. Lim <[email protected]>
Co-authored-by: P. L. Lim <[email protected]>
Co-authored-by: P. L. Lim <[email protected]>
Co-authored-by: P. L. Lim <[email protected]>
Co-authored-by: P. L. Lim <[email protected]>
afd0957
to
6954b5c
Compare
6954b5c
to
8bfa80a
Compare
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.
Almost there... 😸
:alt: Jdaviz logo | ||
:width: 400 | ||
:alt: Jdaviz logo | ||
:align: center |
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 don't think this align has any effect on the GitHub rendering. Should we just remove it?
:align: center |
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.
Interestingly, it does, but not always? This is a feature I've wanted for a long time in GH renders of rst docs, and it works in some repos but not this one... not sure why?
Co-authored-by: P. L. Lim <[email protected]>
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.
LGTM. Thanks!
This PR makes some revisions to the sphinx docs and docstrings. PR outline: (1) improves readability of code blocks, (2) fixes broken internal references within the sphinx docs (in both
.rst
files and several docstrings, and (3) fixes a broken link in the README.Fix #1781
Preview
Preview these changes in this branch's RTD build. Prepare for colorful code 🌈
Details
jdaviz
, I noticed a convention to use::
before a code block in thedocs/*.rst
files. This works fine, but if you replace it with:you get syntax highlighting within the code blocks. This makes the Python blocks a bit easier to read, and distinguishes the Python from bash.
Our narrative docs are just a few characters away from successfully cross-referencing the API documentation for each class and method. I've made revisions in this PR that fix some broken cross-references throughout our documentation.
The link in this section of the README is broken because that docs page doesn't exist anymore. I've changed the link in this PR.
Further/future work
I mentioned in #1767 that there are still several missing docstrings, even if this PR gets merged. We should probably write those, too!
Change log entry
CHANGES.rst
? If you want to avoid merge conflicts,list the proposed change log here for review and add to
CHANGES.rst
before merge. If no, maintainershould add a
no-changelog-entry-needed
label.Checklist for package maintainer(s)
This checklist is meant to remind the package maintainer(s) who will review this pull request of some common things to look for. This list is not exhaustive.
trivial
label.