Metadata-Version: 2.5
Name: dserver-retrieve-plugin-mongo
Version: 0.5.0
Summary: Retrieve plugin for dserver using mongodb
Project-URL: Documentation, https://github.com/jic-dtool/dserver-retrieve-plugin-mongo/blob/main/README.rst
Project-URL: Repository, https://github.com/jic-dtool/dserver-retrieve-plugin-mongo
Project-URL: Changelog, https://github.com/jic-dtool/dserver-retrieve-plugin-mongo/blob/main/CHANGELOG.rst
Author-email: Tjelvar Olsson <tjelvar.olsson@gmail.com>, "Johannes L. Hörmann" <johannes.laurin@gmail.com>
License: MIT
License-File: LICENSE.rst
Requires-Python: >=3.10
Requires-Dist: dservercore>=0.23.0
Requires-Dist: dtoolcore>=3.18.0
Requires-Dist: pymongo
Requires-Dist: pyyaml
Provides-Extra: test
Requires-Dist: dserver-search-plugin-mongo; extra == 'test'
Requires-Dist: dservercore; extra == 'test'
Requires-Dist: pytest; extra == 'test'
Requires-Dist: pytest-cov; extra == 'test'
Description-Content-Type: text/x-rst

dserver Retrieve Plugin Mongo
=============================

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

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

Retrieve plugin for dserver using mongodb

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

.. code-block:: bash

    cd dserver-retrieve-plugin-mongo
    python setup.py install

To configure the connection to the mongo database.

.. code-block:: bash

    export RETRIEVE_MONGO_URI="mongodb://localhost:27017/"
    export RETRIEVE_MONGO_DB="dserver"
    export RETRIEVE_MONGO_COLLECTION="datasets"


Testing
^^^^^^^

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

.. code-block:: bash

    pip install dservercore
    pip install dserver-search-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``.
