Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/.readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,19 @@
version: 2

# Set the version of Python and other tools you might need
# Note. pre-build jobs requires dwi_ml to be installed but ok; the python
# install section is launched before the pre-build.
build:
os: ubuntu-22.04
tools:
python: "3.11"

jobs:
pre_build:
- pip install --upgrade pip setuptools wheel
- pip install .
- bash docs/build_automatic_help_docs.sh

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py
Expand Down
31 changes: 31 additions & 0 deletions docs/automatic_doc/index_automatic.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Scripts
=======

.. toctree::
:caption: Scripts (--help)

ae_train_model_help
dwiml_compute_connectivity_matrix_from_blocs_help
dwiml_compute_connectivity_matrix_from_labels_help
dwiml_compute_connectivity_score_help
dwiml_create_hdf5_dataset_help
dwiml_divide_volume_into_blocs_help
dwiml_hdf5_extract_data_help
dwiml_hdf5_print_architecture_help
dwiml_send_value_to_comet_from_log_help
dwiml_send_value_to_comet_manually_help
dwiml_visualize_logs_correlation_help
dwiml_visualize_logs_help
dwiml_visualize_noise_on_streamlines_help
l2t_resume_training_from_checkpoint_help
l2t_track_from_model_help
l2t_train_model_help
l2t_update_deprecated_exp_help
l2t_visualize_loss_help
l2t_visualize_weights_evolution_help
tt_resume_training_from_checkpoint_help
tt_track_from_model_help
tt_train_model_help
tt_update_deprecated_exp_help
tt_visualize_loss_help
tt_visualize_weights_help
50 changes: 50 additions & 0 deletions docs/build_automatic_help_docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/bin/bash

# This generates the automatic pages with the --help
# This is added in

index_page=docs/automatic_doc/index_automatic.rst

# Preparing the toctree
if [ -f $index_page ]
then
rm $index_page
fi
{
echo "Scripts"
echo "======="
echo " "
echo ".. toctree::"
echo " :caption: Scripts (--help)"
echo " "
} > $index_page


for script in src/dwi_ml/cli/*.py;
do
script_name=$(basename $script)
script_name=${script_name%.py}

if [ $script_name != '__init__' ]
then
echo "Preparing help page for script $script_name"

# Prepare help file
outfile="docs/automatic_doc/${script_name}_help.rst"
if [ -f $outfile ]
then
rm $outfile
fi
{
echo $script_name
echo "========================================================="
echo ""
echo ".. code-block:: text"
echo ""
$script_name --help | sed 's/^/ /'
} > $outfile

# Add file to toctree
echo " ${script_name}_help" >> $index_page
fi
done
14 changes: 13 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ Page in this section explain more in details how the code is implemented in pyth
- :ref:`tracking`


.. --------------------Hidden toctree: For developers---------------

.. toctree::
:maxdepth: 3
:caption: Explanations for developers
Expand All @@ -122,4 +124,14 @@ Page in this section explain more in details how the code is implemented in pyth
for_developers/hdf5/advanced_hdf5_organization
for_developers/training/training
for_developers/data_management/index
for_developers/testing/tracking_objects
for_developers/testing/tracking_objects


.. --------------------Hidden toctree: scripts ---------------

.. toctree::
:maxdepth: 2
:caption: Scripts (--help)
:hidden:

automatic_doc/index_automatic.rst
Loading