diff --git a/CHANGELOG.md b/CHANGELOG.md index 58e9a36bf3..23fcb83362 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -45,6 +45,7 @@ - Update gitpod/workspace-base Docker digest to 0f38224 ([#3048](https://github.com/nf-core/tools/pull/3048)) - update output_dir for api docs to new website structure ([#3051](https://github.com/nf-core/tools/pull/3051)) - Update pre-commit hook astral-sh/ruff-pre-commit to v0.5.1 ([#3052](https://github.com/nf-core/tools/pull/3052)) +- update api docs to new structure ([#3054](https://github.com/nf-core/tools/pull/3054)) ## [v2.14.1 - Tantalum Toad - Patch](https://github.com/nf-core/tools/releases/tag/2.14.1) - [2024-05-09] diff --git a/docs/api/_src/_static/css/custom.css b/docs/api/_src/_static/css/custom.css deleted file mode 100644 index e892dd9998..0000000000 --- a/docs/api/_src/_static/css/custom.css +++ /dev/null @@ -1,437 +0,0 @@ -@media (prefers-color-scheme: light) { - a, - a:visited { - color: #246eb9; - } - a:hover, - a:focus, - a:active { - color: #c03221; - } - .wy-nav-side { - background-color: #ededed; - } - .wy-nav-top, - .wy-side-nav-search, - .wy-menu-vertical a:active { - background-color: #32ad65; - } - .wy-menu-vertical a { - color: #343434; - } - .wy-menu-vertical a:hover { - background-color: #abacab85; - } - .wy-menu-vertical header, - .wy-menu-vertical p.caption { - color: #32ad65; - } - - .wy-side-nav-search input[type="text"] { - border: none; - } - - code, - .rst-content code.literal { - background-color: rgba(220, 220, 220, 0.4); - color: #c03221; - border: none; - } - .rst-content .note .admonition-title { - background-color: #72757bfc; - } - - html.writer-html4 .rst-content dl:not(.docutils) > dt, - html.writer-html5 - .rst-content - dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) - > dt { - background-color: #32ad65; - border: none; - } - .rst-content .method > dt > code { - color: #f5f6f7; - } - .rst-content div[class^="highlight"], - .rst-content pre.literal-block { - border: none; - } - .highlight { - background-color: #242424; - color: #e5e6e7; - } - .highlight .hll { - color: #e5e6e7; - background-color: #585b60fc; - } - .highlight .k, - .highlight .nt, - .highlight .no { - color: #246eb9; - } - .highlight .s, - .highlight .s1, - .highlight .s2, - .highlight .na { - color: #32ad65; - } - .highlight .nb, - .highlight .o, - .highlight .cm { - color: #ffbe0b; - } - .highlight .c1 { - color: #88898afc; - } - .highlight .nv, - .py > span { - color: #c03221; - } - .py .sig-param, - .py .sig-paren, - .property .pre { - color: #eef0f2; - } - - .method > .py .sig-param, - .method > .py .sig-paren { - color: #32ad65; - } - .btn.btn-neutral { - background-color: #e5e6e7d4 !important; - } - .rst-content .hint .admonition-title, - .rst-content .hint .wy-alert-title, - .rst-content .important .admonition-title, - .rst-content .important .wy-alert-title, - .rst-content .tip .admonition-title, - .rst-content .tip .wy-alert-title, - .rst-content .wy-alert-success.admonition-todo .admonition-title, - .rst-content .wy-alert-success.admonition-todo .wy-alert-title, - .rst-content .wy-alert-success.admonition .admonition-title, - .rst-content .wy-alert-success.admonition .wy-alert-title, - .rst-content .wy-alert-success.attention .admonition-title, - .rst-content .wy-alert-success.attention .wy-alert-title, - .rst-content .wy-alert-success.caution .admonition-title, - .rst-content .wy-alert-success.caution .wy-alert-title, - .rst-content .wy-alert-success.danger .admonition-title, - .rst-content .wy-alert-success.danger .wy-alert-title, - .rst-content .wy-alert-success.error .admonition-title, - .rst-content .wy-alert-success.error .wy-alert-title, - .rst-content .wy-alert-success.note .admonition-title, - .rst-content .wy-alert-success.note .wy-alert-title, - .rst-content .wy-alert-success.seealso .admonition-title, - .rst-content .wy-alert-success.seealso .wy-alert-title, - .rst-content .wy-alert-success.warning .admonition-title, - .rst-content .wy-alert-success.warning .wy-alert-title, - .rst-content .wy-alert.wy-alert-success .admonition-title, - .wy-alert.wy-alert-success .rst-content .admonition-title, - .wy-alert.wy-alert-success .wy-alert-title { - background-color: #32ad65; - color: #e5e6e7; - } - - .rst-content .note, - .rst-content .seealso, - .rst-content .wy-alert-info.admonition, - .rst-content .wy-alert-info.admonition-todo, - .rst-content .wy-alert-info.attention, - .rst-content .wy-alert-info.caution, - .rst-content .wy-alert-info.danger, - .rst-content .wy-alert-info.error, - .rst-content .wy-alert-info.hint, - .rst-content .wy-alert-info.important, - .rst-content .wy-alert-info.tip, - .rst-content .wy-alert-info.warning, - .wy-alert.wy-alert-info, - .rst-content .hint, - .rst-content .important, - .rst-content .tip, - .rst-content .wy-alert-success.admonition, - .rst-content .wy-alert-success.admonition-todo, - .rst-content .wy-alert-success.attention, - .rst-content .wy-alert-success.caution, - .rst-content .wy-alert-success.danger, - .rst-content .wy-alert-success.error, - .rst-content .wy-alert-success.note, - .rst-content .wy-alert-success.seealso, - .rst-content .wy-alert-success.warning, - .wy-alert.wy-alert-success { - color: #343434; - background-color: #e3e3e3; - border: none; - } - - .rst-content .admonition-todo .admonition-title, - .rst-content .admonition-todo .wy-alert-title, - .rst-content .attention .admonition-title, - .rst-content .attention .wy-alert-title, - .rst-content .caution .admonition-title, - .rst-content .caution .wy-alert-title, - .rst-content .warning .admonition-title, - .rst-content .warning .wy-alert-title, - .rst-content .wy-alert-warning.admonition .admonition-title, - .rst-content .wy-alert-warning.admonition .wy-alert-title, - .rst-content .wy-alert-warning.danger .admonition-title, - .rst-content .wy-alert-warning.danger .wy-alert-title, - .rst-content .wy-alert-warning.error .admonition-title, - .rst-content .wy-alert-warning.error .wy-alert-title, - .rst-content .wy-alert-warning.hint .admonition-title, - .rst-content .wy-alert-warning.hint .wy-alert-title, - .rst-content .seealso .admonition-title, - .rst-content .seealso .wy-alert-title, - .rst-content .wy-alert-warning.important .admonition-title, - .rst-content .wy-alert-warning.important .wy-alert-title, - .rst-content .wy-alert-warning.note .admonition-title, - .rst-content .wy-alert-warning.note .wy-alert-title, - .rst-content .wy-alert-warning.seealso .admonition-title, - .rst-content .wy-alert-warning.seealso .wy-alert-title, - .rst-content .wy-alert-warning.tip .admonition-title, - .rst-content .wy-alert-warning.tip .wy-alert-title, - .rst-content .wy-alert.wy-alert-warning .admonition-title, - .wy-alert.wy-alert-warning .rst-content .admonition-title, - .wy-alert.wy-alert-warning .wy-alert-title { - background-color: #246eb9; - } - .rst-content .admonition-todo, - .rst-content .attention, - .rst-content .caution, - .rst-content .warning, - .rst-content .wy-alert-warning.admonition, - .rst-content .wy-alert-warning.danger, - .rst-content .wy-alert-warning.error, - .rst-content .wy-alert-warning.hint, - .rst-content .wy-alert-warning.important, - .rst-content .wy-alert-warning.note, - .rst-content .wy-alert-warning.seealso, - .rst-content .wy-alert-warning.tip, - .wy-alert.wy-alert-warning { - color: #343434; - background-color: #e3e3e3; - } -} -@media (prefers-color-scheme: dark) { - .wy-nav-content-wrap { - background-color: #181a1b; - } - .wy-nav-top, - .wy-side-nav-search, - .wy-menu-vertical a:active { - background-color: #32ad65; - } - .wy-menu-vertical header, - .wy-menu-vertical p.caption { - color: #32ad65; - } - .wy-nav-side { - background-color: #2e2e2e; - } - .wy-nav-content { - background-color: #343434; - color: #e5e6e7; - } - a, - a:visited { - color: #6fb2e8; - } - a:hover, - a:focus, - a:active { - color: #db9444; - } - code, - .rst-content code.literal { - background-color: rgba(220, 220, 220, 0.1); - color: #db9444; - border: none; - } - .wy-side-nav-search input[type="text"] { - border: none; - background-color: #e5e6e7; - } - .wy-side-nav-search > div.version { - color: #e5e6e7c9; - } - .wy-side-nav-search .wy-dropdown > a, - .wy-side-nav-search > a { - color: #e5e6e7; - } - - html.writer-html4 .rst-content dl:not(.docutils) > dt, - html.writer-html5 - .rst-content - dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) - > dt { - background-color: #32ad65; - border: none; - } - html.writer-html4 .rst-content dl:not(.docutils) dl:not(.field-list) > dt, - html.writer-html5 - .rst-content - dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) - dl:not(.field-list) - > dt { - background-color: #777; - color: #e5e6e7a6; - } - .rst-content code { - color: #e5e6e7d4; - } - .rst-content .method > dt > code { - color: #e5e6e7; - } - .sig-paren { - color: #db9444; - } - .rst-content .note .admonition-title { - background-color: #72757bfc; - } - .rst-content div[class^="highlight"], - .rst-content pre.literal-block { - border: none; - } - - .highlight { - background-color: #242424; - color: #e5e6e7; - } - .highlight .hll { - color: #e5e6e7; - background-color: #585b60fc; - } - .highlight .k, - .highlight .nt, - .highlight .no { - color: #6fb2e8; - } - .highlight .s, - .highlight .s1, - .highlight .s2, - .highlight .na { - color: #32ad65; - } - .highlight .nb, - .highlight .o, - .highlight .cm { - color: #db9444; - } - .highlight .c1 { - color: #88898afc; - } - .highlight .nv { - color: #f9d977; - } - .btn.btn-neutral { - background-color: #e5e6e7d4 !important; - } - - .rst-content .hint .admonition-title, - .rst-content .hint .wy-alert-title, - .rst-content .important .admonition-title, - .rst-content .important .wy-alert-title, - .rst-content .tip .admonition-title, - .rst-content .tip .wy-alert-title, - .rst-content .wy-alert-success.admonition-todo .admonition-title, - .rst-content .wy-alert-success.admonition-todo .wy-alert-title, - .rst-content .wy-alert-success.admonition .admonition-title, - .rst-content .wy-alert-success.admonition .wy-alert-title, - .rst-content .wy-alert-success.attention .admonition-title, - .rst-content .wy-alert-success.attention .wy-alert-title, - .rst-content .wy-alert-success.caution .admonition-title, - .rst-content .wy-alert-success.caution .wy-alert-title, - .rst-content .wy-alert-success.danger .admonition-title, - .rst-content .wy-alert-success.danger .wy-alert-title, - .rst-content .wy-alert-success.error .admonition-title, - .rst-content .wy-alert-success.error .wy-alert-title, - .rst-content .wy-alert-success.note .admonition-title, - .rst-content .wy-alert-success.note .wy-alert-title, - .rst-content .wy-alert-success.seealso .admonition-title, - .rst-content .wy-alert-success.seealso .wy-alert-title, - .rst-content .wy-alert-success.warning .admonition-title, - .rst-content .wy-alert-success.warning .wy-alert-title, - .rst-content .wy-alert.wy-alert-success .admonition-title, - .wy-alert.wy-alert-success .rst-content .admonition-title, - .wy-alert.wy-alert-success .wy-alert-title { - background-color: #32ad65; - color: #e5e6e7; - } - - .rst-content .note, - .rst-content .seealso, - .rst-content .wy-alert-info.admonition, - .rst-content .wy-alert-info.admonition-todo, - .rst-content .wy-alert-info.attention, - .rst-content .wy-alert-info.caution, - .rst-content .wy-alert-info.danger, - .rst-content .wy-alert-info.error, - .rst-content .wy-alert-info.hint, - .rst-content .wy-alert-info.important, - .rst-content .wy-alert-info.tip, - .rst-content .wy-alert-info.warning, - .wy-alert.wy-alert-info, - .rst-content .hint, - .rst-content .important, - .rst-content .tip, - .rst-content .wy-alert-success.admonition, - .rst-content .wy-alert-success.admonition-todo, - .rst-content .wy-alert-success.attention, - .rst-content .wy-alert-success.caution, - .rst-content .wy-alert-success.danger, - .rst-content .wy-alert-success.error, - .rst-content .wy-alert-success.note, - .rst-content .wy-alert-success.seealso, - .rst-content .wy-alert-success.warning, - .wy-alert.wy-alert-success { - color: #343434; - background-color: #e3e3e3; - border: none; - } - - .rst-content .admonition-todo .admonition-title, - .rst-content .admonition-todo .wy-alert-title, - .rst-content .attention .admonition-title, - .rst-content .attention .wy-alert-title, - .rst-content .caution .admonition-title, - .rst-content .caution .wy-alert-title, - .rst-content .warning .admonition-title, - .rst-content .warning .wy-alert-title, - .rst-content .wy-alert-warning.admonition .admonition-title, - .rst-content .wy-alert-warning.admonition .wy-alert-title, - .rst-content .wy-alert-warning.danger .admonition-title, - .rst-content .wy-alert-warning.danger .wy-alert-title, - .rst-content .wy-alert-warning.error .admonition-title, - .rst-content .wy-alert-warning.error .wy-alert-title, - .rst-content .wy-alert-warning.hint .admonition-title, - .rst-content .wy-alert-warning.hint .wy-alert-title, - .rst-content .seealso .admonition-title, - .rst-content .seealso .wy-alert-title, - .rst-content .wy-alert-warning.important .admonition-title, - .rst-content .wy-alert-warning.important .wy-alert-title, - .rst-content .wy-alert-warning.note .admonition-title, - .rst-content .wy-alert-warning.note .wy-alert-title, - .rst-content .wy-alert-warning.seealso .admonition-title, - .rst-content .wy-alert-warning.seealso .wy-alert-title, - .rst-content .wy-alert-warning.tip .admonition-title, - .rst-content .wy-alert-warning.tip .wy-alert-title, - .rst-content .wy-alert.wy-alert-warning .admonition-title, - .wy-alert.wy-alert-warning .rst-content .admonition-title, - .wy-alert.wy-alert-warning .wy-alert-title { - background-color: #f4a25b; - } - .rst-content .admonition-todo, - .rst-content .attention, - .rst-content .caution, - .rst-content .warning, - .rst-content .wy-alert-warning.admonition, - .rst-content .wy-alert-warning.danger, - .rst-content .wy-alert-warning.error, - .rst-content .wy-alert-warning.hint, - .rst-content .wy-alert-warning.important, - .rst-content .wy-alert-warning.note, - .rst-content .wy-alert-warning.seealso, - .rst-content .wy-alert-warning.tip, - .wy-alert.wy-alert-warning { - color: #343434; - background-color: #e3e3e3; - } -} diff --git a/docs/api/_src/_static/js/custom.js b/docs/api/_src/_static/js/custom.js deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/api/_src/_static/nf-core-logo.png b/docs/api/_src/_static/nf-core-logo.png deleted file mode 100644 index 91ddb58d8a..0000000000 Binary files a/docs/api/_src/_static/nf-core-logo.png and /dev/null differ diff --git a/docs/api/_src/_templates/layout.html b/docs/api/_src/_templates/layout.html deleted file mode 100644 index 42341a97c1..0000000000 --- a/docs/api/_src/_templates/layout.html +++ /dev/null @@ -1,4 +0,0 @@ -{% extends '!layout.html' %} {% block header %} - - -{% endblock %} diff --git a/docs/api/_src/api/index.md b/docs/api/_src/api/index.md index a1863f7e39..035a896888 100644 --- a/docs/api/_src/api/index.md +++ b/docs/api/_src/api/index.md @@ -1,8 +1,11 @@ -# API Reference +# nf-core/tools documentation -```{toctree} -:glob: true -:maxdepth: 1 +This API documentation is for the [`nf-core/tools`](https://github.com/nf-core/tools) package. -* -``` +## Contents + +- [Pipeline commands](./pipeline_lint_tests/) (run by `nf-core pipelines lint`) +- [Module commands](./module_lint_tests/) (run by `nf-core modules lint`) +- [Subworkflow commands](./subworkflow_lint_tests/) (run by `nf-core subworkflows lint`) +- [nf-core/tools Python package API reference](./api/) + - [nf-core/tools pipeline commands API referece](./api/pipelines/) diff --git a/docs/api/_src/api/licences.md b/docs/api/_src/api/licences.md deleted file mode 100644 index 95b5f9768b..0000000000 --- a/docs/api/_src/api/licences.md +++ /dev/null @@ -1,9 +0,0 @@ -# nf_core.licences - -```{eval-rst} -.. automodule:: nf_core.licences - :members: - :undoc-members: - :show-inheritance: - :private-members: -``` diff --git a/docs/api/_src/api/modules.md b/docs/api/_src/api/modules.md deleted file mode 100644 index e3f1e39bed..0000000000 --- a/docs/api/_src/api/modules.md +++ /dev/null @@ -1,9 +0,0 @@ -# nf_core.modules - -```{eval-rst} -.. automodule:: nf_core.modules - :members: - :undoc-members: - :show-inheritance: - :private-members: -``` diff --git a/docs/api/_src/api/bump_version.md b/docs/api/_src/api/pipelines/bump_version.md similarity index 72% rename from docs/api/_src/api/bump_version.md rename to docs/api/_src/api/pipelines/bump_version.md index 54c3774408..cd7dc280f6 100644 --- a/docs/api/_src/api/bump_version.md +++ b/docs/api/_src/api/pipelines/bump_version.md @@ -1,7 +1,7 @@ # nf_core.bump_version ```{eval-rst} -.. automodule:: nf_core.bump_version +.. automodule:: nf_core.pipelines.bump_version :members: :undoc-members: :show-inheritance: diff --git a/docs/api/_src/api/create.md b/docs/api/_src/api/pipelines/create.md similarity index 73% rename from docs/api/_src/api/create.md rename to docs/api/_src/api/pipelines/create.md index 5d5f6a62d1..576335e951 100644 --- a/docs/api/_src/api/create.md +++ b/docs/api/_src/api/pipelines/create.md @@ -1,7 +1,7 @@ # nf_core.create ```{eval-rst} -.. automodule:: nf_core.create +.. automodule:: nf_core.pipelines.create :members: :undoc-members: :show-inheritance: diff --git a/docs/api/_src/api/download.md b/docs/api/_src/api/pipelines/download.md similarity index 73% rename from docs/api/_src/api/download.md rename to docs/api/_src/api/pipelines/download.md index 18ab51376e..540fb92c49 100644 --- a/docs/api/_src/api/download.md +++ b/docs/api/_src/api/pipelines/download.md @@ -1,7 +1,7 @@ # nf_core.download ```{eval-rst} -.. automodule:: nf_core.download +.. automodule:: nf_core.pipelines.download :members: :undoc-members: :show-inheritance: diff --git a/docs/api/_src/api/pipelines/index.md b/docs/api/_src/api/pipelines/index.md new file mode 100644 index 0000000000..a1863f7e39 --- /dev/null +++ b/docs/api/_src/api/pipelines/index.md @@ -0,0 +1,8 @@ +# API Reference + +```{toctree} +:glob: true +:maxdepth: 1 + +* +``` diff --git a/docs/api/_src/api/launch.md b/docs/api/_src/api/pipelines/launch.md similarity index 73% rename from docs/api/_src/api/launch.md rename to docs/api/_src/api/pipelines/launch.md index eef777ca87..0f7fc03f64 100644 --- a/docs/api/_src/api/launch.md +++ b/docs/api/_src/api/pipelines/launch.md @@ -1,7 +1,7 @@ # nf_core.launch ```{eval-rst} -.. automodule:: nf_core.launch +.. automodule:: nf_core.pipelines.launch :members: :undoc-members: :show-inheritance: diff --git a/docs/api/_src/api/lint.md b/docs/api/_src/api/pipelines/lint.md similarity index 64% rename from docs/api/_src/api/lint.md rename to docs/api/_src/api/pipelines/lint.md index 1380f7ec7b..aa62c404b8 100644 --- a/docs/api/_src/api/lint.md +++ b/docs/api/_src/api/pipelines/lint.md @@ -1,11 +1,11 @@ # nf_core.lint :::{seealso} -See the [Lint Tests](../pipeline_lint_tests/index.md) docs for information about specific linting functions. +See the [Lint Tests](/docs/nf-core-tools/api_reference/dev/pipeline_lint_tests) docs for information about specific linting functions. ::: ```{eval-rst} -.. automodule:: nf_core.lint +.. automodule:: nf_core.pipelines.lint :members: run_linting :undoc-members: :show-inheritance: diff --git a/docs/api/_src/api/list.md b/docs/api/_src/api/pipelines/list.md similarity index 74% rename from docs/api/_src/api/list.md rename to docs/api/_src/api/pipelines/list.md index 35c819bc56..7df7564544 100644 --- a/docs/api/_src/api/list.md +++ b/docs/api/_src/api/pipelines/list.md @@ -1,7 +1,7 @@ # nf_core.list ```{eval-rst} -.. automodule:: nf_core.list +.. automodule:: nf_core.pipelines.list :members: :undoc-members: :show-inheritance: diff --git a/docs/api/_src/api/params-file.md b/docs/api/_src/api/pipelines/params-file.md similarity index 72% rename from docs/api/_src/api/params-file.md rename to docs/api/_src/api/pipelines/params-file.md index c5bbfc0f1f..06f27cc592 100644 --- a/docs/api/_src/api/params-file.md +++ b/docs/api/_src/api/pipelines/params-file.md @@ -1,7 +1,7 @@ # nf_core.params_file ```{eval-rst} -.. automodule:: nf_core.params_file +.. automodule:: nf_core.pipelines.params_file :members: :undoc-members: :show-inheritance: diff --git a/docs/api/_src/api/schema.md b/docs/api/_src/api/pipelines/schema.md similarity index 73% rename from docs/api/_src/api/schema.md rename to docs/api/_src/api/pipelines/schema.md index a702d28058..c885d9ed23 100644 --- a/docs/api/_src/api/schema.md +++ b/docs/api/_src/api/pipelines/schema.md @@ -1,7 +1,7 @@ # nf_core.schema ```{eval-rst} -.. automodule:: nf_core.schema +.. automodule:: nf_core.pipelines.schema :members: :undoc-members: :show-inheritance: diff --git a/docs/api/_src/api/sync.md b/docs/api/_src/api/pipelines/sync.md similarity index 74% rename from docs/api/_src/api/sync.md rename to docs/api/_src/api/pipelines/sync.md index 8cc02209da..da1f468fe5 100644 --- a/docs/api/_src/api/sync.md +++ b/docs/api/_src/api/pipelines/sync.md @@ -1,7 +1,7 @@ # nf_core.sync ```{eval-rst} -.. automodule:: nf_core.sync +.. automodule:: nf_core.pipelines.sync :members: :undoc-members: :show-inheritance: diff --git a/docs/api/_src/api/utils.md b/docs/api/_src/api/pipelines/utils.md similarity index 74% rename from docs/api/_src/api/utils.md rename to docs/api/_src/api/pipelines/utils.md index 1353f97ef5..86b8c3f36f 100644 --- a/docs/api/_src/api/utils.md +++ b/docs/api/_src/api/pipelines/utils.md @@ -1,7 +1,7 @@ # nf_core.utils ```{eval-rst} -.. automodule:: nf_core.utils +.. automodule:: nf_core.pipelines.utils :members: :undoc-members: :show-inheritance: diff --git a/docs/api/_src/api/subworkflows.md b/docs/api/_src/api/subworkflows.md deleted file mode 100644 index 438ccd0185..0000000000 --- a/docs/api/_src/api/subworkflows.md +++ /dev/null @@ -1,9 +0,0 @@ -# nf_core.subworkflows - -```{eval-rst} -.. automodule:: nf_core.subworkflows - :members: - :undoc-members: - :show-inheritance: - :private-members: -``` diff --git a/docs/api/_src/index.md b/docs/api/_src/index.md index 037ca95475..d81a0e90d4 100644 --- a/docs/api/_src/index.md +++ b/docs/api/_src/index.md @@ -1,22 +1,10 @@ # nf-core/tools documentation -```{toctree} -:caption: 'Contents:' -:glob: true -:hidden: true -:maxdepth: 2 - -pipeline_lint_tests/index.rst -module_lint_tests/index.rst -subworkflow_lint_tests/index.rst -api/index.rst -``` - -This documentation is for the `nf-core/tools` package. +This API documentation is for the [`nf-core/tools`](https://github.com/nf-core/tools) package. ## Contents -- [Pipeline code lint tests](pipeline_lint_tests/index.md) (run by `nf-core pipelines lint`) -- [Module code lint tests](module_lint_tests/index.md) (run by `nf-core modules lint`) -- [Subworkflow code lint tests](subworkflow_lint_tests/index.md) (run by `nf-core subworkflows lint`) -- [nf-core/tools Python package API reference](api/index.md) +- [Pipeline code lint tests](./pipeline_lint_tests/) (run by `nf-core pipelines lint`) +- [Module code lint tests](./module_lint_tests/) (run by `nf-core modules lint`) +- [Subworkflow code lint tests](./subworkflow_lint_tests/) (run by `nf-core subworkflows lint`) +- [nf-core/tools Python package API reference](./api/) diff --git a/docs/api/_src/module_lint_tests/index.md b/docs/api/_src/module_lint_tests/index.md index dee84d06d8..7039ba2598 100644 --- a/docs/api/_src/module_lint_tests/index.md +++ b/docs/api/_src/module_lint_tests/index.md @@ -1,8 +1,11 @@ -# Module lint tests +# Module Lint Tests -```{toctree} -:glob: true -:maxdepth: 1 - -* -``` + - [environment_yml](./environment_yml/) + - [main_nf](./main_nf/) + - [meta_yml](./meta_yml/) + - [module_changes](./module_changes/) + - [module_deprecations](./module_deprecations/) + - [module_patch](./module_patch/) + - [module_tests](./module_tests/) + - [module_todos](./module_todos/) + - [module_version](./module_version/) diff --git a/docs/api/_src/pipeline_lint_tests/actions_awsfulltest.md b/docs/api/_src/pipeline_lint_tests/actions_awsfulltest.md index c0f0aef5a4..4bb47569ac 100644 --- a/docs/api/_src/pipeline_lint_tests/actions_awsfulltest.md +++ b/docs/api/_src/pipeline_lint_tests/actions_awsfulltest.md @@ -1,5 +1,5 @@ # actions_awsfulltest ```{eval-rst} -.. automethod:: nf_core.lint.PipelineLint.actions_awsfulltest +.. automethod:: nf_core.pipelines.lint.PipelineLint.actions_awsfulltest ``` diff --git a/docs/api/_src/pipeline_lint_tests/actions_awstest.md b/docs/api/_src/pipeline_lint_tests/actions_awstest.md index 42441c8ac5..b250571a04 100644 --- a/docs/api/_src/pipeline_lint_tests/actions_awstest.md +++ b/docs/api/_src/pipeline_lint_tests/actions_awstest.md @@ -1,5 +1,5 @@ # actions_awstest ```{eval-rst} -.. automethod:: nf_core.lint.PipelineLint.actions_awstest +.. automethod:: nf_core.pipelines.lint.PipelineLint.actions_awstest ``` diff --git a/docs/api/_src/pipeline_lint_tests/actions_ci.md b/docs/api/_src/pipeline_lint_tests/actions_ci.md index 78ea3aea0d..68cbc089ad 100644 --- a/docs/api/_src/pipeline_lint_tests/actions_ci.md +++ b/docs/api/_src/pipeline_lint_tests/actions_ci.md @@ -1,5 +1,5 @@ # actions_ci ```{eval-rst} -.. automethod:: nf_core.lint.PipelineLint.actions_ci +.. automethod:: nf_core.pipelines.lint.PipelineLint.actions_ci ``` diff --git a/docs/api/_src/pipeline_lint_tests/actions_schema_validation.md b/docs/api/_src/pipeline_lint_tests/actions_schema_validation.md index f0c98eb213..860acb2d2e 100644 --- a/docs/api/_src/pipeline_lint_tests/actions_schema_validation.md +++ b/docs/api/_src/pipeline_lint_tests/actions_schema_validation.md @@ -1,5 +1,5 @@ # actions_schema_validation ```{eval-rst} -.. automethod:: nf_core.lint.PipelineLint.actions_schema_validation +.. automethod:: nf_core.pipelines.lint.PipelineLint.actions_schema_validation ``` diff --git a/docs/api/_src/pipeline_lint_tests/base_config.md b/docs/api/_src/pipeline_lint_tests/base_config.md index 4a56ef9789..803627ced0 100644 --- a/docs/api/_src/pipeline_lint_tests/base_config.md +++ b/docs/api/_src/pipeline_lint_tests/base_config.md @@ -1,5 +1,5 @@ # base_config ```{eval-rst} -.. automethod:: nf_core.lint.PipelineLint.base_config +.. automethod:: nf_core.pipelines.lint.PipelineLint.base_config ``` diff --git a/docs/api/_src/pipeline_lint_tests/files_exist.md b/docs/api/_src/pipeline_lint_tests/files_exist.md index 309ea62f0b..69890d1690 100644 --- a/docs/api/_src/pipeline_lint_tests/files_exist.md +++ b/docs/api/_src/pipeline_lint_tests/files_exist.md @@ -1,5 +1,5 @@ # files_exist ```{eval-rst} -.. automethod:: nf_core.lint.PipelineLint.files_exist +.. automethod:: nf_core.pipelines.lint.PipelineLint.files_exist ``` diff --git a/docs/api/_src/pipeline_lint_tests/files_unchanged.md b/docs/api/_src/pipeline_lint_tests/files_unchanged.md index 2f3b04fe1b..3f626e5b8d 100644 --- a/docs/api/_src/pipeline_lint_tests/files_unchanged.md +++ b/docs/api/_src/pipeline_lint_tests/files_unchanged.md @@ -1,5 +1,5 @@ # files_unchanged ```{eval-rst} -.. automethod:: nf_core.lint.PipelineLint.files_unchanged +.. automethod:: nf_core.pipelines.lint.PipelineLint.files_unchanged ``` diff --git a/docs/api/_src/pipeline_lint_tests/index.md b/docs/api/_src/pipeline_lint_tests/index.md index c631610d64..3575c08db4 100644 --- a/docs/api/_src/pipeline_lint_tests/index.md +++ b/docs/api/_src/pipeline_lint_tests/index.md @@ -1,8 +1,25 @@ -# Pipeline lint tests +# Pipeline Lint Tests -```{toctree} -:glob: true -:maxdepth: 1 - -* -``` + - [actions_awsfulltest](./actions_awsfulltest/) + - [actions_awstest](./actions_awstest/) + - [actions_ci](./actions_ci/) + - [actions_schema_validation](./actions_schema_validation/) + - [base_config](./base_config/) + - [files_exist](./files_exist/) + - [files_unchanged](./files_unchanged/) + - [merge_markers](./merge_markers/) + - [modules_config](./modules_config/) + - [modules_json](./modules_json/) + - [modules_structure](./modules_structure/) + - [multiqc_config](./multiqc_config/) + - [nextflow_config](./nextflow_config/) + - [nfcore_yml](./nfcore_yml/) + - [pipeline_name_conventions](./pipeline_name_conventions/) + - [pipeline_todos](./pipeline_todos/) + - [readme](./readme/) + - [schema_description](./schema_description/) + - [schema_lint](./schema_lint/) + - [schema_params](./schema_params/) + - [system_exit](./system_exit/) + - [template_strings](./template_strings/) + - [version_consistency](./version_consistency/) diff --git a/docs/api/_src/pipeline_lint_tests/merge_markers.md b/docs/api/_src/pipeline_lint_tests/merge_markers.md index b52fdba1a8..7b620b4af1 100644 --- a/docs/api/_src/pipeline_lint_tests/merge_markers.md +++ b/docs/api/_src/pipeline_lint_tests/merge_markers.md @@ -1,5 +1,5 @@ # merge_markers ```{eval-rst} -.. automethod:: nf_core.lint.PipelineLint.merge_markers +.. automethod:: nf_core.pipelines.lint.PipelineLint.merge_markers ``` diff --git a/docs/api/_src/pipeline_lint_tests/modules_config.md b/docs/api/_src/pipeline_lint_tests/modules_config.md index 2a4f51c5a4..c8eac0cf9d 100644 --- a/docs/api/_src/pipeline_lint_tests/modules_config.md +++ b/docs/api/_src/pipeline_lint_tests/modules_config.md @@ -1,5 +1,5 @@ # modules_config ```{eval-rst} -.. automethod:: nf_core.lint.PipelineLint.modules_config +.. automethod:: nf_core.pipelines.lint.PipelineLint.modules_config ``` diff --git a/docs/api/_src/pipeline_lint_tests/modules_json.md b/docs/api/_src/pipeline_lint_tests/modules_json.md index 0c0ba71a8f..3070f83f57 100644 --- a/docs/api/_src/pipeline_lint_tests/modules_json.md +++ b/docs/api/_src/pipeline_lint_tests/modules_json.md @@ -1,5 +1,5 @@ -# nextflow_config +# modules_json ```{eval-rst} -.. automethod:: nf_core.lint.PipelineLint.modules_json +.. automethod:: nf_core.pipelines.lint.PipelineLint.modules_json ``` diff --git a/docs/api/_src/pipeline_lint_tests/modules_structure.md b/docs/api/_src/pipeline_lint_tests/modules_structure.md index faa39ca77f..8a83918857 100644 --- a/docs/api/_src/pipeline_lint_tests/modules_structure.md +++ b/docs/api/_src/pipeline_lint_tests/modules_structure.md @@ -1,5 +1,5 @@ # modules_structure ```{eval-rst} -.. automethod:: nf_core.lint.PipelineLint.modules_structure +.. automethod:: nf_core.pipelines.lint.PipelineLint.modules_structure ``` diff --git a/docs/api/_src/pipeline_lint_tests/multiqc_config.md b/docs/api/_src/pipeline_lint_tests/multiqc_config.md index 311f6b3049..281957749a 100644 --- a/docs/api/_src/pipeline_lint_tests/multiqc_config.md +++ b/docs/api/_src/pipeline_lint_tests/multiqc_config.md @@ -1,5 +1,5 @@ # multiqc_config ```{eval-rst} -.. automethod:: nf_core.lint.PipelineLint.multiqc_config +.. automethod:: nf_core.pipelines.lint.PipelineLint.multiqc_config ``` diff --git a/docs/api/_src/pipeline_lint_tests/nextflow_config.md b/docs/api/_src/pipeline_lint_tests/nextflow_config.md index e23e966143..98e8df2574 100644 --- a/docs/api/_src/pipeline_lint_tests/nextflow_config.md +++ b/docs/api/_src/pipeline_lint_tests/nextflow_config.md @@ -1,5 +1,5 @@ # nextflow_config ```{eval-rst} -.. automethod:: nf_core.lint.PipelineLint.nextflow_config +.. automethod:: nf_core.pipelines.lint.PipelineLint.nextflow_config ``` diff --git a/docs/api/_src/pipeline_lint_tests/nfcore_yml.md b/docs/api/_src/pipeline_lint_tests/nfcore_yml.md index f7e797a29c..226eb4c948 100644 --- a/docs/api/_src/pipeline_lint_tests/nfcore_yml.md +++ b/docs/api/_src/pipeline_lint_tests/nfcore_yml.md @@ -1,5 +1,5 @@ # nfcore_yml ```{eval-rst} -.. automethod:: nf_core.lint.PipelineLint.nfcore_yml +.. automethod:: nf_core.pipelines.lint.PipelineLint.nfcore_yml ``` diff --git a/docs/api/_src/pipeline_lint_tests/pipeline_name_conventions.md b/docs/api/_src/pipeline_lint_tests/pipeline_name_conventions.md index 0034319d3d..09396b6afd 100644 --- a/docs/api/_src/pipeline_lint_tests/pipeline_name_conventions.md +++ b/docs/api/_src/pipeline_lint_tests/pipeline_name_conventions.md @@ -1,5 +1,5 @@ # pipeline_name_conventions ```{eval-rst} -.. automethod:: nf_core.lint.PipelineLint.pipeline_name_conventions +.. automethod:: nf_core.pipelines.lint.PipelineLint.pipeline_name_conventions ``` diff --git a/docs/api/_src/pipeline_lint_tests/pipeline_todos.md b/docs/api/_src/pipeline_lint_tests/pipeline_todos.md index 08e456ea22..8292075b91 100644 --- a/docs/api/_src/pipeline_lint_tests/pipeline_todos.md +++ b/docs/api/_src/pipeline_lint_tests/pipeline_todos.md @@ -1,5 +1,5 @@ # pipeline_todos ```{eval-rst} -.. automethod:: nf_core.lint.PipelineLint.pipeline_todos +.. automethod:: nf_core.pipelines.lint.PipelineLint.pipeline_todos ``` diff --git a/docs/api/_src/pipeline_lint_tests/readme.md b/docs/api/_src/pipeline_lint_tests/readme.md index 9583a56e0a..bf947bb61e 100644 --- a/docs/api/_src/pipeline_lint_tests/readme.md +++ b/docs/api/_src/pipeline_lint_tests/readme.md @@ -1,5 +1,5 @@ # readme ```{eval-rst} -.. automethod:: nf_core.lint.PipelineLint.readme +.. automethod:: nf_core.pipelines.lint.PipelineLint.readme ``` diff --git a/docs/api/_src/pipeline_lint_tests/schema_description.md b/docs/api/_src/pipeline_lint_tests/schema_description.md index 14f756acd2..0429b3cc10 100644 --- a/docs/api/_src/pipeline_lint_tests/schema_description.md +++ b/docs/api/_src/pipeline_lint_tests/schema_description.md @@ -1,5 +1,5 @@ # schema_description ```{eval-rst} -.. automethod:: nf_core.lint.PipelineLint.schema_description +.. automethod:: nf_core.pipelines.lint.PipelineLint.schema_description ``` diff --git a/docs/api/_src/pipeline_lint_tests/schema_lint.md b/docs/api/_src/pipeline_lint_tests/schema_lint.md index 39be2ea65c..95bd5cc2fc 100644 --- a/docs/api/_src/pipeline_lint_tests/schema_lint.md +++ b/docs/api/_src/pipeline_lint_tests/schema_lint.md @@ -1,5 +1,5 @@ # schema_lint ```{eval-rst} -.. automethod:: nf_core.lint.PipelineLint.schema_lint +.. automethod:: nf_core.pipelines.lint.PipelineLint.schema_lint ``` diff --git a/docs/api/_src/pipeline_lint_tests/schema_params.md b/docs/api/_src/pipeline_lint_tests/schema_params.md index 80a626e880..8c6594c57b 100644 --- a/docs/api/_src/pipeline_lint_tests/schema_params.md +++ b/docs/api/_src/pipeline_lint_tests/schema_params.md @@ -1,5 +1,5 @@ # schema_params ```{eval-rst} -.. automethod:: nf_core.lint.PipelineLint.schema_params +.. automethod:: nf_core.pipelines.lint.PipelineLint.schema_params ``` diff --git a/docs/api/_src/pipeline_lint_tests/system_exit.md b/docs/api/_src/pipeline_lint_tests/system_exit.md index 3d0ac20f8d..9ba67d4d2f 100644 --- a/docs/api/_src/pipeline_lint_tests/system_exit.md +++ b/docs/api/_src/pipeline_lint_tests/system_exit.md @@ -1,5 +1,5 @@ # system_exit ```{eval-rst} -.. automethod:: nf_core.lint.PipelineLint.system_exit +.. automethod:: nf_core.pipelines.lint.PipelineLint.system_exit ``` diff --git a/docs/api/_src/pipeline_lint_tests/template_strings.md b/docs/api/_src/pipeline_lint_tests/template_strings.md index 3d03bfb256..ee334a2a21 100644 --- a/docs/api/_src/pipeline_lint_tests/template_strings.md +++ b/docs/api/_src/pipeline_lint_tests/template_strings.md @@ -1,5 +1,5 @@ # template_strings ```{eval-rst} -.. automethod:: nf_core.lint.PipelineLint.template_strings +.. automethod:: nf_core.pipelines.lint.PipelineLint.template_strings ``` diff --git a/docs/api/_src/pipeline_lint_tests/version_consistency.md b/docs/api/_src/pipeline_lint_tests/version_consistency.md index e8038f8531..868a348704 100644 --- a/docs/api/_src/pipeline_lint_tests/version_consistency.md +++ b/docs/api/_src/pipeline_lint_tests/version_consistency.md @@ -1,5 +1,5 @@ # version_consistency ```{eval-rst} -.. automethod:: nf_core.lint.PipelineLint.version_consistency +.. automethod:: nf_core.pipelines.lint.PipelineLint.version_consistency ``` diff --git a/docs/api/_src/subworkflow_lint_tests/index.md b/docs/api/_src/subworkflow_lint_tests/index.md index 0ecf590c0d..da8db49a7b 100644 --- a/docs/api/_src/subworkflow_lint_tests/index.md +++ b/docs/api/_src/subworkflow_lint_tests/index.md @@ -1,8 +1,8 @@ -# Subworkflow lint tests +# Subworkflow Lint Tests -```{toctree} -:glob: true -:maxdepth: 1 - -* -``` + - [main_nf](./main_nf/) + - [meta_yml](./meta_yml/) + - [subworkflow_changes](./subworkflow_changes/) + - [subworkflow_tests](./subworkflow_tests/) + - [subworkflow_todos](./subworkflow_todos/) + - [subworkflow_version](./subworkflow_version/) diff --git a/docs/api/make_lint_md.py b/docs/api/make_lint_md.py index 48393094b3..432f0d16b6 100644 --- a/docs/api/make_lint_md.py +++ b/docs/api/make_lint_md.py @@ -1,53 +1,57 @@ #!/usr/bin/env python - -import fnmatch -import os +from pathlib import Path import nf_core.modules.lint import nf_core.pipelines.lint import nf_core.subworkflows.lint -def make_docs(docs_basedir, lint_tests, md_template): - # Get list of existing .md files - existing_docs = [] - for fn in os.listdir(docs_basedir): - if fnmatch.fnmatch(fn, "*.md") and not fnmatch.fnmatch(fn, "index.md"): - existing_docs.append(os.path.join(docs_basedir, fn)) +def create_docs(docs_basedir, lint_tests, md_template): + docs_basedir.mkdir(parents=True, exist_ok=True) + existing_docs = list(docs_basedir.glob("*.md")) + existing_docs.remove(docs_basedir / "index.md") for test_name in lint_tests: - fn = os.path.join(docs_basedir, f"{test_name}.md") - if os.path.exists(fn): + fn = docs_basedir / f"{test_name}.md" + if fn.exists(): existing_docs.remove(fn) else: with open(fn, "w") as fh: fh.write(md_template.format(test_name)) for fn in existing_docs: - os.remove(fn) + fn.unlink() + + +def create_index_file(basedir, title): + index_file = basedir / "index.md" + with open(index_file, "w") as fh: + fh.write(f"# {title}\n\n") + for fn in sorted(basedir.glob("*.md")): + if fn.name != "index.md": + fh.write(f" - [{fn.stem}](./{fn.stem}/)\n") # Create the pipeline docs -pipeline_docs_basedir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "_src", "pipeline_lint_tests") -make_docs( - pipeline_docs_basedir, +pipeline_lint_docs_basedir = Path(__file__).resolve().parent / "_src" / "pipeline_lint_tests" +create_docs( + pipeline_lint_docs_basedir, nf_core.pipelines.lint.PipelineLint._get_all_lint_tests(True), """# {0} -```{{eval-rst}} -.. automethod:: nf_core.pipelines.lint.PipelineLint.{0} -``` -""", + ```{{eval-rst}} + .. automethod:: nf_core.pipelines.lint.PipelineLint.{0} + ``` + """, ) +create_index_file(pipeline_lint_docs_basedir, "Pipeline Lint Tests") -# Create the modules lint docs -modules_docs_basedir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "_src", "module_lint_tests") -make_docs( - modules_docs_basedir, - list( - set(nf_core.modules.lint.ModuleLint.get_all_module_lint_tests(is_pipeline=True)).union( - nf_core.modules.lint.ModuleLint.get_all_module_lint_tests(is_pipeline=False) - ) +# Create the modules docs +modules_lint_docs_basedir = Path(__file__).resolve().parent / "_src" / "module_lint_tests" +create_docs( + modules_lint_docs_basedir, + set(nf_core.modules.lint.ModuleLint.get_all_module_lint_tests(is_pipeline=True)).union( + nf_core.modules.lint.ModuleLint.get_all_module_lint_tests(is_pipeline=False) ), """# {0} @@ -56,15 +60,14 @@ def make_docs(docs_basedir, lint_tests, md_template): ``` """, ) +create_index_file(modules_lint_docs_basedir, "Module Lint Tests") -# Create the subworkflows lint docs -subworkflows_docs_basedir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "_src", "subworkflow_lint_tests") -make_docs( - subworkflows_docs_basedir, - list( - set(nf_core.subworkflows.lint.SubworkflowLint.get_all_subworkflow_lint_tests(is_pipeline=True)).union( - nf_core.subworkflows.lint.SubworkflowLint.get_all_subworkflow_lint_tests(is_pipeline=False) - ) +# Create the subworkflow docs +subworkflow_lint_docs_basedir = Path(__file__).resolve().parent / "_src" / "subworkflow_lint_tests" +create_docs( + subworkflow_lint_docs_basedir, + set(nf_core.subworkflows.lint.SubworkflowLint.get_all_subworkflow_lint_tests(is_pipeline=True)).union( + nf_core.subworkflows.lint.SubworkflowLint.get_all_subworkflow_lint_tests(is_pipeline=False) ), """# {0} @@ -73,3 +76,4 @@ def make_docs(docs_basedir, lint_tests, md_template): ``` """, ) +create_index_file(subworkflow_lint_docs_basedir, "Subworkflow Lint Tests")