From db264304d8043ddc7882bf9dff491b8234f1b802 Mon Sep 17 00:00:00 2001 From: Martin Larralde <martin.larralde@embl.de> Date: Mon, 18 Jul 2022 14:23:00 +0200 Subject: [PATCH] Import all public classes to the main `pyfastani` module --- README.md | 18 ++++++++---------- pyfastani/__init__.py | 22 ++++++++++++++++++++-- 2 files changed, 28 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 14c3cad..e18f28a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# ðŸâ©ðŸ§¬ pyFastANI [](https://github.com/althonos/pyfastani/stargazers) +# ðŸâ©ðŸ§¬ PyFastANI [](https://github.com/althonos/pyfastani/stargazers) *[Cython](https://cython.org/) bindings and Python interface to [FastANI](https://github.com/ParBLiSS/FastANI/), a method for fast whole-genome similarity estimation.* @@ -29,9 +29,9 @@ language, that provides bindings to FastANI. It directly interacts with the FastANI internals, which has the following advantages over CLI wrappers: - **simpler compilation**: FastANI requires several additional libraries, - which make compilation of the original binary non-trivial. In pyFastANI, + which make compilation of the original binary non-trivial. In PyFastANI, libraries that were needed for threading or I/O are provided as stubs, - and `Boost::math` headers are vendored so you can build the package without + and `Boost::math` headers are vendored so you can build the package without hassle. Or even better, just install from one of the provided wheels! - **single dependency**: If your software or your analysis pipeline is distributed as a Python package, you can add `pyfastani` as a dependency to @@ -47,15 +47,15 @@ but it should already pack enough features to be used in a standard pipeline.* ## 🔧 Installing -pyFastANI can be installed directly from [PyPI](https://pypi.org/project/pyfastani/), +PyFastANI can be installed directly from [PyPI](https://pypi.org/project/pyfastani/), which hosts some pre-built CPython wheels for x86-64 Unix platforms, as well as the code required to compile from source with Cython: ```console $ pip install pyfastani ``` -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 +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. ## 💡 Example @@ -125,7 +125,7 @@ for hit in hits: ### âš ï¸ Issue Tracker Found a bug ? Have an enhancement request ? Head over to the [GitHub issue -tracker](https://github.com/althonos/pyFastANI/issues) if you need to report +tracker](https://github.com/althonos/pyfastani/issues) if you need to report or ask something. If you are filing in on a bug, please include as much information as you can about the issue, and try to recreate the same bug in a simple, easily reproducible situation. @@ -133,7 +133,7 @@ in a simple, easily reproducible situation. ### ðŸ—ï¸ Contributing Contributions are more than welcome! See -[`CONTRIBUTING.md`](https://github.com/althonos/pyFastANI/blob/master/CONTRIBUTING.md) +[`CONTRIBUTING.md`](https://github.com/althonos/pyfastani/blob/master/CONTRIBUTING.md) for more details. @@ -146,11 +146,9 @@ and is distributed under the terms of the [Apache License 2.0](https://choosealicense.com/licenses/apache-2.0/), unless otherwise specified in vendored sources. See `vendor/FastANI/LICENSE` for more information. - The `cpu_features` code was written by [Guillaume Chatelet](https://github.com/gchatelet) and is distributed under the terms of the [Apache License 2.0](https://choosealicense.com/licenses/apache-2.0/). See `vendor/cpu_features/LICENSE` for more information. - The `Boost::math` headers were written by [Boost Libraries](https://www.boost.org/) contributors and is distributed under the terms of the [Boost Software License](https://choosealicense.com/licenses/bsl-1.0/). See `vendor/boost-math/LICENSE` for more information. diff --git a/pyfastani/__init__.py b/pyfastani/__init__.py index 3b45d5e..6525c57 100644 --- a/pyfastani/__init__.py +++ b/pyfastani/__init__.py @@ -1,9 +1,27 @@ from . import _fastani -from ._fastani import Sketch, Mapper, Hit, MAX_KMER_SIZE +from ._fastani import ( + Sketch, + Mapper, + Hit, + Minimizers, + MinimizerInfo, + MinimizerIndex, + Position, + MAX_KMER_SIZE +) __author__ = "Martin Larralde <martin.larralde@embl.de>" __license__ = "MIT" __version__ = "0.3.0" -__all__ = ["Sketch", "Mapper", "Hit", "MAX_KMER_SIZE"] __doc__ = _fastani.__doc__ +__all__ = [ + "Sketch", + "Mapper", + "Hit", + "Minimizers", + "MinimizerInfo", + "MinimizerIndex", + "Position", + "MAX_KMER_SIZE" +] -- GitLab