Skip to content

Commit

Permalink
MAINT: rebrand everything to dserver
Browse files Browse the repository at this point in the history
  • Loading branch information
jotelha committed Feb 13, 2024
1 parent f322ff1 commit e518295
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 36 deletions.
6 changes: 3 additions & 3 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@
master_doc = 'index'

# General information about the project.
project = u"dtool_lookup_client"
project = u"dserver_client"
copyright = u"2018, Tjelvar Olsson"
author = u"Tjelvar Olsson"
repo_name = u"dtool_lookup_client"
repo_name = u"dserver_client"

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down Expand Up @@ -161,6 +161,6 @@
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, repo_name, u'{} Documentation'.format(repo_name),
author, repo_name, u'Dtool plugin for interacting with dtool lookup server',
author, repo_name, u'Dtool plugin for interacting with dserver',
'Miscellaneous'),
]
40 changes: 20 additions & 20 deletions dtool_lookup_client/__init__.py → dserver_client/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""dtool_lookup_client package."""
"""dserver_client package."""

from datetime import date, datetime

Expand Down Expand Up @@ -35,14 +35,14 @@
# if that fails, check for static version file written by setuptools_scm
try:
from .version import version as __version__
logger.debug("Determined version %s from autogenerated dtool_lookup_gui/version.py", __version__)
logger.debug("Determined version %s from autogenerated dserver_client/version.py", __version__)
except:
logger.debug("All efforts to determine version failed.")
__version__ = None


DTOOL_LOOKUP_SERVER_URL_KEY = "DTOOL_LOOKUP_SERVER_URL"
DTOOL_LOOKUP_SERVER_TOKEN_KEY = "DTOOL_LOOKUP_SERVER_TOKEN"
DSERVER_URL_KEY = "DSERVER_URL"
DSERVER_TOKEN_KEY = "DSERVER_TOKEN"


def json_serial(obj):
Expand Down Expand Up @@ -104,39 +104,39 @@ def query(query):

#############################################################################
# Add click group to 'dtool config' with options for configuring connection
# to the dtool lookup server.
# to dserver.
#############################################################################

@dtool_config.cli.config.group()
def lookup_server():
"""Configure dtool lookup server connection."""
"""Configure dserver connection."""


@lookup_server.command()
@click.argument("dtool_lookup_server_url", required=False)
def url(dtool_lookup_server_url):
"""Display / set / update URL for dtool lookup server."""
if dtool_lookup_server_url is None:
@click.argument("dserver_url", required=False)
def url(dserver_url):
"""Display / set / update URL for dserver."""
if dserver_url is None:
click.secho(dtoolcore.utils.get_config_value_from_file(
DTOOL_LOOKUP_SERVER_URL_KEY, default=""
DSERVER_URL_KEY, default=""
))
else:
click.secho(dtoolcore.utils.write_config_value_to_file(
DTOOL_LOOKUP_SERVER_URL_KEY,
dtool_lookup_server_url
DSERVER_URL_KEY,
dserver_url
))


@lookup_server.command()
@click.argument("dtool_lookup_server_token", required=False)
def token(dtool_lookup_server_token):
"""Display / set / update token for dtool lookup server."""
if dtool_lookup_server_token is None:
@click.argument("dserver_token", required=False)
def token(dserver_token):
"""Display / set / update token for dserver."""
if dserver_token is None:
click.secho(dtoolcore.utils.get_config_value_from_file(
DTOOL_LOOKUP_SERVER_TOKEN_KEY, default=""
DSERVER_TOKEN_KEY, default=""
))
else:
click.secho(dtoolcore.utils.write_config_value_to_file(
DTOOL_LOOKUP_SERVER_TOKEN_KEY,
dtool_lookup_server_token
DSERVER_TOKEN_KEY,
dserver_token
))
16 changes: 8 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
from setuptools import setup

url = "https://github.com/IMTEK-Simulation/dtool-lookup-api"
url = "https://github.com/livMatS/dserver-client"
readme = open('README.rst').read()


Expand All @@ -12,17 +12,17 @@ def local_scheme(version):


setup(
name="dtool_lookup_client",
packages=["dtool_lookup_client"],
description="Dtool plugin for interacting with dtool lookup server",
name="dserver_client",
packages=["dserver_client"],
description="Dtool plugin for interacting with dserver",
long_description=readme,
include_package_data=True,
author="Tjelvar Olsson",
author_email="[email protected]",
use_scm_version={
"root": '.',
"relative_to": __file__,
"write_to": os.path.join("dtool_lookup_client", "version.py"),
"write_to": os.path.join("dserver_client", "version.py"),
"local_scheme": local_scheme},
setup_requires=[
'setuptools_scm'
Expand All @@ -40,9 +40,9 @@ def local_scheme(version):
],
entry_points={
"dtool.cli": [
"lookup=dtool_lookup_client:lookup",
"search=dtool_lookup_client:search",
"query=dtool_lookup_client:query",
"lookup=dserver_client:lookup",
"search=dserver_client:search",
"query=dserver_client:query",
],
},
license="MIT"
Expand Down
6 changes: 3 additions & 3 deletions tests/test_dtool_lookup_client_package.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Test the dtool_lookup_client package."""
"""Test the dserver_client package."""


def test_version_is_string():
import dtool_lookup_client
assert isinstance(dtool_lookup_client.__version__, str)
import dserver_client
assert isinstance(dserver_client.__version__, str)
4 changes: 2 additions & 2 deletions tests/test_helper_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def json(self):

def test_uris_from_lookup_response():

from dtool_lookup_client import uris_from_lookup_response
from dserver_client import uris_from_lookup_response

response = [
{
Expand All @@ -37,7 +37,7 @@ def test_uris_from_lookup_response():


def test_urljoin():
from dtool_lookup_client import urljoin
from dserver_client import urljoin

assert urljoin(
"http://localhost:5000",
Expand Down

0 comments on commit e518295

Please sign in to comment.