Skip to content

Commit

Permalink
DEP: switch from dtool_lookup_server to dservercore
Browse files Browse the repository at this point in the history
  • Loading branch information
jotelha committed Jun 13, 2024
1 parent 53ee4d2 commit 1bbdb0b
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
run: |
pip install --upgrade build
pip install --upgrade setuptools wheel setuptools-scm[toml] importlib-metadata
pip install git+https://github.com/jic-dtool/dtool-lookup-server.git@master
pip install git+https://github.com/livMatS/dservercore.git@main
pip list
- name: Package distribution
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
mongodb-version: ['4.2', '4.4', '5.0', '6.0']
dtool-lookup-server-version: [master]
dservercore-version: [main]
dserver-search-plugin-mongo-version: [main]
dserver-retrieve-plugin-mongo-version: [main]
dserver-direct-mongo-plugin-version: [main]
Expand All @@ -36,7 +36,7 @@ jobs:
- name: Install server, search and retrieve plugins
run: |
pip install git+https://github.com/jic-dtool/dtool-lookup-server.git@${{ matrix.dtool-lookup-server-version }}
pip install git+https://github.com/livMatS/dservercore.git@${{ matrix.dservercore-version }}
pip install git+https://github.com/livMatS/dserver-search-plugin-mongo.git@${{ matrix.dserver-search-plugin-mongo-version }}
pip install git+https://github.com/livMatS/dserver-retrieve-plugin-mongo.git@${{ matrix.dserver-retrieve-plugin-mongo-version }}
pip install git+https://github.com/livMatS/dserver-direct-mongo-plugin.git@${{ matrix.dserver-direct-mongo-plugin-version }}
Expand Down
10 changes: 5 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ However, if one has to manage more than a hundred datasets it can be helpful
to have the datasets' metadata stored in a central server to enable one to
quickly find datasets of interest.

The `dtool-lookup-server <https://github.com/jic-dtool/dtool-lookup-server>`_
The `dservercore <https://github.com/jic-dtool/dservercore>`_
provides a web API for registering datasets' metadata
and provides functionality to lookup, list and search for datasets.

Expand All @@ -47,7 +47,7 @@ datasets within a specific dependency graph.
Installation
------------

Install the dtool lookup server dependency graph plugin
Install the dserver dependency graph plugin

.. code-block:: bash
Expand Down Expand Up @@ -120,10 +120,10 @@ bash. Enclosing single quotes are not to be part of the actual variable value
when environment variables are configured elsewhere.


The dtool lookup server API
---------------------------
dserver API
-----------

The dtool lookup server makes use of the Authorized header to pass through the
dserver makes use of the Authorized header to pass through the
JSON web token for authorization. Below we create environment variables for the
token and the header used in the ``curl`` commands

Expand Down
6 changes: 3 additions & 3 deletions dserver_dependency_graph_plugin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@

from pymongo import MongoClient

from dtool_lookup_server import AuthenticationError, ExtensionABC
from dtool_lookup_server.sql_models import DatasetSchema
from dtool_lookup_server.utils import _preprocess_privileges
from dservercore import AuthenticationError, ExtensionABC
from dservercore.sql_models import DatasetSchema
from dservercore.utils import _preprocess_privileges
from dserver_direct_mongo_plugin.utils import _dict_to_mongo_query

from .schemas import DependencyKeysSchema
Expand Down
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@ authors = [
dynamic = ["version"]
dependencies = [
"dtoolcore>=3.18.0",
"dtool-lookup-server>0.18.0",
"dservercore>0.20.0",
"dserver-direct-mongo-plugin",
]

[project.optional-dependencies]
test = [
"dtool-lookup-server",
"dservercore",
"dserver-retrieve-plugin-mongo",
"dserver-search-plugin-mongo",
"pytest",
"pytest-cov",
]

[project.urls]
Documentation = "https://dserver-dependency-graph-plugin.readthedocs.io"
Documentation = "https://github.com/livMatS/dserver-dependency-graph-plugin/blob/main/README.rst"
Repository = "https://github.com/livMatS/dserver-dependency-graph-plugin"
Changelog = "https://github.com/livMatS/dserver-dependency-graph-plugin/blob/main/CHANGELOG.rst"

Expand All @@ -39,5 +39,5 @@ write_to = "dserver_dependency_graph_plugin/version.py"
[tool.setuptools]
packages = ["dserver_dependency_graph_plugin"]

[project.entry-points."dtool_lookup_server.extension"]
[project.entry-points."dservercore.extension"]
"DependencyGraphExtension" = "dserver_dependency_graph_plugin:DependencyGraphExtension"
10 changes: 5 additions & 5 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ def random_string(
@pytest.fixture
def tmp_app_with_users(request):
from flask import current_app
from dtool_lookup_server import create_app, sql_db
from dtool_lookup_server.utils import (
from dservercore import create_app, sql_db
from dservercore.utils import (
register_users,
register_base_uri,
register_permissions,
Expand Down Expand Up @@ -222,9 +222,9 @@ def teardown():
@pytest.fixture
def tmp_app_with_dependent_data(request):
from flask import current_app
from dtool_lookup_server.config import Config
from dtool_lookup_server import create_app, sql_db
from dtool_lookup_server.utils import (
from dservercore.config import Config
from dservercore import create_app, sql_db
from dservercore.utils import (
register_users,
register_base_uri,
register_dataset,
Expand Down

0 comments on commit 1bbdb0b

Please sign in to comment.