Skip to content
This repository has been archived by the owner on Dec 20, 2024. It is now read-only.

DOC: Fix cut passages from README in documentation index file #258

Merged
merged 1 commit into from
Dec 8, 2024

Conversation

jhlegarreta
Copy link
Collaborator

@jhlegarreta jhlegarreta commented Nov 27, 2024

Fix cut passages from README in documentation index file: add comments around the flowchart image in the README file and change the start-line and end-line directive pair for the end-before and start-after pair to skip the flowchart image only.

The start-line and end-line directives were making such that relevant passages of the README file providing context for the tool were not being included. Thus the text shown in the documentation index file had some missing parts, and was not making sense.

@jhlegarreta
Copy link
Collaborator Author

jhlegarreta commented Nov 27, 2024

@effigies tagging you here, as I've seen this commit:
f312b43#diff-8d068e8797e88947c320f79e856c3e16a72b730124a8f9d7031e2c4680dfa534

I see that it was intended to avoid showing the picture in the README and locate it through a relative path in the index.rst file. The current version does show both pictures, and Sphinx does not seem to complain:
https://github.com/nipreps/eddymotion/actions/runs/12032435652/job/33544268816

Are you OK including the entire README as-is?

Edit: This is what the current documentation index looks like and what this patch set intends to fix:

Copy link

codecov bot commented Nov 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.24%. Comparing base (f10fc12) to head (e26943b).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #258   +/-   ##
=======================================
  Coverage   66.24%   66.24%           
=======================================
  Files          19       19           
  Lines         942      942           
  Branches      119      119           
=======================================
  Hits          624      624           
  Misses        274      274           
  Partials       44       44           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jhlegarreta
Copy link
Collaborator Author

@effigies sorry to ping you again here. Can you please review this?

@effigies
Copy link
Member

effigies commented Dec 8, 2024

How about for README.rst:

eddymotion/README.rst

Lines 46 to 54 in f10fc12

*Eddymotion* is an open implementation of eddy-current and head-motion correction that builds upon
the work of ``eddy`` and *SHORELine*, while generalizing these methods to multiple acquisition schemes
(single-shell, multi-shell, and diffusion spectrum imaging) using diffusion models available with DIPY [#r5]_.
.. image:: https://raw.githubusercontent.com/nipreps/eddymotion/507fc9bab86696d5330fd6a86c3870968243aea8/docs/_static/eddymotion-flowchart.svg
:alt: The eddymotion flowchart
.. [#r1] S. Ben-Amitay et al., Motion correction and registration of high b-value diffusion weighted images, Magnetic
Resonance in Medicine 67:1694–1702 (2012)

We add comments:

 (single-shell, multi-shell, and diffusion spectrum imaging) using diffusion models available with DIPY [#r5]_.
 
+.. BEGIN FLOWCHART
 
 .. image:: https://raw.githubusercontent.com/nipreps/eddymotion/507fc9bab86696d5330fd6a86c3870968243aea8/docs/_static/eddymotion-flowchart.svg
    :alt: The eddymotion flowchart
 
+.. END FLOWCHART
 
 .. [#r1] S. Ben-Amitay et al., Motion correction and registration of high b-value diffusion weighted images, Magnetic

Then we could instead do:

 .. include:: ../README.rst
-   :end-line: 29
+   :end-before: BEGIN FLOWCHART
 .. include:: ../README.rst
-   :start-line: 34
+   :start-after: END FLOWCHART

See https://docutils.sourceforge.io/docs/ref/rst/directives.html#miscellaneous

@jhlegarreta jhlegarreta force-pushed the FixDocIndexREADMEInclude branch from 82ba295 to 39faa0b Compare December 8, 2024 02:35
@jhlegarreta
Copy link
Collaborator Author

Thanks @effigies. Done in 39faa0b.

README.rst Show resolved Hide resolved
@jhlegarreta jhlegarreta force-pushed the FixDocIndexREADMEInclude branch from 1eeb2bd to 66dc456 Compare December 8, 2024 17:08
Fix cut passages from `README` in documentation index file: add comments
around the flowchart image in the `README` file and change the
`start-line` and `end-line` directive pair for the `end-before` and
`start-after` pair to skip the flowchart image only.

The `start-line` and `end-line` directives were making such that
relevant passages of the `README` file providing context for the
tool were not being included. Thus the text shown in the documentation
index file had some missing parts, and was not making sense.
@jhlegarreta jhlegarreta force-pushed the FixDocIndexREADMEInclude branch from 66dc456 to e26943b Compare December 8, 2024 17:23
@effigies
Copy link
Member

effigies commented Dec 8, 2024

I haven't rendered this. Could you share an updated screenshot?

@jhlegarreta
Copy link
Collaborator Author

eddymotion_index_html

BTW, sorry for having lost your authorship when squashing commits 😔.

@effigies effigies merged commit f0f66ad into nipreps:main Dec 8, 2024
8 checks passed
@jhlegarreta jhlegarreta deleted the FixDocIndexREADMEInclude branch December 8, 2024 18:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants