diff --git a/poetry.lock b/poetry.lock index b39ed41f..a744a00e 100644 --- a/poetry.lock +++ b/poetry.lock @@ -43,17 +43,19 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [[package]] name = "attrs" -version = "22.1.0" +version = "22.2.0" description = "Classes Without Boilerplate" category = "dev" optional = false -python-versions = ">=3.5" +python-versions = ">=3.6" [package.extras] -dev = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "mypy (>=0.900,!=0.940)", "pytest-mypy-plugins", "zope.interface", "furo", "sphinx", "sphinx-notfound-page", "pre-commit", "cloudpickle"] -docs = ["furo", "sphinx", "zope.interface", "sphinx-notfound-page"] -tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "mypy (>=0.900,!=0.940)", "pytest-mypy-plugins", "zope.interface", "cloudpickle"] -tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "mypy (>=0.900,!=0.940)", "pytest-mypy-plugins", "cloudpickle"] +cov = ["attrs", "coverage-enable-subprocess", "coverage[toml] (>=5.3)"] +dev = ["attrs"] +docs = ["furo", "sphinx", "myst-parser", "zope.interface", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier"] +tests = ["attrs", "zope.interface"] +tests-no-zope = ["hypothesis", "pympler", "pytest (>=4.3.0)", "pytest-xdist", "cloudpickle", "mypy (>=0.971,<0.990)", "pytest-mypy-plugins"] +tests_no_zope = ["hypothesis", "pympler", "pytest (>=4.3.0)", "pytest-xdist", "cloudpickle", "mypy (>=0.971,<0.990)", "pytest-mypy-plugins"] [[package]] name = "bandit" @@ -112,7 +114,7 @@ python-versions = "~=3.5" [[package]] name = "certifi" -version = "2022.9.24" +version = "2022.12.7" description = "Python package for providing Mozilla's CA Bundle." category = "main" optional = false @@ -199,7 +201,7 @@ packaging = ">=20.4" [[package]] name = "cryptography" -version = "38.0.2" +version = "39.0.1" description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." category = "dev" optional = false @@ -209,12 +211,14 @@ python-versions = ">=3.6" cffi = ">=1.12" [package.extras] -docs = ["sphinx (>=1.6.5,!=1.8.0,!=3.1.0,!=3.1.1)", "sphinx-rtd-theme"] +docs = ["sphinx (>=5.3.0)", "sphinx-rtd-theme (>=1.1.1)"] docstest = ["pyenchant (>=1.6.11)", "twine (>=1.12.0)", "sphinxcontrib-spelling (>=4.0.1)"] -pep8test = ["black", "flake8", "flake8-import-order", "pep8-naming"] +pep8test = ["black", "ruff", "mypy", "types-pytz", "types-requests", "check-manifest"] sdist = ["setuptools-rust (>=0.11.4)"] ssh = ["bcrypt (>=3.1.5)"] -test = ["pytest (>=6.2.0)", "pytest-benchmark", "pytest-cov", "pytest-subtests", "pytest-xdist", "pretend", "iso8601", "pytz", "hypothesis (>=1.11.4,!=3.79.2)"] +test = ["pytest (>=6.2.0)", "pytest-shard (>=0.1.2)", "pytest-benchmark", "pytest-cov", "pytest-subtests", "pytest-xdist", "pretend", "iso8601", "pytz", "hypothesis (>=1.11.4,!=3.79.2)"] +test-randomorder = ["pytest-randomly"] +tox = ["tox"] [[package]] name = "dataclasses" @@ -374,7 +378,7 @@ importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} [[package]] name = "flake8-import-order" -version = "0.18.1" +version = "0.18.2" description = "Flake8 and pylama plugin that checks the ordering of import statements." category = "dev" optional = false @@ -497,7 +501,7 @@ typing-extensions = {version = ">=3.7.4.3", markers = "python_version < \"3.10\" [[package]] name = "greenlet" -version = "2.0.0" +version = "2.0.2" description = "Lightweight in-process concurrent programming" category = "main" optional = false @@ -505,11 +509,11 @@ python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*" [package.extras] docs = ["sphinx", "docutils (<0.18)"] -test = ["objgraph", "faulthandler"] +test = ["objgraph", "psutil"] [[package]] name = "icdiff" -version = "2.0.5" +version = "2.0.6" description = "improved colored diff" category = "dev" optional = false @@ -660,7 +664,7 @@ python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" [[package]] name = "pbr" -version = "5.11.0" +version = "5.11.1" description = "Python Build Reasonableness" category = "dev" optional = false @@ -695,14 +699,14 @@ testing = ["mock", "pytest", "pytest-rerunfailures"] [[package]] name = "pkginfo" -version = "1.8.3" -description = "Query metadatdata from sdists / bdists / installed packages." +version = "1.9.6" +description = "Query metadata from sdists / bdists / installed packages." category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" +python-versions = ">=3.6" [package.extras] -testing = ["nose", "coverage"] +testing = ["pytest", "pytest-cov"] [[package]] name = "pluggy" @@ -785,7 +789,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [[package]] name = "pygments" -version = "2.13.0" +version = "2.14.0" description = "Pygments is a syntax highlighting package written in Python." category = "dev" optional = false @@ -905,7 +909,7 @@ python-versions = "*" [[package]] name = "python-semantic-release" -version = "7.32.2" +version = "7.33.1" description = "Automatic Semantic Versioning for Python projects" category = "dev" optional = false @@ -929,11 +933,11 @@ twine = ">=3,<4" dev = ["tox", "isort", "black"] docs = ["Sphinx (==1.3.6)", "Jinja2 (==3.0.3)"] mypy = ["mypy", "types-requests"] -test = ["coverage (>=5,<6)", "pytest (>=5,<6)", "pytest-xdist (>=1,<2)", "pytest-mock (>=2,<3)", "responses (==0.13.3)", "mock (==1.3.0)"] +test = ["coverage (>=5,<6)", "pytest (>=7,<8)", "pytest-xdist (>=1,<2)", "pytest-mock (>=2,<3)", "responses (==0.13.3)", "mock (==1.3.0)"] [[package]] name = "pytz" -version = "2022.6" +version = "2022.7.1" description = "World timezone definitions, modern and historical" category = "main" optional = false @@ -1044,7 +1048,7 @@ python-versions = ">=3.5" [[package]] name = "safety" -version = "2.3.1" +version = "2.3.5" description = "Checks installed dependencies for known vulnerabilities and licenses." category = "dev" optional = false @@ -1054,7 +1058,7 @@ python-versions = "*" Click = ">=8.0.2" dataclasses = {version = "0.8", markers = "python_version == \"3.6\""} dparse = ">=0.6.2" -packaging = ">=21.0" +packaging = ">=21.0,<22.0" requests = "*" "ruamel.yaml" = ">=0.17.21" @@ -1100,7 +1104,7 @@ python-versions = ">=3.6" [[package]] name = "sqlalchemy" -version = "1.4.42" +version = "1.4.46" description = "Database Abstraction Library" category = "main" optional = false @@ -1231,11 +1235,11 @@ python-versions = ">=3.6" [[package]] name = "urllib3" -version = "1.26.12" +version = "1.26.14" description = "HTTP library with thread-safe connection pooling, file post, and more." category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <4" +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" [package.extras] brotli = ["brotlicffi (>=0.8.0)", "brotli (>=1.0.9)", "brotlipy (>=0.6.0)"] diff --git a/test/datagateway_api/db/test_database_filter_utilities.py b/test/datagateway_api/db/test_database_filter_utilities.py index 62780165..f4ff1df8 100644 --- a/test/datagateway_api/db/test_database_filter_utilities.py +++ b/test/datagateway_api/db/test_database_filter_utilities.py @@ -165,7 +165,10 @@ def test_invalid_get_field(self, flask_test_app_db): "name": "INVESTIGATION 1", "releaseDate": "2000-07-05 00:00:00", "startDate": "2000-04-03 00:00:00", - "summary": "Throw hope parent. Receive entire soon. War top air agent must voice high describe.\nMonth shake voice. Do discuss despite least face again study. Two beyond picture rich fast sea time.", + "summary": "Throw hope parent. Receive entire soon." + " War top air agent must voice high describe.\nMonth " + "shake voice. Do discuss despite least face again study." + " Two beyond picture rich fast sea time.", "title": "Analysis reflect work or hour color maybe." "\nMuch team discussion message weight.", "facilityID": 1, @@ -202,7 +205,10 @@ def test_invalid_get_field(self, flask_test_app_db): "name": "INVESTIGATION 1", "releaseDate": "2000-07-05 00:00:00", "startDate": "2000-04-03 00:00:00", - "summary": "Throw hope parent. Receive entire soon. War top air agent must voice high describe.\nMonth shake voice. Do discuss despite least face again study. Two beyond picture rich fast sea time.", + "summary": "Throw hope parent. Receive entire soon. " + "War top air agent must voice high describe.\nMonth " + "shake voice. Do discuss despite least face again study. " + "Two beyond picture rich fast sea time.", "title": "Analysis reflect work or hour color maybe." "\nMuch team discussion message weight.", "facilityID": 1, @@ -267,8 +273,11 @@ def test_invalid_get_field(self, flask_test_app_db): "name": "INVESTIGATION 29", "releaseDate": "2007-07-05 00:00:00", "startDate": "2007-04-03 00:00:00", - "summary": "City plant especially ever eight. Wife street under. Life character drive down. Bag sport benefit also price.\nIncrease spring box successful travel.", - "title": "Usually water six learn bring white development political. Meeting those voice hand.", + "summary": "City plant especially ever eight. Wife street" + " under. Life character drive down. Bag sport benefit also" + " price.\nIncrease spring box successful travel.", + "title": "Usually water six learn bring white development " + "political. Meeting those voice hand.", "facilityID": 1, "typeID": 1, "fileSize": 0, @@ -285,8 +294,12 @@ def test_invalid_get_field(self, flask_test_app_db): "name": "INVESTIGATION 29", "releaseDate": "2007-07-05 00:00:00", "startDate": "2007-04-03 00:00:00", - "summary": "City plant especially ever eight. Wife street under. Life character drive down. Bag sport benefit also price.\nIncrease spring box successful travel.", - "title": "Usually water six learn bring white development political. Meeting those voice hand.", + "summary": "City plant especially ever eight. " + "Wife street under. Life character drive down. Bag sport" + " benefit also price.\nIncrease spring box successful" + " travel.", + "title": "Usually water six learn bring white development " + "political. Meeting those voice hand.", "facilityID": 1, "typeID": 1, "fileSize": 0, diff --git a/test/datagateway_api/icat/test_query.py b/test/datagateway_api/icat/test_query.py index e4cf1be1..dac81ef1 100644 --- a/test/datagateway_api/icat/test_query.py +++ b/test/datagateway_api/icat/test_query.py @@ -2,6 +2,7 @@ from icat.entity import Entity import pytest + from datagateway_api.src.common.date_handler import DateHandler from datagateway_api.src.common.exceptions import PythonICATError from datagateway_api.src.datagateway_api.icat.filters import ( diff --git a/test/search_api/endpoints/test_count_dataset_files.py b/test/search_api/endpoints/test_count_dataset_files.py index 117d6a42..7344d096 100644 --- a/test/search_api/endpoints/test_count_dataset_files.py +++ b/test/search_api/endpoints/test_count_dataset_files.py @@ -8,33 +8,33 @@ class TestSearchAPICountDatasetFilesEndpoint: "pid, request_filter, expected_json", [ pytest.param( - "0-8401-1070-7", + "1-4978-6907-2", "{}", - {"count": 56}, + {"count": 15}, id="Basic /datasets/{pid}/files/count request", # Skipped because empty dict for filter doesn't work on where marks=pytest.mark.skip, ), pytest.param( - "0-8401-1070-7", - '{"name": "Datafile 10060"}', + "1-4978-6907-2", + '{"name": "Datafile 1547"}', {"count": 1}, id="Count dataset files with name condition", ), pytest.param( - "0-8401-1070-7", - '{"name": {"nlike": "Datafile 10060"}}', - {"count": 55}, + "1-4978-6907-2", + '{"name": {"nlike": "Datafile 9"}}', + {"count": 14}, id="Count dataset files with name condition (operator specified)", ), pytest.param( - "0-8401-1070-7", - '{"size": {"gt": 50000000}}', - {"count": 40}, + "1-4978-6907-2", + '{"size": {"gt": 500}}', + {"count": 15}, id="Count dataset files with size condition", ), pytest.param( - "0-8401-1070-7", + "1-4978-6907-2", '{"name": "Unknown Datafile"}', {"count": 0}, id="Count dataset files with filter to return zero count", diff --git a/test/search_api/endpoints/test_count_endpoint.py b/test/search_api/endpoints/test_count_endpoint.py index b9dddcb1..94719baa 100644 --- a/test/search_api/endpoints/test_count_endpoint.py +++ b/test/search_api/endpoints/test_count_endpoint.py @@ -51,14 +51,14 @@ class TestSearchAPICountEndpoint: ), pytest.param( "datasets", - '{"title": {"like": "DATASET 30"}}', + '{"title": {"like": "DATASET 3"}}', {"count": 11}, id="Dataset count with where (operator specified)", ), pytest.param( "documents", '{"summary": {"ilike": "nature"}}', - {"count": 7}, + {"count": 1}, id="Document count with where (operator specified)", ), pytest.param( @@ -92,13 +92,13 @@ def test_valid_count_endpoint( pytest.param( "datasets", '{"isPublic": true}', - {"count": 479}, + {"count": 119}, id="Dataset count with isPublic condition (True)", ), pytest.param( "documents", '{"isPublic": true}', - {"count": 239}, + {"count": 59}, id="Document count with isPublic condition (True)", ), pytest.param( diff --git a/test/search_api/endpoints/test_get_dataset_files.py b/test/search_api/endpoints/test_get_dataset_files.py index 91f2b784..9237076b 100644 --- a/test/search_api/endpoints/test_get_dataset_files.py +++ b/test/search_api/endpoints/test_get_dataset_files.py @@ -8,102 +8,102 @@ class TestSearchAPIGetDatasetFilesEndpoint: "pid, request_filter, expected_json", [ pytest.param( - "0-8401-1070-7", + "1-4978-6907-2", '{"limit": 2}', [ { - "id": "1", - "name": "Datafile 1", - "path": "/hit/consumer/red.jpg", - "size": 199643799, + "id": "1071", + "name": "Datafile 1071", + "path": "/sense/through/candidate.jpeg", + "size": 9390543, "dataset": None, }, { - "id": "10060", - "name": "Datafile 10060", - "path": "/the/current/next.jpg", - "size": 124327237, + "id": "119", + "name": "Datafile 119", + "path": "/five/with/question.bmp", + "size": 124185509, "dataset": None, }, ], id="Basic /datasets/{pid}/files request", ), pytest.param( - "0-8401-1070-7", + "1-4978-6907-2", '{"limit": 1, "skip": 5}', [ { - "id": "11976", - "name": "Datafile 11976", - "path": "/ahead/article/oil.jpg", - "size": 34418452, + "id": "1547", + "name": "Datafile 1547", + "path": "/training/value/share.gif", + "size": 80936756, "dataset": None, }, ], id="Get dataset files with skip", ), pytest.param( - "0-8401-1070-7", - '{"limit": 1, "where": {"name": "Datafile 10060"}}', + "1-4978-6907-2", + '{"limit": 1, "where": {"name": "Datafile 1547"}}', [ { - "id": "10060", - "name": "Datafile 10060", - "path": "/the/current/next.jpg", - "size": 124327237, + "id": "1547", + "name": "Datafile 1547", + "path": "/training/value/share.gif", + "size": 80936756, "dataset": None, }, ], id="Get dataset files with name condition", ), pytest.param( - "0-8401-1070-7", + "1-4978-6907-2", '{"limit": 1, "where": {"name": {"nilike": "Datafile 10060"}}}', [ { - "id": "1", - "name": "Datafile 1", - "path": "/hit/consumer/red.jpg", - "size": 199643799, + "id": "1071", + "name": "Datafile 1071", + "path": "/sense/through/candidate.jpeg", + "size": 9390543, "dataset": None, }, ], id="Get dataset files with name condition (operator specified)", ), pytest.param( - "0-8401-1070-7", + "1-4978-6907-2", '{"limit": 1, "where": {"size": {"gt": 5000000}}}', [ { - "id": "1", - "name": "Datafile 1", - "path": "/hit/consumer/red.jpg", - "size": 199643799, + "id": "1071", + "name": "Datafile 1071", + "path": "/sense/through/candidate.jpeg", + "size": 9390543, "dataset": None, }, ], id="Get dataset files with size condition", ), pytest.param( - "0-8401-1070-7", + "1-4978-6907-2", '{"limit": 1, "where": {"size": {"gt": 50000000000}}}', [], id="Get dataset files with condition to return empty list", ), pytest.param( - "0-8401-1070-7", + "1-4978-6907-2", '{"limit": 1, "include": [{"relation": "dataset"}]}', [ { - "id": "1", - "name": "Datafile 1", - "path": "/hit/consumer/red.jpg", - "size": 199643799, + "id": "1071", + "name": "Datafile 1071", + "path": "/sense/through/candidate.jpeg", + "size": 9390543, "dataset": { - "pid": "0-8401-1070-7", - "title": "DATASET 2", + "pid": "1-4978-6907-2", + "title": "DATASET 1", "isPublic": True, - "creationDate": "2013-04-01T10:56:52.000Z", + "creationDate": "2023-02-09T09:23:39.000Z", "size": None, "documents": [], "techniques": [], diff --git a/test/search_api/endpoints/test_get_entity_by_pid.py b/test/search_api/endpoints/test_get_entity_by_pid.py index cfe6264d..10d671f2 100644 --- a/test/search_api/endpoints/test_get_entity_by_pid.py +++ b/test/search_api/endpoints/test_get_entity_by_pid.py @@ -9,13 +9,13 @@ class TestSearchAPIGetByPIDEndpoint: [ pytest.param( "datasets", - "0-8401-1070-7", + "1-4978-6907-2", "{}", { - "pid": "0-8401-1070-7", - "title": "DATASET 2", + "pid": "1-4978-6907-2", + "title": "DATASET 1", "isPublic": True, - "creationDate": "2013-04-01T10:56:52.000Z", + "creationDate": "2023-02-09T09:23:39.000Z", "size": None, "documents": [], "techniques": [], @@ -28,99 +28,32 @@ class TestSearchAPIGetByPIDEndpoint: ), pytest.param( "documents", - "0-449-78690-0", + "0-417-77631-4", "{}", { - "pid": "0-449-78690-0", + "pid": "0-417-77631-4", "isPublic": True, - "type": "INVESTIGATIONTYPE 2", + "type": "INVESTIGATIONTYPE 3", "title": "INVESTIGATION 1", - "summary": "Season identify professor happen third. Beat" - " professional blue clear style have. Light final summer.", - "doi": "0-449-78690-0", + "summary": "Throw hope parent. Receive entire soon. " + "War top air agent must voice high describe.\nMonth shake " + "voice. Do discuss despite least face again study. Two " + "beyond picture rich fast sea time.", + "doi": "0-417-77631-4", "startDate": "2000-04-03T00:00:00.000Z", "endDate": "2000-07-09T00:00:00.000Z", "releaseDate": "2000-07-05T00:00:00.000Z", "license": None, "keywords": [ - "read123", - "boy129", - "out253", - "hour326", - "possible449", - "west566", - "scene948", - "who1253", - "capital1526", - "dream1989", - "front2347", - "inside2465", - "surface2851", - "learn2953", - "hot3053", - "just3159", - "population3261", - "cup3366", - "another3451", - "environmental3632", - "require3858", - "rock3952", - "determine4048", - "space4061", - "big4229", - "why4243", - "public4362", - "election4641", - "measure4996", - "often5014", - "develop5135", - "than5310", - "floor5312", - "check5327", - "cost5487", - "information6130", - "guy6180", - "admit6235", - "market6645", - "law6777", - "close7336", - "billion7597", - "product7964", - "American8041", - "language8246", - "school8277", - "specific8539", - "position8670", - "grow8702", - "time8899", - "weight9086", - "catch9129", - "speak9559", - "strong9621", - "development9757", - "best9786", - "identify10039", - "give10497", - "life10854", - "century11040", - "fire11580", - "leg11744", - "past11935", - "bar12034", - "do12108", - "prove12224", - "body12251", - "data12288", - "at12640", - "star12706", - "customer12795", - "small13058", - "event13141", - "now13193", - "magazine13415", - "policy13601", - "black13996", - "American14654", + "number22", + "shoulder85", + "local117", + "religious242", + "agreement263", + "mention362", + "game469", + "onto480", + "never495", ], "datasets": [], "members": [], @@ -142,100 +75,40 @@ class TestSearchAPIGetByPIDEndpoint: ), pytest.param( "datasets", - "0-8401-1070-7", + "1-4978-6907-2", '{"include": [{"relation": "documents"}]}', { - "pid": "0-8401-1070-7", - "title": "DATASET 2", + "pid": "1-4978-6907-2", + "title": "DATASET 1", "isPublic": True, - "creationDate": "2013-04-01T10:56:52.000Z", + "creationDate": "2023-02-09T09:23:39.000Z", "size": None, "documents": [ { - "pid": "0-9729806-3-6", + "pid": "0-417-77631-4", "isPublic": True, - "type": "INVESTIGATIONTYPE 1", - "title": "INVESTIGATION 2", - "summary": "Day purpose item create. Visit hope mean admit." - " The tonight adult cut foreign would situation fund." - "\nPurpose study usually gas think. Machine world doctor" - " rise be college treat.", - "doi": "0-9729806-3-6", - "startDate": "2000-06-04T00:00:00.000Z", - "endDate": "2000-09-14T00:00:00.000Z", - "releaseDate": "2000-02-10T00:00:00.000Z", + "type": "INVESTIGATIONTYPE 3", + "title": "INVESTIGATION 1", + "summary": "Throw hope parent. Receive entire " + "soon. War top air agent must voice high describe." + "\nMonth shake voice. Do discuss despite least " + "face again study. Two beyond picture rich " + "fast sea time.", + "doi": "0-417-77631-4", + "startDate": "2000-04-03T00:00:00.000Z", + "endDate": "2000-07-09T00:00:00.000Z", + "releaseDate": "2000-07-05T00:00:00.000Z", "license": None, "keywords": [ - "later868", - "black887", - "yard993", - "as1034", - "sister1072", - "knowledge1239", - "heart1286", - "soon1911", - "television2011", - "turn2206", - "PM2477", - "purpose2641", - "box3225", - "fall3339", - "minute3394", - "family3729", - "industry3903", - "throw4294", - "here4636", - "firm4658", - "same4777", - "travel5029", - "like5061", - "but5204", - "pass5300", - "industry5482", - "they6191", - "company6197", - "bed6368", - "shake6405", - "voice6555", - "above6582", - "former6596", - "body6759", - "price6828", - "star6879", - "clearly7066", - "wall7234", - "ground7790", - "maybe8191", - "population8212", - "indeed8287", - "decide8366", - "agree9237", - "color9257", - "once9593", - "two9737", - "they10312", - "heavy10342", - "decide10450", - "main10579", - "particular10646", - "number11411", - "investment11462", - "interesting11775", - "simple12151", - "stand12178", - "morning12276", - "fish12494", - "story12572", - "art13071", - "once13596", - "music13672", - "film13812", - "level14266", - "claim14304", - "nearly14473", - "eight14566", - "president14766", - "near14993", + "number22", + "shoulder85", + "local117", + "religious242", + "agreement263", + "mention362", + "game469", + "onto480", + "never495", ], "datasets": [], "members": [], @@ -252,106 +125,39 @@ class TestSearchAPIGetByPIDEndpoint: ), pytest.param( "documents", - "0-449-78690-0", + "0-417-77631-4", '{"include": [{"relation": "datasets"}]}', { - "pid": "0-449-78690-0", + "pid": "0-417-77631-4", "isPublic": True, - "type": "INVESTIGATIONTYPE 2", + "type": "INVESTIGATIONTYPE 3", "title": "INVESTIGATION 1", - "summary": "Season identify professor happen third. Beat" - " professional blue clear style have. Light final summer.", - "doi": "0-449-78690-0", + "summary": "Throw hope parent. Receive entire soon. " + "War top air agent must voice high describe.\nMonth " + "shake voice. Do discuss despite least face again study. " + "Two beyond picture rich fast sea time.", + "doi": "0-417-77631-4", "startDate": "2000-04-03T00:00:00.000Z", "endDate": "2000-07-09T00:00:00.000Z", "releaseDate": "2000-07-05T00:00:00.000Z", "license": None, "keywords": [ - "read123", - "boy129", - "out253", - "hour326", - "possible449", - "west566", - "scene948", - "who1253", - "capital1526", - "dream1989", - "front2347", - "inside2465", - "surface2851", - "learn2953", - "hot3053", - "just3159", - "population3261", - "cup3366", - "another3451", - "environmental3632", - "require3858", - "rock3952", - "determine4048", - "space4061", - "big4229", - "why4243", - "public4362", - "election4641", - "measure4996", - "often5014", - "develop5135", - "than5310", - "floor5312", - "check5327", - "cost5487", - "information6130", - "guy6180", - "admit6235", - "market6645", - "law6777", - "close7336", - "billion7597", - "product7964", - "American8041", - "language8246", - "school8277", - "specific8539", - "position8670", - "grow8702", - "time8899", - "weight9086", - "catch9129", - "speak9559", - "strong9621", - "development9757", - "best9786", - "identify10039", - "give10497", - "life10854", - "century11040", - "fire11580", - "leg11744", - "past11935", - "bar12034", - "do12108", - "prove12224", - "body12251", - "data12288", - "at12640", - "star12706", - "customer12795", - "small13058", - "event13141", - "now13193", - "magazine13415", - "policy13601", - "black13996", - "American14654", + "number22", + "shoulder85", + "local117", + "religious242", + "agreement263", + "mention362", + "game469", + "onto480", + "never495", ], "datasets": [ { - "pid": "0-449-78690-0", + "pid": "1-4978-6907-2", "title": "DATASET 1", "isPublic": True, - "creationDate": "2002-11-27T06:20:36.000Z", + "creationDate": "2023-02-09T09:23:39.000Z", "size": None, "documents": [], "techniques": [], @@ -361,10 +167,10 @@ class TestSearchAPIGetByPIDEndpoint: "samples": [], }, { - "pid": "0-353-84629-5", - "title": "DATASET 241", + "pid": "0-557-36716-6", + "title": "DATASET 61", "isPublic": True, - "creationDate": "2006-11-21T17:10:42.000Z", + "creationDate": "2023-02-09T09:23:54.000Z", "size": None, "documents": [], "techniques": [], @@ -396,7 +202,7 @@ class TestSearchAPIGetByPIDEndpoint: "modTime": "2019-01-29 23:33:20+00:00", "id": 2, "fullName": "With piece reason late model. House office fly." - " International scene call deep answer audience baby true.\n" + " International scene call deep answer audience baby True.\n" "Indicate education across these. Opportunity design too.", "url": "https://moore.org/", }, @@ -406,102 +212,43 @@ class TestSearchAPIGetByPIDEndpoint: ), pytest.param( "datasets", - "0-8401-1070-7", + "1-4978-6907-2", '{"include": [{"relation": "documents"},' ' {"relation": "files"}, {"relation": "parameters"},' ' {"relation": "samples"}]}', { - "pid": "0-8401-1070-7", - "title": "DATASET 2", + "pid": "1-4978-6907-2", + "title": "DATASET 1", "isPublic": True, - "creationDate": "2013-04-01T10:56:52.000Z", + "creationDate": "2023-02-09T09:23:39.000Z", "size": None, "documents": [ { - "pid": "0-9729806-3-6", + "pid": "0-417-77631-4", "isPublic": True, - "type": "INVESTIGATIONTYPE 1", - "title": "INVESTIGATION 2", - "summary": "Day purpose item create. Visit hope mean admit." - " The tonight adult cut foreign would situation fund." - "\nPurpose study usually gas think. Machine world doctor " - "rise be college treat.", - "doi": "0-9729806-3-6", - "startDate": "2000-06-04T00:00:00.000Z", - "endDate": "2000-09-14T00:00:00.000Z", - "releaseDate": "2000-02-10T00:00:00.000Z", + "type": "INVESTIGATIONTYPE 3", + "title": "INVESTIGATION 1", + "summary": "Throw hope parent. Receive entire " + "soon." + " War top air agent must voice high describe.\n" + "Month shake voice. Do discuss despite least face" + " again study. Two beyond picture rich fast " + "sea time.", + "doi": "0-417-77631-4", + "startDate": "2000-04-03T00:00:00.000Z", + "endDate": "2000-07-09T00:00:00.000Z", + "releaseDate": "2000-07-05T00:00:00.000Z", "license": None, "keywords": [ - "later868", - "black887", - "yard993", - "as1034", - "sister1072", - "knowledge1239", - "heart1286", - "soon1911", - "television2011", - "turn2206", - "PM2477", - "purpose2641", - "box3225", - "fall3339", - "minute3394", - "family3729", - "industry3903", - "throw4294", - "here4636", - "firm4658", - "same4777", - "travel5029", - "like5061", - "but5204", - "pass5300", - "industry5482", - "they6191", - "company6197", - "bed6368", - "shake6405", - "voice6555", - "above6582", - "former6596", - "body6759", - "price6828", - "star6879", - "clearly7066", - "wall7234", - "ground7790", - "maybe8191", - "population8212", - "indeed8287", - "decide8366", - "agree9237", - "color9257", - "once9593", - "two9737", - "they10312", - "heavy10342", - "decide10450", - "main10579", - "particular10646", - "number11411", - "investment11462", - "interesting11775", - "simple12151", - "stand12178", - "morning12276", - "fish12494", - "story12572", - "art13071", - "once13596", - "music13672", - "film13812", - "level14266", - "claim14304", - "nearly14473", - "eight14566", - "president14766", - "near14993", + "number22", + "shoulder85", + "local117", + "religious242", + "agreement263", + "mention362", + "game469", + "onto480", + "never495", ], "datasets": [], "members": [], @@ -512,407 +259,130 @@ class TestSearchAPIGetByPIDEndpoint: "instrument": None, "files": [ { - "id": "1", - "name": "Datafile 1", - "path": "/hit/consumer/red.jpg", - "size": 199643799, - "dataset": None, - }, - { - "id": "10060", - "name": "Datafile 10060", - "path": "/the/current/next.jpg", - "size": 124327237, - "dataset": None, - }, - { - "id": "10539", - "name": "Datafile 10539", - "path": "/end/its/thought.png", - "size": 189420967, - "dataset": None, - }, - { - "id": "11018", - "name": "Datafile 11018", - "path": "/break/foot/color.jpg", - "size": 35048325, - "dataset": None, - }, - { - "id": "11497", - "name": "Datafile 11497", - "path": "/item/decision/well.png", - "size": 118626932, - "dataset": None, - }, - { - "id": "11976", - "name": "Datafile 11976", - "path": "/ahead/article/oil.jpg", - "size": 34418452, - "dataset": None, - }, - { - "id": "12455", - "name": "Datafile 12455", - "path": "/movement/job/whom.bmp", - "size": 139175969, - "dataset": None, - }, - { - "id": "12934", - "name": "Datafile 12934", - "path": "/office/mean/house.bmp", - "size": 92937891, - "dataset": None, - }, - { - "id": "13413", - "name": "Datafile 13413", - "path": "/democratic/catch/large.png", - "size": 179126789, - "dataset": None, - }, - { - "id": "13892", - "name": "Datafile 13892", - "path": "/become/answer/time.jpg", - "size": 6129000, - "dataset": None, - }, - { - "id": "14371", - "name": "Datafile 14371", - "path": "/on/training/upon.tiff", - "size": 112573570, - "dataset": None, - }, - { - "id": "1438", - "name": "Datafile 1438", - "path": "/nor/create/throw.tiff", - "size": 118142897, - "dataset": None, - }, - { - "id": "14850", - "name": "Datafile 14850", - "path": "/sell/involve/course.jpg", - "size": 210091940, - "dataset": None, - }, - { - "id": "15329", - "name": "Datafile 15329", - "path": "/less/fact/personal.bmp", - "size": 206394669, - "dataset": None, - }, - { - "id": "15808", - "name": "Datafile 15808", - "path": "/of/major/send.png", - "size": 12454385, - "dataset": None, - }, - { - "id": "16287", - "name": "Datafile 16287", - "path": "/threat/paper/reason.tiff", - "size": 72156314, - "dataset": None, - }, - { - "id": "16766", - "name": "Datafile 16766", - "path": "/order/moment/ahead.jpg", - "size": 209206676, - "dataset": None, - }, - { - "id": "17245", - "name": "Datafile 17245", - "path": "/apply/once/heart.tiff", - "size": 119539108, - "dataset": None, - }, - { - "id": "17724", - "name": "Datafile 17724", - "path": "/once/pull/home.bmp", - "size": 143503794, - "dataset": None, - }, - { - "id": "18203", - "name": "Datafile 18203", - "path": "/trip/that/help.png", - "size": 137082678, - "dataset": None, - }, - { - "id": "18682", - "name": "Datafile 18682", - "path": "/camera/until/person.jpeg", - "size": 9734061, + "id": "1071", + "name": "Datafile 1071", + "path": "/sense/through/candidate.jpeg", + "size": 9390543, "dataset": None, }, { - "id": "19161", - "name": "Datafile 19161", - "path": "/director/reach/do.tiff", - "size": 81993307, + "id": "119", + "name": "Datafile 119", + "path": "/five/with/question.bmp", + "size": 124185509, "dataset": None, }, { - "id": "1917", - "name": "Datafile 1917", - "path": "/her/camera/reason.jpg", - "size": 120538934, + "id": "1190", + "name": "Datafile 1190", + "path": "/too/lawyer/camera.jpg", + "size": 155061161, "dataset": None, }, { - "id": "19640", - "name": "Datafile 19640", - "path": "/condition/woman/local.jpeg", - "size": 29793902, + "id": "1309", + "name": "Datafile 1309", + "path": "/writer/family/pull.bmp", + "size": 171717920, "dataset": None, }, { - "id": "20119", - "name": "Datafile 20119", - "path": "/again/like/quite.jpg", - "size": 13941528, + "id": "1428", + "name": "Datafile 1428", + "path": "/I/collection/population.png", + "size": 6316615, "dataset": None, }, { - "id": "20598", - "name": "Datafile 20598", - "path": "/building/show/across.bmp", - "size": 106767153, + "id": "1547", + "name": "Datafile 1547", + "path": "/training/value/share.gif", + "size": 80936756, "dataset": None, }, { - "id": "21077", - "name": "Datafile 21077", - "path": "/nature/around/eye.png", - "size": 95175331, + "id": "1666", + "name": "Datafile 1666", + "path": "/able/leg/policy.gif", + "size": 43253880, "dataset": None, }, { - "id": "21556", - "name": "Datafile 21556", - "path": "/enter/finally/explain.tiff", - "size": 45086331, + "id": "1785", + "name": "Datafile 1785", + "path": "/kind/rest/who.tiff", + "size": 113394018, "dataset": None, }, { - "id": "22035", - "name": "Datafile 22035", - "path": "/when/education/fund.gif", - "size": 150922750, + "id": "238", + "name": "Datafile 238", + "path": "/tough/former/one.tiff", + "size": 104571616, "dataset": None, }, { - "id": "22514", - "name": "Datafile 22514", - "path": "/rich/store/kitchen.bmp", - "size": 146576559, + "id": "357", + "name": "Datafile 357", + "path": "/official/yard/father.tiff", + "size": 11056319, "dataset": None, }, { - "id": "22993", - "name": "Datafile 22993", - "path": "/best/friend/car.bmp", - "size": 111680161, + "id": "476", + "name": "Datafile 476", + "path": "/now/lose/long.gif", + "size": 163877950, "dataset": None, }, { - "id": "23472", - "name": "Datafile 23472", - "path": "/even/reach/artist.gif", - "size": 20868104, + "id": "595", + "name": "Datafile 595", + "path": "/with/through/maintain.jpeg", + "size": 95042354, "dataset": None, }, { - "id": "23951", - "name": "Datafile 23951", - "path": "/now/late/tonight.bmp", - "size": 51780738, + "id": "714", + "name": "Datafile 714", + "path": "/effort/ten/yeah.png", + "size": 80001674, "dataset": None, }, { - "id": "2396", - "name": "Datafile 2396", - "path": "/model/quality/consumer.jpeg", - "size": 93486253, + "id": "833", + "name": "Datafile 833", + "path": "/movie/west/agent.gif", + "size": 168730831, "dataset": None, }, { - "id": "24430", - "name": "Datafile 24430", - "path": "/better/reduce/before.gif", - "size": 23636657, - "dataset": None, - }, - { - "id": "24909", - "name": "Datafile 24909", - "path": "/environment/foreign/often.gif", - "size": 209677116, - "dataset": None, - }, - { - "id": "25388", - "name": "Datafile 25388", - "path": "/near/specific/force.gif", - "size": 209279946, - "dataset": None, - }, - { - "id": "25867", - "name": "Datafile 25867", - "path": "/agent/story/single.gif", - "size": 113540888, - "dataset": None, - }, - { - "id": "26346", - "name": "Datafile 26346", - "path": "/theory/early/article.jpg", - "size": 204064131, - "dataset": None, - }, - { - "id": "2875", - "name": "Datafile 2875", - "path": "/election/people/may.tiff", - "size": 107424152, - "dataset": None, - }, - { - "id": "3354", - "name": "Datafile 3354", - "path": "/economy/manager/move.jpeg", - "size": 49217940, - "dataset": None, - }, - { - "id": "3833", - "name": "Datafile 3833", - "path": "/building/land/get.png", - "size": 95005906, - "dataset": None, - }, - { - "id": "4312", - "name": "Datafile 4312", - "path": "/religious/goal/customer.jpg", - "size": 175793879, - "dataset": None, - }, - { - "id": "4791", - "name": "Datafile 4791", - "path": "/now/pass/beautiful.png", - "size": 143040415, - "dataset": None, - }, - { - "id": "480", - "name": "Datafile 480", - "path": "/wall/doctor/either.jpeg", - "size": 176615561, - "dataset": None, - }, - { - "id": "5270", - "name": "Datafile 5270", - "path": "/sign/experience/two.png", - "size": 35763660, - "dataset": None, - }, - { - "id": "5749", - "name": "Datafile 5749", - "path": "/career/various/whether.png", - "size": 39359243, - "dataset": None, - }, - { - "id": "6228", - "name": "Datafile 6228", - "path": "/meet/modern/oil.png", - "size": 98442971, - "dataset": None, - }, - { - "id": "6707", - "name": "Datafile 6707", - "path": "/share/service/minute.jpg", - "size": 34981717, - "dataset": None, - }, - { - "id": "7186", - "name": "Datafile 7186", - "path": "/several/most/thought.gif", - "size": 107926403, - "dataset": None, - }, - { - "id": "7665", - "name": "Datafile 7665", - "path": "/maintain/me/although.jpeg", - "size": 94129376, - "dataset": None, - }, - { - "id": "8144", - "name": "Datafile 8144", - "path": "/huge/eat/section.jpg", - "size": 26196594, - "dataset": None, - }, - { - "id": "8623", - "name": "Datafile 8623", - "path": "/deep/weight/cell.gif", - "size": 63597912, - "dataset": None, - }, - { - "id": "9102", - "name": "Datafile 9102", - "path": "/wrong/increase/interest.jpg", - "size": 68604116, - "dataset": None, - }, - { - "id": "9581", - "name": "Datafile 9581", - "path": "/view/management/lawyer.gif", - "size": 183136479, + "id": "952", + "name": "Datafile 952", + "path": "/green/building/cost.tiff", + "size": 62543055, "dataset": None, }, + ], + "parameters": [ { - "id": "959", - "name": "Datafile 959", - "path": "/nearly/school/lawyer.gif", - "size": 36259296, + "id": "30", + "name": "PARAMETERTYPE 30", + "value": 23, + "unit": "unit 30", "dataset": None, + "document": None, }, ], - "parameters": [], "samples": [ { - "name": "SAMPLE 2", - "pid": "pid:2", - "description": "Fill film Mr per sure task commercial " - "physical.\nForce discussion eat sign design. Story " - "follow few above loss. Challenge drop claim employee " - "dark.", + "name": "SAMPLE 1", + "pid": "pid:1", + "description": "Tv shake population. City she " + "third find realize support.\nRed say organization" + " task. Whether number computer economy design now " + "serious appear. Response girl middle " + "close role American.", "datasets": [], }, ], @@ -932,107 +402,40 @@ class TestSearchAPIGetByPIDEndpoint: ), pytest.param( "documents", - "0-449-78690-0", + "0-417-77631-4", '{"include": [{"relation": "datasets"}, {"relation": "members"},' ' {"relation": "parameters"}]}', { - "pid": "0-449-78690-0", + "pid": "0-417-77631-4", "isPublic": True, - "type": "INVESTIGATIONTYPE 2", + "type": "INVESTIGATIONTYPE 3", "title": "INVESTIGATION 1", - "summary": "Season identify professor happen third. Beat" - " professional blue clear style have. Light final summer.", - "doi": "0-449-78690-0", + "summary": "Throw hope parent. Receive entire soon. " + "War top air agent must voice high describe.\nMonth " + "shake voice. Do discuss despite least face again study." + " Two beyond picture rich fast sea time.", + "doi": "0-417-77631-4", "startDate": "2000-04-03T00:00:00.000Z", "endDate": "2000-07-09T00:00:00.000Z", "releaseDate": "2000-07-05T00:00:00.000Z", "license": None, "keywords": [ - "read123", - "boy129", - "out253", - "hour326", - "possible449", - "west566", - "scene948", - "who1253", - "capital1526", - "dream1989", - "front2347", - "inside2465", - "surface2851", - "learn2953", - "hot3053", - "just3159", - "population3261", - "cup3366", - "another3451", - "environmental3632", - "require3858", - "rock3952", - "determine4048", - "space4061", - "big4229", - "why4243", - "public4362", - "election4641", - "measure4996", - "often5014", - "develop5135", - "than5310", - "floor5312", - "check5327", - "cost5487", - "information6130", - "guy6180", - "admit6235", - "market6645", - "law6777", - "close7336", - "billion7597", - "product7964", - "American8041", - "language8246", - "school8277", - "specific8539", - "position8670", - "grow8702", - "time8899", - "weight9086", - "catch9129", - "speak9559", - "strong9621", - "development9757", - "best9786", - "identify10039", - "give10497", - "life10854", - "century11040", - "fire11580", - "leg11744", - "past11935", - "bar12034", - "do12108", - "prove12224", - "body12251", - "data12288", - "at12640", - "star12706", - "customer12795", - "small13058", - "event13141", - "now13193", - "magazine13415", - "policy13601", - "black13996", - "American14654", + "number22", + "shoulder85", + "local117", + "religious242", + "agreement263", + "mention362", + "game469", + "onto480", + "never495", ], "datasets": [ { - "pid": "0-449-78690-0", + "pid": "1-4978-6907-2", "title": "DATASET 1", "isPublic": True, - "creationDate": "2002-11-27T06:20:36.000Z", + "creationDate": "2023-02-09T09:23:39.000Z", "size": None, "documents": [], "techniques": [], @@ -1042,10 +445,10 @@ class TestSearchAPIGetByPIDEndpoint: "samples": [], }, { - "pid": "0-353-84629-5", - "title": "DATASET 241", + "pid": "0-557-36716-6", + "title": "DATASET 61", "isPublic": True, - "creationDate": "2006-11-21T17:10:42.000Z", + "creationDate": "2023-02-09T09:23:54.000Z", "size": None, "documents": [], "techniques": [], @@ -1058,7 +461,7 @@ class TestSearchAPIGetByPIDEndpoint: "members": [ { "id": "1", - "role": "CI", + "role": "PI", "document": None, "person": None, "affiliation": None, @@ -1067,9 +470,9 @@ class TestSearchAPIGetByPIDEndpoint: "parameters": [ { "id": "1", - "name": "PARAMETERTYPE 27", - "value": 127265.0, - "unit": "unit 27", + "name": "PARAMETERTYPE 9", + "value": 38, + "unit": "unit 9", "dataset": None, "document": None, }, diff --git a/test/search_api/endpoints/test_search_endpoint.py b/test/search_api/endpoints/test_search_endpoint.py index c5d1209a..6e39a4b6 100644 --- a/test/search_api/endpoints/test_search_endpoint.py +++ b/test/search_api/endpoints/test_search_endpoint.py @@ -12,10 +12,10 @@ class TestSearchAPISearchEndpoint: '{"limit": 2}', [ { - "pid": "0-449-78690-0", + "pid": "1-4978-6907-2", "title": "DATASET 1", - "creationDate": "2002-11-27T06:20:36.000Z", "isPublic": True, + "creationDate": "2023-02-09T09:23:39.000Z", "size": None, "documents": [], "techniques": [], @@ -25,10 +25,10 @@ class TestSearchAPISearchEndpoint: "samples": [], }, { - "pid": "0-8401-1070-7", + "pid": "1-01-107043-X", "title": "DATASET 2", - "creationDate": "2013-04-01T10:56:52.000Z", "isPublic": True, + "creationDate": "2023-02-09T09:23:39.000Z", "size": None, "documents": [], "techniques": [], @@ -45,121 +45,35 @@ class TestSearchAPISearchEndpoint: '{"limit": 1}', [ { - "pid": "0-449-78690-0", + "pid": "0-417-77631-4", "isPublic": True, - "type": "INVESTIGATIONTYPE 2", + "type": "INVESTIGATIONTYPE 3", "title": "INVESTIGATION 1", - "summary": "Season identify professor happen third. Beat" - " professional blue clear style have. Light final summer.", - "doi": "0-449-78690-0", + "summary": "Throw hope parent. Receive entire soon." + " War top air agent must voice high describe.\nMonth " + "shake voice. Do discuss despite least face again study" + ". Two beyond picture rich fast sea time.", + "doi": "0-417-77631-4", "startDate": "2000-04-03T00:00:00.000Z", "endDate": "2000-07-09T00:00:00.000Z", "releaseDate": "2000-07-05T00:00:00.000Z", "license": None, "keywords": [ - "read123", - "boy129", - "out253", - "hour326", - "possible449", - "west566", - "scene948", - "who1253", - "capital1526", - "dream1989", - "front2347", - "inside2465", - "surface2851", - "learn2953", - "hot3053", - "just3159", - "population3261", - "cup3366", - "another3451", - "environmental3632", - "require3858", - "rock3952", - "determine4048", - "space4061", - "big4229", - "why4243", - "public4362", - "election4641", - "measure4996", - "often5014", - "develop5135", - "than5310", - "floor5312", - "check5327", - "cost5487", - "information6130", - "guy6180", - "admit6235", - "market6645", - "law6777", - "close7336", - "billion7597", - "product7964", - "American8041", - "language8246", - "school8277", - "specific8539", - "position8670", - "grow8702", - "time8899", - "weight9086", - "catch9129", - "speak9559", - "strong9621", - "development9757", - "best9786", - "identify10039", - "give10497", - "life10854", - "century11040", - "fire11580", - "leg11744", - "past11935", - "bar12034", - "do12108", - "prove12224", - "body12251", - "data12288", - "at12640", - "star12706", - "customer12795", - "small13058", - "event13141", - "now13193", - "magazine13415", - "policy13601", - "black13996", - "American14654", + "number22", + "shoulder85", + "local117", + "religious242", + "agreement263", + "mention362", + "game469", + "onto480", + "never495", ], "datasets": [], "members": [], "parameters": [], }, ], - id="Basic /documents request", - ), - pytest.param( - "instruments", - '{"limit": 2}', - [ - { - "datasets": [], - "facility": "LILS", - "name": "INSTRUMENT 1", - "pid": "pid:1", - }, - { - "datasets": [], - "facility": "LILS", - "name": "INSTRUMENT 2", - "pid": "pid:2", - }, - ], id="Basic /instruments request", ), pytest.param( @@ -167,10 +81,10 @@ class TestSearchAPISearchEndpoint: '{"limit": 1, "skip": 5}', [ { - "pid": "0-468-20341-9", + "pid": "1-77218-518-3", "title": "DATASET 6", "isPublic": True, - "creationDate": "2008-06-30T08:30:58.000Z", + "creationDate": "2023-02-09T09:23:41.000Z", "size": None, "documents": [], "techniques": [], @@ -201,10 +115,10 @@ class TestSearchAPISearchEndpoint: ' "2007-06-30T08:30:58.000Z"}}}', [ { - "pid": "0-8401-1070-7", - "title": "DATASET 2", + "pid": "1-4978-6907-2", + "title": "DATASET 1", "isPublic": True, - "creationDate": "2013-04-01T10:56:52.000Z", + "creationDate": "2023-02-09T09:23:39.000Z", "size": None, "documents": [], "techniques": [], @@ -232,103 +146,36 @@ class TestSearchAPISearchEndpoint: ' {"relation": "parameters"}], "limit": 1}', [ { - "pid": "0-449-78690-0", + "pid": "0-417-77631-4", "isPublic": True, - "type": "INVESTIGATIONTYPE 2", + "type": "INVESTIGATIONTYPE 3", "title": "INVESTIGATION 1", - "summary": "Season identify professor happen third. Beat" - " professional blue clear style have. Light final summer.", - "doi": "0-449-78690-0", + "summary": "Throw hope parent. Receive entire soon." + " War top air agent must voice high describe.\nMonth" + " shake voice. Do discuss despite least face again " + "study. Two beyond picture rich fast sea time.", + "doi": "0-417-77631-4", "startDate": "2000-04-03T00:00:00.000Z", "endDate": "2000-07-09T00:00:00.000Z", "releaseDate": "2000-07-05T00:00:00.000Z", "license": None, "keywords": [ - "read123", - "boy129", - "out253", - "hour326", - "possible449", - "west566", - "scene948", - "who1253", - "capital1526", - "dream1989", - "front2347", - "inside2465", - "surface2851", - "learn2953", - "hot3053", - "just3159", - "population3261", - "cup3366", - "another3451", - "environmental3632", - "require3858", - "rock3952", - "determine4048", - "space4061", - "big4229", - "why4243", - "public4362", - "election4641", - "measure4996", - "often5014", - "develop5135", - "than5310", - "floor5312", - "check5327", - "cost5487", - "information6130", - "guy6180", - "admit6235", - "market6645", - "law6777", - "close7336", - "billion7597", - "product7964", - "American8041", - "language8246", - "school8277", - "specific8539", - "position8670", - "grow8702", - "time8899", - "weight9086", - "catch9129", - "speak9559", - "strong9621", - "development9757", - "best9786", - "identify10039", - "give10497", - "life10854", - "century11040", - "fire11580", - "leg11744", - "past11935", - "bar12034", - "do12108", - "prove12224", - "body12251", - "data12288", - "at12640", - "star12706", - "customer12795", - "small13058", - "event13141", - "now13193", - "magazine13415", - "policy13601", - "black13996", - "American14654", + "number22", + "shoulder85", + "local117", + "religious242", + "agreement263", + "mention362", + "game469", + "onto480", + "never495", ], "datasets": [ { - "pid": "0-449-78690-0", + "pid": "1-4978-6907-2", "title": "DATASET 1", "isPublic": True, - "creationDate": "2002-11-27T06:20:36.000Z", + "creationDate": "2023-02-09T09:23:39.000Z", "size": None, "documents": [], "techniques": [], @@ -338,10 +185,10 @@ class TestSearchAPISearchEndpoint: "samples": [], }, { - "pid": "0-353-84629-5", - "title": "DATASET 241", + "pid": "0-557-36716-6", + "title": "DATASET 61", "isPublic": True, - "creationDate": "2006-11-21T17:10:42.000Z", + "creationDate": "2023-02-09T09:23:54.000Z", "size": None, "documents": [], "techniques": [], @@ -354,7 +201,7 @@ class TestSearchAPISearchEndpoint: "members": [ { "id": "1", - "role": "CI", + "role": "PI", "document": None, "person": None, "affiliation": None, @@ -363,9 +210,9 @@ class TestSearchAPISearchEndpoint: "parameters": [ { "id": "1", - "name": "PARAMETERTYPE 27", - "value": 127265.0, - "unit": "unit 27", + "name": "PARAMETERTYPE 9", + "value": 38, + "unit": "unit 9", "dataset": None, "document": None, }, @@ -390,7 +237,7 @@ class TestSearchAPISearchEndpoint: "modTime": "2019-01-29 23:33:20.000Z", "id": 2, "fullName": "With piece reason late model. House office fly." - " International scene call deep answer audience baby true.\n" + " International scene call deep answer audience baby True.\n" "Indicate education across these. Opportunity design too.", "url": "https://moore.org/", }, @@ -400,13 +247,13 @@ class TestSearchAPISearchEndpoint: ), pytest.param( "datasets", - '{"limit": 1, "where": {"isPublic": true}}', + '{"where":{"isPublic": {"eq": "True"}}, "limit": 1}', [ { - "pid": "0-449-78690-0", + "pid": "1-4978-6907-2", "title": "DATASET 1", - "creationDate": "2002-11-27T06:20:36.000Z", "isPublic": True, + "creationDate": "2023-02-09T09:23:39.000Z", "size": None, "documents": [], "techniques": [], @@ -437,14 +284,14 @@ class TestSearchAPISearchEndpoint: pytest.param( "datasets", '{"include": [{"relation": "parameters", "scope": {"where": {"and": [{' - '"name": "PARAMETERTYPE 39"}, {"value": {"between": [320300, 320320]}},' - '{"unit": "unit 39"}]}}}]}', + '"name": "PARAMETERTYPE 1"}, {"value": {"between": [0, 20]}},' + '{"unit": "unit 1"}]}}}]}', [ { - "pid": "1-71624-154-5", - "title": "DATASET 50", + "pid": "1-85271-859-5", + "title": "DATASET 33", "isPublic": True, - "creationDate": "2008-05-29T03:28:31.000Z", + "creationDate": "2023-02-09T09:23:49.000Z", "size": None, "documents": [], "techniques": [], @@ -452,10 +299,26 @@ class TestSearchAPISearchEndpoint: "files": [], "parameters": [ { - "id": "39", - "name": "PARAMETERTYPE 39", - "value": 320310.0, - "unit": "unit 39", + "id": "1", + "name": "PARAMETERTYPE 1", + "value": 20, + "unit": "unit 1", + "dataset": None, + "document": None, + }, + { + "id": "44", + "name": "PARAMETERTYPE 44", + "value": "value 44", + "unit": "unit 44", + "dataset": None, + "document": None, + }, + { + "id": "49", + "name": "PARAMETERTYPE 49", + "value": "value 49", + "unit": "unit 49", "dataset": None, "document": None, }, @@ -473,20 +336,28 @@ class TestSearchAPISearchEndpoint: ' "unit 39"}]}}}]}', [ { - "pid": "1-71624-154-5", - "title": "DATASET 50", + "pid": "1-71395-013-8", + "title": "DATASET 71", "isPublic": True, - "creationDate": "2008-05-29T03:28:31.000Z", + "creationDate": "2023-02-09T09:23:56.000Z", "size": None, "documents": [], "techniques": [], "instrument": None, "files": [], "parameters": [ + { + "id": "38", + "name": "PARAMETERTYPE 38", + "value": "value 38", + "unit": "unit 38", + "dataset": None, + "document": None, + }, { "id": "39", "name": "PARAMETERTYPE 39", - "value": 320310.0, + "value": 44, "unit": "unit 39", "dataset": None, "document": None, @@ -502,23 +373,31 @@ class TestSearchAPISearchEndpoint: "datasets", '{"include": [{"relation": "parameters", "scope": {"where": {"or": [{' '"and": [{"name": "sample_state"}, {"value": "solid"}]}, {"and": [{' - '"name": "PARAMETERTYPE 39"}, {"value": 320310}]}]}}}]}', + '"name": "PARAMETERTYPE 39"}, {"value": 44}]}]}}}]}', [ { - "pid": "1-71624-154-5", - "title": "DATASET 50", + "pid": "1-71395-013-8", + "title": "DATASET 71", "isPublic": True, - "creationDate": "2008-05-29T03:28:31.000Z", + "creationDate": "2023-02-09T09:23:56.000Z", "size": None, "documents": [], "techniques": [], "instrument": None, "files": [], "parameters": [ + { + "id": "38", + "name": "PARAMETERTYPE 38", + "value": "value 38", + "unit": "unit 38", + "dataset": None, + "document": None, + }, { "id": "39", "name": "PARAMETERTYPE 39", - "value": 320310.0, + "value": 44, "unit": "unit 39", "dataset": None, "document": None, @@ -533,408 +412,128 @@ class TestSearchAPISearchEndpoint: pytest.param( "datasets", '{"include": [{"relation": "files", "scope": {"where": {"text":' - ' "Datafile 10064"}}}]}', + ' "Datafile 25"}}}], "limit": 1}', [ { - "pid": "0-468-20341-9", - "title": "DATASET 6", + "pid": "1-85150-280-7", + "title": "DATASET 13", "isPublic": True, - "creationDate": "2008-06-30T08:30:58.000Z", + "creationDate": "2023-02-09T09:23:44.000Z", "size": None, "documents": [], "techniques": [], "instrument": None, "files": [ { - "id": "10064", - "name": "Datafile 10064", - "path": "/single/system/continue.jpeg", - "size": 83045226, - "dataset": None, - }, - { - "id": "10543", - "name": "Datafile 10543", - "path": "/product/also/change.png", - "size": 146218500, - "dataset": None, - }, - { - "id": "11022", - "name": "Datafile 11022", - "path": "/bed/necessary/however.png", - "size": 152028651, - "dataset": None, - }, - { - "id": "11501", - "name": "Datafile 11501", - "path": "/not/quickly/miss.bmp", - "size": 66136302, - "dataset": None, - }, - { - "id": "11980", - "name": "Datafile 11980", - "path": "/loss/probably/drug.png", - "size": 178760495, - "dataset": None, - }, - { - "id": "12459", - "name": "Datafile 12459", - "path": "/must/themselves/kitchen.gif", - "size": 44146972, - "dataset": None, - }, - { - "id": "12938", - "name": "Datafile 12938", - "path": "/student/picture/affect.jpg", - "size": 200384559, - "dataset": None, - }, - { - "id": "13417", - "name": "Datafile 13417", - "path": "/food/fall/beyond.tiff", - "size": 11264500, - "dataset": None, - }, - { - "id": "13896", - "name": "Datafile 13896", - "path": "/drop/white/evidence.png", - "size": 186906852, - "dataset": None, - }, - { - "id": "14375", - "name": "Datafile 14375", - "path": "/politics/letter/whatever.jpg", - "size": 30210023, - "dataset": None, - }, - { - "id": "1442", - "name": "Datafile 1442", - "path": "/leader/center/where.bmp", - "size": 185391340, - "dataset": None, - }, - { - "id": "14854", - "name": "Datafile 14854", - "path": "/have/example/visit.gif", - "size": 102389951, - "dataset": None, - }, - { - "id": "15333", - "name": "Datafile 15333", - "path": "/east/prevent/possible.png", - "size": 41357442, - "dataset": None, - }, - { - "id": "15812", - "name": "Datafile 15812", - "path": "/contain/office/he.jpg", - "size": 7380949, - "dataset": None, - }, - { - "id": "16291", - "name": "Datafile 16291", - "path": "/physical/son/important.jpg", - "size": 27353005, - "dataset": None, - }, - { - "id": "16770", - "name": "Datafile 16770", - "path": "/plan/citizen/child.gif", - "size": 19557768, - "dataset": None, - }, - { - "id": "17249", - "name": "Datafile 17249", - "path": "/get/tonight/chair.jpg", - "size": 124177764, - "dataset": None, - }, - { - "id": "17728", - "name": "Datafile 17728", - "path": "/office/back/difficult.jpg", - "size": 98003191, + "id": "1083", + "name": "Datafile 1083", + "path": "/thousand/hour/most.gif", + "size": 8025793, "dataset": None, }, { - "id": "18207", - "name": "Datafile 18207", - "path": "/give/hour/detail.gif", - "size": 202104539, + "id": "12", + "name": "Datafile 12", + "path": "/ask/not/also.bmp", + "size": 124256016, "dataset": None, }, { - "id": "18686", - "name": "Datafile 18686", - "path": "/hold/whose/away.gif", - "size": 107794262, + "id": "1202", + "name": "Datafile 1202", + "path": "/second/free/reach.png", + "size": 3628023, "dataset": None, }, { - "id": "19165", - "name": "Datafile 19165", - "path": "/opportunity/national/set.bmp", - "size": 212316955, + "id": "131", + "name": "Datafile 131", + "path": "/although/partner/include.png", + "size": 71810603, "dataset": None, }, { - "id": "1921", - "name": "Datafile 1921", - "path": "/team/would/effort.gif", - "size": 69764788, + "id": "1321", + "name": "Datafile 1321", + "path": "/simple/game/loss.png", + "size": 134622872, "dataset": None, }, { - "id": "19644", - "name": "Datafile 19644", - "path": "/necessary/second/of.bmp", - "size": 13528669, + "id": "1440", + "name": "Datafile 1440", + "path": "/student/in/wide.tiff", + "size": 13715483, "dataset": None, }, { - "id": "20123", - "name": "Datafile 20123", - "path": "/little/management/international.jpeg", - "size": 211770767, + "id": "1559", + "name": "Datafile 1559", + "path": "/start/change/prepare.jpeg", + "size": 66656703, "dataset": None, }, { - "id": "20602", - "name": "Datafile 20602", - "path": "/much/young/fine.tiff", - "size": 135507308, + "id": "1678", + "name": "Datafile 1678", + "path": "/amount/building/least.gif", + "size": 16593025, "dataset": None, }, { - "id": "21081", - "name": "Datafile 21081", - "path": "/attack/sit/rest.gif", - "size": 188450019, + "id": "1797", + "name": "Datafile 1797", + "path": "/talk/attention/nature.bmp", + "size": 32738241, "dataset": None, }, { - "id": "21560", - "name": "Datafile 21560", - "path": "/move/point/service.bmp", - "size": 149702079, + "id": "250", + "name": "Datafile 250", + "path": "/call/vote/and.bmp", + "size": 107218026, "dataset": None, }, { - "id": "22039", - "name": "Datafile 22039", - "path": "/leave/pick/thing.bmp", - "size": 99893014, + "id": "369", + "name": "Datafile 369", + "path": "/party/recent/ever.jpeg", + "size": 123486563, "dataset": None, }, { - "id": "22518", - "name": "Datafile 22518", - "path": "/way/kitchen/this.bmp", - "size": 8262875, + "id": "488", + "name": "Datafile 488", + "path": "/method/arrive/body.bmp", + "size": 58049109, "dataset": None, }, { - "id": "22997", - "name": "Datafile 22997", - "path": "/own/give/safe.tiff", - "size": 160609691, + "id": "607", + "name": "Datafile 607", + "path": "/several/message/simply.tiff", + "size": 179118921, "dataset": None, }, { - "id": "23476", - "name": "Datafile 23476", - "path": "/know/image/material.bmp", - "size": 119734022, + "id": "726", + "name": "Datafile 726", + "path": "/stand/expert/federal.jpg", + "size": 171349673, "dataset": None, }, { - "id": "23955", - "name": "Datafile 23955", - "path": "/mother/court/speech.jpg", - "size": 85860547, + "id": "845", + "name": "Datafile 845", + "path": "/present/want/baby.bmp", + "size": 204579388, "dataset": None, }, { - "id": "2400", - "name": "Datafile 2400", - "path": "/anyone/sell/strong.bmp", - "size": 137173831, - "dataset": None, - }, - { - "id": "24434", - "name": "Datafile 24434", - "path": "/fear/draw/work.tiff", - "size": 58498344, - "dataset": None, - }, - { - "id": "24913", - "name": "Datafile 24913", - "path": "/policy/political/point.png", - "size": 568312, - "dataset": None, - }, - { - "id": "25392", - "name": "Datafile 25392", - "path": "/college/then/join.tiff", - "size": 18417692, - "dataset": None, - }, - { - "id": "25871", - "name": "Datafile 25871", - "path": "/trade/worry/and.png", - "size": 7335141, - "dataset": None, - }, - { - "id": "26350", - "name": "Datafile 26350", - "path": "/be/check/cost.gif", - "size": 120149463, - "dataset": None, - }, - { - "id": "2879", - "name": "Datafile 2879", - "path": "/discover/provide/since.jpg", - "size": 134802178, - "dataset": None, - }, - { - "id": "3358", - "name": "Datafile 3358", - "path": "/whose/sit/owner.png", - "size": 11502940, - "dataset": None, - }, - { - "id": "3837", - "name": "Datafile 3837", - "path": "/attorney/set/sell.png", - "size": 155800656, - "dataset": None, - }, - { - "id": "4316", - "name": "Datafile 4316", - "path": "/nor/important/level.tiff", - "size": 163785021, - "dataset": None, - }, - { - "id": "4795", - "name": "Datafile 4795", - "path": "/someone/cultural/exist.png", - "size": 101862784, - "dataset": None, - }, - { - "id": "484", - "name": "Datafile 484", - "path": "/why/than/whom.gif", - "size": 34752969, - "dataset": None, - }, - { - "id": "5", - "name": "Datafile 5", - "path": "/throw/structure/free.gif", - "size": 11020004, - "dataset": None, - }, - { - "id": "5274", - "name": "Datafile 5274", - "path": "/find/top/check.tiff", - "size": 39704159, - "dataset": None, - }, - { - "id": "5753", - "name": "Datafile 5753", - "path": "/bit/red/early.png", - "size": 139569798, - "dataset": None, - }, - { - "id": "6232", - "name": "Datafile 6232", - "path": "/detail/oil/fact.jpg", - "size": 136355655, - "dataset": None, - }, - { - "id": "6711", - "name": "Datafile 6711", - "path": "/group/spend/us.tiff", - "size": 88860463, - "dataset": None, - }, - { - "id": "7190", - "name": "Datafile 7190", - "path": "/sea/kitchen/develop.png", - "size": 184797408, - "dataset": None, - }, - { - "id": "7669", - "name": "Datafile 7669", - "path": "/education/maybe/total.gif", - "size": 13347406, - "dataset": None, - }, - { - "id": "8148", - "name": "Datafile 8148", - "path": "/ball/shoulder/anything.bmp", - "size": 160229511, - "dataset": None, - }, - { - "id": "8627", - "name": "Datafile 8627", - "path": "/provide/company/those.jpg", - "size": 175618131, - "dataset": None, - }, - { - "id": "9106", - "name": "Datafile 9106", - "path": "/begin/keep/final.jpg", - "size": 26685691, - "dataset": None, - }, - { - "id": "9585", - "name": "Datafile 9585", - "path": "/couple/discover/paper.jpeg", - "size": 62121277, - "dataset": None, - }, - { - "id": "963", - "name": "Datafile 963", - "path": "/happen/reality/history.bmp", - "size": 54690668, + "id": "964", + "name": "Datafile 964", + "path": "/international/wish/air.jpg", + "size": 53688522, "dataset": None, }, ], @@ -949,92 +548,49 @@ class TestSearchAPISearchEndpoint: '{"where": {"type": "INVESTIGATIONTYPE 2"}, "include": [{"relation":' '"datasets"}, {"relation": "members", "scope": {"where": {"role": "PI"' '}, "include": [{"relation": "person", "scope": {"where": {"fullName":' - '"Lynn White"}}}]}}]}', + '"Sarah Griffin"}}}]}}]}', [ { - "pid": "1-202-45294-9", + "pid": "1-903289-21-1", "isPublic": True, "type": "INVESTIGATIONTYPE 2", - "title": "INVESTIGATION 7", - "summary": "Voice expert inside event from. Democratic stop we" - " I interesting ask deal. Director ago education look.\nPower" - " cost able into western anything. Move get watch wide" - " billion.", - "doi": "1-202-45294-9", - "startDate": "2001-08-05T00:00:00.000Z", - "endDate": "2001-11-19T00:00:00.000Z", - "releaseDate": "2001-07-09T00:00:00.000Z", + "title": "INVESTIGATION 2", + "summary": "Allow want audience test laugh." + " Economic body person general attorney. Effort" + " weight prevent possible.\nReflect market box " + "find gas someone election. Tonight member decide" + " paper stage.", + "doi": "1-903289-21-1", + "startDate": "2000-06-04T00:00:00.000Z", + "endDate": "2000-09-14T00:00:00.000Z", + "releaseDate": "2000-02-10T00:00:00.000Z", "license": None, "keywords": [ - "wish49", - "hair251", - "common295", - "writer373", - "him432", - "contain637", - "difference685", - "central723", - "story909", - "response1035", - "blood1880", - "bank1930", - "kid2020", - "side2236", - "town2562", - "budget2931", - "music2952", - "interview3276", - "writer3424", - "evidence3491", - "assume3699", - "possible3944", - "source4387", - "black4448", - "save4614", - "if4807", - "level5193", - "catch5337", - "safe5709", - "skin6164", - "nature6684", - "herself7054", - "glass7153", - "image7204", - "major7427", - "these7504", - "why8533", - "beautiful9000", - "whether9306", - "economy9791", - "center10077", - "stop10135", - "Mr10415", - "night10958", - "example11171", - "with11477", - "look11720", - "east11967", - "seven12086", - "blue12710", - "let13297", - "probably13446", - "case13870", - "explain14543", - "nearly14567", - "challenge14577", - "stuff14659", - "church14763", + "allow20", + "she26", + "figure34", + "significant67", + "plan104", + "trip116", + "technology140", + "down141", + "range152", + "father189", + "discussion299", + "mention349", + "own352", + "particular435", ], "datasets": [], "members": [ { - "id": "7", + "id": "2", "role": "PI", "document": None, "person": { - "id": "262", - "fullName": "Lynn White", - "orcid": "18729", + "id": "131", + "fullName": "Sarah Griffin", + "orcid": "18718", "researcherId": None, "firstName": None, "lastName": None, @@ -1053,109 +609,33 @@ class TestSearchAPISearchEndpoint: pytest.param( "documents", '{"include": [{"relation": "parameters", "scope": {"where": {"and": [{' - '"name": "PARAMETERTYPE 27"}, {"value": {"between": [127260, 127270]}},' - '{"unit": "unit 27"}]}}}]}', + '"name": "PARAMETERTYPE 2"}, {"value": {"between": [23, 55]}},' + '{"unit": "unit 2"}]}}}]}', [ { - "pid": "0-449-78690-0", + "pid": "0-525-94351-X", "isPublic": True, "type": "INVESTIGATIONTYPE 2", - "title": "INVESTIGATION 1", - "summary": "Season identify professor happen third. Beat" - " professional blue clear style have. Light final summer.", - "doi": "0-449-78690-0", - "startDate": "2000-04-03T00:00:00.000Z", - "endDate": "2000-07-09T00:00:00.000Z", - "releaseDate": "2000-07-05T00:00:00.000Z", + "title": "INVESTIGATION 4", + "summary": "Often other each after during authority" + " necessary audience. Again act seek grow. Television" + " child may some baby we community.\nStart floor blood" + " method. Fall throw center treat all firm total" + " sound.", + "doi": "0-525-94351-X", + "startDate": "2001-02-02T00:00:00.000Z", + "endDate": "2001-05-04T00:00:00.000Z", + "releaseDate": "2001-09-26T00:00:00.000Z", "license": None, - "keywords": [ - "read123", - "boy129", - "out253", - "hour326", - "possible449", - "west566", - "scene948", - "who1253", - "capital1526", - "dream1989", - "front2347", - "inside2465", - "surface2851", - "learn2953", - "hot3053", - "just3159", - "population3261", - "cup3366", - "another3451", - "environmental3632", - "require3858", - "rock3952", - "determine4048", - "space4061", - "big4229", - "why4243", - "public4362", - "election4641", - "measure4996", - "often5014", - "develop5135", - "than5310", - "floor5312", - "check5327", - "cost5487", - "information6130", - "guy6180", - "admit6235", - "market6645", - "law6777", - "close7336", - "billion7597", - "product7964", - "American8041", - "language8246", - "school8277", - "specific8539", - "position8670", - "grow8702", - "time8899", - "weight9086", - "catch9129", - "speak9559", - "strong9621", - "development9757", - "best9786", - "identify10039", - "give10497", - "life10854", - "century11040", - "fire11580", - "leg11744", - "past11935", - "bar12034", - "do12108", - "prove12224", - "body12251", - "data12288", - "at12640", - "star12706", - "customer12795", - "small13058", - "event13141", - "now13193", - "magazine13415", - "policy13601", - "black13996", - "American14654", - ], + "keywords": ["coach336", "discuss378", "stay400"], "datasets": [], "members": [], "parameters": [ { - "id": "1", - "name": "PARAMETERTYPE 27", - "value": 127265.0, - "unit": "unit 27", + "id": "4", + "name": "PARAMETERTYPE 2", + "value": 55, + "unit": "unit 2", "dataset": None, "document": None, }, @@ -1169,94 +649,40 @@ class TestSearchAPISearchEndpoint: "documents", '{"include": [{"relation": "datasets", "scope": {"include": [{' '"relation": "parameters", "scope": {"where": {"and": [{"name":' - ' "PARAMETERTYPE 27"}, {"value": {"between": [177670, 177680]}}, {' - '"unit": "unit 27"}]}}}]}}]}', + ' "PARAMETERTYPE 2"}, {"value": {"between": [15, 22]}}, {' + '"unit": "unit 2"}]}}}]}}]}', [ { - "pid": "1-5304-9152-5", + "pid": "0-417-77631-4", "isPublic": True, "type": "INVESTIGATIONTYPE 3", - "title": "INVESTIGATION 100", - "summary": "Suffer moment training raise. Life huge ball each." - "\nInto with box however benefit fund economy. From among" - " budget early affect kind. Item officer international.", - "doi": "1-5304-9152-5", - "startDate": "2005-02-02T00:00:00.000Z", - "endDate": "2005-05-04T00:00:00.000Z", - "releaseDate": "2025-07-10T00:00:00.000Z", + "title": "INVESTIGATION 1", + "summary": "Throw hope parent. Receive entire soon." + " War top air agent must voice high describe.\nMonth " + "shake voice. Do discuss despite least face " + "again study. Two beyond picture rich fast sea time.", + "doi": "0-417-77631-4", + "startDate": "2000-04-03T00:00:00.000Z", + "endDate": "2000-07-09T00:00:00.000Z", + "releaseDate": "2000-07-05T00:00:00.000Z", "license": None, "keywords": [ - "operation292", - "wide299", - "nearly470", - "first668", - "discuss916", - "great1544", - "I1875", - "reflect1906", - "police1913", - "mention2133", - "like2414", - "church3031", - "those3445", - "mouth3680", - "star3875", - "you3888", - "hard3923", - "nature4654", - "evening4913", - "drive5246", - "surface5301", - "amount5533", - "agent5694", - "before5767", - "remain6346", - "behind6362", - "people6519", - "plan6634", - "sense6660", - "any7114", - "so7243", - "fire7287", - "hand7713", - "sell8272", - "long8322", - "use8593", - "thank8662", - "firm8847", - "figure8957", - "military9089", - "wide9339", - "use9596", - "air9706", - "Democrat9804", - "less9975", - "throughout10176", - "teach10205", - "role10226", - "national10628", - "individual11222", - "some11262", - "wear11489", - "certain11566", - "how11675", - "always11816", - "spring12404", - "data12761", - "high13444", - "arm13632", - "race13879", - "want14111", - "left14207", - "election14737", - "avoid14893", + "number22", + "shoulder85", + "local117", + "religious242", + "agreement263", + "mention362", + "game469", + "onto480", + "never495", ], "datasets": [ { - "pid": "0-236-53165-4", - "title": "DATASET 100", + "pid": "1-4978-6907-2", + "title": "DATASET 1", "isPublic": True, - "creationDate": "2006-11-25T16:37:38.000Z", + "creationDate": "2023-02-09T09:23:39.000Z", "size": None, "documents": [], "techniques": [], @@ -1264,10 +690,10 @@ class TestSearchAPISearchEndpoint: "files": [], "parameters": [ { - "id": "27", - "name": "PARAMETERTYPE 27", - "value": 177676.0, - "unit": "unit 27", + "id": "30", + "name": "PARAMETERTYPE 30", + "value": 23, + "unit": "unit 30", "dataset": None, "document": None, }, @@ -1275,16 +701,25 @@ class TestSearchAPISearchEndpoint: "samples": [], }, { - "pid": "0-9875888-6-9", - "title": "DATASET 340", + "pid": "0-557-36716-6", + "title": "DATASET 61", "isPublic": True, - "creationDate": "2006-09-30T10:38:17.000Z", + "creationDate": "2023-02-09T09:23:54.000Z", "size": None, "documents": [], "techniques": [], "instrument": None, "files": [], - "parameters": [], + "parameters": [ + { + "id": "2", + "name": "PARAMETERTYPE 2", + "value": 21, + "unit": "unit 2", + "dataset": None, + "document": None, + }, + ], "samples": [], }, ], diff --git a/util/icat_db_generator.py b/util/icat_db_generator.py index b5089360..8b5f3e4c 100644 --- a/util/icat_db_generator.py +++ b/util/icat_db_generator.py @@ -2,7 +2,6 @@ import argparse import datetime import enum -import multiprocessing from multiprocessing import Process from faker import Faker @@ -548,7 +547,6 @@ class InvestigationParameterGenerator(Generator): amount = InvestigationGenerator.amount def generate(self): - timer = datetime.datetime.now() for i in range(1, self.amount): InvestigationParameterGenerator.generate_investigation_parameter(self, i) @@ -638,7 +636,6 @@ class DatasetParameterGenerator(Generator): amount = ParameterTypeGenerator.amount def generate(self): - timer = datetime.datetime.now() for i in range(1, self.amount): DatasetParameterGenerator.generate_dataset_parameter(self, i) @@ -706,7 +703,6 @@ class DataCollectionParameterGenerator(Generator): amount = DataCollectionGenerator.amount def generate(self): - timer = datetime.datetime.now() for i in range(1, self.amount): DataCollectionParameterGenerator.generate_data_collection_parameter(self, i) @@ -725,7 +721,6 @@ class SampleParameterGenerator(Generator): amount = SampleGenerator.amount def generate(self): - timer = datetime.datetime.now() for i in range(1, self.amount): SampleParameterGenerator.generate_sample_parameter(self, i)