From b74f0c32b79fca89f2de0f477cbe406af16e8691 Mon Sep 17 00:00:00 2001 From: Kyle Burton Date: Fri, 20 Oct 2023 21:36:24 -0500 Subject: [PATCH] Testing version updates --- .gitignore | 14 +- gen3/index.py | 81 +++++++-- poetry.lock | 429 ++++++++++++++++++++++++-------------------- pyproject.toml | 11 +- tests/test_index.py | 49 +++++ 5 files changed, 361 insertions(+), 223 deletions(-) diff --git a/.gitignore b/.gitignore index e530d0750..c2485c19f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ *.DS_Store *.vscode - +.idea # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] @@ -117,9 +117,9 @@ output_manifest.csv .dccache .idea -# Files generated during pytest -input.csv -test_combined_discovery_metadata.tsv -test_combined_discovery_metadata_exact_match.tsv -tmp_output_file.csv -tmp_output_file_info.csv +# pytest output +/input.csv +/test_combined_discovery_metadata.tsv +/test_combined_discovery_metadata_exact_match.tsv +/tmp_output_file.csv +/tmp_output_file_info.csv diff --git a/gen3/index.py b/gen3/index.py index cdafa6355..cfb390077 100755 --- a/gen3/index.py +++ b/gen3/index.py @@ -395,6 +395,9 @@ def create_record( urls_metadata=None, version=None, authz=None, + description=None, + content_created_date=None, + content_updated_date=None, ): """ @@ -413,24 +416,42 @@ def create_record( urls_metadata (dict): metadata attached to each url baseid (str): optional baseid to group with previous entries versions version (str): entry version string + description (str): optional description of the object + content_created_date (datetime): optional creation date and time of the content being indexed + content_updated_date (datetime): optional update date and time of the content being indexed Returns: Document: json representation of an entry in indexd """ - rec = self.client.create( - hashes, - size, - did, - urls, - file_name, - metadata, - baseid, - acl, - urls_metadata, - version, - authz, + if urls is None: + urls = [] + json = { + "urls": urls, + "form": "object", + "hashes": hashes, + "size": size, + "file_name": file_name, + "metadata": metadata, + "urls_metadata": urls_metadata, + "baseid": baseid, + "acl": acl, + "authz": authz, + "version": version, + "description": description, + "content_created_date": content_created_date, + "content_updated_date": content_updated_date, + } + if did: + json["did"] = did + resp = self.client._post( + "index/", + headers={"content-type": "application/json"}, + data=client.json_dumps(json), + auth=self.client.auth, ) - return rec.to_json() + raise_for_status_and_print_error(resp) + + return resp.json() @backoff.on_exception(backoff.expo, Exception, **DEFAULT_BACKOFF_SETTINGS) async def async_create_record( @@ -447,6 +468,9 @@ async def async_create_record( version=None, authz=None, _ssl=None, + description=None, + content_created_date=None, + content_updated_date=None, ): """ Asynchronous function to create a record in indexd. @@ -464,6 +488,9 @@ async def async_create_record( urls_metadata (dict): metadata attached to each url baseid (str): optional baseid to group with previous entries versions version (str): entry version string + description (str): optional description of the object + content_created_date (datetime): optional creation date and time of the content being indexed + content_updated_date (datetime): optional update date and time of the content being indexed Returns: Document: json representation of an entry in indexd @@ -494,7 +521,12 @@ async def async_create_record( json["version"] = version if authz: json["authz"] = authz - + if description: + json["description"] = description + if content_created_date: + json["content_created_date"] = content_created_date + if content_updated_date: + json["content_updated_date"] = content_updated_date # aiohttp only allows basic auth with their built in auth, so we # need to manually add JWT auth header headers = {"Authorization": self.client.auth._get_auth_value()} @@ -550,6 +582,9 @@ def create_new_version( urls_metadata=None, version=None, authz=None, + description=None, + content_created_date=None, + content_updated_date=None, ): """ @@ -573,6 +608,9 @@ def create_new_version( urls_metadata (dict): metadata attached to each url version (str): entry version string authz (str): RBAC string + description (str): optional description of the object + content_created_date (datetime): optional creation date and time of the content being indexed + content_updated_date (datetime): optional update date and time of the content being indexed body: json/dictionary format - Metadata object that needs to be added to the store. @@ -594,6 +632,9 @@ def create_new_version( "acl": acl, "authz": authz, "version": version, + "description": description, + "content_created_date": content_created_date, + "content_updated_date": content_updated_date, } if did: json["did"] = did @@ -684,6 +725,9 @@ def update_record( acl=None, authz=None, urls_metadata=None, + description=None, + content_created_date=None, + content_updated_date=None, ): """ @@ -705,6 +749,9 @@ def update_record( "acl": acl, "authz": authz, "urls_metadata": urls_metadata, + "description": description, + "content_created_date": content_created_date, + "content_updated_date": content_updated_date, } rec = self.client.get(guid) for k, v in updatable_attrs.items(): @@ -725,6 +772,9 @@ async def async_update_record( authz=None, urls_metadata=None, _ssl=None, + description=None, + content_created_date=None, + content_updated_date=None, **kwargs, ): """ @@ -746,6 +796,9 @@ async def async_update_record( "acl": acl, "authz": authz, "urls_metadata": urls_metadata, + "description": description, + "content_created_date": content_created_date, + "content_updated_date": content_updated_date, } record = await self.async_get_record(guid) revision = record.get("rev") diff --git a/poetry.lock b/poetry.lock index 26b272529..25a377edb 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,10 +1,9 @@ -# This file is automatically @generated by Poetry 1.4.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand. [[package]] name = "aiofiles" version = "0.8.0" description = "File support for asyncio." -category = "main" optional = false python-versions = ">=3.6,<4.0" files = [ @@ -16,7 +15,6 @@ files = [ name = "aiohttp" version = "3.8.6" description = "Async http client/server framework (asyncio)" -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -125,7 +123,6 @@ speedups = ["Brotli", "aiodns", "cchardet"] name = "aiosignal" version = "1.3.1" description = "aiosignal: a list of registered asynchronous callbacks" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -136,11 +133,29 @@ files = [ [package.dependencies] frozenlist = ">=1.1.0" +[[package]] +name = "alembic" +version = "1.12.0" +description = "A database migration tool for SQLAlchemy." +optional = false +python-versions = ">=3.7" +files = [ + {file = "alembic-1.12.0-py3-none-any.whl", hash = "sha256:03226222f1cf943deee6c85d9464261a6c710cd19b4fe867a3ad1f25afda610f"}, + {file = "alembic-1.12.0.tar.gz", hash = "sha256:8e7645c32e4f200675e69f0745415335eb59a3663f5feb487abfa0b30c45888b"}, +] + +[package.dependencies] +Mako = "*" +SQLAlchemy = ">=1.3.0" +typing-extensions = ">=4" + +[package.extras] +tz = ["python-dateutil"] + [[package]] name = "anyio" version = "4.0.0" description = "High level compatibility layer for multiple asynchronous event loop implementations" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -162,7 +177,6 @@ trio = ["trio (>=0.22)"] name = "async-timeout" version = "4.0.3" description = "Timeout context manager for asyncio programs" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -174,7 +188,6 @@ files = [ name = "asyncio" version = "3.4.3" description = "reference implementation of PEP 3156" -category = "main" optional = false python-versions = "*" files = [ @@ -188,7 +201,6 @@ files = [ name = "atomicwrites" version = "1.4.1" description = "Atomic file writes." -category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ @@ -199,7 +211,6 @@ files = [ name = "attrs" version = "23.1.0" description = "Classes Without Boilerplate" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -216,34 +227,31 @@ tests-no-zope = ["cloudpickle", "hypothesis", "mypy (>=1.1.1)", "pympler", "pyte [[package]] name = "authlib" -version = "0.11" -description = "The ultimate Python library in building OAuth and OpenID Connect servers." -category = "dev" +version = "1.2.1" +description = "The ultimate Python library in building OAuth and OpenID Connect servers and clients." optional = false python-versions = "*" files = [ - {file = "Authlib-0.11-py2.py3-none-any.whl", hash = "sha256:3a226f231e962a16dd5f6fcf0c113235805ba206e294717a64fa8e04ae3ad9c4"}, - {file = "Authlib-0.11.tar.gz", hash = "sha256:9741db6de2950a0a5cefbdb72ec7ab12f7e9fd530ff47219f1530e79183cbaaf"}, + {file = "Authlib-1.2.1-py2.py3-none-any.whl", hash = "sha256:c88984ea00149a90e3537c964327da930779afa4564e354edfd98410bea01911"}, + {file = "Authlib-1.2.1.tar.gz", hash = "sha256:421f7c6b468d907ca2d9afede256f068f87e34d23dd221c07d13d4c234726afb"}, ] [package.dependencies] -cryptography = "*" -requests = "*" +cryptography = ">=3.2" [[package]] name = "authutils" -version = "6.2.2" +version = "6.2.3" description = "Gen3 auth utility functions" -category = "dev" optional = false python-versions = ">=3.9,<4.0" files = [ - {file = "authutils-6.2.2-py3-none-any.whl", hash = "sha256:df9b551b4ab561452f0f4b50edaddccc443905b4d77ee69ea7eea78938e7caed"}, - {file = "authutils-6.2.2.tar.gz", hash = "sha256:ded3e5c0e35160eab83bfb217976920396441e19ed977acacbb769e988323850"}, + {file = "authutils-6.2.3-py3-none-any.whl", hash = "sha256:8c4e7e24183cbc1055ab91eaf9d2966f0da5b739be0fabfe380749674ba3057e"}, + {file = "authutils-6.2.3.tar.gz", hash = "sha256:c44e1f309b2b5b6db1276f69e1e18ec5c6be1ae33bfe52608a30049b8669ff7b"}, ] [package.dependencies] -authlib = "0.11.0" +authlib = ">=1.1.0" cached-property = ">=1.4,<2.0" cdiserrors = "<2.0.0" httpx = ">=0.23.0,<1.0.0" @@ -252,13 +260,12 @@ xmltodict = ">=0.9,<1.0" [package.extras] fastapi = ["fastapi (>=0.65.2,<0.66.0)"] -flask = ["Flask (>=0.10.1)"] +flask = ["Flask (<=2.3.3)"] [[package]] name = "backoff" version = "1.11.1" description = "Function decoration for backoff and retry" -category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" files = [ @@ -266,11 +273,21 @@ files = [ {file = "backoff-1.11.1.tar.gz", hash = "sha256:ccb962a2378418c667b3c979b504fdeb7d9e0d29c0579e3b13b86467177728cb"}, ] +[[package]] +name = "blinker" +version = "1.6.3" +description = "Fast, simple object-to-object and broadcast signaling" +optional = false +python-versions = ">=3.7" +files = [ + {file = "blinker-1.6.3-py3-none-any.whl", hash = "sha256:296320d6c28b006eb5e32d4712202dbcdcbf5dc482da298c2f44881c43884aaa"}, + {file = "blinker-1.6.3.tar.gz", hash = "sha256:152090d27c1c5c722ee7e48504b02d76502811ce02e1523553b4cf8c8b3d3a8d"}, +] + [[package]] name = "cached-property" version = "1.5.2" description = "A decorator for caching properties in classes." -category = "dev" optional = false python-versions = "*" files = [ @@ -282,7 +299,6 @@ files = [ name = "cdiserrors" version = "1.0.0" description = "Gen3 shared exceptions and utilities." -category = "dev" optional = false python-versions = ">=3.6,<4.0" files = [ @@ -300,7 +316,6 @@ flask = ["Flask (>=1.1.2,<2.0.0)"] name = "cdislogging" version = "1.1.1" description = "Standardized logging tool and format for cdis applications" -category = "main" optional = false python-versions = "*" files = [ @@ -311,7 +326,6 @@ files = [ name = "cdisutilstest" version = "0.2.4" description = "Collection of test data and tools" -category = "dev" optional = false python-versions = "*" files = [] @@ -327,7 +341,6 @@ resolved_reference = "bdfdeb05e45407e839fd954ce6d195d847cd8024" name = "certifi" version = "2023.7.22" description = "Python package for providing Mozilla's CA Bundle." -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -339,7 +352,6 @@ files = [ name = "cffi" version = "1.16.0" description = "Foreign Function Interface for Python calling C code." -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -404,7 +416,6 @@ pycparser = "*" name = "charset-normalizer" version = "3.3.0" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." -category = "main" optional = false python-versions = ">=3.7.0" files = [ @@ -502,21 +513,22 @@ files = [ [[package]] name = "click" -version = "7.1.2" +version = "8.1.7" description = "Composable command line interface toolkit" -category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +python-versions = ">=3.7" files = [ - {file = "click-7.1.2-py2.py3-none-any.whl", hash = "sha256:dacca89f4bfadd5de3d7489b7c8a566eee0d3676333fbb50030263894c38c0dc"}, - {file = "click-7.1.2.tar.gz", hash = "sha256:d2b5255c7c6349bc1bd1e59e08cd12acbbd63ce649f2588755783aa94dfb6b1a"}, + {file = "click-8.1.7-py3-none-any.whl", hash = "sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28"}, + {file = "click-8.1.7.tar.gz", hash = "sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de"}, ] +[package.dependencies] +colorama = {version = "*", markers = "platform_system == \"Windows\""} + [[package]] name = "colorama" version = "0.4.6" description = "Cross-platform colored terminal text." -category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" files = [ @@ -528,7 +540,6 @@ files = [ name = "coverage" version = "7.3.2" description = "Code coverage measurement for Python" -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -596,7 +607,6 @@ toml = ["tomli"] name = "cryptography" version = "41.0.4" description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -642,7 +652,6 @@ test-randomorder = ["pytest-randomly"] name = "dataclasses-json" version = "0.5.9" description = "Easily serialize dataclasses to and from JSON" -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -660,26 +669,30 @@ dev = ["flake8", "hypothesis", "ipython", "mypy (>=0.710)", "portray", "pytest ( [[package]] name = "dictionaryutils" -version = "3.0.2" -description = "" -category = "main" +version = "3.4.8" +description = "Python wrapper and metaschema for datadictionary." optional = false -python-versions = "*" -files = [ - {file = "dictionaryutils-3.0.2.tar.gz", hash = "sha256:90443a3ed20409198bbd605164672f420d8054117f65c2f6d84ac02969f7e42c"}, -] +python-versions = ">=3.6,<4.0" +files = [] +develop = false [package.dependencies] -cdislogging = ">=1.0,<2.0" -jsonschema = ">=3.2,<4.0" -PyYAML = ">=5.1,<6.0" -requests = ">=2.18,<3.0" +cdislogging = "^1.0.0" +jsonschema = ">=2.5,<4" +nose = "*" +PyYAML = "*" +requests = "~=2.18" + +[package.source] +type = "git" +url = "https://github.com/uc-cdis/dictionaryutils" +reference = "fix/update-python-version" +resolved_reference = "1653a5060e50c3036d801bd6c152d79a8c4e5e1f" [[package]] name = "doiclient" version = "0.1" description = "" -category = "dev" optional = false python-versions = "*" files = [] @@ -698,7 +711,6 @@ resolved_reference = "1a5f4b2a0b04577f31f3dcec511ade117d9f4ba1" name = "dosclient" version = "0.1" description = "" -category = "dev" optional = false python-versions = "*" files = [] @@ -717,24 +729,27 @@ resolved_reference = "38c0f1ab42edf3efb1ad6348d7dbdff81b131360" name = "drsclient" version = "0.2.3" description = "GA4GH DRS Client" -category = "main" optional = false -python-versions = ">=3.9,<4.0" -files = [ - {file = "drsclient-0.2.3.tar.gz", hash = "sha256:679061eacfb04f7fdccf709924f03b907af024481eb4c9ff123d87080cf4f344"}, -] +python-versions = "^3.9" +files = [] +develop = false [package.dependencies] -asyncio = ">=3.4.3,<4.0.0" -backoff = ">=1.10.0,<2.0.0" -httpx = ">=0.23.0,<0.24.0" -requests = ">=2.23.0,<3.0.0" +asyncio = "^3.4.3" +backoff = "^1.10.0" +httpx = "^0.23.0" +requests = "^2.23.0" + +[package.source] +type = "git" +url = "https://github.com/uc-cdis/drsclient.git" +reference = "0.2.3" +resolved_reference = "69bab0408def585d6f98bb64b0edccbde01dca6d" [[package]] name = "exceptiongroup" version = "1.1.3" description = "Backport of PEP 654 (exception groups)" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -749,7 +764,6 @@ test = ["pytest (>=6)"] name = "fastavro" version = "1.8.4" description = "Fast read/write of AVRO files" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -766,6 +780,11 @@ files = [ {file = "fastavro-1.8.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:14d7cd3df019d41c66733b8bf5d983af9e1f601d4cb162853a49238a4087d6b0"}, {file = "fastavro-1.8.4-cp311-cp311-win_amd64.whl", hash = "sha256:c8fb27001b7023910969f15bee2c9205c4e9f40713929d6c1dca8f470fc8fc80"}, {file = "fastavro-1.8.4-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:e331229acef15f858d9863ced7b629ebef4bd5f80766d367255e51cbf44f8dab"}, + {file = "fastavro-1.8.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:04e26b3ba288bd423f25630a3b9bd70cc61b46c6f6161de35e398a6fc8f260f0"}, + {file = "fastavro-1.8.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6281f4555659ed658b195d1618a637504013e57b680d6cbad7c726e9a4e2cf0b"}, + {file = "fastavro-1.8.4-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:3201880149e1fb807d616ab46b338a26788173a9f4e8a3396ae145e86af878a1"}, + {file = "fastavro-1.8.4-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:39771719fa04b8321eeebfb0813eaa2723c20e5bf570bcca3f53f1169099a0d7"}, + {file = "fastavro-1.8.4-cp312-cp312-win_amd64.whl", hash = "sha256:7095ae37a5c46dacb7ef430092e5f94650f576be281487b72050c1cf12e4ee20"}, {file = "fastavro-1.8.4-cp38-cp38-macosx_11_0_x86_64.whl", hash = "sha256:eb76f5bfcde91cde240c93594dae47670cdf1a95d7e5d0dc3ccdef57c6c1c183"}, {file = "fastavro-1.8.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:71ebe1cf090f800ca7d4c64d50c81c2a88c56e6ef6aa5eb61ec425e7ae723617"}, {file = "fastavro-1.8.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e9f0ef601943ea11cd02a59c57f5588cea3e300ac67608f53c904ec7aeddd232"}, @@ -791,7 +810,6 @@ zstandard = ["zstandard"] name = "fhirclient" version = "4.1.0" description = "A flexible client for FHIR servers supporting the SMART on FHIR protocol" -category = "main" optional = true python-versions = "*" files = [ @@ -805,21 +823,22 @@ requests = "*" [[package]] name = "flask" -version = "2.0.3" +version = "2.3.3" description = "A simple framework for building complex web applications." -category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=3.8" files = [ - {file = "Flask-2.0.3-py3-none-any.whl", hash = "sha256:59da8a3170004800a2837844bfa84d49b022550616070f7cb1a659682b2e7c9f"}, - {file = "Flask-2.0.3.tar.gz", hash = "sha256:e1120c228ca2f553b470df4a5fa927ab66258467526069981b3eb0a91902687d"}, + {file = "flask-2.3.3-py3-none-any.whl", hash = "sha256:f69fcd559dc907ed196ab9df0e48471709175e696d6e698dd4dbe940f96ce66b"}, + {file = "flask-2.3.3.tar.gz", hash = "sha256:09c347a92aa7ff4a8e7f3206795f30d826654baf38b873d0744cd571ca609efc"}, ] [package.dependencies] -click = ">=7.1.2" -itsdangerous = ">=2.0" -Jinja2 = ">=3.0" -Werkzeug = ">=2.0" +blinker = ">=1.6.2" +click = ">=8.1.3" +importlib-metadata = {version = ">=3.6.0", markers = "python_version < \"3.10\""} +itsdangerous = ">=2.1.2" +Jinja2 = ">=3.1.2" +Werkzeug = ">=2.3.7" [package.extras] async = ["asgiref (>=3.2)"] @@ -829,7 +848,6 @@ dotenv = ["python-dotenv"] name = "frozenlist" version = "1.4.0" description = "A list-like structure which implements collections.abc.MutableSequence" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -900,7 +918,6 @@ files = [ name = "gdcdictionary" version = "1.2.0" description = "Gen3 generic data dictionary" -category = "main" optional = false python-versions = "*" files = [ @@ -916,7 +933,6 @@ PyYAML = ">=5.1,<6.0" name = "gen3authz" version = "1.5.1" description = "Gen3 authz client" -category = "dev" optional = false python-versions = ">=3.6,<4.0" files = [ @@ -934,7 +950,6 @@ six = ">=1.16.0,<2.0.0" name = "h11" version = "0.14.0" description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -946,7 +961,6 @@ files = [ name = "hsclient" version = "0.1" description = "" -category = "dev" optional = false python-versions = "*" files = [] @@ -965,7 +979,6 @@ resolved_reference = "f122072ee245216da5e4260f718d6f886db81773" name = "httpcore" version = "0.16.3" description = "A minimal low-level HTTP client." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -977,17 +990,16 @@ files = [ anyio = ">=3.0,<5.0" certifi = "*" h11 = ">=0.13,<0.15" -sniffio = ">=1.0.0,<2.0.0" +sniffio = "==1.*" [package.extras] http2 = ["h2 (>=3,<5)"] -socks = ["socksio (>=1.0.0,<2.0.0)"] +socks = ["socksio (==1.*)"] [[package]] name = "httpx" version = "0.23.3" description = "The next generation HTTP client." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1003,15 +1015,14 @@ sniffio = "*" [package.extras] brotli = ["brotli", "brotlicffi"] -cli = ["click (>=8.0.0,<9.0.0)", "pygments (>=2.0.0,<3.0.0)", "rich (>=10,<13)"] +cli = ["click (==8.*)", "pygments (==2.*)", "rich (>=10,<13)"] http2 = ["h2 (>=3,<5)"] -socks = ["socksio (>=1.0.0,<2.0.0)"] +socks = ["socksio (==1.*)"] [[package]] name = "humanfriendly" version = "10.0" description = "Human friendly output for text interfaces using Python" -category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" files = [ @@ -1026,7 +1037,6 @@ pyreadline3 = {version = "*", markers = "sys_platform == \"win32\" and python_ve name = "idna" version = "3.4" description = "Internationalized Domain Names in Applications (IDNA)" -category = "main" optional = false python-versions = ">=3.5" files = [ @@ -1034,56 +1044,78 @@ files = [ {file = "idna-3.4.tar.gz", hash = "sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4"}, ] +[[package]] +name = "importlib-metadata" +version = "3.10.1" +description = "Read metadata from Python packages" +optional = false +python-versions = ">=3.6" +files = [ + {file = "importlib_metadata-3.10.1-py3-none-any.whl", hash = "sha256:2ec0faae539743ae6aaa84b49a169670a465f7f5d64e6add98388cc29fd1f2f6"}, + {file = "importlib_metadata-3.10.1.tar.gz", hash = "sha256:c9356b657de65c53744046fa8f7358afe0714a1af7d570c00c3835c2d724a7c1"}, +] + +[package.dependencies] +zipp = ">=0.5" + +[package.extras] +docs = ["jaraco.packaging (>=8.2)", "rst.linker (>=1.9)", "sphinx"] +testing = ["flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pep517", "pyfakefs", "pytest (>=4.6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.0.1)", "pytest-flake8", "pytest-mypy"] + [[package]] name = "indexclient" -version = "2.2.1" +version = "2.2.0" description = "" -category = "main" optional = false python-versions = "*" -files = [ - {file = "indexclient-2.2.1.tar.gz", hash = "sha256:d0374128a340b42042fc2d7c2484a8b1f36b90e05199e6f8357ad764dd6673fd"}, -] +files = [] +develop = false [package.dependencies] requests = ">=2.5.2,<3.0.0" +[package.source] +type = "git" +url = "https://github.com/uc-cdis/indexclient.git" +reference = "2.2.0" +resolved_reference = "7b3e3a56191c8500a22118b1ba363080c47807b0" + [[package]] name = "indexd" -version = "3.5.0" +version = "5.0.2" description = "Gen3 Indexing Service" -category = "dev" optional = false python-versions = "^3.9" files = [] develop = false [package.dependencies] +alembic = "^1.9.4" authutils = "^6.0.0" cdiserrors = "^1.0.0" cdislogging = "^1.0.0" doiclient = {git = "https://github.com/uc-cdis/doiclient", rev = "1.0.0"} dosclient = {git = "https://github.com/uc-cdis/dosclient", rev = "1.1.0"} -flask = "^2.0.1" +flask = ">=2.2.3, <3.0.0" gen3authz = "^1.0.4" hsclient = {git = "https://github.com/uc-cdis/hsclient", rev = "1.0.0"} indexclient = "^2.1.0" jsonschema = "^3.2" psycopg2 = "^2.7" +PyYAML = "^5.4" sqlalchemy = "~1.3.3" sqlalchemy-utils = "^0.37.3" [package.source] type = "git" url = "https://github.com/uc-cdis/indexd.git" -reference = "3.5.0" -resolved_reference = "119ff762f8432f29e1e29f86de432927fcc15d68" +reference = "fix/python-version" +resolved_reference = "4cd4371de9907e6c9d7b7b894471ce0f61206048" [[package]] name = "iniconfig" version = "2.0.0" description = "brain-dead simple config-ini parsing" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1095,7 +1127,6 @@ files = [ name = "isodate" version = "0.6.1" description = "An ISO 8601 date/time/duration parser and formatter" -category = "main" optional = true python-versions = "*" files = [ @@ -1110,7 +1141,6 @@ six = "*" name = "itsdangerous" version = "2.1.2" description = "Safely pass data to untrusted environments and back." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1122,7 +1152,6 @@ files = [ name = "jinja2" version = "3.1.2" description = "A very fast and expressive template engine." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1140,7 +1169,6 @@ i18n = ["Babel (>=2.7)"] name = "jsonschema" version = "3.2.0" description = "An implementation of JSON Schema validation for Python" -category = "main" optional = false python-versions = "*" files = [ @@ -1158,11 +1186,29 @@ six = ">=1.11.0" format = ["idna", "jsonpointer (>1.13)", "rfc3987", "strict-rfc3339", "webcolors"] format-nongpl = ["idna", "jsonpointer (>1.13)", "rfc3339-validator", "rfc3986-validator (>0.1.0)", "webcolors"] +[[package]] +name = "mako" +version = "1.2.4" +description = "A super-fast templating language that borrows the best ideas from the existing templating languages." +optional = false +python-versions = ">=3.7" +files = [ + {file = "Mako-1.2.4-py3-none-any.whl", hash = "sha256:c97c79c018b9165ac9922ae4f32da095ffd3c4e6872b45eded42926deea46818"}, + {file = "Mako-1.2.4.tar.gz", hash = "sha256:d60a3903dc3bb01a18ad6a89cdbe2e4eadc69c0bc8ef1e3773ba53d44c3f7a34"}, +] + +[package.dependencies] +MarkupSafe = ">=0.9.2" + +[package.extras] +babel = ["Babel"] +lingua = ["lingua"] +testing = ["pytest"] + [[package]] name = "markupsafe" version = "2.1.3" description = "Safely add untrusted strings to HTML/XML markup." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1232,7 +1278,6 @@ files = [ name = "marshmallow" version = "3.20.1" description = "A lightweight library for converting complex datatypes to and from native Python datatypes." -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1253,7 +1298,6 @@ tests = ["pytest", "pytz", "simplejson"] name = "marshmallow-enum" version = "1.5.1" description = "Enum field for Marshmallow" -category = "main" optional = false python-versions = "*" files = [ @@ -1268,7 +1312,6 @@ marshmallow = ">=2.0.0" name = "multidict" version = "6.0.4" description = "multidict implementation" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1352,7 +1395,6 @@ files = [ name = "mypy-extensions" version = "1.0.0" description = "Type system extensions for programs checked with the mypy type checker." -category = "main" optional = false python-versions = ">=3.5" files = [ @@ -1360,11 +1402,22 @@ files = [ {file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"}, ] +[[package]] +name = "nose" +version = "1.3.7" +description = "nose extends unittest to make testing easier" +optional = false +python-versions = "*" +files = [ + {file = "nose-1.3.7-py2-none-any.whl", hash = "sha256:dadcddc0aefbf99eea214e0f1232b94f2fa9bd98fa8353711dacb112bfcbbb2a"}, + {file = "nose-1.3.7-py3-none-any.whl", hash = "sha256:9ff7c6cc443f8c51994b34a667bbcf45afd6d945be7477b52e97516fd17c53ac"}, + {file = "nose-1.3.7.tar.gz", hash = "sha256:f1bffef9cbc82628f6e7d7b40d7e255aefaa1adb6a1b1d26c69a8b79e6208a98"}, +] + [[package]] name = "numpy" version = "1.25.2" description = "Fundamental package for array computing in Python" -category = "main" optional = false python-versions = ">=3.9" files = [ @@ -1397,51 +1450,49 @@ files = [ [[package]] name = "numpy" -version = "1.26.0" +version = "1.26.1" description = "Fundamental package for array computing in Python" -category = "main" optional = false python-versions = "<3.13,>=3.9" files = [ - {file = "numpy-1.26.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:f8db2f125746e44dce707dd44d4f4efeea8d7e2b43aace3f8d1f235cfa2733dd"}, - {file = "numpy-1.26.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:0621f7daf973d34d18b4e4bafb210bbaf1ef5e0100b5fa750bd9cde84c7ac292"}, - {file = "numpy-1.26.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:51be5f8c349fdd1a5568e72713a21f518e7d6707bcf8503b528b88d33b57dc68"}, - {file = "numpy-1.26.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:767254ad364991ccfc4d81b8152912e53e103ec192d1bb4ea6b1f5a7117040be"}, - {file = "numpy-1.26.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:436c8e9a4bdeeee84e3e59614d38c3dbd3235838a877af8c211cfcac8a80b8d3"}, - {file = "numpy-1.26.0-cp310-cp310-win32.whl", hash = "sha256:c2e698cb0c6dda9372ea98a0344245ee65bdc1c9dd939cceed6bb91256837896"}, - {file = "numpy-1.26.0-cp310-cp310-win_amd64.whl", hash = "sha256:09aaee96c2cbdea95de76ecb8a586cb687d281c881f5f17bfc0fb7f5890f6b91"}, - {file = "numpy-1.26.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:637c58b468a69869258b8ae26f4a4c6ff8abffd4a8334c830ffb63e0feefe99a"}, - {file = "numpy-1.26.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:306545e234503a24fe9ae95ebf84d25cba1fdc27db971aa2d9f1ab6bba19a9dd"}, - {file = "numpy-1.26.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8c6adc33561bd1d46f81131d5352348350fc23df4d742bb246cdfca606ea1208"}, - {file = "numpy-1.26.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e062aa24638bb5018b7841977c360d2f5917268d125c833a686b7cbabbec496c"}, - {file = "numpy-1.26.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:546b7dd7e22f3c6861463bebb000646fa730e55df5ee4a0224408b5694cc6148"}, - {file = "numpy-1.26.0-cp311-cp311-win32.whl", hash = "sha256:c0b45c8b65b79337dee5134d038346d30e109e9e2e9d43464a2970e5c0e93229"}, - {file = "numpy-1.26.0-cp311-cp311-win_amd64.whl", hash = "sha256:eae430ecf5794cb7ae7fa3808740b015aa80747e5266153128ef055975a72b99"}, - {file = "numpy-1.26.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:166b36197e9debc4e384e9c652ba60c0bacc216d0fc89e78f973a9760b503388"}, - {file = "numpy-1.26.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f042f66d0b4ae6d48e70e28d487376204d3cbf43b84c03bac57e28dac6151581"}, - {file = "numpy-1.26.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e5e18e5b14a7560d8acf1c596688f4dfd19b4f2945b245a71e5af4ddb7422feb"}, - {file = "numpy-1.26.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7f6bad22a791226d0a5c7c27a80a20e11cfe09ad5ef9084d4d3fc4a299cca505"}, - {file = "numpy-1.26.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:4acc65dd65da28060e206c8f27a573455ed724e6179941edb19f97e58161bb69"}, - {file = "numpy-1.26.0-cp312-cp312-win32.whl", hash = "sha256:bb0d9a1aaf5f1cb7967320e80690a1d7ff69f1d47ebc5a9bea013e3a21faec95"}, - {file = "numpy-1.26.0-cp312-cp312-win_amd64.whl", hash = "sha256:ee84ca3c58fe48b8ddafdeb1db87388dce2c3c3f701bf447b05e4cfcc3679112"}, - {file = "numpy-1.26.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:4a873a8180479bc829313e8d9798d5234dfacfc2e8a7ac188418189bb8eafbd2"}, - {file = "numpy-1.26.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:914b28d3215e0c721dc75db3ad6d62f51f630cb0c277e6b3bcb39519bed10bd8"}, - {file = "numpy-1.26.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c78a22e95182fb2e7874712433eaa610478a3caf86f28c621708d35fa4fd6e7f"}, - {file = "numpy-1.26.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:86f737708b366c36b76e953c46ba5827d8c27b7a8c9d0f471810728e5a2fe57c"}, - {file = "numpy-1.26.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:b44e6a09afc12952a7d2a58ca0a2429ee0d49a4f89d83a0a11052da696440e49"}, - {file = "numpy-1.26.0-cp39-cp39-win32.whl", hash = "sha256:5671338034b820c8d58c81ad1dafc0ed5a00771a82fccc71d6438df00302094b"}, - {file = "numpy-1.26.0-cp39-cp39-win_amd64.whl", hash = "sha256:020cdbee66ed46b671429c7265cf00d8ac91c046901c55684954c3958525dab2"}, - {file = "numpy-1.26.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:0792824ce2f7ea0c82ed2e4fecc29bb86bee0567a080dacaf2e0a01fe7654369"}, - {file = "numpy-1.26.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7d484292eaeb3e84a51432a94f53578689ffdea3f90e10c8b203a99be5af57d8"}, - {file = "numpy-1.26.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:186ba67fad3c60dbe8a3abff3b67a91351100f2661c8e2a80364ae6279720299"}, - {file = "numpy-1.26.0.tar.gz", hash = "sha256:f93fc78fe8bf15afe2b8d6b6499f1c73953169fad1e9a8dd086cdff3190e7fdf"}, + {file = "numpy-1.26.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:82e871307a6331b5f09efda3c22e03c095d957f04bf6bc1804f30048d0e5e7af"}, + {file = "numpy-1.26.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:cdd9ec98f0063d93baeb01aad472a1a0840dee302842a2746a7a8e92968f9575"}, + {file = "numpy-1.26.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d78f269e0c4fd365fc2992c00353e4530d274ba68f15e968d8bc3c69ce5f5244"}, + {file = "numpy-1.26.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8ab9163ca8aeb7fd32fe93866490654d2f7dda4e61bc6297bf72ce07fdc02f67"}, + {file = "numpy-1.26.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:78ca54b2f9daffa5f323f34cdf21e1d9779a54073f0018a3094ab907938331a2"}, + {file = "numpy-1.26.1-cp310-cp310-win32.whl", hash = "sha256:d1cfc92db6af1fd37a7bb58e55c8383b4aa1ba23d012bdbba26b4bcca45ac297"}, + {file = "numpy-1.26.1-cp310-cp310-win_amd64.whl", hash = "sha256:d2984cb6caaf05294b8466966627e80bf6c7afd273279077679cb010acb0e5ab"}, + {file = "numpy-1.26.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:cd7837b2b734ca72959a1caf3309457a318c934abef7a43a14bb984e574bbb9a"}, + {file = "numpy-1.26.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1c59c046c31a43310ad0199d6299e59f57a289e22f0f36951ced1c9eac3665b9"}, + {file = "numpy-1.26.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d58e8c51a7cf43090d124d5073bc29ab2755822181fcad978b12e144e5e5a4b3"}, + {file = "numpy-1.26.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6081aed64714a18c72b168a9276095ef9155dd7888b9e74b5987808f0dd0a974"}, + {file = "numpy-1.26.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:97e5d6a9f0702c2863aaabf19f0d1b6c2628fbe476438ce0b5ce06e83085064c"}, + {file = "numpy-1.26.1-cp311-cp311-win32.whl", hash = "sha256:b9d45d1dbb9de84894cc50efece5b09939752a2d75aab3a8b0cef6f3a35ecd6b"}, + {file = "numpy-1.26.1-cp311-cp311-win_amd64.whl", hash = "sha256:3649d566e2fc067597125428db15d60eb42a4e0897fc48d28cb75dc2e0454e53"}, + {file = "numpy-1.26.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:1d1bd82d539607951cac963388534da3b7ea0e18b149a53cf883d8f699178c0f"}, + {file = "numpy-1.26.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:afd5ced4e5a96dac6725daeb5242a35494243f2239244fad10a90ce58b071d24"}, + {file = "numpy-1.26.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a03fb25610ef560a6201ff06df4f8105292ba56e7cdd196ea350d123fc32e24e"}, + {file = "numpy-1.26.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dcfaf015b79d1f9f9c9fd0731a907407dc3e45769262d657d754c3a028586124"}, + {file = "numpy-1.26.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:e509cbc488c735b43b5ffea175235cec24bbc57b227ef1acc691725beb230d1c"}, + {file = "numpy-1.26.1-cp312-cp312-win32.whl", hash = "sha256:af22f3d8e228d84d1c0c44c1fbdeb80f97a15a0abe4f080960393a00db733b66"}, + {file = "numpy-1.26.1-cp312-cp312-win_amd64.whl", hash = "sha256:9f42284ebf91bdf32fafac29d29d4c07e5e9d1af862ea73686581773ef9e73a7"}, + {file = "numpy-1.26.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:bb894accfd16b867d8643fc2ba6c8617c78ba2828051e9a69511644ce86ce83e"}, + {file = "numpy-1.26.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e44ccb93f30c75dfc0c3aa3ce38f33486a75ec9abadabd4e59f114994a9c4617"}, + {file = "numpy-1.26.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9696aa2e35cc41e398a6d42d147cf326f8f9d81befcb399bc1ed7ffea339b64e"}, + {file = "numpy-1.26.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a5b411040beead47a228bde3b2241100454a6abde9df139ed087bd73fc0a4908"}, + {file = "numpy-1.26.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:1e11668d6f756ca5ef534b5be8653d16c5352cbb210a5c2a79ff288e937010d5"}, + {file = "numpy-1.26.1-cp39-cp39-win32.whl", hash = "sha256:d1d2c6b7dd618c41e202c59c1413ef9b2c8e8a15f5039e344af64195459e3104"}, + {file = "numpy-1.26.1-cp39-cp39-win_amd64.whl", hash = "sha256:59227c981d43425ca5e5c01094d59eb14e8772ce6975d4b2fc1e106a833d5ae2"}, + {file = "numpy-1.26.1-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:06934e1a22c54636a059215d6da99e23286424f316fddd979f5071093b648668"}, + {file = "numpy-1.26.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:76ff661a867d9272cd2a99eed002470f46dbe0943a5ffd140f49be84f68ffc42"}, + {file = "numpy-1.26.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:6965888d65d2848e8768824ca8288db0a81263c1efccec881cb35a0d805fcd2f"}, + {file = "numpy-1.26.1.tar.gz", hash = "sha256:c8c6c72d4a9f831f328efb1312642a1cafafaa88981d9ab76368d50d07d93cbe"}, ] [[package]] name = "packaging" version = "23.2" description = "Core utilities for Python packages" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1453,7 +1504,6 @@ files = [ name = "pandas" version = "2.1.0" description = "Powerful data structures for data analysis, time series, and statistics" -category = "main" optional = false python-versions = ">=3.9" files = [ @@ -1512,7 +1562,6 @@ xml = ["lxml (>=4.8.0)"] name = "pandas" version = "2.1.1" description = "Powerful data structures for data analysis, time series, and statistics" -category = "main" optional = false python-versions = ">=3.9" files = [ @@ -1580,7 +1629,6 @@ xml = ["lxml (>=4.8.0)"] name = "pluggy" version = "1.3.0" description = "plugin and hook calling mechanisms for python" -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -1596,7 +1644,6 @@ testing = ["pytest", "pytest-benchmark"] name = "psycopg2" version = "2.9.9" description = "psycopg2 - Python-PostgreSQL Database Adapter" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1617,7 +1664,6 @@ files = [ name = "py" version = "1.11.0" description = "library with cross-python path, ini-parsing, io, code, log facilities" -category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" files = [ @@ -1629,7 +1675,6 @@ files = [ name = "pycparser" version = "2.21" description = "C parser in Python" -category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ @@ -1641,7 +1686,6 @@ files = [ name = "pyjwt" version = "2.8.0" description = "JSON Web Token implementation in Python" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1660,29 +1704,34 @@ tests = ["coverage[toml] (==5.0.4)", "pytest (>=6.0.0,<7.0.0)"] [[package]] name = "pypfb" -version = "0.5.0" +version = "0.5.26" description = "Python SDK for PFB format" -category = "main" optional = false -python-versions = ">=3.6,<4.0" -files = [ - {file = "pypfb-0.5.0-py3-none-any.whl", hash = "sha256:db654407276bb347d9f2e5c640ade3d32cd70e46f5aeec0f8dce1a963003d7ff"}, - {file = "pypfb-0.5.0.tar.gz", hash = "sha256:319f16cec65bb40b27d9e318685061a4abe27b15a1d688db6b3f7d19e52ade97"}, -] +python-versions = "^3.9" +files = [] +develop = false [package.dependencies] -click = ">=7.1.2,<8.0.0" -dictionaryutils = "<=3.0.2" -fastavro = ">=1.0.0,<2.0.0" -gdcdictionary = ">=1.2.0,<2.0.0" -python-json-logger = ">=0.1.11,<0.2.0" -PyYAML = ">=5.3.1,<6.0.0" +aiohttp = "^3.6.3" +click = "^8.0" +dictionaryutils = {git = "https://github.com/uc-cdis/dictionaryutils", branch = "fix/update-python-version"} +fastavro = "~1.8.2" +gdcdictionary = "^1.2.0" +gen3 = "^4.11.3" +importlib_metadata = {version = ">=3.6.0, <4.0", markers = "python_full_version <= \"3.9.0\""} +python-json-logger = "^0.1.11" +PyYAML = "^5.3.1" + +[package.source] +type = "git" +url = "https://github.com/uc-cdis/pypfb" +reference = "fix/expand-python-versions" +resolved_reference = "14e81007970c3bd5e3cdc2965f2baef589e80436" [[package]] name = "pyreadline3" version = "3.4.1" description = "A python implementation of GNU readline." -category = "main" optional = false python-versions = "*" files = [ @@ -1694,7 +1743,6 @@ files = [ name = "pyrsistent" version = "0.19.3" description = "Persistent/Functional/Immutable data structures" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1731,7 +1779,6 @@ files = [ name = "pytest" version = "6.2.5" description = "pytest: simple powerful testing with Python" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -1756,7 +1803,6 @@ testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xm name = "pytest-cov" version = "4.1.0" description = "Pytest plugin for measuring coverage." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1775,7 +1821,6 @@ testing = ["fields", "hunter", "process-tests", "pytest-xdist", "six", "virtuale name = "python-dateutil" version = "2.8.2" description = "Extensions to the standard Python datetime module" -category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" files = [ @@ -1790,7 +1835,6 @@ six = ">=1.5" name = "python-json-logger" version = "0.1.11" description = "A python library adding a json log formatter" -category = "main" optional = false python-versions = ">=2.7" files = [ @@ -1801,7 +1845,6 @@ files = [ name = "pytz" version = "2023.3.post1" description = "World timezone definitions, modern and historical" -category = "main" optional = false python-versions = "*" files = [ @@ -1813,7 +1856,6 @@ files = [ name = "pyyaml" version = "5.4.1" description = "YAML parser and emitter for Python" -category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" files = [ @@ -1852,7 +1894,6 @@ files = [ name = "requests" version = "2.31.0" description = "Python HTTP for Humans." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1874,7 +1915,6 @@ use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] name = "requests-mock" version = "1.11.0" description = "Mock out responses from the requests package" -category = "dev" optional = false python-versions = "*" files = [ @@ -1894,7 +1934,6 @@ test = ["fixtures", "mock", "purl", "pytest", "requests-futures", "sphinx", "tes name = "rfc3986" version = "1.5.0" description = "Validating URI References per RFC 3986" -category = "main" optional = false python-versions = "*" files = [ @@ -1912,7 +1951,6 @@ idna2008 = ["idna"] name = "setuptools" version = "68.2.2" description = "Easily download, build, install, upgrade, and uninstall Python packages" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1929,7 +1967,6 @@ testing-integration = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "jar name = "six" version = "1.16.0" description = "Python 2 and 3 compatibility utilities" -category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" files = [ @@ -1941,7 +1978,6 @@ files = [ name = "sniffio" version = "1.3.0" description = "Sniff out which async library your code is running under" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1953,7 +1989,6 @@ files = [ name = "sqlalchemy" version = "1.3.24" description = "Database Abstraction Library" -category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ @@ -2009,7 +2044,6 @@ pymysql = ["pymysql", "pymysql (<1)"] name = "sqlalchemy-utils" version = "0.37.9" description = "Various utility functions for SQLAlchemy." -category = "dev" optional = false python-versions = "~=3.4" files = [ @@ -2039,7 +2073,6 @@ url = ["furl (>=0.4.1)"] name = "toml" version = "0.10.2" description = "Python Library for Tom's Obvious, Minimal Language" -category = "dev" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" files = [ @@ -2051,7 +2084,6 @@ files = [ name = "tomli" version = "2.0.1" description = "A lil' TOML parser" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -2063,7 +2095,6 @@ files = [ name = "tqdm" version = "4.66.1" description = "Fast, Extensible Progress Meter" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -2084,7 +2115,6 @@ telegram = ["requests"] name = "typing-extensions" version = "4.8.0" description = "Backported and Experimental Type Hints for Python 3.8+" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -2096,7 +2126,6 @@ files = [ name = "typing-inspect" version = "0.9.0" description = "Runtime inspection utilities for typing module." -category = "main" optional = false python-versions = "*" files = [ @@ -2112,7 +2141,6 @@ typing-extensions = ">=3.7.4" name = "tzdata" version = "2023.3" description = "Provider of IANA time zone data" -category = "main" optional = false python-versions = ">=2" files = [ @@ -2122,14 +2150,13 @@ files = [ [[package]] name = "urllib3" -version = "2.0.6" +version = "2.0.7" description = "HTTP library with thread-safe connection pooling, file post, and more." -category = "main" optional = false python-versions = ">=3.7" files = [ - {file = "urllib3-2.0.6-py3-none-any.whl", hash = "sha256:7a7c7003b000adf9e7ca2a377c9688bbc54ed41b985789ed576570342a375cd2"}, - {file = "urllib3-2.0.6.tar.gz", hash = "sha256:b19e1a85d206b56d7df1d5e683df4a7725252a964e3993648dd0fb5a1c157564"}, + {file = "urllib3-2.0.7-py3-none-any.whl", hash = "sha256:fdb6d215c776278489906c2f8916e6e7d4f5a9b602ccbcfdf7f016fc8da0596e"}, + {file = "urllib3-2.0.7.tar.gz", hash = "sha256:c97dfde1f7bd43a71c8d2a58e369e9b2bf692d1334ea9f9cae55add7d0dd0f84"}, ] [package.extras] @@ -2140,14 +2167,13 @@ zstd = ["zstandard (>=0.18.0)"] [[package]] name = "werkzeug" -version = "2.3.7" +version = "3.0.0" description = "The comprehensive WSGI web application library." -category = "dev" optional = false python-versions = ">=3.8" files = [ - {file = "werkzeug-2.3.7-py3-none-any.whl", hash = "sha256:effc12dba7f3bd72e605ce49807bbe692bd729c3bb122a3b91747a6ae77df528"}, - {file = "werkzeug-2.3.7.tar.gz", hash = "sha256:2b8c0e447b4b9dbcc85dd97b6eeb4dcbaf6c8b6c3be0bd654e25553e0a2157d8"}, + {file = "werkzeug-3.0.0-py3-none-any.whl", hash = "sha256:cbb2600f7eabe51dbc0502f58be0b3e1b96b893b05695ea2b35b43d4de2d9962"}, + {file = "werkzeug-3.0.0.tar.gz", hash = "sha256:3ffff4dcc32db52ef3cc94dff3000a3c2846890f3a5a51800a27b909c5e770f0"}, ] [package.dependencies] @@ -2160,7 +2186,6 @@ watchdog = ["watchdog (>=2.3)"] name = "xmltodict" version = "0.13.0" description = "Makes working with XML feel like you are working with JSON" -category = "main" optional = false python-versions = ">=3.4" files = [ @@ -2172,7 +2197,6 @@ files = [ name = "yarl" version = "1.9.2" description = "Yet another URL library" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -2256,10 +2280,25 @@ files = [ idna = ">=2.0" multidict = ">=4.0" +[[package]] +name = "zipp" +version = "3.17.0" +description = "Backport of pathlib-compatible object wrapper for zip files" +optional = false +python-versions = ">=3.8" +files = [ + {file = "zipp-3.17.0-py3-none-any.whl", hash = "sha256:0e923e726174922dce09c53c59ad483ff7bbb8e572e00c7f7c46b88556409f31"}, + {file = "zipp-3.17.0.tar.gz", hash = "sha256:84e64a1c28cf7e91ed2078bb8cc8c259cb19b76942096c8d7b84947690cabaf0"}, +] + +[package.extras] +docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-lint"] +testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-ignore-flaky", "pytest-mypy (>=0.9.1)", "pytest-ruff"] + [extras] fhir = ["fhirclient"] [metadata] lock-version = "2.0" python-versions = "^3.9" -content-hash = "efec9f3496131fbd7514c1e5f29b60b2ba6372a4a434ba68ea8e93795cdf1261" +content-hash = "6d355e8facecdb2e4a7bf5d4b13bcf412fa8f8d0b0aebbc2d4cb2331ab54b73d" diff --git a/pyproject.toml b/pyproject.toml index 5e107135c..b9507ddff 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,8 +20,8 @@ classifiers = [ [tool.poetry.dependencies] python = "^3.9" requests = "*" -indexclient = "*" -drsclient = "^0.2.2" +indexclient = { git = "https://github.com/uc-cdis/indexclient.git", tag = "2.2.0" } +drsclient = { git = "https://github.com/uc-cdis/drsclient.git", tag = "0.2.3" } aiohttp = "*" backoff = "*" cdislogging = "^1.1.0" @@ -29,7 +29,7 @@ click = "*" jsonschema = "*" # FIXME updating to >=0.6.0 breaks a few tests dataclasses-json = "<=0.5.9" -pypfb = "<1.0.0" +pypfb = { git = "https://github.com/uc-cdis/pypfb", branch = "fix/expand-python-versions"} tqdm = "^4.61.2" humanfriendly ="*" python-dateutil = "*" @@ -51,10 +51,7 @@ pytest = "^6.0.0" pytest-cov = "*" requests-mock = "*" cdisutilstest = { git = "https://github.com/uc-cdis/cdisutils-test.git", tag = "1.0.0" } -indexd = { git = "https://github.com/uc-cdis/indexd.git", tag = "3.5.0" } -# indexd has a version of flask that doesn't specify the werkzeug version, so we get -# 3.0.0 which breaks things. Force sub-dep version here for now -werkzeug = "<3.0.0" +indexd = { git = "https://github.com/uc-cdis/indexd.git", branch = "fix/python-version" } [tool.poetry.scripts] gen3 = "gen3.cli.__main__:main" diff --git a/tests/test_index.py b/tests/test_index.py index 8704acb01..a61037e7b 100644 --- a/tests/test_index.py +++ b/tests/test_index.py @@ -229,3 +229,52 @@ def test_blank(gen3_index): # delete the record drec = gen3_index.delete_record(updatedblank["did"]) assert drec._deleted + + +def test_desc_and_content_dates(gen3_index): + """ + Tests that records can be created, updated and retrieved when description, content_created_date and content_updated_date fields are provided. + """ + expected_description = "a description" + expected_content_created_date = "2023-03-14T17:02:54" + expected_content_updated_date = "2023-03-15T17:11:00" + hashes = {"md5": "374c12456782738abcfe387492837483"} + record = gen3_index.create_record( + hashes=hashes, + size=0, + description=expected_description, + content_created_date=expected_content_created_date, + content_updated_date=expected_content_updated_date, + ) + newly_created_record = gen3_index.get_record(record["did"]) + assert expected_description == newly_created_record["description"] + assert expected_content_created_date == newly_created_record["content_created_date"] + assert expected_content_updated_date == newly_created_record["content_updated_date"] + + expected_description = "new description" + expected_content_created_date = "2023-04-14T17:02:54" + expected_content_updated_date = "2023-04-15T17:11:00" + record = gen3_index.update_record( + record["did"], + description=expected_description, + content_created_date=expected_content_created_date, + content_updated_date=expected_content_updated_date, + ) + updated_record = gen3_index.get_record(record["did"]) + assert expected_description == updated_record["description"] + assert expected_content_created_date == updated_record["content_created_date"] + assert expected_content_updated_date == updated_record["content_updated_date"] + + new_version = gen3_index.create_new_version( + updated_record["did"], + hashes=hashes, + size=0, + description="new version description", + content_created_date="2023-04-28T17:02:54", + content_updated_date="2023-04-30T17:11:00", + ) + + version_record = gen3_index.get_record(new_version["did"]) + assert version_record["description"] == new_version["description"] + assert version_record["content_created_date"] == new_version["content_created_date"] + assert version_record["content_updated_date"] == new_version["content_updated_date"]