From 67c7722d69acfa8f0be34092b401fd0618e28f6a Mon Sep 17 00:00:00 2001 From: jdeschamps <6367888+jdeschamps@users.noreply.github.com> Date: Fri, 8 Nov 2024 12:41:19 +0100 Subject: [PATCH] Fix paths --- .../configuration/convenience_functions.md | 8 ++++---- docs/guides/careamist_api/usage/datasets.md | 2 +- docs/guides/dev_resources/CI.md | 0 docs/guides/dev_resources/tooling.md | 0 docs/guides/lightning_api/training.md | 0 mkdocs.yml | 2 +- scripts/gen_jupyter_nav.py | 13 ++++++++++--- 7 files changed, 16 insertions(+), 9 deletions(-) delete mode 100644 docs/guides/dev_resources/CI.md delete mode 100644 docs/guides/dev_resources/tooling.md delete mode 100644 docs/guides/lightning_api/training.md diff --git a/docs/guides/careamist_api/configuration/convenience_functions.md b/docs/guides/careamist_api/configuration/convenience_functions.md index 072890ec3..a77f9e4ef 100644 --- a/docs/guides/careamist_api/configuration/convenience_functions.md +++ b/docs/guides/careamist_api/configuration/convenience_functions.md @@ -12,8 +12,8 @@ to create configurations with a only few parameters related to the algorithm use want to train. All convenience methods can be found in the `careamics.config` modules. CAREamics -currently supports [Noise2Void](../../algorithms/n2v/index.md) and its variants, -[CARE](../../algorithms/care/index.md) and [Noise2Noise](../../algorithms/n2n/index.md). +currently supports [Noise2Void](../../../algorithms/Noise2Void) and its variants, +[CARE](../../../algorithms/CARE) and [Noise2Noise](../../../algorithms/Noise2Noise). ``` python title="Import convenience functions" --8<-- "careamics-examples/guides/careamist_api/configuration/convenience_functions.py:imports" @@ -278,7 +278,7 @@ variants [N2V2](../../../algorithms/n2v2/) and [structN2V](../../../algorithms/s !!! note "Understanding Noise2Void and its variants" Before deciding which variant to use, and how to modify the parameters, we recommend - to die a little a bit on [how each algorithm works](../../algorithms/index.md)! + to die a little a bit on [how each algorithm works](../../../algorithms/index.md)! ### Noise2Void parameters @@ -325,7 +325,7 @@ StructN2V has two parameters that can be set: ### Using another loss function -As opposed to Noise2Void, [CARE](../../../algorithms/care/) and [Noise2Noise](../../../algorithms/n2n) +As opposed to Noise2Void, [CARE](../../../algorithms/CARE) and [Noise2Noise](../../../algorithms/Noise2Noise) can be trained with different loss functions. This can be set using the `loss` parameter (surprise, surprise!). diff --git a/docs/guides/careamist_api/usage/datasets.md b/docs/guides/careamist_api/usage/datasets.md index df7f0df9e..7662567a5 100644 --- a/docs/guides/careamist_api/usage/datasets.md +++ b/docs/guides/careamist_api/usage/datasets.md @@ -130,7 +130,7 @@ into the network. CAREamics supports the following transforms (see The `Normalize` transform is always applied, and the rest are optional. The exception is -`N2VManipulateModel`, which is only applied when training with N2V (see [Noise2Void](../../../algorithms/n2v/index.md)). +`N2VManipulateModel`, which is only applied when training with N2V (see [Noise2Void](../../../algorithms/Noise2Void)). !!! note "When to turn off transforms?" diff --git a/docs/guides/dev_resources/CI.md b/docs/guides/dev_resources/CI.md deleted file mode 100644 index e69de29bb..000000000 diff --git a/docs/guides/dev_resources/tooling.md b/docs/guides/dev_resources/tooling.md deleted file mode 100644 index e69de29bb..000000000 diff --git a/docs/guides/lightning_api/training.md b/docs/guides/lightning_api/training.md deleted file mode 100644 index e69de29bb..000000000 diff --git a/mkdocs.yml b/mkdocs.yml index a345c8c93..e3bbe45f2 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -33,7 +33,7 @@ nav: - napari plugins: - guides/napari_plugin/index.md - Tutorials: - - guides/turotials/index.md + - guides/tutorials/index.md - Lightning API: - guides/lightning_api/index.md - guides/lightning_api/lightning_module.md diff --git a/scripts/gen_jupyter_nav.py b/scripts/gen_jupyter_nav.py index 223ec016f..1df120a14 100644 --- a/scripts/gen_jupyter_nav.py +++ b/scripts/gen_jupyter_nav.py @@ -51,11 +51,18 @@ def bottom_text() -> str: "[the guide](../../guides/dev_resources/website.md#jupyter-notebook-applications)." ) -def open_section(title: str) -> str: +def open_section(title: str, skip_algo: bool = False) -> str: """Open the tags of a new card grid section.""" + + if skip_algo: + algo = "" + else: + algo = f"For more details on the algorithm, check out its [description](../../algorithms/{title}).\n\n" + + return ( f"# {title}\n\n" - f"For more details on the algorithm, check out its [description](../../algorithms/{title.lower()}).\n\n" + f"{algo}" f"
\n" f"
\n" f"
\n" @@ -217,7 +224,7 @@ class Card: with mkdocs_gen_files.open(index_file, "a") as index_md: # open section - index_md.write(open_section(cat)) + index_md.write(open_section(cat, skip_algo = cat == "Lightning_API")) # write rows count = 0