From fd5c08c39642029dbcd26bd5fd13d62d25b48ab9 Mon Sep 17 00:00:00 2001 From: gabridele Date: Fri, 17 Jan 2025 13:39:51 +0100 Subject: [PATCH 1/9] attemp docs installation --- docs/installation.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/installation.rst b/docs/installation.rst index b6ebda3bb..85fe03ab4 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -54,6 +54,23 @@ We can accomplish this using the following command: The new schema-based ``bids-validator`` doesn't need to be installed and will be implemented automatically when `cubids validate` is called +.. dropdown:: If there is no Internet connection on compute nodes + + You should run one of these commands below, after installing deno, that downloads the latest version + of the bids-validator in your virtual environment either by installing a lightscript version + (into $HOME/.deno/bin) or by compiling, respectively: + + However, you can also install a lightweight script (into $HOME/.deno/bin): + + .. code-block:: console + + $ deno install -ERN -g -n bids-validator jsr:@bids/validator + + .. code-block:: console + + $ deno compile -ERN -o bids-validator jsr:@bids/validator + + For more information, you can read: https://bids-validator.readthedocs.io/en/latest/user_guide/command-line.html We also recommend using ``CuBIDS`` with the optional ``DataLad`` version control capabilities. We use ``DataLad`` throughout our walkthrough of the CuBIDS Workflow on From 58df89febb91841b3f2f278e18b3068eabfe4fec Mon Sep 17 00:00:00 2001 From: gabridele Date: Fri, 17 Jan 2025 13:51:00 +0100 Subject: [PATCH 2/9] added sphinx_design extension in conf.py to allow dropdown menu rendering --- docs/conf.py | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/conf.py b/docs/conf.py index ae90cf8ce..694607deb 100755 --- a/docs/conf.py +++ b/docs/conf.py @@ -56,6 +56,7 @@ "sphinx_gallery.load_style", "sphinxarg.ext", # argparse extension "sphinxcontrib.bibtex", # bibtex-based bibliographies + "sphinx_design", # for adding in-line badges etc ] # Mock modules in autodoc: From cbf926305927cb262817c154bb17f938496df6dc Mon Sep 17 00:00:00 2001 From: gabridele Date: Fri, 17 Jan 2025 13:53:13 +0100 Subject: [PATCH 3/9] fixed syntax for dropdown menu in installation.rst From 8965342f60903558a5d14fb98eac4544081acbb8 Mon Sep 17 00:00:00 2001 From: gabridele Date: Fri, 17 Jan 2025 14:11:06 +0100 Subject: [PATCH 4/9] edited text in installation internetless case --- .gitignore | 24 +++++++++++++++++++++++- docs/installation.rst | 4 ++-- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 95f82a103..516981eeb 100644 --- a/.gitignore +++ b/.gitignore @@ -136,4 +136,26 @@ data/* .DS_Store notebooks/testdata .vscode/settings.json -notebooks/test1 \ No newline at end of file +notebooks/test1 +docs/generated/cubids.cubids.CuBIDS.rst +docs/generated/cubids.metadata_merge.check_merging_operations.rst +docs/generated/cubids.metadata_merge.get_acq_dictionary.rst +docs/generated/cubids.metadata_merge.group_by_acquisition_sets.rst +docs/generated/cubids.metadata_merge.merge_json_into_json.rst +docs/generated/cubids.metadata_merge.merge_without_overwrite.rst +docs/generated/cubids.validator.build_subject_paths.rst +docs/generated/cubids.validator.build_validator_call.rst +docs/generated/cubids.validator.get_val_dictionary.rst +docs/generated/cubids.validator.parse_validator_output.rst +docs/generated/cubids.validator.run_validator.rst +docs/generated/cubids.workflows.add_nifti_info.rst +docs/generated/cubids.workflows.apply.rst +docs/generated/cubids.workflows.bids_sidecar_merge.rst +docs/generated/cubids.workflows.copy_exemplars.rst +docs/generated/cubids.workflows.datalad_save.rst +docs/generated/cubids.workflows.group.rst +docs/generated/cubids.workflows.print_metadata_fields.rst +docs/generated/cubids.workflows.purge.rst +docs/generated/cubids.workflows.remove_metadata_fields.rst +docs/generated/cubids.workflows.undo.rst +docs/generated/cubids.workflows.validate.rst diff --git a/docs/installation.rst b/docs/installation.rst index 85fe03ab4..31f6f98fc 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -60,11 +60,11 @@ and will be implemented automatically when `cubids validate` is called of the bids-validator in your virtual environment either by installing a lightscript version (into $HOME/.deno/bin) or by compiling, respectively: - However, you can also install a lightweight script (into $HOME/.deno/bin): - .. code-block:: console $ deno install -ERN -g -n bids-validator jsr:@bids/validator + + or: .. code-block:: console From 0b935ef0994984205c351bd973c2d816bbdd3db9 Mon Sep 17 00:00:00 2001 From: gabridele Date: Fri, 17 Jan 2025 14:46:18 +0100 Subject: [PATCH 5/9] Removed redundancies in .gitignore --- .gitignore | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/.gitignore b/.gitignore index 516981eeb..274d6cbbb 100644 --- a/.gitignore +++ b/.gitignore @@ -137,25 +137,4 @@ data/* notebooks/testdata .vscode/settings.json notebooks/test1 -docs/generated/cubids.cubids.CuBIDS.rst -docs/generated/cubids.metadata_merge.check_merging_operations.rst -docs/generated/cubids.metadata_merge.get_acq_dictionary.rst -docs/generated/cubids.metadata_merge.group_by_acquisition_sets.rst -docs/generated/cubids.metadata_merge.merge_json_into_json.rst -docs/generated/cubids.metadata_merge.merge_without_overwrite.rst -docs/generated/cubids.validator.build_subject_paths.rst -docs/generated/cubids.validator.build_validator_call.rst -docs/generated/cubids.validator.get_val_dictionary.rst -docs/generated/cubids.validator.parse_validator_output.rst -docs/generated/cubids.validator.run_validator.rst -docs/generated/cubids.workflows.add_nifti_info.rst -docs/generated/cubids.workflows.apply.rst -docs/generated/cubids.workflows.bids_sidecar_merge.rst -docs/generated/cubids.workflows.copy_exemplars.rst -docs/generated/cubids.workflows.datalad_save.rst -docs/generated/cubids.workflows.group.rst -docs/generated/cubids.workflows.print_metadata_fields.rst -docs/generated/cubids.workflows.purge.rst -docs/generated/cubids.workflows.remove_metadata_fields.rst -docs/generated/cubids.workflows.undo.rst -docs/generated/cubids.workflows.validate.rst +docs/generated From 0c078a8bebd55836a1c381b066288d568efcbb7e Mon Sep 17 00:00:00 2001 From: gabridele Date: Fri, 17 Jan 2025 14:47:59 +0100 Subject: [PATCH 6/9] Added sphinx_design extension requirement in pyproject.toml --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index b90d20326..9fc03edc5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,6 +51,7 @@ doc = [ "sphinx_markdown_tables", "sphinx_rtd_theme", "sphinxcontrib-bibtex", + "sphinx_design", ] tests = [ "codespell", From 7f33416ee53e3cd45098cd38c010a6bd79a7cad4 Mon Sep 17 00:00:00 2001 From: gabridele Date: Fri, 17 Jan 2025 17:36:15 +0100 Subject: [PATCH 7/9] markdown fix in docs/installation.rst Co-authored-by: Taylor Salo --- docs/installation.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/installation.rst b/docs/installation.rst index 31f6f98fc..5a6461627 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -58,7 +58,7 @@ and will be implemented automatically when `cubids validate` is called You should run one of these commands below, after installing deno, that downloads the latest version of the bids-validator in your virtual environment either by installing a lightscript version - (into $HOME/.deno/bin) or by compiling, respectively: + (into ``$HOME/.deno/bin``) or by compiling, respectively: .. code-block:: console From 47785d0aa3c25c5bb285fcb199ad2c3af4dd0e70 Mon Sep 17 00:00:00 2001 From: gabridele Date: Fri, 17 Jan 2025 17:52:22 +0100 Subject: [PATCH 8/9] added more context in the installation for internetless case --- docs/installation.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/installation.rst b/docs/installation.rst index 5a6461627..b8c323e7f 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -56,7 +56,10 @@ and will be implemented automatically when `cubids validate` is called .. dropdown:: If there is no Internet connection on compute nodes - You should run one of these commands below, after installing deno, that downloads the latest version + If your HPC doesn't allow internet access on its compute nodes, it won't be able to run the online + version of the BIDS validator. In that scenario, you need to install the BIDS validator on your HPC + and then point to the installed version in your cubids validate calls. + To do that, you should run one of these commands below, after installing deno, that downloads the latest version of the bids-validator in your virtual environment either by installing a lightscript version (into ``$HOME/.deno/bin``) or by compiling, respectively: From 76e658ede76ee359555b571e533cb6ca45d75adf Mon Sep 17 00:00:00 2001 From: gabridele Date: Fri, 17 Jan 2025 19:24:14 +0100 Subject: [PATCH 9/9] edited info on how to use cubids validate in case of no internet access --- docs/example.rst | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/docs/example.rst b/docs/example.rst index c10d51105..b6370f4be 100644 --- a/docs/example.rst +++ b/docs/example.rst @@ -174,9 +174,6 @@ Since we ran ``cubids add-nifti-info`` with the ``--use-datalad`` flag set, BIDS validation --------------- -The next step in the ``CuBIDS`` workflow is to run BIDS validation -to detect potential curation errors using ``cubids validate``. - .. code-block:: console $ cubids validate BIDS_Dataset_DataLad v0 --sequential @@ -187,6 +184,16 @@ to detect potential curation errors using ``cubids validate``. This can be helpful for identifying heterogeneous elements, but can be slowed down by extremely large datasets. +.. warning:: + For internetless use cases, please see dedicated section of the `Installation page + `_ on how to download a local version + of the validator. + + After that, you will need to add ``--local-validator`` option to the command string above. + +The next step in the ``CuBIDS`` workflow is to run BIDS validation +to detect potential curation errors using ``cubids validate``. + This command produces the following tsv: .. csv-table:: v0_validation.tsv