From 077c145ad5ee72ffa42a67481a0e71cb4ae68eeb Mon Sep 17 00:00:00 2001 From: Roger Dahl Date: Sat, 27 Jul 2019 23:35:48 -0600 Subject: [PATCH] Fix build --- README.md | 3 +- client_cli/src/d1_cli/version.py | 2 +- client_cli/src/setup.py | 6 +-- client_onedrive/src/setup.py | 6 +-- dev_tools/src/d1_dev/setup-all.py | 6 +-- dev_tools/src/setup.py | 2 +- gmn/src/d1_gmn/version.py | 2 +- gmn/src/setup.py | 10 ++--- lib_client/src/d1_client/baseclient_1_1.py | 15 ++----- lib_client/src/setup.py | 4 +- lib_common/src/d1_common/const.py | 2 +- lib_common/src/setup.py | 2 +- lib_csw/src/setup.py | 39 +++++++++---------- lib_scimeta/src/setup.py | 2 +- requirements.txt | 7 ++++ .../test_baseclient_1_1_query_cn_v1.echo | 30 +++++++------- .../test_baseclient_1_1_query_mn_v1.echo | 30 +++++++------- test_utilities/src/setup.py | 4 +- utilities/src/setup.py | 6 +-- 19 files changed, 85 insertions(+), 93 deletions(-) diff --git a/README.md b/README.md index e9c2833cf..ca8aa8857 100644 --- a/README.md +++ b/README.md @@ -363,14 +363,13 @@ Building the release packages from a fresh clone is a simple way of ensuring tha Create a Python venv to use for build and deploy: * The package `setup.py` scripts will run in this venv. -* The venv can be reused indefinitly. +* The venv can be reused indefinitely. $ pyenv virtualenv "x.y.z" venv_build * Where "x.y.z" is one of the versions listed in `pyenv versions`. * Pick a version that is close or the same as the version of Python used for testing on Travis. - Build and publish the packages: * Download current master from GitHub, create binary wheel packages and push the packages to PyPI. diff --git a/client_cli/src/d1_cli/version.py b/client_cli/src/d1_cli/version.py index 52d7d31b6..767da7a34 100644 --- a/client_cli/src/d1_cli/version.py +++ b/client_cli/src/d1_cli/version.py @@ -16,4 +16,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "3.4.6" +__version__ = '3.4.7' diff --git a/client_cli/src/setup.py b/client_cli/src/setup.py index 7176d4822..32662642f 100644 --- a/client_cli/src/setup.py +++ b/client_cli/src/setup.py @@ -26,7 +26,7 @@ def main(): setuptools.setup( name="dataone.cli", - version="3.4.6", + version='3.4.7', description="Command-Line Interface (CLI) for DataONE", author="DataONE Project", author_email="developers@dataone.org", @@ -35,8 +35,8 @@ def main(): packages=setuptools.find_packages(), include_package_data=True, install_requires=[ - "dataone.common >= 3.4.6", - "dataone.libclient >= 3.4.6", + "dataone.common >= 3.4.7", + "dataone.libclient >= 3.4.7", # "requests >= 2.22.0", ], diff --git a/client_onedrive/src/setup.py b/client_onedrive/src/setup.py index 62917c2d7..8041b2efb 100755 --- a/client_onedrive/src/setup.py +++ b/client_onedrive/src/setup.py @@ -27,7 +27,7 @@ def main(): setuptools.setup( name="dataone.onedrive", - version="3.4.6", + version='3.4.7', description="Filesystem access to the DataONE Workspace", author="DataONE Project", author_email="developers@dataone.org", @@ -36,8 +36,8 @@ def main(): packages=setuptools.find_packages(), include_package_data=True, install_requires=[ - "dataone.common >= 3.4.6", - "dataone.libclient >= 3.4.6", + "dataone.common >= 3.4.7", + "dataone.libclient >= 3.4.7", # "fusepy >= 3.0.1", "pyxb >= 1.2.6", diff --git a/dev_tools/src/d1_dev/setup-all.py b/dev_tools/src/d1_dev/setup-all.py index 22e0137e6..735dee712 100755 --- a/dev_tools/src/d1_dev/setup-all.py +++ b/dev_tools/src/d1_dev/setup-all.py @@ -29,8 +29,6 @@ import subprocess import sys -import d1_common.utils.ulog - try: import d1_dev.util except ImportError: @@ -52,10 +50,8 @@ # 'csw', ] - log = logging.getLogger(__name__) -d1_common.utils.ulog.setup(is_debug=True) - +logging.basicConfig(level=logging.DEBUG) def main(): if sys.version_info[0] != 3: diff --git a/dev_tools/src/setup.py b/dev_tools/src/setup.py index 1be6698b2..356a18ae6 100644 --- a/dev_tools/src/setup.py +++ b/dev_tools/src/setup.py @@ -26,7 +26,7 @@ def main(): setuptools.setup( name="dataone.dev", - version="3.4.6", + version='3.4.7', description="DataONE developer tools", author="DataONE Project", author_email="developers@dataone.org", diff --git a/gmn/src/d1_gmn/version.py b/gmn/src/d1_gmn/version.py index 52d7d31b6..767da7a34 100644 --- a/gmn/src/d1_gmn/version.py +++ b/gmn/src/d1_gmn/version.py @@ -16,4 +16,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "3.4.6" +__version__ = '3.4.7' diff --git a/gmn/src/setup.py b/gmn/src/setup.py index d50e131a7..3a4b4675b 100755 --- a/gmn/src/setup.py +++ b/gmn/src/setup.py @@ -28,7 +28,7 @@ def main(): # noinspection PyUnresolvedReferences setuptools.setup( name="dataone.gmn", - version="3.4.6", + version='3.4.7', description="DataONE Generic Member Node (GMN)", author="DataONE Project", author_email="developers@dataone.org", @@ -37,10 +37,10 @@ def main(): packages=setuptools.find_packages(), include_package_data=True, install_requires=[ - "dataone.cli >= 3.4.6", - "dataone.common >= 3.4.6", - "dataone.libclient >= 3.4.6", - "dataone.scimeta >= 3.4.6", + "dataone.cli >= 3.4.7", + "dataone.common >= 3.4.7", + "dataone.libclient >= 3.4.7", + "dataone.scimeta >= 3.4.7", # "django >= 2.2.3", "iso8601 >= 0.1.12", diff --git a/lib_client/src/d1_client/baseclient_1_1.py b/lib_client/src/d1_client/baseclient_1_1.py index 1ea16cbaa..dc5061ebb 100644 --- a/lib_client/src/d1_client/baseclient_1_1.py +++ b/lib_client/src/d1_client/baseclient_1_1.py @@ -101,19 +101,10 @@ def query( response = self.queryResponse( queryEngine, query_str, vendorSpecific, do_post, **kwargs ) - try: + if self._content_type_is_json(response): return self._read_json_response(response) - except d1_common.types.exceptions.DataONEException: - pass - try: - return response.json() - except Exception: - pass - try: - return json.loads(response.text) - except Exception: - pass - return self._read_stream_response(response) + else: + return self._read_stream_response(response) def getQueryEngineDescriptionResponse( self, queryEngine, vendorSpecific=None, **kwargs diff --git a/lib_client/src/setup.py b/lib_client/src/setup.py index e1648b593..aa7f335c9 100644 --- a/lib_client/src/setup.py +++ b/lib_client/src/setup.py @@ -26,7 +26,7 @@ def main(): setuptools.setup( name="dataone.libclient", - version="3.4.6", + version='3.4.7', description="A DataONE client library for Python", author="DataONE Project", author_email="developers@dataone.org", @@ -35,7 +35,7 @@ def main(): packages=setuptools.find_packages(), include_package_data=True, install_requires=[ - "dataone.common >= 3.4.6", + "dataone.common >= 3.4.7", # "pyxb >= 1.2.6", "requests-toolbelt >= 0.9.1", diff --git a/lib_common/src/d1_common/const.py b/lib_common/src/d1_common/const.py index abffe6316..a67e19f3b 100644 --- a/lib_common/src/d1_common/const.py +++ b/lib_common/src/d1_common/const.py @@ -36,7 +36,7 @@ URL_DATAONE_SEARCH = "https://search.dataone.org" # Version of the DataONE Python stack -VERSION = "3.4.6" +VERSION = '3.4.7' # Default number of items in a single page of a multi-page result set DEFAULT_SLICE_SIZE = 100 diff --git a/lib_common/src/setup.py b/lib_common/src/setup.py index 417a9c4c0..cff3c41ae 100644 --- a/lib_common/src/setup.py +++ b/lib_common/src/setup.py @@ -26,7 +26,7 @@ def main(): setuptools.setup( name="dataone.common", - version="3.4.6", + version='3.4.7', description=( "Contains functionality common to projects that interact with " "the DataONE infrastructure via Python" diff --git a/lib_csw/src/setup.py b/lib_csw/src/setup.py index 97a30a21f..82f5ad7b5 100755 --- a/lib_csw/src/setup.py +++ b/lib_csw/src/setup.py @@ -26,34 +26,33 @@ def main(): # noinspection PyUnresolvedReferences setuptools.setup( - name='dataone.csw', - version='3.4.6', - description='DataONE OpenGIS Catalogue Service for the Web (CSW) Harvester', - author='DataONE Project', - author_email='developers@dataone.org', - url='https://github.com/DataONEorg/d1_python', - license='Apache License, Version 2.0', + name="dataone.csw", + version='3.4.7', + description="DataONE OpenGIS Catalogue Service for the Web (CSW) Harvester", + author="DataONE Project", + author_email="developers@dataone.org", + url="https://github.com/DataONEorg/d1_python", + license="Apache License, Version 2.0", packages=setuptools.find_packages(), include_package_data=True, install_requires=[ - "dataone.common >= 3.4.6", - "dataone.libclient >= 3.4.6", - "dataone.scimeta >= 3.4.6", + "dataone.common >= 3.4.7", + "dataone.libclient >= 3.4.7", + "dataone.scimeta >= 3.4.7", # - ], - setup_requires=['setuptools_git >= 1.1'], + setup_requires=["setuptools_git >= 1.1"], classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Intended Audience :: Developers', - 'Topic :: Scientific/Engineering', - 'License :: OSI Approved :: Apache Software License', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "Topic :: Scientific/Engineering", + "License :: OSI Approved :: Apache Software License", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", ], - keywords='DataONE client member-node coordinating-node', + keywords="DataONE client member-node coordinating-node", ) -if __name__ >= '__main__': +if __name__ >= "__main__": sys.exit(main()) diff --git a/lib_scimeta/src/setup.py b/lib_scimeta/src/setup.py index 62c0d51cf..dfb176324 100644 --- a/lib_scimeta/src/setup.py +++ b/lib_scimeta/src/setup.py @@ -26,7 +26,7 @@ def main(): setuptools.setup( name="dataone.scimeta", - version="3.4.6", + version='3.4.7', description="Utilities for processing Science Metadata", author="DataONE Project", author_email="developers@dataone.org", diff --git a/requirements.txt b/requirements.txt index 81320ad75..e8a753049 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,6 +8,7 @@ MarkupSafe==1.1.1 PyJWT==1.7.1 PyXB==1.2.6 Pygments==2.4.2 +Pyment==0.3.3 Pyzotero==1.4.4 Sphinx==2.1.2 Werkzeug==0.15.4 @@ -31,6 +32,7 @@ coverage==4.5.3 coveralls==1.8.1 cryptography==2.7 decorator==4.4.0 +doc8==0.8.0 docopt==0.6.2 docutils==0.14 elementpath==1.1.8 @@ -56,8 +58,10 @@ multidict==4.5.2 packaging==19.0 path-and-address==2.0.1 pathlib==1.0.1 +pbr==5.4.1 pip==19.1.1 pluggy==0.12.0 +pockets==0.7.2 posix-ipc==1.0.4 psutil==5.6.3 psycopg2-binary==2.8.3 @@ -80,12 +84,14 @@ rdflib==4.2.2 requests-toolbelt==0.9.1 requests==2.22.0 responses==0.10.6 +restructuredtext-lint==1.3.0 rply==0.7.7 setuptools==40.6.2 six==1.12.0 smmap2==2.0.5 snowballstemmer==1.9.0 soupsieve==1.9.2 +sphinx-argparse==0.2.5 sphinx-better-theme==0.1.5 sphinxcontrib-applehelp==1.0.1 sphinxcontrib-devhelp==1.0.1 @@ -94,6 +100,7 @@ sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.2 sphinxcontrib-serializinghtml==1.1.3 sqlparse==0.3.0 +stevedore==1.30.1 toml==0.10.0 urllib3==1.24.3 wcwidth==0.1.7 diff --git a/test_utilities/src/d1_test/test_docs/sample/test_baseclient_1_1_query_cn_v1.echo b/test_utilities/src/d1_test/test_docs/sample/test_baseclient_1_1_query_cn_v1.echo index 46d2658fb..4c9705058 100644 --- a/test_utilities/src/d1_test/test_docs/sample/test_baseclient_1_1_query_cn_v1.echo +++ b/test_utilities/src/d1_test/test_docs/sample/test_baseclient_1_1_query_cn_v1.echo @@ -1,18 +1,18 @@ { - "body_base64": null, - "endpoint_str": "query", - "header_dict": { - "Accept": "*/*", - "Accept-Encoding": "gzip, deflate", - "Charset": "utf-8", - "Connection": "keep-alive", - "User-Agent": "DataONE-Python/[VERSION] +http://dataone.org/" + "request": { + "endpoint_str": "query", + "param_list": [ + "Test Query Engine. Tricky Chars: \u0e44\u0e14:@$-_.!*()&=/?", + "Test Query String. Tricky Chars: \u0e44\u0e14:@$-_.!*()&=" + ], + "pyxb_namespace": "http://ns.dataone.org/service/types/v1.1", + "query_dict": {}, + "version_tag": "v1" }, - "param_list": [ - "Test Query Engine. Tricky Chars: \u0e44\u0e14:@$-_.!*()&=/?", - "Test Query String. Tricky Chars: \u0e44\u0e14:@$-_.!*()&=" - ], - "pyxb_namespace": "http://ns.dataone.org/service/types/v1.1", - "query_dict": {}, - "version_tag": "v1" + "wrapper": { + "class_name": "CoordinatingNodeClient_1_2", + "expected_type": null, + "received_303_redirect": false, + "vendor_specific_dict": null + } } \ No newline at end of file diff --git a/test_utilities/src/d1_test/test_docs/sample/test_baseclient_1_1_query_mn_v1.echo b/test_utilities/src/d1_test/test_docs/sample/test_baseclient_1_1_query_mn_v1.echo index 46d2658fb..6d22219ac 100644 --- a/test_utilities/src/d1_test/test_docs/sample/test_baseclient_1_1_query_mn_v1.echo +++ b/test_utilities/src/d1_test/test_docs/sample/test_baseclient_1_1_query_mn_v1.echo @@ -1,18 +1,18 @@ { - "body_base64": null, - "endpoint_str": "query", - "header_dict": { - "Accept": "*/*", - "Accept-Encoding": "gzip, deflate", - "Charset": "utf-8", - "Connection": "keep-alive", - "User-Agent": "DataONE-Python/[VERSION] +http://dataone.org/" + "request": { + "endpoint_str": "query", + "param_list": [ + "Test Query Engine. Tricky Chars: \u0e44\u0e14:@$-_.!*()&=/?", + "Test Query String. Tricky Chars: \u0e44\u0e14:@$-_.!*()&=" + ], + "pyxb_namespace": "http://ns.dataone.org/service/types/v1.1", + "query_dict": {}, + "version_tag": "v1" }, - "param_list": [ - "Test Query Engine. Tricky Chars: \u0e44\u0e14:@$-_.!*()&=/?", - "Test Query String. Tricky Chars: \u0e44\u0e14:@$-_.!*()&=" - ], - "pyxb_namespace": "http://ns.dataone.org/service/types/v1.1", - "query_dict": {}, - "version_tag": "v1" + "wrapper": { + "class_name": "MemberNodeClient_1_2", + "expected_type": null, + "received_303_redirect": false, + "vendor_specific_dict": null + } } \ No newline at end of file diff --git a/test_utilities/src/setup.py b/test_utilities/src/setup.py index 8df496c8b..174cf544c 100644 --- a/test_utilities/src/setup.py +++ b/test_utilities/src/setup.py @@ -26,7 +26,7 @@ def main(): setuptools.setup( name="dataone.test_utilities", - version="3.4.6", + version='3.4.7', description="Utilities for testing DataONE infrastructure components", author="DataONE Project", author_email="developers@dataone.org", @@ -35,7 +35,7 @@ def main(): packages=setuptools.find_packages(), include_package_data=True, install_requires=[ - "dataone.libclient >= 3.4.6", + "dataone.libclient >= 3.4.7", # "coverage >= 4.5.3", "coveralls >= 1.8.1", diff --git a/utilities/src/setup.py b/utilities/src/setup.py index 2f08e56bb..dc7198489 100755 --- a/utilities/src/setup.py +++ b/utilities/src/setup.py @@ -27,7 +27,7 @@ def main(): setuptools.setup( name="dataone.util", - version="3.4.6", + version='3.4.7', description="DataONE Utilities and Examples", author="DataONE Project", author_email="developers@dataone.org", @@ -36,8 +36,8 @@ def main(): packages=setuptools.find_packages(), include_package_data=True, install_requires=[ - "dataone.common >= 3.4.6", - "dataone.libclient >= 3.4.6", + "dataone.common >= 3.4.7", + "dataone.libclient >= 3.4.7", "beautifulsoup4 >= 4.7.1", "aiohttp >= 3.5.4", "requests >= 2.22.0",