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

kvs: add rst format to inline docs #6503

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wihobbs
Copy link
Member

@wihobbs wihobbs commented Dec 12, 2024

This might be a problem other places too.

What renders:
image

After this PR:
image

Is this really what we want? RST shoved in our python in-line docs? I'm not sure...

Problem: on the web version of the docs, which are
auto-generated, multiple lines of python appear on
the same line, and are formatted weirdly.

We can add rst format to the inline docs.
Copy link

codecov bot commented Dec 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.62%. Comparing base (8ee6a97) to head (81a9eba).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6503      +/-   ##
==========================================
- Coverage   83.63%   83.62%   -0.02%     
==========================================
  Files         525      525              
  Lines       87682    87682              
==========================================
- Hits        73334    73322      -12     
- Misses      14348    14360      +12     
Files with missing lines Coverage Δ
src/bindings/python/flux/kvs.py 94.94% <ø> (ø)

... and 8 files with indirect coverage changes

@grondo
Copy link
Contributor

grondo commented Dec 12, 2024

Is this really what we want? RST shoved in our python in-line docs? I'm not sure...

it doesn't really bother me.. Does it work if you just use :: (seems like sphinx should default to Python syntax highlighting when auto-doc-ing python docs...

The other solution I've seen is to use inline doctest markers, e.g.

>>> mydir = KVSDir(flux_handle)
>>> print(mydir)

though I guess in that case it should be more of a full example? (e.g. import flux flux_handle = flux.Flux() etc)

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

Successfully merging this pull request may close these issues.

2 participants