From fab635f2dae6672c075e2e5de0711895acd62920 Mon Sep 17 00:00:00 2001 From: Martin Larralde <martin.larralde@embl.de> Date: Fri, 22 Jul 2022 11:04:33 +0200 Subject: [PATCH] Add links and documentation to install the package with `conda` --- README.md | 12 +++++++++++- docs/install.rst | 22 +++++++++++----------- pyfastani/__init__.py | 13 +++++++++++++ 3 files changed, 35 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index e18f28a..3e00bbe 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,15 @@ [](https://codecov.io/gh/althonos/pyfastani/) [](https://choosealicense.com/licenses/mit/) [](https://pypi.org/project/pyfastani) +[](https://anaconda.org/bioconda/pyfastani) +[](https://aur.archlinux.org/packages/python-pyfastani) [](https://pypi.org/project/pyfastani/#files) [](https://pypi.org/project/pyfastani/#files) [](https://pypi.org/project/pyfastani/#files) [](https://github.com/althonos/pyfastani/) -[](https://github.com/althonos/pyfastani/issues) +[](https://git.embl.de/larralde/pyfastani/) +[](https://github.com/althonos/pyfastani/issues) +[](https://pyfastani.readthedocs.io) [](https://github.com/althonos/pyfastani/blob/master/CHANGELOG.md) [](https://pepy.tech/project/pyfastani) [](https://doi.org/10.5281/zenodo.4940237) @@ -58,6 +62,12 @@ In the event you have to compile the package from source, all the required libraries are vendored in the source distribution, so you'll only need a C/C++ compiler. +Otherwise, PyFastANI is also available as a [Bioconda](https://pyfastani.github.io/) +package: +```console +$ conda install -c bioconda pyfastani +``` + ## 💡 Example The following snippets show how to compute the ANI between two genomes, diff --git a/docs/install.rst b/docs/install.rst index df5aacb..0398cad 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -22,17 +22,17 @@ one is available, or from source after compiling the Cython code : $ pip install --user pyfastani -.. Conda -.. ^^^^^ -.. -.. `pyfastani` is also available as a `recipe <https://anaconda.org/bioconda/pyfastani>`_ -.. in the `bioconda <https://bioconda.github.io/>`_ channel. To install, simply -.. use the ``conda`` installer: -.. -.. .. code:: console -.. -.. $ conda install -c bioconda pyfastani -.. +Conda +^^^^^ + +`pyfastani` is also available as a `recipe <https://anaconda.org/bioconda/pyfastani>`_ +in the `bioconda <https://bioconda.github.io/>`_ channel. To install, simply +use the ``conda`` installer: + +.. code:: console + + $ conda install -c bioconda pyfastani + Arch User Repository ^^^^^^^^^^^^^^^^^^^^ diff --git a/pyfastani/__init__.py b/pyfastani/__init__.py index 6525c57..b397a4e 100644 --- a/pyfastani/__init__.py +++ b/pyfastani/__init__.py @@ -25,3 +25,16 @@ __all__ = [ "Position", "MAX_KMER_SIZE" ] + +# Small addition to the docstring: we want to show a link redirecting to the +# rendered version of the documentation, but this can only work when Python +# is running with docstrings enabled +if __doc__ is not None: + __doc__ += """See Also: + An online rendered version of the documentation for this version + of the library on + `Read The Docs <https://pytrimal.readthedocs.io/en/v{}/>`_. + + """.format( + __version__ + ) -- GitLab