From dfec363c7dac940c17daf50a4c8aea672c55cc9d Mon Sep 17 00:00:00 2001 From: William Ronchetti Date: Thu, 3 Aug 2023 11:55:07 -0400 Subject: [PATCH 1/6] repair purge --- pyproject.toml | 4 ++-- src/encoded/project/authentication.py | 2 +- src/encoded/tests/test_permissions.py | 9 +++++++++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index aab6b4f5c..f91f6bcef 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,8 +42,8 @@ certifi = ">=2021.5.30" chardet = "3.0.4" codeguru-profiler-agent = "^1.2.4" colorama = "0.3.3" -dcicsnovault = "8.2.0.1b45" -dcicutils = "7.5.1.1b0" +dcicsnovault = "^9.0.0" +dcicutils = "^7.5.2" encoded-core = "^0.0.2" elasticsearch = "7.13.4" execnet = "1.4.1" diff --git a/src/encoded/project/authentication.py b/src/encoded/project/authentication.py index 88875fac6..0ba4c8aa8 100644 --- a/src/encoded/project/authentication.py +++ b/src/encoded/project/authentication.py @@ -8,7 +8,7 @@ def login(self, context, request, *, samesite): def namespaced_authentication_policy_authenticated_userid(self, namespaced_authentication_policy, request, set_user_info_property): - set_user_info_property = False + set_user_info_property = True return super().namespaced_authentication_policy_authenticated_userid(namespaced_authentication_policy, request, set_user_info_property) diff --git a/src/encoded/tests/test_permissions.py b/src/encoded/tests/test_permissions.py index 9a29cd193..361e7748d 100644 --- a/src/encoded/tests/test_permissions.py +++ b/src/encoded/tests/test_permissions.py @@ -52,6 +52,15 @@ def consortium_file(testapp, fastq_format, test_consortium): return res.json['@graph'][0] +class TestAdminPermissions: + """ Tests admins can do various actions, including purging items """ + + @staticmethod + def test_admin_can_purge(testapp, fastq_format): + testapp.patch_json(f'/{fastq_format["uuid"]}', {'status': 'deleted'}, status=200) + testapp.delete_json(f'/{fastq_format["uuid"]}/?purge=True', {}, status=200) + + class TestPermissionsHelper: @staticmethod From 15a58afac0eaed563863efc106f48799ea3e0ea1 Mon Sep 17 00:00:00 2001 From: William Ronchetti Date: Thu, 3 Aug 2023 16:09:39 -0400 Subject: [PATCH 2/6] app specific schema refs --- pyproject.toml | 2 +- src/encoded/tests/test_merge_schemas.py | 23 +++++++++++++++++ src/encoded/tests/testing_views.py | 34 +++++++++++++++++++++++++ 3 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 src/encoded/tests/test_merge_schemas.py diff --git a/pyproject.toml b/pyproject.toml index f91f6bcef..49078c387 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,7 +42,7 @@ certifi = ">=2021.5.30" chardet = "3.0.4" codeguru-profiler-agent = "^1.2.4" colorama = "0.3.3" -dcicsnovault = "^9.0.0" +dcicsnovault = "^9.9.0.0b0" dcicutils = "^7.5.2" encoded-core = "^0.0.2" elasticsearch = "7.13.4" diff --git a/src/encoded/tests/test_merge_schemas.py b/src/encoded/tests/test_merge_schemas.py new file mode 100644 index 000000000..963f711a0 --- /dev/null +++ b/src/encoded/tests/test_merge_schemas.py @@ -0,0 +1,23 @@ +import pytest +from snovault.schema_utils import load_schema +from .testing_views import TestingLinkedSchemaField + + +class TestMergedSchemas: + """ Class that contains tests that validate $merge refs are correctly resolved within repo + and across repos + """ + + @staticmethod + def test_merged_schemas(): + """ Checks that we can resolve multiple different schema $ref types """ + schema = load_schema(TestingLinkedSchemaField.schema) + props = schema['properties'] + for key in ['access_key_id', 'file_format', 'title']: + assert key in props + # check access key id + assert props['access_key_id']['comment'] == 'Only admins are allowed to set this value.' + # check file_format + assert props['file_format']['linkTo'] == 'FileFormat' + # check title + assert props['title']['description'] == 'A title for the Consortium.' diff --git a/src/encoded/tests/testing_views.py b/src/encoded/tests/testing_views.py index 48163dcff..9cd7b4572 100644 --- a/src/encoded/tests/testing_views.py +++ b/src/encoded/tests/testing_views.py @@ -62,3 +62,37 @@ class TestingPostPutPatch(Item): }, } } + + +@collection( + 'testing-linked-schema-fields', + acl=[ + (Allow, 'group.submitter', ['add', 'edit', 'view']), + ], +) +class TestingLinkedSchemaField(Item): + item_type = 'testing_linked_schema_field' + schema = { + 'type': 'object', + 'additionalProperties': False, + 'properties': { + "schema_version": { + "type": "string", + "pattern": "^\\d+(\\.\\d+)*$", + "requestMethod": [], + "default": "1", + }, + # link from snovault field + 'access_key_id': { + '$merge': 'snovault:schemas/access_key.json#/properties/access_key_id' + }, + # link from encoded-core field + 'file_format': { + '$merge': 'encoded_core:schemas/file.json#/properties/file_format' + }, + # link from this repo + 'title': { + '$merge': 'encoded:schemas/consortium.json#/properties/title' + } + } + } From 20b305f88d871aef76c873d96ef432568eaf7664 Mon Sep 17 00:00:00 2001 From: William Ronchetti Date: Fri, 4 Aug 2023 09:53:04 -0400 Subject: [PATCH 3/6] fix incompatible changes --- src/encoded/schema_formats.py | 2 +- src/encoded/schemas/consortium.json | 4 ++-- src/encoded/schemas/submission_center.json | 4 ++-- src/encoded/server_defaults.py | 2 +- src/encoded/tests/test_schemas.py | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/encoded/schema_formats.py b/src/encoded/schema_formats.py index bb4679a25..1e2907429 100644 --- a/src/encoded/schema_formats.py +++ b/src/encoded/schema_formats.py @@ -1,6 +1,6 @@ import re from pyramid.threadlocal import get_current_request -from jsonschema_serialize_fork import FormatChecker +from snovault.schema_validation import FormatChecker from snovault.server_defaults import test_accession from .server_defaults import ( ACCESSION_FACTORY, diff --git a/src/encoded/schemas/consortium.json b/src/encoded/schemas/consortium.json index f516a22ea..685a50d07 100644 --- a/src/encoded/schemas/consortium.json +++ b/src/encoded/schemas/consortium.json @@ -1,7 +1,7 @@ { "title": "Consortium", - "id": "/profiles/consortium.json", - "$schema": "http://json-schema.org/draft-04/schema#", + "$id": "/profiles/consortium.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", "required": [ "name", "title" diff --git a/src/encoded/schemas/submission_center.json b/src/encoded/schemas/submission_center.json index 1d1ccd1f7..eb0cf52c7 100644 --- a/src/encoded/schemas/submission_center.json +++ b/src/encoded/schemas/submission_center.json @@ -1,7 +1,7 @@ { "title": "SubmissionCenter", - "id": "/profiles/submission_center.json", - "$schema": "http://json-schema.org/draft-04/schema#", + "$id": "/profiles/submission_center.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", "required": [ "name", "title" diff --git a/src/encoded/server_defaults.py b/src/encoded/server_defaults.py index c591e3c4d..1efe98e10 100644 --- a/src/encoded/server_defaults.py +++ b/src/encoded/server_defaults.py @@ -1,5 +1,5 @@ from dcicutils.misc_utils import ignored -from jsonschema_serialize_fork import NO_DEFAULT +from snovault.schema_validation import NO_DEFAULT from snovault.schema_utils import server_default from snovault.server_defaults import get_user_resource diff --git a/src/encoded/tests/test_schemas.py b/src/encoded/tests/test_schemas.py index 78c789dba..91ee29bf5 100644 --- a/src/encoded/tests/test_schemas.py +++ b/src/encoded/tests/test_schemas.py @@ -99,7 +99,7 @@ def test_load_schema(schema, master_mixins, registry, testapp): if schema not in ['namespaces.json', 'mixins.json']: # check that schema.id is same as /profiles/schema - idtag = loaded_schema['id'] + idtag = loaded_schema['$id'] idtag = idtag.replace('/profiles/', '') # special case for access_key.json if schema == 'access_key.json': From b55dc78225ad80df8d161510852c578a4798c2c8 Mon Sep 17 00:00:00 2001 From: William Ronchetti Date: Mon, 7 Aug 2023 14:20:28 -0400 Subject: [PATCH 4/6] new snovault --- Dockerfile | 2 +- poetry.lock | 205 ++++++++++++++++++++++++++++++++++++++++++++----- pyproject.toml | 13 +--- 3 files changed, 191 insertions(+), 29 deletions(-) diff --git a/Dockerfile b/Dockerfile index b58058c76..ad6928caa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,7 +23,7 @@ ENV NGINX_USER=nginx \ NVM_VERSION=v0.39.1 \ NODE_VERSION=16.14.0 -# Configure Python3.7 venv +# Configure Python3.9 venv ENV VIRTUAL_ENV=/opt/venv RUN python -m venv /opt/venv ENV PATH="$VIRTUAL_ENV/bin:$PATH" diff --git a/poetry.lock b/poetry.lock index 449535fec..0521437c8 100644 --- a/poetry.lock +++ b/poetry.lock @@ -24,6 +24,25 @@ files = [ {file = "async_timeout-4.0.2-py3-none-any.whl", hash = "sha256:8ca1e4fcf50d07413d66d1a5e416e42cfdf5851c981d679a09851a6853383b3c"}, ] +[[package]] +name = "attrs" +version = "23.1.0" +description = "Classes Without Boilerplate" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "attrs-23.1.0-py3-none-any.whl", hash = "sha256:1f28b4522cdc2fb4256ac1a020c78acf9cba2c6b461ccd2c126f3aa8e8335d04"}, + {file = "attrs-23.1.0.tar.gz", hash = "sha256:6279836d581513a26f1bf235f9acd333bc9115683f14f7e8fae46c98fc50e015"}, +] + +[package.extras] +cov = ["attrs[tests]", "coverage[toml] (>=5.3)"] +dev = ["attrs[docs,tests]", "pre-commit"] +docs = ["furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier", "zope-interface"] +tests = ["attrs[tests-no-zope]", "zope-interface"] +tests-no-zope = ["cloudpickle", "hypothesis", "mypy (>=1.1.1)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] + [[package]] name = "aws-requests-auth" version = "0.4.3" @@ -865,14 +884,14 @@ test-randomorder = ["pytest-randomly"] [[package]] name = "dcicsnovault" -version = "8.2.0.1b45" +version = "10.0.0" description = "Storage support for 4DN Data Portals." category = "main" optional = false python-versions = ">=3.8.1,<3.10" files = [ - {file = "dcicsnovault-8.2.0.1b45-py3-none-any.whl", hash = "sha256:86e79026a3108366c1215113eac6cb9c776142370d9c49b6693bd72382eafbc4"}, - {file = "dcicsnovault-8.2.0.1b45.tar.gz", hash = "sha256:16931980239377e5bfd7b6b55b3870f82e8400ba54ca895cae6d8cc825a1fb97"}, + {file = "dcicsnovault-10.0.0-py3-none-any.whl", hash = "sha256:0213097a5a812a3f6aee6b9f407dbf56d8ee65517474a183bc8282c03ecbbf83"}, + {file = "dcicsnovault-10.0.0.tar.gz", hash = "sha256:f74795ed55da550e39bb6a0b2a4deed2d9747197c77e2cba4131f8a10d93d481"}, ] [package.dependencies] @@ -885,7 +904,7 @@ elasticsearch_dsl = ">=7.4.0,<8.0.0" future = ">=0.15.2,<1" html5lib = ">=1.1" humanfriendly = ">=1.44.9,<2.0.0" -jsonschema_serialize_fork = ">=2.1.1,<3.0.0" +jsonschema = ">=4.18.4,<5.0.0" netaddr = ">=0.8.0,<1" passlib = ">=1.7.4,<2.0.0" pillow = ">=9.5.0,<10.0.0" @@ -922,14 +941,14 @@ xlrd = ">=1.0.0,<2.0.0" [[package]] name = "dcicutils" -version = "7.5.1.1b0" +version = "7.7.0" description = "Utility package for interacting with the 4DN Data Portal and other 4DN resources" category = "main" optional = false python-versions = ">=3.7,<3.10" files = [ - {file = "dcicutils-7.5.1.1b0-py3-none-any.whl", hash = "sha256:b8fcf538089b6619f3c7b2820e341226f064647c8079113e4325ad1e3f84392d"}, - {file = "dcicutils-7.5.1.1b0.tar.gz", hash = "sha256:a5f2597b5050a53a4fe368ded9420010931c151b3e9c52ccbbe045332c4ca52e"}, + {file = "dcicutils-7.7.0-py3-none-any.whl", hash = "sha256:bbc6be71a6241641e8fba3827d02a5210b6aafd12381e95a4a2abf57e804ce12"}, + {file = "dcicutils-7.7.0.tar.gz", hash = "sha256:dd1e028f1c36a0ee9b5972f5d16d8c9bc53c8d80ece69f8ebd73dd2225842448"}, ] [package.dependencies] @@ -1043,24 +1062,23 @@ develop = ["coverage (<5.0.0)", "mock", "pytest (>=3.0.0)", "pytest-cov", "pytes [[package]] name = "encoded-core" -version = "0.0.2" +version = "0.0.3" description = "Core data models for Park Lab ENCODE based projects" category = "main" optional = false python-versions = ">=3.8.1,<3.10" files = [ - {file = "encoded_core-0.0.2-py3-none-any.whl", hash = "sha256:37d0373c41b9d2de1949bffe8b57494e55e474e4158af6728e2ccdac4330e96b"}, - {file = "encoded_core-0.0.2.tar.gz", hash = "sha256:ba7ede8abdf09dea79eef7f29d079ad5ad2ee7ec6eb6e7b2b3f57fd668b75da9"}, + {file = "encoded_core-0.0.3-py3-none-any.whl", hash = "sha256:73c80e63e2202272582c0d57043d170142f2b479a108743e6f306fc542003d0c"}, + {file = "encoded_core-0.0.3.tar.gz", hash = "sha256:d5d83119d2b5d3d7d4379a584e13b5601509354bf4a0ae6900c3b63005f39266"}, ] [package.dependencies] awscli = ">=1.25.36" boto3 = ">=1.24.36,<2.0.0" botocore = ">=1.27.36,<2.0.0" -dcicsnovault = ">=8.0.1.0b3,<9.0.0.0" -dcicutils = ">=7.0.0,<8.0.0" +dcicsnovault = ">=10.0.0,<11.0.0" +dcicutils = ">=7.7.0,<8.0.0" elasticsearch = "7.13.4" -jsonschema_serialize_fork = ">=2.1.1,<3.0.0" plaster-pastedeploy = "0.6" psycopg2-binary = ">=2.9.3,<3.0.0" PyJWT = ">=2.6.0,<3.0.0" @@ -1378,16 +1396,42 @@ files = [ ] [[package]] -name = "jsonschema-serialize-fork" -version = "2.1.1" -description = "Fork of Julian Berman's jsonschema to include support for serializing defaults" +name = "jsonschema" +version = "4.19.0" +description = "An implementation of JSON Schema validation for Python" category = "main" optional = false -python-versions = "*" +python-versions = ">=3.8" +files = [ + {file = "jsonschema-4.19.0-py3-none-any.whl", hash = "sha256:043dc26a3845ff09d20e4420d6012a9c91c9aa8999fa184e7efcfeccb41e32cb"}, + {file = "jsonschema-4.19.0.tar.gz", hash = "sha256:6e1e7569ac13be8139b2dd2c21a55d350066ee3f80df06c608b398cdc6f30e8f"}, +] + +[package.dependencies] +attrs = ">=22.2.0" +jsonschema-specifications = ">=2023.03.6" +referencing = ">=0.28.4" +rpds-py = ">=0.7.1" + +[package.extras] +format = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339-validator", "rfc3987", "uri-template", "webcolors (>=1.11)"] +format-nongpl = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339-validator", "rfc3986-validator (>0.1.0)", "uri-template", "webcolors (>=1.11)"] + +[[package]] +name = "jsonschema-specifications" +version = "2023.7.1" +description = "The JSON Schema meta-schemas and vocabularies, exposed as a Registry" +category = "main" +optional = false +python-versions = ">=3.8" files = [ - {file = "jsonschema_serialize_fork-2.1.1.tar.gz", hash = "sha256:49b502326ac408729f72c95db018bf0e4d47860e3cd76e944f368f41a5483ed5"}, + {file = "jsonschema_specifications-2023.7.1-py3-none-any.whl", hash = "sha256:05adf340b659828a004220a9613be00fa3f223f2b82002e273dee62fd50524b1"}, + {file = "jsonschema_specifications-2023.7.1.tar.gz", hash = "sha256:c91a50404e88a1f6ba40636778e2ee08f6e24c5613fe4c53ac24578a5a7f72bb"}, ] +[package.dependencies] +referencing = ">=0.28.0" + [[package]] name = "loremipsum" version = "1.0.5" @@ -2299,6 +2343,22 @@ async-timeout = {version = ">=4.0.2", markers = "python_full_version <= \"3.11.2 hiredis = ["hiredis (>=1.0.0)"] ocsp = ["cryptography (>=36.0.1)", "pyopenssl (==20.0.1)", "requests (>=2.26.0)"] +[[package]] +name = "referencing" +version = "0.30.2" +description = "JSON Referencing + Python" +category = "main" +optional = false +python-versions = ">=3.8" +files = [ + {file = "referencing-0.30.2-py3-none-any.whl", hash = "sha256:449b6669b6121a9e96a7f9e410b245d471e8d48964c67113ce9afe50c8dd7bdf"}, + {file = "referencing-0.30.2.tar.gz", hash = "sha256:794ad8003c65938edcdbc027f1933215e0d0ccc0291e3ce20a4d87432b59efc0"}, +] + +[package.dependencies] +attrs = ">=22.2.0" +rpds-py = ">=0.7.0" + [[package]] name = "repoze-debug" version = "1.1" @@ -2355,6 +2415,113 @@ files = [ [package.extras] idna2008 = ["idna"] +[[package]] +name = "rpds-py" +version = "0.9.2" +description = "Python bindings to Rust's persistent data structures (rpds)" +category = "main" +optional = false +python-versions = ">=3.8" +files = [ + {file = "rpds_py-0.9.2-cp310-cp310-macosx_10_7_x86_64.whl", hash = "sha256:ab6919a09c055c9b092798ce18c6c4adf49d24d4d9e43a92b257e3f2548231e7"}, + {file = "rpds_py-0.9.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:d55777a80f78dd09410bd84ff8c95ee05519f41113b2df90a69622f5540c4f8b"}, + {file = "rpds_py-0.9.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a216b26e5af0a8e265d4efd65d3bcec5fba6b26909014effe20cd302fd1138fa"}, + {file = "rpds_py-0.9.2-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:29cd8bfb2d716366a035913ced99188a79b623a3512292963d84d3e06e63b496"}, + {file = "rpds_py-0.9.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:44659b1f326214950a8204a248ca6199535e73a694be8d3e0e869f820767f12f"}, + {file = "rpds_py-0.9.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:745f5a43fdd7d6d25a53ab1a99979e7f8ea419dfefebcab0a5a1e9095490ee5e"}, + {file = "rpds_py-0.9.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a987578ac5214f18b99d1f2a3851cba5b09f4a689818a106c23dbad0dfeb760f"}, + {file = "rpds_py-0.9.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:bf4151acb541b6e895354f6ff9ac06995ad9e4175cbc6d30aaed08856558201f"}, + {file = "rpds_py-0.9.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:03421628f0dc10a4119d714a17f646e2837126a25ac7a256bdf7c3943400f67f"}, + {file = "rpds_py-0.9.2-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:13b602dc3e8dff3063734f02dcf05111e887f301fdda74151a93dbbc249930fe"}, + {file = "rpds_py-0.9.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:fae5cb554b604b3f9e2c608241b5d8d303e410d7dfb6d397c335f983495ce7f6"}, + {file = "rpds_py-0.9.2-cp310-none-win32.whl", hash = "sha256:47c5f58a8e0c2c920cc7783113df2fc4ff12bf3a411d985012f145e9242a2764"}, + {file = "rpds_py-0.9.2-cp310-none-win_amd64.whl", hash = "sha256:4ea6b73c22d8182dff91155af018b11aac9ff7eca085750455c5990cb1cfae6e"}, + {file = "rpds_py-0.9.2-cp311-cp311-macosx_10_7_x86_64.whl", hash = "sha256:e564d2238512c5ef5e9d79338ab77f1cbbda6c2d541ad41b2af445fb200385e3"}, + {file = "rpds_py-0.9.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f411330a6376fb50e5b7a3e66894e4a39e60ca2e17dce258d53768fea06a37bd"}, + {file = "rpds_py-0.9.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0e7521f5af0233e89939ad626b15278c71b69dc1dfccaa7b97bd4cdf96536bb7"}, + {file = "rpds_py-0.9.2-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:8d3335c03100a073883857e91db9f2e0ef8a1cf42dc0369cbb9151c149dbbc1b"}, + {file = "rpds_py-0.9.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d25b1c1096ef0447355f7293fbe9ad740f7c47ae032c2884113f8e87660d8f6e"}, + {file = "rpds_py-0.9.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6a5d3fbd02efd9cf6a8ffc2f17b53a33542f6b154e88dd7b42ef4a4c0700fdad"}, + {file = "rpds_py-0.9.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c5934e2833afeaf36bd1eadb57256239785f5af0220ed8d21c2896ec4d3a765f"}, + {file = "rpds_py-0.9.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:095b460e117685867d45548fbd8598a8d9999227e9061ee7f012d9d264e6048d"}, + {file = "rpds_py-0.9.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:91378d9f4151adc223d584489591dbb79f78814c0734a7c3bfa9c9e09978121c"}, + {file = "rpds_py-0.9.2-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:24a81c177379300220e907e9b864107614b144f6c2a15ed5c3450e19cf536fae"}, + {file = "rpds_py-0.9.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:de0b6eceb46141984671802d412568d22c6bacc9b230174f9e55fc72ef4f57de"}, + {file = "rpds_py-0.9.2-cp311-none-win32.whl", hash = "sha256:700375326ed641f3d9d32060a91513ad668bcb7e2cffb18415c399acb25de2ab"}, + {file = "rpds_py-0.9.2-cp311-none-win_amd64.whl", hash = "sha256:0766babfcf941db8607bdaf82569ec38107dbb03c7f0b72604a0b346b6eb3298"}, + {file = "rpds_py-0.9.2-cp312-cp312-macosx_10_7_x86_64.whl", hash = "sha256:b1440c291db3f98a914e1afd9d6541e8fc60b4c3aab1a9008d03da4651e67386"}, + {file = "rpds_py-0.9.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:0f2996fbac8e0b77fd67102becb9229986396e051f33dbceada3debaacc7033f"}, + {file = "rpds_py-0.9.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9f30d205755566a25f2ae0382944fcae2f350500ae4df4e795efa9e850821d82"}, + {file = "rpds_py-0.9.2-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:159fba751a1e6b1c69244e23ba6c28f879a8758a3e992ed056d86d74a194a0f3"}, + {file = "rpds_py-0.9.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a1f044792e1adcea82468a72310c66a7f08728d72a244730d14880cd1dabe36b"}, + {file = "rpds_py-0.9.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9251eb8aa82e6cf88510530b29eef4fac825a2b709baf5b94a6094894f252387"}, + {file = "rpds_py-0.9.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:01899794b654e616c8625b194ddd1e5b51ef5b60ed61baa7a2d9c2ad7b2a4238"}, + {file = "rpds_py-0.9.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b0c43f8ae8f6be1d605b0465671124aa8d6a0e40f1fb81dcea28b7e3d87ca1e1"}, + {file = "rpds_py-0.9.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:207f57c402d1f8712618f737356e4b6f35253b6d20a324d9a47cb9f38ee43a6b"}, + {file = "rpds_py-0.9.2-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:b52e7c5ae35b00566d244ffefba0f46bb6bec749a50412acf42b1c3f402e2c90"}, + {file = "rpds_py-0.9.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:978fa96dbb005d599ec4fd9ed301b1cc45f1a8f7982d4793faf20b404b56677d"}, + {file = "rpds_py-0.9.2-cp38-cp38-macosx_10_7_x86_64.whl", hash = "sha256:6aa8326a4a608e1c28da191edd7c924dff445251b94653988efb059b16577a4d"}, + {file = "rpds_py-0.9.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:aad51239bee6bff6823bbbdc8ad85136c6125542bbc609e035ab98ca1e32a192"}, + {file = "rpds_py-0.9.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4bd4dc3602370679c2dfb818d9c97b1137d4dd412230cfecd3c66a1bf388a196"}, + {file = "rpds_py-0.9.2-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:dd9da77c6ec1f258387957b754f0df60766ac23ed698b61941ba9acccd3284d1"}, + {file = "rpds_py-0.9.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:190ca6f55042ea4649ed19c9093a9be9d63cd8a97880106747d7147f88a49d18"}, + {file = "rpds_py-0.9.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:876bf9ed62323bc7dcfc261dbc5572c996ef26fe6406b0ff985cbcf460fc8a4c"}, + {file = "rpds_py-0.9.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fa2818759aba55df50592ecbc95ebcdc99917fa7b55cc6796235b04193eb3c55"}, + {file = "rpds_py-0.9.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:9ea4d00850ef1e917815e59b078ecb338f6a8efda23369677c54a5825dbebb55"}, + {file = "rpds_py-0.9.2-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:5855c85eb8b8a968a74dc7fb014c9166a05e7e7a8377fb91d78512900aadd13d"}, + {file = "rpds_py-0.9.2-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:14c408e9d1a80dcb45c05a5149e5961aadb912fff42ca1dd9b68c0044904eb32"}, + {file = "rpds_py-0.9.2-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:65a0583c43d9f22cb2130c7b110e695fff834fd5e832a776a107197e59a1898e"}, + {file = "rpds_py-0.9.2-cp38-none-win32.whl", hash = "sha256:71f2f7715935a61fa3e4ae91d91b67e571aeb5cb5d10331ab681256bda2ad920"}, + {file = "rpds_py-0.9.2-cp38-none-win_amd64.whl", hash = "sha256:674c704605092e3ebbbd13687b09c9f78c362a4bc710343efe37a91457123044"}, + {file = "rpds_py-0.9.2-cp39-cp39-macosx_10_7_x86_64.whl", hash = "sha256:07e2c54bef6838fa44c48dfbc8234e8e2466d851124b551fc4e07a1cfeb37260"}, + {file = "rpds_py-0.9.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:f7fdf55283ad38c33e35e2855565361f4bf0abd02470b8ab28d499c663bc5d7c"}, + {file = "rpds_py-0.9.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:890ba852c16ace6ed9f90e8670f2c1c178d96510a21b06d2fa12d8783a905193"}, + {file = "rpds_py-0.9.2-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:50025635ba8b629a86d9d5474e650da304cb46bbb4d18690532dd79341467846"}, + {file = "rpds_py-0.9.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:517cbf6e67ae3623c5127206489d69eb2bdb27239a3c3cc559350ef52a3bbf0b"}, + {file = "rpds_py-0.9.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0836d71ca19071090d524739420a61580f3f894618d10b666cf3d9a1688355b1"}, + {file = "rpds_py-0.9.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9c439fd54b2b9053717cca3de9583be6584b384d88d045f97d409f0ca867d80f"}, + {file = "rpds_py-0.9.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f68996a3b3dc9335037f82754f9cdbe3a95db42bde571d8c3be26cc6245f2324"}, + {file = "rpds_py-0.9.2-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:7d68dc8acded354c972116f59b5eb2e5864432948e098c19fe6994926d8e15c3"}, + {file = "rpds_py-0.9.2-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:f963c6b1218b96db85fc37a9f0851eaf8b9040aa46dec112611697a7023da535"}, + {file = "rpds_py-0.9.2-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:5a46859d7f947061b4010e554ccd1791467d1b1759f2dc2ec9055fa239f1bc26"}, + {file = "rpds_py-0.9.2-cp39-none-win32.whl", hash = "sha256:e07e5dbf8a83c66783a9fe2d4566968ea8c161199680e8ad38d53e075df5f0d0"}, + {file = "rpds_py-0.9.2-cp39-none-win_amd64.whl", hash = "sha256:682726178138ea45a0766907957b60f3a1bf3acdf212436be9733f28b6c5af3c"}, + {file = "rpds_py-0.9.2-pp310-pypy310_pp73-macosx_10_7_x86_64.whl", hash = "sha256:196cb208825a8b9c8fc360dc0f87993b8b260038615230242bf18ec84447c08d"}, + {file = "rpds_py-0.9.2-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:c7671d45530fcb6d5e22fd40c97e1e1e01965fc298cbda523bb640f3d923b387"}, + {file = "rpds_py-0.9.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:83b32f0940adec65099f3b1c215ef7f1d025d13ff947975a055989cb7fd019a4"}, + {file = "rpds_py-0.9.2-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:7f67da97f5b9eac838b6980fc6da268622e91f8960e083a34533ca710bec8611"}, + {file = "rpds_py-0.9.2-pp310-pypy310_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:03975db5f103997904c37e804e5f340c8fdabbb5883f26ee50a255d664eed58c"}, + {file = "rpds_py-0.9.2-pp310-pypy310_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:987b06d1cdb28f88a42e4fb8a87f094e43f3c435ed8e486533aea0bf2e53d931"}, + {file = "rpds_py-0.9.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c861a7e4aef15ff91233751619ce3a3d2b9e5877e0fcd76f9ea4f6847183aa16"}, + {file = "rpds_py-0.9.2-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:02938432352359805b6da099c9c95c8a0547fe4b274ce8f1a91677401bb9a45f"}, + {file = "rpds_py-0.9.2-pp310-pypy310_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:ef1f08f2a924837e112cba2953e15aacfccbbfcd773b4b9b4723f8f2ddded08e"}, + {file = "rpds_py-0.9.2-pp310-pypy310_pp73-musllinux_1_2_i686.whl", hash = "sha256:35da5cc5cb37c04c4ee03128ad59b8c3941a1e5cd398d78c37f716f32a9b7f67"}, + {file = "rpds_py-0.9.2-pp310-pypy310_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:141acb9d4ccc04e704e5992d35472f78c35af047fa0cfae2923835d153f091be"}, + {file = "rpds_py-0.9.2-pp38-pypy38_pp73-macosx_10_7_x86_64.whl", hash = "sha256:79f594919d2c1a0cc17d1988a6adaf9a2f000d2e1048f71f298b056b1018e872"}, + {file = "rpds_py-0.9.2-pp38-pypy38_pp73-macosx_11_0_arm64.whl", hash = "sha256:a06418fe1155e72e16dddc68bb3780ae44cebb2912fbd8bb6ff9161de56e1798"}, + {file = "rpds_py-0.9.2-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8b2eb034c94b0b96d5eddb290b7b5198460e2d5d0c421751713953a9c4e47d10"}, + {file = "rpds_py-0.9.2-pp38-pypy38_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:8b08605d248b974eb02f40bdcd1a35d3924c83a2a5e8f5d0fa5af852c4d960af"}, + {file = "rpds_py-0.9.2-pp38-pypy38_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a0805911caedfe2736935250be5008b261f10a729a303f676d3d5fea6900c96a"}, + {file = "rpds_py-0.9.2-pp38-pypy38_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ab2299e3f92aa5417d5e16bb45bb4586171c1327568f638e8453c9f8d9e0f020"}, + {file = "rpds_py-0.9.2-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8c8d7594e38cf98d8a7df25b440f684b510cf4627fe038c297a87496d10a174f"}, + {file = "rpds_py-0.9.2-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:8b9ec12ad5f0a4625db34db7e0005be2632c1013b253a4a60e8302ad4d462afd"}, + {file = "rpds_py-0.9.2-pp38-pypy38_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:1fcdee18fea97238ed17ab6478c66b2095e4ae7177e35fb71fbe561a27adf620"}, + {file = "rpds_py-0.9.2-pp38-pypy38_pp73-musllinux_1_2_i686.whl", hash = "sha256:933a7d5cd4b84f959aedeb84f2030f0a01d63ae6cf256629af3081cf3e3426e8"}, + {file = "rpds_py-0.9.2-pp38-pypy38_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:686ba516e02db6d6f8c279d1641f7067ebb5dc58b1d0536c4aaebb7bf01cdc5d"}, + {file = "rpds_py-0.9.2-pp39-pypy39_pp73-macosx_10_7_x86_64.whl", hash = "sha256:0173c0444bec0a3d7d848eaeca2d8bd32a1b43f3d3fde6617aac3731fa4be05f"}, + {file = "rpds_py-0.9.2-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:d576c3ef8c7b2d560e301eb33891d1944d965a4d7a2eacb6332eee8a71827db6"}, + {file = "rpds_py-0.9.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ed89861ee8c8c47d6beb742a602f912b1bb64f598b1e2f3d758948721d44d468"}, + {file = "rpds_py-0.9.2-pp39-pypy39_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:1054a08e818f8e18910f1bee731583fe8f899b0a0a5044c6e680ceea34f93876"}, + {file = "rpds_py-0.9.2-pp39-pypy39_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:99e7c4bb27ff1aab90dcc3e9d37ee5af0231ed98d99cb6f5250de28889a3d502"}, + {file = "rpds_py-0.9.2-pp39-pypy39_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c545d9d14d47be716495076b659db179206e3fd997769bc01e2d550eeb685596"}, + {file = "rpds_py-0.9.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9039a11bca3c41be5a58282ed81ae422fa680409022b996032a43badef2a3752"}, + {file = "rpds_py-0.9.2-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:fb39aca7a64ad0c9490adfa719dbeeb87d13be137ca189d2564e596f8ba32c07"}, + {file = "rpds_py-0.9.2-pp39-pypy39_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:2d8b3b3a2ce0eaa00c5bbbb60b6713e94e7e0becab7b3db6c5c77f979e8ed1f1"}, + {file = "rpds_py-0.9.2-pp39-pypy39_pp73-musllinux_1_2_i686.whl", hash = "sha256:99b1c16f732b3a9971406fbfe18468592c5a3529585a45a35adbc1389a529a03"}, + {file = "rpds_py-0.9.2-pp39-pypy39_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:c27ee01a6c3223025f4badd533bea5e87c988cb0ba2811b690395dfe16088cfe"}, + {file = "rpds_py-0.9.2.tar.gz", hash = "sha256:8d70e8f14900f2657c249ea4def963bed86a29b81f81f5b76b5a9215680de945"}, +] + [[package]] name = "rsa" version = "3.3" @@ -3132,4 +3299,4 @@ test = ["zope.testing"] [metadata] lock-version = "2.0" python-versions = ">=3.9.1,<3.10" -content-hash = "4f8b19950eebeff4454807dfecc04db694f0d7df91a478dda22588d4cf90cd00" +content-hash = "50a5b716b03be6d603225c24c816a2cd0637b781878dafcdc327d3086c5f5c65" diff --git a/pyproject.toml b/pyproject.toml index 49078c387..c5b394111 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,17 +42,15 @@ certifi = ">=2021.5.30" chardet = "3.0.4" codeguru-profiler-agent = "^1.2.4" colorama = "0.3.3" -dcicsnovault = "^9.9.0.0b0" -dcicutils = "^7.5.2" -encoded-core = "^0.0.2" +dcicsnovault = "^10.0.0" +dcicutils = "^7.7.0" +encoded-core = "^0.0.3" elasticsearch = "7.13.4" execnet = "1.4.1" -# html5lib = "0.9999999" humanfriendly = "^1.44.9" hupper = "1.5" idna = ">=2.10,<3" jmespath = "0.9.0" -jsonschema_serialize_fork = "^2.1.1" loremipsum = "1.0.5" netaddr = ">=0.8.0,<1" openpyxl = "^3.0.7,!=3.0.8" # a version 3.0.8 appeared but then got withdrawn, for now just pin 3.0.7. try again later. @@ -77,7 +75,6 @@ pyramid-retry = "^1.0" pyramid-tm = "^2.4" pyramid_translogger = "^0.1" python-dateutil = "^2.8.2" -# python-magic is presently pinned to 0.4.15 in lockstep with dcicsnovault's requirements. See explanation there. python_magic = ">=0.4.24,<1" pytz = ">=2021.3" rdflib = "^4.2.2" @@ -88,12 +85,10 @@ requests = "^2.23.0" rfc3986 = "^1.4.0" rsa = "3.3" rutter = ">=0.3,<1" -# We don't use this directly. It's part of boto3. It slows down solving to pin. -# s3transfer = ">=0.3.7,<0.4.0" sentry-sdk = "^1.5.6" simplejson = "^3.17.0" SPARQLWrapper = "^1.8.5" -SQLAlchemy = "1.4.41" # Pinned because >=1.3.17 is broken for us (circular constraints prevent deletes) +SQLAlchemy = "1.4.41" structlog = ">=19.2.0,<20" #submit4dn = "0.9.7" subprocess-middleware = "^0.3.0" From a97ded90256fbc20e7253c862a3c622a35f9dd3e Mon Sep 17 00:00:00 2001 From: William Ronchetti Date: Mon, 7 Aug 2023 14:22:19 -0400 Subject: [PATCH 5/6] version, changelog --- CHANGELOG.rst | 12 +++++++++++- pyproject.toml | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 457fe1f53..c2ead352a 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -7,6 +7,13 @@ smaht-portal Change Log ---------- +0.0.6 +===== + +* Removes ``jsonschema_serialize_fork``, use new schema draft version +* Implement ``$merge`` referential schema fields + + 0.0.5 ===== @@ -15,6 +22,7 @@ Change Log * Allow testing with ES in GA with smaht-development credentials * Build Docker as part of GA + 0.0.4 ===== @@ -23,6 +31,7 @@ Change Log * Update to use Webpack 5 * Do some light adjustments to be more compatible with Google Analytics 4 down the line + 0.0.3 ===== @@ -34,9 +43,10 @@ Change Log * Implement base level permissioning scheme working with ``consortia`` and ``submission_center`` + 0.0.1 ===== * Initial version * TODO: update base.ini, various other ini file templates once new AWS is provisioned -* TOOD: build GLOBAL_ENV_BUCKET for testing (conftest.py) \ No newline at end of file +* TOOD: build GLOBAL_ENV_BUCKET for testing (conftest.py) diff --git a/pyproject.toml b/pyproject.toml index c5b394111..017989020 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "encoded" -version = "0.0.5" +version = "0.0.6" description = "SMaHT Data Analysis Portal" authors = ["4DN-DCIC Team "] license = "MIT" From 34ae33b1839984258b91be3b692e147b50fcc924 Mon Sep 17 00:00:00 2001 From: William Ronchetti Date: Mon, 7 Aug 2023 16:05:26 -0400 Subject: [PATCH 6/6] verify non admin purge --- src/encoded/tests/test_permissions.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/encoded/tests/test_permissions.py b/src/encoded/tests/test_permissions.py index 361e7748d..ea455d0b9 100644 --- a/src/encoded/tests/test_permissions.py +++ b/src/encoded/tests/test_permissions.py @@ -60,6 +60,11 @@ def test_admin_can_purge(testapp, fastq_format): testapp.patch_json(f'/{fastq_format["uuid"]}', {'status': 'deleted'}, status=200) testapp.delete_json(f'/{fastq_format["uuid"]}/?purge=True', {}, status=200) + @staticmethod + def test_non_admin_cannot_purge(submitter_testapp, fastq_format): + submitter_testapp.patch_json(f'/{fastq_format["uuid"]}', {'status': 'deleted'}, status=422) + submitter_testapp.delete_json(f'/{fastq_format["uuid"]}/?purge=True', {}, status=403) + class TestPermissionsHelper: