diff --git a/docs/source/conf.py b/docs/source/conf.py index 98cc813..be43bb5 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -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 @@ -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'), ] diff --git a/dtool_lookup_client/__init__.py b/dserver_client/__init__.py similarity index 78% rename from dtool_lookup_client/__init__.py rename to dserver_client/__init__.py index 62ff3a7..2ba6fd6 100644 --- a/dtool_lookup_client/__init__.py +++ b/dserver_client/__init__.py @@ -1,4 +1,4 @@ -"""dtool_lookup_client package.""" +"""dserver_client package.""" from datetime import date, datetime @@ -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): @@ -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 )) diff --git a/setup.py b/setup.py index cfb4e10..cff737e 100644 --- a/setup.py +++ b/setup.py @@ -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() @@ -12,9 +12,9 @@ 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", @@ -22,7 +22,7 @@ def local_scheme(version): 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' @@ -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" diff --git a/tests/test_dtool_lookup_client_package.py b/tests/test_dtool_lookup_client_package.py index 4f70576..fbc74b6 100644 --- a/tests/test_dtool_lookup_client_package.py +++ b/tests/test_dtool_lookup_client_package.py @@ -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) diff --git a/tests/test_helper_functions.py b/tests/test_helper_functions.py index a833497..722eb34 100644 --- a/tests/test_helper_functions.py +++ b/tests/test_helper_functions.py @@ -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 = [ { @@ -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",