From 090d560a9f20669faee59a6b86a69e85ea171555 Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Thu, 21 Mar 2024 12:03:18 -0400 Subject: [PATCH 1/8] test --- pdf_build_src/process_markdowns.py | 6 +++--- .../genetic-descriptor.md | 16 +++++++++------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/pdf_build_src/process_markdowns.py b/pdf_build_src/process_markdowns.py index 705daa8b22..0a6497d101 100644 --- a/pdf_build_src/process_markdowns.py +++ b/pdf_build_src/process_markdowns.py @@ -684,14 +684,14 @@ def process_macros(duplicated_src_dir_path): # make a copy of the src directory in the current directory copy_src() - # run mkdocs macros embedded in markdown files - process_macros(duplicated_src_dir_path) - # remove mkdocs admonition remove_admonitions( input_folder=duplicated_src_dir_path, output_folder=duplicated_src_dir_path ) + # run mkdocs macros embedded in markdown files + process_macros(duplicated_src_dir_path) + # copy BIDS_logo to images directory of the src_copy directory copy_bids_logo() diff --git a/src/modality-specific-files/genetic-descriptor.md b/src/modality-specific-files/genetic-descriptor.md index 1c1db3732a..781507e0e9 100644 --- a/src/modality-specific-files/genetic-descriptor.md +++ b/src/modality-specific-files/genetic-descriptor.md @@ -29,13 +29,15 @@ file. Datasets linked to a genetic database entry include the following REQUIRED and OPTIONAL keys in the `Genetics` sub-[object][] of `dataset_description.json`: - -{{ MACROS___make_subobject_table("metadata.Genetics") }} +!!! note "THIS IS A TEST" + + + {{ MACROS___make_subobject_table("metadata.Genetics") }} Example: From 8b6c722a846f9d92e2e7e838dc19565799e037be Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Thu, 21 Mar 2024 13:46:52 -0400 Subject: [PATCH 2/8] test without list --- .../genetic-descriptor.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/modality-specific-files/genetic-descriptor.md b/src/modality-specific-files/genetic-descriptor.md index 781507e0e9..5f5f97e20e 100644 --- a/src/modality-specific-files/genetic-descriptor.md +++ b/src/modality-specific-files/genetic-descriptor.md @@ -19,6 +19,8 @@ with details of where to find the genetic data and the type of data available. - [`UK biobank`](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb) +[`UK biobank`](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb) + ## Dataset Description If information on associated genetic data is supplied as part of a BIDS dataset, @@ -29,15 +31,13 @@ file. Datasets linked to a genetic database entry include the following REQUIRED and OPTIONAL keys in the `Genetics` sub-[object][] of `dataset_description.json`: -!!! note "THIS IS A TEST" - - - {{ MACROS___make_subobject_table("metadata.Genetics") }} + +{{ MACROS___make_subobject_table("metadata.Genetics") }} Example: From 157792a1d4b91c1c1aed3f9f540517f2a44a3550 Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Thu, 21 Mar 2024 13:55:49 -0400 Subject: [PATCH 3/8] test test test --- src/modality-specific-files/genetic-descriptor.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/modality-specific-files/genetic-descriptor.md b/src/modality-specific-files/genetic-descriptor.md index 5f5f97e20e..ecbf8956da 100644 --- a/src/modality-specific-files/genetic-descriptor.md +++ b/src/modality-specific-files/genetic-descriptor.md @@ -18,6 +18,7 @@ with details of where to find the genetic data and the type of data available. and can be used for practical guidance when curating a new dataset. - [`UK biobank`](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb) + - [UK biobank](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb) [`UK biobank`](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb) From b1f43a2d8422a2c9f54c5418fb86eef62cf2cf9a Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Thu, 21 Mar 2024 14:25:27 -0400 Subject: [PATCH 4/8] guess what? more tests!!!! --- src/modality-specific-files/genetic-descriptor.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/modality-specific-files/genetic-descriptor.md b/src/modality-specific-files/genetic-descriptor.md index ecbf8956da..ca2e020be3 100644 --- a/src/modality-specific-files/genetic-descriptor.md +++ b/src/modality-specific-files/genetic-descriptor.md @@ -18,8 +18,12 @@ with details of where to find the genetic data and the type of data available. and can be used for practical guidance when curating a new dataset. - [`UK biobank`](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb) + - foo bar [`UK biobank`](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb) - [UK biobank](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb) +- [UK biobank](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb) +- foo bar [UK biobank](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb) + [`UK biobank`](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb) ## Dataset Description From 819c63a269bfae54b17626b02cfc8b4a1aea570f Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Thu, 21 Mar 2024 14:53:11 -0400 Subject: [PATCH 5/8] compare spacing --- src/modality-specific-files/genetic-descriptor.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/modality-specific-files/genetic-descriptor.md b/src/modality-specific-files/genetic-descriptor.md index ca2e020be3..08aafbd59f 100644 --- a/src/modality-specific-files/genetic-descriptor.md +++ b/src/modality-specific-files/genetic-descriptor.md @@ -21,6 +21,10 @@ with details of where to find the genetic data and the type of data available. - foo bar [`UK biobank`](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb) - [UK biobank](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb) +- [`UK biobank`](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb) +- foo bar [`UK biobank`](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb) +- [UK biobank](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb) + - [UK biobank](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb) - foo bar [UK biobank](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb) From 799afe5c021e45d946449787e4dfa2bef5165888 Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Thu, 21 Mar 2024 19:12:23 -0400 Subject: [PATCH 6/8] fix --- pdf_build_src/remove_admonitions.py | 2 +- pdf_build_src/tests/data/expected/README.md | 11 +++++++++++ pdf_build_src/tests/data/input/README.md | 13 +++++++++++++ src/modality-specific-files/genetic-descriptor.md | 1 + 4 files changed, 26 insertions(+), 1 deletion(-) diff --git a/pdf_build_src/remove_admonitions.py b/pdf_build_src/remove_admonitions.py index ddd2b636a1..1942f8b5b0 100644 --- a/pdf_build_src/remove_admonitions.py +++ b/pdf_build_src/remove_admonitions.py @@ -47,7 +47,7 @@ def remove_admonitions( counter += 1 continue - if not line.startswith(indent): + if line != "\n" and not line.startswith(indent): is_admonition = False if is_admonition: diff --git a/pdf_build_src/tests/data/expected/README.md b/pdf_build_src/tests/data/expected/README.md index e719b45f38..37fadc295d 100644 --- a/pdf_build_src/tests/data/expected/README.md +++ b/pdf_build_src/tests/data/expected/README.md @@ -19,3 +19,14 @@ Collapsible admonitions start with 3 questions marks (`???`). Collapsible admonitions that will be shown as expanded start with 3 questions marks and a plus sign (`???+`). + + + +Let's see + +- [`UK biobank`](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb) +- foo bar [`UK biobank`](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb) + +More of the admonition + +And here we resume normal thing. diff --git a/pdf_build_src/tests/data/input/README.md b/pdf_build_src/tests/data/input/README.md index 102f731fc6..cab4817282 100644 --- a/pdf_build_src/tests/data/input/README.md +++ b/pdf_build_src/tests/data/input/README.md @@ -25,3 +25,16 @@ come in different type. In aaddtion of the classical admonitions show above you Collapsible admonitions that will be shown as expanded start with 3 questions marks and a plus sign (`???+`). + + + +!!! example "non ordered list should be handle propeler" + + Let's see + + - [`UK biobank`](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb) + - foo bar [`UK biobank`](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb) + + More of the admonition + +And here we resume normal thing. diff --git a/src/modality-specific-files/genetic-descriptor.md b/src/modality-specific-files/genetic-descriptor.md index 08aafbd59f..9e6b4b793f 100644 --- a/src/modality-specific-files/genetic-descriptor.md +++ b/src/modality-specific-files/genetic-descriptor.md @@ -19,6 +19,7 @@ with details of where to find the genetic data and the type of data available. - [`UK biobank`](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb) - foo bar [`UK biobank`](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb) + - [UK biobank](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb) - [`UK biobank`](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb) From f2ed8f2b97aae051b18d835ed8634fc5c60f6822 Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Thu, 21 Mar 2024 19:22:15 -0400 Subject: [PATCH 7/8] clean up --- src/modality-specific-files/genetic-descriptor.md | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/modality-specific-files/genetic-descriptor.md b/src/modality-specific-files/genetic-descriptor.md index 9e6b4b793f..d178b2eca9 100644 --- a/src/modality-specific-files/genetic-descriptor.md +++ b/src/modality-specific-files/genetic-descriptor.md @@ -18,18 +18,6 @@ with details of where to find the genetic data and the type of data available. and can be used for practical guidance when curating a new dataset. - [`UK biobank`](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb) - - foo bar [`UK biobank`](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb) - - - [UK biobank](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb) - -- [`UK biobank`](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb) -- foo bar [`UK biobank`](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb) -- [UK biobank](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb) - -- [UK biobank](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb) -- foo bar [UK biobank](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb) - -[`UK biobank`](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb) ## Dataset Description From feb535744b4cbaad4d705abf2b9db7bf500e04c6 Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Thu, 21 Mar 2024 19:25:12 -0400 Subject: [PATCH 8/8] reset --- pdf_build_src/process_markdowns.py | 6 +++--- src/modality-specific-files/genetic-descriptor.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pdf_build_src/process_markdowns.py b/pdf_build_src/process_markdowns.py index 0a6497d101..705daa8b22 100644 --- a/pdf_build_src/process_markdowns.py +++ b/pdf_build_src/process_markdowns.py @@ -684,14 +684,14 @@ def process_macros(duplicated_src_dir_path): # make a copy of the src directory in the current directory copy_src() + # run mkdocs macros embedded in markdown files + process_macros(duplicated_src_dir_path) + # remove mkdocs admonition remove_admonitions( input_folder=duplicated_src_dir_path, output_folder=duplicated_src_dir_path ) - # run mkdocs macros embedded in markdown files - process_macros(duplicated_src_dir_path) - # copy BIDS_logo to images directory of the src_copy directory copy_bids_logo() diff --git a/src/modality-specific-files/genetic-descriptor.md b/src/modality-specific-files/genetic-descriptor.md index d178b2eca9..1c1db3732a 100644 --- a/src/modality-specific-files/genetic-descriptor.md +++ b/src/modality-specific-files/genetic-descriptor.md @@ -33,7 +33,7 @@ keys in the `Genetics` sub-[object][] of `dataset_description.json`: The definitions of these fields can be found in src/schema/objects/metadata.yaml and a guide for using macros can be found at -https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md + https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md --> {{ MACROS___make_subobject_table("metadata.Genetics") }}