diff --git a/README.md b/README.md index d022984..b57d10c 100644 --- a/README.md +++ b/README.md @@ -37,12 +37,13 @@ allows us to keep editing the documentation lightweight. ## Building docs locally -Make an environment containing the `bioconda-utils` package. E.g., +Make an environment containing the `bioconda-utils` package and some further build tools. E.g., ```bash mamba create \ - env -n bioconda-docs \ + -n bioconda-docs \ bioconda-utils \ + sphinx sphinx-autodoc-typehints celery \ --channel conda-forge \ --channel bioconda \ --strict-channel-priority @@ -55,11 +56,17 @@ top level of this repo, run: make BIOCONDA_FILTER_RECIPES=10 html SPHINXOPTS="-T -j1" ``` -The output will be found in `build/html`. +This will generate all the main HTML files plus the `README.html` for 10 recipes, with the output in `build/html`. -Note that you can set `BIOCONDA_FILTER_RECIPES` to some other number; omitting -it completely will build *all* recipes' README.html pages which can take -a while. +Note that you can set `BIOCONDA_FILTER_RECIPES` to some other number or to a regex. +For example, you can specify the building of only the `openms-meta` recipe with: + +```bash +make BIOCONDA_FILTER_RECIPES="openms-meta" html SPHINXOPTS="-T -j1" +``` + +And omitting `BIOCONDA_FILTER_RECIPES` completely will build *all* recipes' README.html pages. +This can take a while. ## Points of interest diff --git a/source/_ext/bioconda_sphinx_ext.py b/source/_ext/bioconda_sphinx_ext.py index bd267a5..7f659ad 100644 --- a/source/_ext/bioconda_sphinx_ext.py +++ b/source/_ext/bioconda_sphinx_ext.py @@ -580,7 +580,16 @@ def generate_readme(recipe_basedir, output_dir, folder, repodata, renderer): # Format the README packages = [] - for package in sorted(list(set(recipe.package_names))): + + # Check, whether the recipe has an outputs section. If so, we need to look + # at its contents -- otherwise we only look at the main package name. + outputs_section = recipe.get("outputs", {}) + if outputs_section: + outputs = sorted([o["name"] for o in outputs_section]) + else: + outputs = [ recipe.name ] + + for package in outputs: versions_in_channel = set(repodata.get_package_data(['version', 'build_number'], channels='bioconda', name=package)) sorted_versions = sorted(versions_in_channel, diff --git a/source/index.rst b/source/index.rst index 190d82d..aec861a 100644 --- a/source/index.rst +++ b/source/index.rst @@ -56,6 +56,8 @@ For more options and details see the `pixi documentation `__. .. _`Install pixi`: https://pixi.sh/latest/installation .. _`conda-forge`: https://conda-forge.org/docs/index.html +.. _with-conda: + With Conda ---------- diff --git a/source/templates/package_dashboard.html b/source/templates/package_dashboard.html deleted file mode 100644 index 262d540..0000000 --- a/source/templates/package_dashboard.html +++ /dev/null @@ -1,70 +0,0 @@ -
-
-
- - diff --git a/source/templates/readme.rst_t b/source/templates/readme.rst_t index 9049bff..2c97f44 100644 --- a/source/templates/readme.rst_t +++ b/source/templates/readme.rst_t @@ -78,11 +78,11 @@ {% endif %} - .. rubric:: Installation + .. rubric:: Installation You need a conda-compatible package manager (currently either `micromamba `_, `mamba `_, or `conda `_) - and the Bioconda channel already activated (see :ref:`set-up-channels`). + and the Bioconda channel already activated (see :ref:`with-conda`). While any of above package managers is fine, it is currently recommended to use either micromamba or mamba (see `here `_ for installation instructions). @@ -93,7 +93,7 @@ mamba install {{ package.name }} - and update with:: + and update with:: mamba update {{ package.name }} @@ -108,7 +108,7 @@ docker pull quay.io/biocontainers/{{ package.name }}: - (see `{{package.name}}/tags`_ for valid values for ````) + (see `{{package.name}}/tags`_ for valid values for ````) .. |downloads_{{package.name}}| image:: https://img.shields.io/conda/dn/bioconda/{{package.name}}.svg?style=flat @@ -121,13 +121,97 @@ .. raw:: html - + + +.. rubric:: Download stats + +.. raw:: html + +
+
+
{% endfor %} + .. + Create all the necessary plots for each package by loading all the + correct specs and data. Important points on the place and implementation + of this script block: + 1. It is here, and not in a separate HTML file, as it needs to have the + `package.name` rendered in for each package. + 2. All packages are handled in one `window.onload` function, as multiple + instances of this throughout a (rendered) HTML just overwrite each + other. + + {% if extra.notes %} Notes @@ -141,12 +225,6 @@ Notes {% endif -%} {% endif %} -Download stats ------------------ - -.. raw:: html - :file: ../../templates/package_dashboard.html - Link to this page -----------------