Metadata-Version: 2.1
Name: dserver-search-plugin-mongo
Version: 0.3.0
Summary: Search plugin for dserver using mongodb
Author-email: Tjelvar Olsson <tjelvar.olsson@gmail.com>, "Johannes L. Hörmann" <johannes.laurin@gmail.com>
Project-URL: Documentation, https://dserver-search-plugin-mongo.readthedocs.io
Project-URL: Repository, https://github.com/jic-dtool/dserver-search-plugin-mongo
Project-URL: Changelog, https://github.com/jic-dtool/dserver-search-plugin-mongo/blob/main/CHANGELOG.rst
Description-Content-Type: text/x-rst
License-File: LICENSE.rst
Requires-Dist: pymongo
Requires-Dist: dtoolcore>=3.18.0
Requires-Dist: dtool-lookup-server
Provides-Extra: test
Requires-Dist: dtool-lookup-server; extra == "test"
Requires-Dist: dserver-retrieve-plugin-mongo; extra == "test"
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-cov; extra == "test"

dserver Search Plugin Mongo
===========================

.. |dtool| image:: https://github.com/livMatS/dserver-search-plugin-mongo/blob/main/icons/22x22/dtool_logo.png?raw=True
    :height: 20px
    :target: https://github.com/livMatS/dserver-search-plugin-mongo
.. |pypi| image:: https://img.shields.io/pypi/v/dserver-search-plugin-mongo
    :target: https://pypi.org/project/dserver-search-plugin-mongo/
.. |tag| image:: https://img.shields.io/github/v/tag/livMatS/dserver-search-plugin-mongo
    :target: https://github.com/livMatS/dserver-search-plugin-mongo/tags
.. |test| image:: https://img.shields.io/github/actions/workflow/status/livMatS/dserver-search-plugin-mongo/test.yml?branch=main&label=tests
    :target: https://github.com/livMatS/dserver-search-plugin-mongo/actions/workflows/test.yml

|dtool| |pypi| |tag| |test|

Search plugin for *dserver* using mongodb

To install the ``dserver-search-plugin-mongo`` package.

.. code-block:: bash

    cd dserver-search-plugin-mongo
    pip install .

To configure the connection to the mongo database.

.. code-block:: bash

    export SEARCH_MONGO_URI="mongodb://localhost:27017/"
    export SEARCH_MONGO_DB="dserver"
    export SEARCH_MONGO_COLLECTION="datasets"

Testing
^^^^^^^

Testing requires a minimal ``dserver`` installation including a
functional retrieve plugin, i.e.

.. code-block:: bash

    pip install dtool-lookup-server
    pip install dserver-retrieve-plugin-mongo

Installation with the ``[test]`` extension

.. code-block:: bash

    pip install .[test]

installs these essential testing dependencies as well.

Run tests from within repository root with ``pytest``.
