From 1e23c7b18d71b02fcb83c29351034bf675fe9ba1 Mon Sep 17 00:00:00 2001 From: pamfilos Date: Tue, 16 Jul 2024 15:05:20 +0200 Subject: [PATCH 1/4] ui: fixes copyright display in article page Signed-off-by: pamfilos --- ui/src/components/detail/DetailPageInfo.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ui/src/components/detail/DetailPageInfo.tsx b/ui/src/components/detail/DetailPageInfo.tsx index 63d308339..d32a08327 100644 --- a/ui/src/components/detail/DetailPageInfo.tsx +++ b/ui/src/components/detail/DetailPageInfo.tsx @@ -43,6 +43,13 @@ const DetailPageInfo: React.FC = ({ article }) => { )); }; + const renderCopyright = () => { + if (article?.copyright?.[0]?.statement) + return article?.copyright?.[0]?.statement; + else + return article?.copyright?.[0]?.holder || "-" + } + return (
Published on:
@@ -58,7 +65,7 @@ const DetailPageInfo: React.FC = ({ article }) => { {artid &&
Article ID: {artid}
} {renderIdentifierLinks(article?.article_identifiers)}
Copyrights:
-
{article?.copyright?.[0]?.statement}
+
{renderCopyright()}
Licence:
{renderLicenses(article?.related_licenses)}
From 459c7a8ed6719bb25e7fbc72a409584a1f72c204 Mon Sep 17 00:00:00 2001 From: pamfilos Date: Thu, 18 Jul 2024 12:43:02 +0200 Subject: [PATCH 2/4] articles: fixes index bug on create/update Signed-off-by: pamfilos --- scoap3/articles/tests/test_article_views.py | 10 ++++++++++ scoap3/tasks.py | 1 + 2 files changed, 11 insertions(+) diff --git a/scoap3/articles/tests/test_article_views.py b/scoap3/articles/tests/test_article_views.py index dd1265b2f..0ab667430 100644 --- a/scoap3/articles/tests/test_article_views.py +++ b/scoap3/articles/tests/test_article_views.py @@ -51,6 +51,16 @@ def test_update_article_from_workflow(self, client, user, shared_datadir): article.title == "The Effective QCD Running Coupling Constant and a Dirac Model for the Charmonium Spectrum" ) + search_article_detail_url = reverse("search:article-detail", kwargs={"pk": article_id}) + + search_response = client.get( + search_article_detail_url, + content_type="application/json", + ) + assert search_response.status_code == status.HTTP_200_OK + assert search_response.data["doi"] == data["dois"][0]["value"] + assert search_response.data["copyright"][0]["statement"] == data["copyright"][0]["statement"] + assert search_response.data["publication_info"][0]["publisher"] == data["imprints"][0]["publisher"] data["titles"][0]["title"] = "New title" response = client.post( diff --git a/scoap3/tasks.py b/scoap3/tasks.py index 0a7f643dd..a49f50606 100644 --- a/scoap3/tasks.py +++ b/scoap3/tasks.py @@ -330,6 +330,7 @@ def import_to_scoap3(data, migrate_files): authors = _create_author(data, article) _create_author_identifier(data, authors) _create_affiliation(data, authors) + article.save() return article From 0e4bade8c3427f002422d8f4c85a00f28c8806c5 Mon Sep 17 00:00:00 2001 From: pamfilos Date: Thu, 18 Jul 2024 14:19:51 +0200 Subject: [PATCH 3/4] authors: fix country assignment issue Signed-off-by: pamfilos --- poetry.lock | 331 +++++++++++++++++- pyproject.toml | 2 + .../articles/tests/data/workflow_record.json | 18 + scoap3/articles/tests/test_article_views.py | 30 +- scoap3/tasks.py | 7 +- 5 files changed, 376 insertions(+), 12 deletions(-) diff --git a/poetry.lock b/poetry.lock index 3007cb99a..ad21da1ca 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,9 +1,10 @@ -# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.4.2 and should not be changed by hand. [[package]] name = "alabaster" version = "0.7.13" description = "A configurable sidebar-enabled Sphinx theme" +category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -15,6 +16,7 @@ files = [ name = "amqp" version = "5.1.1" description = "Low-level AMQP client for Python (fork of amqplib)." +category = "main" optional = false python-versions = ">=3.6" files = [ @@ -29,6 +31,7 @@ vine = ">=5.0.0" name = "anyio" version = "4.0.0" description = "High level compatibility layer for multiple asynchronous event loop implementations" +category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -49,6 +52,7 @@ trio = ["trio (>=0.22)"] name = "appnope" version = "0.1.3" description = "Disable App Nap on macOS >= 10.9" +category = "dev" optional = false python-versions = "*" files = [ @@ -60,6 +64,7 @@ files = [ name = "argon2-cffi" version = "21.3.0" description = "The secure Argon2 password hashing algorithm." +category = "main" optional = false python-versions = ">=3.6" files = [ @@ -79,6 +84,7 @@ tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pytest"] name = "argon2-cffi-bindings" version = "21.2.0" description = "Low-level CFFI bindings for Argon2" +category = "main" optional = false python-versions = ">=3.6" files = [ @@ -116,6 +122,7 @@ tests = ["pytest"] name = "asgiref" version = "3.7.2" description = "ASGI specs, helper code, and adapters" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -130,6 +137,7 @@ tests = ["mypy (>=0.800)", "pytest", "pytest-asyncio"] name = "astroid" version = "3.0.0" description = "An abstract syntax tree for Python with inference support." +category = "dev" optional = false python-versions = ">=3.8.0" files = [ @@ -141,6 +149,7 @@ files = [ name = "asttokens" version = "2.4.0" description = "Annotate AST trees with source code positions" +category = "dev" optional = false python-versions = "*" files = [ @@ -158,6 +167,7 @@ test = ["astroid", "pytest"] name = "async-timeout" version = "4.0.3" description = "Timeout context manager for asyncio programs" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -169,6 +179,7 @@ files = [ name = "attrs" version = "23.1.0" description = "Classes Without Boilerplate" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -187,6 +198,7 @@ tests-no-zope = ["cloudpickle", "hypothesis", "mypy (>=1.1.1)", "pympler", "pyte name = "babel" version = "2.12.1" description = "Internationalization utilities" +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -198,6 +210,7 @@ files = [ name = "backcall" version = "0.2.0" description = "Specifications for callback functions passed in to an API" +category = "dev" optional = false python-versions = "*" files = [ @@ -209,6 +222,7 @@ files = [ name = "backoff" version = "2.2.1" description = "Function decoration for backoff and retry" +category = "main" optional = false python-versions = ">=3.7,<4.0" files = [ @@ -220,6 +234,7 @@ files = [ name = "billiard" version = "4.1.0" description = "Python multiprocessing fork with improvements and bugfixes" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -231,6 +246,7 @@ files = [ name = "black" version = "23.9.1" description = "The uncompromising code formatter." +category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -275,6 +291,7 @@ uvloop = ["uvloop (>=0.15.2)"] name = "boto3" version = "1.28.57" description = "The AWS SDK for Python" +category = "main" optional = false python-versions = ">= 3.7" files = [ @@ -294,6 +311,7 @@ crt = ["botocore[crt] (>=1.21.0,<2.0a0)"] name = "botocore" version = "1.31.57" description = "Low-level, data-driven core of boto 3." +category = "main" optional = false python-versions = ">= 3.7" files = [ @@ -313,6 +331,7 @@ crt = ["awscrt (==0.16.26)"] name = "celery" version = "5.3.4" description = "Distributed Task Queue." +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -368,6 +387,7 @@ zstd = ["zstandard (==0.21.0)"] name = "certifi" version = "2023.7.22" description = "Python package for providing Mozilla's CA Bundle." +category = "main" optional = false python-versions = ">=3.6" files = [ @@ -379,6 +399,7 @@ files = [ name = "cffi" version = "1.16.0" description = "Foreign Function Interface for Python calling C code." +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -443,6 +464,7 @@ pycparser = "*" name = "cfgv" version = "3.4.0" description = "Validate configuration and produce human readable error messages." +category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -454,6 +476,7 @@ files = [ name = "charset-normalizer" version = "3.3.0" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." +category = "main" optional = false python-versions = ">=3.7.0" files = [ @@ -553,6 +576,7 @@ files = [ name = "click" version = "8.1.7" description = "Composable command line interface toolkit" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -567,6 +591,7 @@ colorama = {version = "*", markers = "platform_system == \"Windows\""} name = "click-didyoumean" version = "0.3.0" description = "Enables git-like *did-you-mean* feature in click" +category = "main" optional = false python-versions = ">=3.6.2,<4.0.0" files = [ @@ -581,6 +606,7 @@ click = ">=7" name = "click-plugins" version = "1.1.1" description = "An extension module for click to enable registering CLI commands via setuptools entry-points." +category = "main" optional = false python-versions = "*" files = [ @@ -598,6 +624,7 @@ dev = ["coveralls", "pytest (>=3.6)", "pytest-cov", "wheel"] name = "click-repl" version = "0.3.0" description = "REPL plugin for Click" +category = "main" optional = false python-versions = ">=3.6" files = [ @@ -616,6 +643,7 @@ testing = ["pytest (>=7.2.1)", "pytest-cov (>=4.0.0)", "tox (>=4.4.3)"] name = "colorama" version = "0.4.6" description = "Cross-platform colored terminal text." +category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" files = [ @@ -623,10 +651,31 @@ files = [ {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, ] +[[package]] +name = "country-converter" +version = "1.2" +description = "The country converter (coco) - a Python package for converting country names between different classifications schemes" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "country_converter-1.2-py3-none-any.whl", hash = "sha256:5a5e54f9542cc8e109d53a39fa9e9179e6a97826e72594dd16e948611cb278fa"}, + {file = "country_converter-1.2.tar.gz", hash = "sha256:74e87db54b91eda56c5eecc9e36e1b5ca79ca2bca58012ecc4f55ef8a13a6631"}, +] + +[package.dependencies] +pandas = ">=1.0" + +[package.extras] +dev = ["country-converter[lint,test]"] +lint = ["black (>=22.3.0)", "isort (>=5.5.2)"] +test = ["coveralls", "pytest (>=5.4.0)", "pytest-black", "pytest-cov (>=2.7.0)", "pytest-datadir", "pytest-mypy"] + [[package]] name = "coverage" version = "7.3.1" description = "Code coverage measurement for Python" +category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -691,6 +740,7 @@ toml = ["tomli"] name = "crispy-bootstrap5" version = "0.7" description = "Bootstrap5 template pack for django-crispy-forms" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -709,6 +759,7 @@ test = ["pytest", "pytest-django"] name = "cron-descriptor" version = "1.4.0" description = "A Python library that converts cron expressions into human readable strings." +category = "main" optional = false python-versions = "*" files = [ @@ -722,6 +773,7 @@ dev = ["polib"] name = "cryptography" version = "41.0.4" description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -767,6 +819,7 @@ test-randomorder = ["pytest-randomly"] name = "dateutils" version = "0.6.12" description = "Various utilities for working with date and datetime objects" +category = "main" optional = false python-versions = "*" files = [ @@ -782,6 +835,7 @@ pytz = "*" name = "decorator" version = "5.1.1" description = "Decorators for Humans" +category = "dev" optional = false python-versions = ">=3.5" files = [ @@ -793,6 +847,7 @@ files = [ name = "defusedxml" version = "0.7.1" description = "XML bomb protection for Python stdlib modules" +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" files = [ @@ -804,6 +859,7 @@ files = [ name = "distlib" version = "0.3.7" description = "Distribution utilities" +category = "dev" optional = false python-versions = "*" files = [ @@ -815,6 +871,7 @@ files = [ name = "django" version = "4.2.5" description = "A high-level Python web framework that encourages rapid development and clean, pragmatic design." +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -835,6 +892,7 @@ bcrypt = ["bcrypt"] name = "django-allauth" version = "0.54.0" description = "Integrated set of Django applications addressing authentication, registration, account management as well as 3rd party (social) account authentication." +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -852,6 +910,7 @@ requests-oauthlib = ">=0.3.0" name = "django-anymail" version = "10.1" description = "Django email backends and webhooks for Amazon SES, Brevo (Sendinblue), MailerSend, Mailgun, Mailjet, Mandrill, Postal, Postmark, SendGrid, and SparkPost" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -872,6 +931,7 @@ postal = ["cryptography"] name = "django-celery-beat" version = "2.5.0" description = "Database-backed Periodic Tasks." +category = "main" optional = false python-versions = "*" files = [ @@ -891,6 +951,7 @@ tzdata = "*" name = "django-cors-headers" version = "4.2.0" description = "django-cors-headers is a Django application for handling the server headers required for Cross-Origin Resource Sharing (CORS)." +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -905,6 +966,7 @@ Django = ">=3.2" name = "django-coverage-plugin" version = "3.1.0" description = "Django template coverage.py plugin" +category = "dev" optional = false python-versions = "*" files = [ @@ -919,6 +981,7 @@ coverage = "*" name = "django-crispy-forms" version = "2.0" description = "Best way to have Django DRY forms" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -933,6 +996,7 @@ django = ">=3.2" name = "django-debug-toolbar" version = "4.2.0" description = "A configurable set of panels that display various debug information about the current request/response." +category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -948,6 +1012,7 @@ sqlparse = ">=0.2" name = "django-elasticsearch-dsl-drf" version = "0.22.4" description = "Integrate Elasticsearch DSL with Django REST framework." +category = "main" optional = false python-versions = ">=2.7" files = [] @@ -971,6 +1036,7 @@ resolved_reference = "c3305525bc58c1d5fd826e95e9c89ee95460e6da" name = "django-environ" version = "0.11.2" description = "A package that allows you to utilize 12factor inspired environment variables to configure your Django application." +category = "main" optional = false python-versions = ">=3.6,<4" files = [ @@ -979,14 +1045,15 @@ files = [ ] [package.extras] -develop = ["coverage[toml] (>=5.0a4)", "furo (>=2021.8.17b43,<2021.9.dev0)", "pytest (>=4.6.11)", "sphinx (>=3.5.0)", "sphinx-notfound-page"] -docs = ["furo (>=2021.8.17b43,<2021.9.dev0)", "sphinx (>=3.5.0)", "sphinx-notfound-page"] +develop = ["coverage[toml] (>=5.0a4)", "furo (>=2021.8.17b43,<2021.9.0)", "pytest (>=4.6.11)", "sphinx (>=3.5.0)", "sphinx-notfound-page"] +docs = ["furo (>=2021.8.17b43,<2021.9.0)", "sphinx (>=3.5.0)", "sphinx-notfound-page"] testing = ["coverage[toml] (>=5.0a4)", "pytest (>=4.6.11)"] [[package]] name = "django-extensions" version = "3.2.3" description = "Extensions for Django" +category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -1001,6 +1068,7 @@ Django = ">=3.2" name = "django-lifecycle" version = "1.1.2" description = "Declarative model lifecycle hooks." +category = "main" optional = false python-versions = "*" files = [ @@ -1015,6 +1083,7 @@ Django = ">=3.2" name = "django-model-utils" version = "4.3.1" description = "Django model mixins and utilities" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1029,6 +1098,7 @@ Django = ">=3.2" name = "django-nine" version = "0.2.7" description = "Version checking library." +category = "main" optional = false python-versions = "*" files = [ @@ -1044,6 +1114,7 @@ packaging = "*" name = "django-opensearch-dsl" version = "0.5.1" description = "Wrapper around opensearch-py for django models" +category = "main" optional = false python-versions = "*" files = [ @@ -1058,6 +1129,7 @@ opensearch-py = ">=2.2.0" name = "django-prometheus" version = "2.3.1" description = "Django middlewares to monitor your application with Prometheus.io." +category = "main" optional = false python-versions = "*" files = [ @@ -1072,6 +1144,7 @@ prometheus-client = ">=0.7" name = "django-redis" version = "5.4.0" description = "Full featured redis cache backend for Django." +category = "main" optional = false python-versions = ">=3.6" files = [ @@ -1090,6 +1163,7 @@ hiredis = ["redis[hiredis] (>=3,!=4.0.0,!=4.0.1)"] name = "django-storages" version = "1.14.1" description = "Support for many storage backends in Django" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1113,6 +1187,7 @@ sftp = ["paramiko (>=1.15)"] name = "django-stubs" version = "4.2.4" description = "Mypy stubs for Django" +category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -1129,12 +1204,13 @@ types-PyYAML = "*" typing-extensions = "*" [package.extras] -compatible-mypy = ["mypy (==1.5.*)"] +compatible-mypy = ["mypy (>=1.5.0,<1.6.0)"] [[package]] name = "django-stubs-ext" version = "4.2.2" description = "Monkey-patching and extensions for django-stubs" +category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -1150,6 +1226,7 @@ typing-extensions = "*" name = "django-timezone-field" version = "6.0.1" description = "A Django app providing DB, form, and REST framework fields for zoneinfo and pytz timezone objects." +category = "main" optional = false python-versions = ">=3.8,<4.0" files = [ @@ -1164,6 +1241,7 @@ Django = ">=3.2,<5.0" name = "django-webpack-loader" version = "2.0.1" description = "Transparently use webpack with django" +category = "main" optional = false python-versions = "*" files = [ @@ -1175,6 +1253,7 @@ files = [ name = "djangorestframework" version = "3.14.0" description = "Web APIs for Django, made easy." +category = "main" optional = false python-versions = ">=3.6" files = [ @@ -1190,6 +1269,7 @@ pytz = "*" name = "djangorestframework-csv" version = "2.1.1" description = "CSV Tools for Django REST Framework" +category = "main" optional = false python-versions = "*" files = [ @@ -1205,6 +1285,7 @@ unicodecsv = "*" name = "djangorestframework-stubs" version = "3.14.2" description = "PEP-484 stubs for django-rest-framework" +category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -1221,7 +1302,7 @@ types-requests = ">=0.1.12" typing-extensions = ">=3.10.0" [package.extras] -compatible-mypy = ["mypy (==1.4.*)"] +compatible-mypy = ["mypy (>=1.4.0,<1.5.0)"] coreapi = ["coreapi (>=2.0.0)"] markdown = ["types-Markdown (>=0.1.5)"] @@ -1229,6 +1310,7 @@ markdown = ["types-Markdown (>=0.1.5)"] name = "docutils" version = "0.20.1" description = "Docutils -- Python Documentation Utilities" +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1240,6 +1322,7 @@ files = [ name = "drf-spectacular" version = "0.26.5" description = "Sane and flexible OpenAPI 3 schema generation for Django REST framework" +category = "main" optional = false python-versions = ">=3.6" files = [ @@ -1263,6 +1346,7 @@ sidecar = ["drf-spectacular-sidecar"] name = "elasticsearch" version = "6.8.2" description = "Python client for Elasticsearch" +category = "main" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <4" files = [ @@ -1281,6 +1365,7 @@ requests = ["requests (>=2.4.0,<3.0.0)"] name = "executing" version = "2.0.0" description = "Get the currently executing AST node of a frame, and other information" +category = "dev" optional = false python-versions = "*" files = [ @@ -1295,6 +1380,7 @@ tests = ["asttokens (>=2.1.0)", "coverage", "coverage-enable-subprocess", "ipyth name = "factory-boy" version = "3.3.0" description = "A versatile test fixtures replacement based on thoughtbot's factory_bot for Ruby." +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1313,6 +1399,7 @@ doc = ["Sphinx", "sphinx-rtd-theme", "sphinxcontrib-spelling"] name = "faker" version = "19.6.2" description = "Faker is a Python package that generates fake data for you." +category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -1327,6 +1414,7 @@ python-dateutil = ">=2.4" name = "filelock" version = "3.12.4" description = "A platform independent file lock." +category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -1343,6 +1431,7 @@ typing = ["typing-extensions (>=4.7.1)"] name = "flake8" version = "6.1.0" description = "the modular source code checker: pep8 pyflakes and co" +category = "dev" optional = false python-versions = ">=3.8.1" files = [ @@ -1359,6 +1448,7 @@ pyflakes = ">=3.1.0,<3.2.0" name = "flake8-isort" version = "6.1.0" description = "flake8 plugin that integrates isort ." +category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -1376,6 +1466,7 @@ test = ["pytest"] name = "flower" version = "2.0.1" description = "Celery Flower" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1394,6 +1485,7 @@ tornado = ">=5.0.0,<7.0.0" name = "freezegun" version = "1.3.1" description = "Let your Python tests travel through time" +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1408,6 +1500,7 @@ python-dateutil = ">=2.7" name = "gunicorn" version = "20.1.0" description = "WSGI HTTP Server for UNIX" +category = "main" optional = false python-versions = ">=3.5" files = [ @@ -1428,6 +1521,7 @@ tornado = ["tornado (>=0.2)"] name = "habanero" version = "1.2.3" description = "Low Level Client for Crossref Search API" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1447,6 +1541,7 @@ test = ["pytest"] name = "hiredis" version = "2.2.3" description = "Python wrapper for hiredis" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1545,6 +1640,7 @@ files = [ name = "humanize" version = "4.8.0" description = "Python humanize utilities" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1559,6 +1655,7 @@ tests = ["freezegun", "pytest", "pytest-cov"] name = "identify" version = "2.5.30" description = "File identification library for Python" +category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -1573,6 +1670,7 @@ license = ["ukkonen"] name = "idna" version = "3.4" description = "Internationalized Domain Names in Applications (IDNA)" +category = "main" optional = false python-versions = ">=3.5" files = [ @@ -1584,6 +1682,7 @@ files = [ name = "imagesize" version = "1.4.1" description = "Getting image size from png/jpeg/jpeg2000/gif file" +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ @@ -1595,6 +1694,7 @@ files = [ name = "inflection" version = "0.5.1" description = "A port of Ruby on Rails inflector to Python" +category = "main" optional = false python-versions = ">=3.5" files = [ @@ -1606,6 +1706,7 @@ files = [ name = "iniconfig" version = "2.0.0" description = "brain-dead simple config-ini parsing" +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1617,6 +1718,7 @@ files = [ name = "ipdb" version = "0.13.13" description = "IPython-enabled pdb" +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ @@ -1632,6 +1734,7 @@ ipython = {version = ">=7.31.1", markers = "python_version >= \"3.11\""} name = "ipython" version = "8.16.1" description = "IPython: Productive Interactive Computing" +category = "dev" optional = false python-versions = ">=3.9" files = [ @@ -1670,6 +1773,7 @@ test-extra = ["curio", "matplotlib (!=3.2.0)", "nbformat", "numpy (>=1.21)", "pa name = "isort" version = "5.12.0" description = "A Python utility / library to sort Python imports." +category = "dev" optional = false python-versions = ">=3.8.0" files = [ @@ -1687,6 +1791,7 @@ requirements-deprecated-finder = ["pip-api", "pipreqs"] name = "jedi" version = "0.19.1" description = "An autocompletion tool for Python that can be used for text editors." +category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -1706,6 +1811,7 @@ testing = ["Django", "attrs", "colorama", "docopt", "pytest (<7.0.0)"] name = "jinja2" version = "3.1.2" description = "A very fast and expressive template engine." +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1723,6 +1829,7 @@ i18n = ["Babel (>=2.7)"] name = "jmespath" version = "1.0.1" description = "JSON Matching Expressions" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1734,6 +1841,7 @@ files = [ name = "jsonschema" version = "4.19.1" description = "An implementation of JSON Schema validation for Python" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1755,6 +1863,7 @@ format-nongpl = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339- 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 = [ @@ -1769,6 +1878,7 @@ referencing = ">=0.28.0" name = "kombu" version = "5.3.2" description = "Messaging library for Python." +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1801,6 +1911,7 @@ zookeeper = ["kazoo (>=2.8.0)"] name = "livereload" version = "2.6.3" description = "Python LiveReload is an awesome tool for web developers" +category = "dev" optional = false python-versions = "*" files = [ @@ -1816,6 +1927,7 @@ tornado = {version = "*", markers = "python_version > \"2.7\""} name = "markupsafe" version = "2.1.3" description = "Safely add untrusted strings to HTML/XML markup." +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1885,6 +1997,7 @@ files = [ name = "matplotlib-inline" version = "0.1.6" description = "Inline Matplotlib backend for Jupyter" +category = "dev" optional = false python-versions = ">=3.5" files = [ @@ -1899,6 +2012,7 @@ traitlets = "*" name = "mccabe" version = "0.7.0" description = "McCabe checker, plugin for flake8" +category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -1910,6 +2024,7 @@ files = [ name = "multidict" version = "6.0.4" description = "multidict implementation" +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1993,6 +2108,7 @@ files = [ name = "mypy" version = "1.5.1" description = "Optional static typing for Python" +category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -2038,6 +2154,7 @@ reports = ["lxml"] name = "mypy-extensions" version = "1.0.0" description = "Type system extensions for programs checked with the mypy type checker." +category = "dev" optional = false python-versions = ">=3.5" files = [ @@ -2049,6 +2166,7 @@ files = [ name = "nodeenv" version = "1.8.0" description = "Node.js virtual environment builder" +category = "dev" optional = false python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*" files = [ @@ -2059,10 +2177,57 @@ files = [ [package.dependencies] setuptools = "*" +[[package]] +name = "numpy" +version = "1.26.4" +description = "Fundamental package for array computing in Python" +category = "main" +optional = false +python-versions = ">=3.9" +files = [ + {file = "numpy-1.26.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:9ff0f4f29c51e2803569d7a51c2304de5554655a60c5d776e35b4a41413830d0"}, + {file = "numpy-1.26.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2e4ee3380d6de9c9ec04745830fd9e2eccb3e6cf790d39d7b98ffd19b0dd754a"}, + {file = "numpy-1.26.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d209d8969599b27ad20994c8e41936ee0964e6da07478d6c35016bc386b66ad4"}, + {file = "numpy-1.26.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ffa75af20b44f8dba823498024771d5ac50620e6915abac414251bd971b4529f"}, + {file = "numpy-1.26.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:62b8e4b1e28009ef2846b4c7852046736bab361f7aeadeb6a5b89ebec3c7055a"}, + {file = "numpy-1.26.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:a4abb4f9001ad2858e7ac189089c42178fcce737e4169dc61321660f1a96c7d2"}, + {file = "numpy-1.26.4-cp310-cp310-win32.whl", hash = "sha256:bfe25acf8b437eb2a8b2d49d443800a5f18508cd811fea3181723922a8a82b07"}, + {file = "numpy-1.26.4-cp310-cp310-win_amd64.whl", hash = "sha256:b97fe8060236edf3662adfc2c633f56a08ae30560c56310562cb4f95500022d5"}, + {file = "numpy-1.26.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:4c66707fabe114439db9068ee468c26bbdf909cac0fb58686a42a24de1760c71"}, + {file = "numpy-1.26.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:edd8b5fe47dab091176d21bb6de568acdd906d1887a4584a15a9a96a1dca06ef"}, + {file = "numpy-1.26.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7ab55401287bfec946ced39700c053796e7cc0e3acbef09993a9ad2adba6ca6e"}, + {file = "numpy-1.26.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:666dbfb6ec68962c033a450943ded891bed2d54e6755e35e5835d63f4f6931d5"}, + {file = "numpy-1.26.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:96ff0b2ad353d8f990b63294c8986f1ec3cb19d749234014f4e7eb0112ceba5a"}, + {file = "numpy-1.26.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:60dedbb91afcbfdc9bc0b1f3f402804070deed7392c23eb7a7f07fa857868e8a"}, + {file = "numpy-1.26.4-cp311-cp311-win32.whl", hash = "sha256:1af303d6b2210eb850fcf03064d364652b7120803a0b872f5211f5234b399f20"}, + {file = "numpy-1.26.4-cp311-cp311-win_amd64.whl", hash = "sha256:cd25bcecc4974d09257ffcd1f098ee778f7834c3ad767fe5db785be9a4aa9cb2"}, + {file = "numpy-1.26.4-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:b3ce300f3644fb06443ee2222c2201dd3a89ea6040541412b8fa189341847218"}, + {file = "numpy-1.26.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:03a8c78d01d9781b28a6989f6fa1bb2c4f2d51201cf99d3dd875df6fbd96b23b"}, + {file = "numpy-1.26.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9fad7dcb1aac3c7f0584a5a8133e3a43eeb2fe127f47e3632d43d677c66c102b"}, + {file = "numpy-1.26.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:675d61ffbfa78604709862923189bad94014bef562cc35cf61d3a07bba02a7ed"}, + {file = "numpy-1.26.4-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:ab47dbe5cc8210f55aa58e4805fe224dac469cde56b9f731a4c098b91917159a"}, + {file = "numpy-1.26.4-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:1dda2e7b4ec9dd512f84935c5f126c8bd8b9f2fc001e9f54af255e8c5f16b0e0"}, + {file = "numpy-1.26.4-cp312-cp312-win32.whl", hash = "sha256:50193e430acfc1346175fcbdaa28ffec49947a06918b7b92130744e81e640110"}, + {file = "numpy-1.26.4-cp312-cp312-win_amd64.whl", hash = "sha256:08beddf13648eb95f8d867350f6a018a4be2e5ad54c8d8caed89ebca558b2818"}, + {file = "numpy-1.26.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:7349ab0fa0c429c82442a27a9673fc802ffdb7c7775fad780226cb234965e53c"}, + {file = "numpy-1.26.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:52b8b60467cd7dd1e9ed082188b4e6bb35aa5cdd01777621a1658910745b90be"}, + {file = "numpy-1.26.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d5241e0a80d808d70546c697135da2c613f30e28251ff8307eb72ba696945764"}, + {file = "numpy-1.26.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f870204a840a60da0b12273ef34f7051e98c3b5961b61b0c2c1be6dfd64fbcd3"}, + {file = "numpy-1.26.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:679b0076f67ecc0138fd2ede3a8fd196dddc2ad3254069bcb9faf9a79b1cebcd"}, + {file = "numpy-1.26.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:47711010ad8555514b434df65f7d7b076bb8261df1ca9bb78f53d3b2db02e95c"}, + {file = "numpy-1.26.4-cp39-cp39-win32.whl", hash = "sha256:a354325ee03388678242a4d7ebcd08b5c727033fcff3b2f536aea978e15ee9e6"}, + {file = "numpy-1.26.4-cp39-cp39-win_amd64.whl", hash = "sha256:3373d5d70a5fe74a2c1bb6d2cfd9609ecf686d47a2d7b1d37a8f3b6bf6003aea"}, + {file = "numpy-1.26.4-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:afedb719a9dcfc7eaf2287b839d8198e06dcd4cb5d276a3df279231138e83d30"}, + {file = "numpy-1.26.4-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:95a7476c59002f2f6c590b9b7b998306fba6a5aa646b1e22ddfeaf8f78c3a29c"}, + {file = "numpy-1.26.4-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:7e50d0a0cc3189f9cb0aeb3a6a6af18c16f59f004b866cd2be1c14b36134a4a0"}, + {file = "numpy-1.26.4.tar.gz", hash = "sha256:2a02aba9ed12e4ac4eb3ea9421c420301a0c6460d9830d74a9df87efa4912010"}, +] + [[package]] name = "oauthlib" version = "3.2.2" description = "A generic, spec-compliant, thorough implementation of the OAuth request-signing logic" +category = "main" optional = false python-versions = ">=3.6" files = [ @@ -2079,6 +2244,7 @@ signedtoken = ["cryptography (>=3.0.0)", "pyjwt (>=2.0.0,<3)"] name = "opensearch" version = "0.9.2" description = "Interact with opensearch services" +category = "main" optional = false python-versions = "*" files = [ @@ -2089,6 +2255,7 @@ files = [ name = "opensearch-dsl" version = "2.1.0" description = "Python client for OpenSearch" +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ @@ -2108,6 +2275,7 @@ develop = ["coverage (<7.0.0)", "mock", "pytest (>=3.0.0)", "pytest-cov", "pytes name = "opensearch-py" version = "2.3.1" description = "Python client for OpenSearch" +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4" files = [ @@ -2132,6 +2300,7 @@ kerberos = ["requests-kerberos"] name = "packaging" version = "23.2" description = "Core utilities for Python packages" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -2139,10 +2308,81 @@ files = [ {file = "packaging-23.2.tar.gz", hash = "sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5"}, ] +[[package]] +name = "pandas" +version = "2.2.2" +description = "Powerful data structures for data analysis, time series, and statistics" +category = "main" +optional = false +python-versions = ">=3.9" +files = [ + {file = "pandas-2.2.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:90c6fca2acf139569e74e8781709dccb6fe25940488755716d1d354d6bc58bce"}, + {file = "pandas-2.2.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c7adfc142dac335d8c1e0dcbd37eb8617eac386596eb9e1a1b77791cf2498238"}, + {file = "pandas-2.2.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4abfe0be0d7221be4f12552995e58723c7422c80a659da13ca382697de830c08"}, + {file = "pandas-2.2.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8635c16bf3d99040fdf3ca3db669a7250ddf49c55dc4aa8fe0ae0fa8d6dcc1f0"}, + {file = "pandas-2.2.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:40ae1dffb3967a52203105a077415a86044a2bea011b5f321c6aa64b379a3f51"}, + {file = "pandas-2.2.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:8e5a0b00e1e56a842f922e7fae8ae4077aee4af0acb5ae3622bd4b4c30aedf99"}, + {file = "pandas-2.2.2-cp310-cp310-win_amd64.whl", hash = "sha256:ddf818e4e6c7c6f4f7c8a12709696d193976b591cc7dc50588d3d1a6b5dc8772"}, + {file = "pandas-2.2.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:696039430f7a562b74fa45f540aca068ea85fa34c244d0deee539cb6d70aa288"}, + {file = "pandas-2.2.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:8e90497254aacacbc4ea6ae5e7a8cd75629d6ad2b30025a4a8b09aa4faf55151"}, + {file = "pandas-2.2.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:58b84b91b0b9f4bafac2a0ac55002280c094dfc6402402332c0913a59654ab2b"}, + {file = "pandas-2.2.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6d2123dc9ad6a814bcdea0f099885276b31b24f7edf40f6cdbc0912672e22eee"}, + {file = "pandas-2.2.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:2925720037f06e89af896c70bca73459d7e6a4be96f9de79e2d440bd499fe0db"}, + {file = "pandas-2.2.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:0cace394b6ea70c01ca1595f839cf193df35d1575986e484ad35c4aeae7266c1"}, + {file = "pandas-2.2.2-cp311-cp311-win_amd64.whl", hash = "sha256:873d13d177501a28b2756375d59816c365e42ed8417b41665f346289adc68d24"}, + {file = "pandas-2.2.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:9dfde2a0ddef507a631dc9dc4af6a9489d5e2e740e226ad426a05cabfbd7c8ef"}, + {file = "pandas-2.2.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:e9b79011ff7a0f4b1d6da6a61aa1aa604fb312d6647de5bad20013682d1429ce"}, + {file = "pandas-2.2.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1cb51fe389360f3b5a4d57dbd2848a5f033350336ca3b340d1c53a1fad33bcad"}, + {file = "pandas-2.2.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eee3a87076c0756de40b05c5e9a6069c035ba43e8dd71c379e68cab2c20f16ad"}, + {file = "pandas-2.2.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:3e374f59e440d4ab45ca2fffde54b81ac3834cf5ae2cdfa69c90bc03bde04d76"}, + {file = "pandas-2.2.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:43498c0bdb43d55cb162cdc8c06fac328ccb5d2eabe3cadeb3529ae6f0517c32"}, + {file = "pandas-2.2.2-cp312-cp312-win_amd64.whl", hash = "sha256:d187d355ecec3629624fccb01d104da7d7f391db0311145817525281e2804d23"}, + {file = "pandas-2.2.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:0ca6377b8fca51815f382bd0b697a0814c8bda55115678cbc94c30aacbb6eff2"}, + {file = "pandas-2.2.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:9057e6aa78a584bc93a13f0a9bf7e753a5e9770a30b4d758b8d5f2a62a9433cd"}, + {file = "pandas-2.2.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:001910ad31abc7bf06f49dcc903755d2f7f3a9186c0c040b827e522e9cef0863"}, + {file = "pandas-2.2.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:66b479b0bd07204e37583c191535505410daa8df638fd8e75ae1b383851fe921"}, + {file = "pandas-2.2.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:a77e9d1c386196879aa5eb712e77461aaee433e54c68cf253053a73b7e49c33a"}, + {file = "pandas-2.2.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:92fd6b027924a7e178ac202cfbe25e53368db90d56872d20ffae94b96c7acc57"}, + {file = "pandas-2.2.2-cp39-cp39-win_amd64.whl", hash = "sha256:640cef9aa381b60e296db324337a554aeeb883ead99dc8f6c18e81a93942f5f4"}, + {file = "pandas-2.2.2.tar.gz", hash = "sha256:9e79019aba43cb4fda9e4d983f8e88ca0373adbb697ae9c6c43093218de28b54"}, +] + +[package.dependencies] +numpy = {version = ">=1.23.2", markers = "python_version == \"3.11\""} +python-dateutil = ">=2.8.2" +pytz = ">=2020.1" +tzdata = ">=2022.7" + +[package.extras] +all = ["PyQt5 (>=5.15.9)", "SQLAlchemy (>=2.0.0)", "adbc-driver-postgresql (>=0.8.0)", "adbc-driver-sqlite (>=0.8.0)", "beautifulsoup4 (>=4.11.2)", "bottleneck (>=1.3.6)", "dataframe-api-compat (>=0.1.7)", "fastparquet (>=2022.12.0)", "fsspec (>=2022.11.0)", "gcsfs (>=2022.11.0)", "html5lib (>=1.1)", "hypothesis (>=6.46.1)", "jinja2 (>=3.1.2)", "lxml (>=4.9.2)", "matplotlib (>=3.6.3)", "numba (>=0.56.4)", "numexpr (>=2.8.4)", "odfpy (>=1.4.1)", "openpyxl (>=3.1.0)", "pandas-gbq (>=0.19.0)", "psycopg2 (>=2.9.6)", "pyarrow (>=10.0.1)", "pymysql (>=1.0.2)", "pyreadstat (>=1.2.0)", "pytest (>=7.3.2)", "pytest-xdist (>=2.2.0)", "python-calamine (>=0.1.7)", "pyxlsb (>=1.0.10)", "qtpy (>=2.3.0)", "s3fs (>=2022.11.0)", "scipy (>=1.10.0)", "tables (>=3.8.0)", "tabulate (>=0.9.0)", "xarray (>=2022.12.0)", "xlrd (>=2.0.1)", "xlsxwriter (>=3.0.5)", "zstandard (>=0.19.0)"] +aws = ["s3fs (>=2022.11.0)"] +clipboard = ["PyQt5 (>=5.15.9)", "qtpy (>=2.3.0)"] +compression = ["zstandard (>=0.19.0)"] +computation = ["scipy (>=1.10.0)", "xarray (>=2022.12.0)"] +consortium-standard = ["dataframe-api-compat (>=0.1.7)"] +excel = ["odfpy (>=1.4.1)", "openpyxl (>=3.1.0)", "python-calamine (>=0.1.7)", "pyxlsb (>=1.0.10)", "xlrd (>=2.0.1)", "xlsxwriter (>=3.0.5)"] +feather = ["pyarrow (>=10.0.1)"] +fss = ["fsspec (>=2022.11.0)"] +gcp = ["gcsfs (>=2022.11.0)", "pandas-gbq (>=0.19.0)"] +hdf5 = ["tables (>=3.8.0)"] +html = ["beautifulsoup4 (>=4.11.2)", "html5lib (>=1.1)", "lxml (>=4.9.2)"] +mysql = ["SQLAlchemy (>=2.0.0)", "pymysql (>=1.0.2)"] +output-formatting = ["jinja2 (>=3.1.2)", "tabulate (>=0.9.0)"] +parquet = ["pyarrow (>=10.0.1)"] +performance = ["bottleneck (>=1.3.6)", "numba (>=0.56.4)", "numexpr (>=2.8.4)"] +plot = ["matplotlib (>=3.6.3)"] +postgresql = ["SQLAlchemy (>=2.0.0)", "adbc-driver-postgresql (>=0.8.0)", "psycopg2 (>=2.9.6)"] +pyarrow = ["pyarrow (>=10.0.1)"] +spss = ["pyreadstat (>=1.2.0)"] +sql-other = ["SQLAlchemy (>=2.0.0)", "adbc-driver-postgresql (>=0.8.0)", "adbc-driver-sqlite (>=0.8.0)"] +test = ["hypothesis (>=6.46.1)", "pytest (>=7.3.2)", "pytest-xdist (>=2.2.0)"] +xml = ["lxml (>=4.9.2)"] + [[package]] name = "parso" version = "0.8.3" description = "A Python Parser" +category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -2158,6 +2398,7 @@ testing = ["docopt", "pytest (<6.0.0)"] name = "pathspec" version = "0.11.2" description = "Utility library for gitignore style pattern matching of file paths." +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -2169,6 +2410,7 @@ files = [ name = "pexpect" version = "4.8.0" description = "Pexpect allows easy control of interactive console applications." +category = "dev" optional = false python-versions = "*" files = [ @@ -2183,6 +2425,7 @@ ptyprocess = ">=0.5" name = "pickleshare" version = "0.7.5" description = "Tiny 'shelve'-like database with concurrency support" +category = "dev" optional = false python-versions = "*" files = [ @@ -2194,6 +2437,7 @@ files = [ name = "pillow" version = "10.0.1" description = "Python Imaging Library (Fork)" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -2261,6 +2505,7 @@ tests = ["check-manifest", "coverage", "defusedxml", "markdown2", "olefile", "pa name = "platformdirs" version = "3.10.0" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -2276,6 +2521,7 @@ test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.4)", "pytest-co name = "pluggy" version = "1.3.0" description = "plugin and hook calling mechanisms for python" +category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -2291,6 +2537,7 @@ testing = ["pytest", "pytest-benchmark"] name = "pre-commit" version = "3.4.0" description = "A framework for managing and maintaining multi-language pre-commit hooks." +category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -2309,6 +2556,7 @@ virtualenv = ">=20.10.0" name = "prometheus-client" version = "0.17.1" description = "Python client for the Prometheus monitoring system." +category = "main" optional = false python-versions = ">=3.6" files = [ @@ -2323,6 +2571,7 @@ twisted = ["twisted"] name = "prompt-toolkit" version = "3.0.39" description = "Library for building powerful interactive command lines in Python" +category = "main" optional = false python-versions = ">=3.7.0" files = [ @@ -2337,6 +2586,7 @@ wcwidth = "*" name = "psycopg2" version = "2.9.8" description = "psycopg2 - Python-PostgreSQL Database Adapter" +category = "main" optional = false python-versions = ">=3.6" files = [ @@ -2357,6 +2607,7 @@ files = [ name = "ptyprocess" version = "0.7.0" description = "Run a subprocess in a pseudo terminal" +category = "dev" optional = false python-versions = "*" files = [ @@ -2368,6 +2619,7 @@ files = [ name = "pure-eval" version = "0.2.2" description = "Safely evaluate AST nodes without side effects" +category = "dev" optional = false python-versions = "*" files = [ @@ -2382,6 +2634,7 @@ tests = ["pytest"] name = "pycodestyle" version = "2.11.0" description = "Python style guide checker" +category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -2393,6 +2646,7 @@ files = [ name = "pycountry" version = "22.3.5" description = "ISO country, subdivision, language, currency and script definitions and their translations" +category = "main" optional = false python-versions = ">=3.6, <4" files = [ @@ -2406,6 +2660,7 @@ setuptools = "*" name = "pycparser" version = "2.21" description = "C parser in Python" +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ @@ -2417,6 +2672,7 @@ files = [ name = "pyflakes" version = "3.1.0" description = "passive checker of Python programs" +category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -2428,6 +2684,7 @@ files = [ name = "pygments" version = "2.16.1" description = "Pygments is a syntax highlighting package written in Python." +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -2442,6 +2699,7 @@ plugins = ["importlib-metadata"] name = "pyjwt" version = "2.8.0" description = "JSON Web Token implementation in Python" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -2462,6 +2720,7 @@ tests = ["coverage[toml] (==5.0.4)", "pytest (>=6.0.0,<7.0.0)"] name = "pylint" version = "2.3.0" description = "python code static checker" +category = "dev" optional = false python-versions = ">=3.4.*" files = [ @@ -2479,6 +2738,7 @@ mccabe = "*" name = "pylint-celery" version = "0.3" description = "pylint-celery is a Pylint plugin to aid Pylint in recognising and understandingerrors caused when using the Celery library" +category = "dev" optional = false python-versions = "*" files = [ @@ -2494,6 +2754,7 @@ pylint-plugin-utils = ">=0.2.1" name = "pylint-django" version = "2.5.3" description = "A Pylint plugin to help Pylint understand the Django web framework" +category = "dev" optional = false python-versions = "*" files = [ @@ -2513,6 +2774,7 @@ with-django = ["Django"] name = "pylint-plugin-utils" version = "0.8.2" description = "Utilities and helpers for writing Pylint plugins" +category = "dev" optional = false python-versions = ">=3.7,<4.0" files = [ @@ -2527,6 +2789,7 @@ pylint = ">=1.7" name = "pytest" version = "7.4.2" description = "pytest: simple powerful testing with Python" +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -2547,6 +2810,7 @@ testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "no name = "pytest-datadir" version = "1.5.0" description = "pytest plugin for test data directories and files" +category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -2561,6 +2825,7 @@ pytest = ">=5.0" name = "pytest-django" version = "4.5.2" description = "A Django plugin for pytest." +category = "dev" optional = false python-versions = ">=3.5" files = [ @@ -2579,6 +2844,7 @@ testing = ["Django", "django-configurations (>=2.0)"] name = "pytest-sugar" version = "0.9.7" description = "pytest-sugar is a plugin for pytest that changes the default look and feel of pytest (e.g. progressbar, show tests that fail instantly)." +category = "dev" optional = false python-versions = "*" files = [ @@ -2598,6 +2864,7 @@ dev = ["black", "flake8", "pre-commit"] name = "pytest-vcr" version = "1.0.2" description = "Plugin for managing VCR.py cassettes" +category = "dev" optional = false python-versions = "*" files = [ @@ -2613,6 +2880,7 @@ vcrpy = "*" name = "python-crontab" version = "3.0.0" description = "Python Crontab API" +category = "main" optional = false python-versions = "*" files = [ @@ -2631,6 +2899,7 @@ cron-schedule = ["croniter"] name = "python-dateutil" version = "2.8.2" description = "Extensions to the standard Python datetime module" +category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" files = [ @@ -2645,6 +2914,7 @@ six = ">=1.5" name = "python-slugify" version = "8.0.1" description = "A Python slugify application that also handles Unicode" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -2662,6 +2932,7 @@ unidecode = ["Unidecode (>=1.1.1)"] name = "python3-openid" version = "3.2.0" description = "OpenID support for modern servers and consumers." +category = "main" optional = false python-versions = "*" files = [ @@ -2680,6 +2951,7 @@ postgresql = ["psycopg2"] name = "pytz" version = "2023.3.post1" description = "World timezone definitions, modern and historical" +category = "main" optional = false python-versions = "*" files = [ @@ -2691,6 +2963,7 @@ files = [ name = "pyyaml" version = "6.0.1" description = "YAML parser and emitter for Python" +category = "main" optional = false python-versions = ">=3.6" files = [ @@ -2712,6 +2985,7 @@ files = [ {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"}, {file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"}, {file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"}, + {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a08c6f0fe150303c1c6b71ebcd7213c2858041a7e01975da3a99aed1e7a378ef"}, {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"}, {file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"}, {file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"}, @@ -2750,6 +3024,7 @@ files = [ name = "redis" version = "4.6.0" description = "Python client for Redis database and key-value store" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -2768,6 +3043,7 @@ ocsp = ["cryptography (>=36.0.1)", "pyopenssl (==20.0.1)", "requests (>=2.26.0)" name = "referencing" version = "0.30.2" description = "JSON Referencing + Python" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -2783,6 +3059,7 @@ rpds-py = ">=0.7.0" name = "requests" version = "2.31.0" description = "Python HTTP for Humans." +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -2804,6 +3081,7 @@ use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] name = "requests-oauthlib" version = "1.3.1" description = "OAuthlib authentication support for Requests." +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ @@ -2822,6 +3100,7 @@ rsa = ["oauthlib[signedtoken] (>=3.0.0)"] name = "rpds-py" version = "0.10.3" description = "Python bindings to Rust's persistent data structures (rpds)" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -2928,6 +3207,7 @@ files = [ name = "s3transfer" version = "0.7.0" description = "An Amazon S3 Transfer Manager" +category = "main" optional = false python-versions = ">= 3.7" files = [ @@ -2945,6 +3225,7 @@ crt = ["botocore[crt] (>=1.20.29,<2.0a.0)"] name = "sentry-sdk" version = "1.31.0" description = "Python client for Sentry (https://sentry.io)" +category = "main" optional = false python-versions = "*" files = [ @@ -2990,6 +3271,7 @@ tornado = ["tornado (>=5)"] name = "setuptools" version = "68.2.2" description = "Easily download, build, install, upgrade, and uninstall Python packages" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -3006,6 +3288,7 @@ testing-integration = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "jar name = "six" version = "1.16.0" description = "Python 2 and 3 compatibility utilities" +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" files = [ @@ -3017,6 +3300,7 @@ files = [ name = "sniffio" version = "1.3.0" description = "Sniff out which async library your code is running under" +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -3028,6 +3312,7 @@ files = [ name = "snowballstemmer" version = "2.2.0" description = "This package provides 29 stemmers for 28 languages generated from Snowball algorithms." +category = "dev" optional = false python-versions = "*" files = [ @@ -3039,6 +3324,7 @@ files = [ name = "sphinx" version = "7.2.6" description = "Python documentation generator" +category = "dev" optional = false python-versions = ">=3.9" files = [ @@ -3073,6 +3359,7 @@ test = ["cython (>=3.0)", "filelock", "html5lib", "pytest (>=4.6)", "setuptools name = "sphinx-autobuild" version = "2021.3.14" description = "Rebuild Sphinx documentation on changes, with live-reload in the browser." +category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -3092,6 +3379,7 @@ test = ["pytest", "pytest-cov"] name = "sphinxcontrib-applehelp" version = "1.0.7" description = "sphinxcontrib-applehelp is a Sphinx extension which outputs Apple help books" +category = "dev" optional = false python-versions = ">=3.9" files = [ @@ -3110,6 +3398,7 @@ test = ["pytest"] name = "sphinxcontrib-devhelp" version = "1.0.5" description = "sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp documents" +category = "dev" optional = false python-versions = ">=3.9" files = [ @@ -3128,6 +3417,7 @@ test = ["pytest"] name = "sphinxcontrib-htmlhelp" version = "2.0.4" description = "sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files" +category = "dev" optional = false python-versions = ">=3.9" files = [ @@ -3146,6 +3436,7 @@ test = ["html5lib", "pytest"] name = "sphinxcontrib-jsmath" version = "1.0.1" description = "A sphinx extension which renders display math in HTML via JavaScript" +category = "dev" optional = false python-versions = ">=3.5" files = [ @@ -3160,6 +3451,7 @@ test = ["flake8", "mypy", "pytest"] name = "sphinxcontrib-qthelp" version = "1.0.6" description = "sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp documents" +category = "dev" optional = false python-versions = ">=3.9" files = [ @@ -3178,6 +3470,7 @@ test = ["pytest"] name = "sphinxcontrib-serializinghtml" version = "1.1.9" description = "sphinxcontrib-serializinghtml is a sphinx extension which outputs \"serialized\" HTML files (json and pickle)" +category = "dev" optional = false python-versions = ">=3.9" files = [ @@ -3196,6 +3489,7 @@ test = ["pytest"] name = "sqlparse" version = "0.4.4" description = "A non-validating SQL parser." +category = "main" optional = false python-versions = ">=3.5" files = [ @@ -3212,6 +3506,7 @@ test = ["pytest", "pytest-cov"] name = "stack-data" version = "0.6.3" description = "Extract data from python stack frames and tracebacks for informative displays" +category = "dev" optional = false python-versions = "*" files = [ @@ -3231,6 +3526,7 @@ tests = ["cython", "littleutils", "pygments", "pytest", "typeguard"] name = "termcolor" version = "2.3.0" description = "ANSI color formatting for output in terminal" +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -3245,6 +3541,7 @@ tests = ["pytest", "pytest-cov"] name = "text-unidecode" version = "1.3" description = "The most basic Text::Unidecode port" +category = "main" optional = false python-versions = "*" files = [ @@ -3256,6 +3553,7 @@ files = [ name = "tornado" version = "6.3.3" description = "Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed." +category = "main" optional = false python-versions = ">= 3.8" files = [ @@ -3276,6 +3574,7 @@ files = [ name = "tqdm" version = "4.66.1" description = "Fast, Extensible Progress Meter" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -3296,6 +3595,7 @@ telegram = ["requests"] name = "traitlets" version = "5.10.1" description = "Traitlets Python configuration system" +category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -3311,6 +3611,7 @@ test = ["argcomplete (>=3.0.3)", "mypy (>=1.5.1)", "pre-commit", "pytest (>=7.0, name = "types-pytz" version = "2023.3.1.1" description = "Typing stubs for pytz" +category = "dev" optional = false python-versions = "*" files = [ @@ -3322,6 +3623,7 @@ files = [ name = "types-pyyaml" version = "6.0.12.12" description = "Typing stubs for PyYAML" +category = "dev" optional = false python-versions = "*" files = [ @@ -3333,6 +3635,7 @@ files = [ name = "types-requests" version = "2.31.0.6" description = "Typing stubs for requests" +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -3347,6 +3650,7 @@ types-urllib3 = "*" name = "types-urllib3" version = "1.26.25.14" description = "Typing stubs for urllib3" +category = "dev" optional = false python-versions = "*" files = [ @@ -3358,6 +3662,7 @@ files = [ name = "typing-extensions" version = "4.8.0" description = "Backported and Experimental Type Hints for Python 3.8+" +category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -3369,6 +3674,7 @@ files = [ name = "tzdata" version = "2023.3" description = "Provider of IANA time zone data" +category = "main" optional = false python-versions = ">=2" files = [ @@ -3380,6 +3686,7 @@ files = [ name = "unicodecsv" version = "0.14.1" description = "Python2's stdlib csv module is nice, but it doesn't support unicode. This module is a drop-in replacement which *does*." +category = "main" optional = false python-versions = "*" files = [ @@ -3390,6 +3697,7 @@ files = [ name = "uritemplate" version = "4.1.1" description = "Implementation of RFC 6570 URI Templates" +category = "main" optional = false python-versions = ">=3.6" files = [ @@ -3401,6 +3709,7 @@ files = [ name = "urllib3" version = "1.26.16" 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.*" files = [ @@ -3417,6 +3726,7 @@ socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] name = "vcrpy" version = "5.1.0" description = "Automatically mock your HTTP interactions to simplify and speed up testing" +category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -3433,6 +3743,7 @@ yarl = "*" name = "vine" version = "5.0.0" description = "Promises, promises, promises." +category = "main" optional = false python-versions = ">=3.6" files = [ @@ -3444,6 +3755,7 @@ files = [ name = "virtualenv" version = "20.24.5" description = "Virtual Python Environment builder" +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -3464,6 +3776,7 @@ test = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "coverage-enable-subprocess name = "watchdog" version = "3.0.0" description = "Filesystem events monitoring" +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -3503,6 +3816,7 @@ watchmedo = ["PyYAML (>=3.10)"] name = "watchfiles" version = "0.19.0" description = "Simple, modern and high performance file watching and code reload in python." +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -3537,6 +3851,7 @@ anyio = ">=3.0.0" name = "wcwidth" version = "0.2.8" description = "Measures the displayed width of unicode strings in a terminal" +category = "main" optional = false python-versions = "*" files = [ @@ -3548,6 +3863,7 @@ files = [ name = "werkzeug" version = "2.3.7" description = "The comprehensive WSGI web application library." +category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -3566,6 +3882,7 @@ watchdog = ["watchdog (>=2.3)"] name = "whitenoise" version = "6.5.0" description = "Radically simplified static file serving for WSGI applications" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -3580,6 +3897,7 @@ brotli = ["Brotli"] name = "wrapt" version = "1.16.0" description = "Module for decorators, wrappers and monkey patching." +category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -3659,6 +3977,7 @@ files = [ name = "yarl" version = "1.9.4" description = "Yet another URL library" +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -3761,4 +4080,4 @@ multidict = ">=4.0" [metadata] lock-version = "2.0" python-versions = "~3.11" -content-hash = "0ec2c3b9e4e0eff6756b621211037f5635d4d686b4d5bd145d7589646c40d8b6" +content-hash = "27b28038f62625d0e139cc27fcf3280b155d1a0ac11061192d362b41657b3b49" diff --git a/pyproject.toml b/pyproject.toml index 0bc61c985..647512b2e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,6 +43,8 @@ django-prometheus = "^2.3.1" djangorestframework-csv = "^2.1.1" habanero = "^1.2.3" django-lifecycle = "^1.1.2" +country-converter = "^1.2" +numpy = "<2" [tool.poetry.dev-dependencies] Werkzeug = {extras = ["watchdog"], version = "^2.3.4"} diff --git a/scoap3/articles/tests/data/workflow_record.json b/scoap3/articles/tests/data/workflow_record.json index 7be41ce54..cafed83a3 100644 --- a/scoap3/articles/tests/data/workflow_record.json +++ b/scoap3/articles/tests/data/workflow_record.json @@ -40,6 +40,24 @@ ], "record_creation_date": "2023-10-31T08:20:22.109303+00:00", "authors": [ + { + "affiliations": [ + { + "country": "UK", + "value": "Department of Physics, Swansea University, Swansea SA2 8PP, United Kingdom" + } + ], + "full_name": "John Doe" + }, + { + "affiliations": [ + { + "country": null, + "value": "Department of Physics, Swansea University, Swansea SA2 8PP, WrongCountry" + } + ], + "full_name": "George Wrong" + }, { "affiliations": [ { diff --git a/scoap3/articles/tests/test_article_views.py b/scoap3/articles/tests/test_article_views.py index 0ab667430..d88cb87b2 100644 --- a/scoap3/articles/tests/test_article_views.py +++ b/scoap3/articles/tests/test_article_views.py @@ -51,7 +51,9 @@ def test_update_article_from_workflow(self, client, user, shared_datadir): article.title == "The Effective QCD Running Coupling Constant and a Dirac Model for the Charmonium Spectrum" ) - search_article_detail_url = reverse("search:article-detail", kwargs={"pk": article_id}) + search_article_detail_url = reverse( + "search:article-detail", kwargs={"pk": article_id} + ) search_response = client.get( search_article_detail_url, @@ -59,8 +61,30 @@ def test_update_article_from_workflow(self, client, user, shared_datadir): ) assert search_response.status_code == status.HTTP_200_OK assert search_response.data["doi"] == data["dois"][0]["value"] - assert search_response.data["copyright"][0]["statement"] == data["copyright"][0]["statement"] - assert search_response.data["publication_info"][0]["publisher"] == data["imprints"][0]["publisher"] + assert ( + search_response.data["copyright"][0]["statement"] + == data["copyright"][0]["statement"] + ) + assert ( + search_response.data["publication_info"][0]["publisher"] + == data["imprints"][0]["publisher"] + ) + assert ( + search_response.data["authors"][0]["affiliations"][0]["country"]["code"] + == "GB" + ) + assert ( + search_response.data["authors"][0]["affiliations"][0]["country"]["name"] + == "United Kingdom" + ) + assert ( + search_response.data["authors"][1]["affiliations"][0]["country"]["code"] + == "-" + ) + assert ( + search_response.data["authors"][1]["affiliations"][0]["country"]["name"] + == "-" + ) data["titles"][0]["title"] = "New title" response = client.post( diff --git a/scoap3/tasks.py b/scoap3/tasks.py index a49f50606..62618e10a 100644 --- a/scoap3/tasks.py +++ b/scoap3/tasks.py @@ -4,7 +4,7 @@ import os import re -import pycountry +import country_converter as coco from django.core.exceptions import MultipleObjectsReturned, ValidationError from django.core.files.storage import default_storage, storages from django.core.validators import URLValidator @@ -26,6 +26,7 @@ ) logger = logging.getLogger(__name__) +cc = coco.CountryConverter() def get_default_storage_path(): @@ -279,8 +280,8 @@ def _create_country(affiliation): } else: country_data = { - "code": pycountry.countries.search_fuzzy(country)[0].alpha_2, - "name": pycountry.countries.search_fuzzy(country)[0].name, + "code": cc.convert(country, to="iso2"), + "name": cc.convert(country, to="name_short"), } country_obj, _ = Country.objects.get_or_create(**country_data) logger.info("Country:%s created.", country_obj.name) From a1654feb50914fe0099b43ac1a2263f14839b595 Mon Sep 17 00:00:00 2001 From: pamfilos Date: Thu, 18 Jul 2024 17:43:09 +0200 Subject: [PATCH 4/4] admin: articles - add read only fields for created, updated Signed-off-by: pamfilos --- scoap3/articles/admin.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scoap3/articles/admin.py b/scoap3/articles/admin.py index e4d031c64..3e96c7706 100644 --- a/scoap3/articles/admin.py +++ b/scoap3/articles/admin.py @@ -265,6 +265,10 @@ class ArticleAdmin(admin.ModelAdmin): "report__check_doi_registration_time", "report__check_authors_affiliation", ] + readonly_fields = [ + "_created_at", + "_updated_at", + ] inlines = [ArticleAuthorsInline, ArticleComplianceReportInline] @admin.display(description="Journal")