diff --git a/.github/workflows/continuous-integration-test.yml b/.github/workflows/continuous-integration-test.yml index ae87923..fab2c2c 100644 --- a/.github/workflows/continuous-integration-test.yml +++ b/.github/workflows/continuous-integration-test.yml @@ -13,18 +13,18 @@ jobs: # with: # access_token: ${{ github.token }} - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: '14' + node-version: '16' - name: Docker compose up run: docker-compose up -d - name: Set up Python 3.9 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: 3.9 diff --git a/.gitignore b/.gitignore index b086bf6..863a264 100644 --- a/.gitignore +++ b/.gitignore @@ -72,3 +72,5 @@ celerybeat-schedule # VSCodium .vscode + +.DS_Store \ No newline at end of file diff --git a/Dockerfile.base b/Dockerfile.base index 74f6eca..630dbbb 100644 --- a/Dockerfile.base +++ b/Dockerfile.base @@ -25,13 +25,11 @@ RUN pip install --upgrade setuptools wheel pip poetry # # uwsgi uwsgitop uwsgi-tools # Install Node -RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - -RUN apt-get install --no-install-recommends -y nodejs && rm -rf /var/lib/apt/lists/* - -# RUN npm update - -# RUN python -m site -# RUN python -m site --user-site +RUN apt-get update && apt-get install -y ca-certificates curl gnupg +RUN mkdir -p /etc/apt/keyrings +RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list +RUN apt-get update && apt-get install nodejs -y # Install Invenio ENV WORKING_DIR=/invenio diff --git a/poetry.lock b/poetry.lock index 51c2399..3db4f83 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# 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.8.3 and should not be changed by hand. [[package]] name = "alabaster" @@ -124,13 +124,13 @@ tests-no-zope = ["attrs[tests-mypy]", "cloudpickle", "hypothesis", "pympler", "p [[package]] name = "autoflake" -version = "2.3.0" +version = "2.3.1" description = "Removes unused imports and unused variables" optional = false python-versions = ">=3.8" files = [ - {file = "autoflake-2.3.0-py3-none-any.whl", hash = "sha256:79a51eb8c0744759d2efe052455ab20aa6a314763510c3fd897499a402126327"}, - {file = "autoflake-2.3.0.tar.gz", hash = "sha256:8c2011fa34701b9d7dcf05b9873bc4859d4fce4e62dfea90dffefd1576f5f01d"}, + {file = "autoflake-2.3.1-py3-none-any.whl", hash = "sha256:3ae7495db9084b7b32818b4140e6dc4fc280b712fb414f5b8fe57b0a8e85a840"}, + {file = "autoflake-2.3.1.tar.gz", hash = "sha256:c98b75dc5b0a86459c4f01a1d32ac7eb4338ec4317a4469515ff1e687ecd909e"}, ] [package.dependencies] @@ -139,13 +139,13 @@ tomli = {version = ">=2.0.1", markers = "python_version < \"3.11\""} [[package]] name = "babel" -version = "2.14.0" +version = "2.15.0" description = "Internationalization utilities" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "Babel-2.14.0-py3-none-any.whl", hash = "sha256:efb1a25b7118e67ce3a259bed20545c29cb68be8ad2c784c83689981b7a57287"}, - {file = "Babel-2.14.0.tar.gz", hash = "sha256:6919867db036398ba21eb5c7a0f6b28ab8cbc3ae7a73a44ebe34ae74a4e7d363"}, + {file = "Babel-2.15.0-py3-none-any.whl", hash = "sha256:08706bdad8d0a3413266ab61bd6c34d0c28d6e1e7badf40a2cebe67644e2e1fb"}, + {file = "babel-2.15.0.tar.gz", hash = "sha256:8daf0e265d05768bc6c7a314cf1321e9a123afc328cc635c18622a2f30a04413"}, ] [package.extras] @@ -181,6 +181,41 @@ files = [ {file = "billiard-3.6.4.0.tar.gz", hash = "sha256:299de5a8da28a783d51b197d496bef4f1595dd023a93a4f59dde1886ae905547"}, ] +[[package]] +name = "black" +version = "22.12.0" +description = "The uncompromising code formatter." +optional = false +python-versions = ">=3.7" +files = [ + {file = "black-22.12.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9eedd20838bd5d75b80c9f5487dbcb06836a43833a37846cf1d8c1cc01cef59d"}, + {file = "black-22.12.0-cp310-cp310-win_amd64.whl", hash = "sha256:159a46a4947f73387b4d83e87ea006dbb2337eab6c879620a3ba52699b1f4351"}, + {file = "black-22.12.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d30b212bffeb1e252b31dd269dfae69dd17e06d92b87ad26e23890f3efea366f"}, + {file = "black-22.12.0-cp311-cp311-win_amd64.whl", hash = "sha256:7412e75863aa5c5411886804678b7d083c7c28421210180d67dfd8cf1221e1f4"}, + {file = "black-22.12.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c116eed0efb9ff870ded8b62fe9f28dd61ef6e9ddd28d83d7d264a38417dcee2"}, + {file = "black-22.12.0-cp37-cp37m-win_amd64.whl", hash = "sha256:1f58cbe16dfe8c12b7434e50ff889fa479072096d79f0a7f25e4ab8e94cd8350"}, + {file = "black-22.12.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:77d86c9f3db9b1bf6761244bc0b3572a546f5fe37917a044e02f3166d5aafa7d"}, + {file = "black-22.12.0-cp38-cp38-win_amd64.whl", hash = "sha256:82d9fe8fee3401e02e79767016b4907820a7dc28d70d137eb397b92ef3cc5bfc"}, + {file = "black-22.12.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:101c69b23df9b44247bd88e1d7e90154336ac4992502d4197bdac35dd7ee3320"}, + {file = "black-22.12.0-cp39-cp39-win_amd64.whl", hash = "sha256:559c7a1ba9a006226f09e4916060982fd27334ae1998e7a38b3f33a37f7a2148"}, + {file = "black-22.12.0-py3-none-any.whl", hash = "sha256:436cc9167dd28040ad90d3b404aec22cedf24a6e4d7de221bec2730ec0c97bcf"}, + {file = "black-22.12.0.tar.gz", hash = "sha256:229351e5a18ca30f447bf724d007f890f97e13af070bb6ad4c0a441cd7596a2f"}, +] + +[package.dependencies] +click = ">=8.0.0" +mypy-extensions = ">=0.4.3" +pathspec = ">=0.9.0" +platformdirs = ">=2" +tomli = {version = ">=1.1.0", markers = "python_full_version < \"3.11.0a7\""} +typing-extensions = {version = ">=3.10.0.0", markers = "python_version < \"3.10\""} + +[package.extras] +colorama = ["colorama (>=0.4.3)"] +d = ["aiohttp (>=3.7.4)"] +jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"] +uvloop = ["uvloop (>=0.15.2)"] + [[package]] name = "bleach" version = "6.1.0" @@ -201,48 +236,49 @@ css = ["tinycss2 (>=1.1.0,<1.3)"] [[package]] name = "blinker" -version = "1.7.0" +version = "1.8.2" description = "Fast, simple object-to-object and broadcast signaling" optional = false python-versions = ">=3.8" files = [ - {file = "blinker-1.7.0-py3-none-any.whl", hash = "sha256:c3f865d4d54db7abc53758a01601cf343fe55b84c1de4e3fa910e420b438d5b9"}, - {file = "blinker-1.7.0.tar.gz", hash = "sha256:e6820ff6fa4e4d1d8e2747c2283749c3f547e4fee112b98555cdcdae32996182"}, + {file = "blinker-1.8.2-py3-none-any.whl", hash = "sha256:1779309f71bf239144b9399d06ae925637cf6634cf6bd131104184531bf67c01"}, + {file = "blinker-1.8.2.tar.gz", hash = "sha256:8f77b09d3bf7c795e969e9486f39c2c5e9c39d4ee07424be2bc594ece9642d83"}, ] [[package]] name = "build" -version = "1.0.3" +version = "1.2.1" description = "A simple, correct Python build frontend" optional = false -python-versions = ">= 3.7" +python-versions = ">=3.8" files = [ - {file = "build-1.0.3-py3-none-any.whl", hash = "sha256:589bf99a67df7c9cf07ec0ac0e5e2ea5d4b37ac63301c4986d1acb126aa83f8f"}, - {file = "build-1.0.3.tar.gz", hash = "sha256:538aab1b64f9828977f84bc63ae570b060a8ed1be419e7870b8b4fc5e6ea553b"}, + {file = "build-1.2.1-py3-none-any.whl", hash = "sha256:75e10f767a433d9a86e50d83f418e83efc18ede923ee5ff7df93b6cb0306c5d4"}, + {file = "build-1.2.1.tar.gz", hash = "sha256:526263f4870c26f26c433545579475377b2b7588b6f1eac76a001e873ae3e19d"}, ] [package.dependencies] colorama = {version = "*", markers = "os_name == \"nt\""} -importlib-metadata = {version = ">=4.6", markers = "python_version < \"3.10\""} -packaging = ">=19.0" +importlib-metadata = {version = ">=4.6", markers = "python_full_version < \"3.10.2\""} +packaging = ">=19.1" pyproject_hooks = "*" tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} [package.extras] docs = ["furo (>=2023.08.17)", "sphinx (>=7.0,<8.0)", "sphinx-argparse-cli (>=1.5)", "sphinx-autodoc-typehints (>=1.10)", "sphinx-issues (>=3.0.0)"] -test = ["filelock (>=3)", "pytest (>=6.2.4)", "pytest-cov (>=2.12)", "pytest-mock (>=2)", "pytest-rerunfailures (>=9.1)", "pytest-xdist (>=1.34)", "setuptools (>=42.0.0)", "setuptools (>=56.0.0)", "setuptools (>=56.0.0)", "setuptools (>=67.8.0)", "wheel (>=0.36.0)"] -typing = ["importlib-metadata (>=5.1)", "mypy (>=1.5.0,<1.6.0)", "tomli", "typing-extensions (>=3.7.4.3)"] +test = ["build[uv,virtualenv]", "filelock (>=3)", "pytest (>=6.2.4)", "pytest-cov (>=2.12)", "pytest-mock (>=2)", "pytest-rerunfailures (>=9.1)", "pytest-xdist (>=1.34)", "setuptools (>=42.0.0)", "setuptools (>=56.0.0)", "setuptools (>=56.0.0)", "setuptools (>=67.8.0)", "wheel (>=0.36.0)"] +typing = ["build[uv]", "importlib-metadata (>=5.1)", "mypy (>=1.9.0,<1.10.0)", "tomli", "typing-extensions (>=3.7.4.3)"] +uv = ["uv (>=0.1.18)"] virtualenv = ["virtualenv (>=20.0.35)"] [[package]] name = "cachelib" -version = "0.12.0" +version = "0.13.0" description = "A collection of cache libraries in the same API interface." optional = false python-versions = ">=3.8" files = [ - {file = "cachelib-0.12.0-py3-none-any.whl", hash = "sha256:038f4d855afc3eb8caab10458f6eac55c328911f9055824c22c2f259ef9ed3a3"}, - {file = "cachelib-0.12.0.tar.gz", hash = "sha256:8243029a028436fd23229113dee517c0700bb43a8a289ec5a963e4af9ca2b194"}, + {file = "cachelib-0.13.0-py3-none-any.whl", hash = "sha256:8c8019e53b6302967d4e8329a504acf75e7bc46130291d30188a6e4e58162516"}, + {file = "cachelib-0.13.0.tar.gz", hash = "sha256:209d8996e3c57595bee274ff97116d1d73c4980b2fd9a34c7846cd07fd2e1a48"}, ] [[package]] @@ -301,13 +337,13 @@ zstd = ["zstandard"] [[package]] name = "certifi" -version = "2024.2.2" +version = "2024.6.2" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.6" files = [ - {file = "certifi-2024.2.2-py3-none-any.whl", hash = "sha256:dc383c07b76109f368f6106eee2b593b04a011ea4d55f652c6ca24a754d1cdd1"}, - {file = "certifi-2024.2.2.tar.gz", hash = "sha256:0569859f95fc761b18b45ef421b1290a0f65f147e92a1e5eb3e635f9a5e4e66f"}, + {file = "certifi-2024.6.2-py3-none-any.whl", hash = "sha256:ddc6c8ce995e6987e7faf5e3f1b02b302836a0e5d98ece18392cb1a36c72ad56"}, + {file = "certifi-2024.6.2.tar.gz", hash = "sha256:3cd43f1c6fa7dedc5899d69d3ad0398fd018ad1a17fba83ddaf78aa46c747516"}, ] [[package]] @@ -508,13 +544,13 @@ colorama = {version = "*", markers = "platform_system == \"Windows\""} [[package]] name = "click-didyoumean" -version = "0.3.0" +version = "0.3.1" description = "Enables git-like *did-you-mean* feature in click" optional = false -python-versions = ">=3.6.2,<4.0.0" +python-versions = ">=3.6.2" files = [ - {file = "click-didyoumean-0.3.0.tar.gz", hash = "sha256:f184f0d851d96b6d29297354ed981b7dd71df7ff500d82fa6d11f0856bee8035"}, - {file = "click_didyoumean-0.3.0-py3-none-any.whl", hash = "sha256:a0713dc7a1de3f06bc0df5a9567ad19ead2d3d5689b434768a6145bff77c0667"}, + {file = "click_didyoumean-0.3.1-py3-none-any.whl", hash = "sha256:5c4bb6007cfea5f2fd6583a2fb6701a22a41eb98957e63d0fac41c10e7c3117c"}, + {file = "click_didyoumean-0.3.1.tar.gz", hash = "sha256:4f82fdff0dbe64ef8ab2279bd6aa3f6a99c3b28c05aa09cbfc07c9d7fbb5a463"}, ] [package.dependencies] @@ -566,65 +602,79 @@ files = [ {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, ] +[[package]] +name = "commonmark" +version = "0.9.1" +description = "Python parser for the CommonMark Markdown spec" +optional = false +python-versions = "*" +files = [ + {file = "commonmark-0.9.1-py2.py3-none-any.whl", hash = "sha256:da2f38c92590f83de410ba1a3cbceafbc74fee9def35f9251ba9a971d6d66fd9"}, + {file = "commonmark-0.9.1.tar.gz", hash = "sha256:452f9dc859be7f06631ddcb328b6919c67984aca654e5fefb3914d54691aed60"}, +] + +[package.extras] +test = ["flake8 (==3.7.8)", "hypothesis (==3.55.3)"] + [[package]] name = "coverage" -version = "7.4.3" +version = "7.5.3" description = "Code coverage measurement for Python" optional = false python-versions = ">=3.8" files = [ - {file = "coverage-7.4.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:8580b827d4746d47294c0e0b92854c85a92c2227927433998f0d3320ae8a71b6"}, - {file = "coverage-7.4.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:718187eeb9849fc6cc23e0d9b092bc2348821c5e1a901c9f8975df0bc785bfd4"}, - {file = "coverage-7.4.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:767b35c3a246bcb55b8044fd3a43b8cd553dd1f9f2c1eeb87a302b1f8daa0524"}, - {file = "coverage-7.4.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ae7f19afe0cce50039e2c782bff379c7e347cba335429678450b8fe81c4ef96d"}, - {file = "coverage-7.4.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ba3a8aaed13770e970b3df46980cb068d1c24af1a1968b7818b69af8c4347efb"}, - {file = "coverage-7.4.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:ee866acc0861caebb4f2ab79f0b94dbfbdbfadc19f82e6e9c93930f74e11d7a0"}, - {file = "coverage-7.4.3-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:506edb1dd49e13a2d4cac6a5173317b82a23c9d6e8df63efb4f0380de0fbccbc"}, - {file = "coverage-7.4.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:fd6545d97c98a192c5ac995d21c894b581f1fd14cf389be90724d21808b657e2"}, - {file = "coverage-7.4.3-cp310-cp310-win32.whl", hash = "sha256:f6a09b360d67e589236a44f0c39218a8efba2593b6abdccc300a8862cffc2f94"}, - {file = "coverage-7.4.3-cp310-cp310-win_amd64.whl", hash = "sha256:18d90523ce7553dd0b7e23cbb28865db23cddfd683a38fb224115f7826de78d0"}, - {file = "coverage-7.4.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:cbbe5e739d45a52f3200a771c6d2c7acf89eb2524890a4a3aa1a7fa0695d2a47"}, - {file = "coverage-7.4.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:489763b2d037b164846ebac0cbd368b8a4ca56385c4090807ff9fad817de4113"}, - {file = "coverage-7.4.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:451f433ad901b3bb00184d83fd83d135fb682d780b38af7944c9faeecb1e0bfe"}, - {file = "coverage-7.4.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fcc66e222cf4c719fe7722a403888b1f5e1682d1679bd780e2b26c18bb648cdc"}, - {file = "coverage-7.4.3-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b3ec74cfef2d985e145baae90d9b1b32f85e1741b04cd967aaf9cfa84c1334f3"}, - {file = "coverage-7.4.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:abbbd8093c5229c72d4c2926afaee0e6e3140de69d5dcd918b2921f2f0c8baba"}, - {file = "coverage-7.4.3-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:35eb581efdacf7b7422af677b92170da4ef34500467381e805944a3201df2079"}, - {file = "coverage-7.4.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:8249b1c7334be8f8c3abcaaa996e1e4927b0e5a23b65f5bf6cfe3180d8ca7840"}, - {file = "coverage-7.4.3-cp311-cp311-win32.whl", hash = "sha256:cf30900aa1ba595312ae41978b95e256e419d8a823af79ce670835409fc02ad3"}, - {file = "coverage-7.4.3-cp311-cp311-win_amd64.whl", hash = "sha256:18c7320695c949de11a351742ee001849912fd57e62a706d83dfc1581897fa2e"}, - {file = "coverage-7.4.3-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:b51bfc348925e92a9bd9b2e48dad13431b57011fd1038f08316e6bf1df107d10"}, - {file = "coverage-7.4.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:d6cdecaedea1ea9e033d8adf6a0ab11107b49571bbb9737175444cea6eb72328"}, - {file = "coverage-7.4.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3b2eccb883368f9e972e216c7b4c7c06cabda925b5f06dde0650281cb7666a30"}, - {file = "coverage-7.4.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6c00cdc8fa4e50e1cc1f941a7f2e3e0f26cb2a1233c9696f26963ff58445bac7"}, - {file = "coverage-7.4.3-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b9a4a8dd3dcf4cbd3165737358e4d7dfbd9d59902ad11e3b15eebb6393b0446e"}, - {file = "coverage-7.4.3-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:062b0a75d9261e2f9c6d071753f7eef0fc9caf3a2c82d36d76667ba7b6470003"}, - {file = "coverage-7.4.3-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:ebe7c9e67a2d15fa97b77ea6571ce5e1e1f6b0db71d1d5e96f8d2bf134303c1d"}, - {file = "coverage-7.4.3-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:c0a120238dd71c68484f02562f6d446d736adcc6ca0993712289b102705a9a3a"}, - {file = "coverage-7.4.3-cp312-cp312-win32.whl", hash = "sha256:37389611ba54fd6d278fde86eb2c013c8e50232e38f5c68235d09d0a3f8aa352"}, - {file = "coverage-7.4.3-cp312-cp312-win_amd64.whl", hash = "sha256:d25b937a5d9ffa857d41be042b4238dd61db888533b53bc76dc082cb5a15e914"}, - {file = "coverage-7.4.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:28ca2098939eabab044ad68850aac8f8db6bf0b29bc7f2887d05889b17346454"}, - {file = "coverage-7.4.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:280459f0a03cecbe8800786cdc23067a8fc64c0bd51dc614008d9c36e1659d7e"}, - {file = "coverage-7.4.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6c0cdedd3500e0511eac1517bf560149764b7d8e65cb800d8bf1c63ebf39edd2"}, - {file = "coverage-7.4.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9a9babb9466fe1da12417a4aed923e90124a534736de6201794a3aea9d98484e"}, - {file = "coverage-7.4.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dec9de46a33cf2dd87a5254af095a409ea3bf952d85ad339751e7de6d962cde6"}, - {file = "coverage-7.4.3-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:16bae383a9cc5abab9bb05c10a3e5a52e0a788325dc9ba8499e821885928968c"}, - {file = "coverage-7.4.3-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:2c854ce44e1ee31bda4e318af1dbcfc929026d12c5ed030095ad98197eeeaed0"}, - {file = "coverage-7.4.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:ce8c50520f57ec57aa21a63ea4f325c7b657386b3f02ccaedeccf9ebe27686e1"}, - {file = "coverage-7.4.3-cp38-cp38-win32.whl", hash = "sha256:708a3369dcf055c00ddeeaa2b20f0dd1ce664eeabde6623e516c5228b753654f"}, - {file = "coverage-7.4.3-cp38-cp38-win_amd64.whl", hash = "sha256:1bf25fbca0c8d121a3e92a2a0555c7e5bc981aee5c3fdaf4bb7809f410f696b9"}, - {file = "coverage-7.4.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3b253094dbe1b431d3a4ac2f053b6d7ede2664ac559705a704f621742e034f1f"}, - {file = "coverage-7.4.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:77fbfc5720cceac9c200054b9fab50cb2a7d79660609200ab83f5db96162d20c"}, - {file = "coverage-7.4.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6679060424faa9c11808598504c3ab472de4531c571ab2befa32f4971835788e"}, - {file = "coverage-7.4.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4af154d617c875b52651dd8dd17a31270c495082f3d55f6128e7629658d63765"}, - {file = "coverage-7.4.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8640f1fde5e1b8e3439fe482cdc2b0bb6c329f4bb161927c28d2e8879c6029ee"}, - {file = "coverage-7.4.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:69b9f6f66c0af29642e73a520b6fed25ff9fd69a25975ebe6acb297234eda501"}, - {file = "coverage-7.4.3-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:0842571634f39016a6c03e9d4aba502be652a6e4455fadb73cd3a3a49173e38f"}, - {file = "coverage-7.4.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:a78ed23b08e8ab524551f52953a8a05d61c3a760781762aac49f8de6eede8c45"}, - {file = "coverage-7.4.3-cp39-cp39-win32.whl", hash = "sha256:c0524de3ff096e15fcbfe8f056fdb4ea0bf497d584454f344d59fce069d3e6e9"}, - {file = "coverage-7.4.3-cp39-cp39-win_amd64.whl", hash = "sha256:0209a6369ccce576b43bb227dc8322d8ef9e323d089c6f3f26a597b09cb4d2aa"}, - {file = "coverage-7.4.3-pp38.pp39.pp310-none-any.whl", hash = "sha256:7cbde573904625509a3f37b6fecea974e363460b556a627c60dc2f47e2fffa51"}, - {file = "coverage-7.4.3.tar.gz", hash = "sha256:276f6077a5c61447a48d133ed13e759c09e62aff0dc84274a68dc18660104d52"}, + {file = "coverage-7.5.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:a6519d917abb15e12380406d721e37613e2a67d166f9fb7e5a8ce0375744cd45"}, + {file = "coverage-7.5.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:aea7da970f1feccf48be7335f8b2ca64baf9b589d79e05b9397a06696ce1a1ec"}, + {file = "coverage-7.5.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:923b7b1c717bd0f0f92d862d1ff51d9b2b55dbbd133e05680204465f454bb286"}, + {file = "coverage-7.5.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:62bda40da1e68898186f274f832ef3e759ce929da9a9fd9fcf265956de269dbc"}, + {file = "coverage-7.5.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d8b7339180d00de83e930358223c617cc343dd08e1aa5ec7b06c3a121aec4e1d"}, + {file = "coverage-7.5.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:25a5caf742c6195e08002d3b6c2dd6947e50efc5fc2c2205f61ecb47592d2d83"}, + {file = "coverage-7.5.3-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:05ac5f60faa0c704c0f7e6a5cbfd6f02101ed05e0aee4d2822637a9e672c998d"}, + {file = "coverage-7.5.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:239a4e75e09c2b12ea478d28815acf83334d32e722e7433471fbf641c606344c"}, + {file = "coverage-7.5.3-cp310-cp310-win32.whl", hash = "sha256:a5812840d1d00eafae6585aba38021f90a705a25b8216ec7f66aebe5b619fb84"}, + {file = "coverage-7.5.3-cp310-cp310-win_amd64.whl", hash = "sha256:33ca90a0eb29225f195e30684ba4a6db05dbef03c2ccd50b9077714c48153cac"}, + {file = "coverage-7.5.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f81bc26d609bf0fbc622c7122ba6307993c83c795d2d6f6f6fd8c000a770d974"}, + {file = "coverage-7.5.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:7cec2af81f9e7569280822be68bd57e51b86d42e59ea30d10ebdbb22d2cb7232"}, + {file = "coverage-7.5.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:55f689f846661e3f26efa535071775d0483388a1ccfab899df72924805e9e7cd"}, + {file = "coverage-7.5.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:50084d3516aa263791198913a17354bd1dc627d3c1639209640b9cac3fef5807"}, + {file = "coverage-7.5.3-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:341dd8f61c26337c37988345ca5c8ccabeff33093a26953a1ac72e7d0103c4fb"}, + {file = "coverage-7.5.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:ab0b028165eea880af12f66086694768f2c3139b2c31ad5e032c8edbafca6ffc"}, + {file = "coverage-7.5.3-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:5bc5a8c87714b0c67cfeb4c7caa82b2d71e8864d1a46aa990b5588fa953673b8"}, + {file = "coverage-7.5.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:38a3b98dae8a7c9057bd91fbf3415c05e700a5114c5f1b5b0ea5f8f429ba6614"}, + {file = "coverage-7.5.3-cp311-cp311-win32.whl", hash = "sha256:fcf7d1d6f5da887ca04302db8e0e0cf56ce9a5e05f202720e49b3e8157ddb9a9"}, + {file = "coverage-7.5.3-cp311-cp311-win_amd64.whl", hash = "sha256:8c836309931839cca658a78a888dab9676b5c988d0dd34ca247f5f3e679f4e7a"}, + {file = "coverage-7.5.3-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:296a7d9bbc598e8744c00f7a6cecf1da9b30ae9ad51c566291ff1314e6cbbed8"}, + {file = "coverage-7.5.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:34d6d21d8795a97b14d503dcaf74226ae51eb1f2bd41015d3ef332a24d0a17b3"}, + {file = "coverage-7.5.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8e317953bb4c074c06c798a11dbdd2cf9979dbcaa8ccc0fa4701d80042d4ebf1"}, + {file = "coverage-7.5.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:705f3d7c2b098c40f5b81790a5fedb274113373d4d1a69e65f8b68b0cc26f6db"}, + {file = "coverage-7.5.3-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b1196e13c45e327d6cd0b6e471530a1882f1017eb83c6229fc613cd1a11b53cd"}, + {file = "coverage-7.5.3-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:015eddc5ccd5364dcb902eaecf9515636806fa1e0d5bef5769d06d0f31b54523"}, + {file = "coverage-7.5.3-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:fd27d8b49e574e50caa65196d908f80e4dff64d7e592d0c59788b45aad7e8b35"}, + {file = "coverage-7.5.3-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:33fc65740267222fc02975c061eb7167185fef4cc8f2770267ee8bf7d6a42f84"}, + {file = "coverage-7.5.3-cp312-cp312-win32.whl", hash = "sha256:7b2a19e13dfb5c8e145c7a6ea959485ee8e2204699903c88c7d25283584bfc08"}, + {file = "coverage-7.5.3-cp312-cp312-win_amd64.whl", hash = "sha256:0bbddc54bbacfc09b3edaec644d4ac90c08ee8ed4844b0f86227dcda2d428fcb"}, + {file = "coverage-7.5.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:f78300789a708ac1f17e134593f577407d52d0417305435b134805c4fb135adb"}, + {file = "coverage-7.5.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:b368e1aee1b9b75757942d44d7598dcd22a9dbb126affcbba82d15917f0cc155"}, + {file = "coverage-7.5.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f836c174c3a7f639bded48ec913f348c4761cbf49de4a20a956d3431a7c9cb24"}, + {file = "coverage-7.5.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:244f509f126dc71369393ce5fea17c0592c40ee44e607b6d855e9c4ac57aac98"}, + {file = "coverage-7.5.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c4c2872b3c91f9baa836147ca33650dc5c172e9273c808c3c3199c75490e709d"}, + {file = "coverage-7.5.3-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:dd4b3355b01273a56b20c219e74e7549e14370b31a4ffe42706a8cda91f19f6d"}, + {file = "coverage-7.5.3-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:f542287b1489c7a860d43a7d8883e27ca62ab84ca53c965d11dac1d3a1fab7ce"}, + {file = "coverage-7.5.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:75e3f4e86804023e991096b29e147e635f5e2568f77883a1e6eed74512659ab0"}, + {file = "coverage-7.5.3-cp38-cp38-win32.whl", hash = "sha256:c59d2ad092dc0551d9f79d9d44d005c945ba95832a6798f98f9216ede3d5f485"}, + {file = "coverage-7.5.3-cp38-cp38-win_amd64.whl", hash = "sha256:fa21a04112c59ad54f69d80e376f7f9d0f5f9123ab87ecd18fbb9ec3a2beed56"}, + {file = "coverage-7.5.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:f5102a92855d518b0996eb197772f5ac2a527c0ec617124ad5242a3af5e25f85"}, + {file = "coverage-7.5.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:d1da0a2e3b37b745a2b2a678a4c796462cf753aebf94edcc87dcc6b8641eae31"}, + {file = "coverage-7.5.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8383a6c8cefba1b7cecc0149415046b6fc38836295bc4c84e820872eb5478b3d"}, + {file = "coverage-7.5.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9aad68c3f2566dfae84bf46295a79e79d904e1c21ccfc66de88cd446f8686341"}, + {file = "coverage-7.5.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2e079c9ec772fedbade9d7ebc36202a1d9ef7291bc9b3a024ca395c4d52853d7"}, + {file = "coverage-7.5.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:bde997cac85fcac227b27d4fb2c7608a2c5f6558469b0eb704c5726ae49e1c52"}, + {file = "coverage-7.5.3-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:990fb20b32990b2ce2c5f974c3e738c9358b2735bc05075d50a6f36721b8f303"}, + {file = "coverage-7.5.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:3d5a67f0da401e105753d474369ab034c7bae51a4c31c77d94030d59e41df5bd"}, + {file = "coverage-7.5.3-cp39-cp39-win32.whl", hash = "sha256:e08c470c2eb01977d221fd87495b44867a56d4d594f43739a8028f8646a51e0d"}, + {file = "coverage-7.5.3-cp39-cp39-win_amd64.whl", hash = "sha256:1d2a830ade66d3563bb61d1e3c77c8def97b30ed91e166c67d0632c018f380f0"}, + {file = "coverage-7.5.3-pp38.pp39.pp310-none-any.whl", hash = "sha256:3538d8fb1ee9bdd2e2692b3b18c22bb1c19ffbefd06880f5ac496e42d7bb3884"}, + {file = "coverage-7.5.3.tar.gz", hash = "sha256:04aefca5190d1dc7a53a4c1a5a7f8568811306d7a8ee231c42fb69215571944f"}, ] [package.dependencies] @@ -635,43 +685,43 @@ toml = ["tomli"] [[package]] name = "cryptography" -version = "42.0.5" +version = "42.0.8" description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." optional = false python-versions = ">=3.7" files = [ - {file = "cryptography-42.0.5-cp37-abi3-macosx_10_12_universal2.whl", hash = "sha256:a30596bae9403a342c978fb47d9b0ee277699fa53bbafad14706af51fe543d16"}, - {file = "cryptography-42.0.5-cp37-abi3-macosx_10_12_x86_64.whl", hash = "sha256:b7ffe927ee6531c78f81aa17e684e2ff617daeba7f189f911065b2ea2d526dec"}, - {file = "cryptography-42.0.5-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2424ff4c4ac7f6b8177b53c17ed5d8fa74ae5955656867f5a8affaca36a27abb"}, - {file = "cryptography-42.0.5-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:329906dcc7b20ff3cad13c069a78124ed8247adcac44b10bea1130e36caae0b4"}, - {file = "cryptography-42.0.5-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:b03c2ae5d2f0fc05f9a2c0c997e1bc18c8229f392234e8a0194f202169ccd278"}, - {file = "cryptography-42.0.5-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:f8837fe1d6ac4a8052a9a8ddab256bc006242696f03368a4009be7ee3075cdb7"}, - {file = "cryptography-42.0.5-cp37-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:0270572b8bd2c833c3981724b8ee9747b3ec96f699a9665470018594301439ee"}, - {file = "cryptography-42.0.5-cp37-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:b8cac287fafc4ad485b8a9b67d0ee80c66bf3574f655d3b97ef2e1082360faf1"}, - {file = "cryptography-42.0.5-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:16a48c23a62a2f4a285699dba2e4ff2d1cff3115b9df052cdd976a18856d8e3d"}, - {file = "cryptography-42.0.5-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:2bce03af1ce5a5567ab89bd90d11e7bbdff56b8af3acbbec1faded8f44cb06da"}, - {file = "cryptography-42.0.5-cp37-abi3-win32.whl", hash = "sha256:b6cd2203306b63e41acdf39aa93b86fb566049aeb6dc489b70e34bcd07adca74"}, - {file = "cryptography-42.0.5-cp37-abi3-win_amd64.whl", hash = "sha256:98d8dc6d012b82287f2c3d26ce1d2dd130ec200c8679b6213b3c73c08b2b7940"}, - {file = "cryptography-42.0.5-cp39-abi3-macosx_10_12_universal2.whl", hash = "sha256:5e6275c09d2badf57aea3afa80d975444f4be8d3bc58f7f80d2a484c6f9485c8"}, - {file = "cryptography-42.0.5-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e4985a790f921508f36f81831817cbc03b102d643b5fcb81cd33df3fa291a1a1"}, - {file = "cryptography-42.0.5-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7cde5f38e614f55e28d831754e8a3bacf9ace5d1566235e39d91b35502d6936e"}, - {file = "cryptography-42.0.5-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:7367d7b2eca6513681127ebad53b2582911d1736dc2ffc19f2c3ae49997496bc"}, - {file = "cryptography-42.0.5-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:cd2030f6650c089aeb304cf093f3244d34745ce0cfcc39f20c6fbfe030102e2a"}, - {file = "cryptography-42.0.5-cp39-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:a2913c5375154b6ef2e91c10b5720ea6e21007412f6437504ffea2109b5a33d7"}, - {file = "cryptography-42.0.5-cp39-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:c41fb5e6a5fe9ebcd58ca3abfeb51dffb5d83d6775405305bfa8715b76521922"}, - {file = "cryptography-42.0.5-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:3eaafe47ec0d0ffcc9349e1708be2aaea4c6dd4978d76bf6eb0cb2c13636c6fc"}, - {file = "cryptography-42.0.5-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:1b95b98b0d2af784078fa69f637135e3c317091b615cd0905f8b8a087e86fa30"}, - {file = "cryptography-42.0.5-cp39-abi3-win32.whl", hash = "sha256:1f71c10d1e88467126f0efd484bd44bca5e14c664ec2ede64c32f20875c0d413"}, - {file = "cryptography-42.0.5-cp39-abi3-win_amd64.whl", hash = "sha256:a011a644f6d7d03736214d38832e030d8268bcff4a41f728e6030325fea3e400"}, - {file = "cryptography-42.0.5-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:9481ffe3cf013b71b2428b905c4f7a9a4f76ec03065b05ff499bb5682a8d9ad8"}, - {file = "cryptography-42.0.5-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:ba334e6e4b1d92442b75ddacc615c5476d4ad55cc29b15d590cc6b86efa487e2"}, - {file = "cryptography-42.0.5-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:ba3e4a42397c25b7ff88cdec6e2a16c2be18720f317506ee25210f6d31925f9c"}, - {file = "cryptography-42.0.5-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:111a0d8553afcf8eb02a4fea6ca4f59d48ddb34497aa8706a6cf536f1a5ec576"}, - {file = "cryptography-42.0.5-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:cd65d75953847815962c84a4654a84850b2bb4aed3f26fadcc1c13892e1e29f6"}, - {file = "cryptography-42.0.5-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:e807b3188f9eb0eaa7bbb579b462c5ace579f1cedb28107ce8b48a9f7ad3679e"}, - {file = "cryptography-42.0.5-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:f12764b8fffc7a123f641d7d049d382b73f96a34117e0b637b80643169cec8ac"}, - {file = "cryptography-42.0.5-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:37dd623507659e08be98eec89323469e8c7b4c1407c85112634ae3dbdb926fdd"}, - {file = "cryptography-42.0.5.tar.gz", hash = "sha256:6fe07eec95dfd477eb9530aef5bead34fec819b3aaf6c5bd6d20565da607bfe1"}, + {file = "cryptography-42.0.8-cp37-abi3-macosx_10_12_universal2.whl", hash = "sha256:81d8a521705787afe7a18d5bfb47ea9d9cc068206270aad0b96a725022e18d2e"}, + {file = "cryptography-42.0.8-cp37-abi3-macosx_10_12_x86_64.whl", hash = "sha256:961e61cefdcb06e0c6d7e3a1b22ebe8b996eb2bf50614e89384be54c48c6b63d"}, + {file = "cryptography-42.0.8-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e3ec3672626e1b9e55afd0df6d774ff0e953452886e06e0f1eb7eb0c832e8902"}, + {file = "cryptography-42.0.8-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e599b53fd95357d92304510fb7bda8523ed1f79ca98dce2f43c115950aa78801"}, + {file = "cryptography-42.0.8-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:5226d5d21ab681f432a9c1cf8b658c0cb02533eece706b155e5fbd8a0cdd3949"}, + {file = "cryptography-42.0.8-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:6b7c4f03ce01afd3b76cf69a5455caa9cfa3de8c8f493e0d3ab7d20611c8dae9"}, + {file = "cryptography-42.0.8-cp37-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:2346b911eb349ab547076f47f2e035fc8ff2c02380a7cbbf8d87114fa0f1c583"}, + {file = "cryptography-42.0.8-cp37-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:ad803773e9df0b92e0a817d22fd8a3675493f690b96130a5e24f1b8fabbea9c7"}, + {file = "cryptography-42.0.8-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:2f66d9cd9147ee495a8374a45ca445819f8929a3efcd2e3df6428e46c3cbb10b"}, + {file = "cryptography-42.0.8-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:d45b940883a03e19e944456a558b67a41160e367a719833c53de6911cabba2b7"}, + {file = "cryptography-42.0.8-cp37-abi3-win32.whl", hash = "sha256:a0c5b2b0585b6af82d7e385f55a8bc568abff8923af147ee3c07bd8b42cda8b2"}, + {file = "cryptography-42.0.8-cp37-abi3-win_amd64.whl", hash = "sha256:57080dee41209e556a9a4ce60d229244f7a66ef52750f813bfbe18959770cfba"}, + {file = "cryptography-42.0.8-cp39-abi3-macosx_10_12_universal2.whl", hash = "sha256:dea567d1b0e8bc5764b9443858b673b734100c2871dc93163f58c46a97a83d28"}, + {file = "cryptography-42.0.8-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c4783183f7cb757b73b2ae9aed6599b96338eb957233c58ca8f49a49cc32fd5e"}, + {file = "cryptography-42.0.8-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a0608251135d0e03111152e41f0cc2392d1e74e35703960d4190b2e0f4ca9c70"}, + {file = "cryptography-42.0.8-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:dc0fdf6787f37b1c6b08e6dfc892d9d068b5bdb671198c72072828b80bd5fe4c"}, + {file = "cryptography-42.0.8-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:9c0c1716c8447ee7dbf08d6db2e5c41c688544c61074b54fc4564196f55c25a7"}, + {file = "cryptography-42.0.8-cp39-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:fff12c88a672ab9c9c1cf7b0c80e3ad9e2ebd9d828d955c126be4fd3e5578c9e"}, + {file = "cryptography-42.0.8-cp39-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:cafb92b2bc622cd1aa6a1dce4b93307792633f4c5fe1f46c6b97cf67073ec961"}, + {file = "cryptography-42.0.8-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:31f721658a29331f895a5a54e7e82075554ccfb8b163a18719d342f5ffe5ecb1"}, + {file = "cryptography-42.0.8-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:b297f90c5723d04bcc8265fc2a0f86d4ea2e0f7ab4b6994459548d3a6b992a14"}, + {file = "cryptography-42.0.8-cp39-abi3-win32.whl", hash = "sha256:2f88d197e66c65be5e42cd72e5c18afbfae3f741742070e3019ac8f4ac57262c"}, + {file = "cryptography-42.0.8-cp39-abi3-win_amd64.whl", hash = "sha256:fa76fbb7596cc5839320000cdd5d0955313696d9511debab7ee7278fc8b5c84a"}, + {file = "cryptography-42.0.8-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:ba4f0a211697362e89ad822e667d8d340b4d8d55fae72cdd619389fb5912eefe"}, + {file = "cryptography-42.0.8-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:81884c4d096c272f00aeb1f11cf62ccd39763581645b0812e99a91505fa48e0c"}, + {file = "cryptography-42.0.8-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:c9bb2ae11bfbab395bdd072985abde58ea9860ed84e59dbc0463a5d0159f5b71"}, + {file = "cryptography-42.0.8-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:7016f837e15b0a1c119d27ecd89b3515f01f90a8615ed5e9427e30d9cdbfed3d"}, + {file = "cryptography-42.0.8-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:5a94eccb2a81a309806027e1670a358b99b8fe8bfe9f8d329f27d72c094dde8c"}, + {file = "cryptography-42.0.8-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:dec9b018df185f08483f294cae6ccac29e7a6e0678996587363dc352dc65c842"}, + {file = "cryptography-42.0.8-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:343728aac38decfdeecf55ecab3264b015be68fc2816ca800db649607aeee648"}, + {file = "cryptography-42.0.8-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:013629ae70b40af70c9a7a5db40abe5d9054e6f4380e50ce769947b73bf3caad"}, + {file = "cryptography-42.0.8.tar.gz", hash = "sha256:8d09d05439ce7baa8e9e95b07ec5b6c886f548deb7e0f69ef25f64b3bce842f2"}, ] [package.dependencies] @@ -698,6 +748,23 @@ files = [ {file = "decorator-5.1.1.tar.gz", hash = "sha256:637996211036b6385ef91435e4fae22989472f9d571faba8927ba8253acbc330"}, ] +[[package]] +name = "deprecated" +version = "1.2.14" +description = "Python @deprecated decorator to deprecate old python classes, functions or methods." +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "Deprecated-1.2.14-py2.py3-none-any.whl", hash = "sha256:6fac8b097794a90302bdbb17b9b815e732d3c4720583ff1b198499d78470466c"}, + {file = "Deprecated-1.2.14.tar.gz", hash = "sha256:e5323eb936458dccc2582dc6f9c322c852a775a27065ff2b0c4970b9d53d01b3"}, +] + +[package.dependencies] +wrapt = ">=1.10,<2" + +[package.extras] +dev = ["PyTest", "PyTest-Cov", "bump2version (<1)", "sphinx (<2)", "tox"] + [[package]] name = "dictdiffer" version = "0.9.0" @@ -754,13 +821,13 @@ tests = ["check-manifest (>=0.42)", "pytest (>=6,<7.2.0)", "pytest-black (>=0.3. [[package]] name = "docutils" -version = "0.20.1" +version = "0.21.2" description = "Docutils -- Python Documentation Utilities" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "docutils-0.20.1-py3-none-any.whl", hash = "sha256:96f387a2c5562db4476f09f13bbab2192e764cac08ebbf3a34a95d9b1e4a59d6"}, - {file = "docutils-0.20.1.tar.gz", hash = "sha256:f08a4e276c3a1583a86dce3e34aba3fe04d02bba2dd51ed16106244e8a923e3b"}, + {file = "docutils-0.21.2-py3-none-any.whl", hash = "sha256:dafca5b9e384f0e419294eb4d2ff9fa826435bf15f15b7bd45723e8ad76811b2"}, + {file = "docutils-0.21.2.tar.gz", hash = "sha256:3a6b18732edf182daa3cd12775bbb338cf5691468f91eeeb109deff6ebfa986f"}, ] [[package]] @@ -806,21 +873,21 @@ pipenv = ["pipenv (<=2022.12.19)"] [[package]] name = "elasticsearch" -version = "7.13.4" +version = "7.9.1" description = "Python client for Elasticsearch" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4" files = [ - {file = "elasticsearch-7.13.4-py2.py3-none-any.whl", hash = "sha256:5920df0ab2630778680376d86bea349dc99860977eec9b6d2bd0860f337313f2"}, - {file = "elasticsearch-7.13.4.tar.gz", hash = "sha256:52dda85f76eeb85ec873bf9ffe0ba6849e544e591f66d4048a5e48016de268e0"}, + {file = "elasticsearch-7.9.1-py2.py3-none-any.whl", hash = "sha256:8c7e2374f53ee1b891ff2804116e0c7fb517585d6d5788ba668686bbc9d82e2d"}, + {file = "elasticsearch-7.9.1.tar.gz", hash = "sha256:5e08776fbb30c6e92408c7fa8c37d939210d291475ae2f364f0497975918b6fe"}, ] [package.dependencies] certifi = "*" -urllib3 = ">=1.21.1,<2" +urllib3 = ">=1.21.1" [package.extras] -async = ["aiohttp (>=3,<4)"] +async = ["aiohttp (>=3,<4)", "yarl"] develop = ["black", "coverage", "jinja2", "mock", "pytest", "pytest-cov", "pyyaml", "requests (>=2.0.0,<3.0.0)", "sphinx (<1.7)", "sphinx-rtd-theme"] docs = ["sphinx (<1.7)", "sphinx-rtd-theme"] requests = ["requests (>=2.4.0,<3.0.0)"] @@ -861,13 +928,13 @@ idna = ">=2.0.0" [[package]] name = "exceptiongroup" -version = "1.2.0" +version = "1.2.1" description = "Backport of PEP 654 (exception groups)" optional = false python-versions = ">=3.7" files = [ - {file = "exceptiongroup-1.2.0-py3-none-any.whl", hash = "sha256:4bfd3996ac73b41e9b9628b04e079f193850720ea5945fc96a08633c66912f14"}, - {file = "exceptiongroup-1.2.0.tar.gz", hash = "sha256:91f5c769735f051a4290d52edd0858999b57e5876e9f85937691bd4c9fa3ed68"}, + {file = "exceptiongroup-1.2.1-py3-none-any.whl", hash = "sha256:5258b9ed329c5bbdd31a309f53cbfb0b155341807f6ff7606a1e801a891b29ad"}, + {file = "exceptiongroup-1.2.1.tar.gz", hash = "sha256:a4785e48b045528f5bfe627b6ad554ff32def154f42372786903b7abcfe1aa16"}, ] [package.extras] @@ -962,27 +1029,6 @@ Flask = ">=2.0" Jinja2 = ">=3.1" pytz = ">=2022.7" -[[package]] -name = "flask-breadcrumbs" -version = "0.5.1" -description = "Flask-Breadcrumbs adds support for generating site breadcrumb navigation." -optional = false -python-versions = "*" -files = [ - {file = "Flask-Breadcrumbs-0.5.1.tar.gz", hash = "sha256:f95872a3baf46473febd0f5c0adea192e7c2576af60a84a2144068eca1559b45"}, - {file = "Flask_Breadcrumbs-0.5.1-py2.py3-none-any.whl", hash = "sha256:cb6fc89d7f76ff429fa4bb1fbc0bfe186f3f7ff8b4f5325c0a7b75946e2de98f"}, -] - -[package.dependencies] -Flask = ">=1.0.4" -Flask-Menu = ">=0.2" -six = ">=1.12.0" - -[package.extras] -all = ["Sphinx (>=1.5.1)", "check-manifest (>=0.25)", "coverage (>=4.0)", "isort (>=4.3.11)", "mock (>=1.0.0)", "pydocstyle (>=1.0.0)", "pytest (>=3.8.0)", "pytest-cache (>=1.0)", "pytest-cov (>=1.8.0)", "pytest-pep8 (>=1.0.6)"] -docs = ["Sphinx (>=1.5.1)"] -tests = ["check-manifest (>=0.25)", "coverage (>=4.0)", "isort (>=4.3.11)", "mock (>=1.0.0)", "pydocstyle (>=1.0.0)", "pytest (>=3.8.0)", "pytest-cache (>=1.0)", "pytest-cov (>=1.8.0)", "pytest-pep8 (>=1.0.6)"] - [[package]] name = "flask-caching" version = "2.0.1" @@ -1037,13 +1083,13 @@ tests = ["black (>=21.9b0)", "check-manifest (>=0.42)", "coverage (>=5.3,<6)", " [[package]] name = "flask-cors" -version = "4.0.0" +version = "4.0.1" description = "A Flask extension adding a decorator for CORS support" optional = false python-versions = "*" files = [ - {file = "Flask-Cors-4.0.0.tar.gz", hash = "sha256:f268522fcb2f73e2ecdde1ef45e2fd5c71cc48fe03cffb4b441c6d1b40684eb0"}, - {file = "Flask_Cors-4.0.0-py2.py3-none-any.whl", hash = "sha256:bc3492bfd6368d27cfe79c7821df5a8a319e1a6d5eab277a3794be19bdc51783"}, + {file = "Flask_Cors-4.0.1-py2.py3-none-any.whl", hash = "sha256:f2a704e4458665580c074b714c4627dd5a306b333deb9074d0b1794dfa2fb677"}, + {file = "flask_cors-4.0.1.tar.gz", hash = "sha256:eeb69b342142fdbf4766ad99357a7f3876a2ceb77689dc10ff912aac06c389e4"}, ] [package.dependencies] @@ -1068,19 +1114,26 @@ werkzeug = "*" [[package]] name = "flask-limiter" -version = "1.1.0" +version = "2.9.2" description = "Rate limiting for flask applications" optional = false -python-versions = "*" +python-versions = ">=3.7" files = [ - {file = "Flask-Limiter-1.1.0.tar.gz", hash = "sha256:905c35cd87bf60c92fd87922ae23fe27aa5fb31980bab31fc00807adee9f5a55"}, - {file = "Flask_Limiter-1.1.0-py2-none-any.whl", hash = "sha256:9087984ae7eeb862f93bf5b18477a5e5b1e0c907647ae74fba1c7e3f1de63d6f"}, + {file = "Flask-Limiter-2.9.2.tar.gz", hash = "sha256:041bf0d72c8c62d2cb54c772de1ad842c82bdefeddfadc1c9171739f296484e2"}, + {file = "Flask_Limiter-2.9.2-py3-none-any.whl", hash = "sha256:64c6456204d88006324127071598a04cdd77be1576e00e8f5b74fad80925ea37"}, ] [package.dependencies] -Flask = ">=0.8" -limits = "*" -six = ">=1.4.1" +Flask = ">=2" +limits = ">=2.8" +ordered-set = ">4,<5" +rich = ">=12,<13" +typing-extensions = ">=4" + +[package.extras] +memcached = ["limits[memcached]"] +mongodb = ["limits[mongodb]"] +redis = ["limits[redis]"] [[package]] name = "flask-login" @@ -1113,24 +1166,20 @@ Flask = "*" [[package]] name = "flask-menu" -version = "0.7.3" -description = "Flask-Menu is a Flask extension that adds support for generating menus." +version = "1.0.1" +description = "\"Flask-Menu is a Flask extension that adds support for generating menus.\"" optional = false -python-versions = "*" +python-versions = ">=3.7" files = [ - {file = "Flask-Menu-0.7.3.tar.gz", hash = "sha256:30531b38a41e9f28e54b25c14ba84ff8d3a97ca4ffdc452b4f595dec34292bdf"}, - {file = "Flask_Menu-0.7.3-py3-none-any.whl", hash = "sha256:b017a64f8873141f940e05647db1d2300355939f2acc610a3f45721c8f62ab59"}, + {file = "flask-menu-1.0.1.tar.gz", hash = "sha256:d161908630dc899040325746db0e9e47d8a08732f14bc17b599b32cf1be50b0a"}, + {file = "flask_menu-1.0.1-py3-none-any.whl", hash = "sha256:d34c92004c3149e07d4f4636e33bc0fbace7a2f9a75b64c055ef8cb8cb799c0a"}, ] [package.dependencies] -Flask = ">=0.10.1" -six = ">=1.9.0" +Flask = ">=2.0.0,<2.3.0" [package.extras] -all = ["check-manifest (>=0.25)", "coverage (>=4.0)", "flask-classy (>=0.6.10)", "isort (>=4.2.2)", "pydocstyle (>=1.0.0)", "pytest (>=2.8.0)", "pytest-cache (>=1.0)", "pytest-cov (>=2.1.0)", "pytest-pep8 (>=1.0.6)", "sphinx (>=1.3)"] -classy = ["flask-classy (>=0.6.10)"] -docs = ["sphinx (>=1.3)"] -tests = ["check-manifest (>=0.25)", "coverage (>=4.0)", "flask-classy (>=0.6.10)", "isort (>=4.2.2)", "pydocstyle (>=1.0.0)", "pytest (>=2.8.0)", "pytest-cache (>=1.0)", "pytest-cov (>=2.1.0)", "pytest-pep8 (>=1.0.6)"] +tests = ["check-manifest (>=0.49)", "pytest-black-ng (>=0.3.0)", "pytest-cov (>=4.1.0)", "pytest-flask (>=1.2.0)", "pytest-isort (>=3.1.0)", "pytest-pydocstyle (>=2.3.2)", "sphinx (>=4.5)"] [[package]] name = "flask-oauthlib" @@ -1275,13 +1324,13 @@ email = ["email-validator"] [[package]] name = "ftfy" -version = "6.1.3" +version = "6.2.0" description = "Fixes mojibake and other problems with Unicode, after the fact" optional = false python-versions = ">=3.8,<4" files = [ - {file = "ftfy-6.1.3-py3-none-any.whl", hash = "sha256:e49c306c06a97f4986faa7a8740cfe3c13f3106e85bcec73eb629817e671557c"}, - {file = "ftfy-6.1.3.tar.gz", hash = "sha256:693274aead811cff24c1e8784165aa755cd2f6e442a5ec535c7d697f6422a422"}, + {file = "ftfy-6.2.0-py3-none-any.whl", hash = "sha256:f94a2c34b76e07475720e3096f5ca80911d152406fbde66fdb45c4d0c9150026"}, + {file = "ftfy-6.2.0.tar.gz", hash = "sha256:5e42143c7025ef97944ca2619d6b61b0619fc6654f98771d39e862c1424c75c0"}, ] [package.dependencies] @@ -1392,13 +1441,13 @@ test = ["objgraph", "psutil"] [[package]] name = "idna" -version = "3.6" +version = "3.7" description = "Internationalized Domain Names in Applications (IDNA)" optional = false python-versions = ">=3.5" files = [ - {file = "idna-3.6-py3-none-any.whl", hash = "sha256:c05567e9c24a6b9faaa835c4821bad0590fbb9d5779e7caa6e1cc4978e7eb24f"}, - {file = "idna-3.6.tar.gz", hash = "sha256:9ecdbbd083b06798ae1e86adcbfe8ab1479cf864e4ee30fe4e46a003d12491ca"}, + {file = "idna-3.7-py3-none-any.whl", hash = "sha256:82fee1fc78add43492d3a1898bfa6d8a904cc97d8427f683ed8e798d07761aa0"}, + {file = "idna-3.7.tar.gz", hash = "sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc"}, ] [[package]] @@ -1414,32 +1463,32 @@ files = [ [[package]] name = "importlib-metadata" -version = "4.13.0" +version = "7.1.0" description = "Read metadata from Python packages" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "importlib_metadata-4.13.0-py3-none-any.whl", hash = "sha256:8a8a81bcf996e74fee46f0d16bd3eaa382a7eb20fd82445c3ad11f4090334116"}, - {file = "importlib_metadata-4.13.0.tar.gz", hash = "sha256:dd0173e8f150d6815e098fd354f6414b0f079af4644ddfe90c71e2fc6174346d"}, + {file = "importlib_metadata-7.1.0-py3-none-any.whl", hash = "sha256:30962b96c0c223483ed6cc7280e7f0199feb01a0e40cfae4d4450fc6fab1f570"}, + {file = "importlib_metadata-7.1.0.tar.gz", hash = "sha256:b78938b926ee8d5f020fc4772d487045805a55ddbad2ecf21c6d60938dc7fcd2"}, ] [package.dependencies] zipp = ">=0.5" [package.extras] -docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)"] +docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] perf = ["ipython"] -testing = ["flake8 (<5)", "flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pyfakefs", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)", "pytest-perf (>=0.9.2)"] +testing = ["flufl.flake8", "importlib-resources (>=1.3)", "jaraco.test (>=5.4)", "packaging", "pyfakefs", "pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy", "pytest-perf (>=0.9.2)", "pytest-ruff (>=0.2.1)"] [[package]] name = "importlib-resources" -version = "6.1.2" +version = "6.4.0" description = "Read resources from Python packages" optional = false python-versions = ">=3.8" files = [ - {file = "importlib_resources-6.1.2-py3-none-any.whl", hash = "sha256:9a0a862501dc38b68adebc82970140c9e4209fc99601782925178f8386339938"}, - {file = "importlib_resources-6.1.2.tar.gz", hash = "sha256:308abf8474e2dba5f867d279237cd4076482c3de7104a40b41426370e891549b"}, + {file = "importlib_resources-6.4.0-py3-none-any.whl", hash = "sha256:50d10f043df931902d4194ea07ec57960f66a80449ff867bfe782b4c486ba78c"}, + {file = "importlib_resources-6.4.0.tar.gz", hash = "sha256:cdb2b453b8046ca4e3798eb1d84f3cce1446a0e8e7b5ef4efb600f19fc398145"}, ] [package.dependencies] @@ -1447,7 +1496,7 @@ zipp = {version = ">=3.1.0", markers = "python_version < \"3.10\""} [package.extras] docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-lint"] -testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy", "pytest-ruff (>=0.2.1)", "zipp (>=3.17)"] +testing = ["jaraco.test (>=5.4)", "pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy", "pytest-ruff (>=0.2.1)", "zipp (>=3.17)"] [[package]] name = "infinity" @@ -1512,13 +1561,13 @@ tests = ["cachelib (>=0.1)", "invenio-db[mysql,postgresql] (>=1.1.2)", "pytest-b [[package]] name = "invenio-accounts" -version = "3.5.2" +version = "5.0.1" description = "Invenio user management and authentication." optional = false python-versions = ">=3.7" files = [ - {file = "invenio-accounts-3.5.2.tar.gz", hash = "sha256:bb68f2e62a344b591555c029becbfc5ea36c8399c386205e170c517984aea38b"}, - {file = "invenio_accounts-3.5.2-py2.py3-none-any.whl", hash = "sha256:79d92d592319584f089f38b0199b4451b1feb7c4dfc060706a4288223fb44a38"}, + {file = "invenio-accounts-5.0.1.tar.gz", hash = "sha256:487cb59b2e2776d986441da9aee092722ee63933eeada55b95d3f3ce117296c0"}, + {file = "invenio_accounts-5.0.1-py2.py3-none-any.whl", hash = "sha256:7e17240a102590b8e91643ec5b753d9dd51f929ab9197e5ec742039a463c07e8"}, ] [package.dependencies] @@ -1540,7 +1589,7 @@ admin = ["invenio-admin (>=1.2.1)"] mysql = ["invenio-db[mysql] (>=1.0.14)"] postgresql = ["invenio-db[postgresql] (>=1.0.14)"] sqlite = ["invenio-db (>=1.0.14)"] -tests = ["invenio-app (>=1.3.3)", "mock (>=1.3.0)", "pytest-black (>=0.3.0)", "pytest-invenio (>=2.1.4)", "sphinx (>=5,<6.0.0)"] +tests = ["invenio-app (>=1.4.0)", "mock (>=1.3.0)", "pytest-black (>=0.3.0)", "pytest-invenio (>=2.1.4)", "sphinx (>=5,<6.0.0)"] [[package]] name = "invenio-admin" @@ -1567,57 +1616,57 @@ tests = ["invenio-access (>=1.0.0)", "invenio-theme (>=1.3.4)", "pytest-black (> [[package]] name = "invenio-app" -version = "1.3.4" +version = "1.5.0" description = "WSGI, Celery and CLI applications for Invenio flavours." optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" files = [ - {file = "invenio-app-1.3.4.tar.gz", hash = "sha256:4c839a949bb647e949b92322adb9756879b44f3d64744f7201bcd46909f24ede"}, - {file = "invenio_app-1.3.4-py2.py3-none-any.whl", hash = "sha256:a903e8dc5bfbaee9091f5ff2b3aa0f6e1e58b4766656eff7aef6f0a79f164532"}, + {file = "invenio-app-1.5.0.tar.gz", hash = "sha256:a2fcb3d53763ca916346643b31c9019cf591d04f8382f5e7a23061a9fa6a3afd"}, + {file = "invenio_app-1.5.0-py2.py3-none-any.whl", hash = "sha256:9c35dfdedc9071a64b7050eb1d75a6143e362dfb0a60f815488c3ee09aabdabe"}, ] [package.dependencies] -flask-limiter = ">=1.0.1,<1.2.0" +flask-limiter = ">=2,<3" flask-shell-ipython = ">=0.3.1" flask-talisman = ">=0.3.2,<1.0" -invenio-cache = ">=1.1.0" -invenio-celery = ">=1.2.4" -invenio-config = ">=1.0.0" -limits = ">=1.5.1,<2.0" +invenio-base = ">=1.3.0,<2.0.0" +invenio-cache = ">=1.1.0,<2.0.0" +invenio-celery = ">=1.2.4,<2.0.0" +invenio-config = ">=1.0.0,<2.0.0" uritools = ">=1.0.1" [package.extras] -tests = ["pytest-invenio (>=1.4.7)", "sphinx (>=4.2.0,<5)"] +tests = ["mock (>=4.0.0)", "pytest-black (>=0.3.0)", "pytest-invenio (>=1.4.7)", "sphinx (>=5.0,<6)"] [[package]] name = "invenio-assets" -version = "2.0.0" -description = "\"Media assets management for Invenio.\"" +version = "3.0.3" +description = "Media assets management for Invenio." optional = false python-versions = ">=3.7" files = [ - {file = "invenio-assets-2.0.0.tar.gz", hash = "sha256:b69c3ac40b35fe3553388f254ddde5272513581a9c7ce60a0292dc6aca66b750"}, - {file = "invenio_assets-2.0.0-py2.py3-none-any.whl", hash = "sha256:c1b31bd57e4e6ccc3f2fed8b719ba4be487f2d0738c626693266ce0a366442fc"}, + {file = "invenio-assets-3.0.3.tar.gz", hash = "sha256:620dffcaf228dd947aab9fc74f62bad20444a8f494ba2dda177c7b88e393c7d0"}, + {file = "invenio_assets-3.0.3-py2.py3-none-any.whl", hash = "sha256:578fb3b7fdc4c0cc34ee7e3be3dd49e880d3fbc225499b09d54cfedec92fb48d"}, ] [package.dependencies] -Flask-Collect-Invenio = ">=1.4.0" -Flask-WebpackExt = ">=1.0.0" -invenio-base = ">=1.2.5" -node-semver = ">=0.1.1,<0.2.0" +Flask-Collect-Invenio = ">=1.4.0,<2.0.0" +Flask-WebpackExt = ">=1.0.0,<2.0.0" +invenio-base = ">=1.2.5,<2.0.0" +pywebpack = ">=2.0.0,<3.0.0" [package.extras] -tests = ["mock (>=1.3.0)", "pytest-black (>=0.3.0,<0.3.10)", "pytest-invenio (>=1.4.0)", "sphinx (>=4.5)"] +tests = ["mock (>=1.3.0)", "pytest-black (>=0.3.0)", "pytest-invenio (>=1.4.0)", "sphinx (>=4.5)"] [[package]] name = "invenio-base" -version = "1.2.17" +version = "1.4.0" description = "\"Base package for building Invenio application factories.\"" optional = false python-versions = ">=3.7" files = [ - {file = "invenio-base-1.2.17.tar.gz", hash = "sha256:3e81e0025046777e69fde7180af0654284063a6c29322eac8968c248b1c3d756"}, - {file = "invenio_base-1.2.17-py2.py3-none-any.whl", hash = "sha256:ad7ac5b338be54b99798a3a9d4da3b40302842120e7633e1547a05e81be32fc0"}, + {file = "invenio-base-1.4.0.tar.gz", hash = "sha256:4716a9874bd246d68cca2ddd49faa55e9c280bb68fc399d839d902982647784e"}, + {file = "invenio_base-1.4.0-py2.py3-none-any.whl", hash = "sha256:c18ad980c5f35079935a02d27e4307da6e7b6f5722cabcb88e9128e4c47a36e8"}, ] [package.dependencies] @@ -1635,13 +1684,13 @@ tests = ["pytest-black (>=0.3.0,<0.3.10)", "pytest-invenio (>=1.4.2)", "sphinx ( [[package]] name = "invenio-cache" -version = "1.1.1" +version = "1.3.0" description = "\"Cache module for Invenio.\"" optional = false python-versions = ">=3.7" files = [ - {file = "invenio-cache-1.1.1.tar.gz", hash = "sha256:438dd1d513f5f9747564e4e84dfe2a988146d4147353865e9ec40ab06d8ddf99"}, - {file = "invenio_cache-1.1.1-py2.py3-none-any.whl", hash = "sha256:f2c77f60002aa57d92f1f68c3792664f1a1533855634628c4c96741bd187096c"}, + {file = "invenio-cache-1.3.0.tar.gz", hash = "sha256:f7d9df0ccdbe8ca7ce994fb3e8418a21c176ce982d1862f6c1c4167f2326aa1b"}, + {file = "invenio_cache-1.3.0-py2.py3-none-any.whl", hash = "sha256:0eda8356cdbe4992d99bb88453b2fc019aff4b839d5425929c9b3909d3942745"}, ] [package.dependencies] @@ -1649,29 +1698,28 @@ Flask-Caching = ">=1.8.0" invenio-base = ">=1.2.2" [package.extras] -tests = ["Sphinx (>=3)", "invenio-accounts (>=2.0.0.dev10)", "mock (>=2.0.0)", "pytest-black (>=0.3.0,<0.3.10)", "pytest-invenio (>=1.4.0)", "redis (>=2.10.5)"] +tests = ["Sphinx (>=3)", "invenio-accounts (>=2.0.0)", "mock (>=2.0.0)", "pytest-black (>=0.3.0)", "pytest-invenio (>=1.4.0)", "pytest-mock (>=1.6.0)", "redis (>=2.10.5)"] [[package]] name = "invenio-celery" -version = "1.2.5" +version = "1.3.1" description = "\"Celery module for Invenio.\"" optional = false python-versions = ">=3.7" files = [ - {file = "invenio-celery-1.2.5.tar.gz", hash = "sha256:d98252124984f67444bab234c5d49b3ac4cd7bed62f8ccb048af38802ee89fb3"}, - {file = "invenio_celery-1.2.5-py2.py3-none-any.whl", hash = "sha256:d64490e80724d1410b2a44f40231294247e0f5bdff65cdf324c52ea26ff51e3b"}, + {file = "invenio-celery-1.3.1.tar.gz", hash = "sha256:d5c001ccd80a788159b5f643b7cd20312e65b75670f2c3f7bf09ddf29cda9b16"}, + {file = "invenio_celery-1.3.1-py2.py3-none-any.whl", hash = "sha256:b121f64c21329faad1a5e6deae06fe9949c0fab226bd4447502ac143e9202c3c"}, ] [package.dependencies] -celery = ">=5.1.0,<5.3" +celery = ">=5.1.0,<5.4" Flask-CeleryExt = ">=0.3.4" -importlib-metadata = ">=4.0.0,<5.0.0" invenio-base = ">=1.2.5" msgpack = ">=0.6.2" redis = ">=2.10.0" [package.extras] -tests = ["Sphinx (==4.2.0)", "pytest-black (>=0.3.0,<0.3.10)", "pytest-invenio (>=1.4.0)"] +tests = ["Sphinx (>=5.0.0,<6.0.0)", "pytest-black-ng (>=0.4.0)", "pytest-invenio (>=1.4.0)"] [[package]] name = "invenio-config" @@ -1718,13 +1766,13 @@ tests = ["Sphinx (>=4.5.0)", "cryptography (>=2.1.4)", "pytest-black (>=0.3.0)", [[package]] name = "invenio-formatter" -version = "2.0.2" +version = "2.0.3" description = "\"Jinja utilities for Invenio.\"" optional = false python-versions = ">=3.8" files = [ - {file = "invenio-formatter-2.0.2.tar.gz", hash = "sha256:04b48cf12c6336eba2aae8c6c9fc5fe2345376417990f9012824cce231f9e20c"}, - {file = "invenio_formatter-2.0.2-py2.py3-none-any.whl", hash = "sha256:8cabe6a2425ac810d953dc16e6f6c15c5c4c2c14128a184c89e88e12a55ca753"}, + {file = "invenio-formatter-2.0.3.tar.gz", hash = "sha256:17aee69fb74f369971d2f30401bef2b94045c4eac8d01db04f2b113711d2f1f0"}, + {file = "invenio_formatter-2.0.3-py2.py3-none-any.whl", hash = "sha256:e3ac8f121df9af570845f544d7ac034c75fcfa7e47854b2ec40043cb0f5e32df"}, ] [package.dependencies] @@ -1758,13 +1806,13 @@ tests = ["Flask-Login (>=0.6.2)", "invenio-assets (>=1.3.0,<2.0.0)", "pytest-bla [[package]] name = "invenio-indexer" -version = "2.2.1" +version = "2.3.0" description = "\"Record indexer for Invenio.\"" optional = false python-versions = ">=3.7" files = [ - {file = "invenio-indexer-2.2.1.tar.gz", hash = "sha256:363483581a9594465337821fbf0f2527fb140bc177098d2f9754921799cac483"}, - {file = "invenio_indexer-2.2.1-py2.py3-none-any.whl", hash = "sha256:2d026658d612059136881835e208b4a9b72a647b191f1917d568972c174303d1"}, + {file = "invenio-indexer-2.3.0.tar.gz", hash = "sha256:8a91ec63e424a128fb5d6212a31f6ceed52167f2ab230fdab93e355f49085c14"}, + {file = "invenio_indexer-2.3.0-py2.py3-none-any.whl", hash = "sha256:22890d06f770f5e60a2536ff86a54bd0dbd562ae1b025e77fddaaa790753e05f"}, ] [package.dependencies] @@ -1774,9 +1822,9 @@ invenio-records = ">=2.0.0,<3.0.0" pytz = ">=2016.4" [package.extras] -elasticsearch7 = ["elasticsearch (>=7.5.0,<7.14.0)", "invenio-search[elasticsearch7] (>=2.1.0,<3.0.0)"] -opensearch1 = ["invenio-search[opensearch1] (>=2.1.0,<3.0.0)"] -opensearch2 = ["invenio-search[opensearch2] (>=2.1.0,<3.0.0)"] +elasticsearch7 = ["elasticsearch (>=7.5.0,<7.14.0)", "invenio-search[elasticsearch7] (>=2.3.0,<3.0.0)"] +opensearch1 = ["invenio-search[opensearch1] (>=2.3.0,<3.0.0)"] +opensearch2 = ["invenio-search[opensearch2] (>=2.3.0,<3.0.0)"] tests = ["attrs (>=17.4.0)", "pytest-black (>=0.3.0)", "pytest-invenio (>=2.1.0,<3.0.0)", "redis (>=3.4.0)", "sphinx (>=4.5)"] [[package]] @@ -1823,18 +1871,18 @@ tests = ["flask-login (>=0.6.1)", "httpretty (>=0.8.14)", "iniconfig (>=1.1.1)", [[package]] name = "invenio-mail" -version = "2.1.0" +version = "2.1.1" description = "Invenio-Mail is an integration layer between Invenio and Flask-Mail." optional = false python-versions = ">=3.7" files = [ - {file = "invenio-mail-2.1.0.tar.gz", hash = "sha256:fe2e660faab86653288eb9732ce06702f2c9b0fefbabe9fea1aaf49efed708e9"}, - {file = "invenio_mail-2.1.0-py2.py3-none-any.whl", hash = "sha256:d31824cdfa7aff15e0ff67f20258cca87adc4548a4711d4b0bd6e318b30cfd2f"}, + {file = "invenio-mail-2.1.1.tar.gz", hash = "sha256:fa652ba65f7fef1e32b1898bb94131912db882fcdc4980e3649ab41160911c44"}, + {file = "invenio_mail-2.1.1-py2.py3-none-any.whl", hash = "sha256:7260aff9cd0563fca792e271f85f35cc9756820ca0070298143931437654147a"}, ] [package.dependencies] Flask = ">=0.11.1" -Flask-Mail = ">=0.9.1" +Flask-Mail = ">=0.9.1,<0.10.0" [package.extras] tests = ["Flask-CeleryExt (>=0.2.2)", "pytest-black (>=0.3.0,<0.3.10)", "pytest-invenio (>=1.4.0)", "sphinx (>=4.5)"] @@ -1897,62 +1945,60 @@ tests = ["Sphinx (>=4.5.0)", "invenio-admin (>=1.3.0,<2.0.0)", "invenio-celery ( [[package]] name = "invenio-oauth2server" -version = "2.2.1" +version = "2.3.1" description = "\"Invenio module that implements OAuth 2 server.\"" optional = false python-versions = ">=3.7" files = [ - {file = "invenio-oauth2server-2.2.1.tar.gz", hash = "sha256:b8fe74b8369e2fc515bccbafde50470c3bc46f29083ddc90fa36b36b163a316e"}, - {file = "invenio_oauth2server-2.2.1-py2.py3-none-any.whl", hash = "sha256:9fdc9371bc22a94b780e9d2704c20e3e4969c0cedac0d772badaab75109a43f9"}, + {file = "invenio-oauth2server-2.3.1.tar.gz", hash = "sha256:4a8173b3716a0e0fb48655223f3a37738d165c27c1f353e105fe3baf1651c0e9"}, + {file = "invenio_oauth2server-2.3.1-py2.py3-none-any.whl", hash = "sha256:0b18b2c228f6cb8af3925eb9cc7f962ece4ec27e3817378c10a7a77f9c236b58"}, ] [package.dependencies] cachelib = ">=0.1" -Flask-Breadcrumbs = ">=0.4.0" Flask-OAuthlib = ">=0.9.5" Flask-WTF = ">=0.14.3" future = ">=0.16.0" importlib-metadata = ">=4.4" -invenio-accounts = ">=1.3.1" -invenio-base = ">=1.2.4" +invenio-accounts = ">=5.0.0" +invenio-base = ">=1.3.0" invenio-i18n = ">=2.0.0" -invenio-theme = ">=1.3.4" +invenio-theme = ">=3.0.0" pyjwt = ">=1.5.0" requests-oauthlib = ">=1.1.0,<1.2.0" WTForms = ">=2.3.3,<3.0.0" WTForms-Alchemy = ">=0.15.0" [package.extras] -tests = ["invenio-admin (>=1.2.1)", "invenio-db[mysql,postgresql,versioning] (>=1.0.9,<2.0.0)", "pytest-black (>=0.3.0,<0.3.10)", "pytest-invenio (>=1.4.0)", "redis (>=2.10.5)", "sphinx (>=4.5)"] +tests = ["invenio-admin (>=1.2.1)", "invenio-db[mysql,postgresql,versioning] (>=1.0.9,<2.0.0)", "pytest-black-ng (>=0.4.0)", "pytest-invenio (>=1.4.0)", "redis (>=2.10.5)", "sphinx (>=4.5)"] [[package]] name = "invenio-oauthclient" -version = "3.5.1" +version = "4.0.0" description = "\"Invenio module that provides OAuth web authorization support.\"" optional = false python-versions = ">=3.7" files = [ - {file = "invenio-oauthclient-3.5.1.tar.gz", hash = "sha256:69b8b0f645adb380f87a6986e0b2b9d37eb6026dac937f7478f2b38966fc7afd"}, - {file = "invenio_oauthclient-3.5.1-py2.py3-none-any.whl", hash = "sha256:a7e64d07de7ee81056fb7fd0254a53260c776c5e019c7482e674175bae25f9fe"}, + {file = "invenio-oauthclient-4.0.0.tar.gz", hash = "sha256:dc4731757b6d178b309a84b708fcff4e97d546d95018fc6aa0aab49d3edbecac"}, + {file = "invenio_oauthclient-4.0.0-py2.py3-none-any.whl", hash = "sha256:288e66fa6a8977dc4bd52bea741995f8d73d491373766a93bf2e443c57d39067"}, ] [package.dependencies] blinker = ">=1.4" Flask-OAuthlib = ">=0.9.6" "github3.py" = ">=1.0.0a4" -invenio-accounts = ">=3.0.0" -invenio-admin = ">=1.0.0" -invenio-base = ">=1.2.11" +invenio-accounts = ">=5.0.0" +invenio-base = ">=1.3.0" invenio-i18n = ">=2.0.0" invenio-mail = ">=1.0.2" -invenio-theme = ">=1.3.12" +invenio-theme = ">=3.0.0" oauthlib = ">=1.1.2,<3.0.0" requests-oauthlib = ">=0.6.2,<1.2.0" -"uritemplate.py" = ">=0.2.0,<2.0" +uritemplate = ">=3.0.1" uritools = ">=1.0.1" [package.extras] -tests = ["httpretty (>=0.8.14)", "invenio-db[mysql,postgresql,versioning] (>=1.0.9,<2.0.0)", "invenio-userprofiles (>=2.0.0.dev3)", "mock (>=1.3.0)", "oauthlib (>=1.1.2,<3.0.0)", "pytest-black (>=0.3.0)", "pytest-invenio (>=1.4.2)", "requests-oauthlib (>=0.6.2,<1.2.0)", "simplejson (>=3.8)", "sphinx (>=4.5)"] +tests = ["flask-admin (>=1.6.0)", "httpretty (>=0.8.14)", "invenio-db[mysql,postgresql,versioning] (>=1.0.9,<2.0.0)", "invenio-userprofiles (>=3.0.0)", "mock (>=1.3.0)", "oauthlib (>=1.1.2,<3.0.0)", "pytest-black-ng (>=0.4.0)", "pytest-invenio (>=1.4.2)", "requests-oauthlib (>=0.6.2,<1.2.0)", "simplejson (>=3.8)", "sphinx (>=4.5)"] [[package]] name = "invenio-pidstore" @@ -2004,13 +2050,13 @@ tests = ["invenio-admin (>=1.4.0,<2.0.0)", "pytest-black (>=0.3.0)", "pytest-inv [[package]] name = "invenio-records-rest" -version = "2.2.0" +version = "2.4.1" description = "\"REST API for invenio-records.\"" optional = false python-versions = ">=3.7" files = [ - {file = "invenio-records-rest-2.2.0.tar.gz", hash = "sha256:12082c188bd3b687d07ab689980c53cebc7919550f1d82cd9447c132384d7e1d"}, - {file = "invenio_records_rest-2.2.0-py2.py3-none-any.whl", hash = "sha256:3d28a073a51f6e53ae8e3b999a494255fda0d7e886dfa17b1261272cfc4ce488"}, + {file = "invenio-records-rest-2.4.1.tar.gz", hash = "sha256:a5bb71279127ce1c9751aec3d10331b0546e77f5df4b557b6ec13a14e9b0c332"}, + {file = "invenio_records_rest-2.4.1-py2.py3-none-any.whl", hash = "sha256:72fd085ac13e961380c60632d28c01d9b8707c74d7633c7911aefd39cc7e102f"}, ] [package.dependencies] @@ -2079,13 +2125,13 @@ tests = ["Sphinx (>=4.5.0)", "pytest-black (>=0.3.0,<0.3.10)", "pytest-invenio ( [[package]] name = "invenio-search" -version = "2.3.0" +version = "2.3.1" description = "\"Invenio module for information retrieval.\"" optional = false python-versions = ">=3.7" files = [ - {file = "invenio-search-2.3.0.tar.gz", hash = "sha256:758d589b907c2695e226dd6ec700160be7689a08ad4e1d2119a530bb88b32d53"}, - {file = "invenio_search-2.3.0-py2.py3-none-any.whl", hash = "sha256:4d246b9d307d50f309fe457c0005d1202c02b118ef4192c7235ec18e44c7cfc4"}, + {file = "invenio-search-2.3.1.tar.gz", hash = "sha256:ecbb420d4804b3a4fca8bcc9f8b5941067b06204b5a3c62ec997270f3c0e6ba6"}, + {file = "invenio_search-2.3.1-py2.py3-none-any.whl", hash = "sha256:1f9789993bcb5339688e88ec60993802e33c6e94954cb0702d0a43c7c6f94e6b"}, ] [package.dependencies] @@ -2102,43 +2148,42 @@ tests = ["Sphinx (>=3)", "invenio-accounts (>=2.0.0,<3.0.0)", "invenio-db[versio [[package]] name = "invenio-theme" -version = "2.5.10" +version = "3.1.0" description = "\"Invenio standard theme.\"" optional = false python-versions = ">=3.7" files = [ - {file = "invenio-theme-2.5.10.tar.gz", hash = "sha256:f70d120642cfe930928318735876b23cc14dbb7e27bb0cc90a4ac40207547afa"}, - {file = "invenio_theme-2.5.10-py2.py3-none-any.whl", hash = "sha256:c490a38f7e66837ce619fa4ffe7f6b6e727728f77352dbf78755d1f0869945b1"}, + {file = "invenio-theme-3.1.0.tar.gz", hash = "sha256:1445db2b61fa5a22147b490a2c2c78aa86e5aa7ca9646cb1d443fec8545a4de8"}, + {file = "invenio_theme-3.1.0-py2.py3-none-any.whl", hash = "sha256:14dc8b37d9a06a092620228fc5d9878a735bea5a63b56dc4d69460a757ca2f31"}, ] [package.dependencies] -Flask-Breadcrumbs = ">=0.4.0" -Flask-Menu = ">=0.5.0,<1.0.0" +Flask-Menu = ">=1.0.0" invenio-assets = ">=1.2.7" invenio-base = ">=1.2.5" invenio-i18n = ">=2.0.0" jsmin = ">=3.0.0" [package.extras] -tests = ["Sphinx (>=5,<6)", "pytest-black (>=0.3.0)", "pytest-invenio (>=1.4.2)"] +tests = ["Sphinx (>=5,<6)", "pytest-black-ng (>=0.4.0)", "pytest-invenio (>=1.4.2)"] [[package]] name = "invenio-userprofiles" -version = "2.3.1" +version = "3.0.0" description = "User profiles module for Invenio." optional = false python-versions = ">=3.7" files = [ - {file = "invenio-userprofiles-2.3.1.tar.gz", hash = "sha256:d1470af68f72c0b1e9d79c425a51aa6250bb193b140639b92a45c748c02fb4eb"}, - {file = "invenio_userprofiles-2.3.1-py2.py3-none-any.whl", hash = "sha256:ea8c25a08f9e55d6ee6e92571d84b7e4cde58c53e620f74b5215e0ecd97b392d"}, + {file = "invenio-userprofiles-3.0.0.tar.gz", hash = "sha256:3764fbb28080ca7303faeb467ef85d844af1ef45caadb202e833088c8e77a8a1"}, + {file = "invenio_userprofiles-3.0.0-py2.py3-none-any.whl", hash = "sha256:808ac839aa76a64ba08d913875bbf1f5ebbe255dafe4bd40c59269f1641c99cd"}, ] [package.dependencies] -invenio-accounts = ">=2.0.0" +invenio-accounts = ">=5.0.0" invenio-i18n = ">=2.0.0,<3.0.0" [package.extras] -tests = ["invenio-db[mysql,postgresql,versioning] (>=1.0.14)", "pytest-black (>=0.3.0)", "pytest-invenio (>=1.4.7)", "sphinx (>=4.5)"] +tests = ["invenio-app (>=1.4.0)", "invenio-db[mysql,postgresql,versioning] (>=1.0.14)", "pytest-black-ng (>=0.4.0)", "pytest-invenio (>=1.4.7)", "sphinx (>=4.5)"] [[package]] name = "ipython" @@ -2234,13 +2279,13 @@ testing = ["Django", "attrs", "colorama", "docopt", "pytest (<7.0.0)"] [[package]] name = "jinja2" -version = "3.1.3" +version = "3.1.4" description = "A very fast and expressive template engine." optional = false python-versions = ">=3.7" files = [ - {file = "Jinja2-3.1.3-py3-none-any.whl", hash = "sha256:7d6d50dd97d52cbc355597bd845fabfbac3f551e1f99619e39a35ce8c370b5fa"}, - {file = "Jinja2-3.1.3.tar.gz", hash = "sha256:ac8bd6544d4bb2c9792bf3a159e80bba8fda7f07e81bc3aed565432d5925ba90"}, + {file = "jinja2-3.1.4-py3-none-any.whl", hash = "sha256:bc5dd2abb727a5319567b7a813e6a2e7318c39f4f487cfe6c89c6f9c7d25197d"}, + {file = "jinja2-3.1.4.tar.gz", hash = "sha256:4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369"}, ] [package.dependencies] @@ -2275,13 +2320,13 @@ jsonpointer = ">=1.9" [[package]] name = "jsonpointer" -version = "2.4" +version = "3.0.0" description = "Identify specific nodes in a JSON document (RFC 6901)" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, !=3.6.*" +python-versions = ">=3.7" files = [ - {file = "jsonpointer-2.4-py2.py3-none-any.whl", hash = "sha256:15d51bba20eea3165644553647711d150376234112651b4f1811022aecad7d7a"}, - {file = "jsonpointer-2.4.tar.gz", hash = "sha256:585cee82b70211fa9e6043b7bb89db6e1aa49524340dde8ad6b63206ea689d88"}, + {file = "jsonpointer-3.0.0-py2.py3-none-any.whl", hash = "sha256:13e088adc14fca8b6aa8177c044e12701e6ad4b28ff10e65f2267a90109c9942"}, + {file = "jsonpointer-3.0.0.tar.gz", hash = "sha256:2b2d729f2091522d61c3b31f82e11870f60b68f43fbc705cb76bf4b832af59ef"}, ] [[package]] @@ -2317,13 +2362,13 @@ tests = ["jsonref (>=1.0.0)", "jsonschema (>=2.5.1)", "mock (>=1.3.0)", "pytest- [[package]] name = "jsonschema" -version = "4.21.1" +version = "4.22.0" description = "An implementation of JSON Schema validation for Python" optional = false python-versions = ">=3.8" files = [ - {file = "jsonschema-4.21.1-py3-none-any.whl", hash = "sha256:7996507afae316306f9e2290407761157c6f78002dcf7419acb99822143d1c6f"}, - {file = "jsonschema-4.21.1.tar.gz", hash = "sha256:85727c00279f5fa6bedbe6238d2aa6403bedd8b4864ab11207d07df3cc1b2ee5"}, + {file = "jsonschema-4.22.0-py3-none-any.whl", hash = "sha256:ff4cfd6b1367a40e7bc6411caec72effadd3db0bbe5017de188f2d6108335802"}, + {file = "jsonschema-4.22.0.tar.gz", hash = "sha256:5b22d434a45935119af990552c862e5d6d564e8f6601206b305a61fdf661a2b7"}, ] [package.dependencies] @@ -2352,13 +2397,13 @@ referencing = ">=0.31.0" [[package]] name = "kombu" -version = "5.3.5" +version = "5.3.7" description = "Messaging library for Python." optional = false python-versions = ">=3.8" files = [ - {file = "kombu-5.3.5-py3-none-any.whl", hash = "sha256:0eac1bbb464afe6fb0924b21bf79460416d25d8abc52546d4f16cad94f789488"}, - {file = "kombu-5.3.5.tar.gz", hash = "sha256:30e470f1a6b49c70dc6f6d13c3e4cc4e178aa6c469ceb6bcd55645385fc84b93"}, + {file = "kombu-5.3.7-py3-none-any.whl", hash = "sha256:5634c511926309c7f9789f1433e9ed402616b56836ef9878f01bd59267b4c7a9"}, + {file = "kombu-5.3.7.tar.gz", hash = "sha256:011c4cd9a355c14a1de8d35d257314a1d2456d52b7140388561acac3cf1a97bf"}, ] [package.dependencies] @@ -2376,7 +2421,7 @@ mongodb = ["pymongo (>=4.1.1)"] msgpack = ["msgpack"] pyro = ["pyro4"] qpid = ["qpid-python (>=0.26)", "qpid-tools (>=0.26)"] -redis = ["redis (>=4.5.2,!=4.5.5,<6.0.0)"] +redis = ["redis (>=4.5.2,!=4.5.5,!=5.0.2)"] slmq = ["softlayer-messaging (>=1.0.3)"] sqlalchemy = ["sqlalchemy (>=1.4.48,<2.1)"] sqs = ["boto3 (>=1.26.143)", "pycurl (>=7.43.0.5)", "urllib3 (>=1.26.16)"] @@ -2385,116 +2430,196 @@ zookeeper = ["kazoo (>=2.8.0)"] [[package]] name = "limits" -version = "1.6" +version = "3.12.0" description = "Rate limiting utilities" optional = false -python-versions = "*" +python-versions = ">=3.8" files = [ - {file = "limits-1.6-py3-none-any.whl", hash = "sha256:12ae4449cf7daadee43edf4096acd9cb9f4bfdec3a995aa9fbd0f72b0b9af762"}, - {file = "limits-1.6.tar.gz", hash = "sha256:6c0a57b42647f1141f5a7a0a8479b49e4367c24937a01bd9d4063a595c2dd48a"}, + {file = "limits-3.12.0-py3-none-any.whl", hash = "sha256:48d91e94a0888fb1251aa31423d716ae72ceff997231363f7968a5eaa51dc56d"}, + {file = "limits-3.12.0.tar.gz", hash = "sha256:95764065715a11b9fdcc82558cac2fb59a1febbb7aa2acd045f72ab0c16ec04f"}, ] [package.dependencies] -six = ">=1.4.1" +deprecated = ">=1.2" +importlib-resources = ">=1.3" +packaging = ">=21,<25" +typing-extensions = "*" + +[package.extras] +all = ["aetcd", "coredis (>=3.4.0,<5)", "emcache (>=0.6.1)", "emcache (>=1)", "etcd3", "motor (>=3,<4)", "pymemcache (>3,<5.0.0)", "pymongo (>4.1,<5)", "redis (>3,!=4.5.2,!=4.5.3,<6.0.0)", "redis (>=4.2.0,!=4.5.2,!=4.5.3)"] +async-etcd = ["aetcd"] +async-memcached = ["emcache (>=0.6.1)", "emcache (>=1)"] +async-mongodb = ["motor (>=3,<4)"] +async-redis = ["coredis (>=3.4.0,<5)"] +etcd = ["etcd3"] +memcached = ["pymemcache (>3,<5.0.0)"] +mongodb = ["pymongo (>4.1,<5)"] +redis = ["redis (>3,!=4.5.2,!=4.5.3,<6.0.0)"] +rediscluster = ["redis (>=4.2.0,!=4.5.2,!=4.5.3)"] [[package]] name = "lxml" -version = "5.1.0" +version = "5.2.2" description = "Powerful and Pythonic XML processing library combining libxml2/libxslt with the ElementTree API." optional = false python-versions = ">=3.6" files = [ - {file = "lxml-5.1.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:9d3c0f8567ffe7502d969c2c1b809892dc793b5d0665f602aad19895f8d508da"}, - {file = "lxml-5.1.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:5fcfbebdb0c5d8d18b84118842f31965d59ee3e66996ac842e21f957eb76138c"}, - {file = "lxml-5.1.0-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2f37c6d7106a9d6f0708d4e164b707037b7380fcd0b04c5bd9cae1fb46a856fb"}, - {file = "lxml-5.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2befa20a13f1a75c751f47e00929fb3433d67eb9923c2c0b364de449121f447c"}, - {file = "lxml-5.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:22b7ee4c35f374e2c20337a95502057964d7e35b996b1c667b5c65c567d2252a"}, - {file = "lxml-5.1.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:bf8443781533b8d37b295016a4b53c1494fa9a03573c09ca5104550c138d5c05"}, - {file = "lxml-5.1.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:82bddf0e72cb2af3cbba7cec1d2fd11fda0de6be8f4492223d4a268713ef2147"}, - {file = "lxml-5.1.0-cp310-cp310-win32.whl", hash = "sha256:b66aa6357b265670bb574f050ffceefb98549c721cf28351b748be1ef9577d93"}, - {file = "lxml-5.1.0-cp310-cp310-win_amd64.whl", hash = "sha256:4946e7f59b7b6a9e27bef34422f645e9a368cb2be11bf1ef3cafc39a1f6ba68d"}, - {file = "lxml-5.1.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:ed8c3d2cd329bf779b7ed38db176738f3f8be637bb395ce9629fc76f78afe3d4"}, - {file = "lxml-5.1.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:436a943c2900bb98123b06437cdd30580a61340fbdb7b28aaf345a459c19046a"}, - {file = "lxml-5.1.0-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:acb6b2f96f60f70e7f34efe0c3ea34ca63f19ca63ce90019c6cbca6b676e81fa"}, - {file = "lxml-5.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:af8920ce4a55ff41167ddbc20077f5698c2e710ad3353d32a07d3264f3a2021e"}, - {file = "lxml-5.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7cfced4a069003d8913408e10ca8ed092c49a7f6cefee9bb74b6b3e860683b45"}, - {file = "lxml-5.1.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:9e5ac3437746189a9b4121db2a7b86056ac8786b12e88838696899328fc44bb2"}, - {file = "lxml-5.1.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:f4c9bda132ad108b387c33fabfea47866af87f4ea6ffb79418004f0521e63204"}, - {file = "lxml-5.1.0-cp311-cp311-win32.whl", hash = "sha256:bc64d1b1dab08f679fb89c368f4c05693f58a9faf744c4d390d7ed1d8223869b"}, - {file = "lxml-5.1.0-cp311-cp311-win_amd64.whl", hash = "sha256:a5ab722ae5a873d8dcee1f5f45ddd93c34210aed44ff2dc643b5025981908cda"}, - {file = "lxml-5.1.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:6f11b77ec0979f7e4dc5ae081325a2946f1fe424148d3945f943ceaede98adb8"}, - {file = "lxml-5.1.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:a36c506e5f8aeb40680491d39ed94670487ce6614b9d27cabe45d94cd5d63e1e"}, - {file = "lxml-5.1.0-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f643ffd2669ffd4b5a3e9b41c909b72b2a1d5e4915da90a77e119b8d48ce867a"}, - {file = "lxml-5.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:16dd953fb719f0ffc5bc067428fc9e88f599e15723a85618c45847c96f11f431"}, - {file = "lxml-5.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:16018f7099245157564d7148165132c70adb272fb5a17c048ba70d9cc542a1a1"}, - {file = "lxml-5.1.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:82cd34f1081ae4ea2ede3d52f71b7be313756e99b4b5f829f89b12da552d3aa3"}, - {file = "lxml-5.1.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:19a1bc898ae9f06bccb7c3e1dfd73897ecbbd2c96afe9095a6026016e5ca97b8"}, - {file = "lxml-5.1.0-cp312-cp312-win32.whl", hash = "sha256:13521a321a25c641b9ea127ef478b580b5ec82aa2e9fc076c86169d161798b01"}, - {file = "lxml-5.1.0-cp312-cp312-win_amd64.whl", hash = "sha256:1ad17c20e3666c035db502c78b86e58ff6b5991906e55bdbef94977700c72623"}, - {file = "lxml-5.1.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:24ef5a4631c0b6cceaf2dbca21687e29725b7c4e171f33a8f8ce23c12558ded1"}, - {file = "lxml-5.1.0-cp36-cp36m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8d2900b7f5318bc7ad8631d3d40190b95ef2aa8cc59473b73b294e4a55e9f30f"}, - {file = "lxml-5.1.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:601f4a75797d7a770daed8b42b97cd1bb1ba18bd51a9382077a6a247a12aa38d"}, - {file = "lxml-5.1.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b4b68c961b5cc402cbd99cca5eb2547e46ce77260eb705f4d117fd9c3f932b95"}, - {file = "lxml-5.1.0-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:afd825e30f8d1f521713a5669b63657bcfe5980a916c95855060048b88e1adb7"}, - {file = "lxml-5.1.0-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:262bc5f512a66b527d026518507e78c2f9c2bd9eb5c8aeeb9f0eb43fcb69dc67"}, - {file = "lxml-5.1.0-cp36-cp36m-win32.whl", hash = "sha256:e856c1c7255c739434489ec9c8aa9cdf5179785d10ff20add308b5d673bed5cd"}, - {file = "lxml-5.1.0-cp36-cp36m-win_amd64.whl", hash = "sha256:c7257171bb8d4432fe9d6fdde4d55fdbe663a63636a17f7f9aaba9bcb3153ad7"}, - {file = "lxml-5.1.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:b9e240ae0ba96477682aa87899d94ddec1cc7926f9df29b1dd57b39e797d5ab5"}, - {file = "lxml-5.1.0-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a96f02ba1bcd330807fc060ed91d1f7a20853da6dd449e5da4b09bfcc08fdcf5"}, - {file = "lxml-5.1.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3e3898ae2b58eeafedfe99e542a17859017d72d7f6a63de0f04f99c2cb125936"}, - {file = "lxml-5.1.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:61c5a7edbd7c695e54fca029ceb351fc45cd8860119a0f83e48be44e1c464862"}, - {file = "lxml-5.1.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:3aeca824b38ca78d9ee2ab82bd9883083d0492d9d17df065ba3b94e88e4d7ee6"}, - {file = "lxml-5.1.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:8f52fe6859b9db71ee609b0c0a70fea5f1e71c3462ecf144ca800d3f434f0764"}, - {file = "lxml-5.1.0-cp37-cp37m-win32.whl", hash = "sha256:d42e3a3fc18acc88b838efded0e6ec3edf3e328a58c68fbd36a7263a874906c8"}, - {file = "lxml-5.1.0-cp37-cp37m-win_amd64.whl", hash = "sha256:eac68f96539b32fce2c9b47eb7c25bb2582bdaf1bbb360d25f564ee9e04c542b"}, - {file = "lxml-5.1.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:c26aab6ea9c54d3bed716b8851c8bfc40cb249b8e9880e250d1eddde9f709bf5"}, - {file = "lxml-5.1.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:cfbac9f6149174f76df7e08c2e28b19d74aed90cad60383ad8671d3af7d0502f"}, - {file = "lxml-5.1.0-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:342e95bddec3a698ac24378d61996b3ee5ba9acfeb253986002ac53c9a5f6f84"}, - {file = "lxml-5.1.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:725e171e0b99a66ec8605ac77fa12239dbe061482ac854d25720e2294652eeaa"}, - {file = "lxml-5.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3d184e0d5c918cff04cdde9dbdf9600e960161d773666958c9d7b565ccc60c45"}, - {file = "lxml-5.1.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:98f3f020a2b736566c707c8e034945c02aa94e124c24f77ca097c446f81b01f1"}, - {file = "lxml-5.1.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:6d48fc57e7c1e3df57be5ae8614bab6d4e7b60f65c5457915c26892c41afc59e"}, - {file = "lxml-5.1.0-cp38-cp38-win32.whl", hash = "sha256:7ec465e6549ed97e9f1e5ed51c657c9ede767bc1c11552f7f4d022c4df4a977a"}, - {file = "lxml-5.1.0-cp38-cp38-win_amd64.whl", hash = "sha256:b21b4031b53d25b0858d4e124f2f9131ffc1530431c6d1321805c90da78388d1"}, - {file = "lxml-5.1.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6a2a2c724d97c1eb8cf966b16ca2915566a4904b9aad2ed9a09c748ffe14f969"}, - {file = "lxml-5.1.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:843b9c835580d52828d8f69ea4302537337a21e6b4f1ec711a52241ba4a824f3"}, - {file = "lxml-5.1.0-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9b99f564659cfa704a2dd82d0684207b1aadf7d02d33e54845f9fc78e06b7581"}, - {file = "lxml-5.1.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4f8b0c78e7aac24979ef09b7f50da871c2de2def043d468c4b41f512d831e912"}, - {file = "lxml-5.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9bcf86dfc8ff3e992fed847c077bd875d9e0ba2fa25d859c3a0f0f76f07f0c8d"}, - {file = "lxml-5.1.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:49a9b4af45e8b925e1cd6f3b15bbba2c81e7dba6dce170c677c9cda547411e14"}, - {file = "lxml-5.1.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:280f3edf15c2a967d923bcfb1f8f15337ad36f93525828b40a0f9d6c2ad24890"}, - {file = "lxml-5.1.0-cp39-cp39-win32.whl", hash = "sha256:ed7326563024b6e91fef6b6c7a1a2ff0a71b97793ac33dbbcf38f6005e51ff6e"}, - {file = "lxml-5.1.0-cp39-cp39-win_amd64.whl", hash = "sha256:8d7b4beebb178e9183138f552238f7e6613162a42164233e2bda00cb3afac58f"}, - {file = "lxml-5.1.0-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:9bd0ae7cc2b85320abd5e0abad5ccee5564ed5f0cc90245d2f9a8ef330a8deae"}, - {file = "lxml-5.1.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d8c1d679df4361408b628f42b26a5d62bd3e9ba7f0c0e7969f925021554755aa"}, - {file = "lxml-5.1.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:2ad3a8ce9e8a767131061a22cd28fdffa3cd2dc193f399ff7b81777f3520e372"}, - {file = "lxml-5.1.0-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:304128394c9c22b6569eba2a6d98392b56fbdfbad58f83ea702530be80d0f9df"}, - {file = "lxml-5.1.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d74fcaf87132ffc0447b3c685a9f862ffb5b43e70ea6beec2fb8057d5d2a1fea"}, - {file = "lxml-5.1.0-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:8cf5877f7ed384dabfdcc37922c3191bf27e55b498fecece9fd5c2c7aaa34c33"}, - {file = "lxml-5.1.0-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:877efb968c3d7eb2dad540b6cabf2f1d3c0fbf4b2d309a3c141f79c7e0061324"}, - {file = "lxml-5.1.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3f14a4fb1c1c402a22e6a341a24c1341b4a3def81b41cd354386dcb795f83897"}, - {file = "lxml-5.1.0-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:25663d6e99659544ee8fe1b89b1a8c0aaa5e34b103fab124b17fa958c4a324a6"}, - {file = "lxml-5.1.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:8b9f19df998761babaa7f09e6bc169294eefafd6149aaa272081cbddc7ba4ca3"}, - {file = "lxml-5.1.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5e53d7e6a98b64fe54775d23a7c669763451340c3d44ad5e3a3b48a1efbdc96f"}, - {file = "lxml-5.1.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:c3cd1fc1dc7c376c54440aeaaa0dcc803d2126732ff5c6b68ccd619f2e64be4f"}, - {file = "lxml-5.1.0.tar.gz", hash = "sha256:3eea6ed6e6c918e468e693c41ef07f3c3acc310b70ddd9cc72d9ef84bc9564ca"}, + {file = "lxml-5.2.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:364d03207f3e603922d0d3932ef363d55bbf48e3647395765f9bfcbdf6d23632"}, + {file = "lxml-5.2.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:50127c186f191b8917ea2fb8b206fbebe87fd414a6084d15568c27d0a21d60db"}, + {file = "lxml-5.2.2-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:74e4f025ef3db1c6da4460dd27c118d8cd136d0391da4e387a15e48e5c975147"}, + {file = "lxml-5.2.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:981a06a3076997adf7c743dcd0d7a0415582661e2517c7d961493572e909aa1d"}, + {file = "lxml-5.2.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:aef5474d913d3b05e613906ba4090433c515e13ea49c837aca18bde190853dff"}, + {file = "lxml-5.2.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1e275ea572389e41e8b039ac076a46cb87ee6b8542df3fff26f5baab43713bca"}, + {file = "lxml-5.2.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f5b65529bb2f21ac7861a0e94fdbf5dc0daab41497d18223b46ee8515e5ad297"}, + {file = "lxml-5.2.2-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:bcc98f911f10278d1daf14b87d65325851a1d29153caaf146877ec37031d5f36"}, + {file = "lxml-5.2.2-cp310-cp310-manylinux_2_28_ppc64le.whl", hash = "sha256:b47633251727c8fe279f34025844b3b3a3e40cd1b198356d003aa146258d13a2"}, + {file = "lxml-5.2.2-cp310-cp310-manylinux_2_28_s390x.whl", hash = "sha256:fbc9d316552f9ef7bba39f4edfad4a734d3d6f93341232a9dddadec4f15d425f"}, + {file = "lxml-5.2.2-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:13e69be35391ce72712184f69000cda04fc89689429179bc4c0ae5f0b7a8c21b"}, + {file = "lxml-5.2.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:3b6a30a9ab040b3f545b697cb3adbf3696c05a3a68aad172e3fd7ca73ab3c835"}, + {file = "lxml-5.2.2-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:a233bb68625a85126ac9f1fc66d24337d6e8a0f9207b688eec2e7c880f012ec0"}, + {file = "lxml-5.2.2-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:dfa7c241073d8f2b8e8dbc7803c434f57dbb83ae2a3d7892dd068d99e96efe2c"}, + {file = "lxml-5.2.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:1a7aca7964ac4bb07680d5c9d63b9d7028cace3e2d43175cb50bba8c5ad33316"}, + {file = "lxml-5.2.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:ae4073a60ab98529ab8a72ebf429f2a8cc612619a8c04e08bed27450d52103c0"}, + {file = "lxml-5.2.2-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:ffb2be176fed4457e445fe540617f0252a72a8bc56208fd65a690fdb1f57660b"}, + {file = "lxml-5.2.2-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:e290d79a4107d7d794634ce3e985b9ae4f920380a813717adf61804904dc4393"}, + {file = "lxml-5.2.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:96e85aa09274955bb6bd483eaf5b12abadade01010478154b0ec70284c1b1526"}, + {file = "lxml-5.2.2-cp310-cp310-win32.whl", hash = "sha256:f956196ef61369f1685d14dad80611488d8dc1ef00be57c0c5a03064005b0f30"}, + {file = "lxml-5.2.2-cp310-cp310-win_amd64.whl", hash = "sha256:875a3f90d7eb5c5d77e529080d95140eacb3c6d13ad5b616ee8095447b1d22e7"}, + {file = "lxml-5.2.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:45f9494613160d0405682f9eee781c7e6d1bf45f819654eb249f8f46a2c22545"}, + {file = "lxml-5.2.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b0b3f2df149efb242cee2ffdeb6674b7f30d23c9a7af26595099afaf46ef4e88"}, + {file = "lxml-5.2.2-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d28cb356f119a437cc58a13f8135ab8a4c8ece18159eb9194b0d269ec4e28083"}, + {file = "lxml-5.2.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:657a972f46bbefdbba2d4f14413c0d079f9ae243bd68193cb5061b9732fa54c1"}, + {file = "lxml-5.2.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b74b9ea10063efb77a965a8d5f4182806fbf59ed068b3c3fd6f30d2ac7bee734"}, + {file = "lxml-5.2.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:07542787f86112d46d07d4f3c4e7c760282011b354d012dc4141cc12a68cef5f"}, + {file = "lxml-5.2.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:303f540ad2dddd35b92415b74b900c749ec2010e703ab3bfd6660979d01fd4ed"}, + {file = "lxml-5.2.2-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:2eb2227ce1ff998faf0cd7fe85bbf086aa41dfc5af3b1d80867ecfe75fb68df3"}, + {file = "lxml-5.2.2-cp311-cp311-manylinux_2_28_ppc64le.whl", hash = "sha256:1d8a701774dfc42a2f0b8ccdfe7dbc140500d1049e0632a611985d943fcf12df"}, + {file = "lxml-5.2.2-cp311-cp311-manylinux_2_28_s390x.whl", hash = "sha256:56793b7a1a091a7c286b5f4aa1fe4ae5d1446fe742d00cdf2ffb1077865db10d"}, + {file = "lxml-5.2.2-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:eb00b549b13bd6d884c863554566095bf6fa9c3cecb2e7b399c4bc7904cb33b5"}, + {file = "lxml-5.2.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:1a2569a1f15ae6c8c64108a2cd2b4a858fc1e13d25846be0666fc144715e32ab"}, + {file = "lxml-5.2.2-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:8cf85a6e40ff1f37fe0f25719aadf443686b1ac7652593dc53c7ef9b8492b115"}, + {file = "lxml-5.2.2-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:d237ba6664b8e60fd90b8549a149a74fcc675272e0e95539a00522e4ca688b04"}, + {file = "lxml-5.2.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:0b3f5016e00ae7630a4b83d0868fca1e3d494c78a75b1c7252606a3a1c5fc2ad"}, + {file = "lxml-5.2.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:23441e2b5339bc54dc949e9e675fa35efe858108404ef9aa92f0456929ef6fe8"}, + {file = "lxml-5.2.2-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:2fb0ba3e8566548d6c8e7dd82a8229ff47bd8fb8c2da237607ac8e5a1b8312e5"}, + {file = "lxml-5.2.2-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:79d1fb9252e7e2cfe4de6e9a6610c7cbb99b9708e2c3e29057f487de5a9eaefa"}, + {file = "lxml-5.2.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:6dcc3d17eac1df7859ae01202e9bb11ffa8c98949dcbeb1069c8b9a75917e01b"}, + {file = "lxml-5.2.2-cp311-cp311-win32.whl", hash = "sha256:4c30a2f83677876465f44c018830f608fa3c6a8a466eb223535035fbc16f3438"}, + {file = "lxml-5.2.2-cp311-cp311-win_amd64.whl", hash = "sha256:49095a38eb333aaf44c06052fd2ec3b8f23e19747ca7ec6f6c954ffea6dbf7be"}, + {file = "lxml-5.2.2-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:7429e7faa1a60cad26ae4227f4dd0459efde239e494c7312624ce228e04f6391"}, + {file = "lxml-5.2.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:50ccb5d355961c0f12f6cf24b7187dbabd5433f29e15147a67995474f27d1776"}, + {file = "lxml-5.2.2-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:dc911208b18842a3a57266d8e51fc3cfaccee90a5351b92079beed912a7914c2"}, + {file = "lxml-5.2.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:33ce9e786753743159799fdf8e92a5da351158c4bfb6f2db0bf31e7892a1feb5"}, + {file = "lxml-5.2.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ec87c44f619380878bd49ca109669c9f221d9ae6883a5bcb3616785fa8f94c97"}, + {file = "lxml-5.2.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:08ea0f606808354eb8f2dfaac095963cb25d9d28e27edcc375d7b30ab01abbf6"}, + {file = "lxml-5.2.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:75a9632f1d4f698b2e6e2e1ada40e71f369b15d69baddb8968dcc8e683839b18"}, + {file = "lxml-5.2.2-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:74da9f97daec6928567b48c90ea2c82a106b2d500f397eeb8941e47d30b1ca85"}, + {file = "lxml-5.2.2-cp312-cp312-manylinux_2_28_ppc64le.whl", hash = "sha256:0969e92af09c5687d769731e3f39ed62427cc72176cebb54b7a9d52cc4fa3b73"}, + {file = "lxml-5.2.2-cp312-cp312-manylinux_2_28_s390x.whl", hash = "sha256:9164361769b6ca7769079f4d426a41df6164879f7f3568be9086e15baca61466"}, + {file = "lxml-5.2.2-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:d26a618ae1766279f2660aca0081b2220aca6bd1aa06b2cf73f07383faf48927"}, + {file = "lxml-5.2.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:ab67ed772c584b7ef2379797bf14b82df9aa5f7438c5b9a09624dd834c1c1aaf"}, + {file = "lxml-5.2.2-cp312-cp312-musllinux_1_1_ppc64le.whl", hash = "sha256:3d1e35572a56941b32c239774d7e9ad724074d37f90c7a7d499ab98761bd80cf"}, + {file = "lxml-5.2.2-cp312-cp312-musllinux_1_1_s390x.whl", hash = "sha256:8268cbcd48c5375f46e000adb1390572c98879eb4f77910c6053d25cc3ac2c67"}, + {file = "lxml-5.2.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:e282aedd63c639c07c3857097fc0e236f984ceb4089a8b284da1c526491e3f3d"}, + {file = "lxml-5.2.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:6dfdc2bfe69e9adf0df4915949c22a25b39d175d599bf98e7ddf620a13678585"}, + {file = "lxml-5.2.2-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:4aefd911793b5d2d7a921233a54c90329bf3d4a6817dc465f12ffdfe4fc7b8fe"}, + {file = "lxml-5.2.2-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:8b8df03a9e995b6211dafa63b32f9d405881518ff1ddd775db4e7b98fb545e1c"}, + {file = "lxml-5.2.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:f11ae142f3a322d44513de1018b50f474f8f736bc3cd91d969f464b5bfef8836"}, + {file = "lxml-5.2.2-cp312-cp312-win32.whl", hash = "sha256:16a8326e51fcdffc886294c1e70b11ddccec836516a343f9ed0f82aac043c24a"}, + {file = "lxml-5.2.2-cp312-cp312-win_amd64.whl", hash = "sha256:bbc4b80af581e18568ff07f6395c02114d05f4865c2812a1f02f2eaecf0bfd48"}, + {file = "lxml-5.2.2-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:e3d9d13603410b72787579769469af730c38f2f25505573a5888a94b62b920f8"}, + {file = "lxml-5.2.2-cp36-cp36m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:38b67afb0a06b8575948641c1d6d68e41b83a3abeae2ca9eed2ac59892b36706"}, + {file = "lxml-5.2.2-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c689d0d5381f56de7bd6966a4541bff6e08bf8d3871bbd89a0c6ab18aa699573"}, + {file = "lxml-5.2.2-cp36-cp36m-manylinux_2_28_x86_64.whl", hash = "sha256:cf2a978c795b54c539f47964ec05e35c05bd045db5ca1e8366988c7f2fe6b3ce"}, + {file = "lxml-5.2.2-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:739e36ef7412b2bd940f75b278749106e6d025e40027c0b94a17ef7968d55d56"}, + {file = "lxml-5.2.2-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:d8bbcd21769594dbba9c37d3c819e2d5847656ca99c747ddb31ac1701d0c0ed9"}, + {file = "lxml-5.2.2-cp36-cp36m-musllinux_1_2_x86_64.whl", hash = "sha256:2304d3c93f2258ccf2cf7a6ba8c761d76ef84948d87bf9664e14d203da2cd264"}, + {file = "lxml-5.2.2-cp36-cp36m-win32.whl", hash = "sha256:02437fb7308386867c8b7b0e5bc4cd4b04548b1c5d089ffb8e7b31009b961dc3"}, + {file = "lxml-5.2.2-cp36-cp36m-win_amd64.whl", hash = "sha256:edcfa83e03370032a489430215c1e7783128808fd3e2e0a3225deee278585196"}, + {file = "lxml-5.2.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:28bf95177400066596cdbcfc933312493799382879da504633d16cf60bba735b"}, + {file = "lxml-5.2.2-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3a745cc98d504d5bd2c19b10c79c61c7c3df9222629f1b6210c0368177589fb8"}, + {file = "lxml-5.2.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b336b0416828022bfd5a2e3083e7f5ba54b96242159f83c7e3eebaec752f1716"}, + {file = "lxml-5.2.2-cp37-cp37m-manylinux_2_28_x86_64.whl", hash = "sha256:4bc6cb140a7a0ad1f7bc37e018d0ed690b7b6520ade518285dc3171f7a117905"}, + {file = "lxml-5.2.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:57f0a0bbc9868e10ebe874e9f129d2917750adf008fe7b9c1598c0fbbfdde6a6"}, + {file = "lxml-5.2.2-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:60499fe961b21264e17a471ec296dcbf4365fbea611bf9e303ab69db7159ce61"}, + {file = "lxml-5.2.2-cp37-cp37m-win32.whl", hash = "sha256:d9b342c76003c6b9336a80efcc766748a333573abf9350f4094ee46b006ec18f"}, + {file = "lxml-5.2.2-cp37-cp37m-win_amd64.whl", hash = "sha256:b16db2770517b8799c79aa80f4053cd6f8b716f21f8aca962725a9565ce3ee40"}, + {file = "lxml-5.2.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:7ed07b3062b055d7a7f9d6557a251cc655eed0b3152b76de619516621c56f5d3"}, + {file = "lxml-5.2.2-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f60fdd125d85bf9c279ffb8e94c78c51b3b6a37711464e1f5f31078b45002421"}, + {file = "lxml-5.2.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8a7e24cb69ee5f32e003f50e016d5fde438010c1022c96738b04fc2423e61706"}, + {file = "lxml-5.2.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:23cfafd56887eaed93d07bc4547abd5e09d837a002b791e9767765492a75883f"}, + {file = "lxml-5.2.2-cp38-cp38-manylinux_2_28_aarch64.whl", hash = "sha256:19b4e485cd07b7d83e3fe3b72132e7df70bfac22b14fe4bf7a23822c3a35bff5"}, + {file = "lxml-5.2.2-cp38-cp38-manylinux_2_28_x86_64.whl", hash = "sha256:7ce7ad8abebe737ad6143d9d3bf94b88b93365ea30a5b81f6877ec9c0dee0a48"}, + {file = "lxml-5.2.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:e49b052b768bb74f58c7dda4e0bdf7b79d43a9204ca584ffe1fb48a6f3c84c66"}, + {file = "lxml-5.2.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:d14a0d029a4e176795cef99c056d58067c06195e0c7e2dbb293bf95c08f772a3"}, + {file = "lxml-5.2.2-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:be49ad33819d7dcc28a309b86d4ed98e1a65f3075c6acd3cd4fe32103235222b"}, + {file = "lxml-5.2.2-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:a6d17e0370d2516d5bb9062c7b4cb731cff921fc875644c3d751ad857ba9c5b1"}, + {file = "lxml-5.2.2-cp38-cp38-win32.whl", hash = "sha256:5b8c041b6265e08eac8a724b74b655404070b636a8dd6d7a13c3adc07882ef30"}, + {file = "lxml-5.2.2-cp38-cp38-win_amd64.whl", hash = "sha256:f61efaf4bed1cc0860e567d2ecb2363974d414f7f1f124b1df368bbf183453a6"}, + {file = "lxml-5.2.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:fb91819461b1b56d06fa4bcf86617fac795f6a99d12239fb0c68dbeba41a0a30"}, + {file = "lxml-5.2.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:d4ed0c7cbecde7194cd3228c044e86bf73e30a23505af852857c09c24e77ec5d"}, + {file = "lxml-5.2.2-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:54401c77a63cc7d6dc4b4e173bb484f28a5607f3df71484709fe037c92d4f0ed"}, + {file = "lxml-5.2.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:625e3ef310e7fa3a761d48ca7ea1f9d8718a32b1542e727d584d82f4453d5eeb"}, + {file = "lxml-5.2.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:519895c99c815a1a24a926d5b60627ce5ea48e9f639a5cd328bda0515ea0f10c"}, + {file = "lxml-5.2.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c7079d5eb1c1315a858bbf180000757db8ad904a89476653232db835c3114001"}, + {file = "lxml-5.2.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:343ab62e9ca78094f2306aefed67dcfad61c4683f87eee48ff2fd74902447726"}, + {file = "lxml-5.2.2-cp39-cp39-manylinux_2_28_aarch64.whl", hash = "sha256:cd9e78285da6c9ba2d5c769628f43ef66d96ac3085e59b10ad4f3707980710d3"}, + {file = "lxml-5.2.2-cp39-cp39-manylinux_2_28_ppc64le.whl", hash = "sha256:546cf886f6242dff9ec206331209db9c8e1643ae642dea5fdbecae2453cb50fd"}, + {file = "lxml-5.2.2-cp39-cp39-manylinux_2_28_s390x.whl", hash = "sha256:02f6a8eb6512fdc2fd4ca10a49c341c4e109aa6e9448cc4859af5b949622715a"}, + {file = "lxml-5.2.2-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:339ee4a4704bc724757cd5dd9dc8cf4d00980f5d3e6e06d5847c1b594ace68ab"}, + {file = "lxml-5.2.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:0a028b61a2e357ace98b1615fc03f76eb517cc028993964fe08ad514b1e8892d"}, + {file = "lxml-5.2.2-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:f90e552ecbad426eab352e7b2933091f2be77115bb16f09f78404861c8322981"}, + {file = "lxml-5.2.2-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:d83e2d94b69bf31ead2fa45f0acdef0757fa0458a129734f59f67f3d2eb7ef32"}, + {file = "lxml-5.2.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:a02d3c48f9bb1e10c7788d92c0c7db6f2002d024ab6e74d6f45ae33e3d0288a3"}, + {file = "lxml-5.2.2-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:6d68ce8e7b2075390e8ac1e1d3a99e8b6372c694bbe612632606d1d546794207"}, + {file = "lxml-5.2.2-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:453d037e09a5176d92ec0fd282e934ed26d806331a8b70ab431a81e2fbabf56d"}, + {file = "lxml-5.2.2-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:3b019d4ee84b683342af793b56bb35034bd749e4cbdd3d33f7d1107790f8c472"}, + {file = "lxml-5.2.2-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:cb3942960f0beb9f46e2a71a3aca220d1ca32feb5a398656be934320804c0df9"}, + {file = "lxml-5.2.2-cp39-cp39-win32.whl", hash = "sha256:ac6540c9fff6e3813d29d0403ee7a81897f1d8ecc09a8ff84d2eea70ede1cdbf"}, + {file = "lxml-5.2.2-cp39-cp39-win_amd64.whl", hash = "sha256:610b5c77428a50269f38a534057444c249976433f40f53e3b47e68349cca1425"}, + {file = "lxml-5.2.2-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:b537bd04d7ccd7c6350cdaaaad911f6312cbd61e6e6045542f781c7f8b2e99d2"}, + {file = "lxml-5.2.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4820c02195d6dfb7b8508ff276752f6b2ff8b64ae5d13ebe02e7667e035000b9"}, + {file = "lxml-5.2.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f2a09f6184f17a80897172863a655467da2b11151ec98ba8d7af89f17bf63dae"}, + {file = "lxml-5.2.2-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:76acba4c66c47d27c8365e7c10b3d8016a7da83d3191d053a58382311a8bf4e1"}, + {file = "lxml-5.2.2-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:b128092c927eaf485928cec0c28f6b8bead277e28acf56800e972aa2c2abd7a2"}, + {file = "lxml-5.2.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:ae791f6bd43305aade8c0e22f816b34f3b72b6c820477aab4d18473a37e8090b"}, + {file = "lxml-5.2.2-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:a2f6a1bc2460e643785a2cde17293bd7a8f990884b822f7bca47bee0a82fc66b"}, + {file = "lxml-5.2.2-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8e8d351ff44c1638cb6e980623d517abd9f580d2e53bfcd18d8941c052a5a009"}, + {file = "lxml-5.2.2-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bec4bd9133420c5c52d562469c754f27c5c9e36ee06abc169612c959bd7dbb07"}, + {file = "lxml-5.2.2-pp37-pypy37_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:55ce6b6d803890bd3cc89975fca9de1dff39729b43b73cb15ddd933b8bc20484"}, + {file = "lxml-5.2.2-pp37-pypy37_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:8ab6a358d1286498d80fe67bd3d69fcbc7d1359b45b41e74c4a26964ca99c3f8"}, + {file = "lxml-5.2.2-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:06668e39e1f3c065349c51ac27ae430719d7806c026fec462e5693b08b95696b"}, + {file = "lxml-5.2.2-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:9cd5323344d8ebb9fb5e96da5de5ad4ebab993bbf51674259dbe9d7a18049525"}, + {file = "lxml-5.2.2-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:89feb82ca055af0fe797a2323ec9043b26bc371365847dbe83c7fd2e2f181c34"}, + {file = "lxml-5.2.2-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e481bba1e11ba585fb06db666bfc23dbe181dbafc7b25776156120bf12e0d5a6"}, + {file = "lxml-5.2.2-pp38-pypy38_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:9d6c6ea6a11ca0ff9cd0390b885984ed31157c168565702959c25e2191674a14"}, + {file = "lxml-5.2.2-pp38-pypy38_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:3d98de734abee23e61f6b8c2e08a88453ada7d6486dc7cdc82922a03968928db"}, + {file = "lxml-5.2.2-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:69ab77a1373f1e7563e0fb5a29a8440367dec051da6c7405333699d07444f511"}, + {file = "lxml-5.2.2-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:34e17913c431f5ae01d8658dbf792fdc457073dcdfbb31dc0cc6ab256e664a8d"}, + {file = "lxml-5.2.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:05f8757b03208c3f50097761be2dea0aba02e94f0dc7023ed73a7bb14ff11eb0"}, + {file = "lxml-5.2.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6a520b4f9974b0a0a6ed73c2154de57cdfd0c8800f4f15ab2b73238ffed0b36e"}, + {file = "lxml-5.2.2-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:5e097646944b66207023bc3c634827de858aebc226d5d4d6d16f0b77566ea182"}, + {file = "lxml-5.2.2-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:b5e4ef22ff25bfd4ede5f8fb30f7b24446345f3e79d9b7455aef2836437bc38a"}, + {file = "lxml-5.2.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:ff69a9a0b4b17d78170c73abe2ab12084bdf1691550c5629ad1fe7849433f324"}, + {file = "lxml-5.2.2.tar.gz", hash = "sha256:bb2dc4898180bea79863d5487e5f9c7c34297414bad54bcd0f0852aee9cfdb87"}, ] [package.extras] cssselect = ["cssselect (>=0.7)"] +html-clean = ["lxml-html-clean"] html5 = ["html5lib"] htmlsoup = ["BeautifulSoup4"] -source = ["Cython (>=3.0.7)"] +source = ["Cython (>=3.0.10)"] [[package]] name = "mako" -version = "1.3.2" +version = "1.3.5" description = "A super-fast templating language that borrows the best ideas from the existing templating languages." optional = false python-versions = ">=3.8" files = [ - {file = "Mako-1.3.2-py3-none-any.whl", hash = "sha256:32a99d70754dfce237019d17ffe4a282d2d3351b9c476e90d8a60e63f133b80c"}, - {file = "Mako-1.3.2.tar.gz", hash = "sha256:2a0c8ad7f6274271b3bb7467dd37cf9cc6dab4bc19cb69a4ef10669402de698e"}, + {file = "Mako-1.3.5-py3-none-any.whl", hash = "sha256:260f1dbc3a519453a9c856dedfe4beb4e50bd5a26d96386cb6c80856556bb91a"}, + {file = "Mako-1.3.5.tar.gz", hash = "sha256:48dbc20568c1d276a2698b36d968fa76161bf127194907ea6fc594fa81f943bc"}, ] [package.dependencies] @@ -2576,13 +2701,13 @@ files = [ [[package]] name = "marshmallow" -version = "3.21.0" +version = "3.21.3" description = "A lightweight library for converting complex datatypes to and from native Python datatypes." optional = false python-versions = ">=3.8" files = [ - {file = "marshmallow-3.21.0-py3-none-any.whl", hash = "sha256:e7997f83571c7fd476042c2c188e4ee8a78900ca5e74bd9c8097afa56624e9bd"}, - {file = "marshmallow-3.21.0.tar.gz", hash = "sha256:20f53be28c6e374a711a16165fb22a8dc6003e3f7cda1285e3ca777b9193885b"}, + {file = "marshmallow-3.21.3-py3-none-any.whl", hash = "sha256:86ce7fb914aa865001a4b2092c4c2872d13bc347f3d42673272cabfdbad386f1"}, + {file = "marshmallow-3.21.3.tar.gz", hash = "sha256:4f57c5e050a54d66361e826f94fba213eb10b67b2fdb02c3e0343ce207ba1662"}, ] [package.dependencies] @@ -2590,18 +2715,18 @@ packaging = ">=17.0" [package.extras] dev = ["marshmallow[tests]", "pre-commit (>=3.5,<4.0)", "tox"] -docs = ["alabaster (==0.7.16)", "autodocsumm (==0.2.12)", "sphinx (==7.2.6)", "sphinx-issues (==4.0.0)", "sphinx-version-warning (==1.1.2)"] +docs = ["alabaster (==0.7.16)", "autodocsumm (==0.2.12)", "sphinx (==7.3.7)", "sphinx-issues (==4.1.0)", "sphinx-version-warning (==1.1.2)"] tests = ["pytest", "pytz", "simplejson"] [[package]] name = "matplotlib-inline" -version = "0.1.6" +version = "0.1.7" description = "Inline Matplotlib backend for Jupyter" optional = false -python-versions = ">=3.5" +python-versions = ">=3.8" files = [ - {file = "matplotlib-inline-0.1.6.tar.gz", hash = "sha256:f887e5f10ba98e8d2b150ddcf4702c1e5f8b3a20005eb0f74bfdbd360ee6f304"}, - {file = "matplotlib_inline-0.1.6-py3-none-any.whl", hash = "sha256:f1f41aab5328aa5aaea9b16d083b128102f8712542f819fe7e6a420ff581b311"}, + {file = "matplotlib_inline-0.1.7-py3-none-any.whl", hash = "sha256:df192d39a4ff8f21b1895d72e6a13f5fcc5099f00fa84384e0ea28c2cc0653ca"}, + {file = "matplotlib_inline-0.1.7.tar.gz", hash = "sha256:8423b23ec666be3d16e16b60bdd8ac4e86e840ebd1dd11a30b9f117f2fa0ab90"}, ] [package.dependencies] @@ -2609,63 +2734,81 @@ traitlets = "*" [[package]] name = "maxminddb" -version = "2.5.2" +version = "2.6.2" description = "Reader for the MaxMind DB format" optional = false python-versions = ">=3.8" files = [ - {file = "maxminddb-2.5.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:f5682963a5817066db50f219c33aaa7eb969888211a289a444c42b5dfa0c0f78"}, - {file = "maxminddb-2.5.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3fe6bb1b5ea132fcd9fd7b16c80247f0ba667018d5f9f98cd645b297e3b02fbf"}, - {file = "maxminddb-2.5.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:955a3ec4b161e872cc615b7a09ae9770049e9794e7b3832e3d78905a65c5049d"}, - {file = "maxminddb-2.5.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:29d63e7711e5f95c7c190010e57dca9e262aee8ac300aaf75c3f7ede0b5a5863"}, - {file = "maxminddb-2.5.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:08a540ec3661f6ca40499c86028e96dca5780e9d471b485dc797859b0b22dd22"}, - {file = "maxminddb-2.5.2-cp310-cp310-win32.whl", hash = "sha256:17fdb691c389a0e956410d5baef9ad082a0aa67dd6aa231d193499e71a104c19"}, - {file = "maxminddb-2.5.2-cp310-cp310-win_amd64.whl", hash = "sha256:d71b48d3dff9150a44e949b28fa5e7251a7a6895a3a77e200ce08410f096f12f"}, - {file = "maxminddb-2.5.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:1409a045eb04cebb297221eab1020c4f05434d02c0961410f6996ef474482998"}, - {file = "maxminddb-2.5.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d839c480e4b93bb37bb1cc2777d77e6b2127c006e60b56f748f10571d8b0e471"}, - {file = "maxminddb-2.5.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bca70905515fe50684974a9afaa7db4a4e9fbfdebcb0c2cde9db8e048e0d8145"}, - {file = "maxminddb-2.5.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:67f97cd0c6aac39a51294b04a1e922532125285c24b18a58e2a9c92c7691fa9f"}, - {file = "maxminddb-2.5.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:1a3fab6bea6cc59444e6bad2a4fbf91228f6f51dcb29d09ed091930a475bd8cb"}, - {file = "maxminddb-2.5.2-cp311-cp311-win32.whl", hash = "sha256:a99e3125528ea31e807f80e8c5b65118dc5cc122d0a435f1691a3cc1df55840c"}, - {file = "maxminddb-2.5.2-cp311-cp311-win_amd64.whl", hash = "sha256:b6adf63695fa5e3d2549f7c2c9d82c6d252edd5c6ba67074637d2cb944143673"}, - {file = "maxminddb-2.5.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:ed504ca9f3c42e8e71bdbe21f5b818139a1448ac15d7bb6ce12cf41e3b7e2067"}, - {file = "maxminddb-2.5.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5a5053231228d7cbf57d98a741b3cbee9efa9e689348dbb56c414e5a4c7f6f1c"}, - {file = "maxminddb-2.5.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e7e8688342bab592647313cd2054779bcd35ad85933424ceae9f07e3a9779986"}, - {file = "maxminddb-2.5.2-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:335ee3140b41d4e751c14f8fae297aa064c7d3f184c9fbb2790336123187c440"}, - {file = "maxminddb-2.5.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:b0203fa2731da45e5461f6e8a0768e85bba8e02137a1598b3fcadf7cbfe8e6f2"}, - {file = "maxminddb-2.5.2-cp312-cp312-win32.whl", hash = "sha256:8b89129de70e1629f200df9dfda4e4f477c26b05c29e0836604a00209c9466d5"}, - {file = "maxminddb-2.5.2-cp312-cp312-win_amd64.whl", hash = "sha256:099f4e27feec4bb9658034a3eb853e746721fc15709030bee4f2f889f4a34185"}, - {file = "maxminddb-2.5.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:19d8d1e9bbc5281fb4c8112d541d2bd350fd8b5ddfbb43a6951e46df7cd27b9d"}, - {file = "maxminddb-2.5.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:94183a78628cad257183a88ce12a3bb9ffbfe0544bd0c1aafc1f9dc55629dd1b"}, - {file = "maxminddb-2.5.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:17de49660372dcccaa23958eccdd1c2464f92f594d027045ad76788db14a5da4"}, - {file = "maxminddb-2.5.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:ae05c4f87b1dd9a21d430c52451eef5f3bd5af609d093408db91fe0dc4d8d7d1"}, - {file = "maxminddb-2.5.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:2cb718908b9dffa10e02361094158ae68ded5a82c750de89737437999a81bafe"}, - {file = "maxminddb-2.5.2-cp38-cp38-win32.whl", hash = "sha256:e0faa0c4c458eb0eb2f267daa7b106baef72c3c7ebcbece00b9e974fc8321412"}, - {file = "maxminddb-2.5.2-cp38-cp38-win_amd64.whl", hash = "sha256:bac5a29fdc5df9222f7baecbcc4a88b309a66a7d147b34160940c0850ee4b9c5"}, - {file = "maxminddb-2.5.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:c204f53ef7c1d77e9fb0dba415dbb56419f2b08ccaca66cd772e29b3a793c3e7"}, - {file = "maxminddb-2.5.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ae98508a200db6f7ae5985a53039aba8eef7ed71d34b0a0e9c9145c3e6139fc3"}, - {file = "maxminddb-2.5.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3e9198d25e252b27d4e9526d5fcd4b78341c23153363a94f1246de5afcd39f6d"}, - {file = "maxminddb-2.5.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:b85b008f8e2cf3abfabdc24041549c51c97ea9a8bc46eeeadac8cec7acf9fbf0"}, - {file = "maxminddb-2.5.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:6f50210506e9818162ef6706d3127efb0575dfe2cc98a7236ca2011f1cc3effe"}, - {file = "maxminddb-2.5.2-cp39-cp39-win32.whl", hash = "sha256:2bba43d370a57785f5ef61c10d0b4bf8de58d431da3c4c2ed78bb2ff3d07edbf"}, - {file = "maxminddb-2.5.2-cp39-cp39-win_amd64.whl", hash = "sha256:2e01b09480b97d2ebe6765618fb12a0f52caa17368d6cf1f42481d6740428de7"}, - {file = "maxminddb-2.5.2-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:dd47d13376eaee2e8d1a1fb55d3d6ccdcc995bc931699967f7d5670ec6a454a3"}, - {file = "maxminddb-2.5.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:abd626efaba4f0bc867462337f846796da0bb97b82125dbdbc63067947e353b0"}, - {file = "maxminddb-2.5.2-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3ddbe547d83a2e28e81d9f59fd9708d3044ffb2398ee0f8df2e2a2e9cdea6646"}, - {file = "maxminddb-2.5.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:22184fa2514c15f5b39e4e2522f4f73d00afcf5eb7102c473f9376f3c3a03b81"}, - {file = "maxminddb-2.5.2-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:5cb6702fbcc5b209ac3cffacd9cf0a5155feabbeb6fdcf497038be7cb6e52da6"}, - {file = "maxminddb-2.5.2-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c0c3ebfc0af00445089629faffa4c5a1fcc42a1ca5d7dffc42bba314fde20c6d"}, - {file = "maxminddb-2.5.2-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:461dcf0a4f67aa1c9faea6d52c4060d39559bf68e99a514cf8c1e01af383f90b"}, - {file = "maxminddb-2.5.2-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:e012e889639aab411f5483990188da51c968377f665dcb90584971dbf314d50a"}, - {file = "maxminddb-2.5.2-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:20596e452d03071db37a72c8ef9236126c04ed342864f68db0adf0d1bc9f642e"}, - {file = "maxminddb-2.5.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2ec51b66774b102824c9a3dd4916356283f6a61db1868d4ebcb98bf26486718e"}, - {file = "maxminddb-2.5.2-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6fda0dd512f345cc92492f96c61a0df47efc2e2064c15e8053ab2114b362d64d"}, - {file = "maxminddb-2.5.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:862fcfe226ebda29a537cdce678dc8dc71ca6540ad2483099f80c6a1ee4cdbdd"}, - {file = "maxminddb-2.5.2.tar.gz", hash = "sha256:b3c33e4fc7821ee6c9f40837116e16ab6175863d4a64eee024c5bec686690a87"}, -] - -[package.dependencies] -setuptools = ">=68.2.2" + {file = "maxminddb-2.6.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:7cfdf5c29a2739610700b9fea7f8d68ce81dcf30bb8016f1a1853ef889a2624b"}, + {file = "maxminddb-2.6.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:05e873eb82281cef6e787bd40bd1d58b2e496a21b3689346f0d0420988b3cbb1"}, + {file = "maxminddb-2.6.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e2b85ffc9fb2e192321c2f0b34d0b291b8e82de6e51a6ec7534645663678e835"}, + {file = "maxminddb-2.6.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:28a2eaf9769262c05c486e777016771f3367c843b053c43cd5fde1108755753d"}, + {file = "maxminddb-2.6.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:96a1fa38322bce1d587bb6ce39a0e6ca4c1b824f48fbc5739a5ec507f63aa889"}, + {file = "maxminddb-2.6.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:eb534333f5fd7180e35c0207b3d95d621e4b9be3b8c1709995d0feb6c752b6f4"}, + {file = "maxminddb-2.6.2-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:0b281c0eec3601dde1f169a1c04e2615751c66368141aded9f03131fe635450b"}, + {file = "maxminddb-2.6.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:a771df92e599ad867c16ae4acb08cc3763c9d1028f4ca772c0571da97f7f86d2"}, + {file = "maxminddb-2.6.2-cp310-cp310-win32.whl", hash = "sha256:f412a54f87ef9083911c334267188d3d1b14f2591eac94b94ca32528f21d5f25"}, + {file = "maxminddb-2.6.2-cp310-cp310-win_amd64.whl", hash = "sha256:7e5a90a1cb0c7fd6226aa44e18a87b26fa85b6eebae36d529d7582f93e8dfbd1"}, + {file = "maxminddb-2.6.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:38941a38278491bf95e5ca544969782c7ab33326802f6a93816867289c3f6401"}, + {file = "maxminddb-2.6.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:eef1c26210155c7b94c4ca28fef65eb44a5ca1584427b1fbdeec1cd3c81e25c5"}, + {file = "maxminddb-2.6.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b4d9cd7ddd02ee123a44d0d7821166d31540ea85352deb06b29d55e802f32781"}, + {file = "maxminddb-2.6.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8101291e5b92bd272a050c25822a5e30860d453dde16b4fffed9d751f0483a82"}, + {file = "maxminddb-2.6.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5c7c520d06d335b288d06a00b786cea9b7e023bd588efb1a6ef485e94ccc7244"}, + {file = "maxminddb-2.6.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:58bfd2c55c96aaaa7c4996c704edabfb1bd369dfc1592cedf8957a24062178b1"}, + {file = "maxminddb-2.6.2-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:886af3ba4aa26214ff39214565f53152b62a5abdb6ef9e00c76c194dbfd79231"}, + {file = "maxminddb-2.6.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:93691c8b4b4c448babb37bedc6f3d51523a3f06ab11bdd171da7ffc4005a7897"}, + {file = "maxminddb-2.6.2-cp311-cp311-win32.whl", hash = "sha256:e9013076deca5d136c260510cd05e82ec2b4ddb9476d63e2180a13ddfd305c3e"}, + {file = "maxminddb-2.6.2-cp311-cp311-win_amd64.whl", hash = "sha256:47170ec0e1e76787cc5882301c487f495d67f3146318f2f4e2adc281951a96ef"}, + {file = "maxminddb-2.6.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:eacd65e38bdf4efdf42bbc15cfa734b09eb818ecfef76b7b36e64be382be4c83"}, + {file = "maxminddb-2.6.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:20662878bc9514e90b0b4c4eb1a76622ecc7504d012e76bad9cdb7372fc0ef96"}, + {file = "maxminddb-2.6.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7607e45f7eca991fa34d57c03a791a1dfbe774ddd9250d0f35cdcc6f17142a15"}, + {file = "maxminddb-2.6.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d0970b661c4fac6624b9128057ed5fe35a2d95aa60359272289cd4c7207c9a6d"}, + {file = "maxminddb-2.6.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:12207f0becf3f2bf14e7a4bf86efcaa6e90d665a918915ae228c4e77792d7151"}, + {file = "maxminddb-2.6.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:826a1858b93b193df7fa71e3caca65c3051db20545df0020444f55c02e8ed2c3"}, + {file = "maxminddb-2.6.2-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:e63649a82926f1d93acdd3df5f7be66dc9473653350afe73f365bb25e5b34368"}, + {file = "maxminddb-2.6.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ebf9fdf8a8e55862aabb8b2c34a4af31a8a5b686007288eeb561fa20ef348378"}, + {file = "maxminddb-2.6.2-cp312-cp312-win32.whl", hash = "sha256:2aaefb62f881151960bb67e5aeb302c159a32bd2d623cf72dad688bda1020869"}, + {file = "maxminddb-2.6.2-cp312-cp312-win_amd64.whl", hash = "sha256:78c3aa70c62be68ace23f819e7f23258545f2bfbd92cd6c33ee398cd261f6b84"}, + {file = "maxminddb-2.6.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:e1e40449bd278fdca1f351df442f391e72fd3d98b054ccac1672f27d70210642"}, + {file = "maxminddb-2.6.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:80d7f943f6b8bc437eaae5da778a83d8f38e4b7463756fdee04833e1be0bdea2"}, + {file = "maxminddb-2.6.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:058ca89789bc1770fe58d02a88272ca91dabeef9f3fe0011fe506484355f1804"}, + {file = "maxminddb-2.6.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:80d20683afe01b4d41bad1c1829f87ab12f3d19c68ec230f83318a2fd13871a7"}, + {file = "maxminddb-2.6.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:dd90c3798e6c347d48d5d9a9c95dc678b52a5a965f1fb72152067fdf52b994da"}, + {file = "maxminddb-2.6.2-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:add1e55620033516c5f0734b1d9d03848859192d9f3825aabe720dfa8a783958"}, + {file = "maxminddb-2.6.2-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:8cb992da535264177b380e7b81943c884d57dcbfad6b3335d7f633967144746e"}, + {file = "maxminddb-2.6.2-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:86048ff328793599e584bcc2fc8278c2b7c5d3a4005c70403613449ec93817ef"}, + {file = "maxminddb-2.6.2-cp38-cp38-win32.whl", hash = "sha256:f2e326a99eaa924ff2fb09d6e44127983a43016228e7780888f15e9ba171d7b3"}, + {file = "maxminddb-2.6.2-cp38-cp38-win_amd64.whl", hash = "sha256:9a2671e8f4161130803cf226cd9cb8b93ec5c4b2493f83a902986177052d95d3"}, + {file = "maxminddb-2.6.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6a50bc348c699d8f6a5f0aa35e5096515d642ca2f38b944bd71c3dedda3d3588"}, + {file = "maxminddb-2.6.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:dc9f1203eb2b139252aa08965960fe13c36cc8b80b536490b94b05c31aa1fca9"}, + {file = "maxminddb-2.6.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d8ccca5327cb4e706f669456ec6d556badfa92c0fdacd57a15076f3cdc061560"}, + {file = "maxminddb-2.6.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3987e103396e925edebbef4877e94515822f63b3b436027a0b164b500622fccd"}, + {file = "maxminddb-2.6.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b31ecf3083b78c77624783bfdf6177e6ac73ae14684ef182855eb5569bc78e7c"}, + {file = "maxminddb-2.6.2-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:cd4530b9604d66cfa5e37eb94c671e54feff87769f8ba7fa997cce959e0cb241"}, + {file = "maxminddb-2.6.2-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:ecce0b2d125691e2311f94dbd564c2d61c36c5033d082919431a21e6c694fa3f"}, + {file = "maxminddb-2.6.2-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:34b6e8d667d724f60d52635f3d959f793ab4e5d57d78b27fe66f02752d8c6b08"}, + {file = "maxminddb-2.6.2-cp39-cp39-win32.whl", hash = "sha256:d15414d251513748cb646d284a2829a5f4c69d8c90963a6e6da53a1a6d0accf7"}, + {file = "maxminddb-2.6.2-cp39-cp39-win_amd64.whl", hash = "sha256:7c1220838ba9b0bcdaa0c5846f9da70a2304df2ac255fe518370f8faf8c18316"}, + {file = "maxminddb-2.6.2-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:39eab93ddd75fd02f8d5ad6b1bd3f8d894828d91d6f6c1a96bb9e87c34e94aaa"}, + {file = "maxminddb-2.6.2-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:aa8cb54b01a29a23a0ea6659fbb38deec6f35453588c5decdbf8669feb53b624"}, + {file = "maxminddb-2.6.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1c096dfd20926c4de7d7fd5b5e75c756eddd4bdac5ab7aafd4bb67d000b13743"}, + {file = "maxminddb-2.6.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1dc2b511c7255f7cbbb01e8ba01ba82e62e9c1213e382d36f9d9b0ee45c2f6b2"}, + {file = "maxminddb-2.6.2-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:80d7495565d30260c630afbe74d61522b13dd31ed05b8916003ec5b127109a12"}, + {file = "maxminddb-2.6.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:9dccd7a438f81e3df84dfc31a75af4c8d29adefb6082329385bfde604c9ea01b"}, + {file = "maxminddb-2.6.2-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:b0a3b9cab1a94cc633df3da85c6567f0188f10165e3338ec9a6c421de9fe53b9"}, + {file = "maxminddb-2.6.2-pp38-pypy38_pp73-macosx_11_0_arm64.whl", hash = "sha256:fb38aa94e76a87785b654c035f9f3ee39b74a98e9beea9a10b1aa62abdcc4cbd"}, + {file = "maxminddb-2.6.2-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c9e9e893f7c0fa44cfdd5ab819a07d93f63ee398c28b792cedd50b94dcfea7c0"}, + {file = "maxminddb-2.6.2-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:28af9470f28fce2ccb945478235f53fb52d98a505653b1bf4028e34df6149a06"}, + {file = "maxminddb-2.6.2-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a74b60cdc61a69b967ec44201c6259fbc48ef2eab2e885fbdc50ec1accaad545"}, + {file = "maxminddb-2.6.2-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:485c0778f6801e1437c2efd6e3b964a7ae71c8819f063e0b5460c3267d977040"}, + {file = "maxminddb-2.6.2-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:0b480a31589750da4e36d1ba04b77ee3ac3853ac7b94d63f337b9d4d0403043f"}, + {file = "maxminddb-2.6.2-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:85fc9406f42c1311ce8ea9f2c820db5d7ac687a39ab5d932708dc783607378ef"}, + {file = "maxminddb-2.6.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6fd1a612110ff182a559d8010e7615e5d05ef9d2c234b5f7de124ee8fdf1ecb9"}, + {file = "maxminddb-2.6.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7cd7f525eb2331cf05181c5ba562cc3edec3de4b41dbb18a5fee9ad24884b499"}, + {file = "maxminddb-2.6.2-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d32266792b349f5507b0369d3277d45318fcd346a16dcc98b484aadc208e4d74"}, + {file = "maxminddb-2.6.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:5662386db91872d5505fde9e7bb0b9530b6aab7a6f3ece7df59a2b43a7b45d17"}, + {file = "maxminddb-2.6.2.tar.gz", hash = "sha256:7d842d32e2620abc894b7d79a5a1007a69df2c6cf279a06b94c9c3913f66f264"}, +] [[package]] name = "maxminddb-geolite2" @@ -2698,85 +2841,80 @@ test = ["pytest", "pytest-cov"] [[package]] name = "msgpack" -version = "1.0.7" +version = "1.0.8" description = "MessagePack serializer" optional = false python-versions = ">=3.8" files = [ - {file = "msgpack-1.0.7-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:04ad6069c86e531682f9e1e71b71c1c3937d6014a7c3e9edd2aa81ad58842862"}, - {file = "msgpack-1.0.7-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:cca1b62fe70d761a282496b96a5e51c44c213e410a964bdffe0928e611368329"}, - {file = "msgpack-1.0.7-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e50ebce52f41370707f1e21a59514e3375e3edd6e1832f5e5235237db933c98b"}, - {file = "msgpack-1.0.7-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4a7b4f35de6a304b5533c238bee86b670b75b03d31b7797929caa7a624b5dda6"}, - {file = "msgpack-1.0.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:28efb066cde83c479dfe5a48141a53bc7e5f13f785b92ddde336c716663039ee"}, - {file = "msgpack-1.0.7-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4cb14ce54d9b857be9591ac364cb08dc2d6a5c4318c1182cb1d02274029d590d"}, - {file = "msgpack-1.0.7-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:b573a43ef7c368ba4ea06050a957c2a7550f729c31f11dd616d2ac4aba99888d"}, - {file = "msgpack-1.0.7-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:ccf9a39706b604d884d2cb1e27fe973bc55f2890c52f38df742bc1d79ab9f5e1"}, - {file = "msgpack-1.0.7-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:cb70766519500281815dfd7a87d3a178acf7ce95390544b8c90587d76b227681"}, - {file = "msgpack-1.0.7-cp310-cp310-win32.whl", hash = "sha256:b610ff0f24e9f11c9ae653c67ff8cc03c075131401b3e5ef4b82570d1728f8a9"}, - {file = "msgpack-1.0.7-cp310-cp310-win_amd64.whl", hash = "sha256:a40821a89dc373d6427e2b44b572efc36a2778d3f543299e2f24eb1a5de65415"}, - {file = "msgpack-1.0.7-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:576eb384292b139821c41995523654ad82d1916da6a60cff129c715a6223ea84"}, - {file = "msgpack-1.0.7-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:730076207cb816138cf1af7f7237b208340a2c5e749707457d70705715c93b93"}, - {file = "msgpack-1.0.7-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:85765fdf4b27eb5086f05ac0491090fc76f4f2b28e09d9350c31aac25a5aaff8"}, - {file = "msgpack-1.0.7-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3476fae43db72bd11f29a5147ae2f3cb22e2f1a91d575ef130d2bf49afd21c46"}, - {file = "msgpack-1.0.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6d4c80667de2e36970ebf74f42d1088cc9ee7ef5f4e8c35eee1b40eafd33ca5b"}, - {file = "msgpack-1.0.7-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5b0bf0effb196ed76b7ad883848143427a73c355ae8e569fa538365064188b8e"}, - {file = "msgpack-1.0.7-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:f9a7c509542db4eceed3dcf21ee5267ab565a83555c9b88a8109dcecc4709002"}, - {file = "msgpack-1.0.7-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:84b0daf226913133f899ea9b30618722d45feffa67e4fe867b0b5ae83a34060c"}, - {file = "msgpack-1.0.7-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:ec79ff6159dffcc30853b2ad612ed572af86c92b5168aa3fc01a67b0fa40665e"}, - {file = "msgpack-1.0.7-cp311-cp311-win32.whl", hash = "sha256:3e7bf4442b310ff154b7bb9d81eb2c016b7d597e364f97d72b1acc3817a0fdc1"}, - {file = "msgpack-1.0.7-cp311-cp311-win_amd64.whl", hash = "sha256:3f0c8c6dfa6605ab8ff0611995ee30d4f9fcff89966cf562733b4008a3d60d82"}, - {file = "msgpack-1.0.7-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:f0936e08e0003f66bfd97e74ee530427707297b0d0361247e9b4f59ab78ddc8b"}, - {file = "msgpack-1.0.7-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:98bbd754a422a0b123c66a4c341de0474cad4a5c10c164ceed6ea090f3563db4"}, - {file = "msgpack-1.0.7-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:b291f0ee7961a597cbbcc77709374087fa2a9afe7bdb6a40dbbd9b127e79afee"}, - {file = "msgpack-1.0.7-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ebbbba226f0a108a7366bf4b59bf0f30a12fd5e75100c630267d94d7f0ad20e5"}, - {file = "msgpack-1.0.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1e2d69948e4132813b8d1131f29f9101bc2c915f26089a6d632001a5c1349672"}, - {file = "msgpack-1.0.7-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bdf38ba2d393c7911ae989c3bbba510ebbcdf4ecbdbfec36272abe350c454075"}, - {file = "msgpack-1.0.7-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:993584fc821c58d5993521bfdcd31a4adf025c7d745bbd4d12ccfecf695af5ba"}, - {file = "msgpack-1.0.7-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:52700dc63a4676669b341ba33520f4d6e43d3ca58d422e22ba66d1736b0a6e4c"}, - {file = "msgpack-1.0.7-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:e45ae4927759289c30ccba8d9fdce62bb414977ba158286b5ddaf8df2cddb5c5"}, - {file = "msgpack-1.0.7-cp312-cp312-win32.whl", hash = "sha256:27dcd6f46a21c18fa5e5deed92a43d4554e3df8d8ca5a47bf0615d6a5f39dbc9"}, - {file = "msgpack-1.0.7-cp312-cp312-win_amd64.whl", hash = "sha256:7687e22a31e976a0e7fc99c2f4d11ca45eff652a81eb8c8085e9609298916dcf"}, - {file = "msgpack-1.0.7-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:5b6ccc0c85916998d788b295765ea0e9cb9aac7e4a8ed71d12e7d8ac31c23c95"}, - {file = "msgpack-1.0.7-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:235a31ec7db685f5c82233bddf9858748b89b8119bf4538d514536c485c15fe0"}, - {file = "msgpack-1.0.7-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:cab3db8bab4b7e635c1c97270d7a4b2a90c070b33cbc00c99ef3f9be03d3e1f7"}, - {file = "msgpack-1.0.7-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0bfdd914e55e0d2c9e1526de210f6fe8ffe9705f2b1dfcc4aecc92a4cb4b533d"}, - {file = "msgpack-1.0.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:36e17c4592231a7dbd2ed09027823ab295d2791b3b1efb2aee874b10548b7524"}, - {file = "msgpack-1.0.7-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:38949d30b11ae5f95c3c91917ee7a6b239f5ec276f271f28638dec9156f82cfc"}, - {file = "msgpack-1.0.7-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:ff1d0899f104f3921d94579a5638847f783c9b04f2d5f229392ca77fba5b82fc"}, - {file = "msgpack-1.0.7-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:dc43f1ec66eb8440567186ae2f8c447d91e0372d793dfe8c222aec857b81a8cf"}, - {file = "msgpack-1.0.7-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:dd632777ff3beaaf629f1ab4396caf7ba0bdd075d948a69460d13d44357aca4c"}, - {file = "msgpack-1.0.7-cp38-cp38-win32.whl", hash = "sha256:4e71bc4416de195d6e9b4ee93ad3f2f6b2ce11d042b4d7a7ee00bbe0358bd0c2"}, - {file = "msgpack-1.0.7-cp38-cp38-win_amd64.whl", hash = "sha256:8f5b234f567cf76ee489502ceb7165c2a5cecec081db2b37e35332b537f8157c"}, - {file = "msgpack-1.0.7-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:bfef2bb6ef068827bbd021017a107194956918ab43ce4d6dc945ffa13efbc25f"}, - {file = "msgpack-1.0.7-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:484ae3240666ad34cfa31eea7b8c6cd2f1fdaae21d73ce2974211df099a95d81"}, - {file = "msgpack-1.0.7-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:3967e4ad1aa9da62fd53e346ed17d7b2e922cba5ab93bdd46febcac39be636fc"}, - {file = "msgpack-1.0.7-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8dd178c4c80706546702c59529ffc005681bd6dc2ea234c450661b205445a34d"}, - {file = "msgpack-1.0.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f6ffbc252eb0d229aeb2f9ad051200668fc3a9aaa8994e49f0cb2ffe2b7867e7"}, - {file = "msgpack-1.0.7-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:822ea70dc4018c7e6223f13affd1c5c30c0f5c12ac1f96cd8e9949acddb48a61"}, - {file = "msgpack-1.0.7-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:384d779f0d6f1b110eae74cb0659d9aa6ff35aaf547b3955abf2ab4c901c4819"}, - {file = "msgpack-1.0.7-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:f64e376cd20d3f030190e8c32e1c64582eba56ac6dc7d5b0b49a9d44021b52fd"}, - {file = "msgpack-1.0.7-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5ed82f5a7af3697b1c4786053736f24a0efd0a1b8a130d4c7bfee4b9ded0f08f"}, - {file = "msgpack-1.0.7-cp39-cp39-win32.whl", hash = "sha256:f26a07a6e877c76a88e3cecac8531908d980d3d5067ff69213653649ec0f60ad"}, - {file = "msgpack-1.0.7-cp39-cp39-win_amd64.whl", hash = "sha256:1dc93e8e4653bdb5910aed79f11e165c85732067614f180f70534f056da97db3"}, - {file = "msgpack-1.0.7.tar.gz", hash = "sha256:572efc93db7a4d27e404501975ca6d2d9775705c2d922390d878fcf768d92c87"}, -] - -[[package]] -name = "node-semver" -version = "0.1.1" -description = "port of node-semver" + {file = "msgpack-1.0.8-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:505fe3d03856ac7d215dbe005414bc28505d26f0c128906037e66d98c4e95868"}, + {file = "msgpack-1.0.8-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e6b7842518a63a9f17107eb176320960ec095a8ee3b4420b5f688e24bf50c53c"}, + {file = "msgpack-1.0.8-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:376081f471a2ef24828b83a641a02c575d6103a3ad7fd7dade5486cad10ea659"}, + {file = "msgpack-1.0.8-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5e390971d082dba073c05dbd56322427d3280b7cc8b53484c9377adfbae67dc2"}, + {file = "msgpack-1.0.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:00e073efcba9ea99db5acef3959efa45b52bc67b61b00823d2a1a6944bf45982"}, + {file = "msgpack-1.0.8-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:82d92c773fbc6942a7a8b520d22c11cfc8fd83bba86116bfcf962c2f5c2ecdaa"}, + {file = "msgpack-1.0.8-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:9ee32dcb8e531adae1f1ca568822e9b3a738369b3b686d1477cbc643c4a9c128"}, + {file = "msgpack-1.0.8-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:e3aa7e51d738e0ec0afbed661261513b38b3014754c9459508399baf14ae0c9d"}, + {file = "msgpack-1.0.8-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:69284049d07fce531c17404fcba2bb1df472bc2dcdac642ae71a2d079d950653"}, + {file = "msgpack-1.0.8-cp310-cp310-win32.whl", hash = "sha256:13577ec9e247f8741c84d06b9ece5f654920d8365a4b636ce0e44f15e07ec693"}, + {file = "msgpack-1.0.8-cp310-cp310-win_amd64.whl", hash = "sha256:e532dbd6ddfe13946de050d7474e3f5fb6ec774fbb1a188aaf469b08cf04189a"}, + {file = "msgpack-1.0.8-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:9517004e21664f2b5a5fd6333b0731b9cf0817403a941b393d89a2f1dc2bd836"}, + {file = "msgpack-1.0.8-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:d16a786905034e7e34098634b184a7d81f91d4c3d246edc6bd7aefb2fd8ea6ad"}, + {file = "msgpack-1.0.8-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e2872993e209f7ed04d963e4b4fbae72d034844ec66bc4ca403329db2074377b"}, + {file = "msgpack-1.0.8-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5c330eace3dd100bdb54b5653b966de7f51c26ec4a7d4e87132d9b4f738220ba"}, + {file = "msgpack-1.0.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:83b5c044f3eff2a6534768ccfd50425939e7a8b5cf9a7261c385de1e20dcfc85"}, + {file = "msgpack-1.0.8-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1876b0b653a808fcd50123b953af170c535027bf1d053b59790eebb0aeb38950"}, + {file = "msgpack-1.0.8-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:dfe1f0f0ed5785c187144c46a292b8c34c1295c01da12e10ccddfc16def4448a"}, + {file = "msgpack-1.0.8-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:3528807cbbb7f315bb81959d5961855e7ba52aa60a3097151cb21956fbc7502b"}, + {file = "msgpack-1.0.8-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:e2f879ab92ce502a1e65fce390eab619774dda6a6ff719718069ac94084098ce"}, + {file = "msgpack-1.0.8-cp311-cp311-win32.whl", hash = "sha256:26ee97a8261e6e35885c2ecd2fd4a6d38252246f94a2aec23665a4e66d066305"}, + {file = "msgpack-1.0.8-cp311-cp311-win_amd64.whl", hash = "sha256:eadb9f826c138e6cf3c49d6f8de88225a3c0ab181a9b4ba792e006e5292d150e"}, + {file = "msgpack-1.0.8-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:114be227f5213ef8b215c22dde19532f5da9652e56e8ce969bf0a26d7c419fee"}, + {file = "msgpack-1.0.8-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:d661dc4785affa9d0edfdd1e59ec056a58b3dbb9f196fa43587f3ddac654ac7b"}, + {file = "msgpack-1.0.8-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:d56fd9f1f1cdc8227d7b7918f55091349741904d9520c65f0139a9755952c9e8"}, + {file = "msgpack-1.0.8-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0726c282d188e204281ebd8de31724b7d749adebc086873a59efb8cf7ae27df3"}, + {file = "msgpack-1.0.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8db8e423192303ed77cff4dce3a4b88dbfaf43979d280181558af5e2c3c71afc"}, + {file = "msgpack-1.0.8-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:99881222f4a8c2f641f25703963a5cefb076adffd959e0558dc9f803a52d6a58"}, + {file = "msgpack-1.0.8-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:b5505774ea2a73a86ea176e8a9a4a7c8bf5d521050f0f6f8426afe798689243f"}, + {file = "msgpack-1.0.8-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:ef254a06bcea461e65ff0373d8a0dd1ed3aa004af48839f002a0c994a6f72d04"}, + {file = "msgpack-1.0.8-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:e1dd7839443592d00e96db831eddb4111a2a81a46b028f0facd60a09ebbdd543"}, + {file = "msgpack-1.0.8-cp312-cp312-win32.whl", hash = "sha256:64d0fcd436c5683fdd7c907eeae5e2cbb5eb872fafbc03a43609d7941840995c"}, + {file = "msgpack-1.0.8-cp312-cp312-win_amd64.whl", hash = "sha256:74398a4cf19de42e1498368c36eed45d9528f5fd0155241e82c4082b7e16cffd"}, + {file = "msgpack-1.0.8-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:0ceea77719d45c839fd73abcb190b8390412a890df2f83fb8cf49b2a4b5c2f40"}, + {file = "msgpack-1.0.8-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1ab0bbcd4d1f7b6991ee7c753655b481c50084294218de69365f8f1970d4c151"}, + {file = "msgpack-1.0.8-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:1cce488457370ffd1f953846f82323cb6b2ad2190987cd4d70b2713e17268d24"}, + {file = "msgpack-1.0.8-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3923a1778f7e5ef31865893fdca12a8d7dc03a44b33e2a5f3295416314c09f5d"}, + {file = "msgpack-1.0.8-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a22e47578b30a3e199ab067a4d43d790249b3c0587d9a771921f86250c8435db"}, + {file = "msgpack-1.0.8-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bd739c9251d01e0279ce729e37b39d49a08c0420d3fee7f2a4968c0576678f77"}, + {file = "msgpack-1.0.8-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:d3420522057ebab1728b21ad473aa950026d07cb09da41103f8e597dfbfaeb13"}, + {file = "msgpack-1.0.8-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:5845fdf5e5d5b78a49b826fcdc0eb2e2aa7191980e3d2cfd2a30303a74f212e2"}, + {file = "msgpack-1.0.8-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:6a0e76621f6e1f908ae52860bdcb58e1ca85231a9b0545e64509c931dd34275a"}, + {file = "msgpack-1.0.8-cp38-cp38-win32.whl", hash = "sha256:374a8e88ddab84b9ada695d255679fb99c53513c0a51778796fcf0944d6c789c"}, + {file = "msgpack-1.0.8-cp38-cp38-win_amd64.whl", hash = "sha256:f3709997b228685fe53e8c433e2df9f0cdb5f4542bd5114ed17ac3c0129b0480"}, + {file = "msgpack-1.0.8-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:f51bab98d52739c50c56658cc303f190785f9a2cd97b823357e7aeae54c8f68a"}, + {file = "msgpack-1.0.8-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:73ee792784d48aa338bba28063e19a27e8d989344f34aad14ea6e1b9bd83f596"}, + {file = "msgpack-1.0.8-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:f9904e24646570539a8950400602d66d2b2c492b9010ea7e965025cb71d0c86d"}, + {file = "msgpack-1.0.8-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e75753aeda0ddc4c28dce4c32ba2f6ec30b1b02f6c0b14e547841ba5b24f753f"}, + {file = "msgpack-1.0.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5dbf059fb4b7c240c873c1245ee112505be27497e90f7c6591261c7d3c3a8228"}, + {file = "msgpack-1.0.8-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4916727e31c28be8beaf11cf117d6f6f188dcc36daae4e851fee88646f5b6b18"}, + {file = "msgpack-1.0.8-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:7938111ed1358f536daf311be244f34df7bf3cdedb3ed883787aca97778b28d8"}, + {file = "msgpack-1.0.8-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:493c5c5e44b06d6c9268ce21b302c9ca055c1fd3484c25ba41d34476c76ee746"}, + {file = "msgpack-1.0.8-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5fbb160554e319f7b22ecf530a80a3ff496d38e8e07ae763b9e82fadfe96f273"}, + {file = "msgpack-1.0.8-cp39-cp39-win32.whl", hash = "sha256:f9af38a89b6a5c04b7d18c492c8ccf2aee7048aff1ce8437c4683bb5a1df893d"}, + {file = "msgpack-1.0.8-cp39-cp39-win_amd64.whl", hash = "sha256:ed59dd52075f8fc91da6053b12e8c89e37aa043f8986efd89e61fae69dc1b011"}, + {file = "msgpack-1.0.8.tar.gz", hash = "sha256:95c02b0e27e706e48d0e5426d1710ca78e0f0628d6e89d5b5a5b91a5f12274f3"}, +] + +[[package]] +name = "mypy-extensions" +version = "1.0.0" +description = "Type system extensions for programs checked with the mypy type checker." optional = false -python-versions = "*" +python-versions = ">=3.5" files = [ - {file = "node-semver-0.1.1.tar.gz", hash = "sha256:e29ee4e51efb6d82c55aef5d569b888842e62e6404ce95df18d80c421f8e7dac"}, + {file = "mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d"}, + {file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"}, ] -[package.dependencies] -setuptools = "*" - -[package.extras] -testing = ["pytest"] - [[package]] name = "oauthlib" version = "2.1.0" @@ -2794,6 +2932,20 @@ signals = ["blinker"] signedtoken = ["cryptography", "pyjwt (>=1.0.0)"] test = ["blinker", "cryptography", "mock", "nose", "pyjwt (>=1.0.0)", "unittest2"] +[[package]] +name = "ordered-set" +version = "4.1.0" +description = "An OrderedSet is a custom MutableSet that remembers its order, so that every" +optional = false +python-versions = ">=3.7" +files = [ + {file = "ordered-set-4.1.0.tar.gz", hash = "sha256:694a8e44c87657c59292ede72891eb91d34131f6531463aab3009191c77364a8"}, + {file = "ordered_set-4.1.0-py3-none-any.whl", hash = "sha256:046e1132c71fcf3330438a539928932caf51ddbc582496833e23de611de14562"}, +] + +[package.extras] +dev = ["black", "mypy", "pytest"] + [[package]] name = "packaging" version = "21.3" @@ -2810,18 +2962,18 @@ pyparsing = ">=2.0.2,<3.0.5 || >3.0.5" [[package]] name = "parso" -version = "0.8.3" +version = "0.8.4" description = "A Python Parser" optional = false python-versions = ">=3.6" files = [ - {file = "parso-0.8.3-py2.py3-none-any.whl", hash = "sha256:c001d4636cd3aecdaf33cbb40aebb59b094be2a74c556778ef5576c175e19e75"}, - {file = "parso-0.8.3.tar.gz", hash = "sha256:8c07be290bb59f03588915921e29e8a50002acaf2cdc5fa0e0114f91709fafa0"}, + {file = "parso-0.8.4-py2.py3-none-any.whl", hash = "sha256:a418670a20291dacd2dddc80c377c5c3791378ee1e8d12bffc35420643d43f18"}, + {file = "parso-0.8.4.tar.gz", hash = "sha256:eb3a7b58240fb99099a345571deecc0f9540ea5f4dd2fe14c2a99d6b281ab92d"}, ] [package.extras] -qa = ["flake8 (==3.8.3)", "mypy (==0.782)"] -testing = ["docopt", "pytest (<6.0.0)"] +qa = ["flake8 (==5.0.4)", "mypy (==0.971)", "types-setuptools (==67.2.0.1)"] +testing = ["docopt", "pytest"] [[package]] name = "passlib" @@ -2851,6 +3003,17 @@ files = [ {file = "pastel-0.2.1.tar.gz", hash = "sha256:e6581ac04e973cac858828c6202c1e1e81fee1dc7de7683f3e1ffe0bfd8a573d"}, ] +[[package]] +name = "pathspec" +version = "0.12.1" +description = "Utility library for gitignore style pattern matching of file paths." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pathspec-0.12.1-py3-none-any.whl", hash = "sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08"}, + {file = "pathspec-0.12.1.tar.gz", hash = "sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712"}, +] + [[package]] name = "pexpect" version = "4.9.0" @@ -2867,79 +3030,80 @@ ptyprocess = ">=0.5" [[package]] name = "pillow" -version = "10.2.0" +version = "10.3.0" description = "Python Imaging Library (Fork)" optional = false python-versions = ">=3.8" files = [ - {file = "pillow-10.2.0-cp310-cp310-macosx_10_10_x86_64.whl", hash = "sha256:7823bdd049099efa16e4246bdf15e5a13dbb18a51b68fa06d6c1d4d8b99a796e"}, - {file = "pillow-10.2.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:83b2021f2ade7d1ed556bc50a399127d7fb245e725aa0113ebd05cfe88aaf588"}, - {file = "pillow-10.2.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6fad5ff2f13d69b7e74ce5b4ecd12cc0ec530fcee76356cac6742785ff71c452"}, - {file = "pillow-10.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:da2b52b37dad6d9ec64e653637a096905b258d2fc2b984c41ae7d08b938a67e4"}, - {file = "pillow-10.2.0-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:47c0995fc4e7f79b5cfcab1fc437ff2890b770440f7696a3ba065ee0fd496563"}, - {file = "pillow-10.2.0-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:322bdf3c9b556e9ffb18f93462e5f749d3444ce081290352c6070d014c93feb2"}, - {file = "pillow-10.2.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:51f1a1bffc50e2e9492e87d8e09a17c5eea8409cda8d3f277eb6edc82813c17c"}, - {file = "pillow-10.2.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:69ffdd6120a4737710a9eee73e1d2e37db89b620f702754b8f6e62594471dee0"}, - {file = "pillow-10.2.0-cp310-cp310-win32.whl", hash = "sha256:c6dafac9e0f2b3c78df97e79af707cdc5ef8e88208d686a4847bab8266870023"}, - {file = "pillow-10.2.0-cp310-cp310-win_amd64.whl", hash = "sha256:aebb6044806f2e16ecc07b2a2637ee1ef67a11840a66752751714a0d924adf72"}, - {file = "pillow-10.2.0-cp310-cp310-win_arm64.whl", hash = "sha256:7049e301399273a0136ff39b84c3678e314f2158f50f517bc50285fb5ec847ad"}, - {file = "pillow-10.2.0-cp311-cp311-macosx_10_10_x86_64.whl", hash = "sha256:35bb52c37f256f662abdfa49d2dfa6ce5d93281d323a9af377a120e89a9eafb5"}, - {file = "pillow-10.2.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:9c23f307202661071d94b5e384e1e1dc7dfb972a28a2310e4ee16103e66ddb67"}, - {file = "pillow-10.2.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:773efe0603db30c281521a7c0214cad7836c03b8ccff897beae9b47c0b657d61"}, - {file = "pillow-10.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:11fa2e5984b949b0dd6d7a94d967743d87c577ff0b83392f17cb3990d0d2fd6e"}, - {file = "pillow-10.2.0-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:716d30ed977be8b37d3ef185fecb9e5a1d62d110dfbdcd1e2a122ab46fddb03f"}, - {file = "pillow-10.2.0-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:a086c2af425c5f62a65e12fbf385f7c9fcb8f107d0849dba5839461a129cf311"}, - {file = "pillow-10.2.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:c8de2789052ed501dd829e9cae8d3dcce7acb4777ea4a479c14521c942d395b1"}, - {file = "pillow-10.2.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:609448742444d9290fd687940ac0b57fb35e6fd92bdb65386e08e99af60bf757"}, - {file = "pillow-10.2.0-cp311-cp311-win32.whl", hash = "sha256:823ef7a27cf86df6597fa0671066c1b596f69eba53efa3d1e1cb8b30f3533068"}, - {file = "pillow-10.2.0-cp311-cp311-win_amd64.whl", hash = "sha256:1da3b2703afd040cf65ec97efea81cfba59cdbed9c11d8efc5ab09df9509fc56"}, - {file = "pillow-10.2.0-cp311-cp311-win_arm64.whl", hash = "sha256:edca80cbfb2b68d7b56930b84a0e45ae1694aeba0541f798e908a49d66b837f1"}, - {file = "pillow-10.2.0-cp312-cp312-macosx_10_10_x86_64.whl", hash = "sha256:1b5e1b74d1bd1b78bc3477528919414874748dd363e6272efd5abf7654e68bef"}, - {file = "pillow-10.2.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:0eae2073305f451d8ecacb5474997c08569fb4eb4ac231ffa4ad7d342fdc25ac"}, - {file = "pillow-10.2.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b7c2286c23cd350b80d2fc9d424fc797575fb16f854b831d16fd47ceec078f2c"}, - {file = "pillow-10.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1e23412b5c41e58cec602f1135c57dfcf15482013ce6e5f093a86db69646a5aa"}, - {file = "pillow-10.2.0-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:52a50aa3fb3acb9cf7213573ef55d31d6eca37f5709c69e6858fe3bc04a5c2a2"}, - {file = "pillow-10.2.0-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:127cee571038f252a552760076407f9cff79761c3d436a12af6000cd182a9d04"}, - {file = "pillow-10.2.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:8d12251f02d69d8310b046e82572ed486685c38f02176bd08baf216746eb947f"}, - {file = "pillow-10.2.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:54f1852cd531aa981bc0965b7d609f5f6cc8ce8c41b1139f6ed6b3c54ab82bfb"}, - {file = "pillow-10.2.0-cp312-cp312-win32.whl", hash = "sha256:257d8788df5ca62c980314053197f4d46eefedf4e6175bc9412f14412ec4ea2f"}, - {file = "pillow-10.2.0-cp312-cp312-win_amd64.whl", hash = "sha256:154e939c5f0053a383de4fd3d3da48d9427a7e985f58af8e94d0b3c9fcfcf4f9"}, - {file = "pillow-10.2.0-cp312-cp312-win_arm64.whl", hash = "sha256:f379abd2f1e3dddb2b61bc67977a6b5a0a3f7485538bcc6f39ec76163891ee48"}, - {file = "pillow-10.2.0-cp38-cp38-macosx_10_10_x86_64.whl", hash = "sha256:8373c6c251f7ef8bda6675dd6d2b3a0fcc31edf1201266b5cf608b62a37407f9"}, - {file = "pillow-10.2.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:870ea1ada0899fd0b79643990809323b389d4d1d46c192f97342eeb6ee0b8483"}, - {file = "pillow-10.2.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b4b6b1e20608493548b1f32bce8cca185bf0480983890403d3b8753e44077129"}, - {file = "pillow-10.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3031709084b6e7852d00479fd1d310b07d0ba82765f973b543c8af5061cf990e"}, - {file = "pillow-10.2.0-cp38-cp38-manylinux_2_28_aarch64.whl", hash = "sha256:3ff074fc97dd4e80543a3e91f69d58889baf2002b6be64347ea8cf5533188213"}, - {file = "pillow-10.2.0-cp38-cp38-manylinux_2_28_x86_64.whl", hash = "sha256:cb4c38abeef13c61d6916f264d4845fab99d7b711be96c326b84df9e3e0ff62d"}, - {file = "pillow-10.2.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:b1b3020d90c2d8e1dae29cf3ce54f8094f7938460fb5ce8bc5c01450b01fbaf6"}, - {file = "pillow-10.2.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:170aeb00224ab3dc54230c797f8404507240dd868cf52066f66a41b33169bdbe"}, - {file = "pillow-10.2.0-cp38-cp38-win32.whl", hash = "sha256:c4225f5220f46b2fde568c74fca27ae9771536c2e29d7c04f4fb62c83275ac4e"}, - {file = "pillow-10.2.0-cp38-cp38-win_amd64.whl", hash = "sha256:0689b5a8c5288bc0504d9fcee48f61a6a586b9b98514d7d29b840143d6734f39"}, - {file = "pillow-10.2.0-cp39-cp39-macosx_10_10_x86_64.whl", hash = "sha256:b792a349405fbc0163190fde0dc7b3fef3c9268292586cf5645598b48e63dc67"}, - {file = "pillow-10.2.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:c570f24be1e468e3f0ce7ef56a89a60f0e05b30a3669a459e419c6eac2c35364"}, - {file = "pillow-10.2.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d8ecd059fdaf60c1963c58ceb8997b32e9dc1b911f5da5307aab614f1ce5c2fb"}, - {file = "pillow-10.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c365fd1703040de1ec284b176d6af5abe21b427cb3a5ff68e0759e1e313a5e7e"}, - {file = "pillow-10.2.0-cp39-cp39-manylinux_2_28_aarch64.whl", hash = "sha256:70c61d4c475835a19b3a5aa42492409878bbca7438554a1f89d20d58a7c75c01"}, - {file = "pillow-10.2.0-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:b6f491cdf80ae540738859d9766783e3b3c8e5bd37f5dfa0b76abdecc5081f13"}, - {file = "pillow-10.2.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:9d189550615b4948f45252d7f005e53c2040cea1af5b60d6f79491a6e147eef7"}, - {file = "pillow-10.2.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:49d9ba1ed0ef3e061088cd1e7538a0759aab559e2e0a80a36f9fd9d8c0c21591"}, - {file = "pillow-10.2.0-cp39-cp39-win32.whl", hash = "sha256:babf5acfede515f176833ed6028754cbcd0d206f7f614ea3447d67c33be12516"}, - {file = "pillow-10.2.0-cp39-cp39-win_amd64.whl", hash = "sha256:0304004f8067386b477d20a518b50f3fa658a28d44e4116970abfcd94fac34a8"}, - {file = "pillow-10.2.0-cp39-cp39-win_arm64.whl", hash = "sha256:0fb3e7fc88a14eacd303e90481ad983fd5b69c761e9e6ef94c983f91025da869"}, - {file = "pillow-10.2.0-pp310-pypy310_pp73-macosx_10_10_x86_64.whl", hash = "sha256:322209c642aabdd6207517e9739c704dc9f9db943015535783239022002f054a"}, - {file = "pillow-10.2.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3eedd52442c0a5ff4f887fab0c1c0bb164d8635b32c894bc1faf4c618dd89df2"}, - {file = "pillow-10.2.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cb28c753fd5eb3dd859b4ee95de66cc62af91bcff5db5f2571d32a520baf1f04"}, - {file = "pillow-10.2.0-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:33870dc4653c5017bf4c8873e5488d8f8d5f8935e2f1fb9a2208c47cdd66efd2"}, - {file = "pillow-10.2.0-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:3c31822339516fb3c82d03f30e22b1d038da87ef27b6a78c9549888f8ceda39a"}, - {file = "pillow-10.2.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:a2b56ba36e05f973d450582fb015594aaa78834fefe8dfb8fcd79b93e64ba4c6"}, - {file = "pillow-10.2.0-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:d8e6aeb9201e655354b3ad049cb77d19813ad4ece0df1249d3c793de3774f8c7"}, - {file = "pillow-10.2.0-pp39-pypy39_pp73-macosx_10_10_x86_64.whl", hash = "sha256:2247178effb34a77c11c0e8ac355c7a741ceca0a732b27bf11e747bbc950722f"}, - {file = "pillow-10.2.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:15587643b9e5eb26c48e49a7b33659790d28f190fc514a322d55da2fb5c2950e"}, - {file = "pillow-10.2.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:753cd8f2086b2b80180d9b3010dd4ed147efc167c90d3bf593fe2af21265e5a5"}, - {file = "pillow-10.2.0-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:7c8f97e8e7a9009bcacbe3766a36175056c12f9a44e6e6f2d5caad06dcfbf03b"}, - {file = "pillow-10.2.0-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:d1b35bcd6c5543b9cb547dee3150c93008f8dd0f1fef78fc0cd2b141c5baf58a"}, - {file = "pillow-10.2.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:fe4c15f6c9285dc54ce6553a3ce908ed37c8f3825b5a51a15c91442bb955b868"}, - {file = "pillow-10.2.0.tar.gz", hash = "sha256:e87f0b2c78157e12d7686b27d63c070fd65d994e8ddae6f328e0dcf4a0cd007e"}, + {file = "pillow-10.3.0-cp310-cp310-macosx_10_10_x86_64.whl", hash = "sha256:90b9e29824800e90c84e4022dd5cc16eb2d9605ee13f05d47641eb183cd73d45"}, + {file = "pillow-10.3.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a2c405445c79c3f5a124573a051062300936b0281fee57637e706453e452746c"}, + {file = "pillow-10.3.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:78618cdbccaa74d3f88d0ad6cb8ac3007f1a6fa5c6f19af64b55ca170bfa1edf"}, + {file = "pillow-10.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:261ddb7ca91fcf71757979534fb4c128448b5b4c55cb6152d280312062f69599"}, + {file = "pillow-10.3.0-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:ce49c67f4ea0609933d01c0731b34b8695a7a748d6c8d186f95e7d085d2fe475"}, + {file = "pillow-10.3.0-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:b14f16f94cbc61215115b9b1236f9c18403c15dd3c52cf629072afa9d54c1cbf"}, + {file = "pillow-10.3.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:d33891be6df59d93df4d846640f0e46f1a807339f09e79a8040bc887bdcd7ed3"}, + {file = "pillow-10.3.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:b50811d664d392f02f7761621303eba9d1b056fb1868c8cdf4231279645c25f5"}, + {file = "pillow-10.3.0-cp310-cp310-win32.whl", hash = "sha256:ca2870d5d10d8726a27396d3ca4cf7976cec0f3cb706debe88e3a5bd4610f7d2"}, + {file = "pillow-10.3.0-cp310-cp310-win_amd64.whl", hash = "sha256:f0d0591a0aeaefdaf9a5e545e7485f89910c977087e7de2b6c388aec32011e9f"}, + {file = "pillow-10.3.0-cp310-cp310-win_arm64.whl", hash = "sha256:ccce24b7ad89adb5a1e34a6ba96ac2530046763912806ad4c247356a8f33a67b"}, + {file = "pillow-10.3.0-cp311-cp311-macosx_10_10_x86_64.whl", hash = "sha256:5f77cf66e96ae734717d341c145c5949c63180842a545c47a0ce7ae52ca83795"}, + {file = "pillow-10.3.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e4b878386c4bf293578b48fc570b84ecfe477d3b77ba39a6e87150af77f40c57"}, + {file = "pillow-10.3.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fdcbb4068117dfd9ce0138d068ac512843c52295ed996ae6dd1faf537b6dbc27"}, + {file = "pillow-10.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9797a6c8fe16f25749b371c02e2ade0efb51155e767a971c61734b1bf6293994"}, + {file = "pillow-10.3.0-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:9e91179a242bbc99be65e139e30690e081fe6cb91a8e77faf4c409653de39451"}, + {file = "pillow-10.3.0-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:1b87bd9d81d179bd8ab871603bd80d8645729939f90b71e62914e816a76fc6bd"}, + {file = "pillow-10.3.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:81d09caa7b27ef4e61cb7d8fbf1714f5aec1c6b6c5270ee53504981e6e9121ad"}, + {file = "pillow-10.3.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:048ad577748b9fa4a99a0548c64f2cb8d672d5bf2e643a739ac8faff1164238c"}, + {file = "pillow-10.3.0-cp311-cp311-win32.whl", hash = "sha256:7161ec49ef0800947dc5570f86568a7bb36fa97dd09e9827dc02b718c5643f09"}, + {file = "pillow-10.3.0-cp311-cp311-win_amd64.whl", hash = "sha256:8eb0908e954d093b02a543dc963984d6e99ad2b5e36503d8a0aaf040505f747d"}, + {file = "pillow-10.3.0-cp311-cp311-win_arm64.whl", hash = "sha256:4e6f7d1c414191c1199f8996d3f2282b9ebea0945693fb67392c75a3a320941f"}, + {file = "pillow-10.3.0-cp312-cp312-macosx_10_10_x86_64.whl", hash = "sha256:e46f38133e5a060d46bd630faa4d9fa0202377495df1f068a8299fd78c84de84"}, + {file = "pillow-10.3.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:50b8eae8f7334ec826d6eeffaeeb00e36b5e24aa0b9df322c247539714c6df19"}, + {file = "pillow-10.3.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9d3bea1c75f8c53ee4d505c3e67d8c158ad4df0d83170605b50b64025917f338"}, + {file = "pillow-10.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:19aeb96d43902f0a783946a0a87dbdad5c84c936025b8419da0a0cd7724356b1"}, + {file = "pillow-10.3.0-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:74d28c17412d9caa1066f7a31df8403ec23d5268ba46cd0ad2c50fb82ae40462"}, + {file = "pillow-10.3.0-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:ff61bfd9253c3915e6d41c651d5f962da23eda633cf02262990094a18a55371a"}, + {file = "pillow-10.3.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:d886f5d353333b4771d21267c7ecc75b710f1a73d72d03ca06df49b09015a9ef"}, + {file = "pillow-10.3.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:4b5ec25d8b17217d635f8935dbc1b9aa5907962fae29dff220f2659487891cd3"}, + {file = "pillow-10.3.0-cp312-cp312-win32.whl", hash = "sha256:51243f1ed5161b9945011a7360e997729776f6e5d7005ba0c6879267d4c5139d"}, + {file = "pillow-10.3.0-cp312-cp312-win_amd64.whl", hash = "sha256:412444afb8c4c7a6cc11a47dade32982439925537e483be7c0ae0cf96c4f6a0b"}, + {file = "pillow-10.3.0-cp312-cp312-win_arm64.whl", hash = "sha256:798232c92e7665fe82ac085f9d8e8ca98826f8e27859d9a96b41d519ecd2e49a"}, + {file = "pillow-10.3.0-cp38-cp38-macosx_10_10_x86_64.whl", hash = "sha256:4eaa22f0d22b1a7e93ff0a596d57fdede2e550aecffb5a1ef1106aaece48e96b"}, + {file = "pillow-10.3.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:cd5e14fbf22a87321b24c88669aad3a51ec052eb145315b3da3b7e3cc105b9a2"}, + {file = "pillow-10.3.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1530e8f3a4b965eb6a7785cf17a426c779333eb62c9a7d1bbcf3ffd5bf77a4aa"}, + {file = "pillow-10.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5d512aafa1d32efa014fa041d38868fda85028e3f930a96f85d49c7d8ddc0383"}, + {file = "pillow-10.3.0-cp38-cp38-manylinux_2_28_aarch64.whl", hash = "sha256:339894035d0ede518b16073bdc2feef4c991ee991a29774b33e515f1d308e08d"}, + {file = "pillow-10.3.0-cp38-cp38-manylinux_2_28_x86_64.whl", hash = "sha256:aa7e402ce11f0885305bfb6afb3434b3cd8f53b563ac065452d9d5654c7b86fd"}, + {file = "pillow-10.3.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:0ea2a783a2bdf2a561808fe4a7a12e9aa3799b701ba305de596bc48b8bdfce9d"}, + {file = "pillow-10.3.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:c78e1b00a87ce43bb37642c0812315b411e856a905d58d597750eb79802aaaa3"}, + {file = "pillow-10.3.0-cp38-cp38-win32.whl", hash = "sha256:72d622d262e463dfb7595202d229f5f3ab4b852289a1cd09650362db23b9eb0b"}, + {file = "pillow-10.3.0-cp38-cp38-win_amd64.whl", hash = "sha256:2034f6759a722da3a3dbd91a81148cf884e91d1b747992ca288ab88c1de15999"}, + {file = "pillow-10.3.0-cp39-cp39-macosx_10_10_x86_64.whl", hash = "sha256:2ed854e716a89b1afcedea551cd85f2eb2a807613752ab997b9974aaa0d56936"}, + {file = "pillow-10.3.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:dc1a390a82755a8c26c9964d457d4c9cbec5405896cba94cf51f36ea0d855002"}, + {file = "pillow-10.3.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4203efca580f0dd6f882ca211f923168548f7ba334c189e9eab1178ab840bf60"}, + {file = "pillow-10.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3102045a10945173d38336f6e71a8dc71bcaeed55c3123ad4af82c52807b9375"}, + {file = "pillow-10.3.0-cp39-cp39-manylinux_2_28_aarch64.whl", hash = "sha256:6fb1b30043271ec92dc65f6d9f0b7a830c210b8a96423074b15c7bc999975f57"}, + {file = "pillow-10.3.0-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:1dfc94946bc60ea375cc39cff0b8da6c7e5f8fcdc1d946beb8da5c216156ddd8"}, + {file = "pillow-10.3.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b09b86b27a064c9624d0a6c54da01c1beaf5b6cadfa609cf63789b1d08a797b9"}, + {file = "pillow-10.3.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:d3b2348a78bc939b4fed6552abfd2e7988e0f81443ef3911a4b8498ca084f6eb"}, + {file = "pillow-10.3.0-cp39-cp39-win32.whl", hash = "sha256:45ebc7b45406febf07fef35d856f0293a92e7417ae7933207e90bf9090b70572"}, + {file = "pillow-10.3.0-cp39-cp39-win_amd64.whl", hash = "sha256:0ba26351b137ca4e0db0342d5d00d2e355eb29372c05afd544ebf47c0956ffeb"}, + {file = "pillow-10.3.0-cp39-cp39-win_arm64.whl", hash = "sha256:50fd3f6b26e3441ae07b7c979309638b72abc1a25da31a81a7fbd9495713ef4f"}, + {file = "pillow-10.3.0-pp310-pypy310_pp73-macosx_10_10_x86_64.whl", hash = "sha256:6b02471b72526ab8a18c39cb7967b72d194ec53c1fd0a70b050565a0f366d355"}, + {file = "pillow-10.3.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:8ab74c06ffdab957d7670c2a5a6e1a70181cd10b727cd788c4dd9005b6a8acd9"}, + {file = "pillow-10.3.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:048eeade4c33fdf7e08da40ef402e748df113fd0b4584e32c4af74fe78baaeb2"}, + {file = "pillow-10.3.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9e2ec1e921fd07c7cda7962bad283acc2f2a9ccc1b971ee4b216b75fad6f0463"}, + {file = "pillow-10.3.0-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:4c8e73e99da7db1b4cad7f8d682cf6abad7844da39834c288fbfa394a47bbced"}, + {file = "pillow-10.3.0-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:16563993329b79513f59142a6b02055e10514c1a8e86dca8b48a893e33cf91e3"}, + {file = "pillow-10.3.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:dd78700f5788ae180b5ee8902c6aea5a5726bac7c364b202b4b3e3ba2d293170"}, + {file = "pillow-10.3.0-pp39-pypy39_pp73-macosx_10_10_x86_64.whl", hash = "sha256:aff76a55a8aa8364d25400a210a65ff59d0168e0b4285ba6bf2bd83cf675ba32"}, + {file = "pillow-10.3.0-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:b7bc2176354defba3edc2b9a777744462da2f8e921fbaf61e52acb95bafa9828"}, + {file = "pillow-10.3.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:793b4e24db2e8742ca6423d3fde8396db336698c55cd34b660663ee9e45ed37f"}, + {file = "pillow-10.3.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d93480005693d247f8346bc8ee28c72a2191bdf1f6b5db469c096c0c867ac015"}, + {file = "pillow-10.3.0-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:c83341b89884e2b2e55886e8fbbf37c3fa5efd6c8907124aeb72f285ae5696e5"}, + {file = "pillow-10.3.0-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:1a1d1915db1a4fdb2754b9de292642a39a7fb28f1736699527bb649484fb966a"}, + {file = "pillow-10.3.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:a0eaa93d054751ee9964afa21c06247779b90440ca41d184aeb5d410f20ff591"}, + {file = "pillow-10.3.0.tar.gz", hash = "sha256:9d2455fbf44c914840c793e89aa82d0e1763a14253a000743719ae5946814b2d"}, ] [package.extras] @@ -2950,6 +3114,22 @@ tests = ["check-manifest", "coverage", "defusedxml", "markdown2", "olefile", "pa typing = ["typing-extensions"] xmp = ["defusedxml"] +[[package]] +name = "platformdirs" +version = "4.2.2" +description = "A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`." +optional = false +python-versions = ">=3.8" +files = [ + {file = "platformdirs-4.2.2-py3-none-any.whl", hash = "sha256:2d7a1657e36a80ea911db832a8a6ece5ee53d8de21edd5cc5879af6530b1bfee"}, + {file = "platformdirs-4.2.2.tar.gz", hash = "sha256:38b7b51f512eed9e84a22788b4bce1de17c0adb134d6becb09836e37d8654cd3"}, +] + +[package.extras] +docs = ["furo (>=2023.9.10)", "proselint (>=0.13)", "sphinx (>=7.2.6)", "sphinx-autodoc-typehints (>=1.25.2)"] +test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.4.3)", "pytest-cov (>=4.1)", "pytest-mock (>=3.12)"] +type = ["mypy (>=1.8)"] + [[package]] name = "pluggy" version = "0.13.1" @@ -2966,13 +3146,13 @@ dev = ["pre-commit", "tox"] [[package]] name = "poethepoet" -version = "0.25.0" +version = "0.26.1" description = "A task runner that works well with poetry." optional = false python-versions = ">=3.8" files = [ - {file = "poethepoet-0.25.0-py3-none-any.whl", hash = "sha256:42c0fd654f23e1b7c67aa8aa395c72e15eb275034bd5105171003daf679c1470"}, - {file = "poethepoet-0.25.0.tar.gz", hash = "sha256:ca8f1d8475aa10d2ceeb26331d2626fc4a6b51df1e7e70d3d0d6481a984faab6"}, + {file = "poethepoet-0.26.1-py3-none-any.whl", hash = "sha256:aa43b443fec5d17d7e76771cccd484e5285805301721a74f059c483ad3276edd"}, + {file = "poethepoet-0.26.1.tar.gz", hash = "sha256:aaad8541f6072617a60bcff2562d00779b58b353bd0f1847b06d8d0f2b6dc192"}, ] [package.dependencies] @@ -2984,13 +3164,13 @@ poetry-plugin = ["poetry (>=1.0,<2.0)"] [[package]] name = "prompt-toolkit" -version = "3.0.43" +version = "3.0.47" description = "Library for building powerful interactive command lines in Python" optional = false python-versions = ">=3.7.0" files = [ - {file = "prompt_toolkit-3.0.43-py3-none-any.whl", hash = "sha256:a11a29cb3bf0a28a387fe5122cdb649816a957cd9261dcedf8c9f1fef33eacf6"}, - {file = "prompt_toolkit-3.0.43.tar.gz", hash = "sha256:3527b7af26106cbc65a040bcc84839a3566ec1b051bb0bfe953631e704b0ff7d"}, + {file = "prompt_toolkit-3.0.47-py3-none-any.whl", hash = "sha256:0d7bfa67001d5e39d02c224b663abc33687405033a8c422d0d675a5a13361d10"}, + {file = "prompt_toolkit-3.0.47.tar.gz", hash = "sha256:1e1b29cb58080b1e69f207c893a1a7bf16d127a5c30c9d17a25a5d77792e5360"}, ] [package.dependencies] @@ -3123,13 +3303,13 @@ files = [ [[package]] name = "pycparser" -version = "2.21" +version = "2.22" description = "C parser in Python" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +python-versions = ">=3.8" files = [ - {file = "pycparser-2.21-py2.py3-none-any.whl", hash = "sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9"}, - {file = "pycparser-2.21.tar.gz", hash = "sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206"}, + {file = "pycparser-2.22-py3-none-any.whl", hash = "sha256:c3702b6d3dd8c7abc1afa565d7e63d53a1d0bd86cdc24edd75470f4de499cfcc"}, + {file = "pycparser-2.22.tar.gz", hash = "sha256:491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6"}, ] [[package]] @@ -3162,17 +3342,16 @@ files = [ [[package]] name = "pygments" -version = "2.17.2" +version = "2.18.0" description = "Pygments is a syntax highlighting package written in Python." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "pygments-2.17.2-py3-none-any.whl", hash = "sha256:b27c2826c47d0f3219f29554824c30c5e8945175d888647acd804ddd04af846c"}, - {file = "pygments-2.17.2.tar.gz", hash = "sha256:da46cec9fd2de5be3a8a784f434e4c4ab670b4ff54d605c4c2717e9d49c4c367"}, + {file = "pygments-2.18.0-py3-none-any.whl", hash = "sha256:b8e6aca0523f3ab76fee51799c488e38782ac06eafcf95e7ba832985c8e7b13a"}, + {file = "pygments-2.18.0.tar.gz", hash = "sha256:786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199"}, ] [package.extras] -plugins = ["importlib-metadata"] windows-terminal = ["colorama (>=0.4.6)"] [[package]] @@ -3211,13 +3390,13 @@ tests = ["pytest-black (>=0.3.0,<0.3.10)", "pytest-cache (>=1.0)", "pytest-inven [[package]] name = "pyparsing" -version = "3.1.1" +version = "3.1.2" description = "pyparsing module - Classes and methods to define and execute parsing grammars" optional = false python-versions = ">=3.6.8" files = [ - {file = "pyparsing-3.1.1-py3-none-any.whl", hash = "sha256:32c7c0b711493c72ff18a981d24f28aaf9c1fb7ed5e9667c9e84e3db623bdbfb"}, - {file = "pyparsing-3.1.1.tar.gz", hash = "sha256:ede28a1a32462f5a9705e07aea48001a08f7cf81a021585011deba701581a0db"}, + {file = "pyparsing-3.1.2-py3-none-any.whl", hash = "sha256:f9db75911801ed778fe61bb643079ff86601aca99fcae6345aa67292038fb742"}, + {file = "pyparsing-3.1.2.tar.gz", hash = "sha256:a1bac0ce561155ecc3ed78ca94d3c9378656ad4c94c1270de543f621420f94ad"}, ] [package.extras] @@ -3225,18 +3404,15 @@ diagrams = ["jinja2", "railroad-diagrams"] [[package]] name = "pyproject-hooks" -version = "1.0.0" +version = "1.1.0" description = "Wrappers to call pyproject.toml-based build backend hooks." optional = false python-versions = ">=3.7" files = [ - {file = "pyproject_hooks-1.0.0-py3-none-any.whl", hash = "sha256:283c11acd6b928d2f6a7c73fa0d01cb2bdc5f07c57a2eeb6e83d5e56b97976f8"}, - {file = "pyproject_hooks-1.0.0.tar.gz", hash = "sha256:f271b298b97f5955d53fb12b72c1fb1948c22c1a6b70b315c54cedaca0264ef5"}, + {file = "pyproject_hooks-1.1.0-py3-none-any.whl", hash = "sha256:7ceeefe9aec63a1064c18d939bdc3adf2d8aa1988a510afec15151578b232aa2"}, + {file = "pyproject_hooks-1.1.0.tar.gz", hash = "sha256:4b37730834edbd6bd37f26ece6b44802fb1c1ee2ece0e54ddff8bfc06db86965"}, ] -[package.dependencies] -tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} - [[package]] name = "pytest" version = "7.1.3" @@ -3260,15 +3436,30 @@ tomli = ">=1.0.0" [package.extras] testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "xmlschema"] +[[package]] +name = "pytest-black" +version = "0.3.12" +description = "A pytest plugin to enable format checking with black" +optional = false +python-versions = ">=2.7" +files = [ + {file = "pytest-black-0.3.12.tar.gz", hash = "sha256:1d339b004f764d6cd0f06e690f6dd748df3d62e6fe1a692d6a5500ac2c5b75a5"}, +] + +[package.dependencies] +black = {version = "*", markers = "python_version >= \"3.6\""} +pytest = ">=3.5.0" +toml = "*" + [[package]] name = "pytest-cov" -version = "4.1.0" +version = "5.0.0" description = "Pytest plugin for measuring coverage." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "pytest-cov-4.1.0.tar.gz", hash = "sha256:3904b13dfbfec47f003b8e77fd5b589cd11904a21ddf1ab38a64f204d6a10ef6"}, - {file = "pytest_cov-4.1.0-py3-none-any.whl", hash = "sha256:6ba70b9e97e69fcc3fb45bfeab2d0a138fb65c4d0d6a41ef33983ad114be8c3a"}, + {file = "pytest-cov-5.0.0.tar.gz", hash = "sha256:5837b58e9f6ebd335b0f8060eecce69b662415b16dc503883a02f45dfeb14857"}, + {file = "pytest_cov-5.0.0-py3-none-any.whl", hash = "sha256:4f0764a1219df53214206bf1feea4633c3b558a2925c8b59f144f682861ce652"}, ] [package.dependencies] @@ -3276,7 +3467,7 @@ coverage = {version = ">=5.2.1", extras = ["toml"]} pytest = ">=4.6" [package.extras] -testing = ["fields", "hunter", "process-tests", "pytest-xdist", "six", "virtualenv"] +testing = ["fields", "hunter", "process-tests", "pytest-xdist", "virtualenv"] [[package]] name = "pytest-flask" @@ -3346,13 +3537,13 @@ tests = ["invenio-celery (>=1.2.4,<2.0.0)", "invenio-db (>=1.0.12,<2.0.0)", "inv [[package]] name = "pytest-isort" -version = "3.1.0" +version = "4.0.0" description = "py.test plugin to check import ordering using isort" optional = false -python-versions = ">=3.7,<4" +python-versions = ">=3.8,<4" files = [ - {file = "pytest_isort-3.1.0-py3-none-any.whl", hash = "sha256:13e68d84b35d4f79d20d3d165f491bffc9e4b9509f420381a4186118c4454bd3"}, - {file = "pytest_isort-3.1.0.tar.gz", hash = "sha256:067801dc5e54a474330d074d521c815948ff6d5cf0ed3b9d057b78216851186c"}, + {file = "pytest_isort-4.0.0-py3-none-any.whl", hash = "sha256:14bb3281bab587d6beb53129481e8885232249ec5cfeaf5d903a561ff0589620"}, + {file = "pytest_isort-4.0.0.tar.gz", hash = "sha256:00e99642e282b00b849cf9b49d9102a02ab8c4ec549ace57d7868b723713aaa9"}, ] [package.dependencies] @@ -3396,13 +3587,13 @@ tests = ["pytest-isort", "pytest-pycodestyle (>=2.3,<3.0)"] [[package]] name = "python-dateutil" -version = "2.8.2" +version = "2.9.0.post0" description = "Extensions to the standard Python datetime module" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" files = [ - {file = "python-dateutil-2.8.2.tar.gz", hash = "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86"}, - {file = "python_dateutil-2.8.2-py2.py3-none-any.whl", hash = "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9"}, + {file = "python-dateutil-2.9.0.post0.tar.gz", hash = "sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3"}, + {file = "python_dateutil-2.9.0.post0-py2.py3-none-any.whl", hash = "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427"}, ] [package.dependencies] @@ -3435,23 +3626,20 @@ files = [ [[package]] name = "pywebpack" -version = "1.2.0" +version = "2.0.0" description = "Webpack integration layer for Python." optional = false -python-versions = "*" +python-versions = ">=3.7" files = [ - {file = "pywebpack-1.2.0-py2.py3-none-any.whl", hash = "sha256:0aec242f85bc59b0120d7d8e1daf8e22fb124142c4d76753e17d016e8948710b"}, - {file = "pywebpack-1.2.0.tar.gz", hash = "sha256:be882ab55a5d28951d8262936efc717a62935719b0551a4a4bb53bef70d9b022"}, + {file = "pywebpack-2.0.0-py2.py3-none-any.whl", hash = "sha256:ec2362b948bfa273902265c7596ee66202b60ee2cfd07479231c916103389a6e"}, + {file = "pywebpack-2.0.0.tar.gz", hash = "sha256:676542a37ee29771e9930b9b44632c246d10635c0466ef2f7bf37ade5ed54198"}, ] [package.dependencies] -node-semver = ">=0.1.1" pynpm = ">=0.1.0" [package.extras] -all = ["Sphinx (>=3)", "pytest-cache (>=1.0)", "pytest-invenio (>=1.4.0)"] -docs = ["Sphinx (>=3)"] -tests = ["pytest-cache (>=1.0)", "pytest-invenio (>=1.4.0)"] +tests = ["pytest-black (>=0.3.0)", "pytest-cache (>=1.0)", "pytest-invenio (>=2.1.0,<3.0.0)", "sphinx (>=4.5)"] [[package]] name = "pyyaml" @@ -3504,17 +3692,17 @@ files = [ [[package]] name = "redis" -version = "5.0.2" +version = "5.0.5" description = "Python client for Redis database and key-value store" optional = false python-versions = ">=3.7" files = [ - {file = "redis-5.0.2-py3-none-any.whl", hash = "sha256:4caa8e1fcb6f3c0ef28dba99535101d80934b7d4cd541bbb47f4a3826ee472d1"}, - {file = "redis-5.0.2.tar.gz", hash = "sha256:3f82cc80d350e93042c8e6e7a5d0596e4dd68715babffba79492733e1f367037"}, + {file = "redis-5.0.5-py3-none-any.whl", hash = "sha256:30b47d4ebb6b7a0b9b40c1275a19b87bb6f46b3bed82a89012cf56dea4024ada"}, + {file = "redis-5.0.5.tar.gz", hash = "sha256:3417688621acf6ee368dec4a04dd95881be24efd34c79f00d31f62bb528800ae"}, ] [package.dependencies] -async-timeout = ">=4.0.3" +async-timeout = {version = ">=4.0.3", markers = "python_full_version < \"3.11.3\""} [package.extras] hiredis = ["hiredis (>=1.0.0)"] @@ -3522,13 +3710,13 @@ ocsp = ["cryptography (>=36.0.1)", "pyopenssl (==20.0.1)", "requests (>=2.26.0)" [[package]] name = "referencing" -version = "0.33.0" +version = "0.35.1" description = "JSON Referencing + Python" optional = false python-versions = ">=3.8" files = [ - {file = "referencing-0.33.0-py3-none-any.whl", hash = "sha256:39240f2ecc770258f28b642dd47fd74bc8b02484de54e1882b74b35ebd779bd5"}, - {file = "referencing-0.33.0.tar.gz", hash = "sha256:c775fedf74bc0f9189c2a3be1c12fd03e8c23f4d371dce795df44e06c5b412f7"}, + {file = "referencing-0.35.1-py3-none-any.whl", hash = "sha256:eda6d3234d62814d1c64e305c1331c9a3a6132da475ab6382eaa997b21ee75de"}, + {file = "referencing-0.35.1.tar.gz", hash = "sha256:25b42124a6c8b632a425174f24087783efb348a6f1e0008e63cd4466fedf703c"}, ] [package.dependencies] @@ -3537,13 +3725,13 @@ rpds-py = ">=0.7.0" [[package]] name = "requests" -version = "2.31.0" +version = "2.32.3" description = "Python HTTP for Humans." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "requests-2.31.0-py3-none-any.whl", hash = "sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f"}, - {file = "requests-2.31.0.tar.gz", hash = "sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1"}, + {file = "requests-2.32.3-py3-none-any.whl", hash = "sha256:70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6"}, + {file = "requests-2.32.3.tar.gz", hash = "sha256:55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760"}, ] [package.dependencies] @@ -3576,13 +3764,13 @@ rsa = ["oauthlib[signedtoken] (>=2.1.0,<3.0.0)"] [[package]] name = "responses" -version = "0.25.0" +version = "0.25.2" description = "A utility library for mocking out the `requests` Python library." optional = false python-versions = ">=3.8" files = [ - {file = "responses-0.25.0-py3-none-any.whl", hash = "sha256:2f0b9c2b6437db4b528619a77e5d565e4ec2a9532162ac1a131a83529db7be1a"}, - {file = "responses-0.25.0.tar.gz", hash = "sha256:01ae6a02b4f34e39bffceb0fc6786b67a25eae919c6368d05eabc8d9576c2a66"}, + {file = "responses-0.25.2-py3-none-any.whl", hash = "sha256:b59707ea25de536d324670791ab073fafd41f3a351cec9c51cb6147089a9a30a"}, + {file = "responses-0.25.2.tar.gz", hash = "sha256:77a61ad7e6016ed2ac00739b7efa5f35c42351d5b9b5d26bb1be87f197632487"}, ] [package.dependencies] @@ -3593,112 +3781,130 @@ urllib3 = ">=1.25.10,<3.0" [package.extras] tests = ["coverage (>=6.0.0)", "flake8", "mypy", "pytest (>=7.0.0)", "pytest-asyncio", "pytest-cov", "pytest-httpserver", "tomli", "tomli-w", "types-PyYAML", "types-requests"] +[[package]] +name = "rich" +version = "12.6.0" +description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" +optional = false +python-versions = ">=3.6.3,<4.0.0" +files = [ + {file = "rich-12.6.0-py3-none-any.whl", hash = "sha256:a4eb26484f2c82589bd9a17c73d32a010b1e29d89f1604cd9bf3a2097b81bb5e"}, + {file = "rich-12.6.0.tar.gz", hash = "sha256:ba3a3775974105c221d31141f2c116f4fd65c5ceb0698657a11e9f295ec93fd0"}, +] + +[package.dependencies] +commonmark = ">=0.9.0,<0.10.0" +pygments = ">=2.6.0,<3.0.0" + +[package.extras] +jupyter = ["ipywidgets (>=7.5.1,<8.0.0)"] + [[package]] name = "rpds-py" -version = "0.18.0" +version = "0.18.1" description = "Python bindings to Rust's persistent data structures (rpds)" optional = false python-versions = ">=3.8" files = [ - {file = "rpds_py-0.18.0-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:5b4e7d8d6c9b2e8ee2d55c90b59c707ca59bc30058269b3db7b1f8df5763557e"}, - {file = "rpds_py-0.18.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c463ed05f9dfb9baebef68048aed8dcdc94411e4bf3d33a39ba97e271624f8f7"}, - {file = "rpds_py-0.18.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:01e36a39af54a30f28b73096dd39b6802eddd04c90dbe161c1b8dbe22353189f"}, - {file = "rpds_py-0.18.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d62dec4976954a23d7f91f2f4530852b0c7608116c257833922a896101336c51"}, - {file = "rpds_py-0.18.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:dd18772815d5f008fa03d2b9a681ae38d5ae9f0e599f7dda233c439fcaa00d40"}, - {file = "rpds_py-0.18.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:923d39efa3cfb7279a0327e337a7958bff00cc447fd07a25cddb0a1cc9a6d2da"}, - {file = "rpds_py-0.18.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:39514da80f971362f9267c600b6d459bfbbc549cffc2cef8e47474fddc9b45b1"}, - {file = "rpds_py-0.18.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:a34d557a42aa28bd5c48a023c570219ba2593bcbbb8dc1b98d8cf5d529ab1434"}, - {file = "rpds_py-0.18.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:93df1de2f7f7239dc9cc5a4a12408ee1598725036bd2dedadc14d94525192fc3"}, - {file = "rpds_py-0.18.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:34b18ba135c687f4dac449aa5157d36e2cbb7c03cbea4ddbd88604e076aa836e"}, - {file = "rpds_py-0.18.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:c0b5dcf9193625afd8ecc92312d6ed78781c46ecbf39af9ad4681fc9f464af88"}, - {file = "rpds_py-0.18.0-cp310-none-win32.whl", hash = "sha256:c4325ff0442a12113a6379af66978c3fe562f846763287ef66bdc1d57925d337"}, - {file = "rpds_py-0.18.0-cp310-none-win_amd64.whl", hash = "sha256:7223a2a5fe0d217e60a60cdae28d6949140dde9c3bcc714063c5b463065e3d66"}, - {file = "rpds_py-0.18.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:3a96e0c6a41dcdba3a0a581bbf6c44bb863f27c541547fb4b9711fd8cf0ffad4"}, - {file = "rpds_py-0.18.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:30f43887bbae0d49113cbaab729a112251a940e9b274536613097ab8b4899cf6"}, - {file = "rpds_py-0.18.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fcb25daa9219b4cf3a0ab24b0eb9a5cc8949ed4dc72acb8fa16b7e1681aa3c58"}, - {file = "rpds_py-0.18.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d68c93e381010662ab873fea609bf6c0f428b6d0bb00f2c6939782e0818d37bf"}, - {file = "rpds_py-0.18.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b34b7aa8b261c1dbf7720b5d6f01f38243e9b9daf7e6b8bc1fd4657000062f2c"}, - {file = "rpds_py-0.18.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2e6d75ab12b0bbab7215e5d40f1e5b738aa539598db27ef83b2ec46747df90e1"}, - {file = "rpds_py-0.18.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0b8612cd233543a3781bc659c731b9d607de65890085098986dfd573fc2befe5"}, - {file = "rpds_py-0.18.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:aec493917dd45e3c69d00a8874e7cbed844efd935595ef78a0f25f14312e33c6"}, - {file = "rpds_py-0.18.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:661d25cbffaf8cc42e971dd570d87cb29a665f49f4abe1f9e76be9a5182c4688"}, - {file = "rpds_py-0.18.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:1df3659d26f539ac74fb3b0c481cdf9d725386e3552c6fa2974f4d33d78e544b"}, - {file = "rpds_py-0.18.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:a1ce3ba137ed54f83e56fb983a5859a27d43a40188ba798993812fed73c70836"}, - {file = "rpds_py-0.18.0-cp311-none-win32.whl", hash = "sha256:69e64831e22a6b377772e7fb337533c365085b31619005802a79242fee620bc1"}, - {file = "rpds_py-0.18.0-cp311-none-win_amd64.whl", hash = "sha256:998e33ad22dc7ec7e030b3df701c43630b5bc0d8fbc2267653577e3fec279afa"}, - {file = "rpds_py-0.18.0-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:7f2facbd386dd60cbbf1a794181e6aa0bd429bd78bfdf775436020172e2a23f0"}, - {file = "rpds_py-0.18.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:1d9a5be316c15ffb2b3c405c4ff14448c36b4435be062a7f578ccd8b01f0c4d8"}, - {file = "rpds_py-0.18.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cd5bf1af8efe569654bbef5a3e0a56eca45f87cfcffab31dd8dde70da5982475"}, - {file = "rpds_py-0.18.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5417558f6887e9b6b65b4527232553c139b57ec42c64570569b155262ac0754f"}, - {file = "rpds_py-0.18.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:56a737287efecafc16f6d067c2ea0117abadcd078d58721f967952db329a3e5c"}, - {file = "rpds_py-0.18.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8f03bccbd8586e9dd37219bce4d4e0d3ab492e6b3b533e973fa08a112cb2ffc9"}, - {file = "rpds_py-0.18.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4457a94da0d5c53dc4b3e4de1158bdab077db23c53232f37a3cb7afdb053a4e3"}, - {file = "rpds_py-0.18.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:0ab39c1ba9023914297dd88ec3b3b3c3f33671baeb6acf82ad7ce883f6e8e157"}, - {file = "rpds_py-0.18.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:9d54553c1136b50fd12cc17e5b11ad07374c316df307e4cfd6441bea5fb68496"}, - {file = "rpds_py-0.18.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:0af039631b6de0397ab2ba16eaf2872e9f8fca391b44d3d8cac317860a700a3f"}, - {file = "rpds_py-0.18.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:84ffab12db93b5f6bad84c712c92060a2d321b35c3c9960b43d08d0f639d60d7"}, - {file = "rpds_py-0.18.0-cp312-none-win32.whl", hash = "sha256:685537e07897f173abcf67258bee3c05c374fa6fff89d4c7e42fb391b0605e98"}, - {file = "rpds_py-0.18.0-cp312-none-win_amd64.whl", hash = "sha256:e003b002ec72c8d5a3e3da2989c7d6065b47d9eaa70cd8808b5384fbb970f4ec"}, - {file = "rpds_py-0.18.0-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:08f9ad53c3f31dfb4baa00da22f1e862900f45908383c062c27628754af2e88e"}, - {file = "rpds_py-0.18.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:c0013fe6b46aa496a6749c77e00a3eb07952832ad6166bd481c74bda0dcb6d58"}, - {file = "rpds_py-0.18.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e32a92116d4f2a80b629778280103d2a510a5b3f6314ceccd6e38006b5e92dcb"}, - {file = "rpds_py-0.18.0-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e541ec6f2ec456934fd279a3120f856cd0aedd209fc3852eca563f81738f6861"}, - {file = "rpds_py-0.18.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bed88b9a458e354014d662d47e7a5baafd7ff81c780fd91584a10d6ec842cb73"}, - {file = "rpds_py-0.18.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2644e47de560eb7bd55c20fc59f6daa04682655c58d08185a9b95c1970fa1e07"}, - {file = "rpds_py-0.18.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8e8916ae4c720529e18afa0b879473049e95949bf97042e938530e072fde061d"}, - {file = "rpds_py-0.18.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:465a3eb5659338cf2a9243e50ad9b2296fa15061736d6e26240e713522b6235c"}, - {file = "rpds_py-0.18.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:ea7d4a99f3b38c37eac212dbd6ec42b7a5ec51e2c74b5d3223e43c811609e65f"}, - {file = "rpds_py-0.18.0-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:67071a6171e92b6da534b8ae326505f7c18022c6f19072a81dcf40db2638767c"}, - {file = "rpds_py-0.18.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:41ef53e7c58aa4ef281da975f62c258950f54b76ec8e45941e93a3d1d8580594"}, - {file = "rpds_py-0.18.0-cp38-none-win32.whl", hash = "sha256:fdea4952db2793c4ad0bdccd27c1d8fdd1423a92f04598bc39425bcc2b8ee46e"}, - {file = "rpds_py-0.18.0-cp38-none-win_amd64.whl", hash = "sha256:7cd863afe7336c62ec78d7d1349a2f34c007a3cc6c2369d667c65aeec412a5b1"}, - {file = "rpds_py-0.18.0-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:5307def11a35f5ae4581a0b658b0af8178c65c530e94893345bebf41cc139d33"}, - {file = "rpds_py-0.18.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:77f195baa60a54ef9d2de16fbbfd3ff8b04edc0c0140a761b56c267ac11aa467"}, - {file = "rpds_py-0.18.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:39f5441553f1c2aed4de4377178ad8ff8f9d733723d6c66d983d75341de265ab"}, - {file = "rpds_py-0.18.0-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:9a00312dea9310d4cb7dbd7787e722d2e86a95c2db92fbd7d0155f97127bcb40"}, - {file = "rpds_py-0.18.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8f2fc11e8fe034ee3c34d316d0ad8808f45bc3b9ce5857ff29d513f3ff2923a1"}, - {file = "rpds_py-0.18.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:586f8204935b9ec884500498ccc91aa869fc652c40c093bd9e1471fbcc25c022"}, - {file = "rpds_py-0.18.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ddc2f4dfd396c7bfa18e6ce371cba60e4cf9d2e5cdb71376aa2da264605b60b9"}, - {file = "rpds_py-0.18.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:5ddcba87675b6d509139d1b521e0c8250e967e63b5909a7e8f8944d0f90ff36f"}, - {file = "rpds_py-0.18.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:7bd339195d84439cbe5771546fe8a4e8a7a045417d8f9de9a368c434e42a721e"}, - {file = "rpds_py-0.18.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:d7c36232a90d4755b720fbd76739d8891732b18cf240a9c645d75f00639a9024"}, - {file = "rpds_py-0.18.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:6b0817e34942b2ca527b0e9298373e7cc75f429e8da2055607f4931fded23e20"}, - {file = "rpds_py-0.18.0-cp39-none-win32.whl", hash = "sha256:99f70b740dc04d09e6b2699b675874367885217a2e9f782bdf5395632ac663b7"}, - {file = "rpds_py-0.18.0-cp39-none-win_amd64.whl", hash = "sha256:6ef687afab047554a2d366e112dd187b62d261d49eb79b77e386f94644363294"}, - {file = "rpds_py-0.18.0-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:ad36cfb355e24f1bd37cac88c112cd7730873f20fb0bdaf8ba59eedf8216079f"}, - {file = "rpds_py-0.18.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:36b3ee798c58ace201289024b52788161e1ea133e4ac93fba7d49da5fec0ef9e"}, - {file = "rpds_py-0.18.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f8a2f084546cc59ea99fda8e070be2fd140c3092dc11524a71aa8f0f3d5a55ca"}, - {file = "rpds_py-0.18.0-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e4461d0f003a0aa9be2bdd1b798a041f177189c1a0f7619fe8c95ad08d9a45d7"}, - {file = "rpds_py-0.18.0-pp310-pypy310_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8db715ebe3bb7d86d77ac1826f7d67ec11a70dbd2376b7cc214199360517b641"}, - {file = "rpds_py-0.18.0-pp310-pypy310_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:793968759cd0d96cac1e367afd70c235867831983f876a53389ad869b043c948"}, - {file = "rpds_py-0.18.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:66e6a3af5a75363d2c9a48b07cb27c4ea542938b1a2e93b15a503cdfa8490795"}, - {file = "rpds_py-0.18.0-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6ef0befbb5d79cf32d0266f5cff01545602344eda89480e1dd88aca964260b18"}, - {file = "rpds_py-0.18.0-pp310-pypy310_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:1d4acf42190d449d5e89654d5c1ed3a4f17925eec71f05e2a41414689cda02d1"}, - {file = "rpds_py-0.18.0-pp310-pypy310_pp73-musllinux_1_2_i686.whl", hash = "sha256:a5f446dd5055667aabaee78487f2b5ab72e244f9bc0b2ffebfeec79051679984"}, - {file = "rpds_py-0.18.0-pp310-pypy310_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:9dbbeb27f4e70bfd9eec1be5477517365afe05a9b2c441a0b21929ee61048124"}, - {file = "rpds_py-0.18.0-pp38-pypy38_pp73-macosx_10_12_x86_64.whl", hash = "sha256:22806714311a69fd0af9b35b7be97c18a0fc2826e6827dbb3a8c94eac6cf7eeb"}, - {file = "rpds_py-0.18.0-pp38-pypy38_pp73-macosx_11_0_arm64.whl", hash = "sha256:b34ae4636dfc4e76a438ab826a0d1eed2589ca7d9a1b2d5bb546978ac6485461"}, - {file = "rpds_py-0.18.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8c8370641f1a7f0e0669ddccca22f1da893cef7628396431eb445d46d893e5cd"}, - {file = "rpds_py-0.18.0-pp38-pypy38_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c8362467a0fdeccd47935f22c256bec5e6abe543bf0d66e3d3d57a8fb5731863"}, - {file = "rpds_py-0.18.0-pp38-pypy38_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:11a8c85ef4a07a7638180bf04fe189d12757c696eb41f310d2426895356dcf05"}, - {file = "rpds_py-0.18.0-pp38-pypy38_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b316144e85316da2723f9d8dc75bada12fa58489a527091fa1d5a612643d1a0e"}, - {file = "rpds_py-0.18.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cf1ea2e34868f6fbf070e1af291c8180480310173de0b0c43fc38a02929fc0e3"}, - {file = "rpds_py-0.18.0-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:e546e768d08ad55b20b11dbb78a745151acbd938f8f00d0cfbabe8b0199b9880"}, - {file = "rpds_py-0.18.0-pp38-pypy38_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:4901165d170a5fde6f589acb90a6b33629ad1ec976d4529e769c6f3d885e3e80"}, - {file = "rpds_py-0.18.0-pp38-pypy38_pp73-musllinux_1_2_i686.whl", hash = "sha256:618a3d6cae6ef8ec88bb76dd80b83cfe415ad4f1d942ca2a903bf6b6ff97a2da"}, - {file = "rpds_py-0.18.0-pp38-pypy38_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:ed4eb745efbff0a8e9587d22a84be94a5eb7d2d99c02dacf7bd0911713ed14dd"}, - {file = "rpds_py-0.18.0-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:6c81e5f372cd0dc5dc4809553d34f832f60a46034a5f187756d9b90586c2c307"}, - {file = "rpds_py-0.18.0-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:43fbac5f22e25bee1d482c97474f930a353542855f05c1161fd804c9dc74a09d"}, - {file = "rpds_py-0.18.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6d7faa6f14017c0b1e69f5e2c357b998731ea75a442ab3841c0dbbbfe902d2c4"}, - {file = "rpds_py-0.18.0-pp39-pypy39_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:08231ac30a842bd04daabc4d71fddd7e6d26189406d5a69535638e4dcb88fe76"}, - {file = "rpds_py-0.18.0-pp39-pypy39_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:044a3e61a7c2dafacae99d1e722cc2d4c05280790ec5a05031b3876809d89a5c"}, - {file = "rpds_py-0.18.0-pp39-pypy39_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3f26b5bd1079acdb0c7a5645e350fe54d16b17bfc5e71f371c449383d3342e17"}, - {file = "rpds_py-0.18.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:482103aed1dfe2f3b71a58eff35ba105289b8d862551ea576bd15479aba01f66"}, - {file = "rpds_py-0.18.0-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:1374f4129f9bcca53a1bba0bb86bf78325a0374577cf7e9e4cd046b1e6f20e24"}, - {file = "rpds_py-0.18.0-pp39-pypy39_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:635dc434ff724b178cb192c70016cc0ad25a275228f749ee0daf0eddbc8183b1"}, - {file = "rpds_py-0.18.0-pp39-pypy39_pp73-musllinux_1_2_i686.whl", hash = "sha256:bc362ee4e314870a70f4ae88772d72d877246537d9f8cb8f7eacf10884862432"}, - {file = "rpds_py-0.18.0-pp39-pypy39_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:4832d7d380477521a8c1644bbab6588dfedea5e30a7d967b5fb75977c45fd77f"}, - {file = "rpds_py-0.18.0.tar.gz", hash = "sha256:42821446ee7a76f5d9f71f9e33a4fb2ffd724bb3e7f93386150b61a43115788d"}, + {file = "rpds_py-0.18.1-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:d31dea506d718693b6b2cffc0648a8929bdc51c70a311b2770f09611caa10d53"}, + {file = "rpds_py-0.18.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:732672fbc449bab754e0b15356c077cc31566df874964d4801ab14f71951ea80"}, + {file = "rpds_py-0.18.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4a98a1f0552b5f227a3d6422dbd61bc6f30db170939bd87ed14f3c339aa6c7c9"}, + {file = "rpds_py-0.18.1-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:7f1944ce16401aad1e3f7d312247b3d5de7981f634dc9dfe90da72b87d37887d"}, + {file = "rpds_py-0.18.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:38e14fb4e370885c4ecd734f093a2225ee52dc384b86fa55fe3f74638b2cfb09"}, + {file = "rpds_py-0.18.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:08d74b184f9ab6289b87b19fe6a6d1a97fbfea84b8a3e745e87a5de3029bf944"}, + {file = "rpds_py-0.18.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d70129cef4a8d979caa37e7fe957202e7eee8ea02c5e16455bc9808a59c6b2f0"}, + {file = "rpds_py-0.18.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:ce0bb20e3a11bd04461324a6a798af34d503f8d6f1aa3d2aa8901ceaf039176d"}, + {file = "rpds_py-0.18.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:81c5196a790032e0fc2464c0b4ab95f8610f96f1f2fa3d4deacce6a79852da60"}, + {file = "rpds_py-0.18.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:f3027be483868c99b4985fda802a57a67fdf30c5d9a50338d9db646d590198da"}, + {file = "rpds_py-0.18.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:d44607f98caa2961bab4fa3c4309724b185b464cdc3ba6f3d7340bac3ec97cc1"}, + {file = "rpds_py-0.18.1-cp310-none-win32.whl", hash = "sha256:c273e795e7a0f1fddd46e1e3cb8be15634c29ae8ff31c196debb620e1edb9333"}, + {file = "rpds_py-0.18.1-cp310-none-win_amd64.whl", hash = "sha256:8352f48d511de5f973e4f2f9412736d7dea76c69faa6d36bcf885b50c758ab9a"}, + {file = "rpds_py-0.18.1-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:6b5ff7e1d63a8281654b5e2896d7f08799378e594f09cf3674e832ecaf396ce8"}, + {file = "rpds_py-0.18.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:8927638a4d4137a289e41d0fd631551e89fa346d6dbcfc31ad627557d03ceb6d"}, + {file = "rpds_py-0.18.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:154bf5c93d79558b44e5b50cc354aa0459e518e83677791e6adb0b039b7aa6a7"}, + {file = "rpds_py-0.18.1-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:07f2139741e5deb2c5154a7b9629bc5aa48c766b643c1a6750d16f865a82c5fc"}, + {file = "rpds_py-0.18.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8c7672e9fba7425f79019db9945b16e308ed8bc89348c23d955c8c0540da0a07"}, + {file = "rpds_py-0.18.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:489bdfe1abd0406eba6b3bb4fdc87c7fa40f1031de073d0cfb744634cc8fa261"}, + {file = "rpds_py-0.18.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3c20f05e8e3d4fc76875fc9cb8cf24b90a63f5a1b4c5b9273f0e8225e169b100"}, + {file = "rpds_py-0.18.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:967342e045564cef76dfcf1edb700b1e20838d83b1aa02ab313e6a497cf923b8"}, + {file = "rpds_py-0.18.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:2cc7c1a47f3a63282ab0f422d90ddac4aa3034e39fc66a559ab93041e6505da7"}, + {file = "rpds_py-0.18.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:f7afbfee1157e0f9376c00bb232e80a60e59ed716e3211a80cb8506550671e6e"}, + {file = "rpds_py-0.18.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:9e6934d70dc50f9f8ea47081ceafdec09245fd9f6032669c3b45705dea096b88"}, + {file = "rpds_py-0.18.1-cp311-none-win32.whl", hash = "sha256:c69882964516dc143083d3795cb508e806b09fc3800fd0d4cddc1df6c36e76bb"}, + {file = "rpds_py-0.18.1-cp311-none-win_amd64.whl", hash = "sha256:70a838f7754483bcdc830444952fd89645569e7452e3226de4a613a4c1793fb2"}, + {file = "rpds_py-0.18.1-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:3dd3cd86e1db5aadd334e011eba4e29d37a104b403e8ca24dcd6703c68ca55b3"}, + {file = "rpds_py-0.18.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:05f3d615099bd9b13ecf2fc9cf2d839ad3f20239c678f461c753e93755d629ee"}, + {file = "rpds_py-0.18.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:35b2b771b13eee8729a5049c976197ff58a27a3829c018a04341bcf1ae409b2b"}, + {file = "rpds_py-0.18.1-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ee17cd26b97d537af8f33635ef38be873073d516fd425e80559f4585a7b90c43"}, + {file = "rpds_py-0.18.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b646bf655b135ccf4522ed43d6902af37d3f5dbcf0da66c769a2b3938b9d8184"}, + {file = "rpds_py-0.18.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:19ba472b9606c36716062c023afa2484d1e4220548751bda14f725a7de17b4f6"}, + {file = "rpds_py-0.18.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6e30ac5e329098903262dc5bdd7e2086e0256aa762cc8b744f9e7bf2a427d3f8"}, + {file = "rpds_py-0.18.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d58ad6317d188c43750cb76e9deacf6051d0f884d87dc6518e0280438648a9ac"}, + {file = "rpds_py-0.18.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:e1735502458621921cee039c47318cb90b51d532c2766593be6207eec53e5c4c"}, + {file = "rpds_py-0.18.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:f5bab211605d91db0e2995a17b5c6ee5edec1270e46223e513eaa20da20076ac"}, + {file = "rpds_py-0.18.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:2fc24a329a717f9e2448f8cd1f960f9dac4e45b6224d60734edeb67499bab03a"}, + {file = "rpds_py-0.18.1-cp312-none-win32.whl", hash = "sha256:1805d5901779662d599d0e2e4159d8a82c0b05faa86ef9222bf974572286b2b6"}, + {file = "rpds_py-0.18.1-cp312-none-win_amd64.whl", hash = "sha256:720edcb916df872d80f80a1cc5ea9058300b97721efda8651efcd938a9c70a72"}, + {file = "rpds_py-0.18.1-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:c827576e2fa017a081346dce87d532a5310241648eb3700af9a571a6e9fc7e74"}, + {file = "rpds_py-0.18.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:aa3679e751408d75a0b4d8d26d6647b6d9326f5e35c00a7ccd82b78ef64f65f8"}, + {file = "rpds_py-0.18.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0abeee75434e2ee2d142d650d1e54ac1f8b01e6e6abdde8ffd6eeac6e9c38e20"}, + {file = "rpds_py-0.18.1-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ed402d6153c5d519a0faf1bb69898e97fb31613b49da27a84a13935ea9164dfc"}, + {file = "rpds_py-0.18.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:338dee44b0cef8b70fd2ef54b4e09bb1b97fc6c3a58fea5db6cc083fd9fc2724"}, + {file = "rpds_py-0.18.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7750569d9526199c5b97e5a9f8d96a13300950d910cf04a861d96f4273d5b104"}, + {file = "rpds_py-0.18.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:607345bd5912aacc0c5a63d45a1f73fef29e697884f7e861094e443187c02be5"}, + {file = "rpds_py-0.18.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:207c82978115baa1fd8d706d720b4a4d2b0913df1c78c85ba73fe6c5804505f0"}, + {file = "rpds_py-0.18.1-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:6d1e42d2735d437e7e80bab4d78eb2e459af48c0a46e686ea35f690b93db792d"}, + {file = "rpds_py-0.18.1-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:5463c47c08630007dc0fe99fb480ea4f34a89712410592380425a9b4e1611d8e"}, + {file = "rpds_py-0.18.1-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:06d218939e1bf2ca50e6b0ec700ffe755e5216a8230ab3e87c059ebb4ea06afc"}, + {file = "rpds_py-0.18.1-cp38-none-win32.whl", hash = "sha256:312fe69b4fe1ffbe76520a7676b1e5ac06ddf7826d764cc10265c3b53f96dbe9"}, + {file = "rpds_py-0.18.1-cp38-none-win_amd64.whl", hash = "sha256:9437ca26784120a279f3137ee080b0e717012c42921eb07861b412340f85bae2"}, + {file = "rpds_py-0.18.1-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:19e515b78c3fc1039dd7da0a33c28c3154458f947f4dc198d3c72db2b6b5dc93"}, + {file = "rpds_py-0.18.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a7b28c5b066bca9a4eb4e2f2663012debe680f097979d880657f00e1c30875a0"}, + {file = "rpds_py-0.18.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:673fdbbf668dd958eff750e500495ef3f611e2ecc209464f661bc82e9838991e"}, + {file = "rpds_py-0.18.1-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d960de62227635d2e61068f42a6cb6aae91a7fe00fca0e3aeed17667c8a34611"}, + {file = "rpds_py-0.18.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:352a88dc7892f1da66b6027af06a2e7e5d53fe05924cc2cfc56495b586a10b72"}, + {file = "rpds_py-0.18.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4e0ee01ad8260184db21468a6e1c37afa0529acc12c3a697ee498d3c2c4dcaf3"}, + {file = "rpds_py-0.18.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e4c39ad2f512b4041343ea3c7894339e4ca7839ac38ca83d68a832fc8b3748ab"}, + {file = "rpds_py-0.18.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:aaa71ee43a703c321906813bb252f69524f02aa05bf4eec85f0c41d5d62d0f4c"}, + {file = "rpds_py-0.18.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:6cd8098517c64a85e790657e7b1e509b9fe07487fd358e19431cb120f7d96338"}, + {file = "rpds_py-0.18.1-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:4adec039b8e2928983f885c53b7cc4cda8965b62b6596501a0308d2703f8af1b"}, + {file = "rpds_py-0.18.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:32b7daaa3e9389db3695964ce8e566e3413b0c43e3394c05e4b243a4cd7bef26"}, + {file = "rpds_py-0.18.1-cp39-none-win32.whl", hash = "sha256:2625f03b105328729f9450c8badda34d5243231eef6535f80064d57035738360"}, + {file = "rpds_py-0.18.1-cp39-none-win_amd64.whl", hash = "sha256:bf18932d0003c8c4d51a39f244231986ab23ee057d235a12b2684ea26a353590"}, + {file = "rpds_py-0.18.1-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:cbfbea39ba64f5e53ae2915de36f130588bba71245b418060ec3330ebf85678e"}, + {file = "rpds_py-0.18.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:a3d456ff2a6a4d2adcdf3c1c960a36f4fd2fec6e3b4902a42a384d17cf4e7a65"}, + {file = "rpds_py-0.18.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7700936ef9d006b7ef605dc53aa364da2de5a3aa65516a1f3ce73bf82ecfc7ae"}, + {file = "rpds_py-0.18.1-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:51584acc5916212e1bf45edd17f3a6b05fe0cbb40482d25e619f824dccb679de"}, + {file = "rpds_py-0.18.1-pp310-pypy310_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:942695a206a58d2575033ff1e42b12b2aece98d6003c6bc739fbf33d1773b12f"}, + {file = "rpds_py-0.18.1-pp310-pypy310_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b906b5f58892813e5ba5c6056d6a5ad08f358ba49f046d910ad992196ea61397"}, + {file = "rpds_py-0.18.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f6f8e3fecca256fefc91bb6765a693d96692459d7d4c644660a9fff32e517843"}, + {file = "rpds_py-0.18.1-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:7732770412bab81c5a9f6d20aeb60ae943a9b36dcd990d876a773526468e7163"}, + {file = "rpds_py-0.18.1-pp310-pypy310_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:bd1105b50ede37461c1d51b9698c4f4be6e13e69a908ab7751e3807985fc0346"}, + {file = "rpds_py-0.18.1-pp310-pypy310_pp73-musllinux_1_2_i686.whl", hash = "sha256:618916f5535784960f3ecf8111581f4ad31d347c3de66d02e728de460a46303c"}, + {file = "rpds_py-0.18.1-pp310-pypy310_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:17c6d2155e2423f7e79e3bb18151c686d40db42d8645e7977442170c360194d4"}, + {file = "rpds_py-0.18.1-pp38-pypy38_pp73-macosx_10_12_x86_64.whl", hash = "sha256:6c4c4c3f878df21faf5fac86eda32671c27889e13570645a9eea0a1abdd50922"}, + {file = "rpds_py-0.18.1-pp38-pypy38_pp73-macosx_11_0_arm64.whl", hash = "sha256:fab6ce90574645a0d6c58890e9bcaac8d94dff54fb51c69e5522a7358b80ab64"}, + {file = "rpds_py-0.18.1-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:531796fb842b53f2695e94dc338929e9f9dbf473b64710c28af5a160b2a8927d"}, + {file = "rpds_py-0.18.1-pp38-pypy38_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:740884bc62a5e2bbb31e584f5d23b32320fd75d79f916f15a788d527a5e83644"}, + {file = "rpds_py-0.18.1-pp38-pypy38_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:998125738de0158f088aef3cb264a34251908dd2e5d9966774fdab7402edfab7"}, + {file = "rpds_py-0.18.1-pp38-pypy38_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e2be6e9dd4111d5b31ba3b74d17da54a8319d8168890fbaea4b9e5c3de630ae5"}, + {file = "rpds_py-0.18.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d0cee71bc618cd93716f3c1bf56653740d2d13ddbd47673efa8bf41435a60daa"}, + {file = "rpds_py-0.18.1-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2c3caec4ec5cd1d18e5dd6ae5194d24ed12785212a90b37f5f7f06b8bedd7139"}, + {file = "rpds_py-0.18.1-pp38-pypy38_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:27bba383e8c5231cd559affe169ca0b96ec78d39909ffd817f28b166d7ddd4d8"}, + {file = "rpds_py-0.18.1-pp38-pypy38_pp73-musllinux_1_2_i686.whl", hash = "sha256:a888e8bdb45916234b99da2d859566f1e8a1d2275a801bb8e4a9644e3c7e7909"}, + {file = "rpds_py-0.18.1-pp38-pypy38_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:6031b25fb1b06327b43d841f33842b383beba399884f8228a6bb3df3088485ff"}, + {file = "rpds_py-0.18.1-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:48c2faaa8adfacefcbfdb5f2e2e7bdad081e5ace8d182e5f4ade971f128e6bb3"}, + {file = "rpds_py-0.18.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:d85164315bd68c0806768dc6bb0429c6f95c354f87485ee3593c4f6b14def2bd"}, + {file = "rpds_py-0.18.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6afd80f6c79893cfc0574956f78a0add8c76e3696f2d6a15bca2c66c415cf2d4"}, + {file = "rpds_py-0.18.1-pp39-pypy39_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:fa242ac1ff583e4ec7771141606aafc92b361cd90a05c30d93e343a0c2d82a89"}, + {file = "rpds_py-0.18.1-pp39-pypy39_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d21be4770ff4e08698e1e8e0bce06edb6ea0626e7c8f560bc08222880aca6a6f"}, + {file = "rpds_py-0.18.1-pp39-pypy39_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5c45a639e93a0c5d4b788b2613bd637468edd62f8f95ebc6fcc303d58ab3f0a8"}, + {file = "rpds_py-0.18.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:910e71711d1055b2768181efa0a17537b2622afeb0424116619817007f8a2b10"}, + {file = "rpds_py-0.18.1-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b9bb1f182a97880f6078283b3505a707057c42bf55d8fca604f70dedfdc0772a"}, + {file = "rpds_py-0.18.1-pp39-pypy39_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:1d54f74f40b1f7aaa595a02ff42ef38ca654b1469bef7d52867da474243cc633"}, + {file = "rpds_py-0.18.1-pp39-pypy39_pp73-musllinux_1_2_i686.whl", hash = "sha256:8d2e182c9ee01135e11e9676e9a62dfad791a7a467738f06726872374a83db49"}, + {file = "rpds_py-0.18.1-pp39-pypy39_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:636a15acc588f70fda1661234761f9ed9ad79ebed3f2125d44be0862708b666e"}, + {file = "rpds_py-0.18.1.tar.gz", hash = "sha256:dc48b479d540770c811fbd1eb9ba2bb66951863e448efec2e2c102625328e92f"}, ] [[package]] @@ -3803,13 +4009,13 @@ urllib3 = "*" [[package]] name = "sentry-sdk" -version = "1.40.6" +version = "2.5.1" description = "Python client for Sentry (https://sentry.io)" optional = false -python-versions = "*" +python-versions = ">=3.6" files = [ - {file = "sentry-sdk-1.40.6.tar.gz", hash = "sha256:f143f3fb4bb57c90abef6e2ad06b5f6f02b2ca13e4060ec5c0549c7a9ccce3fa"}, - {file = "sentry_sdk-1.40.6-py2.py3-none-any.whl", hash = "sha256:becda09660df63e55f307570e9817c664392655a7328bbc414b507e9cb874c67"}, + {file = "sentry_sdk-2.5.1-py2.py3-none-any.whl", hash = "sha256:1f87acdce4a43a523ae5aa21a3fc37522d73ebd9ec04b1dbf01aa3d173852def"}, + {file = "sentry_sdk-2.5.1.tar.gz", hash = "sha256:fbc40a78a8a9c6675133031116144f0d0940376fa6e4e1acd5624c90b0aaf58b"}, ] [package.dependencies] @@ -3817,28 +4023,33 @@ blinker = {version = ">=1.1", optional = true, markers = "extra == \"flask\""} certifi = "*" flask = {version = ">=0.11", optional = true, markers = "extra == \"flask\""} markupsafe = {version = "*", optional = true, markers = "extra == \"flask\""} -urllib3 = {version = ">=1.26.11", markers = "python_version >= \"3.6\""} +urllib3 = ">=1.26.11" [package.extras] aiohttp = ["aiohttp (>=3.5)"] +anthropic = ["anthropic (>=0.16)"] arq = ["arq (>=0.23)"] asyncpg = ["asyncpg (>=0.23)"] beam = ["apache-beam (>=2.12)"] bottle = ["bottle (>=0.12.13)"] celery = ["celery (>=3)"] +celery-redbeat = ["celery-redbeat (>=2)"] chalice = ["chalice (>=1.16.0)"] clickhouse-driver = ["clickhouse-driver (>=0.2.0)"] django = ["django (>=1.8)"] falcon = ["falcon (>=1.4)"] fastapi = ["fastapi (>=0.79.0)"] flask = ["blinker (>=1.1)", "flask (>=0.11)", "markupsafe"] -grpcio = ["grpcio (>=1.21.1)"] +grpcio = ["grpcio (>=1.21.1)", "protobuf (>=3.8.0)"] httpx = ["httpx (>=0.16.0)"] huey = ["huey (>=2)"] +huggingface-hub = ["huggingface-hub (>=0.22)"] +langchain = ["langchain (>=0.0.210)"] loguru = ["loguru (>=0.5)"] +openai = ["openai (>=1.0.0)", "tiktoken (>=0.3.0)"] opentelemetry = ["opentelemetry-distro (>=0.35b0)"] opentelemetry-experimental = ["opentelemetry-distro (>=0.40b0,<1.0)", "opentelemetry-instrumentation-aiohttp-client (>=0.40b0,<1.0)", "opentelemetry-instrumentation-django (>=0.40b0,<1.0)", "opentelemetry-instrumentation-fastapi (>=0.40b0,<1.0)", "opentelemetry-instrumentation-flask (>=0.40b0,<1.0)", "opentelemetry-instrumentation-requests (>=0.40b0,<1.0)", "opentelemetry-instrumentation-sqlite3 (>=0.40b0,<1.0)", "opentelemetry-instrumentation-urllib (>=0.40b0,<1.0)"] -pure-eval = ["asttokens", "executing", "pure_eval"] +pure-eval = ["asttokens", "executing", "pure-eval"] pymongo = ["pymongo (>=3.1)"] pyspark = ["pyspark (>=2.4.4)"] quart = ["blinker (>=1.1)", "quart (>=0.16.1)"] @@ -3851,19 +4062,18 @@ tornado = ["tornado (>=5)"] [[package]] name = "setuptools" -version = "69.1.1" +version = "70.0.0" description = "Easily download, build, install, upgrade, and uninstall Python packages" optional = false python-versions = ">=3.8" files = [ - {file = "setuptools-69.1.1-py3-none-any.whl", hash = "sha256:02fa291a0471b3a18b2b2481ed902af520c69e8ae0919c13da936542754b4c56"}, - {file = "setuptools-69.1.1.tar.gz", hash = "sha256:5c0806c7d9af348e6dd3777b4f4dbb42c7ad85b190104837488eab9a7c945cf8"}, + {file = "setuptools-70.0.0-py3-none-any.whl", hash = "sha256:54faa7f2e8d2d11bcd2c07bed282eef1046b5c080d1c32add737d7b5817b1ad4"}, + {file = "setuptools-70.0.0.tar.gz", hash = "sha256:f211a66637b8fa059bb28183da127d4e86396c991a942b028c6650d4319c3fd0"}, ] [package.extras] -docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier"] -testing = ["build[virtualenv]", "filelock (>=3.4.0)", "flake8-2020", "ini2toml[lite] (>=0.9)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "packaging (>=23.2)", "pip (>=19.1)", "pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-home (>=0.5)", "pytest-mypy (>=0.9.1)", "pytest-perf", "pytest-ruff (>=0.2.1)", "pytest-timeout", "pytest-xdist", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] -testing-integration = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "packaging (>=23.2)", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"] +docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "pyproject-hooks (!=1.1)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier"] +testing = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "importlib-metadata", "ini2toml[lite] (>=0.14)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "mypy (==1.9)", "packaging (>=23.2)", "pip (>=19.1)", "pyproject-hooks (!=1.1)", "pytest (>=6,!=8.1.1)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-home (>=0.5)", "pytest-mypy", "pytest-perf", "pytest-ruff (>=0.2.1)", "pytest-subprocess", "pytest-timeout", "pytest-xdist (>=3)", "tomli", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] [[package]] name = "sickle" @@ -4033,20 +4243,20 @@ files = [ [[package]] name = "sphinx" -version = "7.2.6" +version = "7.3.7" description = "Python documentation generator" optional = false python-versions = ">=3.9" files = [ - {file = "sphinx-7.2.6-py3-none-any.whl", hash = "sha256:1e09160a40b956dc623c910118fa636da93bd3ca0b9876a7b3df90f07d691560"}, - {file = "sphinx-7.2.6.tar.gz", hash = "sha256:9a5160e1ea90688d5963ba09a2dcd8bdd526620edbb65c328728f1b2228d5ab5"}, + {file = "sphinx-7.3.7-py3-none-any.whl", hash = "sha256:413f75440be4cacf328f580b4274ada4565fb2187d696a84970c23f77b64d8c3"}, + {file = "sphinx-7.3.7.tar.gz", hash = "sha256:a4a7db75ed37531c05002d56ed6948d4c42f473a36f46e1382b0bd76ca9627bc"}, ] [package.dependencies] -alabaster = ">=0.7,<0.8" +alabaster = ">=0.7.14,<0.8.0" babel = ">=2.9" colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""} -docutils = ">=0.18.1,<0.21" +docutils = ">=0.18.1,<0.22" imagesize = ">=1.3" importlib-metadata = {version = ">=4.8", markers = "python_version < \"3.10\""} Jinja2 = ">=3.0" @@ -4060,11 +4270,12 @@ sphinxcontrib-htmlhelp = ">=2.0.0" sphinxcontrib-jsmath = "*" sphinxcontrib-qthelp = "*" sphinxcontrib-serializinghtml = ">=1.1.9" +tomli = {version = ">=2", markers = "python_version < \"3.11\""} [package.extras] docs = ["sphinxcontrib-websupport"] -lint = ["docutils-stubs", "flake8 (>=3.5.0)", "flake8-simplify", "isort", "mypy (>=0.990)", "ruff", "sphinx-lint", "types-requests"] -test = ["cython (>=3.0)", "filelock", "html5lib", "pytest (>=4.6)", "setuptools (>=67.0)"] +lint = ["flake8 (>=3.5.0)", "importlib_metadata", "mypy (==1.9.0)", "pytest (>=6.0)", "ruff (==0.3.7)", "sphinx-lint", "tomli", "types-docutils", "types-requests"] +test = ["cython (>=3.0)", "defusedxml (>=0.7.1)", "pytest (>=6.0)", "setuptools (>=67.0)"] [[package]] name = "sphinxcontrib-applehelp" @@ -4162,36 +4373,57 @@ test = ["pytest"] [[package]] name = "sqlalchemy" -version = "1.4.51" +version = "1.4.52" description = "Database Abstraction Library" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,>=2.7" files = [ - {file = "SQLAlchemy-1.4.51-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2be4e6294c53f2ec8ea36486b56390e3bcaa052bf3a9a47005687ccf376745d1"}, - {file = "SQLAlchemy-1.4.51-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8ca484ca11c65e05639ffe80f20d45e6be81fbec7683d6c9a15cd421e6e8b340"}, - {file = "SQLAlchemy-1.4.51-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:0535d5b57d014d06ceeaeffd816bb3a6e2dddeb670222570b8c4953e2d2ea678"}, - {file = "SQLAlchemy-1.4.51-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:af55cc207865d641a57f7044e98b08b09220da3d1b13a46f26487cc2f898a072"}, - {file = "SQLAlchemy-1.4.51-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7deeae5071930abb3669b5185abb6c33ddfd2398f87660fafdb9e6a5fb0f3f2f"}, - {file = "SQLAlchemy-1.4.51-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0892e7ac8bc76da499ad3ee8de8da4d7905a3110b952e2a35a940dab1ffa550e"}, - {file = "SQLAlchemy-1.4.51-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6cacc0b2dd7d22a918a9642fc89840a5d3cee18a0e1fe41080b1141b23b10916"}, - {file = "SQLAlchemy-1.4.51-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:245c67c88e63f1523e9216cad6ba3107dea2d3ee19adc359597a628afcabfbcb"}, - {file = "SQLAlchemy-1.4.51-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3ec7a0ed9b32afdf337172678a4a0e6419775ba4e649b66f49415615fa47efbd"}, - {file = "SQLAlchemy-1.4.51-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:352df882088a55293f621328ec33b6ffca936ad7f23013b22520542e1ab6ad1b"}, - {file = "SQLAlchemy-1.4.51-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:86a22143a4001f53bf58027b044da1fb10d67b62a785fc1390b5c7f089d9838c"}, - {file = "SQLAlchemy-1.4.51-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c37bc677690fd33932182b85d37433845de612962ed080c3e4d92f758d1bd894"}, - {file = "SQLAlchemy-1.4.51-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2c55040d8ea65414de7c47f1a23823cd9f3fad0dc93e6b6b728fee81230f817b"}, - {file = "SQLAlchemy-1.4.51-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:38ef80328e3fee2be0a1abe3fe9445d3a2e52a1282ba342d0dab6edf1fef4707"}, - {file = "SQLAlchemy-1.4.51-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f8cafa6f885a0ff5e39efa9325195217bb47d5929ab0051636610d24aef45ade"}, - {file = "SQLAlchemy-1.4.51-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e8f2df79a46e130235bc5e1bbef4de0583fb19d481eaa0bffa76e8347ea45ec6"}, - {file = "SQLAlchemy-1.4.51-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:eb18549b770351b54e1ab5da37d22bc530b8bfe2ee31e22b9ebe650640d2ef12"}, - {file = "SQLAlchemy-1.4.51-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:55e699466106d09f028ab78d3c2e1f621b5ef2c8694598242259e4515715da7c"}, - {file = "SQLAlchemy-1.4.51-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:2ad16880ccd971ac8e570550fbdef1385e094b022d6fc85ef3ce7df400dddad3"}, - {file = "SQLAlchemy-1.4.51-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b97fd5bb6b7c1a64b7ac0632f7ce389b8ab362e7bd5f60654c2a418496be5d7f"}, - {file = "SQLAlchemy-1.4.51-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e646b19f47d655261b22df9976e572f588185279970efba3d45c377127d35349"}, - {file = "SQLAlchemy-1.4.51-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d3cf56cc36d42908495760b223ca9c2c0f9f0002b4eddc994b24db5fcb86a9e4"}, - {file = "SQLAlchemy-1.4.51-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:0d661cff58c91726c601cc0ee626bf167b20cc4d7941c93c5f3ac28dc34ddbea"}, - {file = "SQLAlchemy-1.4.51-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3823dda635988e6744d4417e13f2e2b5fe76c4bf29dd67e95f98717e1b094cad"}, - {file = "SQLAlchemy-1.4.51.tar.gz", hash = "sha256:e7908c2025eb18394e32d65dd02d2e37e17d733cdbe7d78231c2b6d7eb20cdb9"}, + {file = "SQLAlchemy-1.4.52-cp310-cp310-macosx_11_0_x86_64.whl", hash = "sha256:f68016f9a5713684c1507cc37133c28035f29925c75c0df2f9d0f7571e23720a"}, + {file = "SQLAlchemy-1.4.52-cp310-cp310-manylinux1_x86_64.manylinux2010_x86_64.manylinux_2_12_x86_64.manylinux_2_5_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:24bb0f81fbbb13d737b7f76d1821ec0b117ce8cbb8ee5e8641ad2de41aa916d3"}, + {file = "SQLAlchemy-1.4.52-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e93983cc0d2edae253b3f2141b0a3fb07e41c76cd79c2ad743fc27eb79c3f6db"}, + {file = "SQLAlchemy-1.4.52-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:84e10772cfc333eb08d0b7ef808cd76e4a9a30a725fb62a0495877a57ee41d81"}, + {file = "SQLAlchemy-1.4.52-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:427988398d2902de042093d17f2b9619a5ebc605bf6372f7d70e29bde6736842"}, + {file = "SQLAlchemy-1.4.52-cp310-cp310-win32.whl", hash = "sha256:1296f2cdd6db09b98ceb3c93025f0da4835303b8ac46c15c2136e27ee4d18d94"}, + {file = "SQLAlchemy-1.4.52-cp310-cp310-win_amd64.whl", hash = "sha256:80e7f697bccc56ac6eac9e2df5c98b47de57e7006d2e46e1a3c17c546254f6ef"}, + {file = "SQLAlchemy-1.4.52-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:2f251af4c75a675ea42766880ff430ac33291c8d0057acca79710f9e5a77383d"}, + {file = "SQLAlchemy-1.4.52-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cb8f9e4c4718f111d7b530c4e6fb4d28f9f110eb82e7961412955b3875b66de0"}, + {file = "SQLAlchemy-1.4.52-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:afb1672b57f58c0318ad2cff80b384e816735ffc7e848d8aa51e0b0fc2f4b7bb"}, + {file = "SQLAlchemy-1.4.52-cp311-cp311-win32.whl", hash = "sha256:6e41cb5cda641f3754568d2ed8962f772a7f2b59403b95c60c89f3e0bd25f15e"}, + {file = "SQLAlchemy-1.4.52-cp311-cp311-win_amd64.whl", hash = "sha256:5bed4f8c3b69779de9d99eb03fd9ab67a850d74ab0243d1be9d4080e77b6af12"}, + {file = "SQLAlchemy-1.4.52-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:49e3772eb3380ac88d35495843daf3c03f094b713e66c7d017e322144a5c6b7c"}, + {file = "SQLAlchemy-1.4.52-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:618827c1a1c243d2540314c6e100aee7af09a709bd005bae971686fab6723554"}, + {file = "SQLAlchemy-1.4.52-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:de9acf369aaadb71a725b7e83a5ef40ca3de1cf4cdc93fa847df6b12d3cd924b"}, + {file = "SQLAlchemy-1.4.52-cp312-cp312-win32.whl", hash = "sha256:763bd97c4ebc74136ecf3526b34808c58945023a59927b416acebcd68d1fc126"}, + {file = "SQLAlchemy-1.4.52-cp312-cp312-win_amd64.whl", hash = "sha256:f12aaf94f4d9679ca475975578739e12cc5b461172e04d66f7a3c39dd14ffc64"}, + {file = "SQLAlchemy-1.4.52-cp36-cp36m-macosx_10_14_x86_64.whl", hash = "sha256:853fcfd1f54224ea7aabcf34b227d2b64a08cbac116ecf376907968b29b8e763"}, + {file = "SQLAlchemy-1.4.52-cp36-cp36m-manylinux1_x86_64.manylinux2010_x86_64.manylinux_2_12_x86_64.manylinux_2_5_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f98dbb8fcc6d1c03ae8ec735d3c62110949a3b8bc6e215053aa27096857afb45"}, + {file = "SQLAlchemy-1.4.52-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1e135fff2e84103bc15c07edd8569612ce317d64bdb391f49ce57124a73f45c5"}, + {file = "SQLAlchemy-1.4.52-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:5b5de6af8852500d01398f5047d62ca3431d1e29a331d0b56c3e14cb03f8094c"}, + {file = "SQLAlchemy-1.4.52-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3491c85df263a5c2157c594f54a1a9c72265b75d3777e61ee13c556d9e43ffc9"}, + {file = "SQLAlchemy-1.4.52-cp36-cp36m-win32.whl", hash = "sha256:427c282dd0deba1f07bcbf499cbcc9fe9a626743f5d4989bfdfd3ed3513003dd"}, + {file = "SQLAlchemy-1.4.52-cp36-cp36m-win_amd64.whl", hash = "sha256:ca5ce82b11731492204cff8845c5e8ca1a4bd1ade85e3b8fcf86e7601bfc6a39"}, + {file = "SQLAlchemy-1.4.52-cp37-cp37m-macosx_11_0_x86_64.whl", hash = "sha256:29d4247313abb2015f8979137fe65f4eaceead5247d39603cc4b4a610936cd2b"}, + {file = "SQLAlchemy-1.4.52-cp37-cp37m-manylinux1_x86_64.manylinux2010_x86_64.manylinux_2_12_x86_64.manylinux_2_5_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a752bff4796bf22803d052d4841ebc3c55c26fb65551f2c96e90ac7c62be763a"}, + {file = "SQLAlchemy-1.4.52-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f7ea11727feb2861deaa293c7971a4df57ef1c90e42cb53f0da40c3468388000"}, + {file = "SQLAlchemy-1.4.52-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:d913f8953e098ca931ad7f58797f91deed26b435ec3756478b75c608aa80d139"}, + {file = "SQLAlchemy-1.4.52-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a251146b921725547ea1735b060a11e1be705017b568c9f8067ca61e6ef85f20"}, + {file = "SQLAlchemy-1.4.52-cp37-cp37m-win32.whl", hash = "sha256:1f8e1c6a6b7f8e9407ad9afc0ea41c1f65225ce505b79bc0342159de9c890782"}, + {file = "SQLAlchemy-1.4.52-cp37-cp37m-win_amd64.whl", hash = "sha256:346ed50cb2c30f5d7a03d888e25744154ceac6f0e6e1ab3bc7b5b77138d37710"}, + {file = "SQLAlchemy-1.4.52-cp38-cp38-macosx_11_0_x86_64.whl", hash = "sha256:4dae6001457d4497736e3bc422165f107ecdd70b0d651fab7f731276e8b9e12d"}, + {file = "SQLAlchemy-1.4.52-cp38-cp38-manylinux1_x86_64.manylinux2010_x86_64.manylinux_2_12_x86_64.manylinux_2_5_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a5d2e08d79f5bf250afb4a61426b41026e448da446b55e4770c2afdc1e200fce"}, + {file = "SQLAlchemy-1.4.52-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5bbce5dd7c7735e01d24f5a60177f3e589078f83c8a29e124a6521b76d825b85"}, + {file = "SQLAlchemy-1.4.52-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:bdb7b4d889631a3b2a81a3347c4c3f031812eb4adeaa3ee4e6b0d028ad1852b5"}, + {file = "SQLAlchemy-1.4.52-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c294ae4e6bbd060dd79e2bd5bba8b6274d08ffd65b58d106394cb6abbf35cf45"}, + {file = "SQLAlchemy-1.4.52-cp38-cp38-win32.whl", hash = "sha256:bcdfb4b47fe04967669874fb1ce782a006756fdbebe7263f6a000e1db969120e"}, + {file = "SQLAlchemy-1.4.52-cp38-cp38-win_amd64.whl", hash = "sha256:7d0dbc56cb6af5088f3658982d3d8c1d6a82691f31f7b0da682c7b98fa914e91"}, + {file = "SQLAlchemy-1.4.52-cp39-cp39-macosx_11_0_x86_64.whl", hash = "sha256:a551d5f3dc63f096ed41775ceec72fdf91462bb95abdc179010dc95a93957800"}, + {file = "SQLAlchemy-1.4.52-cp39-cp39-manylinux1_x86_64.manylinux2010_x86_64.manylinux_2_12_x86_64.manylinux_2_5_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6ab773f9ad848118df7a9bbabca53e3f1002387cdbb6ee81693db808b82aaab0"}, + {file = "SQLAlchemy-1.4.52-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d2de46f5d5396d5331127cfa71f837cca945f9a2b04f7cb5a01949cf676db7d1"}, + {file = "SQLAlchemy-1.4.52-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:7027be7930a90d18a386b25ee8af30514c61f3852c7268899f23fdfbd3107181"}, + {file = "SQLAlchemy-1.4.52-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:99224d621affbb3c1a4f72b631f8393045f4ce647dd3262f12fe3576918f8bf3"}, + {file = "SQLAlchemy-1.4.52-cp39-cp39-win32.whl", hash = "sha256:c124912fd4e1bb9d1e7dc193ed482a9f812769cb1e69363ab68e01801e859821"}, + {file = "SQLAlchemy-1.4.52-cp39-cp39-win_amd64.whl", hash = "sha256:2c286fab42e49db23c46ab02479f328b8bdb837d3e281cae546cc4085c83b680"}, + {file = "SQLAlchemy-1.4.52.tar.gz", hash = "sha256:80e63bbdc5217dad3485059bdf6f65a7d43f33c8bde619df5c220edf03d87296"}, ] [package.dependencies] @@ -4220,17 +4452,17 @@ sqlcipher = ["sqlcipher3_binary"] [[package]] name = "sqlalchemy-continuum" -version = "1.4.0" +version = "1.4.1" description = "Versioning and auditing extension for SQLAlchemy." optional = false python-versions = "*" files = [ - {file = "SQLAlchemy-Continuum-1.4.0.tar.gz", hash = "sha256:464f9a5b106352b5ee44f139312cb358c592d25eeaae3537c0eac72c2fafb5e5"}, - {file = "SQLAlchemy_Continuum-1.4.0-py3-none-any.whl", hash = "sha256:a1de72660bb026cfaa6b8922ef79efaed5e7bc5e423f1d792d4c38e08ffaf3ae"}, + {file = "SQLAlchemy-Continuum-1.4.1.tar.gz", hash = "sha256:e01646cdfbfd6b31a21b0aeba6bbff661258d5be8477c7500cab3a1c74848e6e"}, + {file = "SQLAlchemy_Continuum-1.4.1-py3-none-any.whl", hash = "sha256:f884ab36b1be724ecba867f21557f8f4658c1fb9dee6df8fe9a39b63d485bdd5"}, ] [package.dependencies] -SQLAlchemy = ">=1.4.0" +SQLAlchemy = ">=1.4.0,<=2.0.21" SQLAlchemy-Utils = ">=0.30.12" [package.extras] @@ -4287,6 +4519,17 @@ pure-eval = "*" [package.extras] tests = ["cython", "littleutils", "pygments", "pytest", "typeguard"] +[[package]] +name = "toml" +version = "0.10.2" +description = "Python Library for Tom's Obvious, Minimal Language" +optional = false +python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" +files = [ + {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, + {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, +] + [[package]] name = "tomli" version = "2.0.1" @@ -4300,39 +4543,39 @@ files = [ [[package]] name = "traitlets" -version = "5.14.1" +version = "5.14.3" description = "Traitlets Python configuration system" optional = false python-versions = ">=3.8" files = [ - {file = "traitlets-5.14.1-py3-none-any.whl", hash = "sha256:2e5a030e6eff91737c643231bfcf04a65b0132078dad75e4936700b213652e74"}, - {file = "traitlets-5.14.1.tar.gz", hash = "sha256:8585105b371a04b8316a43d5ce29c098575c2e477850b62b848b964f1444527e"}, + {file = "traitlets-5.14.3-py3-none-any.whl", hash = "sha256:b74e89e397b1ed28cc831db7aea759ba6640cb3de13090ca145426688ff1ac4f"}, + {file = "traitlets-5.14.3.tar.gz", hash = "sha256:9ed0579d3502c94b4b3732ac120375cda96f923114522847de4b3bb98b96b6b7"}, ] [package.extras] docs = ["myst-parser", "pydata-sphinx-theme", "sphinx"] -test = ["argcomplete (>=3.0.3)", "mypy (>=1.7.0)", "pre-commit", "pytest (>=7.0,<7.5)", "pytest-mock", "pytest-mypy-testing"] +test = ["argcomplete (>=3.0.3)", "mypy (>=1.7.0)", "pre-commit", "pytest (>=7.0,<8.2)", "pytest-mock", "pytest-mypy-testing"] [[package]] name = "types-python-dateutil" -version = "2.8.19.20240106" +version = "2.9.0.20240316" description = "Typing stubs for python-dateutil" optional = false python-versions = ">=3.8" files = [ - {file = "types-python-dateutil-2.8.19.20240106.tar.gz", hash = "sha256:1f8db221c3b98e6ca02ea83a58371b22c374f42ae5bbdf186db9c9a76581459f"}, - {file = "types_python_dateutil-2.8.19.20240106-py3-none-any.whl", hash = "sha256:efbbdc54590d0f16152fa103c9879c7d4a00e82078f6e2cf01769042165acaa2"}, + {file = "types-python-dateutil-2.9.0.20240316.tar.gz", hash = "sha256:5d2f2e240b86905e40944dd787db6da9263f0deabef1076ddaed797351ec0202"}, + {file = "types_python_dateutil-2.9.0.20240316-py3-none-any.whl", hash = "sha256:6b8cb66d960771ce5ff974e9dd45e38facb81718cc1e208b10b1baccbfdbee3b"}, ] [[package]] name = "typing-extensions" -version = "4.10.0" +version = "4.12.2" description = "Backported and Experimental Type Hints for Python 3.8+" optional = false python-versions = ">=3.8" files = [ - {file = "typing_extensions-4.10.0-py3-none-any.whl", hash = "sha256:69b1a937c3a517342112fb4c6df7e72fc39a38e7891a5730ed4985b5214b5475"}, - {file = "typing_extensions-4.10.0.tar.gz", hash = "sha256:b0abd7c89e8fb96f98db18d86106ff1d90ab692004eb746cf6eda2682f91b3cb"}, + {file = "typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d"}, + {file = "typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8"}, ] [[package]] @@ -4357,52 +4600,42 @@ files = [ {file = "uritemplate-4.1.1.tar.gz", hash = "sha256:4346edfc5c3b79f694bccd6d6099a322bbeb628dbf2cd86eea55a456ce5124f0"}, ] -[[package]] -name = "uritemplate-py" -version = "1.0.1" -description = "URI templates" -optional = false -python-versions = "*" -files = [ - {file = "uritemplate.py-1.0.1-py2-none-any.whl", hash = "sha256:f34e1594bc95eb4e1ed3f10bcd7bd09b344dc42d512af2e3f5b0c73f879cbb0e"}, - {file = "uritemplate.py-1.0.1.tar.gz", hash = "sha256:0114a587830229bd1dea03bfb8201a04d212d648ce16847f6f5887771305886a"}, -] - [[package]] name = "uritools" -version = "4.0.2" +version = "4.0.3" description = "URI parsing, classification and composition" optional = false python-versions = ">=3.7" files = [ - {file = "uritools-4.0.2-py3-none-any.whl", hash = "sha256:607b15eae1e7b69a120f463a7d98f91a56671e1ab92aae13f8e1f25c017fe60e"}, - {file = "uritools-4.0.2.tar.gz", hash = "sha256:04df2b787d0eb76200e8319382a03562fbfe4741fd66c15506b08d3b8211d573"}, + {file = "uritools-4.0.3-py3-none-any.whl", hash = "sha256:bae297d090e69a0451130ffba6f2f1c9477244aa0a5543d66aed2d9f77d0dd9c"}, + {file = "uritools-4.0.3.tar.gz", hash = "sha256:ee06a182a9c849464ce9d5fa917539aacc8edd2a4924d1b7aabeeecabcae3bc2"}, ] [[package]] name = "urllib3" -version = "1.26.18" +version = "2.2.1" description = "HTTP library with thread-safe connection pooling, file post, and more." optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" +python-versions = ">=3.8" files = [ - {file = "urllib3-1.26.18-py2.py3-none-any.whl", hash = "sha256:34b97092d7e0a3a8cf7cd10e386f401b3737364026c45e622aa02903dffe0f07"}, - {file = "urllib3-1.26.18.tar.gz", hash = "sha256:f8ecc1bba5667413457c529ab955bf8c67b45db799d159066261719e328580a0"}, + {file = "urllib3-2.2.1-py3-none-any.whl", hash = "sha256:450b20ec296a467077128bff42b73080516e71b56ff59a60a02bef2232c4fa9d"}, + {file = "urllib3-2.2.1.tar.gz", hash = "sha256:d0570876c61ab9e520d776c38acbbb5b05a776d3f9ff98a5c8fd5162a444cf19"}, ] [package.extras] -brotli = ["brotli (==1.0.9)", "brotli (>=1.0.9)", "brotlicffi (>=0.8.0)", "brotlipy (>=0.6.0)"] -secure = ["certifi", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "ipaddress", "pyOpenSSL (>=0.14)", "urllib3-secure-extra"] -socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] +brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)"] +h2 = ["h2 (>=4,<5)"] +socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] +zstd = ["zstandard (>=0.18.0)"] [[package]] name = "uwsgi" -version = "2.0.24" +version = "2.0.26" description = "The uWSGI server" optional = false python-versions = "*" files = [ - {file = "uwsgi-2.0.24.tar.gz", hash = "sha256:77b6dd5cd633f4ae87ee393f7701f617736815499407376e78f3d16467523afe"}, + {file = "uwsgi-2.0.26.tar.gz", hash = "sha256:86e6bfcd4dc20529665f5b7777193cdc48622fb2c59f0a7f1e3dc32b3882e7f9"}, ] [[package]] @@ -4418,36 +4651,25 @@ files = [ [[package]] name = "uwsgitop" -version = "0.11" +version = "0.12" description = "uWSGI top-like interface" optional = false python-versions = "*" files = [ - {file = "uwsgitop-0.11.tar.gz", hash = "sha256:99ca245119e4a0600840a62b7b4e020c9870fe90952b24eecfff0c9090c75d14"}, + {file = "uwsgitop-0.12.tar.gz", hash = "sha256:4f9330951f0fb9633226de36cf0c28c04dcf323efab608834aa81f638b6019b2"}, ] [[package]] name = "validators" -version = "0.22.0" +version = "0.28.3" description = "Python Data Validation for Humans™" optional = false python-versions = ">=3.8" files = [ - {file = "validators-0.22.0-py3-none-any.whl", hash = "sha256:61cf7d4a62bbae559f2e54aed3b000cea9ff3e2fdbe463f51179b92c58c9585a"}, - {file = "validators-0.22.0.tar.gz", hash = "sha256:77b2689b172eeeb600d9605ab86194641670cdb73b60afd577142a9397873370"}, + {file = "validators-0.28.3-py3-none-any.whl", hash = "sha256:53cafa854f13850156259d9cc479b864ee901f6a96e6b109e6fc33f98f37d99f"}, + {file = "validators-0.28.3.tar.gz", hash = "sha256:c6c79840bcde9ba77b19f6218f7738188115e27830cbaff43264bc4ed24c429d"}, ] -[package.extras] -docs-offline = ["myst-parser (>=2.0.0)", "pypandoc-binary (>=1.11)", "sphinx (>=7.1.1)"] -docs-online = ["mkdocs (>=1.5.2)", "mkdocs-git-revision-date-localized-plugin (>=1.2.0)", "mkdocs-material (>=9.2.6)", "mkdocstrings[python] (>=0.22.0)", "pyaml (>=23.7.0)"] -hooks = ["pre-commit (>=3.3.3)"] -package = ["build (>=1.0.0)", "twine (>=4.0.2)"] -runner = ["tox (>=4.11.1)"] -sast = ["bandit[toml] (>=1.7.5)"] -testing = ["pytest (>=7.4.0)"] -tooling = ["black (>=23.7.0)", "pyright (>=1.1.325)", "ruff (>=0.0.287)"] -tooling-extras = ["pyaml (>=23.7.0)", "pypandoc-binary (>=1.11)", "pytest (>=7.4.0)"] - [[package]] name = "vine" version = "5.1.0" @@ -4561,6 +4783,85 @@ MarkupSafe = ">=2.1.1" [package.extras] watchdog = ["watchdog"] +[[package]] +name = "wrapt" +version = "1.16.0" +description = "Module for decorators, wrappers and monkey patching." +optional = false +python-versions = ">=3.6" +files = [ + {file = "wrapt-1.16.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ffa565331890b90056c01db69c0fe634a776f8019c143a5ae265f9c6bc4bd6d4"}, + {file = "wrapt-1.16.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e4fdb9275308292e880dcbeb12546df7f3e0f96c6b41197e0cf37d2826359020"}, + {file = "wrapt-1.16.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bb2dee3874a500de01c93d5c71415fcaef1d858370d405824783e7a8ef5db440"}, + {file = "wrapt-1.16.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2a88e6010048489cda82b1326889ec075a8c856c2e6a256072b28eaee3ccf487"}, + {file = "wrapt-1.16.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ac83a914ebaf589b69f7d0a1277602ff494e21f4c2f743313414378f8f50a4cf"}, + {file = "wrapt-1.16.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:73aa7d98215d39b8455f103de64391cb79dfcad601701a3aa0dddacf74911d72"}, + {file = "wrapt-1.16.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:807cc8543a477ab7422f1120a217054f958a66ef7314f76dd9e77d3f02cdccd0"}, + {file = "wrapt-1.16.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:bf5703fdeb350e36885f2875d853ce13172ae281c56e509f4e6eca049bdfb136"}, + {file = "wrapt-1.16.0-cp310-cp310-win32.whl", hash = "sha256:f6b2d0c6703c988d334f297aa5df18c45e97b0af3679bb75059e0e0bd8b1069d"}, + {file = "wrapt-1.16.0-cp310-cp310-win_amd64.whl", hash = "sha256:decbfa2f618fa8ed81c95ee18a387ff973143c656ef800c9f24fb7e9c16054e2"}, + {file = "wrapt-1.16.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:1a5db485fe2de4403f13fafdc231b0dbae5eca4359232d2efc79025527375b09"}, + {file = "wrapt-1.16.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:75ea7d0ee2a15733684badb16de6794894ed9c55aa5e9903260922f0482e687d"}, + {file = "wrapt-1.16.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a452f9ca3e3267cd4d0fcf2edd0d035b1934ac2bd7e0e57ac91ad6b95c0c6389"}, + {file = "wrapt-1.16.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:43aa59eadec7890d9958748db829df269f0368521ba6dc68cc172d5d03ed8060"}, + {file = "wrapt-1.16.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:72554a23c78a8e7aa02abbd699d129eead8b147a23c56e08d08dfc29cfdddca1"}, + {file = "wrapt-1.16.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:d2efee35b4b0a347e0d99d28e884dfd82797852d62fcd7ebdeee26f3ceb72cf3"}, + {file = "wrapt-1.16.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:6dcfcffe73710be01d90cae08c3e548d90932d37b39ef83969ae135d36ef3956"}, + {file = "wrapt-1.16.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:eb6e651000a19c96f452c85132811d25e9264d836951022d6e81df2fff38337d"}, + {file = "wrapt-1.16.0-cp311-cp311-win32.whl", hash = "sha256:66027d667efe95cc4fa945af59f92c5a02c6f5bb6012bff9e60542c74c75c362"}, + {file = "wrapt-1.16.0-cp311-cp311-win_amd64.whl", hash = "sha256:aefbc4cb0a54f91af643660a0a150ce2c090d3652cf4052a5397fb2de549cd89"}, + {file = "wrapt-1.16.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:5eb404d89131ec9b4f748fa5cfb5346802e5ee8836f57d516576e61f304f3b7b"}, + {file = "wrapt-1.16.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:9090c9e676d5236a6948330e83cb89969f433b1943a558968f659ead07cb3b36"}, + {file = "wrapt-1.16.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:94265b00870aa407bd0cbcfd536f17ecde43b94fb8d228560a1e9d3041462d73"}, + {file = "wrapt-1.16.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f2058f813d4f2b5e3a9eb2eb3faf8f1d99b81c3e51aeda4b168406443e8ba809"}, + {file = "wrapt-1.16.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:98b5e1f498a8ca1858a1cdbffb023bfd954da4e3fa2c0cb5853d40014557248b"}, + {file = "wrapt-1.16.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:14d7dc606219cdd7405133c713f2c218d4252f2a469003f8c46bb92d5d095d81"}, + {file = "wrapt-1.16.0-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:49aac49dc4782cb04f58986e81ea0b4768e4ff197b57324dcbd7699c5dfb40b9"}, + {file = "wrapt-1.16.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:418abb18146475c310d7a6dc71143d6f7adec5b004ac9ce08dc7a34e2babdc5c"}, + {file = "wrapt-1.16.0-cp312-cp312-win32.whl", hash = "sha256:685f568fa5e627e93f3b52fda002c7ed2fa1800b50ce51f6ed1d572d8ab3e7fc"}, + {file = "wrapt-1.16.0-cp312-cp312-win_amd64.whl", hash = "sha256:dcdba5c86e368442528f7060039eda390cc4091bfd1dca41e8046af7c910dda8"}, + {file = "wrapt-1.16.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:d462f28826f4657968ae51d2181a074dfe03c200d6131690b7d65d55b0f360f8"}, + {file = "wrapt-1.16.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a33a747400b94b6d6b8a165e4480264a64a78c8a4c734b62136062e9a248dd39"}, + {file = "wrapt-1.16.0-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b3646eefa23daeba62643a58aac816945cadc0afaf21800a1421eeba5f6cfb9c"}, + {file = "wrapt-1.16.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3ebf019be5c09d400cf7b024aa52b1f3aeebeff51550d007e92c3c1c4afc2a40"}, + {file = "wrapt-1.16.0-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:0d2691979e93d06a95a26257adb7bfd0c93818e89b1406f5a28f36e0d8c1e1fc"}, + {file = "wrapt-1.16.0-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:1acd723ee2a8826f3d53910255643e33673e1d11db84ce5880675954183ec47e"}, + {file = "wrapt-1.16.0-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:bc57efac2da352a51cc4658878a68d2b1b67dbe9d33c36cb826ca449d80a8465"}, + {file = "wrapt-1.16.0-cp36-cp36m-win32.whl", hash = "sha256:da4813f751142436b075ed7aa012a8778aa43a99f7b36afe9b742d3ed8bdc95e"}, + {file = "wrapt-1.16.0-cp36-cp36m-win_amd64.whl", hash = "sha256:6f6eac2360f2d543cc875a0e5efd413b6cbd483cb3ad7ebf888884a6e0d2e966"}, + {file = "wrapt-1.16.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:a0ea261ce52b5952bf669684a251a66df239ec6d441ccb59ec7afa882265d593"}, + {file = "wrapt-1.16.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7bd2d7ff69a2cac767fbf7a2b206add2e9a210e57947dd7ce03e25d03d2de292"}, + {file = "wrapt-1.16.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9159485323798c8dc530a224bd3ffcf76659319ccc7bbd52e01e73bd0241a0c5"}, + {file = "wrapt-1.16.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a86373cf37cd7764f2201b76496aba58a52e76dedfaa698ef9e9688bfd9e41cf"}, + {file = "wrapt-1.16.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:73870c364c11f03ed072dda68ff7aea6d2a3a5c3fe250d917a429c7432e15228"}, + {file = "wrapt-1.16.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:b935ae30c6e7400022b50f8d359c03ed233d45b725cfdd299462f41ee5ffba6f"}, + {file = "wrapt-1.16.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:db98ad84a55eb09b3c32a96c576476777e87c520a34e2519d3e59c44710c002c"}, + {file = "wrapt-1.16.0-cp37-cp37m-win32.whl", hash = "sha256:9153ed35fc5e4fa3b2fe97bddaa7cbec0ed22412b85bcdaf54aeba92ea37428c"}, + {file = "wrapt-1.16.0-cp37-cp37m-win_amd64.whl", hash = "sha256:66dfbaa7cfa3eb707bbfcd46dab2bc6207b005cbc9caa2199bcbc81d95071a00"}, + {file = "wrapt-1.16.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1dd50a2696ff89f57bd8847647a1c363b687d3d796dc30d4dd4a9d1689a706f0"}, + {file = "wrapt-1.16.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:44a2754372e32ab315734c6c73b24351d06e77ffff6ae27d2ecf14cf3d229202"}, + {file = "wrapt-1.16.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8e9723528b9f787dc59168369e42ae1c3b0d3fadb2f1a71de14531d321ee05b0"}, + {file = "wrapt-1.16.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:dbed418ba5c3dce92619656802cc5355cb679e58d0d89b50f116e4a9d5a9603e"}, + {file = "wrapt-1.16.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:941988b89b4fd6b41c3f0bfb20e92bd23746579736b7343283297c4c8cbae68f"}, + {file = "wrapt-1.16.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:6a42cd0cfa8ffc1915aef79cb4284f6383d8a3e9dcca70c445dcfdd639d51267"}, + {file = "wrapt-1.16.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:1ca9b6085e4f866bd584fb135a041bfc32cab916e69f714a7d1d397f8c4891ca"}, + {file = "wrapt-1.16.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:d5e49454f19ef621089e204f862388d29e6e8d8b162efce05208913dde5b9ad6"}, + {file = "wrapt-1.16.0-cp38-cp38-win32.whl", hash = "sha256:c31f72b1b6624c9d863fc095da460802f43a7c6868c5dda140f51da24fd47d7b"}, + {file = "wrapt-1.16.0-cp38-cp38-win_amd64.whl", hash = "sha256:490b0ee15c1a55be9c1bd8609b8cecd60e325f0575fc98f50058eae366e01f41"}, + {file = "wrapt-1.16.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9b201ae332c3637a42f02d1045e1d0cccfdc41f1f2f801dafbaa7e9b4797bfc2"}, + {file = "wrapt-1.16.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:2076fad65c6736184e77d7d4729b63a6d1ae0b70da4868adeec40989858eb3fb"}, + {file = "wrapt-1.16.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c5cd603b575ebceca7da5a3a251e69561bec509e0b46e4993e1cac402b7247b8"}, + {file = "wrapt-1.16.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b47cfad9e9bbbed2339081f4e346c93ecd7ab504299403320bf85f7f85c7d46c"}, + {file = "wrapt-1.16.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f8212564d49c50eb4565e502814f694e240c55551a5f1bc841d4fcaabb0a9b8a"}, + {file = "wrapt-1.16.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:5f15814a33e42b04e3de432e573aa557f9f0f56458745c2074952f564c50e664"}, + {file = "wrapt-1.16.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:db2e408d983b0e61e238cf579c09ef7020560441906ca990fe8412153e3b291f"}, + {file = "wrapt-1.16.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:edfad1d29c73f9b863ebe7082ae9321374ccb10879eeabc84ba3b69f2579d537"}, + {file = "wrapt-1.16.0-cp39-cp39-win32.whl", hash = "sha256:ed867c42c268f876097248e05b6117a65bcd1e63b779e916fe2e33cd6fd0d3c3"}, + {file = "wrapt-1.16.0-cp39-cp39-win_amd64.whl", hash = "sha256:eb1b046be06b0fce7249f1d025cd359b4b80fc1c3e24ad9eca33e0dcdb2e4a35"}, + {file = "wrapt-1.16.0-py3-none-any.whl", hash = "sha256:6906c4100a8fcbf2fa735f6059214bb13b97f75b1a61777fcf6432121ef12ef1"}, + {file = "wrapt-1.16.0.tar.gz", hash = "sha256:5f370f952971e7d17c7d1ead40e49f32345a7f7a5373571ef44d800d06b1899d"}, +] + [[package]] name = "wtforms" version = "2.3.3" @@ -4633,20 +4934,20 @@ timezone = ["python-dateutil"] [[package]] name = "zipp" -version = "3.17.0" +version = "3.19.2" description = "Backport of pathlib-compatible object wrapper for zip files" optional = false python-versions = ">=3.8" files = [ - {file = "zipp-3.17.0-py3-none-any.whl", hash = "sha256:0e923e726174922dce09c53c59ad483ff7bbb8e572e00c7f7c46b88556409f31"}, - {file = "zipp-3.17.0.tar.gz", hash = "sha256:84e64a1c28cf7e91ed2078bb8cc8c259cb19b76942096c8d7b84947690cabaf0"}, + {file = "zipp-3.19.2-py3-none-any.whl", hash = "sha256:f091755f667055f2d02b32c53771a7a6c8b47e1fdbc4b72a8b9072b3eef8015c"}, + {file = "zipp-3.19.2.tar.gz", hash = "sha256:bf1dcf6450f873a13e952a29504887c89e6de7506209e5b1bcc3460135d4de19"}, ] [package.extras] -docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-lint"] -testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-ignore-flaky", "pytest-mypy (>=0.9.1)", "pytest-ruff"] +doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", "jaraco.test", "more-itertools", "pytest (>=6,!=8.1.*)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-ignore-flaky", "pytest-mypy", "pytest-ruff (>=0.2.1)"] [metadata] lock-version = "2.0" python-versions = ">= 3.9, <3.10" -content-hash = "1141521de39debbe3bd66227676db7a1d8449ae1a05b7f4e1b16104ae358f403" +content-hash = "3fba0bebcc1fa0e5c098b1cc5434694e15012111500f22c32f82e326bd507ffd" diff --git a/pyproject.toml b/pyproject.toml index 0e5efc1..dfa7ccd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,36 +34,35 @@ invenio-oaiharvester = { git = "https://github.com/inveniosoftware/invenio-oaiha invenio-search = {version = ">=2.1.0,<3.0.0", extras = ["elasticsearch7"]} # Invenio core modules -invenio-app = ">=1.3.4,<1.4.0" -invenio-base = ">=1.2.16,<1.3.0" -invenio-cache = ">=1.1.1,<1.2.0" -invenio-celery = ">=1.2.5,<1.3.0" -invenio-config = ">=1.0.3,<1.1.0" +invenio-app = ">=1.4.0,<2.0.0" +invenio-base = ">=1.3.0,<2.0.0" +invenio-cache = ">=1.1.1,<2.0.0" +invenio-celery = ">=1.2.5,<2.0.0" +invenio-config = ">=1.0.3,<2.0.0" invenio-i18n = ">=2.0.0,<3.0.0" -invenio-db = {version = ">=1.1.0,<1.2.0", extras = ["postgresql"]} +invenio-db = {version = ">=1.1.0,<2.0.0", extras = ["postgresql"]} # Invenio base bundle invenio-admin = ">=1.4.0,<1.5.0" -# invenio-assets = ">=3.0.0,<4.0.0" # error patch-package 6.5.1 semantic-ui-less -invenio-assets = ">=2.0.0,<3.0.0" +invenio-assets = ">=3.0.0,<4.0.0" invenio-formatter = ">=2.0.0,<3.0.0" -invenio-logging = {version = ">=2.0.0,<3.0.0"} +invenio-logging = ">=2.0.0,<3.0.0" invenio-mail = ">=2.0.0,<3.0.0" -invenio-rest = ">=1.3.0,<1.4.0" -invenio-theme = ">=2.5.7,<3.0.0" +invenio-rest = ">=1.3.0,<2.0.0" +invenio-theme = ">=3.0.0,<4.0.0" # Invenio auth bundle invenio-access = ">=2.0.0,<3.0.0" -invenio-accounts = ">=3.5.2,<4.0.0" +invenio-accounts = ">=5.0.0,<6.0.0" invenio-oauth2server = ">=2.0.0,<3.0.0" -invenio-oauthclient = ">=3.0.0,<4.0.0" -invenio-userprofiles = ">=2.2.0,<3.0.0" +invenio-oauthclient = ">=4.0.0,<5.0.0" +invenio-userprofiles = ">=3.0.0,<4.0.0" # Invenio metadata bundle invenio-indexer = ">=2.2.0,<3.0.0" -invenio-jsonschemas = ">=1.1.4,<1.2.0" -invenio-oaiserver = ">=2.2.0,<2.3.0" -invenio-pidstore = ">=1.3.0,<1.4.0" -invenio-records-rest = ">=2.2.0,<2.3.0" -invenio-records-ui = ">=1.2.0,<1.3.0" -invenio-records = "2.1.0,<2.2.0" +invenio-jsonschemas = ">=1.1.4,<2.0.0" +invenio-oaiserver = ">=2.2.0,<3.0.0" +invenio-pidstore = ">=1.3.0,<2.0.0" +invenio-records-rest = ">=2.2.0,<3.0.0" +invenio-records-ui = ">=1.2.0,<2.0.0" +invenio-records = "2.1.0,<3.0.0" #invenio-search-ui = ">=2.4.0,<3.0.0" # Pinned due to before_first_request deprecation https://flask.palletsprojects.com/en/2.2.x/api/#flask.Flask.before_first_request Flask = ">=2.2.0,<2.3.0" @@ -80,7 +79,6 @@ responses = "*" ## Deployment python-dotenv = ">=0.13.0" -pydocstyle = ">=6.1.1" ## RERO ILS specific python modules poethepoet = "*" @@ -92,6 +90,8 @@ poethepoet = "*" #---------------------------------------------------------- ## Default from Invenio pytest-invenio = ">=2.1.6,<3.0.0" +pydocstyle = ">=6.1.1" +pytest-black = ">=0.3.2" Sphinx = ">=4.5.0" ## RERO ILS specific python packages safety = ">=1.8,<3.0.0" @@ -174,6 +174,9 @@ server = {cmd = "./scripts/server", help = "Starts the server "} setup = {cmd = "./scripts/setup", help = "Runs setup"} update = {cmd = "./scripts/update", help = "Runs update"} +[tool.isort] +profile = "black" + [build-system] requires = ["poetry>=0.12"] build-backend = "poetry.masonry.api" diff --git a/rero_ebooks/__init__.py b/rero_ebooks/__init__.py index cee7dc6..e5eea2e 100644 --- a/rero_ebooks/__init__.py +++ b/rero_ebooks/__init__.py @@ -22,4 +22,4 @@ from .ext import ReroEBooks from .version import __version__ -__all__ = ('__version__', 'ReroEBooks') +__all__ = ("__version__", "ReroEBooks") diff --git a/rero_ebooks/api.py b/rero_ebooks/api.py index b95b6a4..10436a6 100644 --- a/rero_ebooks/api.py +++ b/rero_ebooks/api.py @@ -49,9 +49,9 @@ class EbooksSearch(RecordsSearch): class Meta: """Search only on documents index.""" - index = 'ebooks' + index = "ebooks" doc_types = None - fields = ('*', ) + fields = ("*",) facets = {} default_filter = None @@ -63,8 +63,8 @@ class Ebook(Record): minter = ebook_pid_minter fetcher = ebook_pid_fetcher provider = EbookPidProvider - object_type = 'rec' - uri_key = 'electronic_location_and_access' + object_type = "rec" + uri_key = "electronic_location_and_access" @classmethod def _merge_uri(cls, new_record, old_record): @@ -83,21 +83,23 @@ def _merge_uri(cls, new_record, old_record): # check if already exists! if e_res not in new_e_res: new_e_res.append(copy.deepcopy(e_res)) - idx = new_record['__order__'].index(field) - new_record['__order__'].insert(idx, field) + idx = new_record["__order__"].index(field) + new_record["__order__"].insert(idx, field) return new_record @classmethod - def create_or_update(cls, data, id_=None, dbcommit=False, reindex=False, - vendor=None, **kwargs): + def create_or_update( + cls, data, id_=None, dbcommit=False, reindex=False, vendor=None, **kwargs + ): """Create or update ebook record.""" pid = build_ebook_pid(data, vendor) record = cls.get_record_by_pid(pid) if record is not None: merged_data = cls._merge_uri(data, record) - record.update(merged_data, dbcommit=dbcommit, reindex=reindex, - forceindex=reindex) - return record, 'UPDATE' + record.update( + merged_data, dbcommit=dbcommit, reindex=reindex, forceindex=reindex + ) + return record, "UPDATE" else: created_record = cls.create( data, @@ -105,9 +107,9 @@ def create_or_update(cls, data, id_=None, dbcommit=False, reindex=False, vendor=vendor, dbcommit=dbcommit, reindex=reindex, - forceindex=reindex + forceindex=reindex, ) - return created_record, 'CREATE' + return created_record, "CREATE" @classmethod def _delete_uri(cls, not_available_record, old_record, url): @@ -125,41 +127,35 @@ def _delete_uri(cls, not_available_record, old_record, url): epub_count = 0 for e_res in not_available_e_res: # check if exists! - res_url = e_res.get('uniform_resource_identifier') + res_url = e_res.get("uniform_resource_identifier") if res_url.startswith(url) and e_res in old_e_res: epub_count += 1 old_e_res.remove(e_res) - old_record['__order__'].remove(field) + old_record["__order__"].remove(field) return old_record, epub_count @classmethod - def remove_uri(cls, data, vendor=None, url=None, - dbcommit=False, reindex=False): + def remove_uri(cls, data, vendor=None, url=None, dbcommit=False, reindex=False): """Create or update ebook record.""" pid = build_ebook_pid(data, vendor) record = cls.get_record_by_pid(pid) if record is not None: merged_data, epub_count = cls._delete_uri(data, record, url) - record.replace(merged_data, dbcommit=dbcommit, reindex=reindex, - forceindex=reindex) - return record, f'REMOVE URIs: {epub_count}' - data['pid'] = pid - return data, 'REMOVE missing' + record.replace( + merged_data, dbcommit=dbcommit, reindex=reindex, forceindex=reindex + ) + return record, f"REMOVE URIs: {epub_count}" + data["pid"] = pid + return data, "REMOVE missing" @classmethod def create( - cls, - data, - id_=None, - dbcommit=False, - reindex=False, - vendor=None, - **kwargs + cls, data, id_=None, dbcommit=False, reindex=False, vendor=None, **kwargs ): """Create a new ebook record.""" assert cls.minter - assert not data.get('pid') + assert not data.get("pid") if not id_: id_ = uuid4() cls.minter(id_, data, vendor) @@ -189,13 +185,9 @@ def get_record_by_pid(cls, pid, with_deleted=False): """Get ebook record by pid value.""" assert cls.provider try: - persistent_identifier = PersistentIdentifier.get( - cls.provider.pid_type, - pid - ) + persistent_identifier = PersistentIdentifier.get(cls.provider.pid_type, pid) return super(Ebook, cls).get_record( - persistent_identifier.object_uuid, - with_deleted=with_deleted + persistent_identifier.object_uuid, with_deleted=with_deleted ) except NoResultFound: return None @@ -215,12 +207,13 @@ def update(self, data, dbcommit=False, reindex=False, forceindex=False): def replace(self, data, dbcommit=False, reindex=False, forceindex=False): """Replace data in record.""" new_data = copy.deepcopy(data) - pid = new_data.get('pid') + pid = new_data.get("pid") if not pid: - raise EbookError.PidMissing(f'missing pid={self.pid}') + raise EbookError.PidMissing(f"missing pid={self.pid}") self.clear() - self = self.update(new_data, dbcommit=dbcommit, reindex=reindex, - forceindex=forceindex) + self = self.update( + new_data, dbcommit=dbcommit, reindex=reindex, forceindex=forceindex + ) return self def dbcommit(self, reindex=False, forceindex=False): @@ -245,17 +238,13 @@ def delete_from_index(self): def get_persistent_identifier(cls, pid): """Get Persistent Identifier.""" return PersistentIdentifier.get_by_object( - cls.provider.pid_type, - cls.object_type, - pid + cls.provider.pid_type, cls.object_type, pid ) @classmethod def _get_all(cls, with_deleted=False): """Get all persistent identifier records.""" - query = PersistentIdentifier.query.filter_by( - pid_type=cls.provider.pid_type - ) + query = PersistentIdentifier.query.filter_by(pid_type=cls.provider.pid_type) if not with_deleted: query = query.filter_by(status=PIDStatus.REGISTERED) return query @@ -282,4 +271,4 @@ def count(cls, with_deleted=False): @property def pid(self): """Get ebook record pid value.""" - return self.get('pid') + return self.get("pid") diff --git a/rero_ebooks/apiharvester/cli.py b/rero_ebooks/apiharvester/cli.py index 6c0974a..bbe70f3 100644 --- a/rero_ebooks/apiharvester/cli.py +++ b/rero_ebooks/apiharvester/cli.py @@ -15,7 +15,7 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -"""Click command-line interface for mef person management.""" +"""Click command-line interface for ebooks apiharvester.""" from __future__ import absolute_import, print_function @@ -31,7 +31,7 @@ from .models import ApiHarvestConfig from .utils import add_set, api_source -datastore = LocalProxy(lambda: current_app.extensions['security'].datastore) +datastore = LocalProxy(lambda: current_app.extensions["security"].datastore) @click.group() @@ -39,106 +39,100 @@ def apiharvester(): """Api harvester commands.""" -@apiharvester.command('source') -@click.argument('name') -@click.option('-U', '--url', default='', help='Url') -@click.option('-n', '--classname', default='', help='Class name') -@click.option('-c', '--code', default='', help='Code') -@click.option( - '-u', '--update', is_flag=True, default=False, help='Update config' -) +@apiharvester.command("source") +@click.argument("name") +@click.option("-U", "--url", default="", help="Url") +@click.option("-n", "--classname", default="", help="Class name") +@click.option("-c", "--code", default="", help="Code") +@click.option("-u", "--update", is_flag=True, default=False, help="Update config") @with_appcontext def api_source_config(name, url, classname, code, update): """Add or Update ApiHarvestConfig.""" - msg = api_source( - name=name, - url=url, - classname=classname, - code=code, - update=update - ) - click.echo(f'{msg} ApiHarvestConfig: {name}') - - -@apiharvester.command('sources') -@click.argument('configfile', type=click.File('rb')) -@click.option( - '-u', '--update', is_flag=True, default=False, help='Update config' -) + msg = api_source(name=name, url=url, classname=classname, code=code, update=update) + click.echo(f"{msg} ApiHarvestConfig: {name}") + + +@apiharvester.command("sources") +@click.argument("configfile", type=click.File("rb")) +@click.option("-u", "--update", is_flag=True, default=False, help="Update config") @with_appcontext def api_source_config_from_file(configfile, update): """Add or update ApiHarvestConfigs from file.""" if configs := yaml.load(configfile, Loader=yaml.FullLoader): for name, values in sorted(configs.items()): - url = values.get('url', '') - classname = values.get('classname', '') - code = values.get('code', '') + url = values.get("url", "") + classname = values.get("classname", "") + code = values.get("code", "") msg = api_source( - name=name, - url=url, - classname=classname, - code=code, - update=update + name=name, url=url, classname=classname, code=code, update=update ) - click.echo(f'{msg} ApiHarvestConfig: {name}') + click.echo(f"{msg} ApiHarvestConfig: {name}") else: - click.secho( - f'ERROR: no YML config found in: {configfile.name}' - ) + click.secho(f"ERROR: no YML config found in: {configfile.name}") -@apiharvester.command('initsets') -@click.argument('configfile', type=click.File('rb')) -@click.option('-v', '--verbose', 'verbose', is_flag=True, default=False) +@apiharvester.command("initsets") +@click.argument("configfile", type=click.File("rb")) +@click.option("-v", "--verbose", "verbose", is_flag=True, default=False) @with_appcontext def init_oai_sets(configfile, verbose): """Init OAIsets.""" configs = yaml.load(configfile, Loader=yaml.FullLoader) for name, values in sorted(configs.items()): - description = values.get('description', '...') - pattern = values['pattern'] - msg = add_set(spec=name, name=name, description=description, - pattern=pattern) + description = values.get("description", "...") + pattern = values["pattern"] + msg = add_set(spec=name, name=name, description=description, pattern=pattern) if verbose: click.echo(msg) -@apiharvester.command('harvest') -@click.option('-n', '--name', default=None, - help='Name of persistent configuration to use.') -@click.option('-f', '--from-date', default=None, - help='The lower bound date for the harvesting (optional).') -@click.option('-k', '--enqueue', is_flag=True, default=False, - help='Enqueue harvesting and return immediately.') -@click.option('-m', '--max', type=int, default=0, - help='maximum of records to harvest (optional).') -@click.option('-v', '--verbose', 'verbose', is_flag=True, default=False) +@apiharvester.command("harvest") +@click.option( + "-n", "--name", default=None, help="Name of persistent configuration to use." +) +@click.option( + "-f", + "--from-date", + default=None, + help="The lower bound date for the harvesting (optional).", +) +@click.option( + "-k", + "--enqueue", + is_flag=True, + default=False, + help="Enqueue harvesting and return immediately.", +) +@click.option( + "-m", "--max", type=int, default=0, help="maximum of records to harvest (optional)." +) +@click.option("-v", "--verbose", "verbose", is_flag=True, default=False) @with_appcontext def harvest(name, from_date, enqueue, max, verbose): """Harvest records from an API repository.""" if name: - click.secho(f'Harvest api: {name}', fg='green') + click.secho(f"Harvest api: {name}", fg="green") if from_date: from_date = parser.parse(from_date).isoformat() if enqueue: - async_id = harvest_records.delay(name=name, from_date=from_date, - max=max, verbose=verbose) + async_id = harvest_records.delay( + name=name, from_date=from_date, max=max, verbose=verbose + ) if verbose: - click.echo(f'AsyncResult {async_id}') + click.echo(f"AsyncResult {async_id}") else: - harvest_records(name=name, from_date=from_date, - max=max, verbose=verbose) + harvest_records(name=name, from_date=from_date, max=max, verbose=verbose) -@apiharvester.command('info') +@apiharvester.command("info") @with_appcontext def info(): """List infos for tasks.""" apis = ApiHarvestConfig.query.all() for api in apis: click.echo(api.name) - click.echo(f'\tlastrun : {api.lastrun}') - click.echo(f'\turl : {api.url}') - click.echo(f'\tclassname : {api.classname}') - click.echo(f'\tcode : {api.code}') + click.echo(f"\tlastrun : {api.lastrun}") + click.echo(f"\turl : {api.url}") + click.echo(f"\tclassname : {api.classname}") + click.echo(f"\tcode : {api.code}") diff --git a/rero_ebooks/apiharvester/models.py b/rero_ebooks/apiharvester/models.py index fbb23f8..498155c 100644 --- a/rero_ebooks/apiharvester/models.py +++ b/rero_ebooks/apiharvester/models.py @@ -27,16 +27,16 @@ class ApiHarvestConfig(db.Model): """Represents a ApiHarvestConfig record.""" - __tablename__ = 'apiharvest_config' + __tablename__ = "apiharvest_config" id = db.Column(db.Integer, primary_key=True) - url = db.Column(db.String(255), nullable=False, server_default='') + url = db.Column(db.String(255), nullable=False, server_default="") name = db.Column(db.String(255), nullable=False) classname = db.Column(db.String(255), nullable=False) code = db.Column(db.Text, nullable=True) - lastrun = db.Column(db.DateTime, default=datetime.datetime( - year=1900, month=1, day=1 - ), nullable=True) + lastrun = db.Column( + db.DateTime, default=datetime.datetime(year=1900, month=1, day=1), nullable=True + ) def save(self): """Save object to persistent storage.""" @@ -49,4 +49,4 @@ def update_lastrun(self, new_date=None): self.save() -__all__ = ('ApiHarvestConfig',) +__all__ = ("ApiHarvestConfig",) diff --git a/rero_ebooks/apiharvester/tasks.py b/rero_ebooks/apiharvester/tasks.py index 2ccad46..2d874b5 100644 --- a/rero_ebooks/apiharvester/tasks.py +++ b/rero_ebooks/apiharvester/tasks.py @@ -35,27 +35,24 @@ def harvest_records(name, from_date=None, max=0, verbose=False): if config := get_apiharvest_object(name=name): if not from_date: from_date = config.lastrun.isoformat() - msg = f'API harvest {name} class name: {config.classname} ' - msg += f'from date: {from_date} url: {config.url}' + msg = f"API harvest {name} class name: {config.classname} " + msg += f"from date: {from_date} url: {config.url}" current_app.logger.info(msg) HarvestClass = obj_or_import_string(config.classname) harvest = HarvestClass(config=config, verbose=verbose) config.update_lastrun() - total = harvest.get_records( - from_date=from_date, - max=max - ) + total = harvest.get_records(from_date=from_date, max=max) msg = ( - f'API harvest items={total} available={harvest.count_available} |' - f' got={harvest.count} new={harvest.count_new}' - f' updated={harvest.count_upd} deleted={harvest.count_del}' - f' from {name}.' + f"API harvest items={total} available={harvest.count_available} |" + f" got={harvest.count} new={harvest.count_new}" + f" updated={harvest.count_upd} deleted={harvest.count_del}" + f" from {name}." ) if verbose: click.echo(msg) current_app.logger.info(msg) count = harvest.count else: - current_app.logger.error(f'No config found: {name}') + current_app.logger.error(f"No config found: {name}") return count diff --git a/rero_ebooks/apiharvester/utils.py b/rero_ebooks/apiharvester/utils.py index 84ccc97..5e59199 100644 --- a/rero_ebooks/apiharvester/utils.py +++ b/rero_ebooks/apiharvester/utils.py @@ -28,7 +28,7 @@ from .models import ApiHarvestConfig -def add_set(spec, name, pattern, description='...'): +def add_set(spec, name, pattern, description="..."): """Add OAI set. :param spec: set identifier @@ -38,54 +38,48 @@ def add_set(spec, name, pattern, description='...'): """ try: oaiset = OAISet( - spec=spec, - name=name, - description=description, - system_created=False + spec=spec, name=name, description=description, system_created=False ) oaiset.search_pattern = pattern db.session.add(oaiset) db.session.commit() - msg = f'OAIset added: {name}' + msg = f"OAIset added: {name}" except Exception as err: db.session.rollback() - msg = f'OAIset exist: {name} {err}' + msg = f"OAIset exist: {name} {err}" return msg -def api_source(name, url='', classname=None, code='', update=False): +def api_source(name, url="", classname=None, code="", update=False): """Add ApiHarvestConfig do DB. - name: name for the configuaration + name: name for the configuration url: harvesting url - classname: Class responsible for geting record_serializers + classname: Class responsible for getting record_serializers code: code added to electronic_location['nonpublic_note'] update: update configuration if exist """ with current_app.app_context(): - msg = 'No Update' + msg = "No Update" source = ApiHarvestConfig.query.filter_by(name=name).first() if not source: source = ApiHarvestConfig( - name=name, - url=url, - classname=classname, - code=code + name=name, url=url, classname=classname, code=code ) source.save() db.session.commit() - msg = 'Add' + msg = "Add" elif update: source.name = name msg = [] - if url != '': + if url != "": source.url = url - msg.append(f'url:{url}') + msg.append(f"url:{url}") source.classname = classname - msg.append(f'classname:{classname}') - if code != '': + msg.append(f"classname:{classname}") + if code != "": source.code = code - msg.append(f'code:{code}') + msg.append(f"code:{code}") db.session.commit() msg = f'Update {", ".join(msg)}' return msg @@ -106,13 +100,12 @@ def get_apiharvest_object(name): except OperationalError: get_config_error_count += 1 current_app.logger.error( - 'ApiHarvestConfig OperationalError: ' - f'{get_config_error_count} {name}' + "ApiHarvestConfig OperationalError: " f"{get_config_error_count} {name}" ) if not obj: raise ApiHarvesterConfigNotFound( - f'Unable to find ApiHarvesterConfig obj with name {name}.' + f"Unable to find ApiHarvesterConfig obj with name {name}." ) return obj diff --git a/rero_ebooks/cantook/api.py b/rero_ebooks/cantook/api.py index 2eb697d..967970e 100644 --- a/rero_ebooks/cantook/api.py +++ b/rero_ebooks/cantook/api.py @@ -32,7 +32,7 @@ from ..dojson.json import cantook_json -class ApiCantook(): +class ApiCantook: """ApiCantook class. Class for harvesting ebooks from cantook API resources. @@ -51,14 +51,14 @@ def __init__(self, config, file=None, indent=None, verbose=False): self.verbose = verbose self.file = file if self.file: - file.write('[\n') + file.write("[\n") self.indent = indent self._count = 0 self._count_new = 0 self._count_upd = 0 self._count_del = 0 self._max = 0 - self._vendor = 'cantook' + self._vendor = "cantook" self._available_ids = {} @classmethod @@ -66,33 +66,31 @@ def get_config(cls, name): """Get config for name.""" return ApiHarvestConfig.query.filter_by(name=name).first() - def get_request_url(self, start_date='1990-01-01', page=1): + def get_request_url(self, start_date="1990-01-01", page=1): """Get request URL. - start_date: date from where records havs to be harvested - page: page from whre records have to be harvested + start_date: date from where records has to be harvested + page: page from where records have to be harvested """ - params = f'start_at={start_date}&page={page}' - return f'{self._url}/v1/resources.json?{params}' + params = f"start_at={start_date}&page={page}" + return f"{self._url}/v1/resources.json?{params}" def save_record(self, record): """Save record to file.""" if self.file: json.dump(record, self.file, indent=self.indent) - self.file.write(',\n') + self.file.write(",\n") def add_nonpublic_note(self, record): """Add nonpublic note to electronic location and access.""" - electronic_locations = record.get('electronic_location_and_access', []) + electronic_locations = record.get("electronic_location_and_access", []) new_electronic_locations = [] for electronic_location in electronic_locations: - url = '/'.join( - electronic_location['uniform_resource_identifier'].split( - '/' - )[:3] + url = "/".join( + electronic_location["uniform_resource_identifier"].split("/")[:3] ) if url == self._url: - electronic_location['nonpublic_note'] = self._code + electronic_location["nonpublic_note"] = self._code new_electronic_locations.append(electronic_location) return record @@ -101,10 +99,7 @@ def create_update_record(self, record): record = cantook_json.do(record) record = self.add_nonpublic_note(record) record, msg = Ebook.create_or_update( - data=record, - vendor=self._vendor, - dbcommit=True, - reindex=True + data=record, vendor=self._vendor, dbcommit=True, reindex=True ) return record, msg @@ -112,17 +107,13 @@ def remove_uri(self, record): """Create new record or update record.""" record = cantook_json.do(record) record, msg = Ebook.remove_uri( - data=record, - vendor=self._vendor, - url=self._url, - dbcommit=True, - reindex=True + data=record, vendor=self._vendor, url=self._url, dbcommit=True, reindex=True ) return record, msg def msg_text(self, pid, msg): """Logging message text.""" - return f'{self._count}: {self._vendor}:{self._code} {pid} = {msg}' + return f"{self._count}: {self._vendor}:{self._code} {pid} = {msg}" def process_records(self, records): """Process records.""" @@ -130,10 +121,10 @@ def process_records(self, records): self._count += 1 if self._count >= self._max and self._max != 0: break - if self._available_ids.get(record['id']): + if self._available_ids.get(record["id"]): self.save_record(record) record, msg = self.create_update_record(record) - if msg == 'UPDATE': + if msg == "UPDATE": self._count_upd += 1 else: self._count_new += 1 @@ -141,7 +132,7 @@ def process_records(self, records): record, msg = self.remove_uri(record) self._count_del += 1 if self.verbose: - click.echo(self.msg_text(pid=record['pid'], msg=msg)) + click.echo(self.msg_text(pid=record["pid"], msg=msg)) def verbose_print(self, msg): """Print verbose message.""" @@ -154,33 +145,29 @@ def init_available_ids(self, from_date): from_date: record changed after this date to get """ url = self.get_request_url(start_date=from_date, page=1) - url += '&available=1' + url += "&available=1" request = requests_get(url) - total_pages = int(request.headers.get('X-Total-Pages', -1)) - total_items = int(request.headers.get('X-Total-Items', -1)) + total_pages = int(request.headers.get("X-Total-Pages", -1)) + total_items = int(request.headers.get("X-Total-Items", -1)) # per_pages = int(request.headers.get('X-Per-Page', 0)) - current_page = int(request.headers.get('X-Current-Page', -1)) + current_page = int(request.headers.get("X-Current-Page", -1)) count = 0 self._available_ids = {} - while (request.status_code == requests_codes.ok and - current_page <= total_pages): - self.verbose_print(f'API page: {current_page} url: {url}') - for record in request.json().get('resources', []): + while request.status_code == requests_codes.ok and current_page <= total_pages: + self.verbose_print(f"API page: {current_page} url: {url}") + for record in request.json().get("resources", []): count += 1 - self._available_ids[record['id']] = count + self._available_ids[record["id"]] = count # get next page and update current_page - url = self.get_request_url( - start_date=from_date, - page=current_page+1 - ) - url += '&available=1' + url = self.get_request_url(start_date=from_date, page=current_page + 1) + url += "&available=1" request = requests_get(url) - current_page = int(request.headers.get('X-Current-Page', 0)) + current_page = int(request.headers.get("X-Current-Page", 0)) if total_items != count: # we had an ERROR current_app.logger.error( - 'ERROR to get all available ids ' - f'total:{total_items} != count:{count}' + "ERROR to get all available ids " + f"total:{total_items} != count:{count}" ) # raise ValueError('ERROR to get all available ids') return self._available_ids @@ -196,32 +183,31 @@ def get_records(self, from_date, max=0, file=None): self._max = max url = self.get_request_url(start_date=from_date, page=1) request = requests_get(url) - total_pages = int(request.headers.get('X-Total-Pages', 0)) - total_items = int(request.headers.get('X-Total-Items', 0)) + total_pages = int(request.headers.get("X-Total-Pages", 0)) + total_items = int(request.headers.get("X-Total-Items", 0)) # per_pages = int(request.headers.get('X-Per-Page', 0)) - current_page = int(request.headers.get('X-Current-Page', 0)) + current_page = int(request.headers.get("X-Current-Page", 0)) self.init_available_ids(from_date=from_date) - while (request.status_code == requests_codes.ok and - current_page <= total_pages and - (self._count < self._max or self._max == 0)): - self.verbose_print(f'API page: {current_page} url: {url}') - self.process_records(request.json().get('resources', [])) + while ( + request.status_code == requests_codes.ok + and current_page <= total_pages + and (self._count < self._max or self._max == 0) + ): + self.verbose_print(f"API page: {current_page} url: {url}") + self.process_records(request.json().get("resources", [])) # get next page and update current_page - url = self.get_request_url( - start_date=from_date, - page=current_page+1 - ) + url = self.get_request_url(start_date=from_date, page=current_page + 1) request = requests_get(url) - current_page = int(request.headers.get('X-Current-Page', 0)) + current_page = int(request.headers.get("X-Current-Page", 0)) if self.file: - file.write(']') + file.write("]") if ( - (max != 0 and total_items >= max and self._count != max) or - (max != 0 and total_items < max and self._count != total_items) or - (max == 0 and total_items != self._count) - ): + (max != 0 and total_items >= max and self._count != max) + or (max != 0 and total_items < max and self._count != total_items) + or (max == 0 and total_items != self._count) + ): # we had an ERROR - raise('ERROR not all records harvested') + raise ("ERROR not all records harvested") return total_items @@ -242,7 +228,7 @@ def count_upd(self): @property def count_del(self): - """Get delted count.""" + """Get deleted count.""" return self._count_del @property diff --git a/rero_ebooks/celery.py b/rero_ebooks/celery.py index 5663836..0db72d7 100644 --- a/rero_ebooks/celery.py +++ b/rero_ebooks/celery.py @@ -26,10 +26,12 @@ # load .env and .flaskenv load_dotenv() -celery = create_celery_app(create_ui( - SENTRY_TRANSPORT='raven.transport.http.HTTPTransport', - RATELIMIT_ENABLED=False, -)) +celery = create_celery_app( + create_ui( + SENTRY_TRANSPORT="raven.transport.http.HTTPTransport", + RATELIMIT_ENABLED=False, + ) +) """Celery application for Invenio. Overrides SENTRY_TRANSPORT wih synchronous HTTP transport since Celery does not deal nicely with the default threaded transport. @@ -37,4 +39,4 @@ # Trigger an app log message upon import. This makes Sentry logging # work with `get_task_logger(__name__)`. -celery.flask_app.logger.info('Created Celery app') +celery.flask_app.logger.info("Created Celery app") diff --git a/rero_ebooks/cli.py b/rero_ebooks/cli.py index 15baf28..3ff26bd 100644 --- a/rero_ebooks/cli.py +++ b/rero_ebooks/cli.py @@ -29,75 +29,76 @@ from .utils import add_oai_source -@oaiharvester.command('addsource') -@click.argument('name') -@click.argument('baseurl') -@click.option('-m', '--metadataprefix', default='marc21', - help='The prefix for the metadata') -@click.option('-s', '--setspecs', default='', - help='The ‘set’ criteria for the harvesting') -@click.option('-c', '--comment', default='', - help='Comment') +@oaiharvester.command("addsource") +@click.argument("name") +@click.argument("baseurl") +@click.option( + "-m", "--metadataprefix", default="marc21", help="The prefix for the metadata" +) +@click.option( + "-s", "--setspecs", default="", help="The ‘set’ criteria for the harvesting" +) +@click.option("-c", "--comment", default="", help="Comment") @with_appcontext def add_oai_source_config(name, baseurl, metadataprefix, setspecs, comment): """Add OAIHarvestConfig.""" - click.echo(f'Add OAIHarvestConfig: {name} ', nl=False) + click.echo(f"Add OAIHarvestConfig: {name} ", nl=False) if add_oai_source( name=name, baseurl=baseurl, metadataprefix=metadataprefix, setspecs=setspecs, - comment=comment + comment=comment, ): - click.secho('Ok', fg='green') + click.secho("Ok", fg="green") else: - click.secho('Exist', fg='red') + click.secho("Exist", fg="red") -@oaiharvester.command('initconfig') -@click.argument('configfile', type=click.File('rb')) +@oaiharvester.command("initconfig") +@click.argument("configfile", type=click.File("rb")) @with_appcontext def init_oai_harvest_config(configfile): """Init OAIHarvestConfig.""" configs = yaml.load(configfile, Loader=yaml.FullLoader) for name, values in sorted(configs.items()): - baseurl = values['baseurl'] - metadataprefix = values.get('metadataprefix', 'marc21') - setspecs = values.get('setspecs', '') - comment = values.get('comment', '') - click.echo(f'Add OAIHarvestConfig: {name} {baseurl} ', nl=False) + baseurl = values["baseurl"] + metadataprefix = values.get("metadataprefix", "marc21") + setspecs = values.get("setspecs", "") + comment = values.get("comment", "") + click.echo(f"Add OAIHarvestConfig: {name} {baseurl} ", nl=False) if add_oai_source( name=name, baseurl=baseurl, metadataprefix=metadataprefix, setspecs=setspecs, - comment=comment + comment=comment, ): - click.secho('Ok', fg='green') + click.secho("Ok", fg="green") else: - click.secho('Exist', fg='red') + click.secho("Exist", fg="red") -@oaiharvester.command('schedules') +@oaiharvester.command("schedules") @with_appcontext def schedules(): """List harvesting schedules.""" - celery_ext = current_app.extensions.get('invenio-celery') + celery_ext = current_app.extensions.get("invenio-celery") for key, value in celery_ext.celery.conf.beat_schedule.items(): - click.echo(key + '\t', nl=False) + click.echo(key + "\t", nl=False) click.echo(value) -@oaiharvester.command('info') +@oaiharvester.command("info") @with_appcontext def info(): """List infos for tasks.""" oais = OAIHarvestConfig.query.all() for oai in oais: click.echo(oai.name) - click.echo('\tlastrun : ', nl=False) + click.echo("\tlastrun : ", nl=False) click.echo(oai.lastrun) - click.echo('\tbaseurl : ' + oai.baseurl) - click.echo('\tmetadataprefix: ' + oai.metadataprefix) - click.echo('\tcomment : ' + oai.comment) - click.echo('\tsetspecs : ' + oai.setspecs) + click.echo("\tbaseurl : " + oai.baseurl) + click.echo("\tmetadataprefix: " + oai.metadataprefix) + click.echo("\tcomment : " + oai.comment) + click.echo("\tsetspecs : " + oai.setspecs) diff --git a/rero_ebooks/config.py b/rero_ebooks/config.py index f36d98b..b813b31 100644 --- a/rero_ebooks/config.py +++ b/rero_ebooks/config.py @@ -33,21 +33,21 @@ def _(x): return x -APP_THEME = ['bootstrap3'] +APP_THEME = ["bootstrap3"] # Rate limiting # ============= -RATELIMIT_STORAGE_URL = 'redis://localhost:6379/3' -RATELIMIT_DEFAULT = '5000/second' +RATELIMIT_STORAGE_URL = "redis://localhost:6379/3" +RATELIMIT_DEFAULT = "5000/second" RATELIMIT_ENABLED = False # I18N # ==== #: Default language -BABEL_DEFAULT_LANGUAGE = 'en' +BABEL_DEFAULT_LANGUAGE = "en" #: Default time zone -BABEL_DEFAULT_TIMEZONE = 'Europe/Zurich' +BABEL_DEFAULT_TIMEZONE = "Europe/Zurich" #: Other supported languages (do not include the default language in list). I18N_LANGUAGES = [ # ('fr', _('French')) @@ -56,32 +56,34 @@ def _(x): # Base templates # ============== #: Global base template. -BASE_TEMPLATE = 'invenio_theme/page.html' +BASE_TEMPLATE = "invenio_theme/page.html" #: Cover page base template (used for e.g. login/sign-up). -COVER_TEMPLATE = 'invenio_theme/page_cover.html' +COVER_TEMPLATE = "invenio_theme/page_cover.html" #: Footer base template. -FOOTER_TEMPLATE = 'rero_ebooks/footer.html' +FOOTER_TEMPLATE = "rero_ebooks/footer.html" #: Header base template. -HEADER_TEMPLATE = 'rero_ebooks/header.html' +HEADER_TEMPLATE = "rero_ebooks/header.html" #: Settings base template. -SETTINGS_TEMPLATE = 'invenio_theme/page_settings.html' +SETTINGS_TEMPLATE = "invenio_theme/page_settings.html" # Theme configuration # =================== #: Site name -THEME_SITENAME = _('RERO Ebooks') +THEME_SITENAME = _("RERO Ebooks") #: Use default frontpage. THEME_FRONTPAGE = False #: Frontpage title. -THEME_FRONTPAGE_TITLE = _('RERO Ebooks') +THEME_FRONTPAGE_TITLE = _("RERO Ebooks") #: Frontpage template. -THEME_FRONTPAGE_TEMPLATE = 'rero_ebooks/frontpage.html' +THEME_FRONTPAGE_TEMPLATE = "rero_ebooks/frontpage.html" #: Footer base template. THEME_FOOTER_TEMPLATE = FOOTER_TEMPLATE #: Header base template. THEME_HEADER_TEMPLATE = HEADER_TEMPLATE #: Template for error pages. -THEME_ERROR_TEMPLATE = 'rero_ebooks/page_error.html' +THEME_ERROR_TEMPLATE = "rero_ebooks/page_error.html" + +WEBPACKEXT_PROJECT = 'rero_ebooks.theme.webpack:project' # Email configuration # =================== @@ -93,32 +95,31 @@ def _(x): # Assets # ====== #: Static files collection method (defaults to copying files). -COLLECT_STORAGE = 'flask_collect.storage.file' +COLLECT_STORAGE = "flask_collect.storage.file" # Accounts # ======== #: Email address used as sender of account registration emails. SECURITY_EMAIL_SENDER = SUPPORT_EMAIL #: Email subject for account registration emails. -SECURITY_EMAIL_SUBJECT_REGISTER = _( - "Welcome to RERO Ebooks!") +SECURITY_EMAIL_SUBJECT_REGISTER = _("Welcome to RERO Ebooks!") #: Redis session storage URL. -ACCOUNTS_SESSION_REDIS_URL = 'redis://localhost:6379/1' +ACCOUNTS_SESSION_REDIS_URL = "redis://localhost:6379/1" # Celery configuration # ==================== -BROKER_URL = 'amqp://guest:guest@localhost:5672/' +BROKER_URL = "amqp://guest:guest@localhost:5672/" #: URL of message broker for Celery (default is RabbitMQ). -CELERY_BROKER_URL = 'amqp://guest:guest@localhost:5672/' +CELERY_BROKER_URL = "amqp://guest:guest@localhost:5672/" #: URL of backend for result storage (default is Redis). -CELERY_RESULT_BACKEND = 'redis://localhost:6379/2' +CELERY_RESULT_BACKEND = "redis://localhost:6379/2" #: Scheduled tasks configuration (aka cronjobs). # imports have to be configured in setup.py:invenio_celery.tasks CELERY_BEAT_SCHEDULE = { - 'indexer': { - 'task': 'invenio_indexer.tasks.process_bulk_queue', - 'schedule': timedelta(minutes=5), + "indexer": { + "task": "invenio_indexer.tasks.process_bulk_queue", + "schedule": timedelta(minutes=5), }, # 'Harvester-VS': { # 'task': 'invenio_oaiharvester.tasks.list_records_from_dates', @@ -146,15 +147,16 @@ def _(x): # Database # ======== #: Database URI including user and password -SQLALCHEMY_DATABASE_URI = \ - 'postgresql+psycopg2://rero-ebooks:rero-ebooks@localhost/rero-ebooks' +SQLALCHEMY_DATABASE_URI = ( + "postgresql+psycopg2://rero-ebooks:rero-ebooks@localhost/rero-ebooks" +) # disable record versioning DB_VERSIONING = False # JSONSchemas # =========== #: Hostname used in URLs for local JSONSchemas. -JSONSCHEMAS_HOST = 'ebooks.rero.ch' +JSONSCHEMAS_HOST = "ebooks.rero.ch" # Flask configuration # =================== @@ -163,7 +165,7 @@ def _(x): #: Secret key - each installation (dev, production, ...) needs a separate key. #: It should be changed before deploying. -SECRET_KEY = 'CHANGE_ME' +SECRET_KEY = "CHANGE_ME" #: Max upload size for form data via application/mulitpart-formdata. MAX_CONTENT_LENGTH = 100 * 1024 * 1024 # 100 MiB #: Sets cookie with the secure flag by default @@ -172,44 +174,37 @@ def _(x): #: provided, the allowed hosts variable is set to localhost. In production it #: should be set to the correct host and it is strongly recommended to only #: route correct hosts to the application. -APP_ALLOWED_HOSTS = ['localhost', '127.0.0.1'] +APP_ALLOWED_HOSTS = ["localhost", "127.0.0.1"] # TODO: review theses rules for security purposes APP_DEFAULT_SECURE_HEADERS = { # disabled as https is not used by the application: # https is done by the haproxy - 'force_https': False, - 'force_https_permanent': False, - 'force_file_save': False, - 'frame_options': 'sameorigin', - 'frame_options_allow_from': None, - 'strict_transport_security': True, - 'strict_transport_security_preload': False, - 'strict_transport_security_max_age': 31556926, # One year in seconds - 'strict_transport_security_include_subdomains': True, - 'content_security_policy': { - 'default-src': ['*'], - 'img-src': [ - '*', - "'self'", - 'data:' - ], - 'style-src': [ - '*', - "'unsafe-inline'" - ], - 'script-src': [ + "force_https": False, + "force_https_permanent": False, + "force_file_save": False, + "frame_options": "sameorigin", + "frame_options_allow_from": None, + "strict_transport_security": True, + "strict_transport_security_preload": False, + "strict_transport_security_max_age": 31556926, # One year in seconds + "strict_transport_security_include_subdomains": True, + "content_security_policy": { + "default-src": ["*"], + "img-src": ["*", "'self'", "data:"], + "style-src": ["*", "'unsafe-inline'"], + "script-src": [ "'self'", "'unsafe-eval'", "'unsafe-inline'", # '*.rero.ch', - 'https://www.googletagmanager.com', - 'https://www.google-analytics.com' - ] + "https://www.googletagmanager.com", + "https://www.google-analytics.com", + ], }, - 'content_security_policy_report_uri': None, - 'content_security_policy_report_only': False, - 'session_cookie_secure': True, - 'session_cookie_http_only': True, + "content_security_policy_report_uri": None, + "content_security_policy_report_only": False, + "session_cookie_secure": True, + "session_cookie_http_only": True, } # Indexer @@ -222,16 +217,16 @@ def _(x): # OAI-PMH # ======= #: OAI prefix -OAISERVER_ID_PREFIX = 'oai:ebooks.rero.ch:' +OAISERVER_ID_PREFIX = "oai:ebooks.rero.ch:" #: OAI fetcher -OAISERVER_CONTROL_NUMBER_FETCHER = 'ebook' +OAISERVER_CONTROL_NUMBER_FETCHER = "ebook" #: OAI default ES index -OAISERVER_RECORD_INDEX = 'ebooks' +OAISERVER_RECORD_INDEX = "ebooks" -OAISERVER_XSL_URL = '/static/xsl/oai.xsl' +OAISERVER_XSL_URL = "/static/xsl/oai.xsl" OAISERVER_ADMIN_EMAILS = [ - 'software@rero.ch', + "software@rero.ch", ] # Debug @@ -245,26 +240,28 @@ def _(x): RECORDS_REST_ENDPOINTS = dict( ebook=dict( - pid_type='ebook', - pid_minter='ebook', - pid_fetcher='ebook', + pid_type="ebook", + pid_minter="ebook", + pid_fetcher="ebook", search_class="rero_ebooks.api:EbooksSearch", indexer_class="invenio_indexer.api:RecordIndexer", record_class="rero_ebooks.api:Ebook", search_index=None, record_serializers={ - 'application/json': ('invenio_records_rest.serializers' - ':json_v1_response'), + "application/json": ( + "invenio_records_rest.serializers" ":json_v1_response" + ), }, search_serializers={ - 'application/json': ('invenio_records_rest.serializers' - ':json_v1_search'), + "application/json": ("invenio_records_rest.serializers" ":json_v1_search"), }, - list_route='/ebooks/', - item_route=('/ebooks/' - ''), - default_media_type='application/json', + list_route="/ebooks/", + item_route=( + "/ebooks/" + '" + ), + default_media_type="application/json", max_result_window=10000, error_handlers=dict(), ), diff --git a/rero_ebooks/dojson/json/__init__.py b/rero_ebooks/dojson/json/__init__.py index 4d19d5a..d0975b1 100644 --- a/rero_ebooks/dojson/json/__init__.py +++ b/rero_ebooks/dojson/json/__init__.py @@ -20,4 +20,4 @@ from .model import cantook_json -__all__ = ('cantook_json') +__all__ = "cantook_json" diff --git a/rero_ebooks/dojson/json/model.py b/rero_ebooks/dojson/json/model.py index 4a63ea3..c9d2006 100644 --- a/rero_ebooks/dojson/json/model.py +++ b/rero_ebooks/dojson/json/model.py @@ -31,22 +31,22 @@ def do(self, blob, ignore_missing=True, exception_handlers=None): res = super(Underdo, self).do(blob, ignore_missing, exception_handlers) order = [ - 'leader', - 'control_number', - 'fixed_length_data_elements', - 'international_standard_book_number', - 'other_standard_identifier', - 'system_control_number', - 'language_code', - 'title_statement', - 'production_publication_distribution_manufacture' # + next line - '_and_copyright_notice', - 'physical_description', - 'page_count', - 'summary', - 'index_term_uncontrolled', - 'added_entry_personal_name', - 'electronic_location_and_access', + "leader", + "control_number", + "fixed_length_data_elements", + "international_standard_book_number", + "other_standard_identifier", + "system_control_number", + "language_code", + "title_statement", + "production_publication_distribution_manufacture" # + next line + "_and_copyright_notice", + "physical_description", + "page_count", + "summary", + "index_term_uncontrolled", + "added_entry_personal_name", + "electronic_location_and_access", ] # get all keys from res as list @@ -56,11 +56,11 @@ def do(self, blob, ignore_missing=True, exception_handlers=None): # correct list for multiple entries all_keys = [] for key in keys: - if type(res[key]) == list: + if isinstance(res[key], list): all_keys.extend(key for _ in range(len(res[key]))) else: all_keys.append(key) - res['__order__'] = all_keys + res["__order__"] = all_keys return res @@ -69,80 +69,97 @@ def do(self, blob, ignore_missing=True, exception_handlers=None): """rero_ebook Format for Cantook Data.""" -@cantook_json.over('system_control_number', 'id') +GENERIC_008 = "000000n########xx#|||||||||||||||||###|u" + + +@cantook_json.over("system_control_number", "id") def system_control_number(self, key, value): """System control number transformation. - The id field is transforme as system_control_number and + The id field is transform as system_control_number and other_standard_identifier The system_control_number is used in the Marc21 035 field. The other_standard_identifier is used in the Marc21 024 field. A Marc21 Leader data is added. """ - self['leader'] = { - 'base_address_of_data': 0, - 'bibliographic_level': 'monograph_item', - 'character_coding_scheme': 'ucs_unicode', - 'descriptive_cataloging_form': 'unknown', - 'encoding_level': 'not_applicable', - 'indicator_count': 2, - 'length_of_the_implementation_defined_portion': 0, - 'length_of_the_length_of_field_portion': 4, - 'length_of_the_starting_character_position_portion': 5, - 'record_length': 0, - 'record_status': 'corrected_or_revised', - 'subfield_code_count': 2, - 'type_of_record': 'language_material', - 'undefined': 0 + self["leader"] = { + "base_address_of_data": 0, + "bibliographic_level": "monograph_item", + "character_coding_scheme": "ucs_unicode", + "descriptive_cataloging_form": "unknown", + "encoding_level": "not_applicable", + "indicator_count": 2, + "length_of_the_implementation_defined_portion": 0, + "length_of_the_length_of_field_portion": 4, + "length_of_the_starting_character_position_portion": 5, + "record_length": 0, + "record_status": "corrected_or_revised", + "subfield_code_count": 2, + "type_of_record": "language_material", + "undefined": 0, } - self['other_standard_identifier'] = [{ - 'standard_number_or_code': f'cantook/{value}', - 'type_of_standard_number_or_code': - 'Unspecified type of standard number or code' - }] - return {'system_control_number': f'cantook-{value}'} + self["other_standard_identifier"] = [ + { + "standard_number_or_code": f"cantook/{value}", + "type_of_standard_number_or_code": "Unspecified type of standard number or code", + } + ] + self["fixed_length_data_elements"] = GENERIC_008 + return {"system_control_number": f"cantook-{value}"} + + +@cantook_json.over("fixed_length_data_elements", "fiction") +@utils.ignore_value +def is_fiction(self, key, value): + """Is fiction. + + Fiction is set in Marc21 008 33. + """ + if value: + self["fixed_length_data_elements"] = GENERIC_008 + self["fixed_length_data_elements"][33] = 1 -@cantook_json.over('language_code', 'languages|translated_from') +@cantook_json.over("language_code", "languages|translated_from") def language_code(self, key, value): """Language codes transformation. The language codes are used in the Marc21 041 field. """ - result = self.get('language_code', []) + result = self.get("language_code", []) if value: for lang in utils.force_list(value): - if key == 'languages': + if key == "languages": result.append( - {'language_code_of_text_sound_track_or_separate_title': - lang} + {"language_code_of_text_sound_track_or_separate_title": lang} ) else: - result.append({ - 'language_code_of_original': lang, - 'translation_indication': - 'Item is or includes a translation' - }) + result.append( + { + "language_code_of_original": lang, + "translation_indication": "Item is or includes a translation", + } + ) return result -@cantook_json.over('title_statement', 'title|subtitle') +@cantook_json.over("title_statement", "title|subtitle") def title_statement(self, key, value): """Title statement transformation. The title and subtitle are used in the Marc21 245 field. """ - return_value = self.get('title_statement', {}) + return_value = self.get("title_statement", {}) if value: - if key == 'title': - return_value['title'] = value - elif key == 'subtitle': - return_value['remainder_of_title'] = value + if key == "title": + return_value["title"] = value + elif key == "subtitle": + return_value["remainder_of_title"] = value return return_value -@cantook_json.over(None, 'publisher_name') +@cantook_json.over(None, "publisher_name") @utils.filter_values @utils.ignore_value def publisher_name(self, key, value): @@ -151,18 +168,17 @@ def publisher_name(self, key, value): The publisher_name is used in the Marc21 264 field. """ self.setdefault( - 'production_publication_distribution_manufacture_and_copyright_notice', - {} + "production_publication_distribution_manufacture_and_copyright_notice", {} + ) + self["production_publication_distribution_manufacture_and_copyright_notice"].update( + { + "name_of_producer_publisher_distributor_manufacturer": value, + "function_of_entity": "Publication", + } ) - self[ - 'production_publication_distribution_manufacture_and_copyright_notice' - ].update({ - 'name_of_producer_publisher_distributor_manufacturer': value, - 'function_of_entity': 'Publication' - }) -@cantook_json.over('physical_description', 'page_count') +@cantook_json.over("physical_description", "page_count") @utils.for_each_value @utils.filter_values @utils.ignore_value @@ -172,18 +188,20 @@ def physical_description(self, key, value): extent (Number of physical pages, volumes...): Marc21 300 $a field. """ if int(value) != 0: - pages = f'{value} pages' - return {'extent': pages} + pages = f"{value} pages" + return {"extent": pages} + + # return {'extent': f'{value}'} if int(value) != 0 else None -@cantook_json.over('summary', 'summary') +@cantook_json.over("summary", "summary") def summary(self, key, value): """Summary transformation.""" - return {'summary': value} + return {"summary": value} -@cantook_json.over('index_term_uncontrolled', 'classifications') +@cantook_json.over("index_term_uncontrolled", "classifications") def index_term_uncontrolled(self, key, value): """Index term uncontrolled transformation. @@ -191,28 +209,27 @@ def index_term_uncontrolled(self, key, value): """ index_term_uncontrolled = [] for classification in value: - for caption in classification.get('captions', []): + for caption in classification.get("captions", []): uncontrolled_term = [] order = [] - fr = caption.get('fr') + fr = caption.get("fr") need_to_append_term = False if fr: uncontrolled_term.append(fr) - order.append('uncontrolled_term') + order.append("uncontrolled_term") need_to_append_term = True - if en := caption.get('en'): + if en := caption.get("en"): uncontrolled_term.append(en) - order.append('uncontrolled_term') + order.append("uncontrolled_term") need_to_append_term = True if need_to_append_term: - index_term_uncontrolled.append({ - '__order__': order, - 'uncontrolled_term': uncontrolled_term - }) + index_term_uncontrolled.append( + {"__order__": order, "uncontrolled_term": uncontrolled_term} + ) return index_term_uncontrolled -@cantook_json.over('added_entry_personal_name', 'contributors') +@cantook_json.over("added_entry_personal_name", "contributors") @utils.for_each_value @utils.filter_values def added_entry_personal_name(self, key, value): @@ -221,72 +238,72 @@ def added_entry_personal_name(self, key, value): added_entry_personal_name: Marc21 700 field. """ names = [] - if value.get('first_name'): - names.append(value.get('first_name')) - if value.get('last_name'): - names.insert(0, value.get('last_name')) + if value.get("first_name"): + names.append(value.get("first_name")) + if value.get("last_name"): + names.insert(0, value.get("last_name")) result = { - 'type_of_personal_name_entry_element': 'Forename', - 'personal_name': ', '.join(names) + "type_of_personal_name_entry_element": "Forename", + "personal_name": ", ".join(names), } if len(names) > 1: - result['type_of_personal_name_entry_element'] = 'Surname' - if value.get('nature') == 'author': - result['relator_code'] = 'aut' - elif value.get('nature') == 'translated_by': - result['relator_code'] = 'trl' + result["type_of_personal_name_entry_element"] = "Surname" + if value.get("nature") == "author": + result["relator_code"] = "aut" + elif value.get("nature") == "translated_by": + result["relator_code"] = "trl" return result -@cantook_json.over('electronic_location_and_access', 'cover|flipbook|link') +@cantook_json.over("electronic_location_and_access", "cover|flipbook|link") def electronic_location_and_access_from_cover_flipbook_link(self, key, value): """Transformation of cover, flipbook and link data. electronic_location_and_access: Marc21 856 field. """ - result = self.get('electronic_location_and_access', []) - if value and key == 'cover': + result = self.get("electronic_location_and_access", []) + if value and key == "cover": result.append( { - 'uniform_resource_identifier': value, - 'materials_specified': 'Image de couverture', - 'access_method': 'HTTP', - 'relationship': 'Related resource' + "uniform_resource_identifier": value, + "materials_specified": "Image de couverture", + "access_method": "HTTP", + "relationship": "Related resource", } ) - elif value and key == 'flipbook': + elif value and key == "flipbook": result.append( { - 'uniform_resource_identifier': value, - 'materials_specified': 'Extrait', - 'access_method': 'HTTP', - 'relationship': 'Related resource' + "uniform_resource_identifier": value, + "materials_specified": "Extrait", + "access_method": "HTTP", + "relationship": "Related resource", } ) - elif key == 'link': + elif key == "link": need_to_append_link_data = True for data in result: - if data.get('electronic_format_type'): - data['uniform_resource_identifier'] = value - data['materials_specified'] = 'Texte intégral' - data['access_method'] = 'HTTP' - data['relationship'] = 'Resource' + if data.get("electronic_format_type"): + data["uniform_resource_identifier"] = value + data["materials_specified"] = "Texte intégral" + data["access_method"] = "HTTP" + data["relationship"] = "Resource" need_to_append_link_data = False if need_to_append_link_data: result.append( { # 'electronic_format_type' : is added from media:nature - 'uniform_resource_identifier': value, - 'materials_specified': 'Texte intégral', - 'access_method': 'HTTP', - 'relationship': 'Resource' + "uniform_resource_identifier": value, + "materials_specified": "Texte intégral", + "access_method": "HTTP", + "relationship": "Resource", } ) return result -@cantook_json.over(None, 'media') +@cantook_json.over(None, "media") @utils.for_each_value @utils.filter_values @utils.ignore_value @@ -300,31 +317,31 @@ def transformation_from_media(self, key, value): :date_of_production_publication_distribution_manufacture is added (Marc21 264 $c field). """ - if value.get('key'): - self['international_standard_book_number'] = { - 'international_standard_book_number': value.get('key') + if value.get("key"): + self["international_standard_book_number"] = { + "international_standard_book_number": value.get("key") } - if value.get('nature'): - self.setdefault('electronic_location_and_access', []) - location_and_access = self['electronic_location_and_access'] + if value.get("nature"): + self.setdefault("electronic_location_and_access", []) + location_and_access = self["electronic_location_and_access"] need_to_append_link_data = True for data in location_and_access: - if data.get('relationship') == 'Resource': - data['electronic_format_type'] = value.get('nature') + if data.get("relationship") == "Resource": + data["electronic_format_type"] = value.get("nature") need_to_append_link_data = False if need_to_append_link_data: - location_and_access.append({ - 'electronic_format_type': value.get('nature')}) - if value.get('issued_on'): + location_and_access.append({"electronic_format_type": value.get("nature")}) + if value.get("issued_on"): self.setdefault( - 'production_publication_distribution_manufacture' - '_and_copyright_notice', - {} + "production_publication_distribution_manufacture" "_and_copyright_notice", + {}, ) - self['production_publication_distribution_manufacture' - '_and_copyright_notice'].update( + self[ + "production_publication_distribution_manufacture" "_and_copyright_notice" + ].update( { - 'date_of_production_publication_distribution_manufacture' - '_or_copyright_notice': value.get('issued_on')[:4] - }) + "date_of_production_publication_distribution_manufacture" + "_or_copyright_notice": value.get("issued_on")[:4] + } + ) return None diff --git a/rero_ebooks/dojson/marc21/__init__.py b/rero_ebooks/dojson/marc21/__init__.py index 68f0348..7c82dcf 100644 --- a/rero_ebooks/dojson/marc21/__init__.py +++ b/rero_ebooks/dojson/marc21/__init__.py @@ -20,4 +20,4 @@ from .model import marc21 -__all__ = ('marc21') +__all__ = "marc21" diff --git a/rero_ebooks/dojson/marc21/fields/bd00x.py b/rero_ebooks/dojson/marc21/fields/bd00x.py index 52a6301..f3f9abd 100644 --- a/rero_ebooks/dojson/marc21/fields/bd00x.py +++ b/rero_ebooks/dojson/marc21/fields/bd00x.py @@ -12,41 +12,37 @@ from ..model import marc21 -@marc21.over('control_number', '^001') +@marc21.over("control_number", "^001") def control_number(self, key, value): """Control Number.""" return value -@marc21.over('control_number_identifier', '^003') +@marc21.over("control_number_identifier", "^003") def control_number_identifier(self, key, value): """Control Number Identifier.""" return value -@marc21.over('date_and_time_of_latest_transaction', '^005') +@marc21.over("date_and_time_of_latest_transaction", "^005") def date_and_time_of_latest_transaction(self, key, value): """Date and Time of Latest Transaction.""" return value -@marc21.over( - 'fixed_length_data_elements_additional_material_characteristics', '^006' -) -def fixed_length_data_elements_additional_material_characteristics( - self, key, value -): +@marc21.over("fixed_length_data_elements_additional_material_characteristics", "^006") +def fixed_length_data_elements_additional_material_characteristics(self, key, value): """Fixed-Length Data Elements-Additional Material Characteristics.""" return value -@marc21.over('physical_description_fixed_field_general_information', '^007') +@marc21.over("physical_description_fixed_field_general_information", "^007") def physical_description_fixed_field_general_information(self, key, value): """Physical Description Fixed Field-General Information.""" return value -@marc21.over('fixed_length_data_elements', '^008') +@marc21.over("fixed_length_data_elements", "^008") def fixed_length_data_elements(self, key, value): """Fixed-Length Data Elements.""" return value diff --git a/rero_ebooks/dojson/marc21/fields/bd01x09x.py b/rero_ebooks/dojson/marc21/fields/bd01x09x.py index 95ceef3..621a19d 100644 --- a/rero_ebooks/dojson/marc21/fields/bd01x09x.py +++ b/rero_ebooks/dojson/marc21/fields/bd01x09x.py @@ -14,89 +14,89 @@ from ..model import marc21 -@marc21.over('library_of_congress_control_number', '^010..') +@marc21.over("library_of_congress_control_number", "^010..") @utils.filter_values def library_of_congress_control_number(self, key, value): """Library of Congress Control Number.""" field_map = { - '8': 'field_link_and_sequence_number', - 'b': 'nucmc_control_number', - 'a': 'lc_control_number', - 'z': 'canceled_invalid_lc_control_number', + "8": "field_link_and_sequence_number", + "b": "nucmc_control_number", + "a": "lc_control_number", + "z": "canceled_invalid_lc_control_number", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'nucmc_control_number': utils.force_list(value.get('b')), - 'lc_control_number': value.get('a'), - 'canceled_invalid_lc_control_number': utils.force_list(value.get('z')), + "__order__": tuple(order) if len(order) else None, + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "nucmc_control_number": utils.force_list(value.get("b")), + "lc_control_number": value.get("a"), + "canceled_invalid_lc_control_number": utils.force_list(value.get("z")), } -@marc21.over('patent_control_information', '^013..') +@marc21.over("patent_control_information", "^013..") @utils.for_each_value @utils.filter_values def patent_control_information(self, key, value): """Patent Control Information.""" field_map = { - '8': 'field_link_and_sequence_number', - 'd': 'date', - 'a': 'number', - 'f': 'party_to_document', - 'b': 'country', - 'c': 'type_of_number', - '6': 'linkage', - 'e': 'status', + "8": "field_link_and_sequence_number", + "d": "date", + "a": "number", + "f": "party_to_document", + "b": "country", + "c": "type_of_number", + "6": "linkage", + "e": "status", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'date': utils.force_list(value.get('d')), - 'number': value.get('a'), - 'party_to_document': utils.force_list(value.get('f')), - 'country': value.get('b'), - 'type_of_number': value.get('c'), - 'linkage': value.get('6'), - 'status': utils.force_list(value.get('e')), + "__order__": tuple(order) if len(order) else None, + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "date": utils.force_list(value.get("d")), + "number": value.get("a"), + "party_to_document": utils.force_list(value.get("f")), + "country": value.get("b"), + "type_of_number": value.get("c"), + "linkage": value.get("6"), + "status": utils.force_list(value.get("e")), } -@marc21.over('national_bibliography_number', '^015..') +@marc21.over("national_bibliography_number", "^015..") @utils.for_each_value @utils.filter_values def national_bibliography_number(self, key, value): """National Bibliography Number.""" field_map = { - '8': 'field_link_and_sequence_number', - 'a': 'national_bibliography_number', - '2': 'source', - 'q': 'qualifying_information', - '6': 'linkage', - 'z': 'canceled_invalid_national_bibliography_number', + "8": "field_link_and_sequence_number", + "a": "national_bibliography_number", + "2": "source", + "q": "qualifying_information", + "6": "linkage", + "z": "canceled_invalid_national_bibliography_number", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'national_bibliography_number': utils.force_list(value.get('a')), - 'source': value.get('2'), - 'qualifying_information': utils.force_list(value.get('q')), - 'linkage': value.get('6'), - 'canceled_invalid_national_bibliography_number': utils.force_list( - value.get('z') + "__order__": tuple(order) if len(order) else None, + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "national_bibliography_number": utils.force_list(value.get("a")), + "source": value.get("2"), + "qualifying_information": utils.force_list(value.get("q")), + "linkage": value.get("6"), + "canceled_invalid_national_bibliography_number": utils.force_list( + value.get("z") ), } -@marc21.over('national_bibliographic_agency_control_number', '^016[7_].') +@marc21.over("national_bibliographic_agency_control_number", "^016[7_].") @utils.for_each_value @utils.filter_values def national_bibliographic_agency_control_number(self, key, value): @@ -106,30 +106,30 @@ def national_bibliographic_agency_control_number(self, key, value): "_": "Library and Archives Canada", } field_map = { - '8': 'field_link_and_sequence_number', - '2': 'source', - 'a': 'record_control_number', - 'z': 'canceled_invalid_control_number', + "8": "field_link_and_sequence_number", + "2": "source", + "a": "record_control_number", + "z": "canceled_invalid_control_number", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('national_bibliographic_agency') + order.append("national_bibliographic_agency") return { - '__order__': tuple(order) if len(order) else None, - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'source': value.get('2'), - 'record_control_number': value.get('a'), - 'canceled_invalid_control_number': utils.force_list(value.get('z')), - 'national_bibliographic_agency': value.get('2') - if key[3] == '7' + "__order__": tuple(order) if len(order) else None, + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "source": value.get("2"), + "record_control_number": value.get("a"), + "canceled_invalid_control_number": utils.force_list(value.get("z")), + "national_bibliographic_agency": value.get("2") + if key[3] == "7" else indicator_map1.get(key[3]), } -@marc21.over('copyright_or_legal_deposit_number', '^017.[8_]') +@marc21.over("copyright_or_legal_deposit_number", "^017.[8_]") @utils.for_each_value @utils.filter_values def copyright_or_legal_deposit_number(self, key, value): @@ -139,85 +139,85 @@ def copyright_or_legal_deposit_number(self, key, value): "_": "Copyright or legal deposit number", } field_map = { - '8': 'field_link_and_sequence_number', - 'd': 'date', - 'a': 'copyright_or_legal_deposit_number', - 'b': 'assigning_agency', - '2': 'source', - 'i': 'display_text', - '6': 'linkage', - 'z': 'canceled_invalid_copyright_or_legal_deposit_number', + "8": "field_link_and_sequence_number", + "d": "date", + "a": "copyright_or_legal_deposit_number", + "b": "assigning_agency", + "2": "source", + "i": "display_text", + "6": "linkage", + "z": "canceled_invalid_copyright_or_legal_deposit_number", } order = utils.map_order(field_map, value) if key[4] in indicator_map2: - order.append('display_constant_controller') + order.append("display_constant_controller") return { - '__order__': tuple(order) if len(order) else None, - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'date': value.get('d'), - 'copyright_or_legal_deposit_number': utils.force_list(value.get('a')), - 'assigning_agency': value.get('b'), - 'source': value.get('2'), - 'display_text': value.get('i'), - 'linkage': value.get('6'), - 'canceled_invalid_copyright_or_legal_deposit_number': utils.force_list( - value.get('z') + "__order__": tuple(order) if len(order) else None, + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "date": value.get("d"), + "copyright_or_legal_deposit_number": utils.force_list(value.get("a")), + "assigning_agency": value.get("b"), + "source": value.get("2"), + "display_text": value.get("i"), + "linkage": value.get("6"), + "canceled_invalid_copyright_or_legal_deposit_number": utils.force_list( + value.get("z") ), - 'display_constant_controller': indicator_map2.get(key[4]), + "display_constant_controller": indicator_map2.get(key[4]), } -@marc21.over('copyright_article_fee_code', '^018..') +@marc21.over("copyright_article_fee_code", "^018..") @utils.filter_values def copyright_article_fee_code(self, key, value): """Copyright Article-Fee Code.""" field_map = { - '8': 'field_link_and_sequence_number', - 'a': 'copyright_article_fee_code_nr', - '6': 'linkage', + "8": "field_link_and_sequence_number", + "a": "copyright_article_fee_code_nr", + "6": "linkage", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'copyright_article_fee_code_nr': utils.force_list(value.get('a')), - 'linkage': value.get('6'), + "__order__": tuple(order) if len(order) else None, + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "copyright_article_fee_code_nr": utils.force_list(value.get("a")), + "linkage": value.get("6"), } -@marc21.over('international_standard_book_number', '^020..') +@marc21.over("international_standard_book_number", "^020..") @utils.for_each_value @utils.filter_values def international_standard_book_number(self, key, value): """International Standard Book Number.""" field_map = { - '8': 'field_link_and_sequence_number', - 'a': 'international_standard_book_number', - 'z': 'canceled_invalid_isbn', - 'q': 'qualifying_information', - '6': 'linkage', - 'c': 'terms_of_availability', + "8": "field_link_and_sequence_number", + "a": "international_standard_book_number", + "z": "canceled_invalid_isbn", + "q": "qualifying_information", + "6": "linkage", + "c": "terms_of_availability", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'international_standard_book_number': value.get('a'), - 'canceled_invalid_isbn': utils.force_list(value.get('z')), - 'qualifying_information': utils.force_list(value.get('q')), - 'linkage': value.get('6'), - 'terms_of_availability': value.get('c'), + "__order__": tuple(order) if len(order) else None, + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "international_standard_book_number": value.get("a"), + "canceled_invalid_isbn": utils.force_list(value.get("z")), + "qualifying_information": utils.force_list(value.get("q")), + "linkage": value.get("6"), + "terms_of_availability": value.get("c"), } -@marc21.over('international_standard_serial_number', '^022[01_].') +@marc21.over("international_standard_serial_number", "^022[01_].") @utils.for_each_value @utils.filter_values def international_standard_serial_number(self, key, value): @@ -228,36 +228,36 @@ def international_standard_serial_number(self, key, value): "_": "No level specified", } field_map = { - 'l': 'issn_l', - '8': 'field_link_and_sequence_number', - 'a': 'international_standard_serial_number', - 'y': 'incorrect_issn', - '2': 'source', - 'z': 'canceled_issn', - '6': 'linkage', - 'm': 'canceled_issn_l', + "l": "issn_l", + "8": "field_link_and_sequence_number", + "a": "international_standard_serial_number", + "y": "incorrect_issn", + "2": "source", + "z": "canceled_issn", + "6": "linkage", + "m": "canceled_issn_l", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('level_of_international_interest') + order.append("level_of_international_interest") return { - '__order__': tuple(order) if len(order) else None, - 'issn_l': value.get('l'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'international_standard_serial_number': value.get('a'), - 'incorrect_issn': utils.force_list(value.get('y')), - 'source': value.get('2'), - 'canceled_issn': utils.force_list(value.get('z')), - 'linkage': value.get('6'), - 'canceled_issn_l': utils.force_list(value.get('m')), - 'level_of_international_interest': indicator_map1.get(key[3]), + "__order__": tuple(order) if len(order) else None, + "issn_l": value.get("l"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "international_standard_serial_number": value.get("a"), + "incorrect_issn": utils.force_list(value.get("y")), + "source": value.get("2"), + "canceled_issn": utils.force_list(value.get("z")), + "linkage": value.get("6"), + "canceled_issn_l": utils.force_list(value.get("m")), + "level_of_international_interest": indicator_map1.get(key[3]), } -@marc21.over('other_standard_identifier', '^024[4837201_][01_]') +@marc21.over("other_standard_identifier", "^024[4837201_][01_]") @utils.for_each_value @utils.filter_values def other_standard_identifier(self, key, value): @@ -277,123 +277,119 @@ def other_standard_identifier(self, key, value): "_": "No information provided", } field_map = { - '8': 'field_link_and_sequence_number', - 'd': 'additional_codes_following_the_standard_number_or_code', - 'a': 'standard_number_or_code', - 'z': 'canceled_invalid_standard_number_or_code', - '2': 'source_of_number_or_code', - 'c': 'terms_of_availability', - '6': 'linkage', - 'q': 'qualifying_information', + "8": "field_link_and_sequence_number", + "d": "additional_codes_following_the_standard_number_or_code", + "a": "standard_number_or_code", + "z": "canceled_invalid_standard_number_or_code", + "2": "source_of_number_or_code", + "c": "terms_of_availability", + "6": "linkage", + "q": "qualifying_information", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('type_of_standard_number_or_code') + order.append("type_of_standard_number_or_code") if key[4] in indicator_map2: - order.append('difference_indicator') + order.append("difference_indicator") return { - '__order__': tuple(order) if len(order) else None, - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'additional_codes_following_the_standard_number_or_code': value.get( - 'd' - ), - 'standard_number_or_code': value.get('a'), - 'canceled_invalid_standard_number_or_code': utils.force_list( - value.get('z') - ), - 'source_of_number_or_code': value.get('2'), - 'terms_of_availability': value.get('c'), - 'linkage': value.get('6'), - 'qualifying_information': utils.force_list(value.get('q')), - 'type_of_standard_number_or_code': value.get('2') - if key[3] == '7' + "__order__": tuple(order) if len(order) else None, + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "additional_codes_following_the_standard_number_or_code": value.get("d"), + "standard_number_or_code": value.get("a"), + "canceled_invalid_standard_number_or_code": utils.force_list(value.get("z")), + "source_of_number_or_code": value.get("2"), + "terms_of_availability": value.get("c"), + "linkage": value.get("6"), + "qualifying_information": utils.force_list(value.get("q")), + "type_of_standard_number_or_code": value.get("2") + if key[3] == "7" else indicator_map1.get(key[3]), - 'difference_indicator': indicator_map2.get(key[4]), + "difference_indicator": indicator_map2.get(key[4]), } -@marc21.over('overseas_acquisition_number', '^025..') +@marc21.over("overseas_acquisition_number", "^025..") @utils.for_each_value @utils.filter_values def overseas_acquisition_number(self, key, value): """Overseas Acquisition Number.""" field_map = { - '8': 'field_link_and_sequence_number', - 'a': 'overseas_acquisition_number', + "8": "field_link_and_sequence_number", + "a": "overseas_acquisition_number", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'overseas_acquisition_number': utils.force_list(value.get('a')), + "__order__": tuple(order) if len(order) else None, + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "overseas_acquisition_number": utils.force_list(value.get("a")), } -@marc21.over('fingerprint_identifier', '^026..') +@marc21.over("fingerprint_identifier", "^026..") @utils.for_each_value @utils.filter_values def fingerprint_identifier(self, key, value): """Fingerprint Identifier.""" field_map = { - '5': 'institution_to_which_field_applies', - 'd': 'number_of_volume_or_part', - 'a': 'first_and_second_groups_of_characters', - 'e': 'unparsed_fingerprint', - 'b': 'third_and_fourth_groups_of_characters', - '2': 'source', - '8': 'field_link_and_sequence_number', - '6': 'linkage', - 'c': 'date', + "5": "institution_to_which_field_applies", + "d": "number_of_volume_or_part", + "a": "first_and_second_groups_of_characters", + "e": "unparsed_fingerprint", + "b": "third_and_fourth_groups_of_characters", + "2": "source", + "8": "field_link_and_sequence_number", + "6": "linkage", + "c": "date", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'institution_to_which_field_applies': utils.force_list(value.get('5')), - 'number_of_volume_or_part': utils.force_list(value.get('d')), - 'first_and_second_groups_of_characters': value.get('a'), - 'unparsed_fingerprint': value.get('e'), - 'third_and_fourth_groups_of_characters': value.get('b'), - 'source': value.get('2'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'linkage': value.get('6'), - 'date': value.get('c'), + "__order__": tuple(order) if len(order) else None, + "institution_to_which_field_applies": utils.force_list(value.get("5")), + "number_of_volume_or_part": utils.force_list(value.get("d")), + "first_and_second_groups_of_characters": value.get("a"), + "unparsed_fingerprint": value.get("e"), + "third_and_fourth_groups_of_characters": value.get("b"), + "source": value.get("2"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "linkage": value.get("6"), + "date": value.get("c"), } -@marc21.over('standard_technical_report_number', '^027..') +@marc21.over("standard_technical_report_number", "^027..") @utils.for_each_value @utils.filter_values def standard_technical_report_number(self, key, value): """Standard Technical Report Number.""" field_map = { - '8': 'field_link_and_sequence_number', - 'z': 'canceled_invalid_number', - 'a': 'standard_technical_report_number', - '6': 'linkage', - 'q': 'qualifying_information', + "8": "field_link_and_sequence_number", + "z": "canceled_invalid_number", + "a": "standard_technical_report_number", + "6": "linkage", + "q": "qualifying_information", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'canceled_invalid_number': utils.force_list(value.get('z')), - 'standard_technical_report_number': value.get('a'), - 'linkage': value.get('6'), - 'qualifying_information': utils.force_list(value.get('q')), + "__order__": tuple(order) if len(order) else None, + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "canceled_invalid_number": utils.force_list(value.get("z")), + "standard_technical_report_number": value.get("a"), + "linkage": value.get("6"), + "qualifying_information": utils.force_list(value.get("q")), } -@marc21.over('publisher_number', '^028[453201_][2103_]') +@marc21.over("publisher_number", "^028[453201_][2103_]") @utils.for_each_value @utils.filter_values def publisher_number(self, key, value): @@ -413,135 +409,135 @@ def publisher_number(self, key, value): "3": "No note, added entry", } field_map = { - '8': 'field_link_and_sequence_number', - 'b': 'source', - 'a': 'publisher_number', - '6': 'linkage', - 'q': 'qualifying_information', + "8": "field_link_and_sequence_number", + "b": "source", + "a": "publisher_number", + "6": "linkage", + "q": "qualifying_information", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('type_of_publisher_number') + order.append("type_of_publisher_number") if key[4] in indicator_map2: - order.append('note_added_entry_controller') + order.append("note_added_entry_controller") return { - '__order__': tuple(order) if len(order) else None, - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'source': value.get('b'), - 'publisher_number': value.get('a'), - 'linkage': value.get('6'), - 'qualifying_information': utils.force_list(value.get('q')), - 'type_of_publisher_number': indicator_map1.get(key[3]), - 'note_added_entry_controller': indicator_map2.get(key[4]), + "__order__": tuple(order) if len(order) else None, + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "source": value.get("b"), + "publisher_number": value.get("a"), + "linkage": value.get("6"), + "qualifying_information": utils.force_list(value.get("q")), + "type_of_publisher_number": indicator_map1.get(key[3]), + "note_added_entry_controller": indicator_map2.get(key[4]), } -@marc21.over('coden_designation', '^030..') +@marc21.over("coden_designation", "^030..") @utils.for_each_value @utils.filter_values def coden_designation(self, key, value): """CODEN Designation.""" field_map = { - '8': 'field_link_and_sequence_number', - 'a': 'coden', - '6': 'linkage', - 'z': 'canceled_invalid_coden', + "8": "field_link_and_sequence_number", + "a": "coden", + "6": "linkage", + "z": "canceled_invalid_coden", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'coden': value.get('a'), - 'linkage': value.get('6'), - 'canceled_invalid_coden': utils.force_list(value.get('z')), + "__order__": tuple(order) if len(order) else None, + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "coden": value.get("a"), + "linkage": value.get("6"), + "canceled_invalid_coden": utils.force_list(value.get("z")), } -@marc21.over('musical_incipits_information', '^031..') +@marc21.over("musical_incipits_information", "^031..") @utils.for_each_value @utils.filter_values def musical_incipits_information(self, key, value): """Musical Incipits Information.""" field_map = { - 's': 'coded_validity_note', - 'y': 'link_text', - 'a': 'number_of_work', - 'p': 'musical_notation', - 'n': 'key_signature', - 'b': 'number_of_movement', - '2': 'system_code', - 'z': 'public_note', - '6': 'linkage', - 'c': 'number_of_excerpt', - 'r': 'key_or_mode', - '8': 'field_link_and_sequence_number', - 'd': 'caption_or_heading', - 'm': 'voice_instrument', - 'u': 'uniform_resource_identifier', - 't': 'text_incipit', - 'o': 'time_signature', - 'q': 'general_note', - 'g': 'clef', - 'e': 'role', + "s": "coded_validity_note", + "y": "link_text", + "a": "number_of_work", + "p": "musical_notation", + "n": "key_signature", + "b": "number_of_movement", + "2": "system_code", + "z": "public_note", + "6": "linkage", + "c": "number_of_excerpt", + "r": "key_or_mode", + "8": "field_link_and_sequence_number", + "d": "caption_or_heading", + "m": "voice_instrument", + "u": "uniform_resource_identifier", + "t": "text_incipit", + "o": "time_signature", + "q": "general_note", + "g": "clef", + "e": "role", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'coded_validity_note': utils.force_list(value.get('s')), - 'link_text': utils.force_list(value.get('y')), - 'number_of_work': value.get('a'), - 'musical_notation': value.get('p'), - 'key_signature': value.get('n'), - 'number_of_movement': value.get('b'), - 'system_code': value.get('2'), - 'public_note': utils.force_list(value.get('z')), - 'linkage': value.get('6'), - 'number_of_excerpt': value.get('c'), - 'key_or_mode': value.get('r'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'caption_or_heading': utils.force_list(value.get('d')), - 'voice_instrument': value.get('m'), - 'uniform_resource_identifier': utils.force_list(value.get('u')), - 'text_incipit': utils.force_list(value.get('t')), - 'time_signature': value.get('o'), - 'general_note': utils.force_list(value.get('q')), - 'clef': value.get('g'), - 'role': value.get('e'), - } - - -@marc21.over('postal_registration_number', '^032..') + "__order__": tuple(order) if len(order) else None, + "coded_validity_note": utils.force_list(value.get("s")), + "link_text": utils.force_list(value.get("y")), + "number_of_work": value.get("a"), + "musical_notation": value.get("p"), + "key_signature": value.get("n"), + "number_of_movement": value.get("b"), + "system_code": value.get("2"), + "public_note": utils.force_list(value.get("z")), + "linkage": value.get("6"), + "number_of_excerpt": value.get("c"), + "key_or_mode": value.get("r"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "caption_or_heading": utils.force_list(value.get("d")), + "voice_instrument": value.get("m"), + "uniform_resource_identifier": utils.force_list(value.get("u")), + "text_incipit": utils.force_list(value.get("t")), + "time_signature": value.get("o"), + "general_note": utils.force_list(value.get("q")), + "clef": value.get("g"), + "role": value.get("e"), + } + + +@marc21.over("postal_registration_number", "^032..") @utils.for_each_value @utils.filter_values def postal_registration_number(self, key, value): """Postal Registration Number.""" field_map = { - '8': 'field_link_and_sequence_number', - 'b': 'source_agency_assigning_number', - 'a': 'postal_registration_number', - '6': 'linkage', + "8": "field_link_and_sequence_number", + "b": "source_agency_assigning_number", + "a": "postal_registration_number", + "6": "linkage", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'source_agency_assigning_number': value.get('b'), - 'postal_registration_number': value.get('a'), - 'linkage': value.get('6'), + "__order__": tuple(order) if len(order) else None, + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "source_agency_assigning_number": value.get("b"), + "postal_registration_number": value.get("a"), + "linkage": value.get("6"), } -@marc21.over('date_time_and_place_of_an_event', '^033[201_][201_]') +@marc21.over("date_time_and_place_of_an_event", "^033[201_][201_]") @utils.for_each_value @utils.filter_values def date_time_and_place_of_an_event(self, key, value): @@ -559,46 +555,42 @@ def date_time_and_place_of_an_event(self, key, value): "_": "No information provided", } field_map = { - '8': 'field_link_and_sequence_number', - 'c': 'geographic_classification_subarea_code', - '3': 'materials_specified', - 'p': 'place_of_event', - 'b': 'geographic_classification_area_code', - '2': 'source_of_term', - '0': 'authority_record_control_number', - '6': 'linkage', - 'a': 'formatted_date_time', + "8": "field_link_and_sequence_number", + "c": "geographic_classification_subarea_code", + "3": "materials_specified", + "p": "place_of_event", + "b": "geographic_classification_area_code", + "2": "source_of_term", + "0": "authority_record_control_number", + "6": "linkage", + "a": "formatted_date_time", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('type_of_date_in_subfield_a') + order.append("type_of_date_in_subfield_a") if key[4] in indicator_map2: - order.append('type_of_event') + order.append("type_of_event") return { - '__order__': tuple(order) if len(order) else None, - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'geographic_classification_subarea_code': utils.force_list( - value.get('c') - ), - 'materials_specified': value.get('3'), - 'place_of_event': utils.force_list(value.get('p')), - 'geographic_classification_area_code': utils.force_list( - value.get('b') - ), - 'source_of_term': utils.force_list(value.get('2')), - 'authority_record_control_number': utils.force_list(value.get('0')), - 'linkage': value.get('6'), - 'formatted_date_time': utils.force_list(value.get('a')), - 'type_of_date_in_subfield_a': indicator_map1.get(key[3]), - 'type_of_event': indicator_map2.get(key[4]), - } - - -@marc21.over('coded_cartographic_mathematical_data', '^034[103_][01_]') + "__order__": tuple(order) if len(order) else None, + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "geographic_classification_subarea_code": utils.force_list(value.get("c")), + "materials_specified": value.get("3"), + "place_of_event": utils.force_list(value.get("p")), + "geographic_classification_area_code": utils.force_list(value.get("b")), + "source_of_term": utils.force_list(value.get("2")), + "authority_record_control_number": utils.force_list(value.get("0")), + "linkage": value.get("6"), + "formatted_date_time": utils.force_list(value.get("a")), + "type_of_date_in_subfield_a": indicator_map1.get(key[3]), + "type_of_event": indicator_map2.get(key[4]), + } + + +@marc21.over("coded_cartographic_mathematical_data", "^034[103_][01_]") @utils.for_each_value @utils.filter_values def coded_cartographic_mathematical_data(self, key, value): @@ -614,123 +606,119 @@ def coded_cartographic_mathematical_data(self, key, value): "_": "Not applicable", } field_map = { - 'j': 'declination_northern_limit', - 'z': 'name_of_extraterrestrial_body', - 'n': 'right_ascension_western_limit', - 'b': 'constant_ratio_linear_horizontal_scale', - '2': 'source', - 'a': 'category_of_scale', - 'm': 'right_ascension_eastern_limit', - 'y': 'ending_date', - 's': 'g_ring_latitude', - 'c': 'constant_ratio_linear_vertical_scale', - '3': 'materials_specified', - 'p': 'equinox', - 'e': 'coordinates_easternmost_longitude', - '8': 'field_link_and_sequence_number', - '6': 'linkage', - 'g': 'coordinates_southernmost_latitude', - 'r': 'distance_from_earth', - 'k': 'declination_southern_limit', - 'd': 'coordinates_westernmost_longitude', - 'f': 'coordinates_northernmost_latitude', - 't': 'g_ring_longitude', - 'x': 'beginning_date', - 'h': 'angular_scale', - '0': 'authority_record_control_number_or_standard_number', + "j": "declination_northern_limit", + "z": "name_of_extraterrestrial_body", + "n": "right_ascension_western_limit", + "b": "constant_ratio_linear_horizontal_scale", + "2": "source", + "a": "category_of_scale", + "m": "right_ascension_eastern_limit", + "y": "ending_date", + "s": "g_ring_latitude", + "c": "constant_ratio_linear_vertical_scale", + "3": "materials_specified", + "p": "equinox", + "e": "coordinates_easternmost_longitude", + "8": "field_link_and_sequence_number", + "6": "linkage", + "g": "coordinates_southernmost_latitude", + "r": "distance_from_earth", + "k": "declination_southern_limit", + "d": "coordinates_westernmost_longitude", + "f": "coordinates_northernmost_latitude", + "t": "g_ring_longitude", + "x": "beginning_date", + "h": "angular_scale", + "0": "authority_record_control_number_or_standard_number", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('type_of_scale') + order.append("type_of_scale") if key[4] in indicator_map2: - order.append('type_of_ring') + order.append("type_of_ring") return { - '__order__': tuple(order) if len(order) else None, - 'declination_northern_limit': value.get('j'), - 'name_of_extraterrestrial_body': value.get('z'), - 'right_ascension_western_limit': value.get('n'), - 'constant_ratio_linear_horizontal_scale': utils.force_list( - value.get('b') - ), - 'source': value.get('2'), - 'category_of_scale': value.get('a'), - 'right_ascension_eastern_limit': value.get('m'), - 'ending_date': value.get('y'), - 'g_ring_latitude': utils.force_list(value.get('s')), - 'constant_ratio_linear_vertical_scale': utils.force_list( - value.get('c') - ), - 'materials_specified': value.get('3'), - 'equinox': value.get('p'), - 'coordinates_easternmost_longitude': value.get('e'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'linkage': value.get('6'), - 'coordinates_southernmost_latitude': value.get('g'), - 'distance_from_earth': value.get('r'), - 'declination_southern_limit': value.get('k'), - 'coordinates_westernmost_longitude': value.get('d'), - 'coordinates_northernmost_latitude': value.get('f'), - 'g_ring_longitude': utils.force_list(value.get('t')), - 'beginning_date': value.get('x'), - 'angular_scale': utils.force_list(value.get('h')), - 'authority_record_control_number_or_standard_number': utils.force_list( - value.get('0') + "__order__": tuple(order) if len(order) else None, + "declination_northern_limit": value.get("j"), + "name_of_extraterrestrial_body": value.get("z"), + "right_ascension_western_limit": value.get("n"), + "constant_ratio_linear_horizontal_scale": utils.force_list(value.get("b")), + "source": value.get("2"), + "category_of_scale": value.get("a"), + "right_ascension_eastern_limit": value.get("m"), + "ending_date": value.get("y"), + "g_ring_latitude": utils.force_list(value.get("s")), + "constant_ratio_linear_vertical_scale": utils.force_list(value.get("c")), + "materials_specified": value.get("3"), + "equinox": value.get("p"), + "coordinates_easternmost_longitude": value.get("e"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "linkage": value.get("6"), + "coordinates_southernmost_latitude": value.get("g"), + "distance_from_earth": value.get("r"), + "declination_southern_limit": value.get("k"), + "coordinates_westernmost_longitude": value.get("d"), + "coordinates_northernmost_latitude": value.get("f"), + "g_ring_longitude": utils.force_list(value.get("t")), + "beginning_date": value.get("x"), + "angular_scale": utils.force_list(value.get("h")), + "authority_record_control_number_or_standard_number": utils.force_list( + value.get("0") ), - 'type_of_scale': indicator_map1.get(key[3]), - 'type_of_ring': indicator_map2.get(key[4]), + "type_of_scale": indicator_map1.get(key[3]), + "type_of_ring": indicator_map2.get(key[4]), } -@marc21.over('system_control_number', '^035..') +@marc21.over("system_control_number", "^035..") @utils.for_each_value @utils.filter_values def system_control_number(self, key, value): """System Control Number.""" field_map = { - '8': 'field_link_and_sequence_number', - 'a': 'system_control_number', - '6': 'linkage', - 'z': 'canceled_invalid_control_number', + "8": "field_link_and_sequence_number", + "a": "system_control_number", + "6": "linkage", + "z": "canceled_invalid_control_number", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'system_control_number': value.get('a'), - 'linkage': value.get('6'), - 'canceled_invalid_control_number': utils.force_list(value.get('z')), + "__order__": tuple(order) if len(order) else None, + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "system_control_number": value.get("a"), + "linkage": value.get("6"), + "canceled_invalid_control_number": utils.force_list(value.get("z")), } -@marc21.over('original_study_number_for_computer_data_files', '^036..') +@marc21.over("original_study_number_for_computer_data_files", "^036..") @utils.filter_values def original_study_number_for_computer_data_files(self, key, value): """Original Study Number for Computer Data Files.""" field_map = { - '8': 'field_link_and_sequence_number', - 'b': 'source_agency_assigning_number', - 'a': 'original_study_number', - '6': 'linkage', + "8": "field_link_and_sequence_number", + "b": "source_agency_assigning_number", + "a": "original_study_number", + "6": "linkage", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'source_agency_assigning_number': value.get('b'), - 'original_study_number': value.get('a'), - 'linkage': value.get('6'), + "__order__": tuple(order) if len(order) else None, + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "source_agency_assigning_number": value.get("b"), + "original_study_number": value.get("a"), + "linkage": value.get("6"), } -@marc21.over('source_of_acquisition', '^037[23_].') +@marc21.over("source_of_acquisition", "^037[23_].") @utils.for_each_value @utils.filter_values def source_of_acquisition(self, key, value): @@ -741,88 +729,88 @@ def source_of_acquisition(self, key, value): "_": "Not applicable/No information provided/Earliest", } field_map = { - '8': 'field_link_and_sequence_number', - 'c': 'terms_of_availability', - '3': 'materials_specified', - 'f': 'form_of_issue', - 'n': 'note', - 'b': 'source_of_stock_number_acquisition', - 'g': 'additional_format_characteristics', - '5': 'institution_to_which_field_applies', - '6': 'linkage', - 'a': 'stock_number', + "8": "field_link_and_sequence_number", + "c": "terms_of_availability", + "3": "materials_specified", + "f": "form_of_issue", + "n": "note", + "b": "source_of_stock_number_acquisition", + "g": "additional_format_characteristics", + "5": "institution_to_which_field_applies", + "6": "linkage", + "a": "stock_number", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('source_of_acquisition_sequence') + order.append("source_of_acquisition_sequence") return { - '__order__': tuple(order) if len(order) else None, - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'terms_of_availability': utils.force_list(value.get('c')), - 'materials_specified': value.get('3'), - 'form_of_issue': utils.force_list(value.get('f')), - 'note': utils.force_list(value.get('n')), - 'source_of_stock_number_acquisition': value.get('b'), - 'additional_format_characteristics': utils.force_list(value.get('g')), - 'institution_to_which_field_applies': utils.force_list(value.get('5')), - 'linkage': value.get('6'), - 'stock_number': value.get('a'), - 'source_of_acquisition_sequence': indicator_map1.get(key[3]), - } - - -@marc21.over('record_content_licensor', '^038..') + "__order__": tuple(order) if len(order) else None, + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "terms_of_availability": utils.force_list(value.get("c")), + "materials_specified": value.get("3"), + "form_of_issue": utils.force_list(value.get("f")), + "note": utils.force_list(value.get("n")), + "source_of_stock_number_acquisition": value.get("b"), + "additional_format_characteristics": utils.force_list(value.get("g")), + "institution_to_which_field_applies": utils.force_list(value.get("5")), + "linkage": value.get("6"), + "stock_number": value.get("a"), + "source_of_acquisition_sequence": indicator_map1.get(key[3]), + } + + +@marc21.over("record_content_licensor", "^038..") @utils.filter_values def record_content_licensor(self, key, value): """Record Content Licensor.""" field_map = { - '8': 'field_link_and_sequence_number', - 'a': 'record_content_licensor', - '6': 'linkage', + "8": "field_link_and_sequence_number", + "a": "record_content_licensor", + "6": "linkage", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'record_content_licensor': value.get('a'), - 'linkage': value.get('6'), + "__order__": tuple(order) if len(order) else None, + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "record_content_licensor": value.get("a"), + "linkage": value.get("6"), } -@marc21.over('cataloging_source', '^040..') +@marc21.over("cataloging_source", "^040..") @utils.filter_values def cataloging_source(self, key, value): """Cataloging Source.""" field_map = { - '8': 'field_link_and_sequence_number', - 'd': 'modifying_agency', - 'a': 'original_cataloging_agency', - 'b': 'language_of_cataloging', - 'c': 'transcribing_agency', - '6': 'linkage', - 'e': 'description_conventions', + "8": "field_link_and_sequence_number", + "d": "modifying_agency", + "a": "original_cataloging_agency", + "b": "language_of_cataloging", + "c": "transcribing_agency", + "6": "linkage", + "e": "description_conventions", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'modifying_agency': utils.force_list(value.get('d')), - 'original_cataloging_agency': value.get('a'), - 'language_of_cataloging': value.get('b'), - 'transcribing_agency': value.get('c'), - 'linkage': value.get('6'), - 'description_conventions': utils.force_list(value.get('e')), + "__order__": tuple(order) if len(order) else None, + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "modifying_agency": utils.force_list(value.get("d")), + "original_cataloging_agency": value.get("a"), + "language_of_cataloging": value.get("b"), + "transcribing_agency": value.get("c"), + "linkage": value.get("6"), + "description_conventions": utils.force_list(value.get("e")), } -@marc21.over('language_code', '^041[01_][7_]') +@marc21.over("language_code", "^041[01_][7_]") @utils.for_each_value @utils.filter_values def language_code(self, key, value): @@ -837,134 +825,129 @@ def language_code(self, key, value): "_": "MARC language code", } field_map = { - 'j': 'language_code_of_subtitles_or_captions', - 'a': 'language_code_of_text_sound_track_or_separate_title', - 'n': 'language_code_of_original_libretto', - 'b': 'language_code_of_summary_or_abstract', - '2': 'source_of_code', - 'm': 'language_code_of_original_accompanying_materials_other_than_librettos', # nopep8 - 'k': 'language_code_of_intermediate_translations', - '6': 'linkage', - '8': 'field_link_and_sequence_number', - 'd': 'language_code_of_sung_or_spoken_text', - 'f': 'language_code_of_table_of_contents', - 'h': 'language_code_of_original', - 'g': 'language_code_of_accompanying_material_other_than_librettos', - 'e': 'language_code_of_librettos', + "j": "language_code_of_subtitles_or_captions", + "a": "language_code_of_text_sound_track_or_separate_title", + "n": "language_code_of_original_libretto", + "b": "language_code_of_summary_or_abstract", + "2": "source_of_code", + "m": "language_code_of_original_accompanying_materials_other_than_librettos", # nopep8 + "k": "language_code_of_intermediate_translations", + "6": "linkage", + "8": "field_link_and_sequence_number", + "d": "language_code_of_sung_or_spoken_text", + "f": "language_code_of_table_of_contents", + "h": "language_code_of_original", + "g": "language_code_of_accompanying_material_other_than_librettos", + "e": "language_code_of_librettos", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('translation_indication') + order.append("translation_indication") - if key[4] in indicator_map2 and '2' not in value: - order.append('source_of_code') + if key[4] in indicator_map2 and "2" not in value: + order.append("source_of_code") return { - '__order__': tuple(order) if len(order) else None, - 'language_code_of_subtitles_or_captions': utils.force_list( - value.get('j') + "__order__": tuple(order) if len(order) else None, + "language_code_of_subtitles_or_captions": utils.force_list(value.get("j")), + "language_code_of_text_sound_track_or_separate_title": utils.force_list( + value.get("a") ), - 'language_code_of_text_sound_track_or_separate_title': - utils.force_list(value.get('a')), - 'language_code_of_original_libretto': utils.force_list(value.get('n')), - 'language_code_of_summary_or_abstract': utils.force_list( - value.get('b') + "language_code_of_original_libretto": utils.force_list(value.get("n")), + "language_code_of_summary_or_abstract": utils.force_list(value.get("b")), + "language_code_of_original_accompanying_materials_other_than_librettos": utils.force_list( # nopep8 + value.get("m") ), - 'language_code_of_original_accompanying_materials_other_than_librettos': # nopep8 - utils.force_list(value.get('m')), - 'language_code_of_intermediate_translations': utils.force_list( - value.get('k') + "language_code_of_intermediate_translations": utils.force_list(value.get("k")), + "linkage": value.get("6"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "language_code_of_sung_or_spoken_text": utils.force_list(value.get("d")), + "language_code_of_table_of_contents": utils.force_list(value.get("f")), + "language_code_of_original": utils.force_list(value.get("h")), + "language_code_of_accompanying_material_other_than_librettos": utils.force_list( + value.get("g") ), - 'linkage': value.get('6'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'language_code_of_sung_or_spoken_text': utils.force_list( - value.get('d') - ), - 'language_code_of_table_of_contents': utils.force_list(value.get('f')), - 'language_code_of_original': utils.force_list(value.get('h')), - 'language_code_of_accompanying_material_other_than_librettos': - utils.force_list(value.get('g')), - 'language_code_of_librettos': utils.force_list(value.get('e')), - 'translation_indication': indicator_map1.get(key[3]), - 'source_of_code': value.get('2') - if key[4] == '7' + "language_code_of_librettos": utils.force_list(value.get("e")), + "translation_indication": indicator_map1.get(key[3]), + "source_of_code": value.get("2") + if key[4] == "7" else indicator_map2.get(key[4]), } -@marc21.over('authentication_code', '^042..') +@marc21.over("authentication_code", "^042..") @utils.filter_values def authentication_code(self, key, value): """Authentication Code.""" - field_map = {'a': 'authentication_code'} + field_map = {"a": "authentication_code"} order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'authentication_code': utils.force_list(value.get('a')), + "__order__": tuple(order) if len(order) else None, + "authentication_code": utils.force_list(value.get("a")), } -@marc21.over('geographic_area_code', '^043..') +@marc21.over("geographic_area_code", "^043..") @utils.filter_values def geographic_area_code(self, key, value): """Geographic Area Code.""" field_map = { - '8': 'field_link_and_sequence_number', - 'a': 'geographic_area_code', - 'b': 'local_gac_code', - '2': 'source_of_local_code', - '0': 'authority_record_control_number_or_standard_number', - '6': 'linkage', - 'c': 'iso_code', + "8": "field_link_and_sequence_number", + "a": "geographic_area_code", + "b": "local_gac_code", + "2": "source_of_local_code", + "0": "authority_record_control_number_or_standard_number", + "6": "linkage", + "c": "iso_code", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'geographic_area_code': utils.force_list(value.get('a')), - 'local_gac_code': utils.force_list(value.get('b')), - 'source_of_local_code': utils.force_list(value.get('2')), - 'authority_record_control_number_or_standard_number': utils.force_list( - value.get('0') + "__order__": tuple(order) if len(order) else None, + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "geographic_area_code": utils.force_list(value.get("a")), + "local_gac_code": utils.force_list(value.get("b")), + "source_of_local_code": utils.force_list(value.get("2")), + "authority_record_control_number_or_standard_number": utils.force_list( + value.get("0") ), - 'linkage': value.get('6'), - 'iso_code': utils.force_list(value.get('c')), + "linkage": value.get("6"), + "iso_code": utils.force_list(value.get("c")), } -@marc21.over('country_of_publishing_producing_entity_code', '^044..') +@marc21.over("country_of_publishing_producing_entity_code", "^044..") @utils.filter_values def country_of_publishing_producing_entity_code(self, key, value): """Country of Publishing/Producing Entity Code.""" field_map = { - '8': 'field_link_and_sequence_number', - 'a': 'marc_country_code', - 'b': 'local_subentity_code', - '2': 'source_of_local_subentity_code', - 'c': 'iso_country_code', - '6': 'linkage', + "8": "field_link_and_sequence_number", + "a": "marc_country_code", + "b": "local_subentity_code", + "2": "source_of_local_subentity_code", + "c": "iso_country_code", + "6": "linkage", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'marc_country_code': utils.force_list(value.get('a')), - 'local_subentity_code': utils.force_list(value.get('b')), - 'source_of_local_subentity_code': utils.force_list(value.get('2')), - 'iso_country_code': utils.force_list(value.get('c')), - 'linkage': value.get('6'), + "__order__": tuple(order) if len(order) else None, + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "marc_country_code": utils.force_list(value.get("a")), + "local_subentity_code": utils.force_list(value.get("b")), + "source_of_local_subentity_code": utils.force_list(value.get("2")), + "iso_country_code": utils.force_list(value.get("c")), + "linkage": value.get("6"), } -@marc21.over('time_period_of_content', '^045[201_].') +@marc21.over("time_period_of_content", "^045[201_].") @utils.filter_values def time_period_of_content(self, key, value): """Time Period of Content.""" @@ -975,77 +958,75 @@ def time_period_of_content(self, key, value): "_": "Subfield $b or $c not present", } field_map = { - '8': 'field_link_and_sequence_number', - 'b': 'formatted_9999_bc_through_ce_time_period', - 'a': 'time_period_code', - '6': 'linkage', - 'c': 'formatted_pre_9999_bc_time_period', + "8": "field_link_and_sequence_number", + "b": "formatted_9999_bc_through_ce_time_period", + "a": "time_period_code", + "6": "linkage", + "c": "formatted_pre_9999_bc_time_period", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('type_of_time_period_in_subfield_b_or_c') + order.append("type_of_time_period_in_subfield_b_or_c") return { - '__order__': tuple(order) if len(order) else None, - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'formatted_9999_bc_through_ce_time_period': utils.force_list( - value.get('b') - ), - 'time_period_code': utils.force_list(value.get('a')), - 'linkage': value.get('6'), - 'formatted_pre_9999_bc_time_period': utils.force_list(value.get('c')), - 'type_of_time_period_in_subfield_b_or_c': indicator_map1.get(key[3]), + "__order__": tuple(order) if len(order) else None, + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "formatted_9999_bc_through_ce_time_period": utils.force_list(value.get("b")), + "time_period_code": utils.force_list(value.get("a")), + "linkage": value.get("6"), + "formatted_pre_9999_bc_time_period": utils.force_list(value.get("c")), + "type_of_time_period_in_subfield_b_or_c": indicator_map1.get(key[3]), } -@marc21.over('special_coded_dates', '^046..') +@marc21.over("special_coded_dates", "^046..") @utils.for_each_value @utils.filter_values def special_coded_dates(self, key, value): """Special Coded Dates.""" field_map = { - 'l': 'ending_date_created', - 'j': 'date_resource_modified', - 'a': 'type_of_date_code', - 'p': 'ending_date_for_aggregated_content', - 'n': 'end_of_date_valid', - 'b': 'date_1_bc_date', - '2': 'source_of_date', - '8': 'field_link_and_sequence_number', - '6': 'linkage', - 'k': 'beginning_or_single_date_created', - 'd': 'date_2_bc_date', - 'm': 'beginning_of_date_valid', - 'o': 'single_or_starting_date_for_aggregated_content', - 'c': 'date_1_ce_date', - 'e': 'date_2_ce_date', + "l": "ending_date_created", + "j": "date_resource_modified", + "a": "type_of_date_code", + "p": "ending_date_for_aggregated_content", + "n": "end_of_date_valid", + "b": "date_1_bc_date", + "2": "source_of_date", + "8": "field_link_and_sequence_number", + "6": "linkage", + "k": "beginning_or_single_date_created", + "d": "date_2_bc_date", + "m": "beginning_of_date_valid", + "o": "single_or_starting_date_for_aggregated_content", + "c": "date_1_ce_date", + "e": "date_2_ce_date", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'ending_date_created': value.get('l'), - 'date_resource_modified': value.get('j'), - 'type_of_date_code': value.get('a'), - 'ending_date_for_aggregated_content': value.get('p'), - 'end_of_date_valid': value.get('n'), - 'date_1_bc_date': value.get('b'), - 'source_of_date': value.get('2'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'linkage': value.get('6'), - 'beginning_or_single_date_created': value.get('k'), - 'date_2_bc_date': value.get('d'), - 'beginning_of_date_valid': value.get('m'), - 'single_or_starting_date_for_aggregated_content': value.get('o'), - 'date_1_ce_date': value.get('c'), - 'date_2_ce_date': value.get('e'), - } - - -@marc21.over('form_of_musical_composition_code', '^047.[7_]') + "__order__": tuple(order) if len(order) else None, + "ending_date_created": value.get("l"), + "date_resource_modified": value.get("j"), + "type_of_date_code": value.get("a"), + "ending_date_for_aggregated_content": value.get("p"), + "end_of_date_valid": value.get("n"), + "date_1_bc_date": value.get("b"), + "source_of_date": value.get("2"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "linkage": value.get("6"), + "beginning_or_single_date_created": value.get("k"), + "date_2_bc_date": value.get("d"), + "beginning_of_date_valid": value.get("m"), + "single_or_starting_date_for_aggregated_content": value.get("o"), + "date_1_ce_date": value.get("c"), + "date_2_ce_date": value.get("e"), + } + + +@marc21.over("form_of_musical_composition_code", "^047.[7_]") @utils.for_each_value @utils.filter_values def form_of_musical_composition_code(self, key, value): @@ -1055,56 +1036,56 @@ def form_of_musical_composition_code(self, key, value): "_": "MARC musical composition code", } field_map = { - '8': 'field_link_and_sequence_number', - '2': 'source_of_code', - 'a': 'form_of_musical_composition_code', + "8": "field_link_and_sequence_number", + "2": "source_of_code", + "a": "form_of_musical_composition_code", } order = utils.map_order(field_map, value) - if key[4] in indicator_map2 and '2' not in value: - order.append('source_of_code') + if key[4] in indicator_map2 and "2" not in value: + order.append("source_of_code") return { - '__order__': tuple(order) if len(order) else None, - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'form_of_musical_composition_code': utils.force_list(value.get('a')), - 'source_of_code': value.get('2') - if key[4] == '7' + "__order__": tuple(order) if len(order) else None, + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "form_of_musical_composition_code": utils.force_list(value.get("a")), + "source_of_code": value.get("2") + if key[4] == "7" else indicator_map2.get(key[4]), } -@marc21.over('number_of_musical_instruments_or_voices_code', '^048.[7_]') +@marc21.over("number_of_musical_instruments_or_voices_code", "^048.[7_]") @utils.for_each_value @utils.filter_values def number_of_musical_instruments_or_voices_code(self, key, value): """Number of Musical Instruments or Voices Code.""" indicator_map2 = {"7": "Source specified in subfield $2", "_": "MARC code"} field_map = { - '8': 'field_link_and_sequence_number', - '2': 'source_of_code', - 'b': 'soloist', - 'a': 'performer_or_ensemble', + "8": "field_link_and_sequence_number", + "2": "source_of_code", + "b": "soloist", + "a": "performer_or_ensemble", } order = utils.map_order(field_map, value) - if key[4] in indicator_map2 and '2' not in value: - order.append('source_of_code') + if key[4] in indicator_map2 and "2" not in value: + order.append("source_of_code") return { - '__order__': tuple(order) if len(order) else None, - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'soloist': utils.force_list(value.get('b')), - 'performer_or_ensemble': utils.force_list(value.get('a')), - 'source_of_code': value.get('2') - if key[4] == '7' + "__order__": tuple(order) if len(order) else None, + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "soloist": utils.force_list(value.get("b")), + "performer_or_ensemble": utils.force_list(value.get("a")), + "source_of_code": value.get("2") + if key[4] == "7" else indicator_map2.get(key[4]), } -@marc21.over('library_of_congress_call_number', '^050[01_][40_]') +@marc21.over("library_of_congress_call_number", "^050[01_][40_]") @utils.for_each_value @utils.filter_values def library_of_congress_call_number(self, key, value): @@ -1119,57 +1100,57 @@ def library_of_congress_call_number(self, key, value): "4": "Assigned by agency other than LC", } field_map = { - '8': 'field_link_and_sequence_number', - 'b': 'item_number', - '6': 'linkage', - '3': 'materials_specified', - 'a': 'classification_number', + "8": "field_link_and_sequence_number", + "b": "item_number", + "6": "linkage", + "3": "materials_specified", + "a": "classification_number", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('existence_in_lc_collection') + order.append("existence_in_lc_collection") if key[4] in indicator_map2: - order.append('source_of_call_number') + order.append("source_of_call_number") return { - '__order__': tuple(order) if len(order) else None, - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'item_number': value.get('b'), - 'linkage': value.get('6'), - 'materials_specified': value.get('3'), - 'classification_number': utils.force_list(value.get('a')), - 'existence_in_lc_collection': indicator_map1.get(key[3]), - 'source_of_call_number': indicator_map2.get(key[4]), + "__order__": tuple(order) if len(order) else None, + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "item_number": value.get("b"), + "linkage": value.get("6"), + "materials_specified": value.get("3"), + "classification_number": utils.force_list(value.get("a")), + "existence_in_lc_collection": indicator_map1.get(key[3]), + "source_of_call_number": indicator_map2.get(key[4]), } -@marc21.over('library_of_congress_copy_issue_offprint_statement', '^051..') +@marc21.over("library_of_congress_copy_issue_offprint_statement", "^051..") @utils.for_each_value @utils.filter_values def library_of_congress_copy_issue_offprint_statement(self, key, value): """Library of Congress Copy, Issue, Offprint Statement.""" field_map = { - '8': 'field_link_and_sequence_number', - 'b': 'item_number', - 'a': 'classification_number', - 'c': 'copy_information', + "8": "field_link_and_sequence_number", + "b": "item_number", + "a": "classification_number", + "c": "copy_information", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'item_number': value.get('b'), - 'classification_number': value.get('a'), - 'copy_information': value.get('c'), + "__order__": tuple(order) if len(order) else None, + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "item_number": value.get("b"), + "classification_number": value.get("a"), + "copy_information": value.get("c"), } -@marc21.over('geographic_classification', '^052[71_].') +@marc21.over("geographic_classification", "^052[71_].") @utils.for_each_value @utils.filter_values def geographic_classification(self, key, value): @@ -1180,37 +1161,31 @@ def geographic_classification(self, key, value): "_": "Library of Congress Classification", } field_map = { - '8': 'field_link_and_sequence_number', - 'd': 'populated_place_name', - 'a': 'geographic_classification_area_code', - 'b': 'geographic_classification_subarea_code', - '2': 'code_source', - '6': 'linkage', + "8": "field_link_and_sequence_number", + "d": "populated_place_name", + "a": "geographic_classification_area_code", + "b": "geographic_classification_subarea_code", + "2": "code_source", + "6": "linkage", } order = utils.map_order(field_map, value) - if key[3] in indicator_map1 and '2' not in value: - order.append('code_source') + if key[3] in indicator_map1 and "2" not in value: + order.append("code_source") return { - '__order__': tuple(order) if len(order) else None, - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'populated_place_name': utils.force_list(value.get('d')), - 'geographic_classification_area_code': value.get('a'), - 'geographic_classification_subarea_code': utils.force_list( - value.get('b') - ), - 'linkage': value.get('6'), - 'code_source': value.get('2') - if key[3] == '7' - else indicator_map1.get(key[3]), + "__order__": tuple(order) if len(order) else None, + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "populated_place_name": utils.force_list(value.get("d")), + "geographic_classification_area_code": value.get("a"), + "geographic_classification_subarea_code": utils.force_list(value.get("b")), + "linkage": value.get("6"), + "code_source": value.get("2") if key[3] == "7" else indicator_map1.get(key[3]), } -@marc21.over( - 'classification_numbers_assigned_in_canada', '^055[01_][9721645803_]' -) +@marc21.over("classification_numbers_assigned_in_canada", "^055[01_][9721645803_]") @utils.for_each_value @utils.filter_values def classification_numbers_assigned_in_canada(self, key, value): @@ -1233,36 +1208,34 @@ def classification_numbers_assigned_in_canada(self, key, value): "9": "Other class number assigned by the contributing library", } field_map = { - '8': 'field_link_and_sequence_number', - '2': 'source_of_call_class_number', - 'b': 'item_number', - 'a': 'classification_number', - '6': 'linkage', + "8": "field_link_and_sequence_number", + "2": "source_of_call_class_number", + "b": "item_number", + "a": "classification_number", + "6": "linkage", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('existence_in_lac_collection') + order.append("existence_in_lac_collection") if key[4] in indicator_map2: - order.append('type_completeness_source_of_class_call_number') + order.append("type_completeness_source_of_class_call_number") return { - '__order__': tuple(order) if len(order) else None, - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'source_of_call_class_number': value.get('2'), - 'item_number': value.get('b'), - 'classification_number': value.get('a'), - 'linkage': value.get('6'), - 'existence_in_lac_collection': indicator_map1.get(key[3]), - 'type_completeness_source_of_class_call_number': indicator_map2.get( - key[4] - ), + "__order__": tuple(order) if len(order) else None, + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "source_of_call_class_number": value.get("2"), + "item_number": value.get("b"), + "classification_number": value.get("a"), + "linkage": value.get("6"), + "existence_in_lac_collection": indicator_map1.get(key[3]), + "type_completeness_source_of_class_call_number": indicator_map2.get(key[4]), } -@marc21.over('national_library_of_medicine_call_number', '^060[01_][40_]') +@marc21.over("national_library_of_medicine_call_number", "^060[01_][40_]") @utils.for_each_value @utils.filter_values def national_library_of_medicine_call_number(self, key, value): @@ -1277,122 +1250,122 @@ def national_library_of_medicine_call_number(self, key, value): "4": "Assigned by agency other than NLM", } field_map = { - '8': 'field_link_and_sequence_number', - 'b': 'item_number', - 'a': 'classification_number_r', + "8": "field_link_and_sequence_number", + "b": "item_number", + "a": "classification_number_r", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('existence_in_nlm_collection') + order.append("existence_in_nlm_collection") if key[4] in indicator_map2: - order.append('source_of_call_number') + order.append("source_of_call_number") return { - '__order__': tuple(order) if len(order) else None, - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'item_number': value.get('b'), - 'classification_number_r': utils.force_list(value.get('a')), - 'existence_in_nlm_collection': indicator_map1.get(key[3]), - 'source_of_call_number': indicator_map2.get(key[4]), + "__order__": tuple(order) if len(order) else None, + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "item_number": value.get("b"), + "classification_number_r": utils.force_list(value.get("a")), + "existence_in_nlm_collection": indicator_map1.get(key[3]), + "source_of_call_number": indicator_map2.get(key[4]), } -@marc21.over('national_library_of_medicine_copy_statement', '^061..') +@marc21.over("national_library_of_medicine_copy_statement", "^061..") @utils.for_each_value @utils.filter_values def national_library_of_medicine_copy_statement(self, key, value): """National Library of Medicine Copy Statement.""" field_map = { - '8': 'field_link_and_sequence_number', - 'b': 'item_number', - 'a': 'classification_number', - 'c': 'copy_information', + "8": "field_link_and_sequence_number", + "b": "item_number", + "a": "classification_number", + "c": "copy_information", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'item_number': value.get('b'), - 'classification_number': utils.force_list(value.get('a')), - 'copy_information': value.get('c'), + "__order__": tuple(order) if len(order) else None, + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "item_number": value.get("b"), + "classification_number": utils.force_list(value.get("a")), + "copy_information": value.get("c"), } -@marc21.over('character_sets_present', '^066..') +@marc21.over("character_sets_present", "^066..") @utils.filter_values def character_sets_present(self, key, value): """Character Sets Present.""" field_map = { - 'b': 'primary_g1_character_set', - 'a': 'primary_g0_character_set', - 'c': 'alternate_g0_or_g1_character_set', + "b": "primary_g1_character_set", + "a": "primary_g0_character_set", + "c": "alternate_g0_or_g1_character_set", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'primary_g1_character_set': value.get('b'), - 'primary_g0_character_set': value.get('a'), - 'alternate_g0_or_g1_character_set': utils.force_list(value.get('c')), + "__order__": tuple(order) if len(order) else None, + "primary_g1_character_set": value.get("b"), + "primary_g0_character_set": value.get("a"), + "alternate_g0_or_g1_character_set": utils.force_list(value.get("c")), } -@marc21.over('national_agricultural_library_call_number', '^070[01_].') +@marc21.over("national_agricultural_library_call_number", "^070[01_].") @utils.for_each_value @utils.filter_values def national_agricultural_library_call_number(self, key, value): """National Agricultural Library Call Number.""" indicator_map1 = {"0": "Item is in NAL", "1": "Item is not in NAL"} field_map = { - '8': 'field_link_and_sequence_number_r', - 'b': 'item_number', - 'a': 'classification_number', + "8": "field_link_and_sequence_number_r", + "b": "item_number", + "a": "classification_number", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('existence_in_nal_collection') + order.append("existence_in_nal_collection") return { - '__order__': tuple(order) if len(order) else None, - 'field_link_and_sequence_number_r': utils.force_list(value.get('8')), - 'item_number': value.get('b'), - 'classification_number': utils.force_list(value.get('a')), - 'existence_in_nal_collection': indicator_map1.get(key[3]), + "__order__": tuple(order) if len(order) else None, + "field_link_and_sequence_number_r": utils.force_list(value.get("8")), + "item_number": value.get("b"), + "classification_number": utils.force_list(value.get("a")), + "existence_in_nal_collection": indicator_map1.get(key[3]), } -@marc21.over('national_agricultural_library_copy_statement', '^071..') +@marc21.over("national_agricultural_library_copy_statement", "^071..") @utils.for_each_value @utils.filter_values def national_agricultural_library_copy_statement(self, key, value): """National Agricultural Library Copy Statement.""" field_map = { - '8': 'field_link_and_sequence_number', - 'b': 'item_number', - 'a': 'classification_number', - 'c': 'copy_information', + "8": "field_link_and_sequence_number", + "b": "item_number", + "a": "classification_number", + "c": "copy_information", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'item_number': value.get('b'), - 'classification_number': utils.force_list(value.get('a')), - 'copy_information': utils.force_list(value.get('c')), + "__order__": tuple(order) if len(order) else None, + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "item_number": value.get("b"), + "classification_number": utils.force_list(value.get("a")), + "copy_information": utils.force_list(value.get("c")), } -@marc21.over('subject_category_code', '^072.[70_]') +@marc21.over("subject_category_code", "^072.[70_]") @utils.for_each_value @utils.filter_values def subject_category_code(self, key, value): @@ -1402,53 +1375,51 @@ def subject_category_code(self, key, value): "7": "Source specified in subfield $2", } field_map = { - 'x': 'subject_category_code_subdivision', - '8': 'field_link_and_sequence_number', - '2': 'source', - 'a': 'subject_category_code', - '6': 'linkage', + "x": "subject_category_code_subdivision", + "8": "field_link_and_sequence_number", + "2": "source", + "a": "subject_category_code", + "6": "linkage", } order = utils.map_order(field_map, value) if key[4] in indicator_map2: - order.append('code_source') + order.append("code_source") return { - '__order__': tuple(order) if len(order) else None, - 'subject_category_code_subdivision': utils.force_list(value.get('x')), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'source': value.get('2'), - 'subject_category_code': value.get('a'), - 'linkage': value.get('6'), - 'code_source': value.get('2') - if key[4] == '7' - else indicator_map2.get(key[4]), + "__order__": tuple(order) if len(order) else None, + "subject_category_code_subdivision": utils.force_list(value.get("x")), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "source": value.get("2"), + "subject_category_code": value.get("a"), + "linkage": value.get("6"), + "code_source": value.get("2") if key[4] == "7" else indicator_map2.get(key[4]), } -@marc21.over('gpo_item_number', '^074..') +@marc21.over("gpo_item_number", "^074..") @utils.for_each_value @utils.filter_values def gpo_item_number(self, key, value): """GPO Item Number.""" field_map = { - '8': 'field_link_and_sequence_number', - 'a': 'gpo_item_number', - 'z': 'canceled_invalid_gpo_item_number', + "8": "field_link_and_sequence_number", + "a": "gpo_item_number", + "z": "canceled_invalid_gpo_item_number", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'gpo_item_number': value.get('a'), - 'canceled_invalid_gpo_item_number': utils.force_list(value.get('z')), + "__order__": tuple(order) if len(order) else None, + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "gpo_item_number": value.get("a"), + "canceled_invalid_gpo_item_number": utils.force_list(value.get("z")), } -@marc21.over('universal_decimal_classification_number', '^080[01_].') +@marc21.over("universal_decimal_classification_number", "^080[01_].") @utils.for_each_value @utils.filter_values def universal_decimal_classification_number(self, key, value): @@ -1459,32 +1430,32 @@ def universal_decimal_classification_number(self, key, value): "_": "No information provided", } field_map = { - '8': 'field_link_and_sequence_number', - 'x': 'common_auxiliary_subdivision', - 'a': 'universal_decimal_classification_number', - 'b': 'item_number', - '2': 'edition_identifier', - '6': 'linkage', + "8": "field_link_and_sequence_number", + "x": "common_auxiliary_subdivision", + "a": "universal_decimal_classification_number", + "b": "item_number", + "2": "edition_identifier", + "6": "linkage", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('type_of_edition') + order.append("type_of_edition") return { - '__order__': tuple(order) if len(order) else None, - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'common_auxiliary_subdivision': utils.force_list(value.get('x')), - 'universal_decimal_classification_number': value.get('a'), - 'item_number': value.get('b'), - 'edition_identifier': value.get('2'), - 'linkage': value.get('6'), - 'type_of_edition': indicator_map1.get(key[3]), + "__order__": tuple(order) if len(order) else None, + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "common_auxiliary_subdivision": utils.force_list(value.get("x")), + "universal_decimal_classification_number": value.get("a"), + "item_number": value.get("b"), + "edition_identifier": value.get("2"), + "linkage": value.get("6"), + "type_of_edition": indicator_map1.get(key[3]), } -@marc21.over('dewey_decimal_classification_number', '^082[701_][40_]') +@marc21.over("dewey_decimal_classification_number", "^082[701_][40_]") @utils.for_each_value @utils.filter_values def dewey_decimal_classification_number(self, key, value): @@ -1500,40 +1471,40 @@ def dewey_decimal_classification_number(self, key, value): "_": "No information provided", } field_map = { - '8': 'field_link_and_sequence_number', - 'a': 'classification_number', - 'b': 'item_number', - '2': 'edition_number', - 'q': 'assigning_agency', - '6': 'linkage', - 'm': 'standard_or_optional_designation', + "8": "field_link_and_sequence_number", + "a": "classification_number", + "b": "item_number", + "2": "edition_number", + "q": "assigning_agency", + "6": "linkage", + "m": "standard_or_optional_designation", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('type_of_edition') + order.append("type_of_edition") if key[4] in indicator_map2: - order.append('source_of_classification_number') + order.append("source_of_classification_number") return { - '__order__': tuple(order) if len(order) else None, - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'classification_number': utils.force_list(value.get('a')), - 'item_number': value.get('b'), - 'edition_number': value.get('2'), - 'assigning_agency': value.get('q'), - 'linkage': value.get('6'), - 'standard_or_optional_designation': value.get('m'), - 'type_of_edition': value.get('2') - if key[3] == '7' + "__order__": tuple(order) if len(order) else None, + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "classification_number": utils.force_list(value.get("a")), + "item_number": value.get("b"), + "edition_number": value.get("2"), + "assigning_agency": value.get("q"), + "linkage": value.get("6"), + "standard_or_optional_designation": value.get("m"), + "type_of_edition": value.get("2") + if key[3] == "7" else indicator_map1.get(key[3]), - 'source_of_classification_number': indicator_map2.get(key[4]), + "source_of_classification_number": indicator_map2.get(key[4]), } -@marc21.over('additional_dewey_decimal_classification_number', '^083[701_].') +@marc21.over("additional_dewey_decimal_classification_number", "^083[701_].") @utils.for_each_value @utils.filter_values def additional_dewey_decimal_classification_number(self, key, value): @@ -1544,121 +1515,124 @@ def additional_dewey_decimal_classification_number(self, key, value): "7": "Other edition specified in subfield $2", } field_map = { - '8': 'field_link_and_sequence_number', - 'a': 'classification_number', - 'y': 'table_sequence_number_for_internal_subarrangement_or_add_table', - 'z': 'table_identification', - '2': 'edition_number', - 'q': 'assigning_agency', - 'c': 'classification_number_ending_number_of_span', - '6': 'linkage', - 'm': 'standard_or_optional_designation', + "8": "field_link_and_sequence_number", + "a": "classification_number", + "y": "table_sequence_number_for_internal_subarrangement_or_add_table", + "z": "table_identification", + "2": "edition_number", + "q": "assigning_agency", + "c": "classification_number_ending_number_of_span", + "6": "linkage", + "m": "standard_or_optional_designation", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('type_of_edition') + order.append("type_of_edition") return { - '__order__': tuple(order) if len(order) else None, - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'classification_number': utils.force_list(value.get('a')), - 'table_sequence_number_for_internal_subarrangement_or_add_table': - utils.force_list(value.get('y')), - 'table_identification': utils.force_list(value.get('z')), - 'edition_number': value.get('2'), - 'assigning_agency': value.get('q'), - 'classification_number_ending_number_of_span': utils.force_list( - value.get('c') + "__order__": tuple(order) if len(order) else None, + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "classification_number": utils.force_list(value.get("a")), + "table_sequence_number_for_internal_subarrangement_or_add_table": utils.force_list( + value.get("y") ), - 'linkage': value.get('6'), - 'standard_or_optional_designation': value.get('m'), - 'type_of_edition': value.get('2') - if key[3] == '7' + "table_identification": utils.force_list(value.get("z")), + "edition_number": value.get("2"), + "assigning_agency": value.get("q"), + "classification_number_ending_number_of_span": utils.force_list(value.get("c")), + "linkage": value.get("6"), + "standard_or_optional_designation": value.get("m"), + "type_of_edition": value.get("2") + if key[3] == "7" else indicator_map1.get(key[3]), } -@marc21.over('other_classification_number', '^084..') +@marc21.over("other_classification_number", "^084..") @utils.for_each_value @utils.filter_values def other_classification_number(self, key, value): """Other Classification Number.""" field_map = { - '8': 'field_link_and_sequence_number', - 'a': 'classification_number', - 'b': 'item_number', - '2': 'number_source', - 'q': 'assigning_agency', - '6': 'linkage', + "8": "field_link_and_sequence_number", + "a": "classification_number", + "b": "item_number", + "2": "number_source", + "q": "assigning_agency", + "6": "linkage", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'classification_number': utils.force_list(value.get('a')), - 'item_number': value.get('b'), - 'number_source': value.get('2'), - 'assigning_agency': value.get('q'), - 'linkage': value.get('6'), + "__order__": tuple(order) if len(order) else None, + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "classification_number": utils.force_list(value.get("a")), + "item_number": value.get("b"), + "number_source": value.get("2"), + "assigning_agency": value.get("q"), + "linkage": value.get("6"), } -@marc21.over('synthesized_classification_number_components', '^085..') +@marc21.over("synthesized_classification_number_components", "^085..") @utils.for_each_value @utils.filter_values def synthesized_classification_number_components(self, key, value): """Synthesized Classification Number Components.""" field_map = { - 'a': 'number_where_instructions_are_found_single_number_or_beginning_number_of_span', # nopep8 - 'r': 'root_number', - 'w': 'table_identification_internal_subarrangement_or_add_table', - 'b': 'base_number', - 'y': 'table_sequence_number_for_internal_subarrangement_or_add_table', - 'v': 'number_in_internal_subarrangement_or_add_table_where_instructions_are_found', # nopep8 - '6': 'linkage', - 'z': 'table_identification', - '8': 'field_link_and_sequence_number', - 'f': 'facet_designator', - 'u': 'number_being_analyzed', - 't': 'digits_added_from_internal_subarrangement_or_add_table', - 's': 'digits_added_from_classification_number_in_schedule_or_external_table', # nopep8 - 'c': 'classification_number_ending_number_of_span', + "a": "number_where_instructions_are_found_single_number_or_beginning_number_of_span", # nopep8 + "r": "root_number", + "w": "table_identification_internal_subarrangement_or_add_table", + "b": "base_number", + "y": "table_sequence_number_for_internal_subarrangement_or_add_table", + "v": "number_in_internal_subarrangement_or_add_table_where_instructions_are_found", # nopep8 + "6": "linkage", + "z": "table_identification", + "8": "field_link_and_sequence_number", + "f": "facet_designator", + "u": "number_being_analyzed", + "t": "digits_added_from_internal_subarrangement_or_add_table", + "s": "digits_added_from_classification_number_in_schedule_or_external_table", # nopep8 + "c": "classification_number_ending_number_of_span", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'number_where_instructions_are_found_single_number_or_beginning_number_of_span': # nopep8 - utils.force_list(value.get('a')), - 'root_number': utils.force_list(value.get('r')), - 'table_identification_internal_subarrangement_or_add_table': - utils.force_list(value.get('w')), - 'base_number': utils.force_list(value.get('b')), - 'table_sequence_number_for_internal_subarrangement_or_add_table': - utils.force_list(value.get('y')), - 'number_in_internal_subarrangement_or_add_table_where_instructions_are_found': # nopep8 - utils.force_list(value.get('v')), - 'linkage': value.get('6'), - 'table_identification': utils.force_list(value.get('z')), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'facet_designator': utils.force_list(value.get('f')), - 'number_being_analyzed': utils.force_list(value.get('u')), - 'digits_added_from_internal_subarrangement_or_add_table': - utils.force_list(value.get('t')), - 'digits_added_from_classification_number_in_schedule_or_external_table': # nopep8 - utils.force_list(value.get('s')), - 'classification_number_ending_number_of_span': utils.force_list( - value.get('c') + "__order__": tuple(order) if len(order) else None, + "number_where_instructions_are_found_single_number_or_beginning_number_of_span": utils.force_list( # nopep8 + value.get("a") + ), + "root_number": utils.force_list(value.get("r")), + "table_identification_internal_subarrangement_or_add_table": utils.force_list( + value.get("w") ), + "base_number": utils.force_list(value.get("b")), + "table_sequence_number_for_internal_subarrangement_or_add_table": utils.force_list( + value.get("y") + ), + "number_in_internal_subarrangement_or_add_table_where_instructions_are_found": utils.force_list( # nopep8 + value.get("v") + ), + "linkage": value.get("6"), + "table_identification": utils.force_list(value.get("z")), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "facet_designator": utils.force_list(value.get("f")), + "number_being_analyzed": utils.force_list(value.get("u")), + "digits_added_from_internal_subarrangement_or_add_table": utils.force_list( + value.get("t") + ), + "digits_added_from_classification_number_in_schedule_or_external_table": utils.force_list( # nopep8 + value.get("s") + ), + "classification_number_ending_number_of_span": utils.force_list(value.get("c")), } -@marc21.over('government_document_classification_number', '^086[01_].') +@marc21.over("government_document_classification_number", "^086[01_].") @utils.for_each_value @utils.filter_values def government_document_classification_number(self, key, value): @@ -1669,50 +1643,48 @@ def government_document_classification_number(self, key, value): "_": "Source specified in subfield $2", } field_map = { - '8': 'field_link_and_sequence_number', - '2': 'number_source', - 'a': 'classification_number', - '6': 'linkage', - 'z': 'canceled_invalid_classification_number', + "8": "field_link_and_sequence_number", + "2": "number_source", + "a": "classification_number", + "6": "linkage", + "z": "canceled_invalid_classification_number", } order = utils.map_order(field_map, value) - if key[3] in indicator_map1 and '2' not in value: - order.append('number_source') + if key[3] in indicator_map1 and "2" not in value: + order.append("number_source") return { - '__order__': tuple(order) if len(order) else None, - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'classification_number': value.get('a'), - 'linkage': value.get('6'), - 'canceled_invalid_classification_number': utils.force_list( - value.get('z') - ), - 'number_source': value.get('2') - if key[3] == '_' + "__order__": tuple(order) if len(order) else None, + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "classification_number": value.get("a"), + "linkage": value.get("6"), + "canceled_invalid_classification_number": utils.force_list(value.get("z")), + "number_source": value.get("2") + if key[3] == "_" else indicator_map1.get(key[3]), } -@marc21.over('report_number', '^088..') +@marc21.over("report_number", "^088..") @utils.for_each_value @utils.filter_values def report_number(self, key, value): """Report Number.""" field_map = { - '8': 'field_link_and_sequence_number', - 'a': 'report_number', - '6': 'linkage', - 'z': 'canceled_invalid_report_number', + "8": "field_link_and_sequence_number", + "a": "report_number", + "6": "linkage", + "z": "canceled_invalid_report_number", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'report_number': value.get('a'), - 'linkage': value.get('6'), - 'canceled_invalid_report_number': utils.force_list(value.get('z')), + "__order__": tuple(order) if len(order) else None, + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "report_number": value.get("a"), + "linkage": value.get("6"), + "canceled_invalid_report_number": utils.force_list(value.get("z")), } diff --git a/rero_ebooks/dojson/marc21/fields/bd1xx.py b/rero_ebooks/dojson/marc21/fields/bd1xx.py index 632177c..f8850a5 100644 --- a/rero_ebooks/dojson/marc21/fields/bd1xx.py +++ b/rero_ebooks/dojson/marc21/fields/bd1xx.py @@ -14,68 +14,66 @@ from ..model import marc21 -@marc21.over('main_entry_personal_name', '^100[0_31].') +@marc21.over("main_entry_personal_name", "^100[0_31].") @utils.filter_values def main_entry_personal_name(self, key, value): """Main Entry-Personal Name.""" indicator_map1 = {"0": "Forename", "1": "Surname", "3": "Family name"} field_map = { - 'k': 'form_subheading', - 'u': 'affiliation', - 'f': 'date_of_a_work', - 'n': 'number_of_part_section_of_a_work', - 'c': 'titles_and_words_associated_with_a_name', - 'e': 'relator_term', - '6': 'linkage', - 't': 'title_of_a_work', - 'p': 'name_of_part_section_of_a_work', - 'j': 'attribution_qualifier', - '4': 'relator_code', - 'g': 'miscellaneous_information', - '8': 'field_link_and_sequence_number', - 'a': 'personal_name', - 'l': 'language_of_a_work', - '0': 'authority_record_control_number_or_standard_number', - 'd': 'dates_associated_with_a_name', - 'b': 'numeration', - 'q': 'fuller_form_of_name', + "k": "form_subheading", + "u": "affiliation", + "f": "date_of_a_work", + "n": "number_of_part_section_of_a_work", + "c": "titles_and_words_associated_with_a_name", + "e": "relator_term", + "6": "linkage", + "t": "title_of_a_work", + "p": "name_of_part_section_of_a_work", + "j": "attribution_qualifier", + "4": "relator_code", + "g": "miscellaneous_information", + "8": "field_link_and_sequence_number", + "a": "personal_name", + "l": "language_of_a_work", + "0": "authority_record_control_number_or_standard_number", + "d": "dates_associated_with_a_name", + "b": "numeration", + "q": "fuller_form_of_name", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('type_of_personal_name_entry_element') + order.append("type_of_personal_name_entry_element") return { - '__order__': tuple(order) if len(order) else None, - 'form_subheading': utils.force_list(value.get('k')), - 'affiliation': value.get('u'), - 'date_of_a_work': value.get('f'), - 'number_of_part_section_of_a_work': utils.force_list(value.get('n')), - 'titles_and_words_associated_with_a_name': utils.force_list( - value.get('c') + "__order__": tuple(order) if len(order) else None, + "form_subheading": utils.force_list(value.get("k")), + "affiliation": value.get("u"), + "date_of_a_work": value.get("f"), + "number_of_part_section_of_a_work": utils.force_list(value.get("n")), + "titles_and_words_associated_with_a_name": utils.force_list(value.get("c")), + "relator_term": utils.force_list(value.get("e")), + "linkage": value.get("6"), + "title_of_a_work": value.get("t"), + "name_of_part_section_of_a_work": utils.force_list(value.get("p")), + "attribution_qualifier": utils.force_list(value.get("j")), + "relator_code": utils.force_list(value.get("4")), + "miscellaneous_information": utils.force_list(value.get("g")), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "personal_name": value.get("a"), + "language_of_a_work": value.get("l"), + "authority_record_control_number_or_standard_number": utils.force_list( + value.get("0") ), - 'relator_term': utils.force_list(value.get('e')), - 'linkage': value.get('6'), - 'title_of_a_work': value.get('t'), - 'name_of_part_section_of_a_work': utils.force_list(value.get('p')), - 'attribution_qualifier': utils.force_list(value.get('j')), - 'relator_code': utils.force_list(value.get('4')), - 'miscellaneous_information': utils.force_list(value.get('g')), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'personal_name': value.get('a'), - 'language_of_a_work': value.get('l'), - 'authority_record_control_number_or_standard_number': utils.force_list( - value.get('0') - ), - 'dates_associated_with_a_name': value.get('d'), - 'numeration': value.get('b'), - 'fuller_form_of_name': value.get('q'), - 'type_of_personal_name_entry_element': indicator_map1.get(key[3]), + "dates_associated_with_a_name": value.get("d"), + "numeration": value.get("b"), + "fuller_form_of_name": value.get("q"), + "type_of_personal_name_entry_element": indicator_map1.get(key[3]), } -@marc21.over('main_entry_corporate_name', '^110[0_21].') +@marc21.over("main_entry_corporate_name", "^110[0_21].") @utils.filter_values def main_entry_corporate_name(self, key, value): """Main Entry-Corporate Name.""" @@ -85,56 +83,56 @@ def main_entry_corporate_name(self, key, value): "2": "Name in direct order", } field_map = { - 'k': 'form_subheading', - 'u': 'affiliation', - 'f': 'date_of_a_work', - 'c': 'location_of_meeting', - 'e': 'relator_term', - '6': 'linkage', - 't': 'title_of_a_work', - 'p': 'name_of_part_section_of_a_work', - 'n': 'number_of_part_section_meeting', - '4': 'relator_code', - 'g': 'miscellaneous_information', - '8': 'field_link_and_sequence_number', - 'a': 'corporate_name_or_jurisdiction_name_as_entry_element', - 'l': 'language_of_a_work', - '0': 'authority_record_control_number_or_standard_number', - 'd': 'date_of_meeting_or_treaty_signing', - 'b': 'subordinate_unit', + "k": "form_subheading", + "u": "affiliation", + "f": "date_of_a_work", + "c": "location_of_meeting", + "e": "relator_term", + "6": "linkage", + "t": "title_of_a_work", + "p": "name_of_part_section_of_a_work", + "n": "number_of_part_section_meeting", + "4": "relator_code", + "g": "miscellaneous_information", + "8": "field_link_and_sequence_number", + "a": "corporate_name_or_jurisdiction_name_as_entry_element", + "l": "language_of_a_work", + "0": "authority_record_control_number_or_standard_number", + "d": "date_of_meeting_or_treaty_signing", + "b": "subordinate_unit", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('type_of_corporate_name_entry_element') + order.append("type_of_corporate_name_entry_element") return { - '__order__': tuple(order) if len(order) else None, - 'form_subheading': utils.force_list(value.get('k')), - 'affiliation': value.get('u'), - 'date_of_a_work': value.get('f'), - 'location_of_meeting': utils.force_list(value.get('c')), - 'relator_term': utils.force_list(value.get('e')), - 'linkage': value.get('6'), - 'title_of_a_work': value.get('t'), - 'name_of_part_section_of_a_work': utils.force_list(value.get('p')), - 'number_of_part_section_meeting': utils.force_list(value.get('n')), - 'relator_code': utils.force_list(value.get('4')), - 'miscellaneous_information': utils.force_list(value.get('g')), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'corporate_name_or_jurisdiction_name_as_entry_element': value.get('a'), - 'language_of_a_work': value.get('l'), - 'authority_record_control_number_or_standard_number': utils.force_list( - value.get('0') + "__order__": tuple(order) if len(order) else None, + "form_subheading": utils.force_list(value.get("k")), + "affiliation": value.get("u"), + "date_of_a_work": value.get("f"), + "location_of_meeting": utils.force_list(value.get("c")), + "relator_term": utils.force_list(value.get("e")), + "linkage": value.get("6"), + "title_of_a_work": value.get("t"), + "name_of_part_section_of_a_work": utils.force_list(value.get("p")), + "number_of_part_section_meeting": utils.force_list(value.get("n")), + "relator_code": utils.force_list(value.get("4")), + "miscellaneous_information": utils.force_list(value.get("g")), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "corporate_name_or_jurisdiction_name_as_entry_element": value.get("a"), + "language_of_a_work": value.get("l"), + "authority_record_control_number_or_standard_number": utils.force_list( + value.get("0") ), - 'date_of_meeting_or_treaty_signing': utils.force_list(value.get('d')), - 'subordinate_unit': utils.force_list(value.get('b')), - 'type_of_corporate_name_entry_element': indicator_map1.get(key[3]), + "date_of_meeting_or_treaty_signing": utils.force_list(value.get("d")), + "subordinate_unit": utils.force_list(value.get("b")), + "type_of_corporate_name_entry_element": indicator_map1.get(key[3]), } -@marc21.over('main_entry_meeting_name', '^111[0_21].') +@marc21.over("main_entry_meeting_name", "^111[0_21].") @utils.filter_values def main_entry_meeting_name(self, key, value): """Main Entry-Meeting Name.""" @@ -144,109 +142,107 @@ def main_entry_meeting_name(self, key, value): "2": "Name in direct order", } field_map = { - 'k': 'form_subheading', - 'u': 'affiliation', - 'f': 'date_of_a_work', - 'n': 'number_of_part_section_meeting', - 'c': 'location_of_meeting', - 'e': 'subordinate_unit', - '6': 'linkage', - 't': 'title_of_a_work', - 'p': 'name_of_part_section_of_a_work', - 'j': 'relator_term', - '4': 'relator_code', - 'g': 'miscellaneous_information', - '8': 'field_link_and_sequence_number', - 'a': 'meeting_name_or_jurisdiction_name_as_entry_element', - 'l': 'language_of_a_work', - '0': 'authority_record_control_number_or_standard_number', - 'd': 'date_of_meeting', - 'q': 'name_of_meeting_following_jurisdiction_name_entry_element', + "k": "form_subheading", + "u": "affiliation", + "f": "date_of_a_work", + "n": "number_of_part_section_meeting", + "c": "location_of_meeting", + "e": "subordinate_unit", + "6": "linkage", + "t": "title_of_a_work", + "p": "name_of_part_section_of_a_work", + "j": "relator_term", + "4": "relator_code", + "g": "miscellaneous_information", + "8": "field_link_and_sequence_number", + "a": "meeting_name_or_jurisdiction_name_as_entry_element", + "l": "language_of_a_work", + "0": "authority_record_control_number_or_standard_number", + "d": "date_of_meeting", + "q": "name_of_meeting_following_jurisdiction_name_entry_element", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('type_of_meeting_name_entry_element') + order.append("type_of_meeting_name_entry_element") return { - '__order__': tuple(order) if len(order) else None, - 'form_subheading': utils.force_list(value.get('k')), - 'affiliation': value.get('u'), - 'date_of_a_work': value.get('f'), - 'number_of_part_section_meeting': utils.force_list(value.get('n')), - 'location_of_meeting': utils.force_list(value.get('c')), - 'subordinate_unit': utils.force_list(value.get('e')), - 'linkage': value.get('6'), - 'title_of_a_work': value.get('t'), - 'name_of_part_section_of_a_work': utils.force_list(value.get('p')), - 'relator_term': utils.force_list(value.get('j')), - 'relator_code': utils.force_list(value.get('4')), - 'miscellaneous_information': utils.force_list(value.get('g')), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'meeting_name_or_jurisdiction_name_as_entry_element': value.get('a'), - 'language_of_a_work': value.get('l'), - 'authority_record_control_number_or_standard_number': utils.force_list( - value.get('0') - ), - 'date_of_meeting': value.get('d'), - 'name_of_meeting_following_jurisdiction_name_entry_element': value.get( - 'q' + "__order__": tuple(order) if len(order) else None, + "form_subheading": utils.force_list(value.get("k")), + "affiliation": value.get("u"), + "date_of_a_work": value.get("f"), + "number_of_part_section_meeting": utils.force_list(value.get("n")), + "location_of_meeting": utils.force_list(value.get("c")), + "subordinate_unit": utils.force_list(value.get("e")), + "linkage": value.get("6"), + "title_of_a_work": value.get("t"), + "name_of_part_section_of_a_work": utils.force_list(value.get("p")), + "relator_term": utils.force_list(value.get("j")), + "relator_code": utils.force_list(value.get("4")), + "miscellaneous_information": utils.force_list(value.get("g")), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "meeting_name_or_jurisdiction_name_as_entry_element": value.get("a"), + "language_of_a_work": value.get("l"), + "authority_record_control_number_or_standard_number": utils.force_list( + value.get("0") ), - 'type_of_meeting_name_entry_element': indicator_map1.get(key[3]), + "date_of_meeting": value.get("d"), + "name_of_meeting_following_jurisdiction_name_entry_element": value.get("q"), + "type_of_meeting_name_entry_element": indicator_map1.get(key[3]), } -@marc21.over('main_entry_uniform_title', '^130[096348725_1].') +@marc21.over("main_entry_uniform_title", "^130[096348725_1].") @utils.filter_values def main_entry_uniform_title(self, key, value): """Main Entry-Uniform Title.""" indicator_map1 = {str(x): str(x) for x in range(10)} field_map = { - 'k': 'form_subheading', - 'f': 'date_of_a_work', - 's': 'version', - '6': 'linkage', - 't': 'title_of_a_work', - 'p': 'name_of_part_section_of_a_work', - 'n': 'number_of_part_section_of_a_work', - 'o': 'arranged_statement_for_music', - 'g': 'miscellaneous_information', - '8': 'field_link_and_sequence_number', - 'h': 'medium', - 'a': 'uniform_title', - 'm': 'medium_of_performance_for_music', - 'l': 'language_of_a_work', - '0': 'authority_record_control_number_or_standard_number', - 'd': 'date_of_treaty_signing', - 'r': 'key_for_music', + "k": "form_subheading", + "f": "date_of_a_work", + "s": "version", + "6": "linkage", + "t": "title_of_a_work", + "p": "name_of_part_section_of_a_work", + "n": "number_of_part_section_of_a_work", + "o": "arranged_statement_for_music", + "g": "miscellaneous_information", + "8": "field_link_and_sequence_number", + "h": "medium", + "a": "uniform_title", + "m": "medium_of_performance_for_music", + "l": "language_of_a_work", + "0": "authority_record_control_number_or_standard_number", + "d": "date_of_treaty_signing", + "r": "key_for_music", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('nonfiling_characters') + order.append("nonfiling_characters") return { - '__order__': tuple(order) if len(order) else None, - 'form_subheading': utils.force_list(value.get('k')), - 'date_of_a_work': value.get('f'), - 'version': value.get('s'), - 'linkage': value.get('6'), - 'title_of_a_work': value.get('t'), - 'name_of_part_section_of_a_work': utils.force_list(value.get('p')), - 'number_of_part_section_of_a_work': utils.force_list(value.get('n')), - 'arranged_statement_for_music': value.get('o'), - 'miscellaneous_information': utils.force_list(value.get('g')), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'medium': value.get('h'), - 'uniform_title': value.get('a'), - 'medium_of_performance_for_music': utils.force_list(value.get('m')), - 'language_of_a_work': value.get('l'), - 'authority_record_control_number_or_standard_number': utils.force_list( - value.get('0') + "__order__": tuple(order) if len(order) else None, + "form_subheading": utils.force_list(value.get("k")), + "date_of_a_work": value.get("f"), + "version": value.get("s"), + "linkage": value.get("6"), + "title_of_a_work": value.get("t"), + "name_of_part_section_of_a_work": utils.force_list(value.get("p")), + "number_of_part_section_of_a_work": utils.force_list(value.get("n")), + "arranged_statement_for_music": value.get("o"), + "miscellaneous_information": utils.force_list(value.get("g")), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "medium": value.get("h"), + "uniform_title": value.get("a"), + "medium_of_performance_for_music": utils.force_list(value.get("m")), + "language_of_a_work": value.get("l"), + "authority_record_control_number_or_standard_number": utils.force_list( + value.get("0") ), - 'date_of_treaty_signing': utils.force_list(value.get('d')), - 'key_for_music': value.get('r'), - 'nonfiling_characters': indicator_map1.get(key[3]), + "date_of_treaty_signing": utils.force_list(value.get("d")), + "key_for_music": value.get("r"), + "nonfiling_characters": indicator_map1.get(key[3]), } diff --git a/rero_ebooks/dojson/marc21/fields/bd20x24x.py b/rero_ebooks/dojson/marc21/fields/bd20x24x.py index 7a27eaf..db5f15e 100644 --- a/rero_ebooks/dojson/marc21/fields/bd20x24x.py +++ b/rero_ebooks/dojson/marc21/fields/bd20x24x.py @@ -14,7 +14,7 @@ from ..model import marc21 -@marc21.over('abbreviated_title', '^210[01_][0_]') +@marc21.over("abbreviated_title", "^210[01_][0_]") @utils.for_each_value @utils.filter_values def abbreviated_title(self, key, value): @@ -25,62 +25,62 @@ def abbreviated_title(self, key, value): "_": "Abbreviated key title", } field_map = { - '2': 'source', - '6': 'linkage', - '8': 'field_link_and_sequence_number', - 'a': 'abbreviated_title', - 'b': 'qualifying_information', + "2": "source", + "6": "linkage", + "8": "field_link_and_sequence_number", + "a": "abbreviated_title", + "b": "qualifying_information", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('title_added_entry') + order.append("title_added_entry") if key[4] in indicator_map2: - order.append('type') + order.append("type") return { - '__order__': tuple(order) if len(order) else None, - 'source': utils.force_list(value.get('2')), - 'linkage': value.get('6'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'abbreviated_title': value.get('a'), - 'qualifying_information': value.get('b'), - 'title_added_entry': indicator_map1.get(key[3]), - 'type': indicator_map2.get(key[4]), + "__order__": tuple(order) if len(order) else None, + "source": utils.force_list(value.get("2")), + "linkage": value.get("6"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "abbreviated_title": value.get("a"), + "qualifying_information": value.get("b"), + "title_added_entry": indicator_map1.get(key[3]), + "type": indicator_map2.get(key[4]), } -@marc21.over('key_title', '^222.[2589610743_]') +@marc21.over("key_title", "^222.[2589610743_]") @utils.for_each_value @utils.filter_values def key_title(self, key, value): """Key Title.""" indicator_map2 = {str(x): str(x) for x in range(10)} field_map = { - '6': 'linkage', - 'b': 'qualifying_information', - '8': 'field_link_and_sequence_number', - 'a': 'key_title', + "6": "linkage", + "b": "qualifying_information", + "8": "field_link_and_sequence_number", + "a": "key_title", } order = utils.map_order(field_map, value) if key[4] in indicator_map2: - order.append('nonfiling_characters') + order.append("nonfiling_characters") return { - '__order__': tuple(order) if len(order) else None, - 'linkage': value.get('6'), - 'qualifying_information': value.get('b'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'key_title': value.get('a'), - 'nonfiling_characters': indicator_map2.get(key[4]), + "__order__": tuple(order) if len(order) else None, + "linkage": value.get("6"), + "qualifying_information": value.get("b"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "key_title": value.get("a"), + "nonfiling_characters": indicator_map2.get(key[4]), } -@marc21.over('uniform_title', '^240[01_][2589610743_]') +@marc21.over("uniform_title", "^240[01_][2589610743_]") @utils.filter_values def uniform_title(self, key, value): """Uniform Title.""" @@ -90,60 +90,58 @@ def uniform_title(self, key, value): } indicator_map2 = {str(x): str(x) for x in range(10)} field_map = { - 'f': 'date_of_a_work', - '8': 'field_link_and_sequence_number', - 'n': 'number_of_part_section_of_a_work', - '6': 'linkage', - 'd': 'date_of_treaty_signing', - 'l': 'language_of_a_work', - 'a': 'uniform_title', - 'r': 'key_for_music', - 's': 'version', - '0': 'authority_record_control_number_or_standard_number', - 'k': 'form_subheading', - 'g': 'miscellaneous_information', - 'p': 'name_of_part_section_of_a_work', - 'h': 'medium', - 'o': 'arranged_statement_for_music', - 'm': 'medium_of_performance_for_music', + "f": "date_of_a_work", + "8": "field_link_and_sequence_number", + "n": "number_of_part_section_of_a_work", + "6": "linkage", + "d": "date_of_treaty_signing", + "l": "language_of_a_work", + "a": "uniform_title", + "r": "key_for_music", + "s": "version", + "0": "authority_record_control_number_or_standard_number", + "k": "form_subheading", + "g": "miscellaneous_information", + "p": "name_of_part_section_of_a_work", + "h": "medium", + "o": "arranged_statement_for_music", + "m": "medium_of_performance_for_music", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('uniform_title_printed_or_displayed') + order.append("uniform_title_printed_or_displayed") if key[4] in indicator_map2: - order.append('nonfiling_characters') + order.append("nonfiling_characters") return { - '__order__': tuple(order) if len(order) else None, - 'date_of_a_work': value.get('f'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'number_of_part_section_of_a_work': utils.force_list(value.get('n')), - 'linkage': value.get('6'), - 'date_of_treaty_signing': utils.force_list(value.get('d')), - 'language_of_a_work': value.get('l'), - 'uniform_title': value.get('a'), - 'key_for_music': value.get('r'), - 'version': value.get('s'), - 'authority_record_control_number_or_standard_number': utils.force_list( - value.get('0') + "__order__": tuple(order) if len(order) else None, + "date_of_a_work": value.get("f"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "number_of_part_section_of_a_work": utils.force_list(value.get("n")), + "linkage": value.get("6"), + "date_of_treaty_signing": utils.force_list(value.get("d")), + "language_of_a_work": value.get("l"), + "uniform_title": value.get("a"), + "key_for_music": value.get("r"), + "version": value.get("s"), + "authority_record_control_number_or_standard_number": utils.force_list( + value.get("0") ), - 'form_subheading': utils.force_list(value.get('k')), - 'miscellaneous_information': utils.force_list(value.get('g')), - 'name_of_part_section_of_a_work': utils.force_list(value.get('p')), - 'medium': value.get('h'), - 'arranged_statement_for_music': value.get('o'), - 'medium_of_performance_for_music': utils.force_list(value.get('m')), - 'uniform_title_printed_or_displayed': indicator_map1.get(key[3]), - 'nonfiling_characters': indicator_map2.get(key[4]), + "form_subheading": utils.force_list(value.get("k")), + "miscellaneous_information": utils.force_list(value.get("g")), + "name_of_part_section_of_a_work": utils.force_list(value.get("p")), + "medium": value.get("h"), + "arranged_statement_for_music": value.get("o"), + "medium_of_performance_for_music": utils.force_list(value.get("m")), + "uniform_title_printed_or_displayed": indicator_map1.get(key[3]), + "nonfiling_characters": indicator_map2.get(key[4]), } -@marc21.over( - 'translation_of_title_by_cataloging_agency', '^242[01_][2589610743_]' -) +@marc21.over("translation_of_title_by_cataloging_agency", "^242[01_][2589610743_]") @utils.for_each_value @utils.filter_values def translation_of_title_by_cataloging_agency(self, key, value): @@ -151,42 +149,42 @@ def translation_of_title_by_cataloging_agency(self, key, value): indicator_map1 = {"0": "No added entry", "1": "Added entry"} indicator_map2 = {str(x): str(x) for x in range(10)} field_map = { - 'b': 'remainder_of_title', - '8': 'field_link_and_sequence_number', - 'y': 'language_code_of_translated_title', - 'n': 'number_of_part_section_of_a_work', - '6': 'linkage', - 'c': 'statement_of_responsibility', - 'p': 'name_of_part_section_of_a_work', - 'a': 'title', - 'h': 'medium', + "b": "remainder_of_title", + "8": "field_link_and_sequence_number", + "y": "language_code_of_translated_title", + "n": "number_of_part_section_of_a_work", + "6": "linkage", + "c": "statement_of_responsibility", + "p": "name_of_part_section_of_a_work", + "a": "title", + "h": "medium", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('title_added_entry') + order.append("title_added_entry") if key[4] in indicator_map2: - order.append('nonfiling_characters') + order.append("nonfiling_characters") return { - '__order__': tuple(order) if len(order) else None, - 'remainder_of_title': value.get('b'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'language_code_of_translated_title': value.get('y'), - 'number_of_part_section_of_a_work': utils.force_list(value.get('n')), - 'linkage': value.get('6'), - 'statement_of_responsibility': value.get('c'), - 'name_of_part_section_of_a_work': utils.force_list(value.get('p')), - 'title': value.get('a'), - 'medium': value.get('h'), - 'title_added_entry': indicator_map1.get(key[3]), - 'nonfiling_characters': indicator_map2.get(key[4]), + "__order__": tuple(order) if len(order) else None, + "remainder_of_title": value.get("b"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "language_code_of_translated_title": value.get("y"), + "number_of_part_section_of_a_work": utils.force_list(value.get("n")), + "linkage": value.get("6"), + "statement_of_responsibility": value.get("c"), + "name_of_part_section_of_a_work": utils.force_list(value.get("p")), + "title": value.get("a"), + "medium": value.get("h"), + "title_added_entry": indicator_map1.get(key[3]), + "nonfiling_characters": indicator_map2.get(key[4]), } -@marc21.over('collective_uniform_title', '^243[01_][2589610743_]') +@marc21.over("collective_uniform_title", "^243[01_][2589610743_]") @utils.filter_values def collective_uniform_title(self, key, value): """Collective Uniform Title.""" @@ -196,102 +194,102 @@ def collective_uniform_title(self, key, value): } indicator_map2 = {str(x): str(x) for x in range(10)} field_map = { - 'f': 'date_of_a_work', - '8': 'field_link_and_sequence_number', - 'n': 'number_of_part_section_of_a_work', - '6': 'linkage', - 'd': 'date_of_treaty_signing', - 'l': 'language_of_a_work', - 'a': 'uniform_title', - 'r': 'key_for_music', - 's': 'version', - 'k': 'form_subheading', - 'g': 'miscellaneous_information', - 'p': 'name_of_part_section_of_a_work', - 'h': 'medium', - 'o': 'arranged_statement_for_music', - 'm': 'medium_of_performance_for_music', + "f": "date_of_a_work", + "8": "field_link_and_sequence_number", + "n": "number_of_part_section_of_a_work", + "6": "linkage", + "d": "date_of_treaty_signing", + "l": "language_of_a_work", + "a": "uniform_title", + "r": "key_for_music", + "s": "version", + "k": "form_subheading", + "g": "miscellaneous_information", + "p": "name_of_part_section_of_a_work", + "h": "medium", + "o": "arranged_statement_for_music", + "m": "medium_of_performance_for_music", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('uniform_title_printed_or_displayed') + order.append("uniform_title_printed_or_displayed") if key[4] in indicator_map2: - order.append('nonfiling_characters') + order.append("nonfiling_characters") return { - '__order__': tuple(order) if len(order) else None, - 'date_of_a_work': value.get('f'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'number_of_part_section_of_a_work': utils.force_list(value.get('n')), - 'linkage': value.get('6'), - 'date_of_treaty_signing': utils.force_list(value.get('d')), - 'language_of_a_work': value.get('l'), - 'uniform_title': value.get('a'), - 'key_for_music': value.get('r'), - 'version': value.get('s'), - 'form_subheading': utils.force_list(value.get('k')), - 'miscellaneous_information': utils.force_list(value.get('g')), - 'name_of_part_section_of_a_work': utils.force_list(value.get('p')), - 'medium': value.get('h'), - 'arranged_statement_for_music': value.get('o'), - 'medium_of_performance_for_music': utils.force_list(value.get('m')), - 'uniform_title_printed_or_displayed': indicator_map1.get(key[3]), - 'nonfiling_characters': indicator_map2.get(key[4]), + "__order__": tuple(order) if len(order) else None, + "date_of_a_work": value.get("f"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "number_of_part_section_of_a_work": utils.force_list(value.get("n")), + "linkage": value.get("6"), + "date_of_treaty_signing": utils.force_list(value.get("d")), + "language_of_a_work": value.get("l"), + "uniform_title": value.get("a"), + "key_for_music": value.get("r"), + "version": value.get("s"), + "form_subheading": utils.force_list(value.get("k")), + "miscellaneous_information": utils.force_list(value.get("g")), + "name_of_part_section_of_a_work": utils.force_list(value.get("p")), + "medium": value.get("h"), + "arranged_statement_for_music": value.get("o"), + "medium_of_performance_for_music": utils.force_list(value.get("m")), + "uniform_title_printed_or_displayed": indicator_map1.get(key[3]), + "nonfiling_characters": indicator_map2.get(key[4]), } -@marc21.over('title_statement', '^245[01_][2589610743_]') +@marc21.over("title_statement", "^245[01_][2589610743_]") @utils.filter_values def title_statement(self, key, value): """Title Statement.""" indicator_map1 = {"0": "No added entry", "1": "Added entry"} indicator_map2 = {str(x): str(x) for x in range(10)} field_map = { - 'f': 'inclusive_dates', - '8': 'field_link_and_sequence_number', - 'n': 'number_of_part_section_of_a_work', - '6': 'linkage', - 'p': 'name_of_part_section_of_a_work', - 'k': 'form', - 'c': 'statement_of_responsibility', - 's': 'version', - 'b': 'remainder_of_title', - 'h': 'medium', - 'a': 'title', - 'g': 'bulk_dates', + "f": "inclusive_dates", + "8": "field_link_and_sequence_number", + "n": "number_of_part_section_of_a_work", + "6": "linkage", + "p": "name_of_part_section_of_a_work", + "k": "form", + "c": "statement_of_responsibility", + "s": "version", + "b": "remainder_of_title", + "h": "medium", + "a": "title", + "g": "bulk_dates", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('title_added_entry') + order.append("title_added_entry") if key[4] in indicator_map2: - order.append('nonfiling_characters') + order.append("nonfiling_characters") return { - '__order__': tuple(order) if len(order) else None, - 'inclusive_dates': value.get('f'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'number_of_part_section_of_a_work': utils.force_list(value.get('n')), - 'linkage': value.get('6'), - 'name_of_part_section_of_a_work': utils.force_list(value.get('p')), - 'form': utils.force_list(value.get('k')), - 'statement_of_responsibility': value.get('c'), - 'version': value.get('s'), - 'remainder_of_title': value.get('b'), - 'medium': value.get('h'), - 'title': value.get('a'), - 'bulk_dates': value.get('g'), - 'title_added_entry': indicator_map1.get(key[3]), - 'nonfiling_characters': indicator_map2.get(key[4]), + "__order__": tuple(order) if len(order) else None, + "inclusive_dates": value.get("f"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "number_of_part_section_of_a_work": utils.force_list(value.get("n")), + "linkage": value.get("6"), + "name_of_part_section_of_a_work": utils.force_list(value.get("p")), + "form": utils.force_list(value.get("k")), + "statement_of_responsibility": value.get("c"), + "version": value.get("s"), + "remainder_of_title": value.get("b"), + "medium": value.get("h"), + "title": value.get("a"), + "bulk_dates": value.get("g"), + "title_added_entry": indicator_map1.get(key[3]), + "nonfiling_characters": indicator_map2.get(key[4]), } -@marc21.over('varying_form_of_title', '^246[2031_][258610743_]') +@marc21.over("varying_form_of_title", "^246[2031_][258610743_]") @utils.for_each_value @utils.filter_values def varying_form_of_title(self, key, value): @@ -315,46 +313,46 @@ def varying_form_of_title(self, key, value): "_": "No type specified", } field_map = { - 'b': 'remainder_of_title', - '5': 'institution_to_which_field_applies', - '8': 'field_link_and_sequence_number', - 'f': 'date_or_sequential_designation', - '6': 'linkage', - 'p': 'name_of_part_section_of_a_work', - 'i': 'display_text', - 'n': 'number_of_part_section_of_a_work', - 'a': 'title_proper_short_title', - 'g': 'miscellaneous_information', - 'h': 'medium', + "b": "remainder_of_title", + "5": "institution_to_which_field_applies", + "8": "field_link_and_sequence_number", + "f": "date_or_sequential_designation", + "6": "linkage", + "p": "name_of_part_section_of_a_work", + "i": "display_text", + "n": "number_of_part_section_of_a_work", + "a": "title_proper_short_title", + "g": "miscellaneous_information", + "h": "medium", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('note_added_entry_controller') + order.append("note_added_entry_controller") if key[4] in indicator_map2: - order.append('type_of_title') + order.append("type_of_title") return { - '__order__': tuple(order) if len(order) else None, - 'remainder_of_title': value.get('b'), - 'institution_to_which_field_applies': value.get('5'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'date_or_sequential_designation': value.get('f'), - 'linkage': value.get('6'), - 'name_of_part_section_of_a_work': utils.force_list(value.get('p')), - 'display_text': value.get('i'), - 'number_of_part_section_of_a_work': utils.force_list(value.get('n')), - 'title_proper_short_title': value.get('a'), - 'miscellaneous_information': utils.force_list(value.get('g')), - 'medium': value.get('h'), - 'note_added_entry_controller': indicator_map1.get(key[3]), - 'type_of_title': indicator_map2.get(key[4]), + "__order__": tuple(order) if len(order) else None, + "remainder_of_title": value.get("b"), + "institution_to_which_field_applies": value.get("5"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "date_or_sequential_designation": value.get("f"), + "linkage": value.get("6"), + "name_of_part_section_of_a_work": utils.force_list(value.get("p")), + "display_text": value.get("i"), + "number_of_part_section_of_a_work": utils.force_list(value.get("n")), + "title_proper_short_title": value.get("a"), + "miscellaneous_information": utils.force_list(value.get("g")), + "medium": value.get("h"), + "note_added_entry_controller": indicator_map1.get(key[3]), + "type_of_title": indicator_map2.get(key[4]), } -@marc21.over('former_title', '^247[01_][01_]') +@marc21.over("former_title", "^247[01_][01_]") @utils.for_each_value @utils.filter_values def former_title(self, key, value): @@ -362,38 +360,38 @@ def former_title(self, key, value): indicator_map1 = {"0": "No added entry", "1": "Added entry"} indicator_map2 = {"0": "Display note", "1": "Do not display note"} field_map = { - 'b': 'remainder_of_title', - '8': 'field_link_and_sequence_number', - 'x': 'international_standard_serial_number', - 'f': 'date_or_sequential_designation', - '6': 'linkage', - 'p': 'name_of_part_section_of_a_work', - 'n': 'number_of_part_section_of_a_work', - 'a': 'title', - 'g': 'miscellaneous_information', - 'h': 'medium', + "b": "remainder_of_title", + "8": "field_link_and_sequence_number", + "x": "international_standard_serial_number", + "f": "date_or_sequential_designation", + "6": "linkage", + "p": "name_of_part_section_of_a_work", + "n": "number_of_part_section_of_a_work", + "a": "title", + "g": "miscellaneous_information", + "h": "medium", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('title_added_entry') + order.append("title_added_entry") if key[4] in indicator_map2: - order.append('note_controller') + order.append("note_controller") return { - '__order__': tuple(order) if len(order) else None, - 'remainder_of_title': value.get('b'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'international_standard_serial_number': value.get('x'), - 'date_or_sequential_designation': value.get('f'), - 'linkage': value.get('6'), - 'name_of_part_section_of_a_work': utils.force_list(value.get('p')), - 'number_of_part_section_of_a_work': utils.force_list(value.get('n')), - 'title': value.get('a'), - 'miscellaneous_information': utils.force_list(value.get('g')), - 'medium': value.get('h'), - 'title_added_entry': indicator_map1.get(key[3]), - 'note_controller': indicator_map2.get(key[4]), + "__order__": tuple(order) if len(order) else None, + "remainder_of_title": value.get("b"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "international_standard_serial_number": value.get("x"), + "date_or_sequential_designation": value.get("f"), + "linkage": value.get("6"), + "name_of_part_section_of_a_work": utils.force_list(value.get("p")), + "number_of_part_section_of_a_work": utils.force_list(value.get("n")), + "title": value.get("a"), + "miscellaneous_information": utils.force_list(value.get("g")), + "medium": value.get("h"), + "title_added_entry": indicator_map1.get(key[3]), + "note_controller": indicator_map2.get(key[4]), } diff --git a/rero_ebooks/dojson/marc21/fields/bd25x28x.py b/rero_ebooks/dojson/marc21/fields/bd25x28x.py index f776efc..961d6d5 100644 --- a/rero_ebooks/dojson/marc21/fields/bd25x28x.py +++ b/rero_ebooks/dojson/marc21/fields/bd25x28x.py @@ -14,151 +14,151 @@ from ..model import marc21 -@marc21.over('edition_statement', '^250..') +@marc21.over("edition_statement", "^250..") @utils.for_each_value @utils.filter_values def edition_statement(self, key, value): """Edition Statement.""" field_map = { - '8': 'field_link_and_sequence_number', - '3': 'materials_specified', - '6': 'linkage', - 'b': 'remainder_of_edition_statement', - 'a': 'edition_statement', + "8": "field_link_and_sequence_number", + "3": "materials_specified", + "6": "linkage", + "b": "remainder_of_edition_statement", + "a": "edition_statement", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'materials_specified': value.get('3'), - 'linkage': value.get('6'), - 'remainder_of_edition_statement': value.get('b'), - 'edition_statement': value.get('a'), + "__order__": tuple(order) if len(order) else None, + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "materials_specified": value.get("3"), + "linkage": value.get("6"), + "remainder_of_edition_statement": value.get("b"), + "edition_statement": value.get("a"), } -@marc21.over('musical_presentation_statement', '^254..') +@marc21.over("musical_presentation_statement", "^254..") @utils.filter_values def musical_presentation_statement(self, key, value): """Musical Presentation Statement.""" field_map = { - '8': 'field_link_and_sequence_number', - '6': 'linkage', - 'a': 'musical_presentation_statement', + "8": "field_link_and_sequence_number", + "6": "linkage", + "a": "musical_presentation_statement", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'linkage': value.get('6'), - 'musical_presentation_statement': value.get('a'), + "__order__": tuple(order) if len(order) else None, + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "linkage": value.get("6"), + "musical_presentation_statement": value.get("a"), } -@marc21.over('cartographic_mathematical_data', '^255..') +@marc21.over("cartographic_mathematical_data", "^255..") @utils.for_each_value @utils.filter_values def cartographic_mathematical_data(self, key, value): """Cartographic Mathematical Data.""" field_map = { - 'a': 'statement_of_scale', - 'c': 'statement_of_coordinates', - 'g': 'exclusion_g_ring_coordinate_pairs', - 'e': 'statement_of_equinox', - 'f': 'outer_g_ring_coordinate_pairs', - '8': 'field_link_and_sequence_number', - '6': 'linkage', - 'b': 'statement_of_projection', - 'd': 'statement_of_zone', + "a": "statement_of_scale", + "c": "statement_of_coordinates", + "g": "exclusion_g_ring_coordinate_pairs", + "e": "statement_of_equinox", + "f": "outer_g_ring_coordinate_pairs", + "8": "field_link_and_sequence_number", + "6": "linkage", + "b": "statement_of_projection", + "d": "statement_of_zone", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'statement_of_scale': value.get('a'), - 'statement_of_coordinates': value.get('c'), - 'exclusion_g_ring_coordinate_pairs': value.get('g'), - 'statement_of_equinox': value.get('e'), - 'outer_g_ring_coordinate_pairs': value.get('f'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'linkage': value.get('6'), - 'statement_of_projection': value.get('b'), - 'statement_of_zone': value.get('d'), + "__order__": tuple(order) if len(order) else None, + "statement_of_scale": value.get("a"), + "statement_of_coordinates": value.get("c"), + "exclusion_g_ring_coordinate_pairs": value.get("g"), + "statement_of_equinox": value.get("e"), + "outer_g_ring_coordinate_pairs": value.get("f"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "linkage": value.get("6"), + "statement_of_projection": value.get("b"), + "statement_of_zone": value.get("d"), } -@marc21.over('computer_file_characteristics', '^256..') +@marc21.over("computer_file_characteristics", "^256..") @utils.filter_values def computer_file_characteristics(self, key, value): """Computer File Characteristics.""" field_map = { - '8': 'field_link_and_sequence_number', - '6': 'linkage', - 'a': 'computer_file_characteristics', + "8": "field_link_and_sequence_number", + "6": "linkage", + "a": "computer_file_characteristics", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'linkage': value.get('6'), - 'computer_file_characteristics': value.get('a'), + "__order__": tuple(order) if len(order) else None, + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "linkage": value.get("6"), + "computer_file_characteristics": value.get("a"), } -@marc21.over('country_of_producing_entity', '^257..') +@marc21.over("country_of_producing_entity", "^257..") @utils.for_each_value @utils.filter_values def country_of_producing_entity(self, key, value): """Country of Producing Entity.""" field_map = { - '8': 'field_link_and_sequence_number', - '6': 'linkage', - 'a': 'country_of_producing_entity', - '2': 'source', + "8": "field_link_and_sequence_number", + "6": "linkage", + "a": "country_of_producing_entity", + "2": "source", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'linkage': value.get('6'), - 'country_of_producing_entity': utils.force_list(value.get('a')), - 'source': value.get('2'), + "__order__": tuple(order) if len(order) else None, + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "linkage": value.get("6"), + "country_of_producing_entity": utils.force_list(value.get("a")), + "source": value.get("2"), } -@marc21.over('philatelic_issue_data', '^258..') +@marc21.over("philatelic_issue_data", "^258..") @utils.for_each_value @utils.filter_values def philatelic_issue_data(self, key, value): """Philatelic Issue Data.""" field_map = { - '8': 'field_link_and_sequence_number', - '6': 'linkage', - 'b': 'denomination', - 'a': 'issuing_jurisdiction', + "8": "field_link_and_sequence_number", + "6": "linkage", + "b": "denomination", + "a": "issuing_jurisdiction", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'linkage': value.get('6'), - 'denomination': value.get('b'), - 'issuing_jurisdiction': value.get('a'), + "__order__": tuple(order) if len(order) else None, + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "linkage": value.get("6"), + "denomination": value.get("b"), + "issuing_jurisdiction": value.get("a"), } -@marc21.over('publication_distribution_imprint', '^260[3_2].') +@marc21.over("publication_distribution_imprint", "^260[3_2].") @utils.for_each_value @utils.filter_values def publication_distribution_imprint(self, key, value): @@ -169,116 +169,116 @@ def publication_distribution_imprint(self, key, value): "_": "Not applicable/No information provided/Earliest available publisher", # nopep8 } field_map = { - 'a': 'place_of_publication_distribution', - 'c': 'date_of_publication_distribution', - 'g': 'date_of_manufacture', - 'e': 'place_of_manufacture', - 'f': 'manufacturer', - '8': 'field_link_and_sequence_number', - '3': 'materials_specified', - '6': 'linkage', - 'b': 'name_of_publisher_distributor', + "a": "place_of_publication_distribution", + "c": "date_of_publication_distribution", + "g": "date_of_manufacture", + "e": "place_of_manufacture", + "f": "manufacturer", + "8": "field_link_and_sequence_number", + "3": "materials_specified", + "6": "linkage", + "b": "name_of_publisher_distributor", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('sequence_of_publishing_statements') + order.append("sequence_of_publishing_statements") return { - '__order__': tuple(order) if len(order) else None, - 'place_of_publication_distribution': utils.force_list(value.get('a')), - 'date_of_publication_distribution': utils.force_list(value.get('c')), - 'date_of_manufacture': utils.force_list(value.get('g')), - 'place_of_manufacture': utils.force_list(value.get('e')), - 'manufacturer': utils.force_list(value.get('f')), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'materials_specified': value.get('3'), - 'linkage': value.get('6'), - 'name_of_publisher_distributor': utils.force_list(value.get('b')), - 'sequence_of_publishing_statements': indicator_map1.get(key[3]), + "__order__": tuple(order) if len(order) else None, + "place_of_publication_distribution": utils.force_list(value.get("a")), + "date_of_publication_distribution": utils.force_list(value.get("c")), + "date_of_manufacture": utils.force_list(value.get("g")), + "place_of_manufacture": utils.force_list(value.get("e")), + "manufacturer": utils.force_list(value.get("f")), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "materials_specified": value.get("3"), + "linkage": value.get("6"), + "name_of_publisher_distributor": utils.force_list(value.get("b")), + "sequence_of_publishing_statements": indicator_map1.get(key[3]), } -@marc21.over('imprint_statement_for_films_pre_aacr_1_revised', '^261..') +@marc21.over("imprint_statement_for_films_pre_aacr_1_revised", "^261..") @utils.filter_values def imprint_statement_for_films_pre_aacr_1_revised(self, key, value): """Imprint Statement for Films (Pre-AACR 1 Revised).""" field_map = { - 'a': 'producing_company', - 'f': 'place_of_production_release', - 'e': 'contractual_producer', - '8': 'field_link_and_sequence_number', - '6': 'linkage', - 'b': 'releasing_company', - 'd': 'date_of_production_release', + "a": "producing_company", + "f": "place_of_production_release", + "e": "contractual_producer", + "8": "field_link_and_sequence_number", + "6": "linkage", + "b": "releasing_company", + "d": "date_of_production_release", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'producing_company': utils.force_list(value.get('a')), - 'place_of_production_release': utils.force_list(value.get('f')), - 'contractual_producer': utils.force_list(value.get('e')), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'linkage': value.get('6'), - 'releasing_company': utils.force_list(value.get('b')), - 'date_of_production_release': utils.force_list(value.get('d')), + "__order__": tuple(order) if len(order) else None, + "producing_company": utils.force_list(value.get("a")), + "place_of_production_release": utils.force_list(value.get("f")), + "contractual_producer": utils.force_list(value.get("e")), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "linkage": value.get("6"), + "releasing_company": utils.force_list(value.get("b")), + "date_of_production_release": utils.force_list(value.get("d")), } -@marc21.over('imprint_statement_for_sound_recordings_pre_aacr_1', '^262..') +@marc21.over("imprint_statement_for_sound_recordings_pre_aacr_1", "^262..") @utils.filter_values def imprint_statement_for_sound_recordings_pre_aacr_1(self, key, value): """Imprint Statement for Sound Recordings (Pre-AACR 1).""" field_map = { - 'a': 'place_of_production_release', - 'c': 'date_of_production_release', - 'k': 'serial_identification', - 'l': 'matrix_and_or_take_number', - '8': 'field_link_and_sequence_number', - '6': 'linkage', - 'b': 'publisher_or_trade_name', + "a": "place_of_production_release", + "c": "date_of_production_release", + "k": "serial_identification", + "l": "matrix_and_or_take_number", + "8": "field_link_and_sequence_number", + "6": "linkage", + "b": "publisher_or_trade_name", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'place_of_production_release': value.get('a'), - 'date_of_production_release': value.get('c'), - 'serial_identification': value.get('k'), - 'matrix_and_or_take_number': value.get('l'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'linkage': value.get('6'), - 'publisher_or_trade_name': value.get('b'), + "__order__": tuple(order) if len(order) else None, + "place_of_production_release": value.get("a"), + "date_of_production_release": value.get("c"), + "serial_identification": value.get("k"), + "matrix_and_or_take_number": value.get("l"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "linkage": value.get("6"), + "publisher_or_trade_name": value.get("b"), } -@marc21.over('projected_publication_date', '^263..') +@marc21.over("projected_publication_date", "^263..") @utils.filter_values def projected_publication_date(self, key, value): """Projected Publication Date.""" field_map = { - '8': 'field_link_and_sequence_number', - '6': 'linkage', - 'a': 'projected_publication_date', + "8": "field_link_and_sequence_number", + "6": "linkage", + "a": "projected_publication_date", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'linkage': value.get('6'), - 'projected_publication_date': value.get('a'), + "__order__": tuple(order) if len(order) else None, + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "linkage": value.get("6"), + "projected_publication_date": value.get("a"), } @marc21.over( - 'production_publication_distribution_manufacture_and_copyright_notice', - '^264[3_2][_12430]', + "production_publication_distribution_manufacture_and_copyright_notice", + "^264[3_2][_12430]", ) @utils.for_each_value @utils.filter_values @@ -299,39 +299,42 @@ def production_publication_distribution_manufacture_and_copyright_notice( "4": "Copyright notice date", } field_map = { - 'a': 'place_of_production_publication_distribution_manufacture', - 'c': 'date_of_production_publication_distribution_manufacture_or_copyright_notice', # nopep8 - '8': 'field_link_and_sequence_number', - '3': 'materials_specified', - '6': 'linkage', - 'b': 'name_of_producer_publisher_distributor_manufacturer', + "a": "place_of_production_publication_distribution_manufacture", + "c": "date_of_production_publication_distribution_manufacture_or_copyright_notice", # nopep8 + "8": "field_link_and_sequence_number", + "3": "materials_specified", + "6": "linkage", + "b": "name_of_producer_publisher_distributor_manufacturer", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('sequence_of_statements') + order.append("sequence_of_statements") if key[4] in indicator_map2: - order.append('function_of_entity') + order.append("function_of_entity") return { - '__order__': tuple(order) if len(order) else None, - 'place_of_production_publication_distribution_manufacture': - utils.force_list(value.get('a')), - 'date_of_production_publication_distribution_manufacture_or_copyright_notice': # nopep8 - utils.force_list(value.get('c')), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'materials_specified': value.get('3'), - 'linkage': value.get('6'), - 'name_of_producer_publisher_distributor_manufacturer': - utils.force_list(value.get('b')), - 'sequence_of_statements': indicator_map1.get(key[3]), - 'function_of_entity': indicator_map2.get(key[4]), + "__order__": tuple(order) if len(order) else None, + "place_of_production_publication_distribution_manufacture": utils.force_list( + value.get("a") + ), + "date_of_production_publication_distribution_manufacture_or_copyright_notice": utils.force_list( # nopep8 + value.get("c") + ), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "materials_specified": value.get("3"), + "linkage": value.get("6"), + "name_of_producer_publisher_distributor_manufacturer": utils.force_list( + value.get("b") + ), + "sequence_of_statements": indicator_map1.get(key[3]), + "function_of_entity": indicator_map2.get(key[4]), } -@marc21.over('address', '^270[_12][_07]') +@marc21.over("address", "^270[_12][_07]") @utils.for_each_value @utils.filter_values def address(self, key, value): @@ -347,61 +350,61 @@ def address(self, key, value): "_": "No type specified", } field_map = { - 'g': 'attention_name', - 'i': 'type_of_address', - 'k': 'telephone_number', - 'f': 'terms_preceding_attention_name', - 'e': 'postal_code', - 'l': 'fax_number', - '6': 'linkage', - 'b': 'city', - 'd': 'country', - 'j': 'specialized_telephone_number', - 'a': 'address', - 'p': 'contact_person', - 'z': 'public_note', - 'c': 'state_or_province', - 'q': 'title_of_contact_person', - '8': 'field_link_and_sequence_number', - '4': 'relator_code', - 'r': 'hours', - 'n': 'tdd_or_tty_number', - 'm': 'electronic_mail_address', - 'h': 'attention_position', + "g": "attention_name", + "i": "type_of_address", + "k": "telephone_number", + "f": "terms_preceding_attention_name", + "e": "postal_code", + "l": "fax_number", + "6": "linkage", + "b": "city", + "d": "country", + "j": "specialized_telephone_number", + "a": "address", + "p": "contact_person", + "z": "public_note", + "c": "state_or_province", + "q": "title_of_contact_person", + "8": "field_link_and_sequence_number", + "4": "relator_code", + "r": "hours", + "n": "tdd_or_tty_number", + "m": "electronic_mail_address", + "h": "attention_position", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('level') + order.append("level") - if key[4] in indicator_map2 and 'i' not in value: - order.append('type_of_address') + if key[4] in indicator_map2 and "i" not in value: + order.append("type_of_address") return { - '__order__': tuple(order) if len(order) else None, - 'attention_name': value.get('g'), - 'telephone_number': utils.force_list(value.get('k')), - 'terms_preceding_attention_name': value.get('f'), - 'postal_code': value.get('e'), - 'fax_number': utils.force_list(value.get('l')), - 'linkage': value.get('6'), - 'city': value.get('b'), - 'country': value.get('d'), - 'specialized_telephone_number': utils.force_list(value.get('j')), - 'address': utils.force_list(value.get('a')), - 'contact_person': utils.force_list(value.get('p')), - 'public_note': utils.force_list(value.get('z')), - 'state_or_province': value.get('c'), - 'title_of_contact_person': utils.force_list(value.get('q')), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'relator_code': utils.force_list(value.get('4')), - 'hours': utils.force_list(value.get('r')), - 'tdd_or_tty_number': utils.force_list(value.get('n')), - 'electronic_mail_address': utils.force_list(value.get('m')), - 'attention_position': value.get('h'), - 'level': indicator_map1.get(key[3]), - 'type_of_address': value.get('i') - if key[4] == '7' + "__order__": tuple(order) if len(order) else None, + "attention_name": value.get("g"), + "telephone_number": utils.force_list(value.get("k")), + "terms_preceding_attention_name": value.get("f"), + "postal_code": value.get("e"), + "fax_number": utils.force_list(value.get("l")), + "linkage": value.get("6"), + "city": value.get("b"), + "country": value.get("d"), + "specialized_telephone_number": utils.force_list(value.get("j")), + "address": utils.force_list(value.get("a")), + "contact_person": utils.force_list(value.get("p")), + "public_note": utils.force_list(value.get("z")), + "state_or_province": value.get("c"), + "title_of_contact_person": utils.force_list(value.get("q")), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "relator_code": utils.force_list(value.get("4")), + "hours": utils.force_list(value.get("r")), + "tdd_or_tty_number": utils.force_list(value.get("n")), + "electronic_mail_address": utils.force_list(value.get("m")), + "attention_position": value.get("h"), + "level": indicator_map1.get(key[3]), + "type_of_address": value.get("i") + if key[4] == "7" else indicator_map2.get(key[4]), } diff --git a/rero_ebooks/dojson/marc21/fields/bd3xx.py b/rero_ebooks/dojson/marc21/fields/bd3xx.py index dac9f65..536c3b7 100644 --- a/rero_ebooks/dojson/marc21/fields/bd3xx.py +++ b/rero_ebooks/dojson/marc21/fields/bd3xx.py @@ -14,279 +14,279 @@ from ..model import marc21 -@marc21.over('physical_description', '^300..') +@marc21.over("physical_description", "^300..") @utils.for_each_value @utils.filter_values def physical_description(self, key, value): """Physical Description.""" field_map = { - 'c': 'dimensions', - 'a': 'extent', - 'b': 'other_physical_details', - 'e': 'accompanying_material', - 'f': 'type_of_unit', - '3': 'materials_specified', - 'g': 'size_of_unit', - '6': 'linkage', - '8': 'field_link_and_sequence_number', + "c": "dimensions", + "a": "extent", + "b": "other_physical_details", + "e": "accompanying_material", + "f": "type_of_unit", + "3": "materials_specified", + "g": "size_of_unit", + "6": "linkage", + "8": "field_link_and_sequence_number", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'dimensions': utils.force_list(value.get('c')), - 'extent': utils.force_list(value.get('a')), - 'other_physical_details': value.get('b'), - 'accompanying_material': value.get('e'), - 'type_of_unit': utils.force_list(value.get('f')), - 'materials_specified': value.get('3'), - 'size_of_unit': utils.force_list(value.get('g')), - 'linkage': value.get('6'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), + "__order__": tuple(order) if len(order) else None, + "dimensions": utils.force_list(value.get("c")), + "extent": utils.force_list(value.get("a")), + "other_physical_details": value.get("b"), + "accompanying_material": value.get("e"), + "type_of_unit": utils.force_list(value.get("f")), + "materials_specified": value.get("3"), + "size_of_unit": utils.force_list(value.get("g")), + "linkage": value.get("6"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), } -@marc21.over('playing_time', '^306..') +@marc21.over("playing_time", "^306..") @utils.filter_values def playing_time(self, key, value): """Playing Time.""" field_map = { - 'a': 'playing_time', - '6': 'linkage', - '8': 'field_link_and_sequence_number', + "a": "playing_time", + "6": "linkage", + "8": "field_link_and_sequence_number", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'playing_time': utils.force_list(value.get('a')), - 'linkage': value.get('6'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), + "__order__": tuple(order) if len(order) else None, + "playing_time": utils.force_list(value.get("a")), + "linkage": value.get("6"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), } -@marc21.over('hours', '^307[8_].') +@marc21.over("hours", "^307[8_].") @utils.for_each_value @utils.filter_values def hours(self, key, value): """Hours, Etc..""" indicator_map1 = {"8": "No display constant generated", "_": "Hours"} field_map = { - 'b': 'additional_information', - 'a': 'hours', - '6': 'linkage', - '8': 'field_link_and_sequence_number', + "b": "additional_information", + "a": "hours", + "6": "linkage", + "8": "field_link_and_sequence_number", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('display_constant_controller') + order.append("display_constant_controller") return { - '__order__': tuple(order) if len(order) else None, - 'additional_information': value.get('b'), - 'hours': value.get('a'), - 'linkage': value.get('6'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'display_constant_controller': indicator_map1.get(key[3]), + "__order__": tuple(order) if len(order) else None, + "additional_information": value.get("b"), + "hours": value.get("a"), + "linkage": value.get("6"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "display_constant_controller": indicator_map1.get(key[3]), } -@marc21.over('current_publication_frequency', '^310..') +@marc21.over("current_publication_frequency", "^310..") @utils.filter_values def current_publication_frequency(self, key, value): """Current Publication Frequency.""" field_map = { - 'b': 'date_of_current_publication_frequency', - 'a': 'current_publication_frequency', - '6': 'linkage', - '8': 'field_link_and_sequence_number', + "b": "date_of_current_publication_frequency", + "a": "current_publication_frequency", + "6": "linkage", + "8": "field_link_and_sequence_number", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'date_of_current_publication_frequency': value.get('b'), - 'current_publication_frequency': value.get('a'), - 'linkage': value.get('6'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), + "__order__": tuple(order) if len(order) else None, + "date_of_current_publication_frequency": value.get("b"), + "current_publication_frequency": value.get("a"), + "linkage": value.get("6"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), } -@marc21.over('former_publication_frequency', '^321..') +@marc21.over("former_publication_frequency", "^321..") @utils.for_each_value @utils.filter_values def former_publication_frequency(self, key, value): """Former Publication Frequency.""" field_map = { - 'b': 'dates_of_former_publication_frequency', - 'a': 'former_publication_frequency', - '6': 'linkage', - '8': 'field_link_and_sequence_number', + "b": "dates_of_former_publication_frequency", + "a": "former_publication_frequency", + "6": "linkage", + "8": "field_link_and_sequence_number", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'dates_of_former_publication_frequency': value.get('b'), - 'former_publication_frequency': value.get('a'), - 'linkage': value.get('6'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), + "__order__": tuple(order) if len(order) else None, + "dates_of_former_publication_frequency": value.get("b"), + "former_publication_frequency": value.get("a"), + "linkage": value.get("6"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), } -@marc21.over('content_type', '^336..') +@marc21.over("content_type", "^336..") @utils.for_each_value @utils.filter_values def content_type(self, key, value): """Content Type.""" field_map = { - '3': 'materials_specified', - 'b': 'content_type_code', - 'a': 'content_type_term', - '0': 'authority_record_control_number_or_standard_number', - '2': 'source', - '6': 'linkage', - '8': 'field_link_and_sequence_number', + "3": "materials_specified", + "b": "content_type_code", + "a": "content_type_term", + "0": "authority_record_control_number_or_standard_number", + "2": "source", + "6": "linkage", + "8": "field_link_and_sequence_number", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'materials_specified': value.get('3'), - 'content_type_code': utils.force_list(value.get('b')), - 'content_type_term': utils.force_list(value.get('a')), - 'authority_record_control_number_or_standard_number': utils.force_list( - value.get('0') + "__order__": tuple(order) if len(order) else None, + "materials_specified": value.get("3"), + "content_type_code": utils.force_list(value.get("b")), + "content_type_term": utils.force_list(value.get("a")), + "authority_record_control_number_or_standard_number": utils.force_list( + value.get("0") ), - 'source': value.get('2'), - 'linkage': value.get('6'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), + "source": value.get("2"), + "linkage": value.get("6"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), } -@marc21.over('media_type', '^337..') +@marc21.over("media_type", "^337..") @utils.for_each_value @utils.filter_values def media_type(self, key, value): """Media Type.""" field_map = { - '3': 'materials_specified', - 'b': 'media_type_code', - 'a': 'media_type_term', - '0': 'authority_record_control_number_or_standard_number', - '2': 'source', - '6': 'linkage', - '8': 'field_link_and_sequence_number', + "3": "materials_specified", + "b": "media_type_code", + "a": "media_type_term", + "0": "authority_record_control_number_or_standard_number", + "2": "source", + "6": "linkage", + "8": "field_link_and_sequence_number", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'materials_specified': value.get('3'), - 'media_type_code': utils.force_list(value.get('b')), - 'media_type_term': utils.force_list(value.get('a')), - 'authority_record_control_number_or_standard_number': utils.force_list( - value.get('0') + "__order__": tuple(order) if len(order) else None, + "materials_specified": value.get("3"), + "media_type_code": utils.force_list(value.get("b")), + "media_type_term": utils.force_list(value.get("a")), + "authority_record_control_number_or_standard_number": utils.force_list( + value.get("0") ), - 'source': value.get('2'), - 'linkage': value.get('6'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), + "source": value.get("2"), + "linkage": value.get("6"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), } -@marc21.over('carrier_type', '^338..') +@marc21.over("carrier_type", "^338..") @utils.for_each_value @utils.filter_values def carrier_type(self, key, value): """Carrier Type.""" field_map = { - '3': 'materials_specified', - 'b': 'carrier_type_code', - 'a': 'carrier_type_term', - '0': 'authority_record_control_number_or_standard_number', - '2': 'source', - '6': 'linkage', - '8': 'field_link_and_sequence_number', + "3": "materials_specified", + "b": "carrier_type_code", + "a": "carrier_type_term", + "0": "authority_record_control_number_or_standard_number", + "2": "source", + "6": "linkage", + "8": "field_link_and_sequence_number", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'materials_specified': value.get('3'), - 'carrier_type_code': utils.force_list(value.get('b')), - 'carrier_type_term': utils.force_list(value.get('a')), - 'authority_record_control_number_or_standard_number': utils.force_list( - value.get('0') + "__order__": tuple(order) if len(order) else None, + "materials_specified": value.get("3"), + "carrier_type_code": utils.force_list(value.get("b")), + "carrier_type_term": utils.force_list(value.get("a")), + "authority_record_control_number_or_standard_number": utils.force_list( + value.get("0") ), - 'source': value.get('2'), - 'linkage': value.get('6'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), + "source": value.get("2"), + "linkage": value.get("6"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), } -@marc21.over('physical_medium', '^340..') +@marc21.over("physical_medium", "^340..") @utils.for_each_value @utils.filter_values def physical_medium(self, key, value): """Physical Medium.""" field_map = { - '0': 'authority_record_control_number_or_standard_number', - 'k': 'layout', - 'o': 'polarity', - 'f': 'production_rate_ratio', - 'e': 'support', - 'd': 'information_recording_technique', - '2': 'source', - '8': 'field_link_and_sequence_number', - 'n': 'font_size', - 'j': 'generation', - 'c': 'materials_applied_to_surface', - '3': 'materials_specified', - 'b': 'dimensions', - 'i': 'technical_specifications_of_medium', - 'a': 'material_base_and_configuration', - 'm': 'book_format', - '6': 'linkage', - 'h': 'location_within_medium', + "0": "authority_record_control_number_or_standard_number", + "k": "layout", + "o": "polarity", + "f": "production_rate_ratio", + "e": "support", + "d": "information_recording_technique", + "2": "source", + "8": "field_link_and_sequence_number", + "n": "font_size", + "j": "generation", + "c": "materials_applied_to_surface", + "3": "materials_specified", + "b": "dimensions", + "i": "technical_specifications_of_medium", + "a": "material_base_and_configuration", + "m": "book_format", + "6": "linkage", + "h": "location_within_medium", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'authority_record_control_number_or_standard_number': utils.force_list( - value.get('0') + "__order__": tuple(order) if len(order) else None, + "authority_record_control_number_or_standard_number": utils.force_list( + value.get("0") ), - 'layout': utils.force_list(value.get('k')), - 'polarity': utils.force_list(value.get('o')), - 'production_rate_ratio': utils.force_list(value.get('f')), - 'support': utils.force_list(value.get('e')), - 'information_recording_technique': utils.force_list(value.get('d')), - 'source': value.get('2'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'font_size': utils.force_list(value.get('n')), - 'generation': utils.force_list(value.get('j')), - 'materials_applied_to_surface': utils.force_list(value.get('c')), - 'materials_specified': value.get('3'), - 'dimensions': utils.force_list(value.get('b')), - 'technical_specifications_of_medium': utils.force_list(value.get('i')), - 'material_base_and_configuration': utils.force_list(value.get('a')), - 'book_format': utils.force_list(value.get('m')), - 'linkage': value.get('6'), - 'location_within_medium': utils.force_list(value.get('h')), - } - - -@marc21.over('geospatial_reference_data', '^342[10_][1_02853467]') + "layout": utils.force_list(value.get("k")), + "polarity": utils.force_list(value.get("o")), + "production_rate_ratio": utils.force_list(value.get("f")), + "support": utils.force_list(value.get("e")), + "information_recording_technique": utils.force_list(value.get("d")), + "source": value.get("2"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "font_size": utils.force_list(value.get("n")), + "generation": utils.force_list(value.get("j")), + "materials_applied_to_surface": utils.force_list(value.get("c")), + "materials_specified": value.get("3"), + "dimensions": utils.force_list(value.get("b")), + "technical_specifications_of_medium": utils.force_list(value.get("i")), + "material_base_and_configuration": utils.force_list(value.get("a")), + "book_format": utils.force_list(value.get("m")), + "linkage": value.get("6"), + "location_within_medium": utils.force_list(value.get("h")), + } + + +@marc21.over("geospatial_reference_data", "^342[10_][1_02853467]") @utils.for_each_value @utils.filter_values def geospatial_reference_data(self, key, value): @@ -307,354 +307,356 @@ def geospatial_reference_data(self, key, value): "8": "Depth", } field_map = { - 'u': 'vertical_encoding_method', - 'f': 'oblique_line_longitude', - 'e': 'standard_parallel_or_oblique_line_latitude', - 't': 'vertical_resolution', - 'd': 'longitude_resolution', - '2': 'reference_method_used', - 'g': 'longitude_of_central_meridian_or_projection_center', - 'r': 'semi_major_axis', - 'c': 'latitude_resolution', - 'q': 'ellipsoid_name', - 'b': 'coordinate_units_or_distance_units', - 'p': 'zone_identifier', - 'j': 'false_northing', - '6': 'linkage', - 'm': 'azimuthal_angle', - 's': 'denominator_of_flattening_ratio', - 'w': 'local_planar_or_local_georeference_information', - '8': 'field_link_and_sequence_number', - 'n': 'azimuth_measure_point_longitude_or_straight_vertical_longitude_from_pole', # nopep8 - 'v': 'local_planar_local_or_other_projection_or_grid_description', - 'k': 'scale_factor', - 'l': 'height_of_perspective_point_above_surface', - 'o': 'landsat_number_and_path_number', - 'a': 'name', - 'h': 'latitude_of_projection_center_or_projection_origin', - 'i': 'false_easting', + "u": "vertical_encoding_method", + "f": "oblique_line_longitude", + "e": "standard_parallel_or_oblique_line_latitude", + "t": "vertical_resolution", + "d": "longitude_resolution", + "2": "reference_method_used", + "g": "longitude_of_central_meridian_or_projection_center", + "r": "semi_major_axis", + "c": "latitude_resolution", + "q": "ellipsoid_name", + "b": "coordinate_units_or_distance_units", + "p": "zone_identifier", + "j": "false_northing", + "6": "linkage", + "m": "azimuthal_angle", + "s": "denominator_of_flattening_ratio", + "w": "local_planar_or_local_georeference_information", + "8": "field_link_and_sequence_number", + "n": "azimuth_measure_point_longitude_or_straight_vertical_longitude_from_pole", # nopep8 + "v": "local_planar_local_or_other_projection_or_grid_description", + "k": "scale_factor", + "l": "height_of_perspective_point_above_surface", + "o": "landsat_number_and_path_number", + "a": "name", + "h": "latitude_of_projection_center_or_projection_origin", + "i": "false_easting", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('geospatial_reference_dimension') + order.append("geospatial_reference_dimension") if key[4] in indicator_map2: - order.append('geospatial_reference_method') + order.append("geospatial_reference_method") return { - '__order__': tuple(order) if len(order) else None, - 'vertical_encoding_method': value.get('u'), - 'oblique_line_longitude': utils.force_list(value.get('f')), - 'standard_parallel_or_oblique_line_latitude': utils.force_list( - value.get('e') - ), - 'vertical_resolution': value.get('t'), - 'longitude_resolution': value.get('d'), - 'reference_method_used': value.get('2'), - 'longitude_of_central_meridian_or_projection_center': value.get('g'), - 'semi_major_axis': value.get('r'), - 'latitude_resolution': value.get('c'), - 'ellipsoid_name': value.get('q'), - 'coordinate_units_or_distance_units': value.get('b'), - 'zone_identifier': value.get('p'), - 'false_northing': value.get('j'), - 'linkage': value.get('6'), - 'azimuthal_angle': value.get('m'), - 'denominator_of_flattening_ratio': value.get('s'), - 'local_planar_or_local_georeference_information': value.get('w'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'azimuth_measure_point_longitude_or_straight_vertical_longitude_from_pole': value.get('n'), # nopep8 - 'local_planar_local_or_other_projection_or_grid_description': value.get('v'), # nopep8 - 'scale_factor': value.get('k'), - 'height_of_perspective_point_above_surface': value.get('l'), - 'landsat_number_and_path_number': value.get('o'), - 'name': value.get('a'), - 'latitude_of_projection_center_or_projection_origin': value.get('h'), - 'false_easting': value.get('i'), - 'geospatial_reference_dimension': indicator_map1.get(key[3]), - 'geospatial_reference_method': indicator_map2.get(key[4]), - } - - -@marc21.over('planar_coordinate_data', '^343..') + "__order__": tuple(order) if len(order) else None, + "vertical_encoding_method": value.get("u"), + "oblique_line_longitude": utils.force_list(value.get("f")), + "standard_parallel_or_oblique_line_latitude": utils.force_list(value.get("e")), + "vertical_resolution": value.get("t"), + "longitude_resolution": value.get("d"), + "reference_method_used": value.get("2"), + "longitude_of_central_meridian_or_projection_center": value.get("g"), + "semi_major_axis": value.get("r"), + "latitude_resolution": value.get("c"), + "ellipsoid_name": value.get("q"), + "coordinate_units_or_distance_units": value.get("b"), + "zone_identifier": value.get("p"), + "false_northing": value.get("j"), + "linkage": value.get("6"), + "azimuthal_angle": value.get("m"), + "denominator_of_flattening_ratio": value.get("s"), + "local_planar_or_local_georeference_information": value.get("w"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "azimuth_measure_point_longitude_or_straight_vertical_longitude_from_pole": value.get( + "n" + ), # nopep8 + "local_planar_local_or_other_projection_or_grid_description": value.get( + "v" + ), # nopep8 + "scale_factor": value.get("k"), + "height_of_perspective_point_above_surface": value.get("l"), + "landsat_number_and_path_number": value.get("o"), + "name": value.get("a"), + "latitude_of_projection_center_or_projection_origin": value.get("h"), + "false_easting": value.get("i"), + "geospatial_reference_dimension": indicator_map1.get(key[3]), + "geospatial_reference_method": indicator_map2.get(key[4]), + } + + +@marc21.over("planar_coordinate_data", "^343..") @utils.for_each_value @utils.filter_values def planar_coordinate_data(self, key, value): """Planar Coordinate Data.""" field_map = { - 'h': 'bearing_reference_direction', - 'i': 'bearing_reference_meridian', - 'c': 'abscissa_resolution', - 'a': 'planar_coordinate_encoding_method', - 'b': 'planar_distance_units', - 'f': 'bearing_resolution', - 'e': 'distance_resolution', - 'd': 'ordinate_resolution', - '6': 'linkage', - 'g': 'bearing_units', - '8': 'field_link_and_sequence_number', + "h": "bearing_reference_direction", + "i": "bearing_reference_meridian", + "c": "abscissa_resolution", + "a": "planar_coordinate_encoding_method", + "b": "planar_distance_units", + "f": "bearing_resolution", + "e": "distance_resolution", + "d": "ordinate_resolution", + "6": "linkage", + "g": "bearing_units", + "8": "field_link_and_sequence_number", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'bearing_reference_direction': value.get('h'), - 'bearing_reference_meridian': value.get('i'), - 'abscissa_resolution': value.get('c'), - 'planar_coordinate_encoding_method': value.get('a'), - 'planar_distance_units': value.get('b'), - 'bearing_resolution': value.get('f'), - 'distance_resolution': value.get('e'), - 'ordinate_resolution': value.get('d'), - 'linkage': value.get('6'), - 'bearing_units': value.get('g'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - } - - -@marc21.over('sound_characteristics', '^344..') + "__order__": tuple(order) if len(order) else None, + "bearing_reference_direction": value.get("h"), + "bearing_reference_meridian": value.get("i"), + "abscissa_resolution": value.get("c"), + "planar_coordinate_encoding_method": value.get("a"), + "planar_distance_units": value.get("b"), + "bearing_resolution": value.get("f"), + "distance_resolution": value.get("e"), + "ordinate_resolution": value.get("d"), + "linkage": value.get("6"), + "bearing_units": value.get("g"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + } + + +@marc21.over("sound_characteristics", "^344..") @utils.for_each_value @utils.filter_values def sound_characteristics(self, key, value): """Sound Characteristics.""" field_map = { - '0': 'authority_record_control_number_or_standard_number', - 'f': 'tape_configuration', - 'e': 'track_configuration', - 'd': 'groove_characteristic', - '2': 'source', - '8': 'field_link_and_sequence_number', - 'g': 'configuration_of_playback_channels', - 'c': 'playing_speed', - '3': 'materials_specified', - 'b': 'recording_medium', - 'a': 'type_of_recording', - '6': 'linkage', - 'h': 'special_playback_characteristics', + "0": "authority_record_control_number_or_standard_number", + "f": "tape_configuration", + "e": "track_configuration", + "d": "groove_characteristic", + "2": "source", + "8": "field_link_and_sequence_number", + "g": "configuration_of_playback_channels", + "c": "playing_speed", + "3": "materials_specified", + "b": "recording_medium", + "a": "type_of_recording", + "6": "linkage", + "h": "special_playback_characteristics", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'authority_record_control_number_or_standard_number': utils.force_list( - value.get('0') + "__order__": tuple(order) if len(order) else None, + "authority_record_control_number_or_standard_number": utils.force_list( + value.get("0") ), - 'tape_configuration': utils.force_list(value.get('f')), - 'track_configuration': utils.force_list(value.get('e')), - 'groove_characteristic': utils.force_list(value.get('d')), - 'source': value.get('2'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'configuration_of_playback_channels': utils.force_list(value.get('g')), - 'playing_speed': utils.force_list(value.get('c')), - 'materials_specified': value.get('3'), - 'recording_medium': utils.force_list(value.get('b')), - 'type_of_recording': utils.force_list(value.get('a')), - 'linkage': value.get('6'), - 'special_playback_characteristics': utils.force_list(value.get('h')), - } - - -@marc21.over('projection_characteristics_of_moving_image', '^345..') + "tape_configuration": utils.force_list(value.get("f")), + "track_configuration": utils.force_list(value.get("e")), + "groove_characteristic": utils.force_list(value.get("d")), + "source": value.get("2"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "configuration_of_playback_channels": utils.force_list(value.get("g")), + "playing_speed": utils.force_list(value.get("c")), + "materials_specified": value.get("3"), + "recording_medium": utils.force_list(value.get("b")), + "type_of_recording": utils.force_list(value.get("a")), + "linkage": value.get("6"), + "special_playback_characteristics": utils.force_list(value.get("h")), + } + + +@marc21.over("projection_characteristics_of_moving_image", "^345..") @utils.for_each_value @utils.filter_values def projection_characteristics_of_moving_image(self, key, value): """Projection Characteristics of Moving Image.""" field_map = { - '3': 'materials_specified', - 'b': 'projection_speed', - 'a': 'presentation_format', - '0': 'authority_record_control_number_or_standard_number', - '2': 'source', - '6': 'linkage', - '8': 'field_link_and_sequence_number', + "3": "materials_specified", + "b": "projection_speed", + "a": "presentation_format", + "0": "authority_record_control_number_or_standard_number", + "2": "source", + "6": "linkage", + "8": "field_link_and_sequence_number", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'materials_specified': value.get('3'), - 'projection_speed': utils.force_list(value.get('b')), - 'presentation_format': utils.force_list(value.get('a')), - 'authority_record_control_number_or_standard_number': utils.force_list( - value.get('0') + "__order__": tuple(order) if len(order) else None, + "materials_specified": value.get("3"), + "projection_speed": utils.force_list(value.get("b")), + "presentation_format": utils.force_list(value.get("a")), + "authority_record_control_number_or_standard_number": utils.force_list( + value.get("0") ), - 'source': value.get('2'), - 'linkage': value.get('6'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), + "source": value.get("2"), + "linkage": value.get("6"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), } -@marc21.over('video_characteristics', '^346..') +@marc21.over("video_characteristics", "^346..") @utils.for_each_value @utils.filter_values def video_characteristics(self, key, value): """Video Characteristics.""" field_map = { - '3': 'materials_specified', - 'b': 'broadcast_standard', - 'a': 'video_format', - '0': 'authority_record_control_number_or_standard_number', - '2': 'source', - '6': 'linkage', - '8': 'field_link_and_sequence_number', + "3": "materials_specified", + "b": "broadcast_standard", + "a": "video_format", + "0": "authority_record_control_number_or_standard_number", + "2": "source", + "6": "linkage", + "8": "field_link_and_sequence_number", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'materials_specified': value.get('3'), - 'broadcast_standard': utils.force_list(value.get('b')), - 'video_format': utils.force_list(value.get('a')), - 'authority_record_control_number_or_standard_number': utils.force_list( - value.get('0') + "__order__": tuple(order) if len(order) else None, + "materials_specified": value.get("3"), + "broadcast_standard": utils.force_list(value.get("b")), + "video_format": utils.force_list(value.get("a")), + "authority_record_control_number_or_standard_number": utils.force_list( + value.get("0") ), - 'source': value.get('2'), - 'linkage': value.get('6'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), + "source": value.get("2"), + "linkage": value.get("6"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), } -@marc21.over('digital_file_characteristics', '^347..') +@marc21.over("digital_file_characteristics", "^347..") @utils.for_each_value @utils.filter_values def digital_file_characteristics(self, key, value): """Digital File Characteristics.""" field_map = { - 'c': 'file_size', - 'd': 'resolution', - '3': 'materials_specified', - 'b': 'encoding_format', - 'e': 'regional_encoding', - 'f': 'encoded_bitrate', - 'a': 'file_type', - '0': 'authority_record_control_number_or_standard_number', - '2': 'source', - '6': 'linkage', - '8': 'field_link_and_sequence_number', + "c": "file_size", + "d": "resolution", + "3": "materials_specified", + "b": "encoding_format", + "e": "regional_encoding", + "f": "encoded_bitrate", + "a": "file_type", + "0": "authority_record_control_number_or_standard_number", + "2": "source", + "6": "linkage", + "8": "field_link_and_sequence_number", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'file_size': utils.force_list(value.get('c')), - 'resolution': utils.force_list(value.get('d')), - 'materials_specified': value.get('3'), - 'encoding_format': utils.force_list(value.get('b')), - 'regional_encoding': utils.force_list(value.get('e')), - 'encoded_bitrate': utils.force_list(value.get('f')), - 'file_type': utils.force_list(value.get('a')), - 'authority_record_control_number_or_standard_number': utils.force_list( - value.get('0') + "__order__": tuple(order) if len(order) else None, + "file_size": utils.force_list(value.get("c")), + "resolution": utils.force_list(value.get("d")), + "materials_specified": value.get("3"), + "encoding_format": utils.force_list(value.get("b")), + "regional_encoding": utils.force_list(value.get("e")), + "encoded_bitrate": utils.force_list(value.get("f")), + "file_type": utils.force_list(value.get("a")), + "authority_record_control_number_or_standard_number": utils.force_list( + value.get("0") ), - 'source': value.get('2'), - 'linkage': value.get('6'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), + "source": value.get("2"), + "linkage": value.get("6"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), } -@marc21.over('format_of_notated_music', '^348..') +@marc21.over("format_of_notated_music", "^348..") @utils.for_each_value @utils.filter_values def format_of_notated_music(self, key, value): """Format of Notated Music.""" field_map = { - '3': 'materials_specified', - 'b': 'format_of_notated_music_code', - 'a': 'format_of_notated_music_term', - '0': 'authority_record_control_number_or_standard_number', - '2': 'source_of_term', - '6': 'linkage', - '8': 'field_link_and_sequence_number', + "3": "materials_specified", + "b": "format_of_notated_music_code", + "a": "format_of_notated_music_term", + "0": "authority_record_control_number_or_standard_number", + "2": "source_of_term", + "6": "linkage", + "8": "field_link_and_sequence_number", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'materials_specified': value.get('3'), - 'format_of_notated_music_code': utils.force_list(value.get('b')), - 'format_of_notated_music_term': utils.force_list(value.get('a')), - 'authority_record_control_number_or_standard_number': utils.force_list( - value.get('0') + "__order__": tuple(order) if len(order) else None, + "materials_specified": value.get("3"), + "format_of_notated_music_code": utils.force_list(value.get("b")), + "format_of_notated_music_term": utils.force_list(value.get("a")), + "authority_record_control_number_or_standard_number": utils.force_list( + value.get("0") ), - 'source_of_term': value.get('2'), - 'linkage': value.get('6'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), + "source_of_term": value.get("2"), + "linkage": value.get("6"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), } -@marc21.over('organization_and_arrangement_of_materials', '^351..') +@marc21.over("organization_and_arrangement_of_materials", "^351..") @utils.for_each_value @utils.filter_values def organization_and_arrangement_of_materials(self, key, value): """Organization and Arrangement of Materials.""" field_map = { - 'c': 'hierarchical_level', - 'a': 'organization', - 'b': 'arrangement', - '3': 'materials_specified', - '6': 'linkage', - '8': 'field_link_and_sequence_number', + "c": "hierarchical_level", + "a": "organization", + "b": "arrangement", + "3": "materials_specified", + "6": "linkage", + "8": "field_link_and_sequence_number", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'hierarchical_level': value.get('c'), - 'organization': utils.force_list(value.get('a')), - 'arrangement': utils.force_list(value.get('b')), - 'materials_specified': value.get('3'), - 'linkage': value.get('6'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), + "__order__": tuple(order) if len(order) else None, + "hierarchical_level": value.get("c"), + "organization": utils.force_list(value.get("a")), + "arrangement": utils.force_list(value.get("b")), + "materials_specified": value.get("3"), + "linkage": value.get("6"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), } -@marc21.over('digital_graphic_representation', '^352..') +@marc21.over("digital_graphic_representation", "^352..") @utils.for_each_value @utils.filter_values def digital_graphic_representation(self, key, value): """Digital Graphic Representation.""" field_map = { - 'i': 'indirect_reference_description', - 'c': 'object_count', - 'a': 'direct_reference_method', - 'b': 'object_type', - 'q': 'format_of_the_digital_image', - 'f': 'vertical_count', - 'e': 'column_count', - 'd': 'row_count', - '6': 'linkage', - 'g': 'vpf_topology_level', - '8': 'field_link_and_sequence_number', + "i": "indirect_reference_description", + "c": "object_count", + "a": "direct_reference_method", + "b": "object_type", + "q": "format_of_the_digital_image", + "f": "vertical_count", + "e": "column_count", + "d": "row_count", + "6": "linkage", + "g": "vpf_topology_level", + "8": "field_link_and_sequence_number", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'indirect_reference_description': value.get('i'), - 'object_count': utils.force_list(value.get('c')), - 'direct_reference_method': value.get('a'), - 'object_type': utils.force_list(value.get('b')), - 'format_of_the_digital_image': value.get('q'), - 'vertical_count': value.get('f'), - 'column_count': value.get('e'), - 'row_count': value.get('d'), - 'linkage': value.get('6'), - 'vpf_topology_level': value.get('g'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - } - - -@marc21.over('security_classification_control', '^355[513_4028].') + "__order__": tuple(order) if len(order) else None, + "indirect_reference_description": value.get("i"), + "object_count": utils.force_list(value.get("c")), + "direct_reference_method": value.get("a"), + "object_type": utils.force_list(value.get("b")), + "format_of_the_digital_image": value.get("q"), + "vertical_count": value.get("f"), + "column_count": value.get("e"), + "row_count": value.get("d"), + "linkage": value.get("6"), + "vpf_topology_level": value.get("g"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + } + + +@marc21.over("security_classification_control", "^355[513_4028].") @utils.for_each_value @utils.filter_values def security_classification_control(self, key, value): @@ -669,98 +671,96 @@ def security_classification_control(self, key, value): "8": "None of the above", } field_map = { - 'h': 'declassification_date', - 'j': 'authorization', - 'c': 'external_dissemination_information', - 'a': 'security_classification', - 'b': 'handling_instructions', - 'f': 'country_of_origin_code', - 'e': 'classification_system', - 'd': 'downgrading_or_declassification_event', - '6': 'linkage', - 'g': 'downgrading_date', - '8': 'field_link_and_sequence_number', + "h": "declassification_date", + "j": "authorization", + "c": "external_dissemination_information", + "a": "security_classification", + "b": "handling_instructions", + "f": "country_of_origin_code", + "e": "classification_system", + "d": "downgrading_or_declassification_event", + "6": "linkage", + "g": "downgrading_date", + "8": "field_link_and_sequence_number", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('controlled_element') + order.append("controlled_element") return { - '__order__': tuple(order) if len(order) else None, - 'declassification_date': value.get('h'), - 'authorization': utils.force_list(value.get('j')), - 'external_dissemination_information': utils.force_list(value.get('c')), - 'security_classification': value.get('a'), - 'handling_instructions': utils.force_list(value.get('b')), - 'country_of_origin_code': value.get('f'), - 'classification_system': value.get('e'), - 'downgrading_or_declassification_event': value.get('d'), - 'linkage': value.get('6'), - 'downgrading_date': value.get('g'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'controlled_element': indicator_map1.get(key[3]), - } - - -@marc21.over('originator_dissemination_control', '^357..') + "__order__": tuple(order) if len(order) else None, + "declassification_date": value.get("h"), + "authorization": utils.force_list(value.get("j")), + "external_dissemination_information": utils.force_list(value.get("c")), + "security_classification": value.get("a"), + "handling_instructions": utils.force_list(value.get("b")), + "country_of_origin_code": value.get("f"), + "classification_system": value.get("e"), + "downgrading_or_declassification_event": value.get("d"), + "linkage": value.get("6"), + "downgrading_date": value.get("g"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "controlled_element": indicator_map1.get(key[3]), + } + + +@marc21.over("originator_dissemination_control", "^357..") @utils.filter_values def originator_dissemination_control(self, key, value): """Originator Dissemination Control.""" field_map = { - 'c': 'authorized_recipients_of_material', - 'a': 'originator_control_term', - 'b': 'originating_agency', - 'g': 'other_restrictions', - '6': 'linkage', - '8': 'field_link_and_sequence_number', + "c": "authorized_recipients_of_material", + "a": "originator_control_term", + "b": "originating_agency", + "g": "other_restrictions", + "6": "linkage", + "8": "field_link_and_sequence_number", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'authorized_recipients_of_material': utils.force_list(value.get('c')), - 'originator_control_term': value.get('a'), - 'originating_agency': utils.force_list(value.get('b')), - 'other_restrictions': utils.force_list(value.get('g')), - 'linkage': value.get('6'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), + "__order__": tuple(order) if len(order) else None, + "authorized_recipients_of_material": utils.force_list(value.get("c")), + "originator_control_term": value.get("a"), + "originating_agency": utils.force_list(value.get("b")), + "other_restrictions": utils.force_list(value.get("g")), + "linkage": value.get("6"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), } -@marc21.over( - 'dates_of_publication_and_or_sequential_designation', '^362[10_].' -) +@marc21.over("dates_of_publication_and_or_sequential_designation", "^362[10_].") @utils.for_each_value @utils.filter_values def dates_of_publication_and_or_sequential_designation(self, key, value): """Dates of Publication and/or Sequential Designation.""" indicator_map1 = {"0": "Formatted style", "1": "Unformatted note"} field_map = { - 'z': 'source_of_information', - 'a': 'dates_of_publication_and_or_sequential_designation', - '6': 'linkage', - '8': 'field_link_and_sequence_number', + "z": "source_of_information", + "a": "dates_of_publication_and_or_sequential_designation", + "6": "linkage", + "8": "field_link_and_sequence_number", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('format_of_date') + order.append("format_of_date") return { - '__order__': tuple(order) if len(order) else None, - 'source_of_information': value.get('z'), - 'dates_of_publication_and_or_sequential_designation': value.get('a'), - 'linkage': value.get('6'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'format_of_date': indicator_map1.get(key[3]), + "__order__": tuple(order) if len(order) else None, + "source_of_information": value.get("z"), + "dates_of_publication_and_or_sequential_designation": value.get("a"), + "linkage": value.get("6"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "format_of_date": indicator_map1.get(key[3]), } -@marc21.over('normalized_date_and_sequential_designation', '^363[10_][10_]') +@marc21.over("normalized_date_and_sequential_designation", "^363[10_][10_]") @utils.for_each_value @utils.filter_values def normalized_date_and_sequential_designation(self, key, value): @@ -772,191 +772,187 @@ def normalized_date_and_sequential_designation(self, key, value): } indicator_map2 = {"0": "Closed", "1": "Open", "_": "Not specified"} field_map = { - 'u': 'first_level_textual_designation', - 'v': 'first_level_of_chronology_issuance', - 'x': 'nonpublic_note', - 'f': 'sixth_level_of_enumeration', - 'e': 'fifth_level_of_enumeration', - 'd': 'fourth_level_of_enumeration', - '8': 'field_link_and_sequence_number', - 'g': 'alternative_numbering_scheme_first_level_of_enumeration', - 'j': 'second_level_of_chronology', - 'c': 'third_level_of_enumeration', - 'a': 'first_level_of_enumeration', - 'b': 'second_level_of_enumeration', - 'l': 'fourth_level_of_chronology', - 'i': 'first_level_of_chronology', - 'k': 'third_level_of_chronology', - 'z': 'public_note', - 'm': 'alternative_numbering_scheme_chronology', - '6': 'linkage', - 'h': 'alternative_numbering_scheme_second_level_of_enumeration', + "u": "first_level_textual_designation", + "v": "first_level_of_chronology_issuance", + "x": "nonpublic_note", + "f": "sixth_level_of_enumeration", + "e": "fifth_level_of_enumeration", + "d": "fourth_level_of_enumeration", + "8": "field_link_and_sequence_number", + "g": "alternative_numbering_scheme_first_level_of_enumeration", + "j": "second_level_of_chronology", + "c": "third_level_of_enumeration", + "a": "first_level_of_enumeration", + "b": "second_level_of_enumeration", + "l": "fourth_level_of_chronology", + "i": "first_level_of_chronology", + "k": "third_level_of_chronology", + "z": "public_note", + "m": "alternative_numbering_scheme_chronology", + "6": "linkage", + "h": "alternative_numbering_scheme_second_level_of_enumeration", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('start_end_designator') + order.append("start_end_designator") if key[4] in indicator_map2: - order.append('state_of_issuance') + order.append("state_of_issuance") return { - '__order__': tuple(order) if len(order) else None, - 'first_level_textual_designation': value.get('u'), - 'first_level_of_chronology_issuance': value.get('v'), - 'nonpublic_note': utils.force_list(value.get('x')), - 'sixth_level_of_enumeration': value.get('f'), - 'fifth_level_of_enumeration': value.get('e'), - 'fourth_level_of_enumeration': value.get('d'), - 'field_link_and_sequence_number': value.get('8'), - 'alternative_numbering_scheme_first_level_of_enumeration': value.get( - 'g' - ), - 'second_level_of_chronology': value.get('j'), - 'third_level_of_enumeration': value.get('c'), - 'first_level_of_enumeration': value.get('a'), - 'second_level_of_enumeration': value.get('b'), - 'fourth_level_of_chronology': value.get('l'), - 'first_level_of_chronology': value.get('i'), - 'third_level_of_chronology': value.get('k'), - 'public_note': utils.force_list(value.get('z')), - 'alternative_numbering_scheme_chronology': value.get('m'), - 'linkage': value.get('6'), - 'alternative_numbering_scheme_second_level_of_enumeration': value.get( - 'h' - ), - 'start_end_designator': indicator_map1.get(key[3]), - 'state_of_issuance': indicator_map2.get(key[4]), - } - - -@marc21.over('trade_price', '^365..') + "__order__": tuple(order) if len(order) else None, + "first_level_textual_designation": value.get("u"), + "first_level_of_chronology_issuance": value.get("v"), + "nonpublic_note": utils.force_list(value.get("x")), + "sixth_level_of_enumeration": value.get("f"), + "fifth_level_of_enumeration": value.get("e"), + "fourth_level_of_enumeration": value.get("d"), + "field_link_and_sequence_number": value.get("8"), + "alternative_numbering_scheme_first_level_of_enumeration": value.get("g"), + "second_level_of_chronology": value.get("j"), + "third_level_of_enumeration": value.get("c"), + "first_level_of_enumeration": value.get("a"), + "second_level_of_enumeration": value.get("b"), + "fourth_level_of_chronology": value.get("l"), + "first_level_of_chronology": value.get("i"), + "third_level_of_chronology": value.get("k"), + "public_note": utils.force_list(value.get("z")), + "alternative_numbering_scheme_chronology": value.get("m"), + "linkage": value.get("6"), + "alternative_numbering_scheme_second_level_of_enumeration": value.get("h"), + "start_end_designator": indicator_map1.get(key[3]), + "state_of_issuance": indicator_map2.get(key[4]), + } + + +@marc21.over("trade_price", "^365..") @utils.for_each_value @utils.filter_values def trade_price(self, key, value): """Trade Price.""" field_map = { - 'f': 'price_effective_from', - 'e': 'price_note', - 'd': 'unit_of_pricing', - '2': 'source_of_price_type_code', - '8': 'field_link_and_sequence_number', - 'g': 'price_effective_until', - 'j': 'iso_country_code', - 'c': 'currency_code', - 'a': 'price_type_code', - 'b': 'price_amount', - 'i': 'tax_rate_2', - 'k': 'marc_country_code', - 'm': 'identification_of_pricing_entity', - '6': 'linkage', - 'h': 'tax_rate_1', + "f": "price_effective_from", + "e": "price_note", + "d": "unit_of_pricing", + "2": "source_of_price_type_code", + "8": "field_link_and_sequence_number", + "g": "price_effective_until", + "j": "iso_country_code", + "c": "currency_code", + "a": "price_type_code", + "b": "price_amount", + "i": "tax_rate_2", + "k": "marc_country_code", + "m": "identification_of_pricing_entity", + "6": "linkage", + "h": "tax_rate_1", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'price_effective_from': value.get('f'), - 'price_note': value.get('e'), - 'unit_of_pricing': value.get('d'), - 'source_of_price_type_code': value.get('2'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'price_effective_until': value.get('g'), - 'iso_country_code': value.get('j'), - 'currency_code': value.get('c'), - 'price_type_code': value.get('a'), - 'price_amount': value.get('b'), - 'tax_rate_2': value.get('i'), - 'marc_country_code': value.get('k'), - 'identification_of_pricing_entity': value.get('m'), - 'linkage': value.get('6'), - 'tax_rate_1': value.get('h'), - } - - -@marc21.over('trade_availability_information', '^366..') + "__order__": tuple(order) if len(order) else None, + "price_effective_from": value.get("f"), + "price_note": value.get("e"), + "unit_of_pricing": value.get("d"), + "source_of_price_type_code": value.get("2"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "price_effective_until": value.get("g"), + "iso_country_code": value.get("j"), + "currency_code": value.get("c"), + "price_type_code": value.get("a"), + "price_amount": value.get("b"), + "tax_rate_2": value.get("i"), + "marc_country_code": value.get("k"), + "identification_of_pricing_entity": value.get("m"), + "linkage": value.get("6"), + "tax_rate_1": value.get("h"), + } + + +@marc21.over("trade_availability_information", "^366..") @utils.for_each_value @utils.filter_values def trade_availability_information(self, key, value): """Trade Availability Information.""" field_map = { - 'f': 'publisher_s_discount_category', - 'e': 'note', - 'd': 'expected_next_availability_date', - '2': 'source_of_availability_status_code', - '8': 'field_link_and_sequence_number', - 'g': 'date_made_out_of_print', - 'c': 'availability_status_code', - 'a': 'publishers_compressed_title_identification', - 'b': 'detailed_date_of_publication', - 'j': 'iso_country_code', - 'm': 'identification_of_agency', - '6': 'linkage', - 'k': 'marc_country_code', + "f": "publisher_s_discount_category", + "e": "note", + "d": "expected_next_availability_date", + "2": "source_of_availability_status_code", + "8": "field_link_and_sequence_number", + "g": "date_made_out_of_print", + "c": "availability_status_code", + "a": "publishers_compressed_title_identification", + "b": "detailed_date_of_publication", + "j": "iso_country_code", + "m": "identification_of_agency", + "6": "linkage", + "k": "marc_country_code", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'publisher_s_discount_category': value.get('f'), - 'note': value.get('e'), - 'expected_next_availability_date': value.get('d'), - 'source_of_availability_status_code': value.get('2'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'date_made_out_of_print': value.get('g'), - 'availability_status_code': value.get('c'), - 'publishers_compressed_title_identification': value.get('a'), - 'detailed_date_of_publication': value.get('b'), - 'iso_country_code': value.get('j'), - 'identification_of_agency': value.get('m'), - 'linkage': value.get('6'), - 'marc_country_code': value.get('k'), - } - - -@marc21.over('associated_place', '^370..') + "__order__": tuple(order) if len(order) else None, + "publisher_s_discount_category": value.get("f"), + "note": value.get("e"), + "expected_next_availability_date": value.get("d"), + "source_of_availability_status_code": value.get("2"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "date_made_out_of_print": value.get("g"), + "availability_status_code": value.get("c"), + "publishers_compressed_title_identification": value.get("a"), + "detailed_date_of_publication": value.get("b"), + "iso_country_code": value.get("j"), + "identification_of_agency": value.get("m"), + "linkage": value.get("6"), + "marc_country_code": value.get("k"), + } + + +@marc21.over("associated_place", "^370..") @utils.for_each_value @utils.filter_values def associated_place(self, key, value): """Associated Place.""" field_map = { - 'c': 'associated_country', - 'u': 'uniform_resource_identifier', - 's': 'start_period', - 'f': 'other_associated_place', - 'v': 'source_of_information', - 't': 'end_period', - '0': 'authority_record_control_number_or_standard_number', - '2': 'source_of_term', - '6': 'linkage', - 'g': 'place_of_origin_of_work', - '8': 'field_link_and_sequence_number', + "c": "associated_country", + "u": "uniform_resource_identifier", + "s": "start_period", + "f": "other_associated_place", + "v": "source_of_information", + "t": "end_period", + "0": "authority_record_control_number_or_standard_number", + "2": "source_of_term", + "6": "linkage", + "g": "place_of_origin_of_work", + "8": "field_link_and_sequence_number", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'associated_country': utils.force_list(value.get('c')), - 'uniform_resource_identifier': utils.force_list(value.get('u')), - 'start_period': value.get('s'), - 'other_associated_place': utils.force_list(value.get('f')), - 'source_of_information': utils.force_list(value.get('v')), - 'end_period': value.get('t'), - 'authority_record_control_number_or_standard_number': utils.force_list( - value.get('0') + "__order__": tuple(order) if len(order) else None, + "associated_country": utils.force_list(value.get("c")), + "uniform_resource_identifier": utils.force_list(value.get("u")), + "start_period": value.get("s"), + "other_associated_place": utils.force_list(value.get("f")), + "source_of_information": utils.force_list(value.get("v")), + "end_period": value.get("t"), + "authority_record_control_number_or_standard_number": utils.force_list( + value.get("0") ), - 'source_of_term': value.get('2'), - 'linkage': value.get('6'), - 'place_of_origin_of_work': utils.force_list(value.get('g')), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), + "source_of_term": value.get("2"), + "linkage": value.get("6"), + "place_of_origin_of_work": utils.force_list(value.get("g")), + "field_link_and_sequence_number": utils.force_list(value.get("8")), } -@marc21.over('associated_language', '^377.[_7]') +@marc21.over("associated_language", "^377.[_7]") @utils.for_each_value @utils.filter_values def associated_language(self, key, value): @@ -966,92 +962,86 @@ def associated_language(self, key, value): "_": "MARC language code", } field_map = { - 'a': 'language_code', - '2': 'source', - '6': 'linkage', - 'l': 'language_term', - '8': 'field_link_and_sequence_number', + "a": "language_code", + "2": "source", + "6": "linkage", + "l": "language_term", + "8": "field_link_and_sequence_number", } order = utils.map_order(field_map, value) if key[4] in indicator_map2: - order.append('source_of_code') + order.append("source_of_code") return { - '__order__': tuple(order) if len(order) else None, - 'language_code': utils.force_list(value.get('a')), - 'source': value.get('2'), - 'linkage': value.get('6'), - 'language_term': utils.force_list(value.get('l')), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'source_of_code': value.get('2') - if key[4] == '7' + "__order__": tuple(order) if len(order) else None, + "language_code": utils.force_list(value.get("a")), + "source": value.get("2"), + "linkage": value.get("6"), + "language_term": utils.force_list(value.get("l")), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "source_of_code": value.get("2") + if key[4] == "7" else indicator_map2.get(key[4]), } -@marc21.over('form_of_work', '^380..') +@marc21.over("form_of_work", "^380..") @utils.for_each_value @utils.filter_values def form_of_work(self, key, value): """Form of Work.""" field_map = { - 'a': 'form_of_work', - '0': 'record_control_number', - '2': 'source_of_term', - '6': 'linkage', - '8': 'field_link_and_sequence_number', + "a": "form_of_work", + "0": "record_control_number", + "2": "source_of_term", + "6": "linkage", + "8": "field_link_and_sequence_number", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'form_of_work': utils.force_list(value.get('a')), - 'record_control_number': utils.force_list(value.get('0')), - 'source_of_term': value.get('2'), - 'linkage': value.get('6'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), + "__order__": tuple(order) if len(order) else None, + "form_of_work": utils.force_list(value.get("a")), + "record_control_number": utils.force_list(value.get("0")), + "source_of_term": value.get("2"), + "linkage": value.get("6"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), } -@marc21.over( - 'other_distinguishing_characteristics_of_work_or_expression', '^381..' -) +@marc21.over("other_distinguishing_characteristics_of_work_or_expression", "^381..") @utils.for_each_value @utils.filter_values -def other_distinguishing_characteristics_of_work_or_expression( - self, key, value -): +def other_distinguishing_characteristics_of_work_or_expression(self, key, value): """Other Distinguishing Characteristics of Work or Expression.""" field_map = { - 'a': 'other_distinguishing_characteristic', - 'v': 'source_of_information', - 'u': 'uniform_resource_identifier', - '0': 'record_control_number', - '2': 'source_of_term', - '6': 'linkage', - '8': 'field_link_and_sequence_number', + "a": "other_distinguishing_characteristic", + "v": "source_of_information", + "u": "uniform_resource_identifier", + "0": "record_control_number", + "2": "source_of_term", + "6": "linkage", + "8": "field_link_and_sequence_number", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'other_distinguishing_characteristic': utils.force_list( - value.get('a') - ), - 'source_of_information': utils.force_list(value.get('v')), - 'uniform_resource_identifier': utils.force_list(value.get('u')), - 'record_control_number': utils.force_list(value.get('0')), - 'source_of_term': value.get('2'), - 'linkage': value.get('6'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), + "__order__": tuple(order) if len(order) else None, + "other_distinguishing_characteristic": utils.force_list(value.get("a")), + "source_of_information": utils.force_list(value.get("v")), + "uniform_resource_identifier": utils.force_list(value.get("u")), + "record_control_number": utils.force_list(value.get("0")), + "source_of_term": value.get("2"), + "linkage": value.get("6"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), } -@marc21.over('medium_of_performance', '^382[10_][10_]') +@marc21.over("medium_of_performance", "^382[10_][10_]") @utils.for_each_value @utils.filter_values def medium_of_performance(self, key, value): @@ -1067,90 +1057,85 @@ def medium_of_performance(self, key, value): "_": "No information provided", } field_map = { - '0': 'authority_record_control_number_or_standard_number', - 'v': 'note', - 's': 'total_number_of_performers', - 'e': 'number_of_ensembles_of_the_same_type', - 'd': 'doubling_instrument', - '2': 'source_of_term', - '8': 'field_link_and_sequence_number', - 'n': 'number_of_performers_of_the_same_medium', - 'r': 'total_number_of_individuals_performing_alongside_ensembles', - 't': 'total_number_of_ensembles', - 'a': 'medium_of_performance', - 'b': 'soloist', - 'p': 'alternative_medium_of_performance', - '6': 'linkage', + "0": "authority_record_control_number_or_standard_number", + "v": "note", + "s": "total_number_of_performers", + "e": "number_of_ensembles_of_the_same_type", + "d": "doubling_instrument", + "2": "source_of_term", + "8": "field_link_and_sequence_number", + "n": "number_of_performers_of_the_same_medium", + "r": "total_number_of_individuals_performing_alongside_ensembles", + "t": "total_number_of_ensembles", + "a": "medium_of_performance", + "b": "soloist", + "p": "alternative_medium_of_performance", + "6": "linkage", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('display_constant_controller') + order.append("display_constant_controller") if key[4] in indicator_map2: - order.append('access_control') + order.append("access_control") return { - '__order__': tuple(order) if len(order) else None, - 'authority_record_control_number_or_standard_number': utils.force_list( - value.get('0') - ), - 'note': utils.force_list(value.get('v')), - 'total_number_of_performers': value.get('s'), - 'number_of_ensembles_of_the_same_type': utils.force_list( - value.get('e') - ), - 'doubling_instrument': utils.force_list(value.get('d')), - 'source_of_term': value.get('2'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'number_of_performers_of_the_same_medium': utils.force_list( - value.get('n') + "__order__": tuple(order) if len(order) else None, + "authority_record_control_number_or_standard_number": utils.force_list( + value.get("0") ), - 'total_number_of_individuals_performing_alongside_ensembles': - value.get('r'), - 'total_number_of_ensembles': value.get('t'), - 'medium_of_performance': utils.force_list(value.get('a')), - 'soloist': utils.force_list(value.get('b')), - 'alternative_medium_of_performance': utils.force_list(value.get('p')), - 'linkage': value.get('6'), - 'display_constant_controller': indicator_map1.get(key[3]), - 'access_control': indicator_map2.get(key[4]), - } - - -@marc21.over('numeric_designation_of_musical_work', '^383..') + "note": utils.force_list(value.get("v")), + "total_number_of_performers": value.get("s"), + "number_of_ensembles_of_the_same_type": utils.force_list(value.get("e")), + "doubling_instrument": utils.force_list(value.get("d")), + "source_of_term": value.get("2"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "number_of_performers_of_the_same_medium": utils.force_list(value.get("n")), + "total_number_of_individuals_performing_alongside_ensembles": value.get("r"), + "total_number_of_ensembles": value.get("t"), + "medium_of_performance": utils.force_list(value.get("a")), + "soloist": utils.force_list(value.get("b")), + "alternative_medium_of_performance": utils.force_list(value.get("p")), + "linkage": value.get("6"), + "display_constant_controller": indicator_map1.get(key[3]), + "access_control": indicator_map2.get(key[4]), + } + + +@marc21.over("numeric_designation_of_musical_work", "^383..") @utils.for_each_value @utils.filter_values def numeric_designation_of_musical_work(self, key, value): """Numeric Designation of Musical Work.""" field_map = { - 'c': 'thematic_index_number', - 'a': 'serial_number', - 'b': 'opus_number', - 'e': 'publisher_associated_with_opus_number', - 'd': 'thematic_index_code', - '2': 'source', - '6': 'linkage', - '8': 'field_link_and_sequence_number', + "c": "thematic_index_number", + "a": "serial_number", + "b": "opus_number", + "e": "publisher_associated_with_opus_number", + "d": "thematic_index_code", + "2": "source", + "6": "linkage", + "8": "field_link_and_sequence_number", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'thematic_index_number': utils.force_list(value.get('c')), - 'serial_number': utils.force_list(value.get('a')), - 'opus_number': utils.force_list(value.get('b')), - 'publisher_associated_with_opus_number': value.get('e'), - 'thematic_index_code': value.get('d'), - 'source': value.get('2'), - 'linkage': value.get('6'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), + "__order__": tuple(order) if len(order) else None, + "thematic_index_number": utils.force_list(value.get("c")), + "serial_number": utils.force_list(value.get("a")), + "opus_number": utils.force_list(value.get("b")), + "publisher_associated_with_opus_number": value.get("e"), + "thematic_index_code": value.get("d"), + "source": value.get("2"), + "linkage": value.get("6"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), } -@marc21.over('key', '^384[10_].') +@marc21.over("key", "^384[10_].") @utils.filter_values def key(self, key, value): """Key.""" @@ -1160,96 +1145,96 @@ def key(self, key, value): "_": "Relationship to original unknown", } field_map = { - 'a': 'key', - '6': 'linkage', - '8': 'field_link_and_sequence_number', + "a": "key", + "6": "linkage", + "8": "field_link_and_sequence_number", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('key_type') + order.append("key_type") return { - '__order__': tuple(order) if len(order) else None, - 'key': value.get('a'), - 'linkage': value.get('6'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'key_type': indicator_map1.get(key[3]), + "__order__": tuple(order) if len(order) else None, + "key": value.get("a"), + "linkage": value.get("6"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "key_type": indicator_map1.get(key[3]), } -@marc21.over('audience_characteristics', '^385..') +@marc21.over("audience_characteristics", "^385..") @utils.for_each_value @utils.filter_values def audience_characteristics(self, key, value): """Audience Characteristics.""" field_map = { - 'n': 'demographic_group_code', - '3': 'materials_specified', - 'b': 'audience_code', - 'a': 'audience_term', - '0': 'authority_record_control_number_or_standard_number', - '2': 'source', - '6': 'linkage', - 'm': 'demographic_group_term', - '8': 'field_link_and_sequence_number', + "n": "demographic_group_code", + "3": "materials_specified", + "b": "audience_code", + "a": "audience_term", + "0": "authority_record_control_number_or_standard_number", + "2": "source", + "6": "linkage", + "m": "demographic_group_term", + "8": "field_link_and_sequence_number", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'demographic_group_code': value.get('n'), - 'materials_specified': value.get('3'), - 'audience_code': utils.force_list(value.get('b')), - 'audience_term': utils.force_list(value.get('a')), - 'authority_record_control_number_or_standard_number': utils.force_list( - value.get('0') + "__order__": tuple(order) if len(order) else None, + "demographic_group_code": value.get("n"), + "materials_specified": value.get("3"), + "audience_code": utils.force_list(value.get("b")), + "audience_term": utils.force_list(value.get("a")), + "authority_record_control_number_or_standard_number": utils.force_list( + value.get("0") ), - 'source': value.get('2'), - 'linkage': value.get('6'), - 'demographic_group_term': value.get('m'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), + "source": value.get("2"), + "linkage": value.get("6"), + "demographic_group_term": value.get("m"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), } -@marc21.over('creator_contributor_characteristics', '^386..') +@marc21.over("creator_contributor_characteristics", "^386..") @utils.for_each_value @utils.filter_values def creator_contributor_characteristics(self, key, value): """Creator/Contributor Characteristics.""" field_map = { - 'n': 'demographic_group_code', - '3': 'materials_specified', - 'b': 'creator_contributor_code', - 'a': 'creator_contributor_term', - '0': 'authority_record_control_number_or_standard_number', - '2': 'source', - '6': 'linkage', - 'm': 'demographic_group_term', - '8': 'field_link_and_sequence_number', + "n": "demographic_group_code", + "3": "materials_specified", + "b": "creator_contributor_code", + "a": "creator_contributor_term", + "0": "authority_record_control_number_or_standard_number", + "2": "source", + "6": "linkage", + "m": "demographic_group_term", + "8": "field_link_and_sequence_number", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'demographic_group_code': value.get('n'), - 'materials_specified': value.get('3'), - 'creator_contributor_code': utils.force_list(value.get('b')), - 'creator_contributor_term': utils.force_list(value.get('a')), - 'authority_record_control_number_or_standard_number': utils.force_list( - value.get('0') + "__order__": tuple(order) if len(order) else None, + "demographic_group_code": value.get("n"), + "materials_specified": value.get("3"), + "creator_contributor_code": utils.force_list(value.get("b")), + "creator_contributor_term": utils.force_list(value.get("a")), + "authority_record_control_number_or_standard_number": utils.force_list( + value.get("0") ), - 'source': value.get('2'), - 'linkage': value.get('6'), - 'demographic_group_term': value.get('m'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), + "source": value.get("2"), + "linkage": value.get("6"), + "demographic_group_term": value.get("m"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), } -@marc21.over('time_period_of_creation', '^388[12_].') +@marc21.over("time_period_of_creation", "^388[12_].") @utils.for_each_value @utils.filter_values def time_period_of_creation(self, key, value): @@ -1260,28 +1245,28 @@ def time_period_of_creation(self, key, value): "_": "No information provided", } field_map = { - '3': 'materials_specified', - 'a': 'time_period_of_creation_term', - '0': 'authority_record_control_number_or_standard_number', - '2': 'source_of_term', - '6': 'linkage', - '8': 'field_link_and_sequence_number', + "3": "materials_specified", + "a": "time_period_of_creation_term", + "0": "authority_record_control_number_or_standard_number", + "2": "source_of_term", + "6": "linkage", + "8": "field_link_and_sequence_number", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('type_of_time_period') + order.append("type_of_time_period") return { - '__order__': tuple(order) if len(order) else None, - 'materials_specified': value.get('3'), - 'time_period_of_creation_term': utils.force_list(value.get('a')), - 'authority_record_control_number_or_standard_number': utils.force_list( - value.get('0') + "__order__": tuple(order) if len(order) else None, + "materials_specified": value.get("3"), + "time_period_of_creation_term": utils.force_list(value.get("a")), + "authority_record_control_number_or_standard_number": utils.force_list( + value.get("0") ), - 'source_of_term': value.get('2'), - 'linkage': value.get('6'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'type_of_time_period': indicator_map1.get(key[3]), + "source_of_term": value.get("2"), + "linkage": value.get("6"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "type_of_time_period": indicator_map1.get(key[3]), } diff --git a/rero_ebooks/dojson/marc21/fields/bd4xx.py b/rero_ebooks/dojson/marc21/fields/bd4xx.py index 1625561..0807a18 100644 --- a/rero_ebooks/dojson/marc21/fields/bd4xx.py +++ b/rero_ebooks/dojson/marc21/fields/bd4xx.py @@ -14,7 +14,7 @@ from ..model import marc21 -@marc21.over('series_statement_added_entry_personal_name', '^400[03_1][0_1]') +@marc21.over("series_statement_added_entry_personal_name", "^400[03_1][0_1]") @utils.for_each_value @utils.filter_values def series_statement_added_entry_personal_name(self, key, value): @@ -25,62 +25,62 @@ def series_statement_added_entry_personal_name(self, key, value): "1": "Main entry represented by pronoun", } field_map = { - 'p': 'name_of_part_section_of_a_work', - '6': 'linkage', - 'u': 'affiliation', - 'b': 'numeration', - '4': 'relator_code', - 'x': 'international_standard_serial_number', - 'n': 'number_of_part_section_of_a_work', - 'a': 'personal_name', - '8': 'field_link_and_sequence_number', - 'k': 'form_subheading', - 't': 'title_of_a_work', - 'e': 'relator_term', - 'l': 'language_of_a_work', - 'c': 'titles_and_other_words_associated_with_a_name', - 'g': 'miscellaneous_information', - 'f': 'date_of_a_work', - 'd': 'dates_associated_with_a_name', - 'v': 'volume_sequential_designation', + "p": "name_of_part_section_of_a_work", + "6": "linkage", + "u": "affiliation", + "b": "numeration", + "4": "relator_code", + "x": "international_standard_serial_number", + "n": "number_of_part_section_of_a_work", + "a": "personal_name", + "8": "field_link_and_sequence_number", + "k": "form_subheading", + "t": "title_of_a_work", + "e": "relator_term", + "l": "language_of_a_work", + "c": "titles_and_other_words_associated_with_a_name", + "g": "miscellaneous_information", + "f": "date_of_a_work", + "d": "dates_associated_with_a_name", + "v": "volume_sequential_designation", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('type_of_personal_name_entry_element') + order.append("type_of_personal_name_entry_element") if key[4] in indicator_map2: - order.append('pronoun_represents_main_entry') + order.append("pronoun_represents_main_entry") return { - '__order__': tuple(order) if len(order) else None, - 'name_of_part_section_of_a_work': utils.force_list(value.get('p')), - 'linkage': value.get('6'), - 'affiliation': value.get('u'), - 'numeration': value.get('b'), - 'relator_code': utils.force_list(value.get('4')), - 'international_standard_serial_number': value.get('x'), - 'number_of_part_section_of_a_work': utils.force_list(value.get('n')), - 'personal_name': value.get('a'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'form_subheading': utils.force_list(value.get('k')), - 'title_of_a_work': value.get('t'), - 'relator_term': utils.force_list(value.get('e')), - 'language_of_a_work': value.get('l'), - 'titles_and_other_words_associated_with_a_name': utils.force_list( - value.get('c') + "__order__": tuple(order) if len(order) else None, + "name_of_part_section_of_a_work": utils.force_list(value.get("p")), + "linkage": value.get("6"), + "affiliation": value.get("u"), + "numeration": value.get("b"), + "relator_code": utils.force_list(value.get("4")), + "international_standard_serial_number": value.get("x"), + "number_of_part_section_of_a_work": utils.force_list(value.get("n")), + "personal_name": value.get("a"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "form_subheading": utils.force_list(value.get("k")), + "title_of_a_work": value.get("t"), + "relator_term": utils.force_list(value.get("e")), + "language_of_a_work": value.get("l"), + "titles_and_other_words_associated_with_a_name": utils.force_list( + value.get("c") ), - 'miscellaneous_information': value.get('g'), - 'date_of_a_work': value.get('f'), - 'dates_associated_with_a_name': value.get('d'), - 'volume_sequential_designation': value.get('v'), - 'type_of_personal_name_entry_element': indicator_map1.get(key[3]), - 'pronoun_represents_main_entry': indicator_map2.get(key[4]), + "miscellaneous_information": value.get("g"), + "date_of_a_work": value.get("f"), + "dates_associated_with_a_name": value.get("d"), + "volume_sequential_designation": value.get("v"), + "type_of_personal_name_entry_element": indicator_map1.get(key[3]), + "pronoun_represents_main_entry": indicator_map2.get(key[4]), } -@marc21.over('series_statement_added_entry_corporate_name', '^410[0_21][0_1]') +@marc21.over("series_statement_added_entry_corporate_name", "^410[0_21][0_1]") @utils.for_each_value @utils.filter_values def series_statement_added_entry_corporate_name(self, key, value): @@ -95,60 +95,60 @@ def series_statement_added_entry_corporate_name(self, key, value): "1": "Main entry represented by pronoun", } field_map = { - 'p': 'name_of_part_section_of_a_work', - '6': 'linkage', - 'u': 'affiliation', - 'b': 'subordinate_unit', - '4': 'relator_code', - 'x': 'international_standard_serial_number', - 'n': 'number_of_part_section_meeting', - 'a': 'corporate_name_or_jurisdiction_name_as_entry_element', - '8': 'field_link_and_sequence_number', - 'k': 'form_subheading', - 't': 'title_of_a_work', - 'e': 'relator_term', - 'l': 'language_of_a_work', - 'c': 'location_of_meeting', - 'g': 'miscellaneous_information', - 'f': 'date_of_a_work', - 'd': 'date_of_meeting_or_treaty_signing', - 'v': 'volume_sequential_designation', + "p": "name_of_part_section_of_a_work", + "6": "linkage", + "u": "affiliation", + "b": "subordinate_unit", + "4": "relator_code", + "x": "international_standard_serial_number", + "n": "number_of_part_section_meeting", + "a": "corporate_name_or_jurisdiction_name_as_entry_element", + "8": "field_link_and_sequence_number", + "k": "form_subheading", + "t": "title_of_a_work", + "e": "relator_term", + "l": "language_of_a_work", + "c": "location_of_meeting", + "g": "miscellaneous_information", + "f": "date_of_a_work", + "d": "date_of_meeting_or_treaty_signing", + "v": "volume_sequential_designation", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('type_of_corporate_name_entry_element') + order.append("type_of_corporate_name_entry_element") if key[4] in indicator_map2: - order.append('pronoun_represents_main_entry') + order.append("pronoun_represents_main_entry") return { - '__order__': tuple(order) if len(order) else None, - 'name_of_part_section_of_a_work': utils.force_list(value.get('p')), - 'linkage': value.get('6'), - 'affiliation': value.get('u'), - 'subordinate_unit': utils.force_list(value.get('b')), - 'relator_code': utils.force_list(value.get('4')), - 'international_standard_serial_number': value.get('x'), - 'number_of_part_section_meeting': utils.force_list(value.get('n')), - 'corporate_name_or_jurisdiction_name_as_entry_element': value.get('a'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'form_subheading': utils.force_list(value.get('k')), - 'title_of_a_work': value.get('t'), - 'relator_term': utils.force_list(value.get('e')), - 'language_of_a_work': value.get('l'), - 'location_of_meeting': value.get('c'), - 'miscellaneous_information': value.get('g'), - 'date_of_a_work': value.get('f'), - 'date_of_meeting_or_treaty_signing': utils.force_list(value.get('d')), - 'volume_sequential_designation': value.get('v'), - 'type_of_corporate_name_entry_element': indicator_map1.get(key[3]), - 'pronoun_represents_main_entry': indicator_map2.get(key[4]), + "__order__": tuple(order) if len(order) else None, + "name_of_part_section_of_a_work": utils.force_list(value.get("p")), + "linkage": value.get("6"), + "affiliation": value.get("u"), + "subordinate_unit": utils.force_list(value.get("b")), + "relator_code": utils.force_list(value.get("4")), + "international_standard_serial_number": value.get("x"), + "number_of_part_section_meeting": utils.force_list(value.get("n")), + "corporate_name_or_jurisdiction_name_as_entry_element": value.get("a"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "form_subheading": utils.force_list(value.get("k")), + "title_of_a_work": value.get("t"), + "relator_term": utils.force_list(value.get("e")), + "language_of_a_work": value.get("l"), + "location_of_meeting": value.get("c"), + "miscellaneous_information": value.get("g"), + "date_of_a_work": value.get("f"), + "date_of_meeting_or_treaty_signing": utils.force_list(value.get("d")), + "volume_sequential_designation": value.get("v"), + "type_of_corporate_name_entry_element": indicator_map1.get(key[3]), + "pronoun_represents_main_entry": indicator_map2.get(key[4]), } -@marc21.over('series_statement_added_entry_meeting_name', '^411[0_21][0_1]') +@marc21.over("series_statement_added_entry_meeting_name", "^411[0_21][0_1]") @utils.for_each_value @utils.filter_values def series_statement_added_entry_meeting_name(self, key, value): @@ -163,132 +163,126 @@ def series_statement_added_entry_meeting_name(self, key, value): "1": "Main entry represented by pronoun", } field_map = { - 'p': 'name_of_part_section_of_a_work', - '6': 'linkage', - 'u': 'affiliation', - '4': 'relator_code', - 'd': 'date_of_meeting', - 'q': 'name_of_meeting_following_jurisdiction_name_entry_element', - 'n': 'number_of_part_section_meeting', - 'a': 'meeting_name_or_jurisdiction_name_as_entry_element', - '8': 'field_link_and_sequence_number', - 'k': 'form_subheading', - 't': 'title_of_a_work', - 'e': 'subordinate_unit', - 'l': 'language_of_a_work', - 'c': 'location_of_meeting', - 'g': 'miscellaneous_information', - 'f': 'date_of_a_work', - 'x': 'international_standard_serial_number', - 'v': 'volume_sequential_designation', + "p": "name_of_part_section_of_a_work", + "6": "linkage", + "u": "affiliation", + "4": "relator_code", + "d": "date_of_meeting", + "q": "name_of_meeting_following_jurisdiction_name_entry_element", + "n": "number_of_part_section_meeting", + "a": "meeting_name_or_jurisdiction_name_as_entry_element", + "8": "field_link_and_sequence_number", + "k": "form_subheading", + "t": "title_of_a_work", + "e": "subordinate_unit", + "l": "language_of_a_work", + "c": "location_of_meeting", + "g": "miscellaneous_information", + "f": "date_of_a_work", + "x": "international_standard_serial_number", + "v": "volume_sequential_designation", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('type_of_meeting_name_entry_element') + order.append("type_of_meeting_name_entry_element") if key[4] in indicator_map2: - order.append('pronoun_represents_main_entry') + order.append("pronoun_represents_main_entry") return { - '__order__': tuple(order) if len(order) else None, - 'name_of_part_section_of_a_work': utils.force_list(value.get('p')), - 'linkage': value.get('6'), - 'affiliation': value.get('u'), - 'relator_code': utils.force_list(value.get('4')), - 'date_of_meeting': value.get('d'), - 'name_of_meeting_following_jurisdiction_name_entry_element': value.get( - 'q' - ), - 'number_of_part_section_meeting': utils.force_list(value.get('n')), - 'meeting_name_or_jurisdiction_name_as_entry_element': value.get('a'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'form_subheading': utils.force_list(value.get('k')), - 'title_of_a_work': value.get('t'), - 'subordinate_unit': utils.force_list(value.get('e')), - 'language_of_a_work': value.get('l'), - 'location_of_meeting': value.get('c'), - 'miscellaneous_information': value.get('g'), - 'date_of_a_work': value.get('f'), - 'international_standard_serial_number': value.get('x'), - 'volume_sequential_designation': value.get('v'), - 'type_of_meeting_name_entry_element': indicator_map1.get(key[3]), - 'pronoun_represents_main_entry': indicator_map2.get(key[4]), + "__order__": tuple(order) if len(order) else None, + "name_of_part_section_of_a_work": utils.force_list(value.get("p")), + "linkage": value.get("6"), + "affiliation": value.get("u"), + "relator_code": utils.force_list(value.get("4")), + "date_of_meeting": value.get("d"), + "name_of_meeting_following_jurisdiction_name_entry_element": value.get("q"), + "number_of_part_section_meeting": utils.force_list(value.get("n")), + "meeting_name_or_jurisdiction_name_as_entry_element": value.get("a"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "form_subheading": utils.force_list(value.get("k")), + "title_of_a_work": value.get("t"), + "subordinate_unit": utils.force_list(value.get("e")), + "language_of_a_work": value.get("l"), + "location_of_meeting": value.get("c"), + "miscellaneous_information": value.get("g"), + "date_of_a_work": value.get("f"), + "international_standard_serial_number": value.get("x"), + "volume_sequential_designation": value.get("v"), + "type_of_meeting_name_entry_element": indicator_map1.get(key[3]), + "pronoun_represents_main_entry": indicator_map2.get(key[4]), } -@marc21.over('series_statement_added_entry_title', '^440.[06413278_95]') +@marc21.over("series_statement_added_entry_title", "^440.[06413278_95]") @utils.for_each_value @utils.filter_values def series_statement_added_entry_title(self, key, value): """Series Statement/Added Entry-Title.""" indicator_map2 = {str(x): str(x) for x in range(10)} field_map = { - '8': 'field_link_and_sequence_number', - '0': 'authority_record_control_number', - '6': 'linkage', - 'p': 'name_of_part_section_of_a_work', - 'x': 'international_standard_serial_number', - 'w': 'bibliographic_record_control_number', - 'n': 'number_of_part_section_of_a_work', - 'a': 'title', - 'v': 'volume_sequential_designation', + "8": "field_link_and_sequence_number", + "0": "authority_record_control_number", + "6": "linkage", + "p": "name_of_part_section_of_a_work", + "x": "international_standard_serial_number", + "w": "bibliographic_record_control_number", + "n": "number_of_part_section_of_a_work", + "a": "title", + "v": "volume_sequential_designation", } order = utils.map_order(field_map, value) if key[4] in indicator_map2: - order.append('nonfiling_characters') + order.append("nonfiling_characters") return { - '__order__': tuple(order) if len(order) else None, - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'authority_record_control_number': utils.force_list(value.get('0')), - 'linkage': value.get('6'), - 'name_of_part_section_of_a_work': utils.force_list(value.get('p')), - 'international_standard_serial_number': value.get('x'), - 'bibliographic_record_control_number': utils.force_list( - value.get('w') - ), - 'number_of_part_section_of_a_work': utils.force_list(value.get('n')), - 'title': value.get('a'), - 'volume_sequential_designation': value.get('v'), - 'nonfiling_characters': indicator_map2.get(key[4]), + "__order__": tuple(order) if len(order) else None, + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "authority_record_control_number": utils.force_list(value.get("0")), + "linkage": value.get("6"), + "name_of_part_section_of_a_work": utils.force_list(value.get("p")), + "international_standard_serial_number": value.get("x"), + "bibliographic_record_control_number": utils.force_list(value.get("w")), + "number_of_part_section_of_a_work": utils.force_list(value.get("n")), + "title": value.get("a"), + "volume_sequential_designation": value.get("v"), + "nonfiling_characters": indicator_map2.get(key[4]), } -@marc21.over('series_statement', '^490[0_1].') +@marc21.over("series_statement", "^490[0_1].") @utils.for_each_value @utils.filter_values def series_statement(self, key, value): """Series Statement.""" indicator_map1 = {"0": "Series not traced", "1": "Series traced"} field_map = { - '8': 'field_link_and_sequence_number', - '6': 'linkage', - 'l': 'library_of_congress_call_number', - 'x': 'international_standard_serial_number', - '3': 'materials_specified', - 'a': 'series_statement', - 'v': 'volume_sequential_designation', + "8": "field_link_and_sequence_number", + "6": "linkage", + "l": "library_of_congress_call_number", + "x": "international_standard_serial_number", + "3": "materials_specified", + "a": "series_statement", + "v": "volume_sequential_designation", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('series_tracing_policy') + order.append("series_tracing_policy") return { - '__order__': tuple(order) if len(order) else None, - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'linkage': value.get('6'), - 'library_of_congress_call_number': value.get('l'), - 'international_standard_serial_number': utils.force_list( - value.get('x') - ), - 'materials_specified': value.get('3'), - 'series_statement': utils.force_list(value.get('a')), - 'volume_sequential_designation': utils.force_list(value.get('v')), - 'series_tracing_policy': indicator_map1.get(key[3]), + "__order__": tuple(order) if len(order) else None, + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "linkage": value.get("6"), + "library_of_congress_call_number": value.get("l"), + "international_standard_serial_number": utils.force_list(value.get("x")), + "materials_specified": value.get("3"), + "series_statement": utils.force_list(value.get("a")), + "volume_sequential_designation": utils.force_list(value.get("v")), + "series_tracing_policy": indicator_map1.get(key[3]), } diff --git a/rero_ebooks/dojson/marc21/fields/bd5xx.py b/rero_ebooks/dojson/marc21/fields/bd5xx.py index 04038ea..a1f5ca5 100644 --- a/rero_ebooks/dojson/marc21/fields/bd5xx.py +++ b/rero_ebooks/dojson/marc21/fields/bd5xx.py @@ -14,109 +14,109 @@ from ..model import marc21 -@marc21.over('general_note', '^500..') +@marc21.over("general_note", "^500..") @utils.for_each_value @utils.filter_values def general_note(self, key, value): """General Note.""" field_map = { - 'a': 'general_note', - '5': 'institution_to_which_field_applies', - '3': 'materials_specified', - '6': 'linkage', - '8': 'field_link_and_sequence_number', + "a": "general_note", + "5": "institution_to_which_field_applies", + "3": "materials_specified", + "6": "linkage", + "8": "field_link_and_sequence_number", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'general_note': value.get('a'), - 'institution_to_which_field_applies': value.get('5'), - 'materials_specified': value.get('3'), - 'linkage': value.get('6'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), + "__order__": tuple(order) if len(order) else None, + "general_note": value.get("a"), + "institution_to_which_field_applies": value.get("5"), + "materials_specified": value.get("3"), + "linkage": value.get("6"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), } -@marc21.over('with_note', '^501..') +@marc21.over("with_note", "^501..") @utils.for_each_value @utils.filter_values def with_note(self, key, value): """With Note.""" field_map = { - 'a': 'with_note', - '5': 'institution_to_which_field_applies', - '6': 'linkage', - '8': 'field_link_and_sequence_number', + "a": "with_note", + "5": "institution_to_which_field_applies", + "6": "linkage", + "8": "field_link_and_sequence_number", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'with_note': value.get('a'), - 'institution_to_which_field_applies': value.get('5'), - 'linkage': value.get('6'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), + "__order__": tuple(order) if len(order) else None, + "with_note": value.get("a"), + "institution_to_which_field_applies": value.get("5"), + "linkage": value.get("6"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), } -@marc21.over('dissertation_note', '^502..') +@marc21.over("dissertation_note", "^502..") @utils.for_each_value @utils.filter_values def dissertation_note(self, key, value): """Dissertation Note.""" field_map = { - 'a': 'dissertation_note', - 'o': 'dissertation_identifier', - '6': 'linkage', - 'g': 'miscellaneous_information', - 'c': 'name_of_granting_institution', - '8': 'field_link_and_sequence_number', - 'b': 'degree_type', - 'd': 'year_degree_granted', + "a": "dissertation_note", + "o": "dissertation_identifier", + "6": "linkage", + "g": "miscellaneous_information", + "c": "name_of_granting_institution", + "8": "field_link_and_sequence_number", + "b": "degree_type", + "d": "year_degree_granted", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'dissertation_note': value.get('a'), - 'dissertation_identifier': utils.force_list(value.get('o')), - 'linkage': value.get('6'), - 'miscellaneous_information': utils.force_list(value.get('g')), - 'name_of_granting_institution': value.get('c'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'degree_type': value.get('b'), - 'year_degree_granted': value.get('d'), + "__order__": tuple(order) if len(order) else None, + "dissertation_note": value.get("a"), + "dissertation_identifier": utils.force_list(value.get("o")), + "linkage": value.get("6"), + "miscellaneous_information": utils.force_list(value.get("g")), + "name_of_granting_institution": value.get("c"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "degree_type": value.get("b"), + "year_degree_granted": value.get("d"), } -@marc21.over('bibliography_note', '^504..') +@marc21.over("bibliography_note", "^504..") @utils.for_each_value @utils.filter_values def bibliography_note(self, key, value): """Bibliography, Etc. Note.""" field_map = { - 'a': 'bibliography_note', - '8': 'field_link_and_sequence_number', - 'b': 'number_of_references', - '6': 'linkage', + "a": "bibliography_note", + "8": "field_link_and_sequence_number", + "b": "number_of_references", + "6": "linkage", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'bibliography_note': value.get('a'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'number_of_references': value.get('b'), - 'linkage': value.get('6'), + "__order__": tuple(order) if len(order) else None, + "bibliography_note": value.get("a"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "number_of_references": value.get("b"), + "linkage": value.get("6"), } -@marc21.over('formatted_contents_note', '^505[0812_][0_]') +@marc21.over("formatted_contents_note", "^505[0812_][0_]") @utils.for_each_value @utils.filter_values def formatted_contents_note(self, key, value): @@ -129,38 +129,38 @@ def formatted_contents_note(self, key, value): } indicator_map2 = {"0": "Enhanced", "_": "Basic"} field_map = { - 'a': 'formatted_contents_note', - 't': 'title', - '6': 'linkage', - 'g': 'miscellaneous_information', - '8': 'field_link_and_sequence_number', - 'u': 'uniform_resource_identifier', - 'r': 'statement_of_responsibility', + "a": "formatted_contents_note", + "t": "title", + "6": "linkage", + "g": "miscellaneous_information", + "8": "field_link_and_sequence_number", + "u": "uniform_resource_identifier", + "r": "statement_of_responsibility", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('display_constant_controller') + order.append("display_constant_controller") if key[4] in indicator_map2: - order.append('level_of_content_designation') + order.append("level_of_content_designation") return { - '__order__': tuple(order) if len(order) else None, - 'formatted_contents_note': value.get('a'), - 'title': utils.force_list(value.get('t')), - 'linkage': value.get('6'), - 'miscellaneous_information': utils.force_list(value.get('g')), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'uniform_resource_identifier': utils.force_list(value.get('u')), - 'statement_of_responsibility': utils.force_list(value.get('r')), - 'display_constant_controller': indicator_map1.get(key[3]), - 'level_of_content_designation': indicator_map2.get(key[4]), + "__order__": tuple(order) if len(order) else None, + "formatted_contents_note": value.get("a"), + "title": utils.force_list(value.get("t")), + "linkage": value.get("6"), + "miscellaneous_information": utils.force_list(value.get("g")), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "uniform_resource_identifier": utils.force_list(value.get("u")), + "statement_of_responsibility": utils.force_list(value.get("r")), + "display_constant_controller": indicator_map1.get(key[3]), + "level_of_content_designation": indicator_map2.get(key[4]), } -@marc21.over('restrictions_on_access_note', '^506[01_].') +@marc21.over("restrictions_on_access_note", "^506[01_].") @utils.for_each_value @utils.filter_values def restrictions_on_access_note(self, key, value): @@ -171,89 +171,89 @@ def restrictions_on_access_note(self, key, value): "_": "No information provided", } field_map = { - 'a': 'terms_governing_access', - 'u': 'uniform_resource_identifier', - '2': 'source_of_term', - 'e': 'authorization', - '5': 'institution_to_which_field_applies', - 'c': 'physical_access_provisions', - 'f': 'standardized_terminology_for_access_restriction', - '6': 'linkage', - '8': 'field_link_and_sequence_number', - '3': 'materials_specified', - 'b': 'jurisdiction', - 'd': 'authorized_users', + "a": "terms_governing_access", + "u": "uniform_resource_identifier", + "2": "source_of_term", + "e": "authorization", + "5": "institution_to_which_field_applies", + "c": "physical_access_provisions", + "f": "standardized_terminology_for_access_restriction", + "6": "linkage", + "8": "field_link_and_sequence_number", + "3": "materials_specified", + "b": "jurisdiction", + "d": "authorized_users", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('restriction') + order.append("restriction") return { - '__order__': tuple(order) if len(order) else None, - 'terms_governing_access': value.get('a'), - 'uniform_resource_identifier': utils.force_list(value.get('u')), - 'source_of_term': value.get('2'), - 'authorization': utils.force_list(value.get('e')), - 'institution_to_which_field_applies': value.get('5'), - 'physical_access_provisions': utils.force_list(value.get('c')), - 'standardized_terminology_for_access_restriction': utils.force_list( - value.get('f') + "__order__": tuple(order) if len(order) else None, + "terms_governing_access": value.get("a"), + "uniform_resource_identifier": utils.force_list(value.get("u")), + "source_of_term": value.get("2"), + "authorization": utils.force_list(value.get("e")), + "institution_to_which_field_applies": value.get("5"), + "physical_access_provisions": utils.force_list(value.get("c")), + "standardized_terminology_for_access_restriction": utils.force_list( + value.get("f") ), - 'linkage': value.get('6'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'materials_specified': value.get('3'), - 'jurisdiction': utils.force_list(value.get('b')), - 'authorized_users': utils.force_list(value.get('d')), - 'restriction': indicator_map1.get(key[3]), + "linkage": value.get("6"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "materials_specified": value.get("3"), + "jurisdiction": utils.force_list(value.get("b")), + "authorized_users": utils.force_list(value.get("d")), + "restriction": indicator_map1.get(key[3]), } -@marc21.over('scale_note_for_graphic_material', '^507..') +@marc21.over("scale_note_for_graphic_material", "^507..") @utils.filter_values def scale_note_for_graphic_material(self, key, value): """Scale Note for Graphic Material.""" field_map = { - 'a': 'representative_fraction_of_scale_note', - '8': 'field_link_and_sequence_number', - 'b': 'remainder_of_scale_note', - '6': 'linkage', + "a": "representative_fraction_of_scale_note", + "8": "field_link_and_sequence_number", + "b": "remainder_of_scale_note", + "6": "linkage", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'representative_fraction_of_scale_note': value.get('a'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'remainder_of_scale_note': value.get('b'), - 'linkage': value.get('6'), + "__order__": tuple(order) if len(order) else None, + "representative_fraction_of_scale_note": value.get("a"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "remainder_of_scale_note": value.get("b"), + "linkage": value.get("6"), } -@marc21.over('creation_production_credits_note', '^508..') +@marc21.over("creation_production_credits_note", "^508..") @utils.for_each_value @utils.filter_values def creation_production_credits_note(self, key, value): """Creation/Production Credits Note.""" field_map = { - 'a': 'creation_production_credits_note', - '8': 'field_link_and_sequence_number', - '6': 'linkage', + "a": "creation_production_credits_note", + "8": "field_link_and_sequence_number", + "6": "linkage", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'creation_production_credits_note': value.get('a'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'linkage': value.get('6'), + "__order__": tuple(order) if len(order) else None, + "creation_production_credits_note": value.get("a"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "linkage": value.get("6"), } -@marc21.over('citation_references_note', '^510[04231_].') +@marc21.over("citation_references_note", "^510[04231_].") @utils.for_each_value @utils.filter_values def citation_references_note(self, key, value): @@ -266,156 +266,152 @@ def citation_references_note(self, key, value): "4": "Location in source given", } field_map = { - 'a': 'name_of_source', - 'x': 'international_standard_serial_number', - '3': 'materials_specified', - '6': 'linkage', - 'c': 'location_within_source', - '8': 'field_link_and_sequence_number', - 'b': 'coverage_of_source', - 'u': 'uniform_resource_identifier', + "a": "name_of_source", + "x": "international_standard_serial_number", + "3": "materials_specified", + "6": "linkage", + "c": "location_within_source", + "8": "field_link_and_sequence_number", + "b": "coverage_of_source", + "u": "uniform_resource_identifier", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('coverage_location_in_source') + order.append("coverage_location_in_source") return { - '__order__': tuple(order) if len(order) else None, - 'name_of_source': value.get('a'), - 'international_standard_serial_number': value.get('x'), - 'materials_specified': value.get('3'), - 'linkage': value.get('6'), - 'location_within_source': value.get('c'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'coverage_of_source': value.get('b'), - 'uniform_resource_identifier': utils.force_list(value.get('u')), - 'coverage_location_in_source': indicator_map1.get(key[3]), + "__order__": tuple(order) if len(order) else None, + "name_of_source": value.get("a"), + "international_standard_serial_number": value.get("x"), + "materials_specified": value.get("3"), + "linkage": value.get("6"), + "location_within_source": value.get("c"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "coverage_of_source": value.get("b"), + "uniform_resource_identifier": utils.force_list(value.get("u")), + "coverage_location_in_source": indicator_map1.get(key[3]), } -@marc21.over('participant_or_performer_note', '^511[01_].') +@marc21.over("participant_or_performer_note", "^511[01_].") @utils.for_each_value @utils.filter_values def participant_or_performer_note(self, key, value): """Participant or Performer Note.""" indicator_map1 = {"0": "No display constant generated", "1": "Cast"} field_map = { - 'a': 'participant_or_performer_note', - '8': 'field_link_and_sequence_number', - '6': 'linkage', + "a": "participant_or_performer_note", + "8": "field_link_and_sequence_number", + "6": "linkage", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('display_constant_controller') + order.append("display_constant_controller") return { - '__order__': tuple(order) if len(order) else None, - 'participant_or_performer_note': value.get('a'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'linkage': value.get('6'), - 'display_constant_controller': indicator_map1.get(key[3]), + "__order__": tuple(order) if len(order) else None, + "participant_or_performer_note": value.get("a"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "linkage": value.get("6"), + "display_constant_controller": indicator_map1.get(key[3]), } -@marc21.over('type_of_report_and_period_covered_note', '^513..') +@marc21.over("type_of_report_and_period_covered_note", "^513..") @utils.for_each_value @utils.filter_values def type_of_report_and_period_covered_note(self, key, value): """Type of Report and Period Covered Note.""" field_map = { - 'a': 'type_of_report', - '8': 'field_link_and_sequence_number', - 'b': 'period_covered', - '6': 'linkage', + "a": "type_of_report", + "8": "field_link_and_sequence_number", + "b": "period_covered", + "6": "linkage", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'type_of_report': value.get('a'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'period_covered': value.get('b'), - 'linkage': value.get('6'), + "__order__": tuple(order) if len(order) else None, + "type_of_report": value.get("a"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "period_covered": value.get("b"), + "linkage": value.get("6"), } -@marc21.over('data_quality_note', '^514..') +@marc21.over("data_quality_note", "^514..") @utils.filter_values def data_quality_note(self, key, value): """Data Quality Note.""" field_map = { - 'a': 'attribute_accuracy_report', - 'z': 'display_note', - 'u': 'uniform_resource_identifier', - 'm': 'cloud_cover', - 'g': 'horizontal_position_accuracy_value', - 'e': 'completeness_report', - '8': 'field_link_and_sequence_number', - 'i': 'vertical_positional_accuracy_report', - 'c': 'attribute_accuracy_explanation', - 'f': 'horizontal_position_accuracy_report', - '6': 'linkage', - 'b': 'attribute_accuracy_value', - 'd': 'logical_consistency_report', - 'h': 'horizontal_position_accuracy_explanation', - 'j': 'vertical_positional_accuracy_value', - 'k': 'vertical_positional_accuracy_explanation', + "a": "attribute_accuracy_report", + "z": "display_note", + "u": "uniform_resource_identifier", + "m": "cloud_cover", + "g": "horizontal_position_accuracy_value", + "e": "completeness_report", + "8": "field_link_and_sequence_number", + "i": "vertical_positional_accuracy_report", + "c": "attribute_accuracy_explanation", + "f": "horizontal_position_accuracy_report", + "6": "linkage", + "b": "attribute_accuracy_value", + "d": "logical_consistency_report", + "h": "horizontal_position_accuracy_explanation", + "j": "vertical_positional_accuracy_value", + "k": "vertical_positional_accuracy_explanation", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'attribute_accuracy_report': value.get('a'), - 'display_note': utils.force_list(value.get('z')), - 'uniform_resource_identifier': utils.force_list(value.get('u')), - 'cloud_cover': value.get('m'), - 'horizontal_position_accuracy_value': utils.force_list(value.get('g')), - 'completeness_report': value.get('e'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'vertical_positional_accuracy_report': value.get('i'), - 'attribute_accuracy_explanation': utils.force_list(value.get('c')), - 'horizontal_position_accuracy_report': value.get('f'), - 'linkage': value.get('6'), - 'attribute_accuracy_value': utils.force_list(value.get('b')), - 'logical_consistency_report': value.get('d'), - 'horizontal_position_accuracy_explanation': utils.force_list( - value.get('h') - ), - 'vertical_positional_accuracy_value': utils.force_list(value.get('j')), - 'vertical_positional_accuracy_explanation': utils.force_list( - value.get('k') - ), - } - - -@marc21.over('numbering_peculiarities_note', '^515..') + "__order__": tuple(order) if len(order) else None, + "attribute_accuracy_report": value.get("a"), + "display_note": utils.force_list(value.get("z")), + "uniform_resource_identifier": utils.force_list(value.get("u")), + "cloud_cover": value.get("m"), + "horizontal_position_accuracy_value": utils.force_list(value.get("g")), + "completeness_report": value.get("e"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "vertical_positional_accuracy_report": value.get("i"), + "attribute_accuracy_explanation": utils.force_list(value.get("c")), + "horizontal_position_accuracy_report": value.get("f"), + "linkage": value.get("6"), + "attribute_accuracy_value": utils.force_list(value.get("b")), + "logical_consistency_report": value.get("d"), + "horizontal_position_accuracy_explanation": utils.force_list(value.get("h")), + "vertical_positional_accuracy_value": utils.force_list(value.get("j")), + "vertical_positional_accuracy_explanation": utils.force_list(value.get("k")), + } + + +@marc21.over("numbering_peculiarities_note", "^515..") @utils.for_each_value @utils.filter_values def numbering_peculiarities_note(self, key, value): """Numbering Peculiarities Note.""" field_map = { - 'a': 'numbering_peculiarities_note', - '8': 'field_link_and_sequence_number', - '6': 'linkage', + "a": "numbering_peculiarities_note", + "8": "field_link_and_sequence_number", + "6": "linkage", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'numbering_peculiarities_note': value.get('a'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'linkage': value.get('6'), + "__order__": tuple(order) if len(order) else None, + "numbering_peculiarities_note": value.get("a"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "linkage": value.get("6"), } -@marc21.over('type_of_computer_file_or_data_note', '^516[8_].') +@marc21.over("type_of_computer_file_or_data_note", "^516[8_].") @utils.for_each_value @utils.filter_values def type_of_computer_file_or_data_note(self, key, value): @@ -425,59 +421,59 @@ def type_of_computer_file_or_data_note(self, key, value): "_": "Type of file", } field_map = { - 'a': 'type_of_computer_file_or_data_note', - '8': 'field_link_and_sequence_number', - '6': 'linkage', + "a": "type_of_computer_file_or_data_note", + "8": "field_link_and_sequence_number", + "6": "linkage", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('display_constant_controller') + order.append("display_constant_controller") return { - '__order__': tuple(order) if len(order) else None, - 'type_of_computer_file_or_data_note': value.get('a'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'linkage': value.get('6'), - 'display_constant_controller': indicator_map1.get(key[3]), + "__order__": tuple(order) if len(order) else None, + "type_of_computer_file_or_data_note": value.get("a"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "linkage": value.get("6"), + "display_constant_controller": indicator_map1.get(key[3]), } -@marc21.over('date_time_and_place_of_an_event_note', '^518..') +@marc21.over("date_time_and_place_of_an_event_note", "^518..") @utils.for_each_value @utils.filter_values def date_time_and_place_of_an_event_note(self, key, value): """Date/Time and Place of an Event Note.""" field_map = { - '0': 'record_control_number', - 'a': 'date_time_and_place_of_an_event_note', - 'p': 'place_of_event', - 'o': 'other_event_information', - '3': 'materials_specified', - '6': 'linkage', - '8': 'field_link_and_sequence_number', - '2': 'source_of_term', - 'd': 'date_of_event', + "0": "record_control_number", + "a": "date_time_and_place_of_an_event_note", + "p": "place_of_event", + "o": "other_event_information", + "3": "materials_specified", + "6": "linkage", + "8": "field_link_and_sequence_number", + "2": "source_of_term", + "d": "date_of_event", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'record_control_number': utils.force_list(value.get('0')), - 'date_time_and_place_of_an_event_note': value.get('a'), - 'place_of_event': utils.force_list(value.get('p')), - 'other_event_information': utils.force_list(value.get('o')), - 'materials_specified': value.get('3'), - 'linkage': value.get('6'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'source_of_term': utils.force_list(value.get('2')), - 'date_of_event': utils.force_list(value.get('d')), + "__order__": tuple(order) if len(order) else None, + "record_control_number": utils.force_list(value.get("0")), + "date_time_and_place_of_an_event_note": value.get("a"), + "place_of_event": utils.force_list(value.get("p")), + "other_event_information": utils.force_list(value.get("o")), + "materials_specified": value.get("3"), + "linkage": value.get("6"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "source_of_term": utils.force_list(value.get("2")), + "date_of_event": utils.force_list(value.get("d")), } -@marc21.over('summary', '^520[042381_].') +@marc21.over("summary", "^520[042381_].") @utils.for_each_value @utils.filter_values def summary(self, key, value): @@ -492,36 +488,36 @@ def summary(self, key, value): "_": "Summary", } field_map = { - 'a': 'summary', - '3': 'materials_specified', - '6': 'linkage', - '8': 'field_link_and_sequence_number', - 'c': 'assigning_source', - '2': 'source', - 'b': 'expansion_of_summary_note', - 'u': 'uniform_resource_identifier', + "a": "summary", + "3": "materials_specified", + "6": "linkage", + "8": "field_link_and_sequence_number", + "c": "assigning_source", + "2": "source", + "b": "expansion_of_summary_note", + "u": "uniform_resource_identifier", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('display_constant_controller') + order.append("display_constant_controller") return { - '__order__': tuple(order) if len(order) else None, - 'summary': value.get('a'), - 'materials_specified': value.get('3'), - 'linkage': value.get('6'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'assigning_source': value.get('c'), - 'source': value.get('2'), - 'expansion_of_summary_note': value.get('b'), - 'uniform_resource_identifier': utils.force_list(value.get('u')), - 'display_constant_controller': indicator_map1.get(key[3]), + "__order__": tuple(order) if len(order) else None, + "summary": value.get("a"), + "materials_specified": value.get("3"), + "linkage": value.get("6"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "assigning_source": value.get("c"), + "source": value.get("2"), + "expansion_of_summary_note": value.get("b"), + "uniform_resource_identifier": utils.force_list(value.get("u")), + "display_constant_controller": indicator_map1.get(key[3]), } -@marc21.over('target_audience_note', '^521[042381_].') +@marc21.over("target_audience_note", "^521[042381_].") @utils.for_each_value @utils.filter_values def target_audience_note(self, key, value): @@ -536,30 +532,30 @@ def target_audience_note(self, key, value): "_": "Audience", } field_map = { - 'a': 'target_audience_note', - '8': 'field_link_and_sequence_number', - 'b': 'source', - '3': 'materials_specified', - '6': 'linkage', + "a": "target_audience_note", + "8": "field_link_and_sequence_number", + "b": "source", + "3": "materials_specified", + "6": "linkage", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('display_constant_controller') + order.append("display_constant_controller") return { - '__order__': tuple(order) if len(order) else None, - 'target_audience_note': utils.force_list(value.get('a')), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'source': value.get('b'), - 'materials_specified': value.get('3'), - 'linkage': value.get('6'), - 'display_constant_controller': indicator_map1.get(key[3]), + "__order__": tuple(order) if len(order) else None, + "target_audience_note": utils.force_list(value.get("a")), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "source": value.get("b"), + "materials_specified": value.get("3"), + "linkage": value.get("6"), + "display_constant_controller": indicator_map1.get(key[3]), } -@marc21.over('geographic_coverage_note', '^522[8_].') +@marc21.over("geographic_coverage_note", "^522[8_].") @utils.for_each_value @utils.filter_values def geographic_coverage_note(self, key, value): @@ -569,77 +565,77 @@ def geographic_coverage_note(self, key, value): "_": "Geographic coverage", } field_map = { - 'a': 'geographic_coverage_note', - '8': 'field_link_and_sequence_number', - '6': 'linkage', + "a": "geographic_coverage_note", + "8": "field_link_and_sequence_number", + "6": "linkage", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('display_constant_controller') + order.append("display_constant_controller") return { - '__order__': tuple(order) if len(order) else None, - 'geographic_coverage_note': value.get('a'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'linkage': value.get('6'), - 'display_constant_controller': indicator_map1.get(key[3]), + "__order__": tuple(order) if len(order) else None, + "geographic_coverage_note": value.get("a"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "linkage": value.get("6"), + "display_constant_controller": indicator_map1.get(key[3]), } -@marc21.over('preferred_citation_of_described_materials_note', '^524[8_].') +@marc21.over("preferred_citation_of_described_materials_note", "^524[8_].") @utils.for_each_value @utils.filter_values def preferred_citation_of_described_materials_note(self, key, value): """Preferred Citation of Described Materials Note.""" indicator_map1 = {"8": "No display constant generated", "_": "Cite as"} field_map = { - 'a': 'preferred_citation_of_described_materials_note', - '3': 'materials_specified', - '2': 'source_of_schema_used', - '6': 'linkage', - '8': 'field_link_and_sequence_number', + "a": "preferred_citation_of_described_materials_note", + "3": "materials_specified", + "2": "source_of_schema_used", + "6": "linkage", + "8": "field_link_and_sequence_number", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('display_constant_controller') + order.append("display_constant_controller") return { - '__order__': tuple(order) if len(order) else None, - 'preferred_citation_of_described_materials_note': value.get('a'), - 'materials_specified': value.get('3'), - 'source_of_schema_used': value.get('2'), - 'linkage': value.get('6'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'display_constant_controller': indicator_map1.get(key[3]), + "__order__": tuple(order) if len(order) else None, + "preferred_citation_of_described_materials_note": value.get("a"), + "materials_specified": value.get("3"), + "source_of_schema_used": value.get("2"), + "linkage": value.get("6"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "display_constant_controller": indicator_map1.get(key[3]), } -@marc21.over('supplement_note', '^525..') +@marc21.over("supplement_note", "^525..") @utils.for_each_value @utils.filter_values def supplement_note(self, key, value): """Supplement Note.""" field_map = { - 'a': 'supplement_note', - '8': 'field_link_and_sequence_number', - '6': 'linkage', + "a": "supplement_note", + "8": "field_link_and_sequence_number", + "6": "linkage", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'supplement_note': value.get('a'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'linkage': value.get('6'), + "__order__": tuple(order) if len(order) else None, + "supplement_note": value.get("a"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "linkage": value.get("6"), } -@marc21.over('study_program_information_note', '^526[08_].') +@marc21.over("study_program_information_note", "^526[08_].") @utils.for_each_value @utils.filter_values def study_program_information_note(self, key, value): @@ -649,299 +645,296 @@ def study_program_information_note(self, key, value): "8": "No display constant generated", } field_map = { - 'a': 'program_name', - 'z': 'public_note', - 'x': 'nonpublic_note', - '6': 'linkage', - '8': 'field_link_and_sequence_number', - 'c': 'reading_level', - '5': 'institution_to_which_field_applies', - 'b': 'interest_level', - 'd': 'title_point_value', - 'i': 'display_text', + "a": "program_name", + "z": "public_note", + "x": "nonpublic_note", + "6": "linkage", + "8": "field_link_and_sequence_number", + "c": "reading_level", + "5": "institution_to_which_field_applies", + "b": "interest_level", + "d": "title_point_value", + "i": "display_text", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('display_constant_controller') + order.append("display_constant_controller") return { - '__order__': tuple(order) if len(order) else None, - 'program_name': value.get('a'), - 'public_note': utils.force_list(value.get('z')), - 'nonpublic_note': utils.force_list(value.get('x')), - 'linkage': value.get('6'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'reading_level': value.get('c'), - 'institution_to_which_field_applies': value.get('5'), - 'interest_level': value.get('b'), - 'title_point_value': value.get('d'), - 'display_text': value.get('i'), - 'display_constant_controller': indicator_map1.get(key[3]), - } - - -@marc21.over('additional_physical_form_available_note', '^530..') + "__order__": tuple(order) if len(order) else None, + "program_name": value.get("a"), + "public_note": utils.force_list(value.get("z")), + "nonpublic_note": utils.force_list(value.get("x")), + "linkage": value.get("6"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "reading_level": value.get("c"), + "institution_to_which_field_applies": value.get("5"), + "interest_level": value.get("b"), + "title_point_value": value.get("d"), + "display_text": value.get("i"), + "display_constant_controller": indicator_map1.get(key[3]), + } + + +@marc21.over("additional_physical_form_available_note", "^530..") @utils.for_each_value @utils.filter_values def additional_physical_form_available_note(self, key, value): """Additional Physical Form Available Note.""" field_map = { - 'a': 'additional_physical_form_available_note', - 'u': 'uniform_resource_identifier', - '3': 'materials_specified', - '6': 'linkage', - 'c': 'availability_conditions', - '8': 'field_link_and_sequence_number', - 'b': 'availability_source', - 'd': 'order_number', + "a": "additional_physical_form_available_note", + "u": "uniform_resource_identifier", + "3": "materials_specified", + "6": "linkage", + "c": "availability_conditions", + "8": "field_link_and_sequence_number", + "b": "availability_source", + "d": "order_number", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'additional_physical_form_available_note': value.get('a'), - 'uniform_resource_identifier': utils.force_list(value.get('u')), - 'materials_specified': value.get('3'), - 'linkage': value.get('6'), - 'availability_conditions': value.get('c'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'availability_source': value.get('b'), - 'order_number': value.get('d'), + "__order__": tuple(order) if len(order) else None, + "additional_physical_form_available_note": value.get("a"), + "uniform_resource_identifier": utils.force_list(value.get("u")), + "materials_specified": value.get("3"), + "linkage": value.get("6"), + "availability_conditions": value.get("c"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "availability_source": value.get("b"), + "order_number": value.get("d"), } -@marc21.over('reproduction_note', '^533..') +@marc21.over("reproduction_note", "^533..") @utils.for_each_value @utils.filter_values def reproduction_note(self, key, value): """Reproduction Note.""" field_map = { - 'a': 'type_of_reproduction', - '3': 'materials_specified', - 'e': 'physical_description_of_reproduction', - '8': 'field_link_and_sequence_number', - '7': 'fixed_length_data_elements_of_reproduction', - 'n': 'note_about_reproduction', - 'c': 'agency_responsible_for_reproduction', - 'f': 'series_statement_of_reproduction', - '6': 'linkage', - '5': 'institution_to_which_field_applies', - 'm': 'dates_and_or_sequential_designation_of_issues_reproduced', - 'b': 'place_of_reproduction', - 'd': 'date_of_reproduction', + "a": "type_of_reproduction", + "3": "materials_specified", + "e": "physical_description_of_reproduction", + "8": "field_link_and_sequence_number", + "7": "fixed_length_data_elements_of_reproduction", + "n": "note_about_reproduction", + "c": "agency_responsible_for_reproduction", + "f": "series_statement_of_reproduction", + "6": "linkage", + "5": "institution_to_which_field_applies", + "m": "dates_and_or_sequential_designation_of_issues_reproduced", + "b": "place_of_reproduction", + "d": "date_of_reproduction", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'type_of_reproduction': value.get('a'), - 'materials_specified': value.get('3'), - 'physical_description_of_reproduction': value.get('e'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'fixed_length_data_elements_of_reproduction': value.get('7'), - 'note_about_reproduction': utils.force_list(value.get('n')), - 'agency_responsible_for_reproduction': utils.force_list( - value.get('c') + "__order__": tuple(order) if len(order) else None, + "type_of_reproduction": value.get("a"), + "materials_specified": value.get("3"), + "physical_description_of_reproduction": value.get("e"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "fixed_length_data_elements_of_reproduction": value.get("7"), + "note_about_reproduction": utils.force_list(value.get("n")), + "agency_responsible_for_reproduction": utils.force_list(value.get("c")), + "series_statement_of_reproduction": utils.force_list(value.get("f")), + "linkage": value.get("6"), + "institution_to_which_field_applies": value.get("5"), + "dates_and_or_sequential_designation_of_issues_reproduced": utils.force_list( + value.get("m") ), - 'series_statement_of_reproduction': utils.force_list(value.get('f')), - 'linkage': value.get('6'), - 'institution_to_which_field_applies': value.get('5'), - 'dates_and_or_sequential_designation_of_issues_reproduced': - utils.force_list(value.get('m')), - 'place_of_reproduction': utils.force_list(value.get('b')), - 'date_of_reproduction': value.get('d'), + "place_of_reproduction": utils.force_list(value.get("b")), + "date_of_reproduction": value.get("d"), } -@marc21.over('original_version_note', '^534..') +@marc21.over("original_version_note", "^534..") @utils.for_each_value @utils.filter_values def original_version_note(self, key, value): """Original Version Note.""" field_map = { - 'a': 'main_entry_of_original', - 'l': 'location_of_original', - 'p': 'introductory_phrase', - 'o': 'other_resource_identifier', - '3': 'materials_specified', - 'x': 'international_standard_serial_number', - 'e': 'physical_description_of_original', - '8': 'field_link_and_sequence_number', - 'n': 'note_about_original', - 't': 'title_statement_of_original', - 'c': 'publication_distribution_of_original', - 'f': 'series_statement_of_original', - '6': 'linkage', - 'z': 'international_standard_book_number', - 'm': 'material_specific_details', - 'b': 'edition_statement_of_original', - 'k': 'key_title_of_original', + "a": "main_entry_of_original", + "l": "location_of_original", + "p": "introductory_phrase", + "o": "other_resource_identifier", + "3": "materials_specified", + "x": "international_standard_serial_number", + "e": "physical_description_of_original", + "8": "field_link_and_sequence_number", + "n": "note_about_original", + "t": "title_statement_of_original", + "c": "publication_distribution_of_original", + "f": "series_statement_of_original", + "6": "linkage", + "z": "international_standard_book_number", + "m": "material_specific_details", + "b": "edition_statement_of_original", + "k": "key_title_of_original", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'main_entry_of_original': value.get('a'), - 'location_of_original': value.get('l'), - 'introductory_phrase': value.get('p'), - 'other_resource_identifier': utils.force_list(value.get('o')), - 'materials_specified': value.get('3'), - 'international_standard_serial_number': utils.force_list( - value.get('x') - ), - 'physical_description_of_original': value.get('e'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'note_about_original': utils.force_list(value.get('n')), - 'title_statement_of_original': value.get('t'), - 'publication_distribution_of_original': value.get('c'), - 'series_statement_of_original': utils.force_list(value.get('f')), - 'linkage': value.get('6'), - 'international_standard_book_number': utils.force_list(value.get('z')), - 'material_specific_details': value.get('m'), - 'edition_statement_of_original': value.get('b'), - 'key_title_of_original': utils.force_list(value.get('k')), - } - - -@marc21.over('location_of_originals_duplicates_note', '^535[12_].') + "__order__": tuple(order) if len(order) else None, + "main_entry_of_original": value.get("a"), + "location_of_original": value.get("l"), + "introductory_phrase": value.get("p"), + "other_resource_identifier": utils.force_list(value.get("o")), + "materials_specified": value.get("3"), + "international_standard_serial_number": utils.force_list(value.get("x")), + "physical_description_of_original": value.get("e"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "note_about_original": utils.force_list(value.get("n")), + "title_statement_of_original": value.get("t"), + "publication_distribution_of_original": value.get("c"), + "series_statement_of_original": utils.force_list(value.get("f")), + "linkage": value.get("6"), + "international_standard_book_number": utils.force_list(value.get("z")), + "material_specific_details": value.get("m"), + "edition_statement_of_original": value.get("b"), + "key_title_of_original": utils.force_list(value.get("k")), + } + + +@marc21.over("location_of_originals_duplicates_note", "^535[12_].") @utils.for_each_value @utils.filter_values def location_of_originals_duplicates_note(self, key, value): """Location of Originals/Duplicates Note.""" indicator_map1 = {"1": "Holder of originals", "2": "Holder of duplicates"} field_map = { - 'a': 'custodian', - '3': 'materials_specified', - '6': 'linkage', - 'g': 'repository_location_code', - 'c': 'country', - '8': 'field_link_and_sequence_number', - 'b': 'postal_address', - 'd': 'telecommunications_address', + "a": "custodian", + "3": "materials_specified", + "6": "linkage", + "g": "repository_location_code", + "c": "country", + "8": "field_link_and_sequence_number", + "b": "postal_address", + "d": "telecommunications_address", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('custodial_role') + order.append("custodial_role") return { - '__order__': tuple(order) if len(order) else None, - 'custodian': value.get('a'), - 'materials_specified': value.get('3'), - 'linkage': value.get('6'), - 'repository_location_code': value.get('g'), - 'country': utils.force_list(value.get('c')), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'postal_address': utils.force_list(value.get('b')), - 'telecommunications_address': utils.force_list(value.get('d')), - 'custodial_role': indicator_map1.get(key[3]), + "__order__": tuple(order) if len(order) else None, + "custodian": value.get("a"), + "materials_specified": value.get("3"), + "linkage": value.get("6"), + "repository_location_code": value.get("g"), + "country": utils.force_list(value.get("c")), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "postal_address": utils.force_list(value.get("b")), + "telecommunications_address": utils.force_list(value.get("d")), + "custodial_role": indicator_map1.get(key[3]), } -@marc21.over('funding_information_note', '^536..') +@marc21.over("funding_information_note", "^536..") @utils.for_each_value @utils.filter_values def funding_information_note(self, key, value): """Funding Information Note.""" field_map = { - 'a': 'text_of_note', - 'e': 'program_element_number', - 'f': 'project_number', - '6': 'linkage', - 'g': 'task_number', - 'c': 'grant_number', - '8': 'field_link_and_sequence_number', - 'b': 'contract_number', - 'd': 'undifferentiated_number', - 'h': 'work_unit_number', + "a": "text_of_note", + "e": "program_element_number", + "f": "project_number", + "6": "linkage", + "g": "task_number", + "c": "grant_number", + "8": "field_link_and_sequence_number", + "b": "contract_number", + "d": "undifferentiated_number", + "h": "work_unit_number", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'text_of_note': value.get('a'), - 'program_element_number': utils.force_list(value.get('e')), - 'project_number': utils.force_list(value.get('f')), - 'linkage': value.get('6'), - 'task_number': utils.force_list(value.get('g')), - 'grant_number': utils.force_list(value.get('c')), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'contract_number': utils.force_list(value.get('b')), - 'undifferentiated_number': utils.force_list(value.get('d')), - 'work_unit_number': utils.force_list(value.get('h')), + "__order__": tuple(order) if len(order) else None, + "text_of_note": value.get("a"), + "program_element_number": utils.force_list(value.get("e")), + "project_number": utils.force_list(value.get("f")), + "linkage": value.get("6"), + "task_number": utils.force_list(value.get("g")), + "grant_number": utils.force_list(value.get("c")), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "contract_number": utils.force_list(value.get("b")), + "undifferentiated_number": utils.force_list(value.get("d")), + "work_unit_number": utils.force_list(value.get("h")), } -@marc21.over('system_details_note', '^538..') +@marc21.over("system_details_note", "^538..") @utils.for_each_value @utils.filter_values def system_details_note(self, key, value): """System Details Note.""" field_map = { - 'a': 'system_details_note', - '3': 'materials_specified', - '6': 'linkage', - '8': 'field_link_and_sequence_number', - '5': 'institution_to_which_field_applies', - 'u': 'uniform_resource_identifier', - 'i': 'display_text', + "a": "system_details_note", + "3": "materials_specified", + "6": "linkage", + "8": "field_link_and_sequence_number", + "5": "institution_to_which_field_applies", + "u": "uniform_resource_identifier", + "i": "display_text", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'system_details_note': value.get('a'), - 'materials_specified': value.get('3'), - 'linkage': value.get('6'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'institution_to_which_field_applies': utils.force_list(value.get('5')), - 'uniform_resource_identifier': utils.force_list(value.get('u')), - 'display_text': value.get('i'), + "__order__": tuple(order) if len(order) else None, + "system_details_note": value.get("a"), + "materials_specified": value.get("3"), + "linkage": value.get("6"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "institution_to_which_field_applies": utils.force_list(value.get("5")), + "uniform_resource_identifier": utils.force_list(value.get("u")), + "display_text": value.get("i"), } -@marc21.over('terms_governing_use_and_reproduction_note', '^540..') +@marc21.over("terms_governing_use_and_reproduction_note", "^540..") @utils.for_each_value @utils.filter_values def terms_governing_use_and_reproduction_note(self, key, value): """Terms Governing Use and Reproduction Note.""" field_map = { - 'a': 'terms_governing_use_and_reproduction', - 'u': 'uniform_resource_identifier', - '3': 'materials_specified', - '6': 'linkage', - '8': 'field_link_and_sequence_number', - 'c': 'authorization', - '5': 'institution_to_which_field_applies', - 'b': 'jurisdiction', - 'd': 'authorized_users', + "a": "terms_governing_use_and_reproduction", + "u": "uniform_resource_identifier", + "3": "materials_specified", + "6": "linkage", + "8": "field_link_and_sequence_number", + "c": "authorization", + "5": "institution_to_which_field_applies", + "b": "jurisdiction", + "d": "authorized_users", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'terms_governing_use_and_reproduction': value.get('a'), - 'uniform_resource_identifier': utils.force_list(value.get('u')), - 'materials_specified': value.get('3'), - 'linkage': value.get('6'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'authorization': value.get('c'), - 'institution_to_which_field_applies': value.get('5'), - 'jurisdiction': value.get('b'), - 'authorized_users': value.get('d'), + "__order__": tuple(order) if len(order) else None, + "terms_governing_use_and_reproduction": value.get("a"), + "uniform_resource_identifier": utils.force_list(value.get("u")), + "materials_specified": value.get("3"), + "linkage": value.get("6"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "authorization": value.get("c"), + "institution_to_which_field_applies": value.get("5"), + "jurisdiction": value.get("b"), + "authorized_users": value.get("d"), } -@marc21.over('immediate_source_of_acquisition_note', '^541[01_].') +@marc21.over("immediate_source_of_acquisition_note", "^541[01_].") @utils.for_each_value @utils.filter_values def immediate_source_of_acquisition_note(self, key, value): @@ -952,46 +945,46 @@ def immediate_source_of_acquisition_note(self, key, value): "_": "No information provided", } field_map = { - 'a': 'source_of_acquisition', - 'o': 'type_of_unit', - '3': 'materials_specified', - 'e': 'accession_number', - '8': 'field_link_and_sequence_number', - 'n': 'extent', - 'c': 'method_of_acquisition', - 'f': 'owner', - '6': 'linkage', - '5': 'institution_to_which_field_applies', - 'b': 'address', - 'd': 'date_of_acquisition', - 'h': 'purchase_price', + "a": "source_of_acquisition", + "o": "type_of_unit", + "3": "materials_specified", + "e": "accession_number", + "8": "field_link_and_sequence_number", + "n": "extent", + "c": "method_of_acquisition", + "f": "owner", + "6": "linkage", + "5": "institution_to_which_field_applies", + "b": "address", + "d": "date_of_acquisition", + "h": "purchase_price", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('privacy') + order.append("privacy") return { - '__order__': tuple(order) if len(order) else None, - 'source_of_acquisition': value.get('a'), - 'type_of_unit': utils.force_list(value.get('o')), - 'materials_specified': value.get('3'), - 'accession_number': value.get('e'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'extent': utils.force_list(value.get('n')), - 'method_of_acquisition': value.get('c'), - 'owner': value.get('f'), - 'linkage': value.get('6'), - 'institution_to_which_field_applies': value.get('5'), - 'address': value.get('b'), - 'date_of_acquisition': value.get('d'), - 'purchase_price': value.get('h'), - 'privacy': indicator_map1.get(key[3]), - } - - -@marc21.over('information_relating_to_copyright_status', '^542[01_].') + "__order__": tuple(order) if len(order) else None, + "source_of_acquisition": value.get("a"), + "type_of_unit": utils.force_list(value.get("o")), + "materials_specified": value.get("3"), + "accession_number": value.get("e"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "extent": utils.force_list(value.get("n")), + "method_of_acquisition": value.get("c"), + "owner": value.get("f"), + "linkage": value.get("6"), + "institution_to_which_field_applies": value.get("5"), + "address": value.get("b"), + "date_of_acquisition": value.get("d"), + "purchase_price": value.get("h"), + "privacy": indicator_map1.get(key[3]), + } + + +@marc21.over("information_relating_to_copyright_status", "^542[01_].") @utils.for_each_value @utils.filter_values def information_relating_to_copyright_status(self, key, value): @@ -1002,68 +995,66 @@ def information_relating_to_copyright_status(self, key, value): "_": "No information provided", } field_map = { - 'a': 'personal_creator', - 'l': 'copyright_status', - 'p': 'country_of_publication_or_creation', - 'o': 'research_date', - '3': 'materials_specified', - 'e': 'copyright_holder_contact_information', - '8': 'field_link_and_sequence_number', - 'q': 'supplying_agency', - 'i': 'publication_date', - 'b': 'personal_creator_death_date', - 'd': 'copyright_holder', - 'r': 'jurisdiction_of_copyright_assessment', - 'h': 'copyright_renewal_date', - 'u': 'uniform_resource_identifier', - 'm': 'publication_status', - 'g': 'copyright_date', - 'n': 'note', - 'c': 'corporate_creator', - 'f': 'copyright_statement', - '6': 'linkage', - 's': 'source_of_information', - 'j': 'creation_date', - 'k': 'publisher', + "a": "personal_creator", + "l": "copyright_status", + "p": "country_of_publication_or_creation", + "o": "research_date", + "3": "materials_specified", + "e": "copyright_holder_contact_information", + "8": "field_link_and_sequence_number", + "q": "supplying_agency", + "i": "publication_date", + "b": "personal_creator_death_date", + "d": "copyright_holder", + "r": "jurisdiction_of_copyright_assessment", + "h": "copyright_renewal_date", + "u": "uniform_resource_identifier", + "m": "publication_status", + "g": "copyright_date", + "n": "note", + "c": "corporate_creator", + "f": "copyright_statement", + "6": "linkage", + "s": "source_of_information", + "j": "creation_date", + "k": "publisher", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('privacy') + order.append("privacy") return { - '__order__': tuple(order) if len(order) else None, - 'personal_creator': value.get('a'), - 'copyright_status': value.get('l'), - 'country_of_publication_or_creation': utils.force_list(value.get('p')), - 'research_date': value.get('o'), - 'materials_specified': value.get('3'), - 'copyright_holder_contact_information': utils.force_list( - value.get('e') - ), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'supplying_agency': value.get('q'), - 'publication_date': value.get('i'), - 'personal_creator_death_date': value.get('b'), - 'copyright_holder': utils.force_list(value.get('d')), - 'jurisdiction_of_copyright_assessment': value.get('r'), - 'copyright_renewal_date': utils.force_list(value.get('h')), - 'uniform_resource_identifier': utils.force_list(value.get('u')), - 'publication_status': value.get('m'), - 'copyright_date': value.get('g'), - 'note': utils.force_list(value.get('n')), - 'corporate_creator': value.get('c'), - 'copyright_statement': utils.force_list(value.get('f')), - 'linkage': value.get('6'), - 'source_of_information': value.get('s'), - 'creation_date': value.get('j'), - 'publisher': utils.force_list(value.get('k')), - 'privacy': indicator_map1.get(key[3]), - } - - -@marc21.over('location_of_other_archival_materials_note', '^544[01_].') + "__order__": tuple(order) if len(order) else None, + "personal_creator": value.get("a"), + "copyright_status": value.get("l"), + "country_of_publication_or_creation": utils.force_list(value.get("p")), + "research_date": value.get("o"), + "materials_specified": value.get("3"), + "copyright_holder_contact_information": utils.force_list(value.get("e")), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "supplying_agency": value.get("q"), + "publication_date": value.get("i"), + "personal_creator_death_date": value.get("b"), + "copyright_holder": utils.force_list(value.get("d")), + "jurisdiction_of_copyright_assessment": value.get("r"), + "copyright_renewal_date": utils.force_list(value.get("h")), + "uniform_resource_identifier": utils.force_list(value.get("u")), + "publication_status": value.get("m"), + "copyright_date": value.get("g"), + "note": utils.force_list(value.get("n")), + "corporate_creator": value.get("c"), + "copyright_statement": utils.force_list(value.get("f")), + "linkage": value.get("6"), + "source_of_information": value.get("s"), + "creation_date": value.get("j"), + "publisher": utils.force_list(value.get("k")), + "privacy": indicator_map1.get(key[3]), + } + + +@marc21.over("location_of_other_archival_materials_note", "^544[01_].") @utils.for_each_value @utils.filter_values def location_of_other_archival_materials_note(self, key, value): @@ -1074,38 +1065,38 @@ def location_of_other_archival_materials_note(self, key, value): "_": "No information provided", } field_map = { - 'a': 'custodian', - 'e': 'provenance', - '3': 'materials_specified', - '6': 'linkage', - 'c': 'country', - '8': 'field_link_and_sequence_number', - 'b': 'address', - 'd': 'title', - 'n': 'note', + "a": "custodian", + "e": "provenance", + "3": "materials_specified", + "6": "linkage", + "c": "country", + "8": "field_link_and_sequence_number", + "b": "address", + "d": "title", + "n": "note", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('relationship') + order.append("relationship") return { - '__order__': tuple(order) if len(order) else None, - 'custodian': utils.force_list(value.get('a')), - 'provenance': utils.force_list(value.get('e')), - 'materials_specified': value.get('3'), - 'linkage': value.get('6'), - 'country': utils.force_list(value.get('c')), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'address': utils.force_list(value.get('b')), - 'title': utils.force_list(value.get('d')), - 'note': utils.force_list(value.get('n')), - 'relationship': indicator_map1.get(key[3]), + "__order__": tuple(order) if len(order) else None, + "custodian": utils.force_list(value.get("a")), + "provenance": utils.force_list(value.get("e")), + "materials_specified": value.get("3"), + "linkage": value.get("6"), + "country": utils.force_list(value.get("c")), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "address": utils.force_list(value.get("b")), + "title": utils.force_list(value.get("d")), + "note": utils.force_list(value.get("n")), + "relationship": indicator_map1.get(key[3]), } -@marc21.over('biographical_or_historical_data', '^545[01_].') +@marc21.over("biographical_or_historical_data", "^545[01_].") @utils.for_each_value @utils.filter_values def biographical_or_historical_data(self, key, value): @@ -1116,156 +1107,154 @@ def biographical_or_historical_data(self, key, value): "_": "No information provided", } field_map = { - 'a': 'biographical_or_historical_data', - '8': 'field_link_and_sequence_number', - 'b': 'expansion', - 'u': 'uniform_resource_identifier', - '6': 'linkage', + "a": "biographical_or_historical_data", + "8": "field_link_and_sequence_number", + "b": "expansion", + "u": "uniform_resource_identifier", + "6": "linkage", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('type_of_data') + order.append("type_of_data") return { - '__order__': tuple(order) if len(order) else None, - 'biographical_or_historical_data': value.get('a'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'expansion': value.get('b'), - 'uniform_resource_identifier': utils.force_list(value.get('u')), - 'linkage': value.get('6'), - 'type_of_data': indicator_map1.get(key[3]), + "__order__": tuple(order) if len(order) else None, + "biographical_or_historical_data": value.get("a"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "expansion": value.get("b"), + "uniform_resource_identifier": utils.force_list(value.get("u")), + "linkage": value.get("6"), + "type_of_data": indicator_map1.get(key[3]), } -@marc21.over('language_note', '^546..') +@marc21.over("language_note", "^546..") @utils.for_each_value @utils.filter_values def language_note(self, key, value): """Language Note.""" field_map = { - 'a': 'language_note', - '8': 'field_link_and_sequence_number', - 'b': 'information_code_or_alphabet', - '3': 'materials_specified', - '6': 'linkage', + "a": "language_note", + "8": "field_link_and_sequence_number", + "b": "information_code_or_alphabet", + "3": "materials_specified", + "6": "linkage", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'language_note': value.get('a'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'information_code_or_alphabet': utils.force_list(value.get('b')), - 'materials_specified': value.get('3'), - 'linkage': value.get('6'), + "__order__": tuple(order) if len(order) else None, + "language_note": value.get("a"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "information_code_or_alphabet": utils.force_list(value.get("b")), + "materials_specified": value.get("3"), + "linkage": value.get("6"), } -@marc21.over('former_title_complexity_note', '^547..') +@marc21.over("former_title_complexity_note", "^547..") @utils.for_each_value @utils.filter_values def former_title_complexity_note(self, key, value): """Former Title Complexity Note.""" field_map = { - 'a': 'former_title_complexity_note', - '8': 'field_link_and_sequence_number', - '6': 'linkage', + "a": "former_title_complexity_note", + "8": "field_link_and_sequence_number", + "6": "linkage", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'former_title_complexity_note': value.get('a'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'linkage': value.get('6'), + "__order__": tuple(order) if len(order) else None, + "former_title_complexity_note": value.get("a"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "linkage": value.get("6"), } -@marc21.over('issuing_body_note', '^550..') +@marc21.over("issuing_body_note", "^550..") @utils.for_each_value @utils.filter_values def issuing_body_note(self, key, value): """Issuing Body Note.""" field_map = { - 'a': 'issuing_body_note', - '8': 'field_link_and_sequence_number', - '6': 'linkage', + "a": "issuing_body_note", + "8": "field_link_and_sequence_number", + "6": "linkage", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'issuing_body_note': value.get('a'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'linkage': value.get('6'), + "__order__": tuple(order) if len(order) else None, + "issuing_body_note": value.get("a"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "linkage": value.get("6"), } -@marc21.over('entity_and_attribute_information_note', '^552..') +@marc21.over("entity_and_attribute_information_note", "^552..") @utils.for_each_value @utils.filter_values def entity_and_attribute_information_note(self, key, value): """Entity and Attribute Information Note.""" field_map = { - 'a': 'entity_type_label', - 'l': 'attribute_value_accuracy', - 'p': 'entity_and_attribute_detail_citation', - 'o': 'entity_and_attribute_overview', - 'm': 'attribute_value_accuracy_explanation', - 'g': 'range_domain_minimum_and_maximum', - 'e': 'enumerated_domain_value', - '8': 'field_link_and_sequence_number', - 'n': 'attribute_measurement_frequency', - 'i': 'unrepresentable_domain', - 'c': 'attribute_label', - 'f': 'enumerated_domain_value_definition_and_source', - '6': 'linkage', - 'z': 'display_note', - 'u': 'uniform_resource_identifier', - 'b': 'entity_type_definition_and_source', - 'd': 'attribute_definition_and_source', - 'h': 'codeset_name_and_source', - 'j': 'attribute_units_of_measurement_and_resolution', - 'k': 'beginning_and_ending_date_of_attribute_values', + "a": "entity_type_label", + "l": "attribute_value_accuracy", + "p": "entity_and_attribute_detail_citation", + "o": "entity_and_attribute_overview", + "m": "attribute_value_accuracy_explanation", + "g": "range_domain_minimum_and_maximum", + "e": "enumerated_domain_value", + "8": "field_link_and_sequence_number", + "n": "attribute_measurement_frequency", + "i": "unrepresentable_domain", + "c": "attribute_label", + "f": "enumerated_domain_value_definition_and_source", + "6": "linkage", + "z": "display_note", + "u": "uniform_resource_identifier", + "b": "entity_type_definition_and_source", + "d": "attribute_definition_and_source", + "h": "codeset_name_and_source", + "j": "attribute_units_of_measurement_and_resolution", + "k": "beginning_and_ending_date_of_attribute_values", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'entity_type_label': value.get('a'), - 'attribute_value_accuracy': value.get('l'), - 'entity_and_attribute_detail_citation': utils.force_list( - value.get('p') - ), - 'entity_and_attribute_overview': utils.force_list(value.get('o')), - 'attribute_value_accuracy_explanation': value.get('m'), - 'range_domain_minimum_and_maximum': value.get('g'), - 'enumerated_domain_value': utils.force_list(value.get('e')), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'attribute_measurement_frequency': value.get('n'), - 'unrepresentable_domain': value.get('i'), - 'attribute_label': value.get('c'), - 'enumerated_domain_value_definition_and_source': utils.force_list( - value.get('f') + "__order__": tuple(order) if len(order) else None, + "entity_type_label": value.get("a"), + "attribute_value_accuracy": value.get("l"), + "entity_and_attribute_detail_citation": utils.force_list(value.get("p")), + "entity_and_attribute_overview": utils.force_list(value.get("o")), + "attribute_value_accuracy_explanation": value.get("m"), + "range_domain_minimum_and_maximum": value.get("g"), + "enumerated_domain_value": utils.force_list(value.get("e")), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "attribute_measurement_frequency": value.get("n"), + "unrepresentable_domain": value.get("i"), + "attribute_label": value.get("c"), + "enumerated_domain_value_definition_and_source": utils.force_list( + value.get("f") ), - 'linkage': value.get('6'), - 'display_note': utils.force_list(value.get('z')), - 'uniform_resource_identifier': utils.force_list(value.get('u')), - 'entity_type_definition_and_source': value.get('b'), - 'attribute_definition_and_source': value.get('d'), - 'codeset_name_and_source': value.get('h'), - 'attribute_units_of_measurement_and_resolution': value.get('j'), - 'beginning_and_ending_date_of_attribute_values': value.get('k'), + "linkage": value.get("6"), + "display_note": utils.force_list(value.get("z")), + "uniform_resource_identifier": utils.force_list(value.get("u")), + "entity_type_definition_and_source": value.get("b"), + "attribute_definition_and_source": value.get("d"), + "codeset_name_and_source": value.get("h"), + "attribute_units_of_measurement_and_resolution": value.get("j"), + "beginning_and_ending_date_of_attribute_values": value.get("k"), } -@marc21.over('cumulative_index_finding_aids_note', '^555[08_].') +@marc21.over("cumulative_index_finding_aids_note", "^555[08_].") @utils.for_each_value @utils.filter_values def cumulative_index_finding_aids_note(self, key, value): @@ -1276,36 +1265,36 @@ def cumulative_index_finding_aids_note(self, key, value): "_": "Indexes", } field_map = { - 'a': 'cumulative_index_finding_aids_note', - 'u': 'uniform_resource_identifier', - '3': 'materials_specified', - '6': 'linkage', - 'c': 'degree_of_control', - '8': 'field_link_and_sequence_number', - 'b': 'availability_source', - 'd': 'bibliographic_reference', + "a": "cumulative_index_finding_aids_note", + "u": "uniform_resource_identifier", + "3": "materials_specified", + "6": "linkage", + "c": "degree_of_control", + "8": "field_link_and_sequence_number", + "b": "availability_source", + "d": "bibliographic_reference", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('display_constant_controller') + order.append("display_constant_controller") return { - '__order__': tuple(order) if len(order) else None, - 'cumulative_index_finding_aids_note': value.get('a'), - 'uniform_resource_identifier': utils.force_list(value.get('u')), - 'materials_specified': value.get('3'), - 'linkage': value.get('6'), - 'degree_of_control': value.get('c'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'availability_source': utils.force_list(value.get('b')), - 'bibliographic_reference': value.get('d'), - 'display_constant_controller': indicator_map1.get(key[3]), + "__order__": tuple(order) if len(order) else None, + "cumulative_index_finding_aids_note": value.get("a"), + "uniform_resource_identifier": utils.force_list(value.get("u")), + "materials_specified": value.get("3"), + "linkage": value.get("6"), + "degree_of_control": value.get("c"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "availability_source": utils.force_list(value.get("b")), + "bibliographic_reference": value.get("d"), + "display_constant_controller": indicator_map1.get(key[3]), } -@marc21.over('information_about_documentation_note', '^556[8_].') +@marc21.over("information_about_documentation_note", "^556[8_].") @utils.for_each_value @utils.filter_values def information_about_documentation_note(self, key, value): @@ -1315,28 +1304,28 @@ def information_about_documentation_note(self, key, value): "_": "Documentation", } field_map = { - 'a': 'information_about_documentation_note', - '8': 'field_link_and_sequence_number', - '6': 'linkage', - 'z': 'international_standard_book_number', + "a": "information_about_documentation_note", + "8": "field_link_and_sequence_number", + "6": "linkage", + "z": "international_standard_book_number", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('display_constant_controller') + order.append("display_constant_controller") return { - '__order__': tuple(order) if len(order) else None, - 'information_about_documentation_note': value.get('a'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'linkage': value.get('6'), - 'international_standard_book_number': utils.force_list(value.get('z')), - 'display_constant_controller': indicator_map1.get(key[3]), + "__order__": tuple(order) if len(order) else None, + "information_about_documentation_note": value.get("a"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "linkage": value.get("6"), + "international_standard_book_number": utils.force_list(value.get("z")), + "display_constant_controller": indicator_map1.get(key[3]), } -@marc21.over('ownership_and_custodial_history', '^561[01_].') +@marc21.over("ownership_and_custodial_history", "^561[01_].") @utils.for_each_value @utils.filter_values def ownership_and_custodial_history(self, key, value): @@ -1347,92 +1336,92 @@ def ownership_and_custodial_history(self, key, value): "_": "No information provided", } field_map = { - 'a': 'history', - '3': 'materials_specified', - '6': 'linkage', - '8': 'field_link_and_sequence_number', - '5': 'institution_to_which_field_applies', - 'u': 'uniform_resource_identifier', + "a": "history", + "3": "materials_specified", + "6": "linkage", + "8": "field_link_and_sequence_number", + "5": "institution_to_which_field_applies", + "u": "uniform_resource_identifier", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('privacy') + order.append("privacy") return { - '__order__': tuple(order) if len(order) else None, - 'history': value.get('a'), - 'materials_specified': value.get('3'), - 'linkage': value.get('6'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'institution_to_which_field_applies': value.get('5'), - 'uniform_resource_identifier': utils.force_list(value.get('u')), - 'privacy': indicator_map1.get(key[3]), + "__order__": tuple(order) if len(order) else None, + "history": value.get("a"), + "materials_specified": value.get("3"), + "linkage": value.get("6"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "institution_to_which_field_applies": value.get("5"), + "uniform_resource_identifier": utils.force_list(value.get("u")), + "privacy": indicator_map1.get(key[3]), } -@marc21.over('copy_and_version_identification_note', '^562..') +@marc21.over("copy_and_version_identification_note", "^562..") @utils.for_each_value @utils.filter_values def copy_and_version_identification_note(self, key, value): """Copy and Version Identification Note.""" field_map = { - 'a': 'identifying_markings', - 'e': 'number_of_copies', - '3': 'materials_specified', - '6': 'linkage', - '8': 'field_link_and_sequence_number', - 'c': 'version_identification', - '5': 'institution_to_which_field_applies', - 'b': 'copy_identification', - 'd': 'presentation_format', + "a": "identifying_markings", + "e": "number_of_copies", + "3": "materials_specified", + "6": "linkage", + "8": "field_link_and_sequence_number", + "c": "version_identification", + "5": "institution_to_which_field_applies", + "b": "copy_identification", + "d": "presentation_format", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'identifying_markings': utils.force_list(value.get('a')), - 'number_of_copies': utils.force_list(value.get('e')), - 'materials_specified': value.get('3'), - 'linkage': value.get('6'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'version_identification': utils.force_list(value.get('c')), - 'institution_to_which_field_applies': value.get('5'), - 'copy_identification': utils.force_list(value.get('b')), - 'presentation_format': utils.force_list(value.get('d')), + "__order__": tuple(order) if len(order) else None, + "identifying_markings": utils.force_list(value.get("a")), + "number_of_copies": utils.force_list(value.get("e")), + "materials_specified": value.get("3"), + "linkage": value.get("6"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "version_identification": utils.force_list(value.get("c")), + "institution_to_which_field_applies": value.get("5"), + "copy_identification": utils.force_list(value.get("b")), + "presentation_format": utils.force_list(value.get("d")), } -@marc21.over('binding_information', '^563..') +@marc21.over("binding_information", "^563..") @utils.for_each_value @utils.filter_values def binding_information(self, key, value): """Binding Information.""" field_map = { - 'a': 'binding_note', - '3': 'materials_specified', - '6': 'linkage', - '8': 'field_link_and_sequence_number', - '5': 'institution_to_which_field_applies', - 'u': 'uniform_resource_identifier', + "a": "binding_note", + "3": "materials_specified", + "6": "linkage", + "8": "field_link_and_sequence_number", + "5": "institution_to_which_field_applies", + "u": "uniform_resource_identifier", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'binding_note': value.get('a'), - 'materials_specified': value.get('3'), - 'linkage': value.get('6'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'institution_to_which_field_applies': value.get('5'), - 'uniform_resource_identifier': utils.force_list(value.get('u')), + "__order__": tuple(order) if len(order) else None, + "binding_note": value.get("a"), + "materials_specified": value.get("3"), + "linkage": value.get("6"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "institution_to_which_field_applies": value.get("5"), + "uniform_resource_identifier": utils.force_list(value.get("u")), } -@marc21.over('case_file_characteristics_note', '^565[08_].') +@marc21.over("case_file_characteristics_note", "^565[08_].") @utils.for_each_value @utils.filter_values def case_file_characteristics_note(self, key, value): @@ -1443,83 +1432,83 @@ def case_file_characteristics_note(self, key, value): "_": "File size", } field_map = { - 'a': 'number_of_cases_variables', - 'e': 'filing_scheme_or_code', - '3': 'materials_specified', - '6': 'linkage', - 'c': 'unit_of_analysis', - '8': 'field_link_and_sequence_number', - 'b': 'name_of_variable', - 'd': 'universe_of_data', + "a": "number_of_cases_variables", + "e": "filing_scheme_or_code", + "3": "materials_specified", + "6": "linkage", + "c": "unit_of_analysis", + "8": "field_link_and_sequence_number", + "b": "name_of_variable", + "d": "universe_of_data", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('display_constant_controller') + order.append("display_constant_controller") return { - '__order__': tuple(order) if len(order) else None, - 'number_of_cases_variables': value.get('a'), - 'filing_scheme_or_code': utils.force_list(value.get('e')), - 'materials_specified': value.get('3'), - 'linkage': value.get('6'), - 'unit_of_analysis': utils.force_list(value.get('c')), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'name_of_variable': utils.force_list(value.get('b')), - 'universe_of_data': utils.force_list(value.get('d')), - 'display_constant_controller': indicator_map1.get(key[3]), + "__order__": tuple(order) if len(order) else None, + "number_of_cases_variables": value.get("a"), + "filing_scheme_or_code": utils.force_list(value.get("e")), + "materials_specified": value.get("3"), + "linkage": value.get("6"), + "unit_of_analysis": utils.force_list(value.get("c")), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "name_of_variable": utils.force_list(value.get("b")), + "universe_of_data": utils.force_list(value.get("d")), + "display_constant_controller": indicator_map1.get(key[3]), } -@marc21.over('methodology_note', '^567[8_].') +@marc21.over("methodology_note", "^567[8_].") @utils.for_each_value @utils.filter_values def methodology_note(self, key, value): """Methodology Note.""" indicator_map1 = {"8": "No display constant generated", "_": "Methodology"} field_map = { - 'a': 'methodology_note', - '8': 'field_link_and_sequence_number', - '6': 'linkage', + "a": "methodology_note", + "8": "field_link_and_sequence_number", + "6": "linkage", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('display_constant_controller') + order.append("display_constant_controller") return { - '__order__': tuple(order) if len(order) else None, - 'methodology_note': value.get('a'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'linkage': value.get('6'), - 'display_constant_controller': indicator_map1.get(key[3]), + "__order__": tuple(order) if len(order) else None, + "methodology_note": value.get("a"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "linkage": value.get("6"), + "display_constant_controller": indicator_map1.get(key[3]), } -@marc21.over('linking_entry_complexity_note', '^580..') +@marc21.over("linking_entry_complexity_note", "^580..") @utils.for_each_value @utils.filter_values def linking_entry_complexity_note(self, key, value): """Linking Entry Complexity Note.""" field_map = { - 'a': 'linking_entry_complexity_note', - '8': 'field_link_and_sequence_number', - '6': 'linkage', + "a": "linking_entry_complexity_note", + "8": "field_link_and_sequence_number", + "6": "linkage", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'linking_entry_complexity_note': value.get('a'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'linkage': value.get('6'), + "__order__": tuple(order) if len(order) else None, + "linking_entry_complexity_note": value.get("a"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "linkage": value.get("6"), } -@marc21.over('publications_about_described_materials_note', '^581[8_].') +@marc21.over("publications_about_described_materials_note", "^581[8_].") @utils.for_each_value @utils.filter_values def publications_about_described_materials_note(self, key, value): @@ -1529,30 +1518,30 @@ def publications_about_described_materials_note(self, key, value): "_": "Publications", } field_map = { - 'a': 'publications_about_described_materials_note', - '8': 'field_link_and_sequence_number', - '3': 'materials_specified', - '6': 'linkage', - 'z': 'international_standard_book_number', + "a": "publications_about_described_materials_note", + "8": "field_link_and_sequence_number", + "3": "materials_specified", + "6": "linkage", + "z": "international_standard_book_number", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('display_constant_controller') + order.append("display_constant_controller") return { - '__order__': tuple(order) if len(order) else None, - 'publications_about_described_materials_note': value.get('a'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'materials_specified': value.get('3'), - 'linkage': value.get('6'), - 'international_standard_book_number': utils.force_list(value.get('z')), - 'display_constant_controller': indicator_map1.get(key[3]), + "__order__": tuple(order) if len(order) else None, + "publications_about_described_materials_note": value.get("a"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "materials_specified": value.get("3"), + "linkage": value.get("6"), + "international_standard_book_number": utils.force_list(value.get("z")), + "display_constant_controller": indicator_map1.get(key[3]), } -@marc21.over('action_note', '^583[01_].') +@marc21.over("action_note", "^583[01_].") @utils.for_each_value @utils.filter_values def action_note(self, key, value): @@ -1563,142 +1552,142 @@ def action_note(self, key, value): "_": "No information provided", } field_map = { - 'a': 'action', - 'l': 'status', - 'z': 'public_note', - 'o': 'type_of_unit', - '2': 'source_of_term', - 'x': 'nonpublic_note', - 'e': 'contingency_for_action', - '5': 'institution_to_which_field_applies', - 'n': 'extent', - 'i': 'method_of_action', - 'c': 'time_date_of_action', - 'f': 'authorization', - '6': 'linkage', - '8': 'field_link_and_sequence_number', - 'u': 'uniform_resource_identifier', - '3': 'materials_specified', - 'b': 'action_identification', - 'd': 'action_interval', - 'h': 'jurisdiction', - 'j': 'site_of_action', - 'k': 'action_agent', + "a": "action", + "l": "status", + "z": "public_note", + "o": "type_of_unit", + "2": "source_of_term", + "x": "nonpublic_note", + "e": "contingency_for_action", + "5": "institution_to_which_field_applies", + "n": "extent", + "i": "method_of_action", + "c": "time_date_of_action", + "f": "authorization", + "6": "linkage", + "8": "field_link_and_sequence_number", + "u": "uniform_resource_identifier", + "3": "materials_specified", + "b": "action_identification", + "d": "action_interval", + "h": "jurisdiction", + "j": "site_of_action", + "k": "action_agent", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('privacy') + order.append("privacy") return { - '__order__': tuple(order) if len(order) else None, - 'action': value.get('a'), - 'status': utils.force_list(value.get('l')), - 'public_note': utils.force_list(value.get('z')), - 'type_of_unit': utils.force_list(value.get('o')), - 'source_of_term': value.get('2'), - 'nonpublic_note': utils.force_list(value.get('x')), - 'contingency_for_action': utils.force_list(value.get('e')), - 'institution_to_which_field_applies': value.get('5'), - 'extent': utils.force_list(value.get('n')), - 'method_of_action': utils.force_list(value.get('i')), - 'time_date_of_action': utils.force_list(value.get('c')), - 'authorization': utils.force_list(value.get('f')), - 'linkage': value.get('6'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'uniform_resource_identifier': utils.force_list(value.get('u')), - 'materials_specified': value.get('3'), - 'action_identification': utils.force_list(value.get('b')), - 'action_interval': utils.force_list(value.get('d')), - 'jurisdiction': utils.force_list(value.get('h')), - 'site_of_action': utils.force_list(value.get('j')), - 'action_agent': utils.force_list(value.get('k')), - 'privacy': indicator_map1.get(key[3]), - } - - -@marc21.over('accumulation_and_frequency_of_use_note', '^584..') + "__order__": tuple(order) if len(order) else None, + "action": value.get("a"), + "status": utils.force_list(value.get("l")), + "public_note": utils.force_list(value.get("z")), + "type_of_unit": utils.force_list(value.get("o")), + "source_of_term": value.get("2"), + "nonpublic_note": utils.force_list(value.get("x")), + "contingency_for_action": utils.force_list(value.get("e")), + "institution_to_which_field_applies": value.get("5"), + "extent": utils.force_list(value.get("n")), + "method_of_action": utils.force_list(value.get("i")), + "time_date_of_action": utils.force_list(value.get("c")), + "authorization": utils.force_list(value.get("f")), + "linkage": value.get("6"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "uniform_resource_identifier": utils.force_list(value.get("u")), + "materials_specified": value.get("3"), + "action_identification": utils.force_list(value.get("b")), + "action_interval": utils.force_list(value.get("d")), + "jurisdiction": utils.force_list(value.get("h")), + "site_of_action": utils.force_list(value.get("j")), + "action_agent": utils.force_list(value.get("k")), + "privacy": indicator_map1.get(key[3]), + } + + +@marc21.over("accumulation_and_frequency_of_use_note", "^584..") @utils.for_each_value @utils.filter_values def accumulation_and_frequency_of_use_note(self, key, value): """Accumulation and Frequency of Use Note.""" field_map = { - 'a': 'accumulation', - '3': 'materials_specified', - '6': 'linkage', - '8': 'field_link_and_sequence_number', - '5': 'institution_to_which_field_applies', - 'b': 'frequency_of_use', + "a": "accumulation", + "3": "materials_specified", + "6": "linkage", + "8": "field_link_and_sequence_number", + "5": "institution_to_which_field_applies", + "b": "frequency_of_use", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'accumulation': utils.force_list(value.get('a')), - 'materials_specified': value.get('3'), - 'linkage': value.get('6'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'institution_to_which_field_applies': value.get('5'), - 'frequency_of_use': utils.force_list(value.get('b')), + "__order__": tuple(order) if len(order) else None, + "accumulation": utils.force_list(value.get("a")), + "materials_specified": value.get("3"), + "linkage": value.get("6"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "institution_to_which_field_applies": value.get("5"), + "frequency_of_use": utils.force_list(value.get("b")), } -@marc21.over('exhibitions_note', '^585..') +@marc21.over("exhibitions_note", "^585..") @utils.for_each_value @utils.filter_values def exhibitions_note(self, key, value): """Exhibitions Note.""" field_map = { - 'a': 'exhibitions_note', - '5': 'institution_to_which_field_applies', - '3': 'materials_specified', - '6': 'linkage', - '8': 'field_link_and_sequence_number', + "a": "exhibitions_note", + "5": "institution_to_which_field_applies", + "3": "materials_specified", + "6": "linkage", + "8": "field_link_and_sequence_number", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'exhibitions_note': value.get('a'), - 'institution_to_which_field_applies': value.get('5'), - 'materials_specified': value.get('3'), - 'linkage': value.get('6'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), + "__order__": tuple(order) if len(order) else None, + "exhibitions_note": value.get("a"), + "institution_to_which_field_applies": value.get("5"), + "materials_specified": value.get("3"), + "linkage": value.get("6"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), } -@marc21.over('awards_note', '^586[8_].') +@marc21.over("awards_note", "^586[8_].") @utils.for_each_value @utils.filter_values def awards_note(self, key, value): """Awards Note.""" indicator_map1 = {"8": "No display constant generated", "_": "Awards"} field_map = { - 'a': 'awards_note', - '8': 'field_link_and_sequence_number', - '3': 'materials_specified', - '6': 'linkage', + "a": "awards_note", + "8": "field_link_and_sequence_number", + "3": "materials_specified", + "6": "linkage", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('display_constant_controller') + order.append("display_constant_controller") return { - '__order__': tuple(order) if len(order) else None, - 'awards_note': value.get('a'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'materials_specified': value.get('3'), - 'linkage': value.get('6'), - 'display_constant_controller': indicator_map1.get(key[3]), + "__order__": tuple(order) if len(order) else None, + "awards_note": value.get("a"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "materials_specified": value.get("3"), + "linkage": value.get("6"), + "display_constant_controller": indicator_map1.get(key[3]), } -@marc21.over('source_of_description_note', '^588[01_].') +@marc21.over("source_of_description_note", "^588[01_].") @utils.for_each_value @utils.filter_values def source_of_description_note(self, key, value): @@ -1709,22 +1698,22 @@ def source_of_description_note(self, key, value): "_": "No information provided", } field_map = { - 'a': 'source_of_description_note', - '5': 'institution_to_which_field_applies', - '6': 'linkage', - '8': 'field_link_and_sequence_number', + "a": "source_of_description_note", + "5": "institution_to_which_field_applies", + "6": "linkage", + "8": "field_link_and_sequence_number", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('display_constant_controller') + order.append("display_constant_controller") return { - '__order__': tuple(order) if len(order) else None, - 'source_of_description_note': value.get('a'), - 'institution_to_which_field_applies': value.get('5'), - 'linkage': value.get('6'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'display_constant_controller': indicator_map1.get(key[3]), + "__order__": tuple(order) if len(order) else None, + "source_of_description_note": value.get("a"), + "institution_to_which_field_applies": value.get("5"), + "linkage": value.get("6"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "display_constant_controller": indicator_map1.get(key[3]), } diff --git a/rero_ebooks/dojson/marc21/fields/bd6xx.py b/rero_ebooks/dojson/marc21/fields/bd6xx.py index 6872229..cb21878 100644 --- a/rero_ebooks/dojson/marc21/fields/bd6xx.py +++ b/rero_ebooks/dojson/marc21/fields/bd6xx.py @@ -14,7 +14,7 @@ from ..model import marc21 -@marc21.over('subject_added_entry_personal_name', '^600[03_1][341750_26]') +@marc21.over("subject_added_entry_personal_name", "^600[03_1][341750_26]") @utils.for_each_value @utils.filter_values def subject_added_entry_personal_name(self, key, value): @@ -31,90 +31,88 @@ def subject_added_entry_personal_name(self, key, value): "7": "Source specified in subfield $2", } field_map = { - 'q': 'fuller_form_of_name', - 'c': 'titles_and_other_words_associated_with_a_name', - 'y': 'chronological_subdivision', - '4': 'relator_code', - '6': 'linkage', - 'z': 'geographic_subdivision', - 'n': 'number_of_part_section_of_a_work', - 'x': 'general_subdivision', - 'm': 'medium_of_performance_for_music', - 'k': 'form_subheading', - 'r': 'key_for_music', - 'u': 'affiliation', - 's': 'version', - '8': 'field_link_and_sequence_number', - 'p': 'name_of_part_section_of_a_work', - 't': 'title_of_a_work', - 'd': 'dates_associated_with_a_name', - 'f': 'date_of_a_work', - 'l': 'language_of_a_work', - 'h': 'medium', - '0': 'authority_record_control_number_or_standard_number', - 'e': 'relator_term', - 'j': 'attribution_qualifier', - '2': 'source_of_heading_or_term', - '3': 'materials_specified', - 'o': 'arranged_statement_for_music', - 'v': 'form_subdivision', - 'g': 'miscellaneous_information', - 'a': 'personal_name', - 'b': 'numeration', + "q": "fuller_form_of_name", + "c": "titles_and_other_words_associated_with_a_name", + "y": "chronological_subdivision", + "4": "relator_code", + "6": "linkage", + "z": "geographic_subdivision", + "n": "number_of_part_section_of_a_work", + "x": "general_subdivision", + "m": "medium_of_performance_for_music", + "k": "form_subheading", + "r": "key_for_music", + "u": "affiliation", + "s": "version", + "8": "field_link_and_sequence_number", + "p": "name_of_part_section_of_a_work", + "t": "title_of_a_work", + "d": "dates_associated_with_a_name", + "f": "date_of_a_work", + "l": "language_of_a_work", + "h": "medium", + "0": "authority_record_control_number_or_standard_number", + "e": "relator_term", + "j": "attribution_qualifier", + "2": "source_of_heading_or_term", + "3": "materials_specified", + "o": "arranged_statement_for_music", + "v": "form_subdivision", + "g": "miscellaneous_information", + "a": "personal_name", + "b": "numeration", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('type_of_personal_name_entry_element') + order.append("type_of_personal_name_entry_element") if key[4] in indicator_map2: - order.append('thesaurus') + order.append("thesaurus") return { - '__order__': tuple(order) if len(order) else None, - 'fuller_form_of_name': value.get('q'), - 'titles_and_other_words_associated_with_a_name': utils.force_list( - value.get('c') + "__order__": tuple(order) if len(order) else None, + "fuller_form_of_name": value.get("q"), + "titles_and_other_words_associated_with_a_name": utils.force_list( + value.get("c") ), - 'chronological_subdivision': utils.force_list(value.get('y')), - 'relator_code': utils.force_list(value.get('4')), - 'linkage': value.get('6'), - 'geographic_subdivision': utils.force_list(value.get('z')), - 'number_of_part_section_of_a_work': utils.force_list(value.get('n')), - 'general_subdivision': utils.force_list(value.get('x')), - 'medium_of_performance_for_music': utils.force_list(value.get('m')), - 'form_subheading': utils.force_list(value.get('k')), - 'key_for_music': value.get('r'), - 'affiliation': value.get('u'), - 'version': value.get('s'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'name_of_part_section_of_a_work': utils.force_list(value.get('p')), - 'title_of_a_work': value.get('t'), - 'dates_associated_with_a_name': value.get('d'), - 'date_of_a_work': value.get('f'), - 'language_of_a_work': value.get('l'), - 'medium': value.get('h'), - 'authority_record_control_number_or_standard_number': utils.force_list( - value.get('0') + "chronological_subdivision": utils.force_list(value.get("y")), + "relator_code": utils.force_list(value.get("4")), + "linkage": value.get("6"), + "geographic_subdivision": utils.force_list(value.get("z")), + "number_of_part_section_of_a_work": utils.force_list(value.get("n")), + "general_subdivision": utils.force_list(value.get("x")), + "medium_of_performance_for_music": utils.force_list(value.get("m")), + "form_subheading": utils.force_list(value.get("k")), + "key_for_music": value.get("r"), + "affiliation": value.get("u"), + "version": value.get("s"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "name_of_part_section_of_a_work": utils.force_list(value.get("p")), + "title_of_a_work": value.get("t"), + "dates_associated_with_a_name": value.get("d"), + "date_of_a_work": value.get("f"), + "language_of_a_work": value.get("l"), + "medium": value.get("h"), + "authority_record_control_number_or_standard_number": utils.force_list( + value.get("0") ), - 'relator_term': utils.force_list(value.get('e')), - 'attribution_qualifier': utils.force_list(value.get('j')), - 'source_of_heading_or_term': value.get('2'), - 'materials_specified': value.get('3'), - 'arranged_statement_for_music': value.get('o'), - 'form_subdivision': utils.force_list(value.get('v')), - 'miscellaneous_information': utils.force_list(value.get('g')), - 'personal_name': value.get('a'), - 'numeration': value.get('b'), - 'type_of_personal_name_entry_element': indicator_map1.get(key[3]), - 'thesaurus': value.get('2') - if key[4] == '7' - else indicator_map2.get(key[4]), + "relator_term": utils.force_list(value.get("e")), + "attribution_qualifier": utils.force_list(value.get("j")), + "source_of_heading_or_term": value.get("2"), + "materials_specified": value.get("3"), + "arranged_statement_for_music": value.get("o"), + "form_subdivision": utils.force_list(value.get("v")), + "miscellaneous_information": utils.force_list(value.get("g")), + "personal_name": value.get("a"), + "numeration": value.get("b"), + "type_of_personal_name_entry_element": indicator_map1.get(key[3]), + "thesaurus": value.get("2") if key[4] == "7" else indicator_map2.get(key[4]), } -@marc21.over('subject_added_entry_corporate_name', '^610[0_12][341750_26]') +@marc21.over("subject_added_entry_corporate_name", "^610[0_12][341750_26]") @utils.for_each_value @utils.filter_values def subject_added_entry_corporate_name(self, key, value): @@ -135,84 +133,82 @@ def subject_added_entry_corporate_name(self, key, value): "7": "Source specified in subfield $2", } field_map = { - 'c': 'location_of_meeting', - 'y': 'chronological_subdivision', - '4': 'relator_code', - '6': 'linkage', - 'z': 'geographic_subdivision', - 'n': 'number_of_part_section_meeting', - 'x': 'general_subdivision', - 'm': 'medium_of_performance_for_music', - 'k': 'form_subheading', - 'r': 'key_for_music', - 'u': 'affiliation', - 's': 'version', - '8': 'field_link_and_sequence_number', - 'p': 'name_of_part_section_of_a_work', - 't': 'title_of_a_work', - 'd': 'date_of_meeting_or_treaty_signing', - 'f': 'date_of_a_work', - 'l': 'language_of_a_work', - 'h': 'medium', - '0': 'authority_record_control_number_or_standard_number', - 'e': 'relator_term', - '2': 'source_of_heading_or_term', - '3': 'materials_specified', - 'o': 'arranged_statement_for_music', - 'v': 'form_subdivision', - 'g': 'miscellaneous_information', - 'a': 'corporate_name_or_jurisdiction_name_as_entry_element', - 'b': 'subordinate_unit', + "c": "location_of_meeting", + "y": "chronological_subdivision", + "4": "relator_code", + "6": "linkage", + "z": "geographic_subdivision", + "n": "number_of_part_section_meeting", + "x": "general_subdivision", + "m": "medium_of_performance_for_music", + "k": "form_subheading", + "r": "key_for_music", + "u": "affiliation", + "s": "version", + "8": "field_link_and_sequence_number", + "p": "name_of_part_section_of_a_work", + "t": "title_of_a_work", + "d": "date_of_meeting_or_treaty_signing", + "f": "date_of_a_work", + "l": "language_of_a_work", + "h": "medium", + "0": "authority_record_control_number_or_standard_number", + "e": "relator_term", + "2": "source_of_heading_or_term", + "3": "materials_specified", + "o": "arranged_statement_for_music", + "v": "form_subdivision", + "g": "miscellaneous_information", + "a": "corporate_name_or_jurisdiction_name_as_entry_element", + "b": "subordinate_unit", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('type_of_corporate_name_entry_element') + order.append("type_of_corporate_name_entry_element") if key[4] in indicator_map2: - order.append('thesaurus') + order.append("thesaurus") return { - '__order__': tuple(order) if len(order) else None, - 'location_of_meeting': utils.force_list(value.get('c')), - 'chronological_subdivision': utils.force_list(value.get('y')), - 'relator_code': utils.force_list(value.get('4')), - 'linkage': value.get('6'), - 'geographic_subdivision': utils.force_list(value.get('z')), - 'number_of_part_section_meeting': utils.force_list(value.get('n')), - 'general_subdivision': utils.force_list(value.get('x')), - 'medium_of_performance_for_music': utils.force_list(value.get('m')), - 'form_subheading': utils.force_list(value.get('k')), - 'key_for_music': value.get('r'), - 'affiliation': value.get('u'), - 'version': value.get('s'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'name_of_part_section_of_a_work': utils.force_list(value.get('p')), - 'title_of_a_work': value.get('t'), - 'date_of_meeting_or_treaty_signing': utils.force_list(value.get('d')), - 'date_of_a_work': value.get('f'), - 'language_of_a_work': value.get('l'), - 'medium': value.get('h'), - 'authority_record_control_number_or_standard_number': utils.force_list( - value.get('0') + "__order__": tuple(order) if len(order) else None, + "location_of_meeting": utils.force_list(value.get("c")), + "chronological_subdivision": utils.force_list(value.get("y")), + "relator_code": utils.force_list(value.get("4")), + "linkage": value.get("6"), + "geographic_subdivision": utils.force_list(value.get("z")), + "number_of_part_section_meeting": utils.force_list(value.get("n")), + "general_subdivision": utils.force_list(value.get("x")), + "medium_of_performance_for_music": utils.force_list(value.get("m")), + "form_subheading": utils.force_list(value.get("k")), + "key_for_music": value.get("r"), + "affiliation": value.get("u"), + "version": value.get("s"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "name_of_part_section_of_a_work": utils.force_list(value.get("p")), + "title_of_a_work": value.get("t"), + "date_of_meeting_or_treaty_signing": utils.force_list(value.get("d")), + "date_of_a_work": value.get("f"), + "language_of_a_work": value.get("l"), + "medium": value.get("h"), + "authority_record_control_number_or_standard_number": utils.force_list( + value.get("0") ), - 'relator_term': utils.force_list(value.get('e')), - 'source_of_heading_or_term': value.get('2'), - 'materials_specified': value.get('3'), - 'arranged_statement_for_music': value.get('o'), - 'form_subdivision': utils.force_list(value.get('v')), - 'miscellaneous_information': utils.force_list(value.get('g')), - 'corporate_name_or_jurisdiction_name_as_entry_element': value.get('a'), - 'subordinate_unit': utils.force_list(value.get('b')), - 'type_of_corporate_name_entry_element': indicator_map1.get(key[3]), - 'thesaurus': value.get('2') - if key[4] == '7' - else indicator_map2.get(key[4]), + "relator_term": utils.force_list(value.get("e")), + "source_of_heading_or_term": value.get("2"), + "materials_specified": value.get("3"), + "arranged_statement_for_music": value.get("o"), + "form_subdivision": utils.force_list(value.get("v")), + "miscellaneous_information": utils.force_list(value.get("g")), + "corporate_name_or_jurisdiction_name_as_entry_element": value.get("a"), + "subordinate_unit": utils.force_list(value.get("b")), + "type_of_corporate_name_entry_element": indicator_map1.get(key[3]), + "thesaurus": value.get("2") if key[4] == "7" else indicator_map2.get(key[4]), } -@marc21.over('subject_added_entry_meeting_name', '^611[0_12][341750_26]') +@marc21.over("subject_added_entry_meeting_name", "^611[0_12][341750_26]") @utils.for_each_value @utils.filter_values def subject_added_entry_meeting_name(self, key, value): @@ -233,84 +229,78 @@ def subject_added_entry_meeting_name(self, key, value): "7": "Source specified in subfield $2", } field_map = { - 'q': 'name_of_meeting_following_jurisdiction_name_entry_element', - 'c': 'location_of_meeting', - 'y': 'chronological_subdivision', - '4': 'relator_code', - '6': 'linkage', - 'z': 'geographic_subdivision', - 'x': 'general_subdivision', - 'k': 'form_subheading', - 'u': 'affiliation', - 's': 'version', - '8': 'field_link_and_sequence_number', - 'p': 'name_of_part_section_of_a_work', - 't': 'title_of_a_work', - 'd': 'date_of_meeting', - 'f': 'date_of_a_work', - 'l': 'language_of_a_work', - 'h': 'medium', - '0': 'authority_record_control_number_or_standard_number', - 'e': 'subordinate_unit', - 'j': 'relator_term', - '2': 'source_of_heading_or_term', - '3': 'materials_specified', - 'n': 'number_of_part_section_meeting', - 'v': 'form_subdivision', - 'a': 'meeting_name_or_jurisdiction_name_as_entry_element', - 'g': 'miscellaneous_information', + "q": "name_of_meeting_following_jurisdiction_name_entry_element", + "c": "location_of_meeting", + "y": "chronological_subdivision", + "4": "relator_code", + "6": "linkage", + "z": "geographic_subdivision", + "x": "general_subdivision", + "k": "form_subheading", + "u": "affiliation", + "s": "version", + "8": "field_link_and_sequence_number", + "p": "name_of_part_section_of_a_work", + "t": "title_of_a_work", + "d": "date_of_meeting", + "f": "date_of_a_work", + "l": "language_of_a_work", + "h": "medium", + "0": "authority_record_control_number_or_standard_number", + "e": "subordinate_unit", + "j": "relator_term", + "2": "source_of_heading_or_term", + "3": "materials_specified", + "n": "number_of_part_section_meeting", + "v": "form_subdivision", + "a": "meeting_name_or_jurisdiction_name_as_entry_element", + "g": "miscellaneous_information", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('type_of_meeting_name_entry_element') + order.append("type_of_meeting_name_entry_element") if key[4] in indicator_map2: - order.append('thesaurus') + order.append("thesaurus") return { - '__order__': tuple(order) if len(order) else None, - 'name_of_meeting_following_jurisdiction_name_entry_element': value.get( - 'q' - ), - 'location_of_meeting': utils.force_list(value.get('c')), - 'chronological_subdivision': utils.force_list(value.get('y')), - 'relator_code': utils.force_list(value.get('4')), - 'linkage': value.get('6'), - 'geographic_subdivision': utils.force_list(value.get('z')), - 'general_subdivision': utils.force_list(value.get('x')), - 'form_subheading': utils.force_list(value.get('k')), - 'affiliation': value.get('u'), - 'version': value.get('s'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'name_of_part_section_of_a_work': utils.force_list(value.get('p')), - 'title_of_a_work': value.get('t'), - 'date_of_meeting': value.get('d'), - 'date_of_a_work': value.get('f'), - 'language_of_a_work': value.get('l'), - 'medium': value.get('h'), - 'authority_record_control_number_or_standard_number': utils.force_list( - value.get('0') + "__order__": tuple(order) if len(order) else None, + "name_of_meeting_following_jurisdiction_name_entry_element": value.get("q"), + "location_of_meeting": utils.force_list(value.get("c")), + "chronological_subdivision": utils.force_list(value.get("y")), + "relator_code": utils.force_list(value.get("4")), + "linkage": value.get("6"), + "geographic_subdivision": utils.force_list(value.get("z")), + "general_subdivision": utils.force_list(value.get("x")), + "form_subheading": utils.force_list(value.get("k")), + "affiliation": value.get("u"), + "version": value.get("s"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "name_of_part_section_of_a_work": utils.force_list(value.get("p")), + "title_of_a_work": value.get("t"), + "date_of_meeting": value.get("d"), + "date_of_a_work": value.get("f"), + "language_of_a_work": value.get("l"), + "medium": value.get("h"), + "authority_record_control_number_or_standard_number": utils.force_list( + value.get("0") ), - 'subordinate_unit': utils.force_list(value.get('e')), - 'relator_term': utils.force_list(value.get('j')), - 'source_of_heading_or_term': value.get('2'), - 'materials_specified': value.get('3'), - 'number_of_part_section_meeting': utils.force_list(value.get('n')), - 'form_subdivision': utils.force_list(value.get('v')), - 'meeting_name_or_jurisdiction_name_as_entry_element': value.get('a'), - 'miscellaneous_information': utils.force_list(value.get('g')), - 'type_of_meeting_name_entry_element': indicator_map1.get(key[3]), - 'thesaurus': value.get('2') - if key[4] == '7' - else indicator_map2.get(key[4]), + "subordinate_unit": utils.force_list(value.get("e")), + "relator_term": utils.force_list(value.get("j")), + "source_of_heading_or_term": value.get("2"), + "materials_specified": value.get("3"), + "number_of_part_section_meeting": utils.force_list(value.get("n")), + "form_subdivision": utils.force_list(value.get("v")), + "meeting_name_or_jurisdiction_name_as_entry_element": value.get("a"), + "miscellaneous_information": utils.force_list(value.get("g")), + "type_of_meeting_name_entry_element": indicator_map1.get(key[3]), + "thesaurus": value.get("2") if key[4] == "7" else indicator_map2.get(key[4]), } -@marc21.over( - 'subject_added_entry_uniform_title', '^630[9341750_268][341750_26]' -) +@marc21.over("subject_added_entry_uniform_title", "^630[9341750_268][341750_26]") @utils.for_each_value @utils.filter_values def subject_added_entry_uniform_title(self, key, value): @@ -327,78 +317,76 @@ def subject_added_entry_uniform_title(self, key, value): "7": "Source specified in subfield $2", } field_map = { - 'p': 'name_of_part_section_of_a_work', - 'y': 'chronological_subdivision', - '4': 'relator_code', - '6': 'linkage', - 'z': 'geographic_subdivision', - 'n': 'number_of_part_section_of_a_work', - 'x': 'general_subdivision', - 'm': 'medium_of_performance_for_music', - 'k': 'form_subheading', - 'r': 'key_for_music', - 's': 'version', - '8': 'field_link_and_sequence_number', - 'v': 'form_subdivision', - 't': 'title_of_a_work', - 'd': 'date_of_treaty_signing', - 'f': 'date_of_a_work', - 'l': 'language_of_a_work', - 'h': 'medium', - '0': 'authority_record_control_number_or_standard_number', - 'e': 'relator_term', - '2': 'source_of_heading_or_term', - '3': 'materials_specified', - 'o': 'arranged_statement_for_music', - 'a': 'uniform_title', - 'g': 'miscellaneous_information', + "p": "name_of_part_section_of_a_work", + "y": "chronological_subdivision", + "4": "relator_code", + "6": "linkage", + "z": "geographic_subdivision", + "n": "number_of_part_section_of_a_work", + "x": "general_subdivision", + "m": "medium_of_performance_for_music", + "k": "form_subheading", + "r": "key_for_music", + "s": "version", + "8": "field_link_and_sequence_number", + "v": "form_subdivision", + "t": "title_of_a_work", + "d": "date_of_treaty_signing", + "f": "date_of_a_work", + "l": "language_of_a_work", + "h": "medium", + "0": "authority_record_control_number_or_standard_number", + "e": "relator_term", + "2": "source_of_heading_or_term", + "3": "materials_specified", + "o": "arranged_statement_for_music", + "a": "uniform_title", + "g": "miscellaneous_information", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('nonfiling_characters') + order.append("nonfiling_characters") if key[4] in indicator_map2: - order.append('thesaurus') + order.append("thesaurus") return { - '__order__': tuple(order) if len(order) else None, - 'name_of_part_section_of_a_work': utils.force_list(value.get('p')), - 'chronological_subdivision': utils.force_list(value.get('y')), - 'relator_code': utils.force_list(value.get('4')), - 'linkage': value.get('6'), - 'geographic_subdivision': utils.force_list(value.get('z')), - 'number_of_part_section_of_a_work': utils.force_list(value.get('n')), - 'general_subdivision': utils.force_list(value.get('x')), - 'medium_of_performance_for_music': utils.force_list(value.get('m')), - 'form_subheading': utils.force_list(value.get('k')), - 'key_for_music': value.get('r'), - 'version': value.get('s'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'form_subdivision': utils.force_list(value.get('v')), - 'title_of_a_work': value.get('t'), - 'date_of_treaty_signing': utils.force_list(value.get('d')), - 'date_of_a_work': value.get('f'), - 'language_of_a_work': value.get('l'), - 'medium': value.get('h'), - 'authority_record_control_number_or_standard_number': utils.force_list( - value.get('0') + "__order__": tuple(order) if len(order) else None, + "name_of_part_section_of_a_work": utils.force_list(value.get("p")), + "chronological_subdivision": utils.force_list(value.get("y")), + "relator_code": utils.force_list(value.get("4")), + "linkage": value.get("6"), + "geographic_subdivision": utils.force_list(value.get("z")), + "number_of_part_section_of_a_work": utils.force_list(value.get("n")), + "general_subdivision": utils.force_list(value.get("x")), + "medium_of_performance_for_music": utils.force_list(value.get("m")), + "form_subheading": utils.force_list(value.get("k")), + "key_for_music": value.get("r"), + "version": value.get("s"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "form_subdivision": utils.force_list(value.get("v")), + "title_of_a_work": value.get("t"), + "date_of_treaty_signing": utils.force_list(value.get("d")), + "date_of_a_work": value.get("f"), + "language_of_a_work": value.get("l"), + "medium": value.get("h"), + "authority_record_control_number_or_standard_number": utils.force_list( + value.get("0") ), - 'relator_term': utils.force_list(value.get('e')), - 'source_of_heading_or_term': value.get('2'), - 'materials_specified': value.get('3'), - 'arranged_statement_for_music': value.get('o'), - 'uniform_title': value.get('a'), - 'miscellaneous_information': utils.force_list(value.get('g')), - 'nonfiling_characters': indicator_map1.get(key[3]), - 'thesaurus': value.get('2') - if key[4] == '7' - else indicator_map2.get(key[4]), + "relator_term": utils.force_list(value.get("e")), + "source_of_heading_or_term": value.get("2"), + "materials_specified": value.get("3"), + "arranged_statement_for_music": value.get("o"), + "uniform_title": value.get("a"), + "miscellaneous_information": utils.force_list(value.get("g")), + "nonfiling_characters": indicator_map1.get(key[3]), + "thesaurus": value.get("2") if key[4] == "7" else indicator_map2.get(key[4]), } -@marc21.over('subject_added_entry_chronological_term', '^648.[341750_26]') +@marc21.over("subject_added_entry_chronological_term", "^648.[341750_26]") @utils.for_each_value @utils.filter_values def subject_added_entry_chronological_term(self, key, value): @@ -414,44 +402,42 @@ def subject_added_entry_chronological_term(self, key, value): "7": "Source specified in subfield $2", } field_map = { - '0': 'authority_record_control_number_or_standard_number', - 'y': 'chronological_subdivision', - '2': 'source_of_heading_or_term', - '6': 'linkage', - '3': 'materials_specified', - 'a': 'chronological_term', - 'z': 'geographic_subdivision', - 'x': 'general_subdivision', - '8': 'field_link_and_sequence_number', - 'v': 'form_subdivision', + "0": "authority_record_control_number_or_standard_number", + "y": "chronological_subdivision", + "2": "source_of_heading_or_term", + "6": "linkage", + "3": "materials_specified", + "a": "chronological_term", + "z": "geographic_subdivision", + "x": "general_subdivision", + "8": "field_link_and_sequence_number", + "v": "form_subdivision", } order = utils.map_order(field_map, value) if key[4] in indicator_map2: - order.append('thesaurus') + order.append("thesaurus") return { - '__order__': tuple(order) if len(order) else None, - 'authority_record_control_number_or_standard_number': utils.force_list( - value.get('0') + "__order__": tuple(order) if len(order) else None, + "authority_record_control_number_or_standard_number": utils.force_list( + value.get("0") ), - 'chronological_subdivision': utils.force_list(value.get('y')), - 'source_of_heading_or_term': value.get('2'), - 'linkage': value.get('6'), - 'materials_specified': value.get('3'), - 'chronological_term': value.get('a'), - 'geographic_subdivision': utils.force_list(value.get('z')), - 'general_subdivision': utils.force_list(value.get('x')), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'form_subdivision': utils.force_list(value.get('v')), - 'thesaurus': value.get('2') - if key[4] == '7' - else indicator_map2.get(key[4]), + "chronological_subdivision": utils.force_list(value.get("y")), + "source_of_heading_or_term": value.get("2"), + "linkage": value.get("6"), + "materials_specified": value.get("3"), + "chronological_term": value.get("a"), + "geographic_subdivision": utils.force_list(value.get("z")), + "general_subdivision": utils.force_list(value.get("x")), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "form_subdivision": utils.force_list(value.get("v")), + "thesaurus": value.get("2") if key[4] == "7" else indicator_map2.get(key[4]), } -@marc21.over('subject_added_entry_topical_term', '^650[_120][341750_26]') +@marc21.over("subject_added_entry_topical_term", "^650[_120][341750_26]") @utils.for_each_value @utils.filter_values def subject_added_entry_topical_term(self, key, value): @@ -473,60 +459,58 @@ def subject_added_entry_topical_term(self, key, value): "7": "Source specified in subfield $2", } field_map = { - 'y': 'chronological_subdivision', - 'd': 'active_dates', - 'c': 'location_of_event', - '3': 'materials_specified', - '4': 'relator_code', - 'z': 'geographic_subdivision', - '0': 'authority_record_control_number_or_standard_number', - 'x': 'general_subdivision', - 'e': 'relator_term', - 'b': 'topical_term_following_geographic_name_entry_element', - '2': 'source_of_heading_or_term', - '6': 'linkage', - 'v': 'form_subdivision', - 'a': 'topical_term_or_geographic_name_entry_element', - '8': 'field_link_and_sequence_number', - 'g': 'miscellaneous_information', + "y": "chronological_subdivision", + "d": "active_dates", + "c": "location_of_event", + "3": "materials_specified", + "4": "relator_code", + "z": "geographic_subdivision", + "0": "authority_record_control_number_or_standard_number", + "x": "general_subdivision", + "e": "relator_term", + "b": "topical_term_following_geographic_name_entry_element", + "2": "source_of_heading_or_term", + "6": "linkage", + "v": "form_subdivision", + "a": "topical_term_or_geographic_name_entry_element", + "8": "field_link_and_sequence_number", + "g": "miscellaneous_information", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('level_of_subject') + order.append("level_of_subject") if key[4] in indicator_map2: - order.append('thesaurus') + order.append("thesaurus") return { - '__order__': tuple(order) if len(order) else None, - 'chronological_subdivision': utils.force_list(value.get('y')), - 'active_dates': value.get('d'), - 'location_of_event': value.get('c'), - 'materials_specified': value.get('3'), - 'relator_code': utils.force_list(value.get('4')), - 'geographic_subdivision': utils.force_list(value.get('z')), - 'authority_record_control_number_or_standard_number': utils.force_list( - value.get('0') + "__order__": tuple(order) if len(order) else None, + "chronological_subdivision": utils.force_list(value.get("y")), + "active_dates": value.get("d"), + "location_of_event": value.get("c"), + "materials_specified": value.get("3"), + "relator_code": utils.force_list(value.get("4")), + "geographic_subdivision": utils.force_list(value.get("z")), + "authority_record_control_number_or_standard_number": utils.force_list( + value.get("0") ), - 'general_subdivision': utils.force_list(value.get('x')), - 'relator_term': utils.force_list(value.get('e')), - 'topical_term_following_geographic_name_entry_element': value.get('b'), - 'source_of_heading_or_term': value.get('2'), - 'linkage': value.get('6'), - 'form_subdivision': utils.force_list(value.get('v')), - 'topical_term_or_geographic_name_entry_element': value.get('a'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'miscellaneous_information': utils.force_list(value.get('g')), - 'level_of_subject': indicator_map1.get(key[3]), - 'thesaurus': value.get('2') - if key[4] == '7' - else indicator_map2.get(key[4]), + "general_subdivision": utils.force_list(value.get("x")), + "relator_term": utils.force_list(value.get("e")), + "topical_term_following_geographic_name_entry_element": value.get("b"), + "source_of_heading_or_term": value.get("2"), + "linkage": value.get("6"), + "form_subdivision": utils.force_list(value.get("v")), + "topical_term_or_geographic_name_entry_element": value.get("a"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "miscellaneous_information": utils.force_list(value.get("g")), + "level_of_subject": indicator_map1.get(key[3]), + "thesaurus": value.get("2") if key[4] == "7" else indicator_map2.get(key[4]), } -@marc21.over('subject_added_entry_geographic_name', '^651.[341750_26]') +@marc21.over("subject_added_entry_geographic_name", "^651.[341750_26]") @utils.for_each_value @utils.filter_values def subject_added_entry_geographic_name(self, key, value): @@ -542,50 +526,48 @@ def subject_added_entry_geographic_name(self, key, value): "7": "Source specified in subfield $2", } field_map = { - 'y': 'chronological_subdivision', - 'a': 'geographic_name', - '3': 'materials_specified', - 'x': 'general_subdivision', - 'z': 'geographic_subdivision', - '0': 'authority_record_control_number_or_standard_number', - 'e': 'relator_term', - '2': 'source_of_heading_or_term', - '6': 'linkage', - 'g': 'miscellaneous_information', - '4': 'relator_code', - '8': 'field_link_and_sequence_number', - 'v': 'form_subdivision', + "y": "chronological_subdivision", + "a": "geographic_name", + "3": "materials_specified", + "x": "general_subdivision", + "z": "geographic_subdivision", + "0": "authority_record_control_number_or_standard_number", + "e": "relator_term", + "2": "source_of_heading_or_term", + "6": "linkage", + "g": "miscellaneous_information", + "4": "relator_code", + "8": "field_link_and_sequence_number", + "v": "form_subdivision", } order = utils.map_order(field_map, value) if key[4] in indicator_map2: - order.append('thesaurus') + order.append("thesaurus") return { - '__order__': tuple(order) if len(order) else None, - 'chronological_subdivision': utils.force_list(value.get('y')), - 'geographic_name': value.get('a'), - 'materials_specified': value.get('3'), - 'general_subdivision': utils.force_list(value.get('x')), - 'geographic_subdivision': utils.force_list(value.get('z')), - 'authority_record_control_number_or_standard_number': utils.force_list( - value.get('0') + "__order__": tuple(order) if len(order) else None, + "chronological_subdivision": utils.force_list(value.get("y")), + "geographic_name": value.get("a"), + "materials_specified": value.get("3"), + "general_subdivision": utils.force_list(value.get("x")), + "geographic_subdivision": utils.force_list(value.get("z")), + "authority_record_control_number_or_standard_number": utils.force_list( + value.get("0") ), - 'relator_term': utils.force_list(value.get('e')), - 'source_of_heading_or_term': value.get('2'), - 'linkage': value.get('6'), - 'miscellaneous_information': utils.force_list(value.get('g')), - 'relator_code': utils.force_list(value.get('4')), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'form_subdivision': utils.force_list(value.get('v')), - 'thesaurus': value.get('2') - if key[4] == '7' - else indicator_map2.get(key[4]), + "relator_term": utils.force_list(value.get("e")), + "source_of_heading_or_term": value.get("2"), + "linkage": value.get("6"), + "miscellaneous_information": utils.force_list(value.get("g")), + "relator_code": utils.force_list(value.get("4")), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "form_subdivision": utils.force_list(value.get("v")), + "thesaurus": value.get("2") if key[4] == "7" else indicator_map2.get(key[4]), } -@marc21.over('index_term_uncontrolled', '^653[_120][3415_026]') +@marc21.over("index_term_uncontrolled", "^653[_120][3415_026]") @utils.for_each_value @utils.filter_values def index_term_uncontrolled(self, key, value): @@ -607,30 +589,30 @@ def index_term_uncontrolled(self, key, value): "_": "No information provided", } field_map = { - 'a': 'uncontrolled_term', - '8': 'field_link_and_sequence_number', - '6': 'linkage', + "a": "uncontrolled_term", + "8": "field_link_and_sequence_number", + "6": "linkage", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('level_of_index_term') + order.append("level_of_index_term") if key[4] in indicator_map2: - order.append('type_of_term_or_name') + order.append("type_of_term_or_name") return { - '__order__': tuple(order) if len(order) else None, - 'uncontrolled_term': utils.force_list(value.get('a')), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'linkage': value.get('6'), - 'level_of_index_term': indicator_map1.get(key[3]), - 'type_of_term_or_name': indicator_map2.get(key[4]), + "__order__": tuple(order) if len(order) else None, + "uncontrolled_term": utils.force_list(value.get("a")), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "linkage": value.get("6"), + "level_of_index_term": indicator_map1.get(key[3]), + "type_of_term_or_name": indicator_map2.get(key[4]), } -@marc21.over('subject_added_entry_faceted_topical_terms', '^654[_120].') +@marc21.over("subject_added_entry_faceted_topical_terms", "^654[_120].") @utils.for_each_value @utils.filter_values def subject_added_entry_faceted_topical_terms(self, key, value): @@ -642,53 +624,53 @@ def subject_added_entry_faceted_topical_terms(self, key, value): "_": "No information provided", } field_map = { - 'y': 'chronological_subdivision', - 'c': 'facet_hierarchy_designation', - '3': 'materials_specified', - '4': 'relator_code', - 'z': 'geographic_subdivision', - '0': 'authority_record_control_number', - 'e': 'relator_term', - 'b': 'non_focus_term', - '2': 'source_of_heading_or_term', - '6': 'linkage', - 'a': 'focus_term', - '8': 'field_link_and_sequence_number', - 'v': 'form_subdivision', + "y": "chronological_subdivision", + "c": "facet_hierarchy_designation", + "3": "materials_specified", + "4": "relator_code", + "z": "geographic_subdivision", + "0": "authority_record_control_number", + "e": "relator_term", + "b": "non_focus_term", + "2": "source_of_heading_or_term", + "6": "linkage", + "a": "focus_term", + "8": "field_link_and_sequence_number", + "v": "form_subdivision", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('level_of_subject') + order.append("level_of_subject") return { - '__order__': tuple(order) if len(order) else None, - 'chronological_subdivision': utils.force_list(value.get('y')), - 'facet_hierarchy_designation': utils.force_list(value.get('c')), - 'materials_specified': value.get('3'), - 'relator_code': utils.force_list(value.get('4')), - 'geographic_subdivision': utils.force_list(value.get('z')), - 'authority_record_control_number': utils.force_list(value.get('0')), - 'relator_term': utils.force_list(value.get('e')), - 'non_focus_term': utils.force_list(value.get('b')), - 'source_of_heading_or_term': value.get('2'), - 'linkage': value.get('6'), - 'focus_term': utils.force_list(value.get('a')), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'form_subdivision': utils.force_list(value.get('v')), - 'level_of_subject': indicator_map1.get(key[3]), - } - - -@marc21.over('index_term_genre_form', '^655[_07][341750_26]') + "__order__": tuple(order) if len(order) else None, + "chronological_subdivision": utils.force_list(value.get("y")), + "facet_hierarchy_designation": utils.force_list(value.get("c")), + "materials_specified": value.get("3"), + "relator_code": utils.force_list(value.get("4")), + "geographic_subdivision": utils.force_list(value.get("z")), + "authority_record_control_number": utils.force_list(value.get("0")), + "relator_term": utils.force_list(value.get("e")), + "non_focus_term": utils.force_list(value.get("b")), + "source_of_heading_or_term": value.get("2"), + "linkage": value.get("6"), + "focus_term": utils.force_list(value.get("a")), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "form_subdivision": utils.force_list(value.get("v")), + "level_of_subject": indicator_map1.get(key[3]), + } + + +@marc21.over("index_term_genre_form", "^655[_07][341750_26]") @utils.for_each_value @utils.filter_values def index_term_genre_form(self, key, value): """Index Term-Genre/Form.""" # cantook hack - if key[3] == '7': - key = '655_7' + if key[3] == "7": + key = "655_7" indicator_map1 = {"0": "Faceted", "_": "Basic"} indicator_map2 = { @@ -702,203 +684,200 @@ def index_term_genre_form(self, key, value): "7": "Source specified in subfield $2", } field_map = { - 'y': 'chronological_subdivision', - 'c': 'facet_hierarchy_designation', - '3': 'materials_specified', - 'a': 'genre_form_data_or_focus_term', - '5': 'institution_to_which_field_applies', - '0': 'authority_record_control_number', - 'b': 'non_focus_term', - '2': 'source_of_term', - '6': 'linkage', - 'z': 'geographic_subdivision', - 'x': 'general_subdivision', - '8': 'field_link_and_sequence_number', - 'v': 'form_subdivision', + "y": "chronological_subdivision", + "c": "facet_hierarchy_designation", + "3": "materials_specified", + "a": "genre_form_data_or_focus_term", + "5": "institution_to_which_field_applies", + "0": "authority_record_control_number", + "b": "non_focus_term", + "2": "source_of_term", + "6": "linkage", + "z": "geographic_subdivision", + "x": "general_subdivision", + "8": "field_link_and_sequence_number", + "v": "form_subdivision", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('type_of_heading') + order.append("type_of_heading") if key[4] in indicator_map2: - order.append('thesaurus') + order.append("thesaurus") return { - '__order__': tuple(order) if len(order) else None, - 'chronological_subdivision': utils.force_list(value.get('y')), - 'facet_hierarchy_designation': utils.force_list(value.get('c')), - 'materials_specified': value.get('3'), - 'genre_form_data_or_focus_term': value.get('a'), - 'institution_to_which_field_applies': value.get('5'), - 'authority_record_control_number': utils.force_list(value.get('0')), - 'non_focus_term': utils.force_list(value.get('b')), - 'source_of_term': value.get('2'), - 'linkage': value.get('6'), - 'geographic_subdivision': utils.force_list(value.get('z')), - 'general_subdivision': utils.force_list(value.get('x')), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'form_subdivision': utils.force_list(value.get('v')), - 'type_of_heading': indicator_map1.get(key[3]), - 'thesaurus': value.get('2') - if key[4] == '7' - else indicator_map2.get(key[4]), - } - - -@marc21.over('index_term_occupation', '^656.[_7]') + "__order__": tuple(order) if len(order) else None, + "chronological_subdivision": utils.force_list(value.get("y")), + "facet_hierarchy_designation": utils.force_list(value.get("c")), + "materials_specified": value.get("3"), + "genre_form_data_or_focus_term": value.get("a"), + "institution_to_which_field_applies": value.get("5"), + "authority_record_control_number": utils.force_list(value.get("0")), + "non_focus_term": utils.force_list(value.get("b")), + "source_of_term": value.get("2"), + "linkage": value.get("6"), + "geographic_subdivision": utils.force_list(value.get("z")), + "general_subdivision": utils.force_list(value.get("x")), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "form_subdivision": utils.force_list(value.get("v")), + "type_of_heading": indicator_map1.get(key[3]), + "thesaurus": value.get("2") if key[4] == "7" else indicator_map2.get(key[4]), + } + + +@marc21.over("index_term_occupation", "^656.[_7]") @utils.for_each_value @utils.filter_values def index_term_occupation(self, key, value): """Index Term-Occupation.""" indicator_map2 = {"7": "Source specified in subfield $2"} field_map = { - '0': 'authority_record_control_number', - 'y': 'chronological_subdivision', - 'z': 'geographic_subdivision', - '2': 'source_of_term', - '6': 'linkage', - '3': 'materials_specified', - 'a': 'occupation', - 'k': 'form', - 'x': 'general_subdivision', - '8': 'field_link_and_sequence_number', - 'v': 'form_subdivision', + "0": "authority_record_control_number", + "y": "chronological_subdivision", + "z": "geographic_subdivision", + "2": "source_of_term", + "6": "linkage", + "3": "materials_specified", + "a": "occupation", + "k": "form", + "x": "general_subdivision", + "8": "field_link_and_sequence_number", + "v": "form_subdivision", } order = utils.map_order(field_map, value) - if key[4] in indicator_map2 and '2' not in value: - order.append('source_of_term') + if key[4] in indicator_map2 and "2" not in value: + order.append("source_of_term") return { - '__order__': tuple(order) if len(order) else None, - 'authority_record_control_number': utils.force_list(value.get('0')), - 'chronological_subdivision': utils.force_list(value.get('y')), - 'geographic_subdivision': utils.force_list(value.get('z')), - 'linkage': value.get('6'), - 'materials_specified': value.get('3'), - 'occupation': value.get('a'), - 'form': value.get('k'), - 'general_subdivision': utils.force_list(value.get('x')), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'form_subdivision': utils.force_list(value.get('v')), - 'source_of_term': value.get('2') - if key[4] == '7' + "__order__": tuple(order) if len(order) else None, + "authority_record_control_number": utils.force_list(value.get("0")), + "chronological_subdivision": utils.force_list(value.get("y")), + "geographic_subdivision": utils.force_list(value.get("z")), + "linkage": value.get("6"), + "materials_specified": value.get("3"), + "occupation": value.get("a"), + "form": value.get("k"), + "general_subdivision": utils.force_list(value.get("x")), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "form_subdivision": utils.force_list(value.get("v")), + "source_of_term": value.get("2") + if key[4] == "7" else indicator_map2.get(key[4]), } -@marc21.over('index_term_function', '^657.[_7]') +@marc21.over("index_term_function", "^657.[_7]") @utils.for_each_value @utils.filter_values def index_term_function(self, key, value): """Index Term-Function.""" indicator_map2 = {"7": "Source specified in subfield $2"} field_map = { - '0': 'authority_record_control_number', - 'y': 'chronological_subdivision', - '2': 'source_of_term', - '6': 'linkage', - '3': 'materials_specified', - 'a': 'function', - 'z': 'geographic_subdivision', - 'x': 'general_subdivision', - '8': 'field_link_and_sequence_number', - 'v': 'form_subdivision', + "0": "authority_record_control_number", + "y": "chronological_subdivision", + "2": "source_of_term", + "6": "linkage", + "3": "materials_specified", + "a": "function", + "z": "geographic_subdivision", + "x": "general_subdivision", + "8": "field_link_and_sequence_number", + "v": "form_subdivision", } order = utils.map_order(field_map, value) - if key[4] in indicator_map2 and '2' not in value: - order.append('source_of_term') + if key[4] in indicator_map2 and "2" not in value: + order.append("source_of_term") return { - '__order__': tuple(order) if len(order) else None, - 'authority_record_control_number': utils.force_list(value.get('0')), - 'chronological_subdivision': utils.force_list(value.get('y')), - 'linkage': value.get('6'), - 'materials_specified': value.get('3'), - 'function': value.get('a'), - 'geographic_subdivision': utils.force_list(value.get('z')), - 'general_subdivision': utils.force_list(value.get('x')), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'form_subdivision': utils.force_list(value.get('v')), - 'source_of_term': value.get('2') - if key[4] == '7' + "__order__": tuple(order) if len(order) else None, + "authority_record_control_number": utils.force_list(value.get("0")), + "chronological_subdivision": utils.force_list(value.get("y")), + "linkage": value.get("6"), + "materials_specified": value.get("3"), + "function": value.get("a"), + "geographic_subdivision": utils.force_list(value.get("z")), + "general_subdivision": utils.force_list(value.get("x")), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "form_subdivision": utils.force_list(value.get("v")), + "source_of_term": value.get("2") + if key[4] == "7" else indicator_map2.get(key[4]), } -@marc21.over('index_term_curriculum_objective', '^658..') +@marc21.over("index_term_curriculum_objective", "^658..") @utils.for_each_value @utils.filter_values def index_term_curriculum_objective(self, key, value): """Index Term-Curriculum Objective.""" field_map = { - 'd': 'correlation_factor', - 'b': 'subordinate_curriculum_objective', - '2': 'source_of_term_or_code', - '6': 'linkage', - 'a': 'main_curriculum_objective', - '8': 'field_link_and_sequence_number', - 'c': 'curriculum_code', + "d": "correlation_factor", + "b": "subordinate_curriculum_objective", + "2": "source_of_term_or_code", + "6": "linkage", + "a": "main_curriculum_objective", + "8": "field_link_and_sequence_number", + "c": "curriculum_code", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'correlation_factor': value.get('d'), - 'subordinate_curriculum_objective': utils.force_list(value.get('b')), - 'source_of_term_or_code': value.get('2'), - 'linkage': value.get('6'), - 'main_curriculum_objective': value.get('a'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'curriculum_code': value.get('c'), + "__order__": tuple(order) if len(order) else None, + "correlation_factor": value.get("d"), + "subordinate_curriculum_objective": utils.force_list(value.get("b")), + "source_of_term_or_code": value.get("2"), + "linkage": value.get("6"), + "main_curriculum_objective": value.get("a"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "curriculum_code": value.get("c"), } -@marc21.over('subject_added_entry_hierarchical_place_name', '^662..') +@marc21.over("subject_added_entry_hierarchical_place_name", "^662..") @utils.for_each_value @utils.filter_values def subject_added_entry_hierarchical_place_name(self, key, value): """Subject Added Entry-Hierarchical Place Name.""" field_map = { - 'd': 'city', - 'f': 'city_subsection', - 'c': 'intermediate_political_jurisdiction', - 'h': 'extraterrestrial_area', - '4': 'relator_code', - '0': 'authority_record_control_number', - 'e': 'relator_term', - 'b': 'first_order_political_jurisdiction', - '2': 'source_of_heading_or_term', - '6': 'linkage', - 'a': 'country_or_larger_entity', - '8': 'field_link_and_sequence_number', - 'g': 'other_nonjurisdictional_geographic_region_and_feature', + "d": "city", + "f": "city_subsection", + "c": "intermediate_political_jurisdiction", + "h": "extraterrestrial_area", + "4": "relator_code", + "0": "authority_record_control_number", + "e": "relator_term", + "b": "first_order_political_jurisdiction", + "2": "source_of_heading_or_term", + "6": "linkage", + "a": "country_or_larger_entity", + "8": "field_link_and_sequence_number", + "g": "other_nonjurisdictional_geographic_region_and_feature", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'city': value.get('d'), - 'city_subsection': utils.force_list(value.get('f')), - 'intermediate_political_jurisdiction': utils.force_list( - value.get('c') + "__order__": tuple(order) if len(order) else None, + "city": value.get("d"), + "city_subsection": utils.force_list(value.get("f")), + "intermediate_political_jurisdiction": utils.force_list(value.get("c")), + "extraterrestrial_area": utils.force_list(value.get("h")), + "relator_code": utils.force_list(value.get("4")), + "authority_record_control_number": utils.force_list(value.get("0")), + "relator_term": utils.force_list(value.get("e")), + "first_order_political_jurisdiction": value.get("b"), + "source_of_heading_or_term": value.get("2"), + "linkage": value.get("6"), + "country_or_larger_entity": utils.force_list(value.get("a")), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "other_nonjurisdictional_geographic_region_and_feature": utils.force_list( + value.get("g") ), - 'extraterrestrial_area': utils.force_list(value.get('h')), - 'relator_code': utils.force_list(value.get('4')), - 'authority_record_control_number': utils.force_list(value.get('0')), - 'relator_term': utils.force_list(value.get('e')), - 'first_order_political_jurisdiction': value.get('b'), - 'source_of_heading_or_term': value.get('2'), - 'linkage': value.get('6'), - 'country_or_larger_entity': utils.force_list(value.get('a')), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'other_nonjurisdictional_geographic_region_and_feature': - utils.force_list(value.get('g')), } diff --git a/rero_ebooks/dojson/marc21/fields/bd70x75x.py b/rero_ebooks/dojson/marc21/fields/bd70x75x.py index da348c0..ef474f4 100644 --- a/rero_ebooks/dojson/marc21/fields/bd70x75x.py +++ b/rero_ebooks/dojson/marc21/fields/bd70x75x.py @@ -14,7 +14,7 @@ from ..model import marc21 -@marc21.over('added_entry_personal_name', '^700[_130][_2]') +@marc21.over("added_entry_personal_name", "^700[_130][_2]") @utils.for_each_value @utils.filter_values def added_entry_personal_name(self, key, value): @@ -22,84 +22,84 @@ def added_entry_personal_name(self, key, value): indicator_map1 = {"0": "Forename", "1": "Surname", "3": "Family name"} indicator_map2 = {"2": "Analytical entry", "_": "No information provided"} field_map = { - 't': 'title_of_a_work', - 'g': 'miscellaneous_information', - 'i': 'relationship_information', - '3': 'materials_specified', - 'x': 'international_standard_serial_number', - '4': 'relator_code', - 'e': 'relator_term', - 'f': 'date_of_a_work', - 'h': 'medium', - 'k': 'form_subheading', - 'b': 'numeration', - '6': 'linkage', - 'd': 'dates_associated_with_a_name', - 'a': 'personal_name', - '5': 'institution_to_which_field_applies', - '8': 'field_link_and_sequence_number', - '0': 'authority_record_control_number_or_standard_number', - 'q': 'fuller_form_of_name', - 's': 'version', - 'p': 'name_of_part_section_of_a_work', - 'l': 'language_of_a_work', - 'c': 'titles_and_other_words_associated_with_a_name', - 'r': 'key_for_music', - 'u': 'affiliation', - 'o': 'arranged_statement_for_music', - 'j': 'attribution_qualifier', - 'm': 'medium_of_performance_for_music', - 'n': 'number_of_part_section_of_a_work', + "t": "title_of_a_work", + "g": "miscellaneous_information", + "i": "relationship_information", + "3": "materials_specified", + "x": "international_standard_serial_number", + "4": "relator_code", + "e": "relator_term", + "f": "date_of_a_work", + "h": "medium", + "k": "form_subheading", + "b": "numeration", + "6": "linkage", + "d": "dates_associated_with_a_name", + "a": "personal_name", + "5": "institution_to_which_field_applies", + "8": "field_link_and_sequence_number", + "0": "authority_record_control_number_or_standard_number", + "q": "fuller_form_of_name", + "s": "version", + "p": "name_of_part_section_of_a_work", + "l": "language_of_a_work", + "c": "titles_and_other_words_associated_with_a_name", + "r": "key_for_music", + "u": "affiliation", + "o": "arranged_statement_for_music", + "j": "attribution_qualifier", + "m": "medium_of_performance_for_music", + "n": "number_of_part_section_of_a_work", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('type_of_personal_name_entry_element') + order.append("type_of_personal_name_entry_element") if key[4] in indicator_map2: - order.append('type_of_added_entry') + order.append("type_of_added_entry") return { - '__order__': tuple(order) if len(order) else None, - 'title_of_a_work': value.get('t'), - 'miscellaneous_information': utils.force_list(value.get('g')), - 'relationship_information': utils.force_list(value.get('i')), - 'materials_specified': value.get('3'), - 'international_standard_serial_number': value.get('x'), - 'relator_code': utils.force_list(value.get('4')), - 'relator_term': utils.force_list(value.get('e')), - 'date_of_a_work': value.get('f'), - 'medium': value.get('h'), - 'form_subheading': utils.force_list(value.get('k')), - 'numeration': value.get('b'), - 'linkage': value.get('6'), - 'dates_associated_with_a_name': value.get('d'), - 'personal_name': value.get('a'), - 'institution_to_which_field_applies': value.get('5'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'authority_record_control_number_or_standard_number': utils.force_list( - value.get('0') + "__order__": tuple(order) if len(order) else None, + "title_of_a_work": value.get("t"), + "miscellaneous_information": utils.force_list(value.get("g")), + "relationship_information": utils.force_list(value.get("i")), + "materials_specified": value.get("3"), + "international_standard_serial_number": value.get("x"), + "relator_code": utils.force_list(value.get("4")), + "relator_term": utils.force_list(value.get("e")), + "date_of_a_work": value.get("f"), + "medium": value.get("h"), + "form_subheading": utils.force_list(value.get("k")), + "numeration": value.get("b"), + "linkage": value.get("6"), + "dates_associated_with_a_name": value.get("d"), + "personal_name": value.get("a"), + "institution_to_which_field_applies": value.get("5"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "authority_record_control_number_or_standard_number": utils.force_list( + value.get("0") ), - 'fuller_form_of_name': value.get('q'), - 'version': value.get('s'), - 'name_of_part_section_of_a_work': utils.force_list(value.get('p')), - 'language_of_a_work': value.get('l'), - 'titles_and_other_words_associated_with_a_name': utils.force_list( - value.get('c') + "fuller_form_of_name": value.get("q"), + "version": value.get("s"), + "name_of_part_section_of_a_work": utils.force_list(value.get("p")), + "language_of_a_work": value.get("l"), + "titles_and_other_words_associated_with_a_name": utils.force_list( + value.get("c") ), - 'key_for_music': value.get('r'), - 'affiliation': value.get('u'), - 'arranged_statement_for_music': value.get('o'), - 'attribution_qualifier': utils.force_list(value.get('j')), - 'medium_of_performance_for_music': utils.force_list(value.get('m')), - 'number_of_part_section_of_a_work': utils.force_list(value.get('n')), - 'type_of_personal_name_entry_element': indicator_map1.get(key[3]), - 'type_of_added_entry': indicator_map2.get(key[4]), + "key_for_music": value.get("r"), + "affiliation": value.get("u"), + "arranged_statement_for_music": value.get("o"), + "attribution_qualifier": utils.force_list(value.get("j")), + "medium_of_performance_for_music": utils.force_list(value.get("m")), + "number_of_part_section_of_a_work": utils.force_list(value.get("n")), + "type_of_personal_name_entry_element": indicator_map1.get(key[3]), + "type_of_added_entry": indicator_map2.get(key[4]), } -@marc21.over('added_entry_corporate_name', '^710[_120][_2]') +@marc21.over("added_entry_corporate_name", "^710[_120][_2]") @utils.for_each_value @utils.filter_values def added_entry_corporate_name(self, key, value): @@ -111,80 +111,78 @@ def added_entry_corporate_name(self, key, value): } indicator_map2 = {"2": "Analytical entry", "_": "No information provided"} field_map = { - 't': 'title_of_a_work', - 'g': 'miscellaneous_information', - 'i': 'relationship_information', - '3': 'materials_specified', - 'x': 'international_standard_serial_number', - '4': 'relator_code', - 'e': 'relator_term', - 'f': 'date_of_a_work', - 'h': 'medium', - 'k': 'form_subheading', - 'b': 'subordinate_unit', - '6': 'linkage', - 'd': 'date_of_meeting_or_treaty_signing', - 'a': 'corporate_name_or_jurisdiction_name_as_entry_element', - '5': 'institution_to_which_field_applies', - '8': 'field_link_and_sequence_number', - '0': 'authority_record_control_number_or_standard_number', - 's': 'version', - 'p': 'name_of_part_section_of_a_work', - 'l': 'language_of_a_work', - 'c': 'location_of_meeting', - 'r': 'key_for_music', - 'u': 'affiliation', - 'o': 'arranged_statement_for_music', - 'm': 'medium_of_performance_for_music', - 'n': 'number_of_part_section_meeting', + "t": "title_of_a_work", + "g": "miscellaneous_information", + "i": "relationship_information", + "3": "materials_specified", + "x": "international_standard_serial_number", + "4": "relator_code", + "e": "relator_term", + "f": "date_of_a_work", + "h": "medium", + "k": "form_subheading", + "b": "subordinate_unit", + "6": "linkage", + "d": "date_of_meeting_or_treaty_signing", + "a": "corporate_name_or_jurisdiction_name_as_entry_element", + "5": "institution_to_which_field_applies", + "8": "field_link_and_sequence_number", + "0": "authority_record_control_number_or_standard_number", + "s": "version", + "p": "name_of_part_section_of_a_work", + "l": "language_of_a_work", + "c": "location_of_meeting", + "r": "key_for_music", + "u": "affiliation", + "o": "arranged_statement_for_music", + "m": "medium_of_performance_for_music", + "n": "number_of_part_section_meeting", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('type_of_corporate_name_entry_element') + order.append("type_of_corporate_name_entry_element") if key[4] in indicator_map2: - order.append('type_of_added_entry') + order.append("type_of_added_entry") return { - '__order__': tuple(order) if len(order) else None, - 'title_of_a_work': value.get('t'), - 'miscellaneous_information': utils.force_list(value.get('g')), - 'relationship_information': utils.force_list(value.get('i')), - 'materials_specified': value.get('3'), - 'international_standard_serial_number': value.get('x'), - 'relator_code': utils.force_list(value.get('4')), - 'relator_term': utils.force_list(value.get('e')), - 'date_of_a_work': value.get('f'), - 'medium': value.get('h'), - 'form_subheading': utils.force_list(value.get('k')), - 'subordinate_unit': utils.force_list(value.get('b')), - 'linkage': value.get('6'), - 'date_of_meeting_or_treaty_signing': utils.force_list(value.get('d')), - 'corporate_name_or_jurisdiction_name_as_entry_element': value.get( - 'a' + "__order__": tuple(order) if len(order) else None, + "title_of_a_work": value.get("t"), + "miscellaneous_information": utils.force_list(value.get("g")), + "relationship_information": utils.force_list(value.get("i")), + "materials_specified": value.get("3"), + "international_standard_serial_number": value.get("x"), + "relator_code": utils.force_list(value.get("4")), + "relator_term": utils.force_list(value.get("e")), + "date_of_a_work": value.get("f"), + "medium": value.get("h"), + "form_subheading": utils.force_list(value.get("k")), + "subordinate_unit": utils.force_list(value.get("b")), + "linkage": value.get("6"), + "date_of_meeting_or_treaty_signing": utils.force_list(value.get("d")), + "corporate_name_or_jurisdiction_name_as_entry_element": value.get("a"), + "institution_to_which_field_applies": value.get("5"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "authority_record_control_number_or_standard_number": utils.force_list( + value.get("0") ), - 'institution_to_which_field_applies': value.get('5'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'authority_record_control_number_or_standard_number': utils.force_list( - value.get('0') - ), - 'version': value.get('s'), - 'name_of_part_section_of_a_work': utils.force_list(value.get('p')), - 'language_of_a_work': value.get('l'), - 'location_of_meeting': utils.force_list(value.get('c')), - 'key_for_music': value.get('r'), - 'affiliation': value.get('u'), - 'arranged_statement_for_music': value.get('o'), - 'medium_of_performance_for_music': utils.force_list(value.get('m')), - 'number_of_part_section_meeting': utils.force_list(value.get('n')), - 'type_of_corporate_name_entry_element': indicator_map1.get(key[3]), - 'type_of_added_entry': indicator_map2.get(key[4]), + "version": value.get("s"), + "name_of_part_section_of_a_work": utils.force_list(value.get("p")), + "language_of_a_work": value.get("l"), + "location_of_meeting": utils.force_list(value.get("c")), + "key_for_music": value.get("r"), + "affiliation": value.get("u"), + "arranged_statement_for_music": value.get("o"), + "medium_of_performance_for_music": utils.force_list(value.get("m")), + "number_of_part_section_meeting": utils.force_list(value.get("n")), + "type_of_corporate_name_entry_element": indicator_map1.get(key[3]), + "type_of_added_entry": indicator_map2.get(key[4]), } -@marc21.over('added_entry_meeting_name', '^711[_120][_2]') +@marc21.over("added_entry_meeting_name", "^711[_120][_2]") @utils.for_each_value @utils.filter_values def added_entry_meeting_name(self, key, value): @@ -196,106 +194,104 @@ def added_entry_meeting_name(self, key, value): } indicator_map2 = {"2": "Analytical entry", "_": "No information provided"} field_map = { - 't': 'title_of_a_work', - 'g': 'miscellaneous_information', - 'i': 'relationship_information', - '3': 'materials_specified', - 'x': 'international_standard_serial_number', - '4': 'relator_code', - 'e': 'subordinate_unit', - 'f': 'date_of_a_work', - 'h': 'medium', - 'k': 'form_subheading', - '6': 'linkage', - 'd': 'date_of_meeting', - 'a': 'meeting_name_or_jurisdiction_name_as_entry_element', - '5': 'institution_to_which_field_applies', - '8': 'field_link_and_sequence_number', - '0': 'authority_record_control_number_or_standard_number', - 'q': 'name_of_meeting_following_jurisdiction_name_entry_element', - 's': 'version', - 'p': 'name_of_part_section_of_a_work', - 'l': 'language_of_a_work', - 'c': 'location_of_meeting', - 'u': 'affiliation', - 'j': 'relator_term', - 'n': 'number_of_part_section_meeting', + "t": "title_of_a_work", + "g": "miscellaneous_information", + "i": "relationship_information", + "3": "materials_specified", + "x": "international_standard_serial_number", + "4": "relator_code", + "e": "subordinate_unit", + "f": "date_of_a_work", + "h": "medium", + "k": "form_subheading", + "6": "linkage", + "d": "date_of_meeting", + "a": "meeting_name_or_jurisdiction_name_as_entry_element", + "5": "institution_to_which_field_applies", + "8": "field_link_and_sequence_number", + "0": "authority_record_control_number_or_standard_number", + "q": "name_of_meeting_following_jurisdiction_name_entry_element", + "s": "version", + "p": "name_of_part_section_of_a_work", + "l": "language_of_a_work", + "c": "location_of_meeting", + "u": "affiliation", + "j": "relator_term", + "n": "number_of_part_section_meeting", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('type_of_meeting_name_entry_element') + order.append("type_of_meeting_name_entry_element") if key[4] in indicator_map2: - order.append('type_of_added_entry') + order.append("type_of_added_entry") return { - '__order__': tuple(order) if len(order) else None, - 'title_of_a_work': value.get('t'), - 'miscellaneous_information': utils.force_list(value.get('g')), - 'relationship_information': utils.force_list(value.get('i')), - 'materials_specified': value.get('3'), - 'international_standard_serial_number': value.get('x'), - 'relator_code': utils.force_list(value.get('4')), - 'subordinate_unit': utils.force_list(value.get('e')), - 'date_of_a_work': value.get('f'), - 'medium': value.get('h'), - 'form_subheading': utils.force_list(value.get('k')), - 'linkage': value.get('6'), - 'date_of_meeting': value.get('d'), - 'meeting_name_or_jurisdiction_name_as_entry_element': value.get('a'), - 'institution_to_which_field_applies': value.get('5'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'authority_record_control_number_or_standard_number': utils.force_list( - value.get('0') - ), - 'name_of_meeting_following_jurisdiction_name_entry_element': value.get( - 'q' + "__order__": tuple(order) if len(order) else None, + "title_of_a_work": value.get("t"), + "miscellaneous_information": utils.force_list(value.get("g")), + "relationship_information": utils.force_list(value.get("i")), + "materials_specified": value.get("3"), + "international_standard_serial_number": value.get("x"), + "relator_code": utils.force_list(value.get("4")), + "subordinate_unit": utils.force_list(value.get("e")), + "date_of_a_work": value.get("f"), + "medium": value.get("h"), + "form_subheading": utils.force_list(value.get("k")), + "linkage": value.get("6"), + "date_of_meeting": value.get("d"), + "meeting_name_or_jurisdiction_name_as_entry_element": value.get("a"), + "institution_to_which_field_applies": value.get("5"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "authority_record_control_number_or_standard_number": utils.force_list( + value.get("0") ), - 'version': value.get('s'), - 'name_of_part_section_of_a_work': utils.force_list(value.get('p')), - 'language_of_a_work': value.get('l'), - 'location_of_meeting': utils.force_list(value.get('c')), - 'affiliation': value.get('u'), - 'relator_term': utils.force_list(value.get('j')), - 'number_of_part_section_meeting': utils.force_list(value.get('n')), - 'type_of_meeting_name_entry_element': indicator_map1.get(key[3]), - 'type_of_added_entry': indicator_map2.get(key[4]), + "name_of_meeting_following_jurisdiction_name_entry_element": value.get("q"), + "version": value.get("s"), + "name_of_part_section_of_a_work": utils.force_list(value.get("p")), + "language_of_a_work": value.get("l"), + "location_of_meeting": utils.force_list(value.get("c")), + "affiliation": value.get("u"), + "relator_term": utils.force_list(value.get("j")), + "number_of_part_section_meeting": utils.force_list(value.get("n")), + "type_of_meeting_name_entry_element": indicator_map1.get(key[3]), + "type_of_added_entry": indicator_map2.get(key[4]), } -@marc21.over('added_entry_uncontrolled_name', '^720[_12].') +@marc21.over("added_entry_uncontrolled_name", "^720[_12].") @utils.for_each_value @utils.filter_values def added_entry_uncontrolled_name(self, key, value): """Added Entry-Uncontrolled Name.""" indicator_map1 = {"1": "Personal", "2": "Other", "_": "Not specified"} field_map = { - 'e': 'relator_term', - 'a': 'name', - '4': 'relator_code', - '6': 'linkage', - '8': 'field_link_and_sequence_number', + "e": "relator_term", + "a": "name", + "4": "relator_code", + "6": "linkage", + "8": "field_link_and_sequence_number", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('type_of_name') + order.append("type_of_name") return { - '__order__': tuple(order) if len(order) else None, - 'relator_term': utils.force_list(value.get('e')), - 'name': value.get('a'), - 'relator_code': utils.force_list(value.get('4')), - 'linkage': value.get('6'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'type_of_name': indicator_map1.get(key[3]), + "__order__": tuple(order) if len(order) else None, + "relator_term": utils.force_list(value.get("e")), + "name": value.get("a"), + "relator_code": utils.force_list(value.get("4")), + "linkage": value.get("6"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "type_of_name": indicator_map1.get(key[3]), } -@marc21.over('added_entry_uniform_title', '^730[5830_249176][_2]') +@marc21.over("added_entry_uniform_title", "^730[5830_249176][_2]") @utils.for_each_value @utils.filter_values def added_entry_uniform_title(self, key, value): @@ -303,70 +299,70 @@ def added_entry_uniform_title(self, key, value): indicator_map1 = {str(x): str(x) for x in range(10)} indicator_map2 = {"2": "Analytical entry", "_": "No information provided"} field_map = { - 't': 'title_of_a_work', - 'a': 'uniform_title', - '5': 'institution_to_which_field_applies', - '8': 'field_link_and_sequence_number', - '3': 'materials_specified', - 'g': 'miscellaneous_information', - 'x': 'international_standard_serial_number', - 's': 'version', - 'p': 'name_of_part_section_of_a_work', - '0': 'authority_record_control_number_or_standard_number', - 'm': 'medium_of_performance_for_music', - 'r': 'key_for_music', - 'f': 'date_of_a_work', - 'h': 'medium', - 'i': 'relationship_information', - 'k': 'form_subheading', - 'o': 'arranged_statement_for_music', - 'l': 'language_of_a_work', - '6': 'linkage', - 'd': 'date_of_treaty_signing', - 'n': 'number_of_part_section_of_a_work', + "t": "title_of_a_work", + "a": "uniform_title", + "5": "institution_to_which_field_applies", + "8": "field_link_and_sequence_number", + "3": "materials_specified", + "g": "miscellaneous_information", + "x": "international_standard_serial_number", + "s": "version", + "p": "name_of_part_section_of_a_work", + "0": "authority_record_control_number_or_standard_number", + "m": "medium_of_performance_for_music", + "r": "key_for_music", + "f": "date_of_a_work", + "h": "medium", + "i": "relationship_information", + "k": "form_subheading", + "o": "arranged_statement_for_music", + "l": "language_of_a_work", + "6": "linkage", + "d": "date_of_treaty_signing", + "n": "number_of_part_section_of_a_work", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('nonfiling_characters') + order.append("nonfiling_characters") if key[4] in indicator_map2: - order.append('type_of_added_entry') + order.append("type_of_added_entry") return { - '__order__': tuple(order) if len(order) else None, - 'title_of_a_work': value.get('t'), - 'uniform_title': value.get('a'), - 'institution_to_which_field_applies': value.get('5'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'materials_specified': value.get('3'), - 'miscellaneous_information': utils.force_list(value.get('g')), - 'international_standard_serial_number': value.get('x'), - 'version': value.get('s'), - 'name_of_part_section_of_a_work': utils.force_list(value.get('p')), - 'authority_record_control_number_or_standard_number': utils.force_list( - value.get('0') + "__order__": tuple(order) if len(order) else None, + "title_of_a_work": value.get("t"), + "uniform_title": value.get("a"), + "institution_to_which_field_applies": value.get("5"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "materials_specified": value.get("3"), + "miscellaneous_information": utils.force_list(value.get("g")), + "international_standard_serial_number": value.get("x"), + "version": value.get("s"), + "name_of_part_section_of_a_work": utils.force_list(value.get("p")), + "authority_record_control_number_or_standard_number": utils.force_list( + value.get("0") ), - 'medium_of_performance_for_music': utils.force_list(value.get('m')), - 'key_for_music': value.get('r'), - 'date_of_a_work': value.get('f'), - 'medium': value.get('h'), - 'relationship_information': utils.force_list(value.get('i')), - 'form_subheading': utils.force_list(value.get('k')), - 'arranged_statement_for_music': value.get('o'), - 'language_of_a_work': value.get('l'), - 'linkage': value.get('6'), - 'date_of_treaty_signing': utils.force_list(value.get('d')), - 'number_of_part_section_of_a_work': utils.force_list(value.get('n')), - 'nonfiling_characters': indicator_map1.get(key[3]), - 'type_of_added_entry': indicator_map2.get(key[4]), + "medium_of_performance_for_music": utils.force_list(value.get("m")), + "key_for_music": value.get("r"), + "date_of_a_work": value.get("f"), + "medium": value.get("h"), + "relationship_information": utils.force_list(value.get("i")), + "form_subheading": utils.force_list(value.get("k")), + "arranged_statement_for_music": value.get("o"), + "language_of_a_work": value.get("l"), + "linkage": value.get("6"), + "date_of_treaty_signing": utils.force_list(value.get("d")), + "number_of_part_section_of_a_work": utils.force_list(value.get("n")), + "nonfiling_characters": indicator_map1.get(key[3]), + "type_of_added_entry": indicator_map2.get(key[4]), } @marc21.over( - 'added_entry_uncontrolled_related_analytical_title', - '^740[5830_249176][_2]', + "added_entry_uncontrolled_related_analytical_title", + "^740[5830_249176][_2]", ) @utils.for_each_value @utils.filter_values @@ -375,167 +371,166 @@ def added_entry_uncontrolled_related_analytical_title(self, key, value): indicator_map1 = {str(x): str(x) for x in range(10)} indicator_map2 = {"2": "Analytical entry", "_": "No information provided"} field_map = { - 'a': 'uncontrolled_related_analytical_title', - 'h': 'medium', - '5': 'institution_to_which_field_applies', - '8': 'field_link_and_sequence_number', - 'p': 'name_of_part_section_of_a_work', - 'n': 'number_of_part_section_of_a_work', - '6': 'linkage', + "a": "uncontrolled_related_analytical_title", + "h": "medium", + "5": "institution_to_which_field_applies", + "8": "field_link_and_sequence_number", + "p": "name_of_part_section_of_a_work", + "n": "number_of_part_section_of_a_work", + "6": "linkage", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('nonfiling_characters') + order.append("nonfiling_characters") if key[4] in indicator_map2: - order.append('type_of_added_entry') + order.append("type_of_added_entry") return { - '__order__': tuple(order) if len(order) else None, - 'uncontrolled_related_analytical_title': value.get('a'), - 'medium': value.get('h'), - 'institution_to_which_field_applies': value.get('5'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'name_of_part_section_of_a_work': utils.force_list(value.get('p')), - 'number_of_part_section_of_a_work': utils.force_list(value.get('n')), - 'linkage': value.get('6'), - 'nonfiling_characters': indicator_map1.get(key[3]), - 'type_of_added_entry': indicator_map2.get(key[4]), + "__order__": tuple(order) if len(order) else None, + "uncontrolled_related_analytical_title": value.get("a"), + "medium": value.get("h"), + "institution_to_which_field_applies": value.get("5"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "name_of_part_section_of_a_work": utils.force_list(value.get("p")), + "number_of_part_section_of_a_work": utils.force_list(value.get("n")), + "linkage": value.get("6"), + "nonfiling_characters": indicator_map1.get(key[3]), + "type_of_added_entry": indicator_map2.get(key[4]), } -@marc21.over('added_entry_geographic_name', '^751..') +@marc21.over("added_entry_geographic_name", "^751..") @utils.for_each_value @utils.filter_values def added_entry_geographic_name(self, key, value): """Added Entry-Geographic Name.""" field_map = { - 'e': 'relator_term', - 'a': 'geographic_name', - '8': 'field_link_and_sequence_number', - '3': 'materials_specified', - '0': 'authority_record_control_number', - '2': 'source_of_heading_or_term', - '4': 'relator_code', - '6': 'linkage', + "e": "relator_term", + "a": "geographic_name", + "8": "field_link_and_sequence_number", + "3": "materials_specified", + "0": "authority_record_control_number", + "2": "source_of_heading_or_term", + "4": "relator_code", + "6": "linkage", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'relator_term': utils.force_list(value.get('e')), - 'geographic_name': value.get('a'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'materials_specified': value.get('3'), - 'authority_record_control_number': utils.force_list(value.get('0')), - 'source_of_heading_or_term': value.get('2'), - 'relator_code': utils.force_list(value.get('4')), - 'linkage': value.get('6'), + "__order__": tuple(order) if len(order) else None, + "relator_term": utils.force_list(value.get("e")), + "geographic_name": value.get("a"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "materials_specified": value.get("3"), + "authority_record_control_number": utils.force_list(value.get("0")), + "source_of_heading_or_term": value.get("2"), + "relator_code": utils.force_list(value.get("4")), + "linkage": value.get("6"), } -@marc21.over('added_entry_hierarchical_place_name', '^752..') +@marc21.over("added_entry_hierarchical_place_name", "^752..") @utils.for_each_value @utils.filter_values def added_entry_hierarchical_place_name(self, key, value): """Added Entry-Hierarchical Place Name.""" field_map = { - 'a': 'country_or_larger_entity', - 'h': 'extraterrestrial_area', - 'g': 'other_nonjurisdictional_geographic_region_and_feature', - '8': 'field_link_and_sequence_number', - '0': 'authority_record_control_number', - 'f': 'city_subsection', - 'b': 'first_order_political_jurisdiction', - '2': 'source_of_heading_or_term', - '6': 'linkage', - 'c': 'intermediate_political_jurisdiction', - 'd': 'city', + "a": "country_or_larger_entity", + "h": "extraterrestrial_area", + "g": "other_nonjurisdictional_geographic_region_and_feature", + "8": "field_link_and_sequence_number", + "0": "authority_record_control_number", + "f": "city_subsection", + "b": "first_order_political_jurisdiction", + "2": "source_of_heading_or_term", + "6": "linkage", + "c": "intermediate_political_jurisdiction", + "d": "city", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'country_or_larger_entity': utils.force_list(value.get('a')), - 'extraterrestrial_area': utils.force_list(value.get('h')), - 'other_nonjurisdictional_geographic_region_and_feature': - utils.force_list(value.get('g')), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'authority_record_control_number': utils.force_list(value.get('0')), - 'city_subsection': utils.force_list(value.get('f')), - 'first_order_political_jurisdiction': value.get('b'), - 'source_of_heading_or_term': value.get('2'), - 'linkage': value.get('6'), - 'intermediate_political_jurisdiction': utils.force_list( - value.get('c') + "__order__": tuple(order) if len(order) else None, + "country_or_larger_entity": utils.force_list(value.get("a")), + "extraterrestrial_area": utils.force_list(value.get("h")), + "other_nonjurisdictional_geographic_region_and_feature": utils.force_list( + value.get("g") ), - 'city': value.get('d'), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "authority_record_control_number": utils.force_list(value.get("0")), + "city_subsection": utils.force_list(value.get("f")), + "first_order_political_jurisdiction": value.get("b"), + "source_of_heading_or_term": value.get("2"), + "linkage": value.get("6"), + "intermediate_political_jurisdiction": utils.force_list(value.get("c")), + "city": value.get("d"), } -@marc21.over('system_details_access_to_computer_files', '^753..') +@marc21.over("system_details_access_to_computer_files", "^753..") @utils.for_each_value @utils.filter_values def system_details_access_to_computer_files(self, key, value): """System Details Access to Computer Files.""" field_map = { - 'a': 'make_and_model_of_machine', - '8': 'field_link_and_sequence_number', - '0': 'authority_record_control_number_or_standard_number', - 'b': 'programming_language', - '2': 'source_of_term', - '6': 'linkage', - 'c': 'operating_system', + "a": "make_and_model_of_machine", + "8": "field_link_and_sequence_number", + "0": "authority_record_control_number_or_standard_number", + "b": "programming_language", + "2": "source_of_term", + "6": "linkage", + "c": "operating_system", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'make_and_model_of_machine': value.get('a'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'authority_record_control_number_or_standard_number': utils.force_list( - value.get('0') + "__order__": tuple(order) if len(order) else None, + "make_and_model_of_machine": value.get("a"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "authority_record_control_number_or_standard_number": utils.force_list( + value.get("0") ), - 'programming_language': value.get('b'), - 'source_of_term': value.get('2'), - 'linkage': value.get('6'), - 'operating_system': value.get('c'), + "programming_language": value.get("b"), + "source_of_term": value.get("2"), + "linkage": value.get("6"), + "operating_system": value.get("c"), } -@marc21.over('added_entry_taxonomic_identification', '^754..') +@marc21.over("added_entry_taxonomic_identification", "^754..") @utils.for_each_value @utils.filter_values def added_entry_taxonomic_identification(self, key, value): """Added Entry-Taxonomic Identification.""" field_map = { - 'z': 'public_note', - 'a': 'taxonomic_name', - '8': 'field_link_and_sequence_number', - '0': 'authority_record_control_number', - '2': 'source_of_taxonomic_identification', - 'x': 'non_public_note', - '6': 'linkage', - 'c': 'taxonomic_category', - 'd': 'common_or_alternative_name', + "z": "public_note", + "a": "taxonomic_name", + "8": "field_link_and_sequence_number", + "0": "authority_record_control_number", + "2": "source_of_taxonomic_identification", + "x": "non_public_note", + "6": "linkage", + "c": "taxonomic_category", + "d": "common_or_alternative_name", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'public_note': utils.force_list(value.get('z')), - 'taxonomic_name': utils.force_list(value.get('a')), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'authority_record_control_number': utils.force_list(value.get('0')), - 'source_of_taxonomic_identification': value.get('2'), - 'non_public_note': utils.force_list(value.get('x')), - 'linkage': value.get('6'), - 'taxonomic_category': utils.force_list(value.get('c')), - 'common_or_alternative_name': utils.force_list(value.get('d')), + "__order__": tuple(order) if len(order) else None, + "public_note": utils.force_list(value.get("z")), + "taxonomic_name": utils.force_list(value.get("a")), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "authority_record_control_number": utils.force_list(value.get("0")), + "source_of_taxonomic_identification": value.get("2"), + "non_public_note": utils.force_list(value.get("x")), + "linkage": value.get("6"), + "taxonomic_category": utils.force_list(value.get("c")), + "common_or_alternative_name": utils.force_list(value.get("d")), } diff --git a/rero_ebooks/dojson/marc21/fields/bd76x78x.py b/rero_ebooks/dojson/marc21/fields/bd76x78x.py index abb8232..159ab42 100644 --- a/rero_ebooks/dojson/marc21/fields/bd76x78x.py +++ b/rero_ebooks/dojson/marc21/fields/bd76x78x.py @@ -14,7 +14,7 @@ from ..model import marc21 -@marc21.over('main_series_entry', '^760[_10][_8]') +@marc21.over("main_series_entry", "^760[_10][_8]") @utils.for_each_value @utils.filter_values def main_series_entry(self, key, value): @@ -22,62 +22,62 @@ def main_series_entry(self, key, value): indicator_map1 = {"0": "Display note", "1": "Do not display note"} indicator_map2 = {"8": "No display constant generated", "_": "Main series"} field_map = { - 'g': 'related_parts', - 't': 'title', - 'm': 'material_specific_details', - 'n': 'note', - 'o': 'other_item_identifier', - 'x': 'international_standard_serial_number', - 's': 'uniform_title', - '7': 'control_subfield', - 'h': 'physical_description', - 'c': 'qualifying_information', - 'y': 'coden_designation', - 'i': 'relationship_information', - 'a': 'main_entry_heading', - 'w': 'record_control_number', - '4': 'relationship_code', - '8': 'field_link_and_sequence_number', - 'd': 'place_publisher_and_date_of_publication', - 'b': 'edition', - '6': 'linkage', + "g": "related_parts", + "t": "title", + "m": "material_specific_details", + "n": "note", + "o": "other_item_identifier", + "x": "international_standard_serial_number", + "s": "uniform_title", + "7": "control_subfield", + "h": "physical_description", + "c": "qualifying_information", + "y": "coden_designation", + "i": "relationship_information", + "a": "main_entry_heading", + "w": "record_control_number", + "4": "relationship_code", + "8": "field_link_and_sequence_number", + "d": "place_publisher_and_date_of_publication", + "b": "edition", + "6": "linkage", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('note_controller') + order.append("note_controller") if key[4] in indicator_map2: - order.append('display_constant_controller') + order.append("display_constant_controller") return { - '__order__': tuple(order) if len(order) else None, - 'related_parts': utils.force_list(value.get('g')), - 'title': value.get('t'), - 'material_specific_details': value.get('m'), - 'note': utils.force_list(value.get('n')), - 'other_item_identifier': utils.force_list(value.get('o')), - 'international_standard_serial_number': value.get('x'), - 'uniform_title': value.get('s'), - 'control_subfield': value.get('7'), - 'physical_description': value.get('h'), - 'qualifying_information': value.get('c'), - 'coden_designation': value.get('y'), - 'relationship_information': utils.force_list(value.get('i')), - 'main_entry_heading': value.get('a'), - 'record_control_number': utils.force_list(value.get('w')), - 'relationship_code': utils.force_list(value.get('4')), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'place_publisher_and_date_of_publication': value.get('d'), - 'edition': value.get('b'), - 'linkage': value.get('6'), - 'note_controller': indicator_map1.get(key[3]), - 'display_constant_controller': indicator_map2.get(key[4]), + "__order__": tuple(order) if len(order) else None, + "related_parts": utils.force_list(value.get("g")), + "title": value.get("t"), + "material_specific_details": value.get("m"), + "note": utils.force_list(value.get("n")), + "other_item_identifier": utils.force_list(value.get("o")), + "international_standard_serial_number": value.get("x"), + "uniform_title": value.get("s"), + "control_subfield": value.get("7"), + "physical_description": value.get("h"), + "qualifying_information": value.get("c"), + "coden_designation": value.get("y"), + "relationship_information": utils.force_list(value.get("i")), + "main_entry_heading": value.get("a"), + "record_control_number": utils.force_list(value.get("w")), + "relationship_code": utils.force_list(value.get("4")), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "place_publisher_and_date_of_publication": value.get("d"), + "edition": value.get("b"), + "linkage": value.get("6"), + "note_controller": indicator_map1.get(key[3]), + "display_constant_controller": indicator_map2.get(key[4]), } -@marc21.over('subseries_entry', '^762[_10][_8]') +@marc21.over("subseries_entry", "^762[_10][_8]") @utils.for_each_value @utils.filter_values def subseries_entry(self, key, value): @@ -88,62 +88,62 @@ def subseries_entry(self, key, value): "_": "Has subseries", } field_map = { - 'g': 'related_parts', - 't': 'title', - 'm': 'material_specific_details', - 'n': 'note', - 'o': 'other_item_identifier', - 'x': 'international_standard_serial_number', - 's': 'uniform_title', - '7': 'control_subfield', - 'h': 'physical_description', - 'c': 'qualifying_information', - 'y': 'coden_designation', - 'i': 'relationship_information', - 'a': 'main_entry_heading', - 'w': 'record_control_number', - '4': 'relationship_code', - '8': 'field_link_and_sequence_number', - 'd': 'place_publisher_and_date_of_publication', - 'b': 'edition', - '6': 'linkage', + "g": "related_parts", + "t": "title", + "m": "material_specific_details", + "n": "note", + "o": "other_item_identifier", + "x": "international_standard_serial_number", + "s": "uniform_title", + "7": "control_subfield", + "h": "physical_description", + "c": "qualifying_information", + "y": "coden_designation", + "i": "relationship_information", + "a": "main_entry_heading", + "w": "record_control_number", + "4": "relationship_code", + "8": "field_link_and_sequence_number", + "d": "place_publisher_and_date_of_publication", + "b": "edition", + "6": "linkage", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('note_controller') + order.append("note_controller") if key[4] in indicator_map2: - order.append('display_constant_controller') + order.append("display_constant_controller") return { - '__order__': tuple(order) if len(order) else None, - 'related_parts': utils.force_list(value.get('g')), - 'title': value.get('t'), - 'material_specific_details': value.get('m'), - 'note': utils.force_list(value.get('n')), - 'other_item_identifier': utils.force_list(value.get('o')), - 'international_standard_serial_number': value.get('x'), - 'uniform_title': value.get('s'), - 'control_subfield': value.get('7'), - 'physical_description': value.get('h'), - 'qualifying_information': value.get('c'), - 'coden_designation': value.get('y'), - 'relationship_information': utils.force_list(value.get('i')), - 'main_entry_heading': value.get('a'), - 'record_control_number': utils.force_list(value.get('w')), - 'relationship_code': utils.force_list(value.get('4')), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'place_publisher_and_date_of_publication': value.get('d'), - 'edition': value.get('b'), - 'linkage': value.get('6'), - 'note_controller': indicator_map1.get(key[3]), - 'display_constant_controller': indicator_map2.get(key[4]), + "__order__": tuple(order) if len(order) else None, + "related_parts": utils.force_list(value.get("g")), + "title": value.get("t"), + "material_specific_details": value.get("m"), + "note": utils.force_list(value.get("n")), + "other_item_identifier": utils.force_list(value.get("o")), + "international_standard_serial_number": value.get("x"), + "uniform_title": value.get("s"), + "control_subfield": value.get("7"), + "physical_description": value.get("h"), + "qualifying_information": value.get("c"), + "coden_designation": value.get("y"), + "relationship_information": utils.force_list(value.get("i")), + "main_entry_heading": value.get("a"), + "record_control_number": utils.force_list(value.get("w")), + "relationship_code": utils.force_list(value.get("4")), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "place_publisher_and_date_of_publication": value.get("d"), + "edition": value.get("b"), + "linkage": value.get("6"), + "note_controller": indicator_map1.get(key[3]), + "display_constant_controller": indicator_map2.get(key[4]), } -@marc21.over('original_language_entry', '^765[_10][_8]') +@marc21.over("original_language_entry", "^765[_10][_8]") @utils.for_each_value @utils.filter_values def original_language_entry(self, key, value): @@ -154,70 +154,70 @@ def original_language_entry(self, key, value): "_": "Translation of", } field_map = { - 'y': 'coden_designation', - 't': 'title', - 'm': 'material_specific_details', - 'n': 'note', - 'o': 'other_item_identifier', - 'x': 'international_standard_serial_number', - '7': 'control_subfield', - 'h': 'physical_description', - 'i': 'relationship_information', - 'z': 'international_standard_book_number', - 'b': 'edition', - 'g': 'related_parts', - 'w': 'record_control_number', - 'r': 'report_number', - 'k': 'series_data_for_related_item', - 's': 'uniform_title', - 'c': 'qualifying_information', - 'a': 'main_entry_heading', - '4': 'relationship_code', - '8': 'field_link_and_sequence_number', - 'd': 'place_publisher_and_date_of_publication', - 'u': 'standard_technical_report_number', - '6': 'linkage', + "y": "coden_designation", + "t": "title", + "m": "material_specific_details", + "n": "note", + "o": "other_item_identifier", + "x": "international_standard_serial_number", + "7": "control_subfield", + "h": "physical_description", + "i": "relationship_information", + "z": "international_standard_book_number", + "b": "edition", + "g": "related_parts", + "w": "record_control_number", + "r": "report_number", + "k": "series_data_for_related_item", + "s": "uniform_title", + "c": "qualifying_information", + "a": "main_entry_heading", + "4": "relationship_code", + "8": "field_link_and_sequence_number", + "d": "place_publisher_and_date_of_publication", + "u": "standard_technical_report_number", + "6": "linkage", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('note_controller') + order.append("note_controller") if key[4] in indicator_map2: - order.append('display_constant_controller') + order.append("display_constant_controller") return { - '__order__': tuple(order) if len(order) else None, - 'coden_designation': value.get('y'), - 'title': value.get('t'), - 'material_specific_details': value.get('m'), - 'note': utils.force_list(value.get('n')), - 'other_item_identifier': utils.force_list(value.get('o')), - 'international_standard_serial_number': value.get('x'), - 'control_subfield': value.get('7'), - 'physical_description': value.get('h'), - 'relationship_information': utils.force_list(value.get('i')), - 'international_standard_book_number': utils.force_list(value.get('z')), - 'edition': value.get('b'), - 'related_parts': utils.force_list(value.get('g')), - 'record_control_number': utils.force_list(value.get('w')), - 'report_number': utils.force_list(value.get('r')), - 'series_data_for_related_item': utils.force_list(value.get('k')), - 'uniform_title': value.get('s'), - 'qualifying_information': value.get('c'), - 'main_entry_heading': value.get('a'), - 'relationship_code': utils.force_list(value.get('4')), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'place_publisher_and_date_of_publication': value.get('d'), - 'standard_technical_report_number': value.get('u'), - 'linkage': value.get('6'), - 'note_controller': indicator_map1.get(key[3]), - 'display_constant_controller': indicator_map2.get(key[4]), + "__order__": tuple(order) if len(order) else None, + "coden_designation": value.get("y"), + "title": value.get("t"), + "material_specific_details": value.get("m"), + "note": utils.force_list(value.get("n")), + "other_item_identifier": utils.force_list(value.get("o")), + "international_standard_serial_number": value.get("x"), + "control_subfield": value.get("7"), + "physical_description": value.get("h"), + "relationship_information": utils.force_list(value.get("i")), + "international_standard_book_number": utils.force_list(value.get("z")), + "edition": value.get("b"), + "related_parts": utils.force_list(value.get("g")), + "record_control_number": utils.force_list(value.get("w")), + "report_number": utils.force_list(value.get("r")), + "series_data_for_related_item": utils.force_list(value.get("k")), + "uniform_title": value.get("s"), + "qualifying_information": value.get("c"), + "main_entry_heading": value.get("a"), + "relationship_code": utils.force_list(value.get("4")), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "place_publisher_and_date_of_publication": value.get("d"), + "standard_technical_report_number": value.get("u"), + "linkage": value.get("6"), + "note_controller": indicator_map1.get(key[3]), + "display_constant_controller": indicator_map2.get(key[4]), } -@marc21.over('translation_entry', '^767[_10][_8]') +@marc21.over("translation_entry", "^767[_10][_8]") @utils.for_each_value @utils.filter_values def translation_entry(self, key, value): @@ -228,70 +228,70 @@ def translation_entry(self, key, value): "_": "Translated as", } field_map = { - 'y': 'coden_designation', - 't': 'title', - 'm': 'material_specific_details', - 'n': 'note', - 'o': 'other_item_identifier', - 'x': 'international_standard_serial_number', - '7': 'control_subfield', - 'h': 'physical_description', - 'i': 'relationship_information', - 'z': 'international_standard_book_number', - 'b': 'edition', - 'g': 'related_parts', - 'w': 'record_control_number', - 'r': 'report_number', - 'k': 'series_data_for_related_item', - 's': 'uniform_title', - 'c': 'qualifying_information', - 'a': 'main_entry_heading', - '4': 'relationship_code', - '8': 'field_link_and_sequence_number', - 'd': 'place_publisher_and_date_of_publication', - 'u': 'standard_technical_report_number', - '6': 'linkage', + "y": "coden_designation", + "t": "title", + "m": "material_specific_details", + "n": "note", + "o": "other_item_identifier", + "x": "international_standard_serial_number", + "7": "control_subfield", + "h": "physical_description", + "i": "relationship_information", + "z": "international_standard_book_number", + "b": "edition", + "g": "related_parts", + "w": "record_control_number", + "r": "report_number", + "k": "series_data_for_related_item", + "s": "uniform_title", + "c": "qualifying_information", + "a": "main_entry_heading", + "4": "relationship_code", + "8": "field_link_and_sequence_number", + "d": "place_publisher_and_date_of_publication", + "u": "standard_technical_report_number", + "6": "linkage", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('note_controller') + order.append("note_controller") if key[4] in indicator_map2: - order.append('display_constant_controller') + order.append("display_constant_controller") return { - '__order__': tuple(order) if len(order) else None, - 'coden_designation': value.get('y'), - 'title': value.get('t'), - 'material_specific_details': value.get('m'), - 'note': utils.force_list(value.get('n')), - 'other_item_identifier': utils.force_list(value.get('o')), - 'international_standard_serial_number': value.get('x'), - 'control_subfield': value.get('7'), - 'physical_description': value.get('h'), - 'relationship_information': utils.force_list(value.get('i')), - 'international_standard_book_number': utils.force_list(value.get('z')), - 'edition': value.get('b'), - 'related_parts': utils.force_list(value.get('g')), - 'record_control_number': utils.force_list(value.get('w')), - 'report_number': utils.force_list(value.get('r')), - 'series_data_for_related_item': utils.force_list(value.get('k')), - 'uniform_title': value.get('s'), - 'qualifying_information': value.get('c'), - 'main_entry_heading': value.get('a'), - 'relationship_code': utils.force_list(value.get('4')), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'place_publisher_and_date_of_publication': value.get('d'), - 'standard_technical_report_number': value.get('u'), - 'linkage': value.get('6'), - 'note_controller': indicator_map1.get(key[3]), - 'display_constant_controller': indicator_map2.get(key[4]), + "__order__": tuple(order) if len(order) else None, + "coden_designation": value.get("y"), + "title": value.get("t"), + "material_specific_details": value.get("m"), + "note": utils.force_list(value.get("n")), + "other_item_identifier": utils.force_list(value.get("o")), + "international_standard_serial_number": value.get("x"), + "control_subfield": value.get("7"), + "physical_description": value.get("h"), + "relationship_information": utils.force_list(value.get("i")), + "international_standard_book_number": utils.force_list(value.get("z")), + "edition": value.get("b"), + "related_parts": utils.force_list(value.get("g")), + "record_control_number": utils.force_list(value.get("w")), + "report_number": utils.force_list(value.get("r")), + "series_data_for_related_item": utils.force_list(value.get("k")), + "uniform_title": value.get("s"), + "qualifying_information": value.get("c"), + "main_entry_heading": value.get("a"), + "relationship_code": utils.force_list(value.get("4")), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "place_publisher_and_date_of_publication": value.get("d"), + "standard_technical_report_number": value.get("u"), + "linkage": value.get("6"), + "note_controller": indicator_map1.get(key[3]), + "display_constant_controller": indicator_map2.get(key[4]), } -@marc21.over('supplement_special_issue_entry', '^770[_10][_8]') +@marc21.over("supplement_special_issue_entry", "^770[_10][_8]") @utils.for_each_value @utils.filter_values def supplement_special_issue_entry(self, key, value): @@ -302,70 +302,70 @@ def supplement_special_issue_entry(self, key, value): "_": "Has supplement", } field_map = { - 'y': 'coden_designation', - 't': 'title', - 'm': 'material_specific_details', - 'n': 'note', - 'o': 'other_item_identifier', - 'x': 'international_standard_serial_number', - '7': 'control_subfield', - 'h': 'physical_description', - 'i': 'relationship_information', - 'z': 'international_standard_book_number', - 'b': 'edition', - 'g': 'related_parts', - 'w': 'record_control_number', - 'r': 'report_number', - 'k': 'series_data_for_related_item', - 's': 'uniform_title', - 'c': 'qualifying_information', - 'a': 'main_entry_heading', - '4': 'relationship_code', - '8': 'field_link_and_sequence_number', - 'd': 'place_publisher_and_date_of_publication', - 'u': 'standard_technical_report_number', - '6': 'linkage', + "y": "coden_designation", + "t": "title", + "m": "material_specific_details", + "n": "note", + "o": "other_item_identifier", + "x": "international_standard_serial_number", + "7": "control_subfield", + "h": "physical_description", + "i": "relationship_information", + "z": "international_standard_book_number", + "b": "edition", + "g": "related_parts", + "w": "record_control_number", + "r": "report_number", + "k": "series_data_for_related_item", + "s": "uniform_title", + "c": "qualifying_information", + "a": "main_entry_heading", + "4": "relationship_code", + "8": "field_link_and_sequence_number", + "d": "place_publisher_and_date_of_publication", + "u": "standard_technical_report_number", + "6": "linkage", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('note_controller') + order.append("note_controller") if key[4] in indicator_map2: - order.append('display_constant_controller') + order.append("display_constant_controller") return { - '__order__': tuple(order) if len(order) else None, - 'coden_designation': value.get('y'), - 'title': value.get('t'), - 'material_specific_details': value.get('m'), - 'note': utils.force_list(value.get('n')), - 'other_item_identifier': utils.force_list(value.get('o')), - 'international_standard_serial_number': value.get('x'), - 'control_subfield': value.get('7'), - 'physical_description': value.get('h'), - 'relationship_information': utils.force_list(value.get('i')), - 'international_standard_book_number': utils.force_list(value.get('z')), - 'edition': value.get('b'), - 'related_parts': utils.force_list(value.get('g')), - 'record_control_number': utils.force_list(value.get('w')), - 'report_number': utils.force_list(value.get('r')), - 'series_data_for_related_item': utils.force_list(value.get('k')), - 'uniform_title': value.get('s'), - 'qualifying_information': value.get('c'), - 'main_entry_heading': value.get('a'), - 'relationship_code': utils.force_list(value.get('4')), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'place_publisher_and_date_of_publication': value.get('d'), - 'standard_technical_report_number': value.get('u'), - 'linkage': value.get('6'), - 'note_controller': indicator_map1.get(key[3]), - 'display_constant_controller': indicator_map2.get(key[4]), + "__order__": tuple(order) if len(order) else None, + "coden_designation": value.get("y"), + "title": value.get("t"), + "material_specific_details": value.get("m"), + "note": utils.force_list(value.get("n")), + "other_item_identifier": utils.force_list(value.get("o")), + "international_standard_serial_number": value.get("x"), + "control_subfield": value.get("7"), + "physical_description": value.get("h"), + "relationship_information": utils.force_list(value.get("i")), + "international_standard_book_number": utils.force_list(value.get("z")), + "edition": value.get("b"), + "related_parts": utils.force_list(value.get("g")), + "record_control_number": utils.force_list(value.get("w")), + "report_number": utils.force_list(value.get("r")), + "series_data_for_related_item": utils.force_list(value.get("k")), + "uniform_title": value.get("s"), + "qualifying_information": value.get("c"), + "main_entry_heading": value.get("a"), + "relationship_code": utils.force_list(value.get("4")), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "place_publisher_and_date_of_publication": value.get("d"), + "standard_technical_report_number": value.get("u"), + "linkage": value.get("6"), + "note_controller": indicator_map1.get(key[3]), + "display_constant_controller": indicator_map2.get(key[4]), } -@marc21.over('supplement_parent_entry', '^772[_10][_08]') +@marc21.over("supplement_parent_entry", "^772[_10][_08]") @utils.for_each_value @utils.filter_values def supplement_parent_entry(self, key, value): @@ -377,70 +377,70 @@ def supplement_parent_entry(self, key, value): "_": "Supplement to", } field_map = { - 'y': 'coden_designation', - 't': 'title', - 'm': 'material_specific_details', - 'n': 'note', - 'o': 'other_item_identifier', - 'x': 'international_standard_serial_number', - '7': 'control_subfield', - 'h': 'physical_description', - 'i': 'relationship_information', - 'z': 'international_standard_book_number', - 'b': 'edition', - 'g': 'related_parts', - 'w': 'record_control_number', - 'r': 'report_number', - 'k': 'series_data_for_related_item', - 's': 'uniform_title', - 'c': 'qualifying_information', - 'a': 'main_entry_heading', - '4': 'relationship_code', - '8': 'field_link_and_sequence_number', - 'd': 'place_publisher_and_date_of_publication', - 'u': 'standard_technical_report_number', - '6': 'linkage', + "y": "coden_designation", + "t": "title", + "m": "material_specific_details", + "n": "note", + "o": "other_item_identifier", + "x": "international_standard_serial_number", + "7": "control_subfield", + "h": "physical_description", + "i": "relationship_information", + "z": "international_standard_book_number", + "b": "edition", + "g": "related_parts", + "w": "record_control_number", + "r": "report_number", + "k": "series_data_for_related_item", + "s": "uniform_title", + "c": "qualifying_information", + "a": "main_entry_heading", + "4": "relationship_code", + "8": "field_link_and_sequence_number", + "d": "place_publisher_and_date_of_publication", + "u": "standard_technical_report_number", + "6": "linkage", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('note_controller') + order.append("note_controller") if key[4] in indicator_map2: - order.append('display_constant_controller') + order.append("display_constant_controller") return { - '__order__': tuple(order) if len(order) else None, - 'coden_designation': value.get('y'), - 'title': value.get('t'), - 'material_specific_details': value.get('m'), - 'note': utils.force_list(value.get('n')), - 'other_item_identifier': utils.force_list(value.get('o')), - 'international_standard_serial_number': value.get('x'), - 'control_subfield': value.get('7'), - 'physical_description': value.get('h'), - 'relationship_information': utils.force_list(value.get('i')), - 'international_standard_book_number': utils.force_list(value.get('z')), - 'edition': value.get('b'), - 'related_parts': utils.force_list(value.get('g')), - 'record_control_number': utils.force_list(value.get('w')), - 'report_number': utils.force_list(value.get('r')), - 'series_data_for_related_item': utils.force_list(value.get('k')), - 'uniform_title': value.get('s'), - 'qualifying_information': value.get('c'), - 'main_entry_heading': value.get('a'), - 'relationship_code': utils.force_list(value.get('4')), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'place_publisher_and_date_of_publication': value.get('d'), - 'standard_technical_report_number': value.get('u'), - 'linkage': value.get('6'), - 'note_controller': indicator_map1.get(key[3]), - 'display_constant_controller': indicator_map2.get(key[4]), + "__order__": tuple(order) if len(order) else None, + "coden_designation": value.get("y"), + "title": value.get("t"), + "material_specific_details": value.get("m"), + "note": utils.force_list(value.get("n")), + "other_item_identifier": utils.force_list(value.get("o")), + "international_standard_serial_number": value.get("x"), + "control_subfield": value.get("7"), + "physical_description": value.get("h"), + "relationship_information": utils.force_list(value.get("i")), + "international_standard_book_number": utils.force_list(value.get("z")), + "edition": value.get("b"), + "related_parts": utils.force_list(value.get("g")), + "record_control_number": utils.force_list(value.get("w")), + "report_number": utils.force_list(value.get("r")), + "series_data_for_related_item": utils.force_list(value.get("k")), + "uniform_title": value.get("s"), + "qualifying_information": value.get("c"), + "main_entry_heading": value.get("a"), + "relationship_code": utils.force_list(value.get("4")), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "place_publisher_and_date_of_publication": value.get("d"), + "standard_technical_report_number": value.get("u"), + "linkage": value.get("6"), + "note_controller": indicator_map1.get(key[3]), + "display_constant_controller": indicator_map2.get(key[4]), } -@marc21.over('host_item_entry', '^773[_10][_8]') +@marc21.over("host_item_entry", "^773[_10][_8]") @utils.for_each_value @utils.filter_values def host_item_entry(self, key, value): @@ -448,74 +448,74 @@ def host_item_entry(self, key, value): indicator_map1 = {"0": "Display note", "1": "Do not display note"} indicator_map2 = {"8": "No display constant generated", "_": "In"} field_map = { - 'y': 'coden_designation', - 't': 'title', - 'm': 'material_specific_details', - 'n': 'note', - 'o': 'other_item_identifier', - 'x': 'international_standard_serial_number', - '7': 'control_subfield', - 'h': 'physical_description', - 'i': 'relationship_information', - 'z': 'international_standard_book_number', - 'b': 'edition', - 'g': 'related_parts', - 'w': 'record_control_number', - 'r': 'report_number', - 'k': 'series_data_for_related_item', - 's': 'uniform_title', - 'p': 'abbreviated_title', - '3': 'materials_specified', - 'a': 'main_entry_heading', - '4': 'relationship_code', - '8': 'field_link_and_sequence_number', - 'd': 'place_publisher_and_date_of_publication', - 'u': 'standard_technical_report_number', - '6': 'linkage', - 'q': 'enumeration_and_first_page', + "y": "coden_designation", + "t": "title", + "m": "material_specific_details", + "n": "note", + "o": "other_item_identifier", + "x": "international_standard_serial_number", + "7": "control_subfield", + "h": "physical_description", + "i": "relationship_information", + "z": "international_standard_book_number", + "b": "edition", + "g": "related_parts", + "w": "record_control_number", + "r": "report_number", + "k": "series_data_for_related_item", + "s": "uniform_title", + "p": "abbreviated_title", + "3": "materials_specified", + "a": "main_entry_heading", + "4": "relationship_code", + "8": "field_link_and_sequence_number", + "d": "place_publisher_and_date_of_publication", + "u": "standard_technical_report_number", + "6": "linkage", + "q": "enumeration_and_first_page", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('note_controller') + order.append("note_controller") if key[4] in indicator_map2: - order.append('display_constant_controller') + order.append("display_constant_controller") return { - '__order__': tuple(order) if len(order) else None, - 'coden_designation': value.get('y'), - 'title': value.get('t'), - 'material_specific_details': value.get('m'), - 'note': utils.force_list(value.get('n')), - 'other_item_identifier': utils.force_list(value.get('o')), - 'international_standard_serial_number': value.get('x'), - 'control_subfield': value.get('7'), - 'physical_description': value.get('h'), - 'relationship_information': utils.force_list(value.get('i')), - 'international_standard_book_number': utils.force_list(value.get('z')), - 'edition': value.get('b'), - 'related_parts': utils.force_list(value.get('g')), - 'record_control_number': utils.force_list(value.get('w')), - 'report_number': utils.force_list(value.get('r')), - 'series_data_for_related_item': utils.force_list(value.get('k')), - 'uniform_title': value.get('s'), - 'abbreviated_title': value.get('p'), - 'materials_specified': value.get('3'), - 'main_entry_heading': value.get('a'), - 'relationship_code': utils.force_list(value.get('4')), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'place_publisher_and_date_of_publication': value.get('d'), - 'standard_technical_report_number': value.get('u'), - 'linkage': value.get('6'), - 'enumeration_and_first_page': value.get('q'), - 'note_controller': indicator_map1.get(key[3]), - 'display_constant_controller': indicator_map2.get(key[4]), + "__order__": tuple(order) if len(order) else None, + "coden_designation": value.get("y"), + "title": value.get("t"), + "material_specific_details": value.get("m"), + "note": utils.force_list(value.get("n")), + "other_item_identifier": utils.force_list(value.get("o")), + "international_standard_serial_number": value.get("x"), + "control_subfield": value.get("7"), + "physical_description": value.get("h"), + "relationship_information": utils.force_list(value.get("i")), + "international_standard_book_number": utils.force_list(value.get("z")), + "edition": value.get("b"), + "related_parts": utils.force_list(value.get("g")), + "record_control_number": utils.force_list(value.get("w")), + "report_number": utils.force_list(value.get("r")), + "series_data_for_related_item": utils.force_list(value.get("k")), + "uniform_title": value.get("s"), + "abbreviated_title": value.get("p"), + "materials_specified": value.get("3"), + "main_entry_heading": value.get("a"), + "relationship_code": utils.force_list(value.get("4")), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "place_publisher_and_date_of_publication": value.get("d"), + "standard_technical_report_number": value.get("u"), + "linkage": value.get("6"), + "enumeration_and_first_page": value.get("q"), + "note_controller": indicator_map1.get(key[3]), + "display_constant_controller": indicator_map2.get(key[4]), } -@marc21.over('constituent_unit_entry', '^774[_10][_8]') +@marc21.over("constituent_unit_entry", "^774[_10][_8]") @utils.for_each_value @utils.filter_values def constituent_unit_entry(self, key, value): @@ -526,70 +526,70 @@ def constituent_unit_entry(self, key, value): "_": "Constituent unit", } field_map = { - 'y': 'coden_designation', - 't': 'title', - 'm': 'material_specific_details', - 'n': 'note', - 'o': 'other_item_identifier', - 'x': 'international_standard_serial_number', - '7': 'control_subfield', - 'h': 'physical_description', - 'i': 'relationship_information', - 'z': 'international_standard_book_number', - 'b': 'edition', - 'g': 'related_parts', - 'w': 'record_control_number', - 'r': 'report_number', - 'k': 'series_data_for_related_item', - 's': 'uniform_title', - 'c': 'qualifying_information', - 'a': 'main_entry_heading', - '4': 'relationship_code', - '8': 'field_link_and_sequence_number', - 'd': 'place_publisher_and_date_of_publication', - 'u': 'standard_technical_report_number', - '6': 'linkage', + "y": "coden_designation", + "t": "title", + "m": "material_specific_details", + "n": "note", + "o": "other_item_identifier", + "x": "international_standard_serial_number", + "7": "control_subfield", + "h": "physical_description", + "i": "relationship_information", + "z": "international_standard_book_number", + "b": "edition", + "g": "related_parts", + "w": "record_control_number", + "r": "report_number", + "k": "series_data_for_related_item", + "s": "uniform_title", + "c": "qualifying_information", + "a": "main_entry_heading", + "4": "relationship_code", + "8": "field_link_and_sequence_number", + "d": "place_publisher_and_date_of_publication", + "u": "standard_technical_report_number", + "6": "linkage", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('note_controller') + order.append("note_controller") if key[4] in indicator_map2: - order.append('display_constant_controller') + order.append("display_constant_controller") return { - '__order__': tuple(order) if len(order) else None, - 'coden_designation': value.get('y'), - 'title': value.get('t'), - 'material_specific_details': value.get('m'), - 'note': utils.force_list(value.get('n')), - 'other_item_identifier': utils.force_list(value.get('o')), - 'international_standard_serial_number': value.get('x'), - 'control_subfield': value.get('7'), - 'physical_description': value.get('h'), - 'relationship_information': utils.force_list(value.get('i')), - 'international_standard_book_number': utils.force_list(value.get('z')), - 'edition': value.get('b'), - 'related_parts': utils.force_list(value.get('g')), - 'record_control_number': utils.force_list(value.get('w')), - 'report_number': utils.force_list(value.get('r')), - 'series_data_for_related_item': utils.force_list(value.get('k')), - 'uniform_title': value.get('s'), - 'qualifying_information': value.get('c'), - 'main_entry_heading': value.get('a'), - 'relationship_code': utils.force_list(value.get('4')), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'place_publisher_and_date_of_publication': value.get('d'), - 'standard_technical_report_number': value.get('u'), - 'linkage': value.get('6'), - 'note_controller': indicator_map1.get(key[3]), - 'display_constant_controller': indicator_map2.get(key[4]), + "__order__": tuple(order) if len(order) else None, + "coden_designation": value.get("y"), + "title": value.get("t"), + "material_specific_details": value.get("m"), + "note": utils.force_list(value.get("n")), + "other_item_identifier": utils.force_list(value.get("o")), + "international_standard_serial_number": value.get("x"), + "control_subfield": value.get("7"), + "physical_description": value.get("h"), + "relationship_information": utils.force_list(value.get("i")), + "international_standard_book_number": utils.force_list(value.get("z")), + "edition": value.get("b"), + "related_parts": utils.force_list(value.get("g")), + "record_control_number": utils.force_list(value.get("w")), + "report_number": utils.force_list(value.get("r")), + "series_data_for_related_item": utils.force_list(value.get("k")), + "uniform_title": value.get("s"), + "qualifying_information": value.get("c"), + "main_entry_heading": value.get("a"), + "relationship_code": utils.force_list(value.get("4")), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "place_publisher_and_date_of_publication": value.get("d"), + "standard_technical_report_number": value.get("u"), + "linkage": value.get("6"), + "note_controller": indicator_map1.get(key[3]), + "display_constant_controller": indicator_map2.get(key[4]), } -@marc21.over('other_edition_entry', '^775[_10][_8]') +@marc21.over("other_edition_entry", "^775[_10][_8]") @utils.for_each_value @utils.filter_values def other_edition_entry(self, key, value): @@ -600,74 +600,74 @@ def other_edition_entry(self, key, value): "_": "Other edition available", } field_map = { - 'y': 'coden_designation', - 't': 'title', - 'm': 'material_specific_details', - 'n': 'note', - 'o': 'other_item_identifier', - 'x': 'international_standard_serial_number', - '7': 'control_subfield', - 'h': 'physical_description', - 'e': 'language_code', - 'i': 'relationship_information', - 'z': 'international_standard_book_number', - 'b': 'edition', - 'g': 'related_parts', - 'w': 'record_control_number', - 'r': 'report_number', - 'k': 'series_data_for_related_item', - 's': 'uniform_title', - 'c': 'qualifying_information', - 'f': 'country_code', - 'a': 'main_entry_heading', - '4': 'relationship_code', - '8': 'field_link_and_sequence_number', - 'd': 'place_publisher_and_date_of_publication', - 'u': 'standard_technical_report_number', - '6': 'linkage', + "y": "coden_designation", + "t": "title", + "m": "material_specific_details", + "n": "note", + "o": "other_item_identifier", + "x": "international_standard_serial_number", + "7": "control_subfield", + "h": "physical_description", + "e": "language_code", + "i": "relationship_information", + "z": "international_standard_book_number", + "b": "edition", + "g": "related_parts", + "w": "record_control_number", + "r": "report_number", + "k": "series_data_for_related_item", + "s": "uniform_title", + "c": "qualifying_information", + "f": "country_code", + "a": "main_entry_heading", + "4": "relationship_code", + "8": "field_link_and_sequence_number", + "d": "place_publisher_and_date_of_publication", + "u": "standard_technical_report_number", + "6": "linkage", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('note_controller') + order.append("note_controller") if key[4] in indicator_map2: - order.append('display_constant_controller') + order.append("display_constant_controller") return { - '__order__': tuple(order) if len(order) else None, - 'coden_designation': value.get('y'), - 'title': value.get('t'), - 'material_specific_details': value.get('m'), - 'note': utils.force_list(value.get('n')), - 'other_item_identifier': utils.force_list(value.get('o')), - 'international_standard_serial_number': value.get('x'), - 'control_subfield': value.get('7'), - 'physical_description': value.get('h'), - 'language_code': value.get('e'), - 'relationship_information': utils.force_list(value.get('i')), - 'international_standard_book_number': utils.force_list(value.get('z')), - 'edition': value.get('b'), - 'related_parts': utils.force_list(value.get('g')), - 'record_control_number': utils.force_list(value.get('w')), - 'report_number': utils.force_list(value.get('r')), - 'series_data_for_related_item': utils.force_list(value.get('k')), - 'uniform_title': value.get('s'), - 'qualifying_information': value.get('c'), - 'country_code': value.get('f'), - 'main_entry_heading': value.get('a'), - 'relationship_code': utils.force_list(value.get('4')), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'place_publisher_and_date_of_publication': value.get('d'), - 'standard_technical_report_number': value.get('u'), - 'linkage': value.get('6'), - 'note_controller': indicator_map1.get(key[3]), - 'display_constant_controller': indicator_map2.get(key[4]), + "__order__": tuple(order) if len(order) else None, + "coden_designation": value.get("y"), + "title": value.get("t"), + "material_specific_details": value.get("m"), + "note": utils.force_list(value.get("n")), + "other_item_identifier": utils.force_list(value.get("o")), + "international_standard_serial_number": value.get("x"), + "control_subfield": value.get("7"), + "physical_description": value.get("h"), + "language_code": value.get("e"), + "relationship_information": utils.force_list(value.get("i")), + "international_standard_book_number": utils.force_list(value.get("z")), + "edition": value.get("b"), + "related_parts": utils.force_list(value.get("g")), + "record_control_number": utils.force_list(value.get("w")), + "report_number": utils.force_list(value.get("r")), + "series_data_for_related_item": utils.force_list(value.get("k")), + "uniform_title": value.get("s"), + "qualifying_information": value.get("c"), + "country_code": value.get("f"), + "main_entry_heading": value.get("a"), + "relationship_code": utils.force_list(value.get("4")), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "place_publisher_and_date_of_publication": value.get("d"), + "standard_technical_report_number": value.get("u"), + "linkage": value.get("6"), + "note_controller": indicator_map1.get(key[3]), + "display_constant_controller": indicator_map2.get(key[4]), } -@marc21.over('additional_physical_form_entry', '^776[_10][_8]') +@marc21.over("additional_physical_form_entry", "^776[_10][_8]") @utils.for_each_value @utils.filter_values def additional_physical_form_entry(self, key, value): @@ -678,70 +678,70 @@ def additional_physical_form_entry(self, key, value): "_": "Available in another form", } field_map = { - 'y': 'coden_designation', - 't': 'title', - 'm': 'material_specific_details', - 'n': 'note', - 'o': 'other_item_identifier', - 'x': 'international_standard_serial_number', - '7': 'control_subfield', - 'h': 'physical_description', - 'i': 'relationship_information', - 'z': 'international_standard_book_number', - 'b': 'edition', - 'g': 'related_parts', - 'w': 'record_control_number', - 'r': 'report_number', - 'k': 'series_data_for_related_item', - 's': 'uniform_title', - 'c': 'qualifying_information', - 'a': 'main_entry_heading', - '4': 'relationship_code', - '8': 'field_link_and_sequence_number', - 'd': 'place_publisher_and_date_of_publication', - 'u': 'standard_technical_report_number', - '6': 'linkage', + "y": "coden_designation", + "t": "title", + "m": "material_specific_details", + "n": "note", + "o": "other_item_identifier", + "x": "international_standard_serial_number", + "7": "control_subfield", + "h": "physical_description", + "i": "relationship_information", + "z": "international_standard_book_number", + "b": "edition", + "g": "related_parts", + "w": "record_control_number", + "r": "report_number", + "k": "series_data_for_related_item", + "s": "uniform_title", + "c": "qualifying_information", + "a": "main_entry_heading", + "4": "relationship_code", + "8": "field_link_and_sequence_number", + "d": "place_publisher_and_date_of_publication", + "u": "standard_technical_report_number", + "6": "linkage", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('note_controller') + order.append("note_controller") if key[4] in indicator_map2: - order.append('display_constant_controller') + order.append("display_constant_controller") return { - '__order__': tuple(order) if len(order) else None, - 'coden_designation': value.get('y'), - 'title': value.get('t'), - 'material_specific_details': value.get('m'), - 'note': utils.force_list(value.get('n')), - 'other_item_identifier': utils.force_list(value.get('o')), - 'international_standard_serial_number': value.get('x'), - 'control_subfield': value.get('7'), - 'physical_description': value.get('h'), - 'relationship_information': utils.force_list(value.get('i')), - 'international_standard_book_number': utils.force_list(value.get('z')), - 'edition': value.get('b'), - 'related_parts': utils.force_list(value.get('g')), - 'record_control_number': utils.force_list(value.get('w')), - 'report_number': utils.force_list(value.get('r')), - 'series_data_for_related_item': utils.force_list(value.get('k')), - 'uniform_title': value.get('s'), - 'qualifying_information': value.get('c'), - 'main_entry_heading': value.get('a'), - 'relationship_code': utils.force_list(value.get('4')), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'place_publisher_and_date_of_publication': value.get('d'), - 'standard_technical_report_number': value.get('u'), - 'linkage': value.get('6'), - 'note_controller': indicator_map1.get(key[3]), - 'display_constant_controller': indicator_map2.get(key[4]), + "__order__": tuple(order) if len(order) else None, + "coden_designation": value.get("y"), + "title": value.get("t"), + "material_specific_details": value.get("m"), + "note": utils.force_list(value.get("n")), + "other_item_identifier": utils.force_list(value.get("o")), + "international_standard_serial_number": value.get("x"), + "control_subfield": value.get("7"), + "physical_description": value.get("h"), + "relationship_information": utils.force_list(value.get("i")), + "international_standard_book_number": utils.force_list(value.get("z")), + "edition": value.get("b"), + "related_parts": utils.force_list(value.get("g")), + "record_control_number": utils.force_list(value.get("w")), + "report_number": utils.force_list(value.get("r")), + "series_data_for_related_item": utils.force_list(value.get("k")), + "uniform_title": value.get("s"), + "qualifying_information": value.get("c"), + "main_entry_heading": value.get("a"), + "relationship_code": utils.force_list(value.get("4")), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "place_publisher_and_date_of_publication": value.get("d"), + "standard_technical_report_number": value.get("u"), + "linkage": value.get("6"), + "note_controller": indicator_map1.get(key[3]), + "display_constant_controller": indicator_map2.get(key[4]), } -@marc21.over('issued_with_entry', '^777[_10][_8]') +@marc21.over("issued_with_entry", "^777[_10][_8]") @utils.for_each_value @utils.filter_values def issued_with_entry(self, key, value): @@ -749,64 +749,64 @@ def issued_with_entry(self, key, value): indicator_map1 = {"0": "Display note", "1": "Do not display note"} indicator_map2 = {"8": "No display constant generated", "_": "Issued with"} field_map = { - 'g': 'related_parts', - 't': 'title', - 'm': 'material_specific_details', - 'n': 'note', - 'o': 'other_item_identifier', - 's': 'uniform_title', - 'k': 'series_data_for_related_item', - '7': 'control_subfield', - 'h': 'physical_description', - 'c': 'qualifying_information', - 'y': 'coden_designation', - 'i': 'relationship_information', - 'a': 'main_entry_heading', - 'w': 'record_control_number', - '4': 'relationship_code', - '8': 'field_link_and_sequence_number', - 'd': 'place_publisher_and_date_of_publication', - 'b': 'edition', - '6': 'linkage', - 'x': 'international_standard_serial_number', + "g": "related_parts", + "t": "title", + "m": "material_specific_details", + "n": "note", + "o": "other_item_identifier", + "s": "uniform_title", + "k": "series_data_for_related_item", + "7": "control_subfield", + "h": "physical_description", + "c": "qualifying_information", + "y": "coden_designation", + "i": "relationship_information", + "a": "main_entry_heading", + "w": "record_control_number", + "4": "relationship_code", + "8": "field_link_and_sequence_number", + "d": "place_publisher_and_date_of_publication", + "b": "edition", + "6": "linkage", + "x": "international_standard_serial_number", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('note_controller') + order.append("note_controller") if key[4] in indicator_map2: - order.append('display_constant_controller') + order.append("display_constant_controller") return { - '__order__': tuple(order) if len(order) else None, - 'related_parts': utils.force_list(value.get('g')), - 'title': value.get('t'), - 'material_specific_details': value.get('m'), - 'note': utils.force_list(value.get('n')), - 'other_item_identifier': utils.force_list(value.get('o')), - 'uniform_title': value.get('s'), - 'series_data_for_related_item': utils.force_list(value.get('k')), - 'control_subfield': value.get('7'), - 'physical_description': value.get('h'), - 'qualifying_information': value.get('c'), - 'coden_designation': value.get('y'), - 'relationship_information': utils.force_list(value.get('i')), - 'main_entry_heading': value.get('a'), - 'record_control_number': utils.force_list(value.get('w')), - 'relationship_code': utils.force_list(value.get('4')), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'place_publisher_and_date_of_publication': value.get('d'), - 'edition': value.get('b'), - 'linkage': value.get('6'), - 'international_standard_serial_number': value.get('x'), - 'note_controller': indicator_map1.get(key[3]), - 'display_constant_controller': indicator_map2.get(key[4]), + "__order__": tuple(order) if len(order) else None, + "related_parts": utils.force_list(value.get("g")), + "title": value.get("t"), + "material_specific_details": value.get("m"), + "note": utils.force_list(value.get("n")), + "other_item_identifier": utils.force_list(value.get("o")), + "uniform_title": value.get("s"), + "series_data_for_related_item": utils.force_list(value.get("k")), + "control_subfield": value.get("7"), + "physical_description": value.get("h"), + "qualifying_information": value.get("c"), + "coden_designation": value.get("y"), + "relationship_information": utils.force_list(value.get("i")), + "main_entry_heading": value.get("a"), + "record_control_number": utils.force_list(value.get("w")), + "relationship_code": utils.force_list(value.get("4")), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "place_publisher_and_date_of_publication": value.get("d"), + "edition": value.get("b"), + "linkage": value.get("6"), + "international_standard_serial_number": value.get("x"), + "note_controller": indicator_map1.get(key[3]), + "display_constant_controller": indicator_map2.get(key[4]), } -@marc21.over('preceding_entry', '^780[_10][_13750426]') +@marc21.over("preceding_entry", "^780[_10][_13750426]") @utils.for_each_value @utils.filter_values def preceding_entry(self, key, value): @@ -823,70 +823,70 @@ def preceding_entry(self, key, value): "7": "Separated from", } field_map = { - 'y': 'coden_designation', - 't': 'title', - 'm': 'material_specific_details', - 'n': 'note', - 'o': 'other_item_identifier', - 'x': 'international_standard_serial_number', - '7': 'control_subfield', - 'h': 'physical_description', - 'i': 'relationship_information', - 'z': 'international_standard_book_number', - 'b': 'edition', - 'g': 'related_parts', - 'w': 'record_control_number', - 'r': 'report_number', - 'k': 'series_data_for_related_item', - 's': 'uniform_title', - 'c': 'qualifying_information', - 'a': 'main_entry_heading', - '4': 'relationship_code', - '8': 'field_link_and_sequence_number', - 'd': 'place_publisher_and_date_of_publication', - 'u': 'standard_technical_report_number', - '6': 'linkage', + "y": "coden_designation", + "t": "title", + "m": "material_specific_details", + "n": "note", + "o": "other_item_identifier", + "x": "international_standard_serial_number", + "7": "control_subfield", + "h": "physical_description", + "i": "relationship_information", + "z": "international_standard_book_number", + "b": "edition", + "g": "related_parts", + "w": "record_control_number", + "r": "report_number", + "k": "series_data_for_related_item", + "s": "uniform_title", + "c": "qualifying_information", + "a": "main_entry_heading", + "4": "relationship_code", + "8": "field_link_and_sequence_number", + "d": "place_publisher_and_date_of_publication", + "u": "standard_technical_report_number", + "6": "linkage", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('note_controller') + order.append("note_controller") if key[4] in indicator_map2: - order.append('type_of_relationship') + order.append("type_of_relationship") return { - '__order__': tuple(order) if len(order) else None, - 'coden_designation': value.get('y'), - 'title': value.get('t'), - 'material_specific_details': value.get('m'), - 'note': utils.force_list(value.get('n')), - 'other_item_identifier': utils.force_list(value.get('o')), - 'international_standard_serial_number': value.get('x'), - 'control_subfield': value.get('7'), - 'physical_description': value.get('h'), - 'relationship_information': utils.force_list(value.get('i')), - 'international_standard_book_number': utils.force_list(value.get('z')), - 'edition': value.get('b'), - 'related_parts': utils.force_list(value.get('g')), - 'record_control_number': utils.force_list(value.get('w')), - 'report_number': utils.force_list(value.get('r')), - 'series_data_for_related_item': utils.force_list(value.get('k')), - 'uniform_title': value.get('s'), - 'qualifying_information': value.get('c'), - 'main_entry_heading': value.get('a'), - 'relationship_code': utils.force_list(value.get('4')), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'place_publisher_and_date_of_publication': value.get('d'), - 'standard_technical_report_number': value.get('u'), - 'linkage': value.get('6'), - 'note_controller': indicator_map1.get(key[3]), - 'type_of_relationship': indicator_map2.get(key[4]), + "__order__": tuple(order) if len(order) else None, + "coden_designation": value.get("y"), + "title": value.get("t"), + "material_specific_details": value.get("m"), + "note": utils.force_list(value.get("n")), + "other_item_identifier": utils.force_list(value.get("o")), + "international_standard_serial_number": value.get("x"), + "control_subfield": value.get("7"), + "physical_description": value.get("h"), + "relationship_information": utils.force_list(value.get("i")), + "international_standard_book_number": utils.force_list(value.get("z")), + "edition": value.get("b"), + "related_parts": utils.force_list(value.get("g")), + "record_control_number": utils.force_list(value.get("w")), + "report_number": utils.force_list(value.get("r")), + "series_data_for_related_item": utils.force_list(value.get("k")), + "uniform_title": value.get("s"), + "qualifying_information": value.get("c"), + "main_entry_heading": value.get("a"), + "relationship_code": utils.force_list(value.get("4")), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "place_publisher_and_date_of_publication": value.get("d"), + "standard_technical_report_number": value.get("u"), + "linkage": value.get("6"), + "note_controller": indicator_map1.get(key[3]), + "type_of_relationship": indicator_map2.get(key[4]), } -@marc21.over('succeeding_entry', '^785[_10][_153704826]') +@marc21.over("succeeding_entry", "^785[_10][_153704826]") @utils.for_each_value @utils.filter_values def succeeding_entry(self, key, value): @@ -904,70 +904,70 @@ def succeeding_entry(self, key, value): "8": "Changed back to", } field_map = { - 'y': 'coden_designation', - 't': 'title', - 'm': 'material_specific_details', - 'n': 'note', - 'o': 'other_item_identifier', - 'x': 'international_standard_serial_number', - '7': 'control_subfield', - 'h': 'physical_description', - 'i': 'relationship_information', - 'z': 'international_standard_book_number', - 'b': 'edition', - 'g': 'related_parts', - 'w': 'record_control_number', - 'r': 'report_number', - 'k': 'series_data_for_related_item', - 's': 'uniform_title', - 'c': 'qualifying_information', - 'a': 'main_entry_heading', - '4': 'relationship_code', - '8': 'field_link_and_sequence_number', - 'd': 'place_publisher_and_date_of_publication', - 'u': 'standard_technical_report_number', - '6': 'linkage', + "y": "coden_designation", + "t": "title", + "m": "material_specific_details", + "n": "note", + "o": "other_item_identifier", + "x": "international_standard_serial_number", + "7": "control_subfield", + "h": "physical_description", + "i": "relationship_information", + "z": "international_standard_book_number", + "b": "edition", + "g": "related_parts", + "w": "record_control_number", + "r": "report_number", + "k": "series_data_for_related_item", + "s": "uniform_title", + "c": "qualifying_information", + "a": "main_entry_heading", + "4": "relationship_code", + "8": "field_link_and_sequence_number", + "d": "place_publisher_and_date_of_publication", + "u": "standard_technical_report_number", + "6": "linkage", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('note_controller') + order.append("note_controller") if key[4] in indicator_map2: - order.append('type_of_relationship') + order.append("type_of_relationship") return { - '__order__': tuple(order) if len(order) else None, - 'coden_designation': value.get('y'), - 'title': value.get('t'), - 'material_specific_details': value.get('m'), - 'note': utils.force_list(value.get('n')), - 'other_item_identifier': utils.force_list(value.get('o')), - 'international_standard_serial_number': value.get('x'), - 'control_subfield': value.get('7'), - 'physical_description': value.get('h'), - 'relationship_information': utils.force_list(value.get('i')), - 'international_standard_book_number': utils.force_list(value.get('z')), - 'edition': value.get('b'), - 'related_parts': utils.force_list(value.get('g')), - 'record_control_number': utils.force_list(value.get('w')), - 'report_number': utils.force_list(value.get('r')), - 'series_data_for_related_item': utils.force_list(value.get('k')), - 'uniform_title': value.get('s'), - 'qualifying_information': value.get('c'), - 'main_entry_heading': value.get('a'), - 'relationship_code': utils.force_list(value.get('4')), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'place_publisher_and_date_of_publication': value.get('d'), - 'standard_technical_report_number': value.get('u'), - 'linkage': value.get('6'), - 'note_controller': indicator_map1.get(key[3]), - 'type_of_relationship': indicator_map2.get(key[4]), + "__order__": tuple(order) if len(order) else None, + "coden_designation": value.get("y"), + "title": value.get("t"), + "material_specific_details": value.get("m"), + "note": utils.force_list(value.get("n")), + "other_item_identifier": utils.force_list(value.get("o")), + "international_standard_serial_number": value.get("x"), + "control_subfield": value.get("7"), + "physical_description": value.get("h"), + "relationship_information": utils.force_list(value.get("i")), + "international_standard_book_number": utils.force_list(value.get("z")), + "edition": value.get("b"), + "related_parts": utils.force_list(value.get("g")), + "record_control_number": utils.force_list(value.get("w")), + "report_number": utils.force_list(value.get("r")), + "series_data_for_related_item": utils.force_list(value.get("k")), + "uniform_title": value.get("s"), + "qualifying_information": value.get("c"), + "main_entry_heading": value.get("a"), + "relationship_code": utils.force_list(value.get("4")), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "place_publisher_and_date_of_publication": value.get("d"), + "standard_technical_report_number": value.get("u"), + "linkage": value.get("6"), + "note_controller": indicator_map1.get(key[3]), + "type_of_relationship": indicator_map2.get(key[4]), } -@marc21.over('data_source_entry', '^786[_10][_8]') +@marc21.over("data_source_entry", "^786[_10][_8]") @utils.for_each_value @utils.filter_values def data_source_entry(self, key, value): @@ -975,76 +975,76 @@ def data_source_entry(self, key, value): indicator_map1 = {"0": "Display note", "1": "Do not display note"} indicator_map2 = {"8": "No display constant generated", "_": "Data source"} field_map = { - 'y': 'coden_designation', - 't': 'title', - 'm': 'material_specific_details', - 'n': 'note', - 'o': 'other_item_identifier', - 'x': 'international_standard_serial_number', - '7': 'control_subfield', - 'h': 'physical_description', - 'j': 'period_of_content', - 'i': 'relationship_information', - 'z': 'international_standard_book_number', - 'v': 'source_contribution', - 'b': 'edition', - 'g': 'related_parts', - 'w': 'record_control_number', - 'r': 'report_number', - 'k': 'series_data_for_related_item', - 's': 'uniform_title', - 'p': 'abbreviated_title', - 'c': 'qualifying_information', - 'a': 'main_entry_heading', - '4': 'relationship_code', - '8': 'field_link_and_sequence_number', - 'd': 'place_publisher_and_date_of_publication', - 'u': 'standard_technical_report_number', - '6': 'linkage', + "y": "coden_designation", + "t": "title", + "m": "material_specific_details", + "n": "note", + "o": "other_item_identifier", + "x": "international_standard_serial_number", + "7": "control_subfield", + "h": "physical_description", + "j": "period_of_content", + "i": "relationship_information", + "z": "international_standard_book_number", + "v": "source_contribution", + "b": "edition", + "g": "related_parts", + "w": "record_control_number", + "r": "report_number", + "k": "series_data_for_related_item", + "s": "uniform_title", + "p": "abbreviated_title", + "c": "qualifying_information", + "a": "main_entry_heading", + "4": "relationship_code", + "8": "field_link_and_sequence_number", + "d": "place_publisher_and_date_of_publication", + "u": "standard_technical_report_number", + "6": "linkage", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('note_controller') + order.append("note_controller") if key[4] in indicator_map2: - order.append('display_constant_controller') + order.append("display_constant_controller") return { - '__order__': tuple(order) if len(order) else None, - 'coden_designation': value.get('y'), - 'title': value.get('t'), - 'material_specific_details': value.get('m'), - 'note': utils.force_list(value.get('n')), - 'other_item_identifier': utils.force_list(value.get('o')), - 'international_standard_serial_number': value.get('x'), - 'control_subfield': value.get('7'), - 'physical_description': value.get('h'), - 'period_of_content': value.get('j'), - 'relationship_information': utils.force_list(value.get('i')), - 'international_standard_book_number': utils.force_list(value.get('z')), - 'source_contribution': value.get('v'), - 'edition': value.get('b'), - 'related_parts': utils.force_list(value.get('g')), - 'record_control_number': utils.force_list(value.get('w')), - 'report_number': utils.force_list(value.get('r')), - 'series_data_for_related_item': utils.force_list(value.get('k')), - 'uniform_title': value.get('s'), - 'abbreviated_title': value.get('p'), - 'qualifying_information': value.get('c'), - 'main_entry_heading': value.get('a'), - 'relationship_code': utils.force_list(value.get('4')), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'place_publisher_and_date_of_publication': value.get('d'), - 'standard_technical_report_number': value.get('u'), - 'linkage': value.get('6'), - 'note_controller': indicator_map1.get(key[3]), - 'display_constant_controller': indicator_map2.get(key[4]), + "__order__": tuple(order) if len(order) else None, + "coden_designation": value.get("y"), + "title": value.get("t"), + "material_specific_details": value.get("m"), + "note": utils.force_list(value.get("n")), + "other_item_identifier": utils.force_list(value.get("o")), + "international_standard_serial_number": value.get("x"), + "control_subfield": value.get("7"), + "physical_description": value.get("h"), + "period_of_content": value.get("j"), + "relationship_information": utils.force_list(value.get("i")), + "international_standard_book_number": utils.force_list(value.get("z")), + "source_contribution": value.get("v"), + "edition": value.get("b"), + "related_parts": utils.force_list(value.get("g")), + "record_control_number": utils.force_list(value.get("w")), + "report_number": utils.force_list(value.get("r")), + "series_data_for_related_item": utils.force_list(value.get("k")), + "uniform_title": value.get("s"), + "abbreviated_title": value.get("p"), + "qualifying_information": value.get("c"), + "main_entry_heading": value.get("a"), + "relationship_code": utils.force_list(value.get("4")), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "place_publisher_and_date_of_publication": value.get("d"), + "standard_technical_report_number": value.get("u"), + "linkage": value.get("6"), + "note_controller": indicator_map1.get(key[3]), + "display_constant_controller": indicator_map2.get(key[4]), } -@marc21.over('other_relationship_entry', '^787[_10][_8]') +@marc21.over("other_relationship_entry", "^787[_10][_8]") @utils.for_each_value @utils.filter_values def other_relationship_entry(self, key, value): @@ -1055,64 +1055,64 @@ def other_relationship_entry(self, key, value): "_": "Related item", } field_map = { - 'y': 'coden_designation', - 't': 'title', - 'm': 'material_specific_details', - 'n': 'note', - 'o': 'other_item_identifier', - 'x': 'international_standard_serial_number', - '7': 'control_subfield', - 'h': 'physical_description', - 'i': 'relationship_information', - 'z': 'international_standard_book_number', - 'b': 'edition', - 'g': 'related_parts', - 'w': 'record_control_number', - 'r': 'report_number', - 'k': 'series_data_for_related_item', - 's': 'uniform_title', - 'c': 'qualifying_information', - 'a': 'main_entry_heading', - '4': 'relationship_code', - '8': 'field_link_and_sequence_number', - 'd': 'place_publisher_and_date_of_publication', - 'u': 'standard_technical_report_number', - '6': 'linkage', + "y": "coden_designation", + "t": "title", + "m": "material_specific_details", + "n": "note", + "o": "other_item_identifier", + "x": "international_standard_serial_number", + "7": "control_subfield", + "h": "physical_description", + "i": "relationship_information", + "z": "international_standard_book_number", + "b": "edition", + "g": "related_parts", + "w": "record_control_number", + "r": "report_number", + "k": "series_data_for_related_item", + "s": "uniform_title", + "c": "qualifying_information", + "a": "main_entry_heading", + "4": "relationship_code", + "8": "field_link_and_sequence_number", + "d": "place_publisher_and_date_of_publication", + "u": "standard_technical_report_number", + "6": "linkage", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('note_controller') + order.append("note_controller") if key[4] in indicator_map2: - order.append('display_constant_controller') + order.append("display_constant_controller") return { - '__order__': tuple(order) if len(order) else None, - 'coden_designation': value.get('y'), - 'title': value.get('t'), - 'material_specific_details': value.get('m'), - 'note': utils.force_list(value.get('n')), - 'other_item_identifier': utils.force_list(value.get('o')), - 'international_standard_serial_number': value.get('x'), - 'control_subfield': value.get('7'), - 'physical_description': value.get('h'), - 'relationship_information': utils.force_list(value.get('i')), - 'international_standard_book_number': utils.force_list(value.get('z')), - 'edition': value.get('b'), - 'related_parts': utils.force_list(value.get('g')), - 'record_control_number': utils.force_list(value.get('w')), - 'report_number': utils.force_list(value.get('r')), - 'series_data_for_related_item': utils.force_list(value.get('k')), - 'uniform_title': value.get('s'), - 'qualifying_information': value.get('c'), - 'main_entry_heading': value.get('a'), - 'relationship_code': utils.force_list(value.get('4')), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'place_publisher_and_date_of_publication': value.get('d'), - 'standard_technical_report_number': value.get('u'), - 'linkage': value.get('6'), - 'note_controller': indicator_map1.get(key[3]), - 'display_constant_controller': indicator_map2.get(key[4]), + "__order__": tuple(order) if len(order) else None, + "coden_designation": value.get("y"), + "title": value.get("t"), + "material_specific_details": value.get("m"), + "note": utils.force_list(value.get("n")), + "other_item_identifier": utils.force_list(value.get("o")), + "international_standard_serial_number": value.get("x"), + "control_subfield": value.get("7"), + "physical_description": value.get("h"), + "relationship_information": utils.force_list(value.get("i")), + "international_standard_book_number": utils.force_list(value.get("z")), + "edition": value.get("b"), + "related_parts": utils.force_list(value.get("g")), + "record_control_number": utils.force_list(value.get("w")), + "report_number": utils.force_list(value.get("r")), + "series_data_for_related_item": utils.force_list(value.get("k")), + "uniform_title": value.get("s"), + "qualifying_information": value.get("c"), + "main_entry_heading": value.get("a"), + "relationship_code": utils.force_list(value.get("4")), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "place_publisher_and_date_of_publication": value.get("d"), + "standard_technical_report_number": value.get("u"), + "linkage": value.get("6"), + "note_controller": indicator_map1.get(key[3]), + "display_constant_controller": indicator_map2.get(key[4]), } diff --git a/rero_ebooks/dojson/marc21/fields/bd80x83x.py b/rero_ebooks/dojson/marc21/fields/bd80x83x.py index 2dfc48f..6506077 100644 --- a/rero_ebooks/dojson/marc21/fields/bd80x83x.py +++ b/rero_ebooks/dojson/marc21/fields/bd80x83x.py @@ -14,93 +14,91 @@ from ..model import marc21 -@marc21.over('series_added_entry_personal_name', '^800[0_13].') +@marc21.over("series_added_entry_personal_name", "^800[0_13].") @utils.for_each_value @utils.filter_values def series_added_entry_personal_name(self, key, value): """Series Added Entry-Personal Name.""" indicator_map1 = {"0": "Forename", "1": "Surname", "3": "Family name"} field_map = { - 'c': 'titles_and_other_words_associated_with_a_name', - 'a': 'personal_name', - '5': 'institution_to_which_field_applies', - 'm': 'medium_of_performance_for_music', - 'k': 'form_subheading', - 'e': 'relator_term', - '4': 'relator_code', - '6': 'linkage', - 'p': 'name_of_part_section_of_a_work', - 'r': 'key_for_music', - 't': 'title_of_a_work', - '8': 'field_link_and_sequence_number', - 'h': 'medium', - '7': 'control_subfield', - 'x': 'international_standard_serial_number', - 'b': 'numeration', - 'j': 'attribution_qualifier', - 'f': 'date_of_a_work', - 's': 'version', - 'd': 'dates_associated_with_a_name', - 'l': 'language_of_a_work', - 'q': 'fuller_form_of_name', - '3': 'materials_specified', - 'u': 'affiliation', - 'o': 'arranged_statement_for_music', - 'w': 'bibliographic_record_control_number', - '0': 'authority_record_control_number_or_standard_number', - 'n': 'number_of_part_section_of_a_work', - 'g': 'miscellaneous_information', - 'v': 'volume_sequential_designation', + "c": "titles_and_other_words_associated_with_a_name", + "a": "personal_name", + "5": "institution_to_which_field_applies", + "m": "medium_of_performance_for_music", + "k": "form_subheading", + "e": "relator_term", + "4": "relator_code", + "6": "linkage", + "p": "name_of_part_section_of_a_work", + "r": "key_for_music", + "t": "title_of_a_work", + "8": "field_link_and_sequence_number", + "h": "medium", + "7": "control_subfield", + "x": "international_standard_serial_number", + "b": "numeration", + "j": "attribution_qualifier", + "f": "date_of_a_work", + "s": "version", + "d": "dates_associated_with_a_name", + "l": "language_of_a_work", + "q": "fuller_form_of_name", + "3": "materials_specified", + "u": "affiliation", + "o": "arranged_statement_for_music", + "w": "bibliographic_record_control_number", + "0": "authority_record_control_number_or_standard_number", + "n": "number_of_part_section_of_a_work", + "g": "miscellaneous_information", + "v": "volume_sequential_designation", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('type_of_personal_name_entry_element') + order.append("type_of_personal_name_entry_element") return { - '__order__': tuple(order) if len(order) else None, - 'titles_and_other_words_associated_with_a_name': utils.force_list( - value.get('c') + "__order__": tuple(order) if len(order) else None, + "titles_and_other_words_associated_with_a_name": utils.force_list( + value.get("c") ), - 'personal_name': value.get('a'), - 'institution_to_which_field_applies': utils.force_list(value.get('5')), - 'medium_of_performance_for_music': utils.force_list(value.get('m')), - 'form_subheading': utils.force_list(value.get('k')), - 'relator_term': utils.force_list(value.get('e')), - 'relator_code': utils.force_list(value.get('4')), - 'linkage': value.get('6'), - 'name_of_part_section_of_a_work': utils.force_list(value.get('p')), - 'key_for_music': value.get('r'), - 'title_of_a_work': value.get('t'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'medium': value.get('h'), - 'control_subfield': value.get('7'), - 'international_standard_serial_number': value.get('x'), - 'numeration': value.get('b'), - 'attribution_qualifier': utils.force_list(value.get('j')), - 'date_of_a_work': value.get('f'), - 'version': value.get('s'), - 'dates_associated_with_a_name': value.get('d'), - 'language_of_a_work': value.get('l'), - 'fuller_form_of_name': value.get('q'), - 'materials_specified': value.get('3'), - 'affiliation': value.get('u'), - 'arranged_statement_for_music': value.get('o'), - 'bibliographic_record_control_number': utils.force_list( - value.get('w') + "personal_name": value.get("a"), + "institution_to_which_field_applies": utils.force_list(value.get("5")), + "medium_of_performance_for_music": utils.force_list(value.get("m")), + "form_subheading": utils.force_list(value.get("k")), + "relator_term": utils.force_list(value.get("e")), + "relator_code": utils.force_list(value.get("4")), + "linkage": value.get("6"), + "name_of_part_section_of_a_work": utils.force_list(value.get("p")), + "key_for_music": value.get("r"), + "title_of_a_work": value.get("t"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "medium": value.get("h"), + "control_subfield": value.get("7"), + "international_standard_serial_number": value.get("x"), + "numeration": value.get("b"), + "attribution_qualifier": utils.force_list(value.get("j")), + "date_of_a_work": value.get("f"), + "version": value.get("s"), + "dates_associated_with_a_name": value.get("d"), + "language_of_a_work": value.get("l"), + "fuller_form_of_name": value.get("q"), + "materials_specified": value.get("3"), + "affiliation": value.get("u"), + "arranged_statement_for_music": value.get("o"), + "bibliographic_record_control_number": utils.force_list(value.get("w")), + "authority_record_control_number_or_standard_number": utils.force_list( + value.get("0") ), - 'authority_record_control_number_or_standard_number': utils.force_list( - value.get('0') - ), - 'number_of_part_section_of_a_work': utils.force_list(value.get('n')), - 'miscellaneous_information': utils.force_list(value.get('g')), - 'volume_sequential_designation': value.get('v'), - 'type_of_personal_name_entry_element': indicator_map1.get(key[3]), + "number_of_part_section_of_a_work": utils.force_list(value.get("n")), + "miscellaneous_information": utils.force_list(value.get("g")), + "volume_sequential_designation": value.get("v"), + "type_of_personal_name_entry_element": indicator_map1.get(key[3]), } -@marc21.over('series_added_entry_corporate_name', '^810[021_].') +@marc21.over("series_added_entry_corporate_name", "^810[021_].") @utils.for_each_value @utils.filter_values def series_added_entry_corporate_name(self, key, value): @@ -111,80 +109,78 @@ def series_added_entry_corporate_name(self, key, value): "2": "Name in direct order", } field_map = { - 'c': 'location_of_meeting', - 'a': 'corporate_name_or_jurisdiction_name_as_entry_element', - '5': 'institution_to_which_field_applies', - 'm': 'medium_of_performance_for_music', - 'k': 'form_subheading', - 'e': 'relator_term', - '4': 'relator_code', - '6': 'linkage', - 'p': 'name_of_part_section_of_a_work', - 'r': 'key_for_music', - 't': 'title_of_a_work', - '8': 'field_link_and_sequence_number', - 'h': 'medium', - '7': 'control_subfield', - 'x': 'international_standard_serial_number', - 'b': 'subordinate_unit', - 'f': 'date_of_a_work', - 's': 'version', - 'd': 'date_of_meeting_or_treaty_signing', - 'l': 'language_of_a_work', - 'w': 'bibliographic_record_control_number', - '3': 'materials_specified', - 'u': 'affiliation', - 'o': 'arranged_statement_for_music', - '0': 'authority_record_control_number_or_standard_number', - 'n': 'number_of_part_section_meeting', - 'g': 'miscellaneous_information', - 'v': 'volume_sequential_designation', + "c": "location_of_meeting", + "a": "corporate_name_or_jurisdiction_name_as_entry_element", + "5": "institution_to_which_field_applies", + "m": "medium_of_performance_for_music", + "k": "form_subheading", + "e": "relator_term", + "4": "relator_code", + "6": "linkage", + "p": "name_of_part_section_of_a_work", + "r": "key_for_music", + "t": "title_of_a_work", + "8": "field_link_and_sequence_number", + "h": "medium", + "7": "control_subfield", + "x": "international_standard_serial_number", + "b": "subordinate_unit", + "f": "date_of_a_work", + "s": "version", + "d": "date_of_meeting_or_treaty_signing", + "l": "language_of_a_work", + "w": "bibliographic_record_control_number", + "3": "materials_specified", + "u": "affiliation", + "o": "arranged_statement_for_music", + "0": "authority_record_control_number_or_standard_number", + "n": "number_of_part_section_meeting", + "g": "miscellaneous_information", + "v": "volume_sequential_designation", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('type_of_corporate_name_entry_element') + order.append("type_of_corporate_name_entry_element") return { - '__order__': tuple(order) if len(order) else None, - 'location_of_meeting': utils.force_list(value.get('c')), - 'corporate_name_or_jurisdiction_name_as_entry_element': value.get('a'), - 'institution_to_which_field_applies': utils.force_list(value.get('5')), - 'medium_of_performance_for_music': utils.force_list(value.get('m')), - 'form_subheading': utils.force_list(value.get('k')), - 'relator_term': utils.force_list(value.get('e')), - 'relator_code': utils.force_list(value.get('4')), - 'linkage': value.get('6'), - 'name_of_part_section_of_a_work': utils.force_list(value.get('p')), - 'key_for_music': value.get('r'), - 'title_of_a_work': value.get('t'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'medium': value.get('h'), - 'control_subfield': value.get('7'), - 'international_standard_serial_number': value.get('x'), - 'subordinate_unit': utils.force_list(value.get('b')), - 'date_of_a_work': value.get('f'), - 'version': value.get('s'), - 'date_of_meeting_or_treaty_signing': utils.force_list(value.get('d')), - 'language_of_a_work': value.get('l'), - 'bibliographic_record_control_number': utils.force_list( - value.get('w') - ), - 'materials_specified': value.get('3'), - 'affiliation': value.get('u'), - 'arranged_statement_for_music': value.get('o'), - 'authority_record_control_number_or_standard_number': utils.force_list( - value.get('0') + "__order__": tuple(order) if len(order) else None, + "location_of_meeting": utils.force_list(value.get("c")), + "corporate_name_or_jurisdiction_name_as_entry_element": value.get("a"), + "institution_to_which_field_applies": utils.force_list(value.get("5")), + "medium_of_performance_for_music": utils.force_list(value.get("m")), + "form_subheading": utils.force_list(value.get("k")), + "relator_term": utils.force_list(value.get("e")), + "relator_code": utils.force_list(value.get("4")), + "linkage": value.get("6"), + "name_of_part_section_of_a_work": utils.force_list(value.get("p")), + "key_for_music": value.get("r"), + "title_of_a_work": value.get("t"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "medium": value.get("h"), + "control_subfield": value.get("7"), + "international_standard_serial_number": value.get("x"), + "subordinate_unit": utils.force_list(value.get("b")), + "date_of_a_work": value.get("f"), + "version": value.get("s"), + "date_of_meeting_or_treaty_signing": utils.force_list(value.get("d")), + "language_of_a_work": value.get("l"), + "bibliographic_record_control_number": utils.force_list(value.get("w")), + "materials_specified": value.get("3"), + "affiliation": value.get("u"), + "arranged_statement_for_music": value.get("o"), + "authority_record_control_number_or_standard_number": utils.force_list( + value.get("0") ), - 'number_of_part_section_meeting': utils.force_list(value.get('n')), - 'miscellaneous_information': utils.force_list(value.get('g')), - 'volume_sequential_designation': value.get('v'), - 'type_of_corporate_name_entry_element': indicator_map1.get(key[3]), + "number_of_part_section_meeting": utils.force_list(value.get("n")), + "miscellaneous_information": utils.force_list(value.get("g")), + "volume_sequential_designation": value.get("v"), + "type_of_corporate_name_entry_element": indicator_map1.get(key[3]), } -@marc21.over('series_added_entry_meeting_name', '^811[021_].') +@marc21.over("series_added_entry_meeting_name", "^811[021_].") @utils.for_each_value @utils.filter_values def series_added_entry_meeting_name(self, key, value): @@ -195,142 +191,136 @@ def series_added_entry_meeting_name(self, key, value): "2": "Name in direct order", } field_map = { - 'c': 'location_of_meeting', - 'a': 'meeting_name_or_jurisdiction_name_as_entry_element', - '5': 'institution_to_which_field_applies', - 'k': 'form_subheading', - 'e': 'subordinate_unit', - '4': 'relator_code', - '6': 'linkage', - 'p': 'name_of_part_section_of_a_work', - 't': 'title_of_a_work', - '8': 'field_link_and_sequence_number', - 'h': 'medium', - '7': 'control_subfield', - 'x': 'international_standard_serial_number', - 'w': 'bibliographic_record_control_number', - 'j': 'relator_term', - 'f': 'date_of_a_work', - 's': 'version', - 'd': 'date_of_meeting', - 'l': 'language_of_a_work', - 'q': 'name_of_meeting_following_jurisdiction_name_entry_element', - '3': 'materials_specified', - 'u': 'affiliation', - '0': 'authority_record_control_number_or_standard_number', - 'n': 'number_of_part_section_meeting', - 'g': 'miscellaneous_information', - 'v': 'volume_sequential_designation', + "c": "location_of_meeting", + "a": "meeting_name_or_jurisdiction_name_as_entry_element", + "5": "institution_to_which_field_applies", + "k": "form_subheading", + "e": "subordinate_unit", + "4": "relator_code", + "6": "linkage", + "p": "name_of_part_section_of_a_work", + "t": "title_of_a_work", + "8": "field_link_and_sequence_number", + "h": "medium", + "7": "control_subfield", + "x": "international_standard_serial_number", + "w": "bibliographic_record_control_number", + "j": "relator_term", + "f": "date_of_a_work", + "s": "version", + "d": "date_of_meeting", + "l": "language_of_a_work", + "q": "name_of_meeting_following_jurisdiction_name_entry_element", + "3": "materials_specified", + "u": "affiliation", + "0": "authority_record_control_number_or_standard_number", + "n": "number_of_part_section_meeting", + "g": "miscellaneous_information", + "v": "volume_sequential_designation", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('type_of_meeting_name_entry_element') + order.append("type_of_meeting_name_entry_element") return { - '__order__': tuple(order) if len(order) else None, - 'location_of_meeting': utils.force_list(value.get('c')), - 'meeting_name_or_jurisdiction_name_as_entry_element': value.get('a'), - 'institution_to_which_field_applies': utils.force_list(value.get('5')), - 'form_subheading': utils.force_list(value.get('k')), - 'subordinate_unit': utils.force_list(value.get('e')), - 'relator_code': utils.force_list(value.get('4')), - 'linkage': value.get('6'), - 'name_of_part_section_of_a_work': utils.force_list(value.get('p')), - 'title_of_a_work': value.get('t'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'medium': value.get('h'), - 'control_subfield': value.get('7'), - 'international_standard_serial_number': value.get('x'), - 'bibliographic_record_control_number': utils.force_list( - value.get('w') - ), - 'relator_term': utils.force_list(value.get('j')), - 'date_of_a_work': value.get('f'), - 'version': value.get('s'), - 'date_of_meeting': value.get('d'), - 'language_of_a_work': value.get('l'), - 'name_of_meeting_following_jurisdiction_name_entry_element': value.get( - 'q' + "__order__": tuple(order) if len(order) else None, + "location_of_meeting": utils.force_list(value.get("c")), + "meeting_name_or_jurisdiction_name_as_entry_element": value.get("a"), + "institution_to_which_field_applies": utils.force_list(value.get("5")), + "form_subheading": utils.force_list(value.get("k")), + "subordinate_unit": utils.force_list(value.get("e")), + "relator_code": utils.force_list(value.get("4")), + "linkage": value.get("6"), + "name_of_part_section_of_a_work": utils.force_list(value.get("p")), + "title_of_a_work": value.get("t"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "medium": value.get("h"), + "control_subfield": value.get("7"), + "international_standard_serial_number": value.get("x"), + "bibliographic_record_control_number": utils.force_list(value.get("w")), + "relator_term": utils.force_list(value.get("j")), + "date_of_a_work": value.get("f"), + "version": value.get("s"), + "date_of_meeting": value.get("d"), + "language_of_a_work": value.get("l"), + "name_of_meeting_following_jurisdiction_name_entry_element": value.get("q"), + "materials_specified": value.get("3"), + "affiliation": value.get("u"), + "authority_record_control_number_or_standard_number": utils.force_list( + value.get("0") ), - 'materials_specified': value.get('3'), - 'affiliation': value.get('u'), - 'authority_record_control_number_or_standard_number': utils.force_list( - value.get('0') - ), - 'number_of_part_section_meeting': utils.force_list(value.get('n')), - 'miscellaneous_information': utils.force_list(value.get('g')), - 'volume_sequential_designation': value.get('v'), - 'type_of_meeting_name_entry_element': indicator_map1.get(key[3]), + "number_of_part_section_meeting": utils.force_list(value.get("n")), + "miscellaneous_information": utils.force_list(value.get("g")), + "volume_sequential_designation": value.get("v"), + "type_of_meeting_name_entry_element": indicator_map1.get(key[3]), } -@marc21.over('series_added_entry_uniform_title', '^830.[2_579683041]') +@marc21.over("series_added_entry_uniform_title", "^830.[2_579683041]") @utils.for_each_value @utils.filter_values def series_added_entry_uniform_title(self, key, value): """Series Added Entry-Uniform Title.""" indicator_map2 = {str(x): str(x) for x in range(10)} field_map = { - 'a': 'uniform_title', - '7': 'control_subfield', - 'm': 'medium_of_performance_for_music', - 'k': 'form_subheading', - '6': 'linkage', - 'p': 'name_of_part_section_of_a_work', - 'r': 'key_for_music', - 't': 'title_of_a_work', - '8': 'field_link_and_sequence_number', - 'h': 'medium', - '5': 'institution_to_which_field_applies', - 'x': 'international_standard_serial_number', - 'w': 'bibliographic_record_control_number', - 'f': 'date_of_a_work', - 's': 'version', - 'd': 'date_of_treaty_signing', - 'l': 'language_of_a_work', - '3': 'materials_specified', - 'o': 'arranged_statement_for_music', - '0': 'authority_record_control_number_or_standard_number', - 'n': 'number_of_part_section_of_a_work', - 'g': 'miscellaneous_information', - 'v': 'volume_sequential_designation', + "a": "uniform_title", + "7": "control_subfield", + "m": "medium_of_performance_for_music", + "k": "form_subheading", + "6": "linkage", + "p": "name_of_part_section_of_a_work", + "r": "key_for_music", + "t": "title_of_a_work", + "8": "field_link_and_sequence_number", + "h": "medium", + "5": "institution_to_which_field_applies", + "x": "international_standard_serial_number", + "w": "bibliographic_record_control_number", + "f": "date_of_a_work", + "s": "version", + "d": "date_of_treaty_signing", + "l": "language_of_a_work", + "3": "materials_specified", + "o": "arranged_statement_for_music", + "0": "authority_record_control_number_or_standard_number", + "n": "number_of_part_section_of_a_work", + "g": "miscellaneous_information", + "v": "volume_sequential_designation", } order = utils.map_order(field_map, value) if key[4] in indicator_map2: - order.append('nonfiling_characters') + order.append("nonfiling_characters") return { - '__order__': tuple(order) if len(order) else None, - 'uniform_title': value.get('a'), - 'control_subfield': value.get('7'), - 'medium_of_performance_for_music': utils.force_list(value.get('m')), - 'form_subheading': utils.force_list(value.get('k')), - 'linkage': value.get('6'), - 'name_of_part_section_of_a_work': utils.force_list(value.get('p')), - 'key_for_music': value.get('r'), - 'title_of_a_work': value.get('t'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'medium': value.get('h'), - 'institution_to_which_field_applies': utils.force_list(value.get('5')), - 'international_standard_serial_number': value.get('x'), - 'bibliographic_record_control_number': utils.force_list( - value.get('w') - ), - 'date_of_a_work': value.get('f'), - 'version': value.get('s'), - 'date_of_treaty_signing': utils.force_list(value.get('d')), - 'language_of_a_work': value.get('l'), - 'materials_specified': value.get('3'), - 'arranged_statement_for_music': value.get('o'), - 'authority_record_control_number_or_standard_number': utils.force_list( - value.get('0') + "__order__": tuple(order) if len(order) else None, + "uniform_title": value.get("a"), + "control_subfield": value.get("7"), + "medium_of_performance_for_music": utils.force_list(value.get("m")), + "form_subheading": utils.force_list(value.get("k")), + "linkage": value.get("6"), + "name_of_part_section_of_a_work": utils.force_list(value.get("p")), + "key_for_music": value.get("r"), + "title_of_a_work": value.get("t"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "medium": value.get("h"), + "institution_to_which_field_applies": utils.force_list(value.get("5")), + "international_standard_serial_number": value.get("x"), + "bibliographic_record_control_number": utils.force_list(value.get("w")), + "date_of_a_work": value.get("f"), + "version": value.get("s"), + "date_of_treaty_signing": utils.force_list(value.get("d")), + "language_of_a_work": value.get("l"), + "materials_specified": value.get("3"), + "arranged_statement_for_music": value.get("o"), + "authority_record_control_number_or_standard_number": utils.force_list( + value.get("0") ), - 'number_of_part_section_of_a_work': utils.force_list(value.get('n')), - 'miscellaneous_information': utils.force_list(value.get('g')), - 'volume_sequential_designation': value.get('v'), - 'nonfiling_characters': indicator_map2.get(key[4]), + "number_of_part_section_of_a_work": utils.force_list(value.get("n")), + "miscellaneous_information": utils.force_list(value.get("g")), + "volume_sequential_designation": value.get("v"), + "nonfiling_characters": indicator_map2.get(key[4]), } diff --git a/rero_ebooks/dojson/marc21/fields/bd84188x.py b/rero_ebooks/dojson/marc21/fields/bd84188x.py index 6581685..154fc2d 100644 --- a/rero_ebooks/dojson/marc21/fields/bd84188x.py +++ b/rero_ebooks/dojson/marc21/fields/bd84188x.py @@ -14,26 +14,26 @@ from ..model import marc21 -@marc21.over('holding_institution', '^850..') +@marc21.over("holding_institution", "^850..") @utils.for_each_value @utils.filter_values def holding_institution(self, key, value): """Holding Institution.""" field_map = { - '8': 'field_link_and_sequence_number', - 'a': 'holding_institution', + "8": "field_link_and_sequence_number", + "a": "holding_institution", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'holding_institution': utils.force_list(value.get('a')), + "__order__": tuple(order) if len(order) else None, + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "holding_institution": utils.force_list(value.get("a")), } -@marc21.over('location', '^852[05_3168724][102_]') +@marc21.over("location", "^852[05_3168724][102_]") @utils.for_each_value @utils.filter_values def location(self, key, value): @@ -57,76 +57,76 @@ def location(self, key, value): "_": "No information provided", } field_map = { - 'g': 'non_coded_location_qualifier', - 'i': 'item_part', - 'e': 'address', - 'u': 'uniform_resource_identifier', - 'h': 'classification_part', - '6': 'linkage', - 'q': 'piece_physical_condition', - 'd': 'former_shelving_location', - 'f': 'coded_location_qualifier', - 'n': 'country_code', - 'a': 'location', - 'c': 'shelving_location', - '2': 'source_of_classification_or_shelving_scheme', - 't': 'copy_number', - 'l': 'shelving_form_of_title', - '3': 'materials_specified', - 'b': 'sublocation_or_collection', - 'p': 'piece_designation', - 'z': 'public_note', - 'm': 'call_number_suffix', - 'j': 'shelving_control_number', - '8': 'sequence_number', - 'k': 'call_number_prefix', - 's': 'copyright_article_fee_code', - 'x': 'nonpublic_note', + "g": "non_coded_location_qualifier", + "i": "item_part", + "e": "address", + "u": "uniform_resource_identifier", + "h": "classification_part", + "6": "linkage", + "q": "piece_physical_condition", + "d": "former_shelving_location", + "f": "coded_location_qualifier", + "n": "country_code", + "a": "location", + "c": "shelving_location", + "2": "source_of_classification_or_shelving_scheme", + "t": "copy_number", + "l": "shelving_form_of_title", + "3": "materials_specified", + "b": "sublocation_or_collection", + "p": "piece_designation", + "z": "public_note", + "m": "call_number_suffix", + "j": "shelving_control_number", + "8": "sequence_number", + "k": "call_number_prefix", + "s": "copyright_article_fee_code", + "x": "nonpublic_note", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('shelving_scheme') + order.append("shelving_scheme") if key[4] in indicator_map2: - order.append('shelving_order') + order.append("shelving_order") return { - '__order__': tuple(order) if len(order) else None, - 'non_coded_location_qualifier': utils.force_list(value.get('g')), - 'item_part': utils.force_list(value.get('i')), - 'address': utils.force_list(value.get('e')), - 'uniform_resource_identifier': utils.force_list(value.get('u')), - 'classification_part': value.get('h'), - 'linkage': value.get('6'), - 'piece_physical_condition': value.get('q'), - 'former_shelving_location': utils.force_list(value.get('d')), - 'coded_location_qualifier': utils.force_list(value.get('f')), - 'country_code': value.get('n'), - 'location': value.get('a'), - 'shelving_location': utils.force_list(value.get('c')), - 'source_of_classification_or_shelving_scheme': value.get('2'), - 'copy_number': value.get('t'), - 'shelving_form_of_title': value.get('l'), - 'materials_specified': value.get('3'), - 'sublocation_or_collection': utils.force_list(value.get('b')), - 'piece_designation': value.get('p'), - 'public_note': utils.force_list(value.get('z')), - 'call_number_suffix': utils.force_list(value.get('m')), - 'shelving_control_number': value.get('j'), - 'sequence_number': value.get('8'), - 'call_number_prefix': utils.force_list(value.get('k')), - 'copyright_article_fee_code': utils.force_list(value.get('s')), - 'nonpublic_note': utils.force_list(value.get('x')), - 'shelving_scheme': value.get('2') - if key[3] == '7' + "__order__": tuple(order) if len(order) else None, + "non_coded_location_qualifier": utils.force_list(value.get("g")), + "item_part": utils.force_list(value.get("i")), + "address": utils.force_list(value.get("e")), + "uniform_resource_identifier": utils.force_list(value.get("u")), + "classification_part": value.get("h"), + "linkage": value.get("6"), + "piece_physical_condition": value.get("q"), + "former_shelving_location": utils.force_list(value.get("d")), + "coded_location_qualifier": utils.force_list(value.get("f")), + "country_code": value.get("n"), + "location": value.get("a"), + "shelving_location": utils.force_list(value.get("c")), + "source_of_classification_or_shelving_scheme": value.get("2"), + "copy_number": value.get("t"), + "shelving_form_of_title": value.get("l"), + "materials_specified": value.get("3"), + "sublocation_or_collection": utils.force_list(value.get("b")), + "piece_designation": value.get("p"), + "public_note": utils.force_list(value.get("z")), + "call_number_suffix": utils.force_list(value.get("m")), + "shelving_control_number": value.get("j"), + "sequence_number": value.get("8"), + "call_number_prefix": utils.force_list(value.get("k")), + "copyright_article_fee_code": utils.force_list(value.get("s")), + "nonpublic_note": utils.force_list(value.get("x")), + "shelving_scheme": value.get("2") + if key[3] == "7" else indicator_map1.get(key[3]), - 'shelving_order': indicator_map2.get(key[4]), + "shelving_order": indicator_map2.get(key[4]), } -@marc21.over('electronic_location_and_access', '^856[073142_][0812_]') +@marc21.over("electronic_location_and_access", "^856[073142_][0812_]") @utils.for_each_value @utils.filter_values def electronic_location_and_access(self, key, value): @@ -148,107 +148,107 @@ def electronic_location_and_access(self, key, value): "_": "No information provided", } field_map = { - 'w': 'record_control_number', - 'i': 'instruction', - 'z': 'public_note', - 'u': 'uniform_resource_identifier', - 'h': 'processor_of_request', - '6': 'linkage', - 'q': 'electronic_format_type', - 'd': 'path', - 'f': 'electronic_name', - 'n': 'name_of_location_of_host', - 'a': 'host_name', - 'v': 'hours_access_method_available', - 'c': 'compression_information', - 'y': 'link_text', - '2': 'access_method', - 't': 'terminal_emulation', - 'l': 'logon', - 's': 'file_size', - '3': 'materials_specified', - 'b': 'access_number', - 'p': 'port', - 'o': 'operating_system', - 'm': 'contact_for_access_assistance', - 'j': 'bits_per_second', - '8': 'field_link_and_sequence_number', - 'k': 'password', - 'r': 'settings', - 'x': 'nonpublic_note', + "w": "record_control_number", + "i": "instruction", + "z": "public_note", + "u": "uniform_resource_identifier", + "h": "processor_of_request", + "6": "linkage", + "q": "electronic_format_type", + "d": "path", + "f": "electronic_name", + "n": "name_of_location_of_host", + "a": "host_name", + "v": "hours_access_method_available", + "c": "compression_information", + "y": "link_text", + "2": "access_method", + "t": "terminal_emulation", + "l": "logon", + "s": "file_size", + "3": "materials_specified", + "b": "access_number", + "p": "port", + "o": "operating_system", + "m": "contact_for_access_assistance", + "j": "bits_per_second", + "8": "field_link_and_sequence_number", + "k": "password", + "r": "settings", + "x": "nonpublic_note", } order = utils.map_order(field_map, value) - if key[3] in indicator_map1 and '2' not in value: - order.append('access_method') + if key[3] in indicator_map1 and "2" not in value: + order.append("access_method") if key[4] in indicator_map2: - order.append('relationship') + order.append("relationship") return { - '__order__': tuple(order) if len(order) else None, - 'record_control_number': utils.force_list(value.get('w')), - 'instruction': utils.force_list(value.get('i')), - 'public_note': utils.force_list(value.get('z')), - 'uniform_resource_identifier': utils.force_list(value.get('u')), - 'processor_of_request': value.get('h'), - 'linkage': value.get('6'), - 'electronic_format_type': value.get('q'), - 'path': utils.force_list(value.get('d')), - 'electronic_name': utils.force_list(value.get('f')), - 'name_of_location_of_host': value.get('n'), - 'host_name': utils.force_list(value.get('a')), - 'hours_access_method_available': utils.force_list(value.get('v')), - 'compression_information': utils.force_list(value.get('c')), - 'link_text': utils.force_list(value.get('y')), - 'terminal_emulation': utils.force_list(value.get('t')), - 'logon': value.get('l'), - 'file_size': utils.force_list(value.get('s')), - 'materials_specified': value.get('3'), - 'access_number': utils.force_list(value.get('b')), - 'port': value.get('p'), - 'operating_system': value.get('o'), - 'contact_for_access_assistance': utils.force_list(value.get('m')), - 'bits_per_second': value.get('j'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'password': value.get('k'), - 'settings': value.get('r'), - 'nonpublic_note': utils.force_list(value.get('x')), - 'access_method': value.get('2') - if key[3] == '7' + "__order__": tuple(order) if len(order) else None, + "record_control_number": utils.force_list(value.get("w")), + "instruction": utils.force_list(value.get("i")), + "public_note": utils.force_list(value.get("z")), + "uniform_resource_identifier": utils.force_list(value.get("u")), + "processor_of_request": value.get("h"), + "linkage": value.get("6"), + "electronic_format_type": value.get("q"), + "path": utils.force_list(value.get("d")), + "electronic_name": utils.force_list(value.get("f")), + "name_of_location_of_host": value.get("n"), + "host_name": utils.force_list(value.get("a")), + "hours_access_method_available": utils.force_list(value.get("v")), + "compression_information": utils.force_list(value.get("c")), + "link_text": utils.force_list(value.get("y")), + "terminal_emulation": utils.force_list(value.get("t")), + "logon": value.get("l"), + "file_size": utils.force_list(value.get("s")), + "materials_specified": value.get("3"), + "access_number": utils.force_list(value.get("b")), + "port": value.get("p"), + "operating_system": value.get("o"), + "contact_for_access_assistance": utils.force_list(value.get("m")), + "bits_per_second": value.get("j"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "password": value.get("k"), + "settings": value.get("r"), + "nonpublic_note": utils.force_list(value.get("x")), + "access_method": value.get("2") + if key[3] == "7" else indicator_map1.get(key[3]), - 'relationship': indicator_map2.get(key[4]), + "relationship": indicator_map2.get(key[4]), } -@marc21.over('replacement_record_information', '^882..') +@marc21.over("replacement_record_information", "^882..") @utils.filter_values def replacement_record_information(self, key, value): """Replacement Record Information.""" field_map = { - 'a': 'replacement_title', - '8': 'field_link_and_sequence_number', - 'i': 'explanatory_text', - '6': 'linkage', - 'w': 'replacement_bibliographic_record_control_number', + "a": "replacement_title", + "8": "field_link_and_sequence_number", + "i": "explanatory_text", + "6": "linkage", + "w": "replacement_bibliographic_record_control_number", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'replacement_title': utils.force_list(value.get('a')), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'explanatory_text': utils.force_list(value.get('i')), - 'linkage': value.get('6'), - 'replacement_bibliographic_record_control_number': utils.force_list( - value.get('w') + "__order__": tuple(order) if len(order) else None, + "replacement_title": utils.force_list(value.get("a")), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "explanatory_text": utils.force_list(value.get("i")), + "linkage": value.get("6"), + "replacement_bibliographic_record_control_number": utils.force_list( + value.get("w") ), } -@marc21.over('machine_generated_metadata_provenance', '^883[10_].') +@marc21.over("machine_generated_metadata_provenance", "^883[10_].") @utils.for_each_value @utils.filter_values def machine_generated_metadata_provenance(self, key, value): @@ -259,77 +259,75 @@ def machine_generated_metadata_provenance(self, key, value): "_": "No information provided/not applicable", } field_map = { - 'w': 'bibliographic_record_control_number', - '0': 'authority_record_control_number_or_standard_number', - 'a': 'generation_process', - 'x': 'validity_end_date', - 'c': 'confidence_value', - '8': 'field_link_and_sequence_number', - 'u': 'uniform_resource_identifier', - 'q': 'generation_agency', - 'd': 'generation_date', + "w": "bibliographic_record_control_number", + "0": "authority_record_control_number_or_standard_number", + "a": "generation_process", + "x": "validity_end_date", + "c": "confidence_value", + "8": "field_link_and_sequence_number", + "u": "uniform_resource_identifier", + "q": "generation_agency", + "d": "generation_date", } order = utils.map_order(field_map, value) if key[3] in indicator_map1: - order.append('method_of_machine_assignment') + order.append("method_of_machine_assignment") return { - '__order__': tuple(order) if len(order) else None, - 'bibliographic_record_control_number': utils.force_list( - value.get('w') + "__order__": tuple(order) if len(order) else None, + "bibliographic_record_control_number": utils.force_list(value.get("w")), + "authority_record_control_number_or_standard_number": utils.force_list( + value.get("0") ), - 'authority_record_control_number_or_standard_number': utils.force_list( - value.get('0') - ), - 'generation_process': value.get('a'), - 'validity_end_date': value.get('x'), - 'confidence_value': value.get('c'), - 'field_link_and_sequence_number': utils.force_list(value.get('8')), - 'uniform_resource_identifier': value.get('u'), - 'generation_agency': value.get('q'), - 'generation_date': value.get('d'), - 'method_of_machine_assignment': indicator_map1.get(key[3]), + "generation_process": value.get("a"), + "validity_end_date": value.get("x"), + "confidence_value": value.get("c"), + "field_link_and_sequence_number": utils.force_list(value.get("8")), + "uniform_resource_identifier": value.get("u"), + "generation_agency": value.get("q"), + "generation_date": value.get("d"), + "method_of_machine_assignment": indicator_map1.get(key[3]), } -@marc21.over('description_conversion_information', '^884..') +@marc21.over("description_conversion_information", "^884..") @utils.for_each_value @utils.filter_values def description_conversion_information(self, key, value): """Description Conversion Information.""" field_map = { - 'u': 'uniform_resource_identifier', - 'g': 'conversion_date', - 'q': 'conversion_agency', - 'a': 'conversion_process', - 'k': 'identifier_of_source_metadata', + "u": "uniform_resource_identifier", + "g": "conversion_date", + "q": "conversion_agency", + "a": "conversion_process", + "k": "identifier_of_source_metadata", } order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'uniform_resource_identifier': utils.force_list(value.get('u')), - 'conversion_date': value.get('g'), - 'conversion_agency': value.get('q'), - 'conversion_process': value.get('a'), - 'identifier_of_source_metadata': value.get('k'), + "__order__": tuple(order) if len(order) else None, + "uniform_resource_identifier": utils.force_list(value.get("u")), + "conversion_date": value.get("g"), + "conversion_agency": value.get("q"), + "conversion_process": value.get("a"), + "identifier_of_source_metadata": value.get("k"), } -@marc21.over('non_marc_information_field', '^887..') +@marc21.over("non_marc_information_field", "^887..") @utils.for_each_value @utils.filter_values def non_marc_information_field(self, key, value): """Non-MARC Information Field.""" - field_map = {'2': 'source_of_data', 'a': 'content_of_non_marc_field'} + field_map = {"2": "source_of_data", "a": "content_of_non_marc_field"} order = utils.map_order(field_map, value) return { - '__order__': tuple(order) if len(order) else None, - 'source_of_data': value.get('2'), - 'content_of_non_marc_field': value.get('a'), + "__order__": tuple(order) if len(order) else None, + "source_of_data": value.get("2"), + "content_of_non_marc_field": value.get("a"), } diff --git a/rero_ebooks/dojson/marc21/fields/bdleader.py b/rero_ebooks/dojson/marc21/fields/bdleader.py index 542ab17..ac56ad7 100644 --- a/rero_ebooks/dojson/marc21/fields/bdleader.py +++ b/rero_ebooks/dojson/marc21/fields/bdleader.py @@ -14,97 +14,98 @@ from ..model import marc21 -@marc21.over('leader', '^leader') +@marc21.over("leader", "^leader") @utils.filter_values def leader(self, key, value): """Leader.""" record_status = { - 'a': 'increase_in_encoding_level', - 'c': 'corrected_or_revised', - 'd': 'deleted', - 'n': 'new', - 'p': 'increase_in_encoding_level_from_prepublication', + "a": "increase_in_encoding_level", + "c": "corrected_or_revised", + "d": "deleted", + "n": "new", + "p": "increase_in_encoding_level_from_prepublication", } type_of_record = { - 'a': 'language_material', - 'c': 'notated_music', - 'd': 'manuscript_notated_music', - 'e': 'cartographic_material', - 'f': 'manuscript_cartographic_material', - 'g': 'projected_medium', - 'i': 'nonmusical_sound_recording', - 'j': 'musical_sound_recording', - 'k': 'two-dimensional_nonprojectable_graphic', - 'm': 'computer_file', - 'o': 'kit', - 'p': 'mixed_materials', - 'r': 'three-dimensional_artifact_or_naturally_occuring_object', - 't': 'manuscript_language_material', + "a": "language_material", + "c": "notated_music", + "d": "manuscript_notated_music", + "e": "cartographic_material", + "f": "manuscript_cartographic_material", + "g": "projected_medium", + "i": "nonmusical_sound_recording", + "j": "musical_sound_recording", + "k": "two-dimensional_nonprojectable_graphic", + "m": "computer_file", + "o": "kit", + "p": "mixed_materials", + "r": "three-dimensional_artifact_or_naturally_occuring_object", + "t": "manuscript_language_material", } bibliographic_level = { - 'a': 'monographic_component_part', - 'b': 'serial_component_part', - 'c': 'collection', - 'd': 'subunit', - 'i': 'integrating_resource', - 'm': 'monograph_item', - 's': 'serial', + "a": "monographic_component_part", + "b": "serial_component_part", + "c": "collection", + "d": "subunit", + "i": "integrating_resource", + "m": "monograph_item", + "s": "serial", } - type_of_control = {'#': 'no_specified_type', 'a': 'archival'} - character_coding_scheme = {'#': 'marc-8', 'a': 'ucs_unicode'} + type_of_control = {"#": "no_specified_type", "a": "archival"} + character_coding_scheme = {"#": "marc-8", "a": "ucs_unicode"} encoding_level = { - '#': 'full_level', - '1': 'full_level_material_not_examined', - '2': 'less-than-full_level_material_not_examined', - '3': 'abbreviated_level', - '4': 'core_level', - '5': 'partial_preliminary_level', - '7': 'minimal_level', - '8': 'prepublication_level', - 'u': 'unknown', - 'z': 'not_applicable', + "#": "full_level", + "1": "full_level_material_not_examined", + "2": "less-than-full_level_material_not_examined", + "3": "abbreviated_level", + "4": "core_level", + "5": "partial_preliminary_level", + "7": "minimal_level", + "8": "prepublication_level", + "u": "unknown", + "z": "not_applicable", } descriptive_cataloging_form = { - '#': 'non-isbd', - 'a': 'aacr_2', - 'c': 'isbd_punctuation_omitteed', - 'i': 'isbd_punctuation_included', - 'u': 'unknown', + "#": "non-isbd", + "a": "aacr_2", + "c": "isbd_punctuation_omitteed", + "i": "isbd_punctuation_included", + "u": "unknown", } multipart_resource_record_level = { - '#': 'not_specified_or_not_applicable', - 'a': 'set', - 'b': 'part_with_independent_title', - 'c': 'part_with_dependent_title', + "#": "not_specified_or_not_applicable", + "a": "set", + "b": "part_with_independent_title", + "c": "part_with_dependent_title", } - length_of_the_length_of_field_portion = {'4': 4} - length_of_the_starting_character_position_portion = {'5': 5} - length_of_the_implementation_defined_portion = {'0': 0} - undefined = {'0': 0} + length_of_the_length_of_field_portion = {"4": 4} + length_of_the_starting_character_position_portion = {"5": 5} + length_of_the_implementation_defined_portion = {"0": 0} + undefined = {"0": 0} return { - 'record_length': int(value[:5].replace(' ', '0')), - 'record_status': record_status.get(value[5]), - 'type_of_record': type_of_record.get(value[6]), - 'bibliographic_level': bibliographic_level.get(value[7]), - 'type_of_control': type_of_control.get(value[8]), - 'character_coding_scheme': character_coding_scheme.get(value[9]), - 'indicator_count': int(value[10].replace(' ', '0')), - 'subfield_code_count': int(value[11].replace(' ', '0')), - 'base_address_of_data': int(value[12:17].replace(' ', '0')), - 'encoding_level': encoding_level.get(value[17]), - 'descriptive_cataloging_form': descriptive_cataloging_form.get( - value[18] - ), - 'multipart_resource_record_level': multipart_resource_record_level.get( + "record_length": int(value[:5].replace(" ", "0")), + "record_status": record_status.get(value[5]), + "type_of_record": type_of_record.get(value[6]), + "bibliographic_level": bibliographic_level.get(value[7]), + "type_of_control": type_of_control.get(value[8]), + "character_coding_scheme": character_coding_scheme.get(value[9]), + "indicator_count": int(value[10].replace(" ", "0")), + "subfield_code_count": int(value[11].replace(" ", "0")), + "base_address_of_data": int(value[12:17].replace(" ", "0")), + "encoding_level": encoding_level.get(value[17]), + "descriptive_cataloging_form": descriptive_cataloging_form.get(value[18]), + "multipart_resource_record_level": multipart_resource_record_level.get( value[19] ), - 'length_of_the_length_of_field_portion': - length_of_the_length_of_field_portion.get(value[20]), - 'length_of_the_starting_character_position_portion': - length_of_the_starting_character_position_portion.get(value[21]), - 'length_of_the_implementation_defined_portion': - length_of_the_implementation_defined_portion.get(value[22]), - 'undefined': undefined.get(value[23]), + "length_of_the_length_of_field_portion": length_of_the_length_of_field_portion.get( + value[20] + ), + "length_of_the_starting_character_position_portion": length_of_the_starting_character_position_portion.get( + value[21] + ), + "length_of_the_implementation_defined_portion": length_of_the_implementation_defined_portion.get( + value[22] + ), + "undefined": undefined.get(value[23]), } diff --git a/rero_ebooks/dojson/marc21/model.py b/rero_ebooks/dojson/marc21/model.py index 005030a..35e5ce8 100644 --- a/rero_ebooks/dojson/marc21/model.py +++ b/rero_ebooks/dojson/marc21/model.py @@ -19,17 +19,17 @@ from dojson import Overdo -marc21 = Overdo(entry_point_group='rero_ebooks.marc21') +marc21 = Overdo(entry_point_group="rero_ebooks.marc21") """MARC 21 Format for Bibliographic Data.""" -@marc21.over('__order__', '__order__') +@marc21.over("__order__", "__order__") def order(self, key, value): """Preserve order of datafields.""" - order = [] + data_order = [] for field in value: name = marc21.index.query(field) name = name[0] if name else field - order.append(name) + data_order.append(name) - return order + return data_order diff --git a/rero_ebooks/dojson/utils.py b/rero_ebooks/dojson/utils.py index ebdb128..b77c809 100644 --- a/rero_ebooks/dojson/utils.py +++ b/rero_ebooks/dojson/utils.py @@ -21,5 +21,5 @@ def dump(iterator): - """Dump JSON from iteraror.""" + """Dump JSON from iterator.""" return json.dumps(list(iterator), indent=2) diff --git a/rero_ebooks/ext.py b/rero_ebooks/ext.py index 7a57970..df51bf6 100644 --- a/rero_ebooks/ext.py +++ b/rero_ebooks/ext.py @@ -31,10 +31,10 @@ def __init__(self, app=None): def init_app(self, app): """Flask application initialization.""" self.init_config(app) - app.extensions['reroebooks-app'] = self + app.extensions["reroebooks-app"] = self def init_config(self, app): """Initialize configuration.""" for k in dir(config): - if k.startswith('REROEBOOKS_APP_'): + if k.startswith("REROEBOOKS_APP_"): app.config.setdefault(k, getattr(config, k)) diff --git a/rero_ebooks/fetchers.py b/rero_ebooks/fetchers.py index 7b7aa7d..cfc3684 100644 --- a/rero_ebooks/fetchers.py +++ b/rero_ebooks/fetchers.py @@ -21,11 +21,11 @@ from .providers import EbookPidProvider -FetchedPID = namedtuple('FetchedPID', ['provider', 'pid_type', 'pid_value']) +FetchedPID = namedtuple("FetchedPID", ["provider", "pid_type", "pid_value"]) """A pid fetcher.""" -def ebook_pid_fetcher(record_uuid, data, pid_key='pid'): +def ebook_pid_fetcher(record_uuid, data, pid_key="pid"): """Fetch a ebook's identifiers. :param record_uuid: The record UUID. diff --git a/rero_ebooks/minters.py b/rero_ebooks/minters.py index a473a05..a196611 100644 --- a/rero_ebooks/minters.py +++ b/rero_ebooks/minters.py @@ -24,22 +24,18 @@ def build_ebook_pid(data, source): """Build ebook pid from record.""" - assert 'other_standard_identifier' in data - assert ( - 'standard_number_or_code' - in data.get('other_standard_identifier')[0] - ) + assert "other_standard_identifier" in data + assert "standard_number_or_code" in data.get("other_standard_identifier")[0] pid_value = ( - data.get('other_standard_identifier')[0] - .get('standard_number_or_code') - .split('/')[-1] + data.get("other_standard_identifier")[0] + .get("standard_number_or_code") + .split("/")[-1] ) - return f'{source}-{pid_value}' + return f"{source}-{pid_value}" -def ebook_pid_minter(record_uuid, data, source, pid_key='pid', - object_type='rec'): +def ebook_pid_minter(record_uuid, data, source, pid_key="pid", object_type="rec"): """Mint record identifiers. This is a minter specific for ebooks. @@ -62,7 +58,8 @@ def ebook_pid_minter(record_uuid, data, source, pid_key='pid', assert pid_key not in data pid_value = build_ebook_pid(data, source) provider = EbookPidProvider.create( - object_type='rec', pid_value=pid_value, object_uuid=record_uuid) + object_type="rec", pid_value=pid_value, object_uuid=record_uuid + ) data[pid_key] = pid_value oaiid_minter(record_uuid, data) return provider.pid diff --git a/rero_ebooks/providers.py b/rero_ebooks/providers.py index b84656c..5dcac17 100644 --- a/rero_ebooks/providers.py +++ b/rero_ebooks/providers.py @@ -24,7 +24,7 @@ class EbookPidProvider(BaseProvider): """Ebooks identifier provider.""" - pid_type = 'ebook' + pid_type = "ebook" """Type of persistent identifier.""" pid_provider = None diff --git a/rero_ebooks/theme/__init__.py b/rero_ebooks/theme/__init__.py index b421d9a..3effeff 100644 --- a/rero_ebooks/theme/__init__.py +++ b/rero_ebooks/theme/__init__.py @@ -21,4 +21,4 @@ from ..version import __version__ -__all__ = ('__version__', ) +__all__ = ("__version__",) diff --git a/rero_ebooks/theme/templates/rero_ebooks/page_error.html b/rero_ebooks/theme/templates/rero_ebooks/page_error.html new file mode 100644 index 0000000..1440954 --- /dev/null +++ b/rero_ebooks/theme/templates/rero_ebooks/page_error.html @@ -0,0 +1,27 @@ +{%- extends config.BASE_TEMPLATE %} + +{%- block page_header %} +{% include('rero_ebooks/header.html') %} +{%- endblock page_header %} + +{%- block page_body %} +
+
+
+

+ Page not found +

+

The page you are looking for could not be found.

+
+
+
+{%- endblock %} + +{%- block page_footer %} +{% include 'rero_ebooks/footer.html' %} +{%- endblock page_footer %} + +{%- block css %} +{{ super() }} +{{ webpack['rero_ebooks-theme.css']}} +{%- endblock css %} \ No newline at end of file diff --git a/rero_ebooks/theme/views.py b/rero_ebooks/theme/views.py index 7e2812a..037be9c 100644 --- a/rero_ebooks/theme/views.py +++ b/rero_ebooks/theme/views.py @@ -25,19 +25,16 @@ from ..version import __version__ blueprint = Blueprint( - 'rero_ebooks', + "rero_ebooks", __name__, - template_folder='templates', - static_folder='static', + template_folder="templates", + static_folder="static", ) -api_blueprint = Blueprint( - 'api_rero_ebooks', - __name__ -) +api_blueprint = Blueprint("api_rero_ebooks", __name__) -@blueprint.route('/') +@blueprint.route("/") def index(): """Home Page.""" - return render_template('rero_ebooks/frontpage.html', version=__version__) + return render_template("rero_ebooks/frontpage.html", version=__version__) diff --git a/rero_ebooks/theme/webpack.py b/rero_ebooks/theme/webpack.py index e98e106..2ee5770 100644 --- a/rero_ebooks/theme/webpack.py +++ b/rero_ebooks/theme/webpack.py @@ -26,13 +26,21 @@ """ -from flask_webpackext import WebpackBundle +from flask_webpackext import WebpackBundle, WebpackBundleProject +from pywebpack import bundles_from_entry_point + +project = WebpackBundleProject( + __name__, + project_folder="webpack_assets", + config_path="build/config.json", + bundles=bundles_from_entry_point("invenio_assets.webpack"), +) theme = WebpackBundle( __name__, - 'assets', + "assets", entry={ - 'rero_ebooks-theme': './scss/rero_ebooks/ebooks.scss', + "rero_ebooks-theme": "./scss/rero_ebooks/ebooks.scss", }, - dependencies={ - }) + dependencies={}, +) diff --git a/rero_ebooks/theme/webpack_assets/.babelrc b/rero_ebooks/theme/webpack_assets/.babelrc new file mode 100644 index 0000000..ec1ca0d --- /dev/null +++ b/rero_ebooks/theme/webpack_assets/.babelrc @@ -0,0 +1,5 @@ +{ + "presets": [ + "@babel/preset-env" + ] +} diff --git a/rero_ebooks/theme/webpack_assets/.eslintignore b/rero_ebooks/theme/webpack_assets/.eslintignore new file mode 100644 index 0000000..4199381 --- /dev/null +++ b/rero_ebooks/theme/webpack_assets/.eslintignore @@ -0,0 +1 @@ +build/*.js diff --git a/rero_ebooks/theme/webpack_assets/.eslintrc.js b/rero_ebooks/theme/webpack_assets/.eslintrc.js new file mode 100644 index 0000000..1b5e468 --- /dev/null +++ b/rero_ebooks/theme/webpack_assets/.eslintrc.js @@ -0,0 +1,31 @@ +/* + * This file is part of Invenio. + * Copyright (C) 2017-2018 CERN. + * + * Invenio is free software; you can redistribute it and/or modify it + * under the terms of the MIT License; see LICENSE file for more details. + */ + +module.exports = { + root: true, + parser: '@babel/eslint-parser', + parserOptions: { + sourceType: 'module', + requireConfigFile: false + }, + env: { + browser: true, + }, + // https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style + extends: ["plugin:jsx-a11y/recommended"], + plugins: ["jsx-a11y"], + // add your custom rules here + 'rules': { + // allow paren-less arrow functions + 'arrow-parens': 0, + // allow async-await + 'generator-star-spacing': 0, + // allow debugger during development + 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0 + } +} diff --git a/rero_ebooks/theme/webpack_assets/build/webpack.config.js b/rero_ebooks/theme/webpack_assets/build/webpack.config.js new file mode 100644 index 0000000..e920b66 --- /dev/null +++ b/rero_ebooks/theme/webpack_assets/build/webpack.config.js @@ -0,0 +1,280 @@ +/* + +RERO EBOOKS +Copyright (C) 2024 RERO +Copyright (C) 2017-2018 CERN. +Copyright (C) 2022-2023 Graz University of Technology. +Copyright (C) 2023 TU Wien. + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, version 3 of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . + +*/ + +const BundleTracker = require("webpack-bundle-tracker"); +const { CleanWebpackPlugin } = require("clean-webpack-plugin"); +const CssMinimizerPlugin = require("css-minimizer-webpack-plugin"); +const ESLintPlugin = require("eslint-webpack-plugin"); +const CopyWebpackPlugin = require("copy-webpack-plugin"); +const MiniCssExtractPlugin = require("mini-css-extract-plugin"); +const TerserPlugin = require("terser-webpack-plugin"); +const config = require("./config"); +const path = require("path"); +const webpack = require("webpack"); + +// Load aliases from config and resolve their full path +let aliases = {}; +if (config.aliases) { + aliases = Object.fromEntries( + Object.entries(config.aliases).map(([alias, alias_path]) => [ + alias, + path.resolve(config.build.context, alias_path), + ]) + ); +} + +var webpackConfig = { + mode: process.env.NODE_ENV, + entry: config.entry, + context: config.build.context, + stats: { + warnings: true, + errors: true, + errorsCount: true, + errorStack: true, + errorDetails: true, + children: true, + }, + resolve: { + extensions: ["*", ".js", ".jsx"], + symlinks: false, + alias: aliases, + fallback: { + zlib: require.resolve("browserify-zlib"), + stream: require.resolve("stream-browserify"), + https: require.resolve("https-browserify"), + http: require.resolve("stream-http"), + url: false, + assert: false, + }, + }, + output: { + path: config.build.assetsPath, + filename: "js/[name].[chunkhash].js", + chunkFilename: "js/[id].[chunkhash].js", + publicPath: config.build.assetsURL, + }, + optimization: { + minimizer: [ + new TerserPlugin({ + terserOptions: { + parse: { + // We want terser to parse ecma 8 code. However, we don't want it + // to apply any minification steps that turns valid ecma 5 code + // into invalid ecma 5 code. This is why the 'compress' and 'output' + // sections only apply transformations that are ecma 5 safe + // https://github.com/facebook/create-react-app/pull/4234 + ecma: 8, + }, + compress: { + ecma: 5, + warnings: false, + // Disabled because of an issue with Uglify breaking seemingly valid code: + // https://github.com/facebook/create-react-app/issues/2376 + // Pending further investigation: + // https://github.com/mishoo/UglifyJS2/issues/2011 + comparisons: false, + // Disabled because of an issue with Terser breaking valid code: + // https://github.com/facebook/create-react-app/issues/5250 + // Pending further investigation: + // https://github.com/terser-js/terser/issues/120 + inline: 2, + }, + mangle: { + safari10: true, + }, + output: { + ecma: 5, + comments: false, + // Turned on because emoji and regex is not minified properly using default + // https://github.com/facebook/create-react-app/issues/2488 + ascii_only: true, + }, + }, + }), + new CssMinimizerPlugin(), + ], + splitChunks: { + chunks: "all", + }, + // Extract webpack runtime and module manifest to its own file in order to + // prevent vendor hash from being updated whenever app bundle is updated. + runtimeChunk: { + name: "manifest", + }, + }, + module: { + rules: [ + { + test: require.resolve("jquery"), + use: [ + { + loader: "expose-loader", + options: { + exposes: ["$", "jQuery"], + }, + }, + ], + }, + { + test: /\.(js|jsx)$/, + exclude: [/node_modules/, /@babel(?:\/|\\{1,2})runtime/], + use: [ + { + loader: "babel-loader", + options: { + presets: ["@babel/preset-env", "@babel/preset-react"], + plugins: [ + "@babel/plugin-proposal-class-properties", + "@babel/plugin-transform-runtime", + ], + }, + }, + ], + }, + { + test: /\.(scss|css)$/, + use: [MiniCssExtractPlugin.loader, "css-loader", "sass-loader"], + }, + { + test: /\.(less)$/, + use: [MiniCssExtractPlugin.loader, "css-loader", "less-loader"], + }, + // Inline images smaller than 10k + { + test: /\.(png|jpe?g|gif|svg)(\?.*)?$/, + type: "asset/inline", + parser: { + dataUrlCondition: { + maxSize: 10 * 1024, // 10kb + }, + }, + }, + // no mimetype for ".cur" in mimetype database, specify it with `generator` + { + test: /\.(cur)(\?.*)?$/, + type: "asset/inline", + generator: { + dataUrl: { + encoding: "base64", + mimetype: "image/x-icon", + }, + }, + parser: { + dataUrlCondition: { + maxSize: 10 * 1024, // 10kb + }, + }, + }, + // Inline webfonts smaller than 10k + { + test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/, + type: "asset/resource", + generator: { + filename: "fonts/[name].[contenthash:7].[ext]", + }, + parser: { + dataUrlCondition: { + maxSize: 10 * 1024, // 10kb + }, + }, + }, + ], + }, + devtool: + process.env.NODE_ENV === "production" ? "source-map" : "inline-source-map", + plugins: [ + new ESLintPlugin({ + emitWarning: true, + quiet: true, + formatter: require("eslint-friendly-formatter"), + eslintPath: require.resolve("eslint"), + }), + // Pragmas + new webpack.DefinePlugin({ + "process.env": process.env.NODE_ENV, + }), + new MiniCssExtractPlugin({ + // Options similar to the same options in webpackOptions.output + // both options are optional + filename: "css/[name].[contenthash].css", + chunkFilename: "css/[name].[contenthash].css", + }), + // Removes the dist folder before each run. + new CleanWebpackPlugin({ + dry: false, + verbose: false, + dangerouslyAllowCleanPatternsOutsideProject: true, + cleanStaleWebpackAssets: process.env.NODE_ENV === "production", // keep stale assets in dev because of OS issues + }), + // Copying relevant CSS files as TinyMCE tries to import css files from the dist/js folder of static files + new CopyWebpackPlugin({ + patterns: [ + { + from: path.resolve(__dirname, '../node_modules/tinymce/skins/content/default/content.css'), + to: path.resolve(config.build.assetsPath, 'js/skins/content/default'), + }, + { + from: path.resolve(__dirname, '../node_modules/tinymce/skins/ui/oxide/skin.min.css'), + to: path.resolve(config.build.assetsPath, 'js/skins/ui/oxide'), + }, + { + from: path.resolve(__dirname, '../node_modules/tinymce/skins/ui/oxide/content.min.css'), + to: path.resolve(config.build.assetsPath, 'js/skins/ui/oxide'), + }, + ], + }), + // Automatically inject jquery + new webpack.ProvidePlugin({ + jQuery: "jquery", + $: "jquery", + jquery: "jquery", + "window.jQuery": "jquery", + }), + // Write manifest file which Python will read. + new BundleTracker({ + path: config.build.assetsPath, + filename: path.join(config.build.assetsPath, "manifest.json"), + publicPath: config.build.assetsURL, + }), + ], + performance: { hints: false }, + snapshot: { + managedPaths: [], + }, + watchOptions: { + followSymlinks: true, + }, +}; + +if (process.env.npm_config_report) { + var BundleAnalyzerPlugin = + require("webpack-bundle-analyzer").BundleAnalyzerPlugin; + webpackConfig.plugins.push(new BundleAnalyzerPlugin()); +} + +if (process.env.NODE_ENV === "development") { + const LiveReloadPlugin = require("webpack-livereload-plugin"); + webpackConfig.plugins.push(new LiveReloadPlugin()); +} + +module.exports = webpackConfig; diff --git a/rero_ebooks/theme/webpack_assets/package.json b/rero_ebooks/theme/webpack_assets/package.json new file mode 100644 index 0000000..c408e1d --- /dev/null +++ b/rero_ebooks/theme/webpack_assets/package.json @@ -0,0 +1,73 @@ +{ + "name": "invenio-assets", + "version": "2.0.0", + "description": "Invenio assets", + "author": "CERN ", + "private": true, + "scripts": { + "start": "NODE_PRESERVE_SYMLINKS=1 NODE_ENV=development webpack --watch --progress --config ./build/webpack.config.js", + "build": "NODE_PRESERVE_SYMLINKS=1 NODE_ENV=production webpack --config ./build/webpack.config.js", + "postinstall": "patch-package" + }, + "dependencies": { + "tinymce": "^6.7.2" + }, + "devDependencies": { + "browserify-zlib": "^0.2.0", + "https-browserify": "^1.0.0", + "stream-browserify": "^3.0.0", + "stream-http": "^3.2.0", + "patch-package": "^6.5.0", + "@babel/core": "^7.18.0", + "ajv": "^8.12.0", + "@babel/eslint-parser": "^7.18.0", + "@babel/plugin-proposal-class-properties": "^7.18.0", + "@babel/plugin-proposal-private-property-in-object": "^7.21.0", + "@babel/plugin-transform-runtime": "^7.18.0", + "@babel/preset-env": "^7.18.0", + "@babel/register": "^7.18.0", + "@babel/runtime": "^7.18.0", + "@inveniosoftware/eslint-config-invenio": "^2.0.0", + "autoprefixer": "^10.4.0", + "babel-loader": "^9.0.0", + "chalk": "^5.0.0", + "clean-webpack-plugin": "^4.0.0", + "css-loader": "^6.0.0", + "css-minimizer-webpack-plugin": "^4.2.0", + "eslint-friendly-formatter": "^4.0.1", + "eslint-webpack-plugin": "^2.5.0", + "eventsource-polyfill": "^0.9.0", + "expose-loader": "^4.0.0", + "file-loader": "^6.0.0", + "function-bind": "^1.1.0", + "less": "^4.0.0", + "less-loader": "^11.0.0", + "mini-css-extract-plugin": "^2.0.0", + "ora": "^6.0.0", + "postcss-flexbugs-fixes": "^5.0.0", + "postcss-loader": "^7.0.0", + "postcss-preset-env": "^8.0.0", + "postcss-safe-parser": "^6.0.0", + "prettier": "^2.7.0", + "rimraf": "^4.0.0", + "sass": "^1.50.0", + "sass-loader": "^13.0.0", + "style-loader": "^3.0.0", + "terser-webpack-plugin": "^5.0.0", + "url-loader": "^4.1.0", + "webpack": "^5.0.0", + "webpack-bundle-analyzer": "^4.0.0", + "webpack-bundle-tracker": "^1.0.0", + "webpack-cli": "^5.0.0", + "webpack-dev-middleware": "^6.0.0", + "webpack-hot-middleware": "^2.24.0", + "webpack-livereload-plugin": "^3.0.0", + "webpack-merge": "^5.1.0", + "webpack-yam-plugin": "^1.0.0", + "copy-webpack-plugin": "^11.0.0" + }, + "engines": { + "node": ">=18", + "npm": ">=8" + } +} diff --git a/rero_ebooks/utils.py b/rero_ebooks/utils.py index 447c395..94de0bc 100644 --- a/rero_ebooks/utils.py +++ b/rero_ebooks/utils.py @@ -23,8 +23,7 @@ from invenio_oaiharvester.models import OAIHarvestConfig -def add_oai_source(name, baseurl, metadataprefix='marc21', - setspecs='', comment=''): +def add_oai_source(name, baseurl, metadataprefix="marc21", setspecs="", comment=""): """Add OAIHarvestConfig.""" with current_app.app_context(): if OAIHarvestConfig.query.filter_by(name=name).count() == 0: @@ -33,7 +32,7 @@ def add_oai_source(name, baseurl, metadataprefix='marc21', baseurl=baseurl, metadataprefix=metadataprefix, setspecs=setspecs, - comment=comment + comment=comment, ) source.save() db.session.commit() diff --git a/rero_ebooks/version.py b/rero_ebooks/version.py index 709556e..20be63d 100644 --- a/rero_ebooks/version.py +++ b/rero_ebooks/version.py @@ -23,4 +23,4 @@ from __future__ import absolute_import, print_function -__version__ = '0.6.2' +__version__ = "0.6.2" diff --git a/scripts/__init__.py b/scripts/__init__.py index 2c46f1b..7e5d57d 100644 --- a/scripts/__init__.py +++ b/scripts/__init__.py @@ -18,6 +18,7 @@ """Poetry script utils.""" import os + # import subprocess import sys diff --git a/scripts/test b/scripts/test index 460ad9d..4fd83ea 100755 --- a/scripts/test +++ b/scripts/test @@ -63,9 +63,9 @@ if [[ -z "${VIRTUAL_ENV}" ]]; then fi set -e -# -> Vulnerability found in flask-caching version 2.0.1 -# Vulnerability ID: 40459 -# -> Vulnerability found in sqlalchemy version 1.4.50 +# -> Vulnerability found in flask-cors version 4.0.1 +# Vulnerability ID: 70624 +# -> Vulnerability found in sqlalchemy version 1.4.52 # Vulnerability ID: 51668 # -> Vulnerability found in sqlalchemy-utils version 0.38.3 # Vulnerability ID: 42194 @@ -73,13 +73,18 @@ set -e # Vulnerability ID: 42852 # -> Vulnerability found in werkzeug version 2.2.3 # Vulnerability ID: 62019 +# -> Vulnerability found in black version 22.12.0 +# Vulnerability ID: 66742 +# ADVISORY: Black before 24.3.0 have a security vulnerability where +# -> Vulnerability found in jinja2 version 3.1.4 +# Vulnerability ID: 70612 # -> Vulnerability found in py version 1.11.0 # Vulnerability ID: 51457 info_msg "Check vulnerabilities:" -safety_exceptions="-i 40459 -i 51668 -i 42194 -i 42852 -i 62019 -i 51457" +safety_exceptions="-i 70624 -i 51668 -i 42194 -i 42852 -i 62019 -i 66742 -i 70612 -i 51457" msg=$(safety check -o text ${safety_exceptions}) || { echo "Safety vulnerabilites found for packages:" $(safety check -o bare ${safety_exceptions}) - echo "Run:" "safety check -o screen ${safety_exceptions} | grep -i vulnerability" "for more details" + echo "For more details run: \"safety check -o screen ${safety_exceptions} | grep -i vulnerability\"" exit 1 } @@ -87,6 +92,8 @@ info_msg "Test pydocstyle:" pydocstyle rero_ebooks tests docs info_msg "Test isort:" isort --check-only --diff "${SCRIPT_PATH}" +info_msg "Test black:" +black tests rero_ebooks --diff info_msg "Test useless imports:" autoflake -c -r --remove-all-unused-imports --ignore-init-module-imports . &> /dev/null || { autoflake --remove-all-unused-imports -r --ignore-init-module-imports . diff --git a/tests/api/conftest.py b/tests/api/conftest.py index 38ecbc9..ab15036 100644 --- a/tests/api/conftest.py +++ b/tests/api/conftest.py @@ -26,40 +26,37 @@ def cdf_record(): """La-chaux-de-fonds record.""" yield { - '__order__': [ - 'other_standard_identifier', - 'electronic_location_and_access', - 'electronic_location_and_access' + "__order__": [ + "other_standard_identifier", + "electronic_location_and_access", + "electronic_location_and_access", ], - 'other_standard_identifier': [ + "other_standard_identifier": [ { - '__order__': [ - 'standard_number_or_code' - ], - 'standard_number_or_code': - 'http://cantookstation.com/resources/' - '5788be89dde6b2d458f42b35' + "__order__": ["standard_number_or_code"], + "standard_number_or_code": "http://cantookstation.com/resources/" + "5788be89dde6b2d458f42b35", } ], - 'electronic_location_and_access': [ + "electronic_location_and_access": [ { - 'access_method': 'HTTP', - 'materials_specified': 'Image de couverture', - 'relationship': 'Related resource', - 'uniform_resource_identifier': - 'http://images.immateriel.fr/covers/X8WRJB3.png'}, + "access_method": "HTTP", + "materials_specified": "Image de couverture", + "relationship": "Related resource", + "uniform_resource_identifier": "http://images.immateriel.fr/covers/X8WRJB3.png", + }, { - 'access_method': 'HTTP', - 'electronic_format_type': 'epub', - 'materials_specified': 'Texte intégral', - 'nonpublic_note': 'mv-cantook', - 'relationship': 'Resource', - 'uniform_resource_identifier': ( - 'http://la-chaux-de-fonds.ebibliomedia.ch/resources/' - '5788be89dde6b2d458f42b35' - ) - } - ] + "access_method": "HTTP", + "electronic_format_type": "epub", + "materials_specified": "Texte intégral", + "nonpublic_note": "mv-cantook", + "relationship": "Resource", + "uniform_resource_identifier": ( + "http://la-chaux-de-fonds.ebibliomedia.ch/resources/" + "5788be89dde6b2d458f42b35" + ), + }, + ], } @@ -67,41 +64,37 @@ def cdf_record(): def dojson_like_cdf_record(): """La-chaux-de-fonds record.""" yield { - '__order__': ( - 'other_standard_identifier', - 'electronic_location_and_access', - 'electronic_location_and_access' + "__order__": ( + "other_standard_identifier", + "electronic_location_and_access", + "electronic_location_and_access", ), - 'other_standard_identifier': [ + "other_standard_identifier": [ { - '__order__': ( - 'standard_number_or_code', - ), - 'standard_number_or_code': - 'http://cantookstation.com/resources/' - '5788be89dde6b2d458f42b35' + "__order__": ("standard_number_or_code",), + "standard_number_or_code": "http://cantookstation.com/resources/" + "5788be89dde6b2d458f42b35", } ], - 'electronic_location_and_access': [ + "electronic_location_and_access": [ { - 'access_method': 'HTTP', - 'materials_specified': 'Image de couverture', - 'relationship': 'Related resource', - 'uniform_resource_identifier': - 'http://images.immateriel.fr/covers/X8WRJB3.png' + "access_method": "HTTP", + "materials_specified": "Image de couverture", + "relationship": "Related resource", + "uniform_resource_identifier": "http://images.immateriel.fr/covers/X8WRJB3.png", }, { - 'access_method': 'HTTP', - 'electronic_format_type': 'epub', - 'materials_specified': 'Texte intégral', - 'nonpublic_note': 'mv-cantook', - 'relationship': 'Resource', - 'uniform_resource_identifier': ( - 'http://la-chaux-de-fonds.ebibliomedia.ch/resources/' - '5788be89dde6b2d458f42b35' - ) - } - ] + "access_method": "HTTP", + "electronic_format_type": "epub", + "materials_specified": "Texte intégral", + "nonpublic_note": "mv-cantook", + "relationship": "Resource", + "uniform_resource_identifier": ( + "http://la-chaux-de-fonds.ebibliomedia.ch/resources/" + "5788be89dde6b2d458f42b35" + ), + }, + ], } @@ -109,31 +102,25 @@ def dojson_like_cdf_record(): def mv_record(): """Mediatheque-valais record.""" yield { - '__order__': [ - 'other_standard_identifier', - 'electronic_location_and_access' - ], - 'other_standard_identifier': [ + "__order__": ["other_standard_identifier", "electronic_location_and_access"], + "other_standard_identifier": [ { - '__order__': [ - 'standard_number_or_code' - ], - 'standard_number_or_code': - 'http://cantookstation.com/resources/' - '5788be89dde6b2d458f42b35' + "__order__": ["standard_number_or_code"], + "standard_number_or_code": "http://cantookstation.com/resources/" + "5788be89dde6b2d458f42b35", } ], - 'electronic_location_and_access': [ + "electronic_location_and_access": [ { - 'access_method': 'HTTP', - 'electronic_format_type': 'epub', - 'materials_specified': 'Texte intégral', - 'nonpublic_note': 'mv-cantook', - 'relationship': 'Resource', - 'uniform_resource_identifier': ( - 'http://mediatheque-valais.ebibliomedia.ch/resources/' - '5788be89dde6b2d458f42b35' - ) + "access_method": "HTTP", + "electronic_format_type": "epub", + "materials_specified": "Texte intégral", + "nonpublic_note": "mv-cantook", + "relationship": "Resource", + "uniform_resource_identifier": ( + "http://mediatheque-valais.ebibliomedia.ch/resources/" + "5788be89dde6b2d458f42b35" + ), } ], } @@ -155,11 +142,8 @@ def cantook_mv_record(): "back_cover_large": None, "cover": "http://images.immateriel.fr/covers/BH9WPJ8.png", "cover_large": None, - "flipbook": - "http://livre.immateriel.fr/BH9WPJ8?no_sign_in=true&no_buy_link=true", - "languages": [ - "fre" - ], + "flipbook": "http://livre.immateriel.fr/BH9WPJ8?no_sign_in=true&no_buy_link=true", + "languages": ["fre"], "page_count": 160, "translated_from": "", "contributors": [ @@ -169,7 +153,7 @@ def cantook_mv_record(): "nature": "author", "country": "", "biography": "

Jean-Marie Defossez est né en 1971 ...

", - "website": "" + "website": "", } ], "media": [ @@ -179,7 +163,7 @@ def cantook_mv_record(): "id": "immateriel.frO688313-9782889055784-epub", "key": "9782889055784", "issued_on": "2019-04-30T06:00:00+02:00", - "current_holds": 0 + "current_holds": 0, }, { "nature": "paper", @@ -187,44 +171,28 @@ def cantook_mv_record(): "id": "immateriel.frO688313-9782889119714-paper", "key": "9782889119714", "issued_on": None, - "current_holds": 0 - } + "current_holds": 0, + }, ], "id": "immateriel.frO688313", - "link": "http://mediatheque-valais.cantookstation.eu/resources/" + - "5b18c6bc235794540e2cbe72", + "link": "http://mediatheque-valais.cantookstation.eu/resources/" + + "5b18c6bc235794540e2cbe72", "created_at": "2018-06-07T07:46:36+02:00", "updated_at": "2019-04-21T07:47:19+02:00", "publisher_name": "Jouvence", "classifications": [ { "standard": "bisac", - "identifiers": [ - "SEL000000" - ], - "captions": [ - { - "fr": None, - "en": None - } - ] + "identifiers": ["SEL000000"], + "captions": [{"fr": None, "en": None}], }, { "standard": "cantook", - "identifiers": [ - "self-help", - "health" - ], + "identifiers": ["self-help", "health"], "captions": [ - { - "fr": "Croissance personnelle", - "en": "Self-Help" - }, - { - "fr": "Santé", - "en": "Health" - } - ] + {"fr": "Croissance personnelle", "en": "Self-Help"}, + {"fr": "Santé", "en": "Health"}, + ], }, { "standard": "feedbooks", @@ -232,29 +200,15 @@ def cantook_mv_record(): "FBSEL000000", "FBHEA014000", "FBNFC000000", - "FBHEA000000" + "FBHEA000000", ], "captions": [ - { - "fr": "Développement Personnel", - "en": "Self-help" - }, - { - "fr": "Bien-être", - "en": "Well being" - }, - { - "fr": "Documentaires", - "en": "Non-Fiction" - }, - { - "fr": "Santé & Vie quotidienne", - "en": "Health & fitness" - } - ] - } + {"fr": "Développement Personnel", "en": "Self-help"}, + {"fr": "Bien-être", "en": "Well being"}, + {"fr": "Documentaires", "en": "Non-Fiction"}, + {"fr": "Santé & Vie quotidienne", "en": "Health & fitness"}, + ], + }, ], - "publisher": { - "name": "Jouvence" - } + "publisher": {"name": "Jouvence"}, } diff --git a/tests/api/test_api.py b/tests/api/test_api.py index 752d789..238a56b 100644 --- a/tests/api/test_api.py +++ b/tests/api/test_api.py @@ -27,87 +27,90 @@ def test_merge_and_remove_uri_records(es, db, cdf_record, mv_record): """Test merge ebook records.""" cover = "http://images.immateriel.fr/covers/X8WRJB3.png" - cdf = 'http://la-chaux-de-fonds.ebibliomedia.ch/resources/'\ - '5788be89dde6b2d458f42b35' + cdf = ( + "http://la-chaux-de-fonds.ebibliomedia.ch/resources/" "5788be89dde6b2d458f42b35" + ) - mv = 'http://mediatheque-valais.ebibliomedia.ch/resources/'\ - '5788be89dde6b2d458f42b35' + mv = ( + "http://mediatheque-valais.ebibliomedia.ch/resources/" + "5788be89dde6b2d458f42b35" + ) orig_mv_record = deepcopy(mv_record) orig_cdf_record = deepcopy(cdf_record) - cdf_record_pid = build_ebook_pid(cdf_record, 'cantook') + cdf_record_pid = build_ebook_pid(cdf_record, "cantook") cdf_record_exists = Ebook.get_record_by_pid(cdf_record_pid) assert cdf_record_exists is None new_cdf_record, cdf_status = Ebook.create_or_update( - cdf_record, vendor='cantook', dbcommit=True, reindex=True + cdf_record, vendor="cantook", dbcommit=True, reindex=True ) - assert cdf_status == 'CREATE' - assert new_cdf_record['electronic_location_and_access'][0][ - 'uniform_resource_identifier' + assert cdf_status == "CREATE" + assert new_cdf_record["electronic_location_and_access"][0][ + "uniform_resource_identifier" ] merged_record, merged_record_status = Ebook.create_or_update( - mv_record, vendor='cantook', dbcommit=True, reindex=True + mv_record, vendor="cantook", dbcommit=True, reindex=True ) - assert merged_record_status == 'UPDATE' - ela = merged_record['electronic_location_and_access'] + assert merged_record_status == "UPDATE" + ela = merged_record["electronic_location_and_access"] assert len(ela) == 3 - assert mv == ela[0]['uniform_resource_identifier'] - assert cover == ela[1]['uniform_resource_identifier'] - assert cdf == ela[2]['uniform_resource_identifier'] + assert mv == ela[0]["uniform_resource_identifier"] + assert cover == ela[1]["uniform_resource_identifier"] + assert cdf == ela[2]["uniform_resource_identifier"] removed_uri_record, removed_uri_record_status = Ebook.remove_uri( orig_mv_record, - vendor='cantook', - url='http://mediatheque-valais.ebibliomedia.ch', + vendor="cantook", + url="http://mediatheque-valais.ebibliomedia.ch", dbcommit=True, - reindex=True + reindex=True, ) - ela = removed_uri_record['electronic_location_and_access'] + ela = removed_uri_record["electronic_location_and_access"] assert len(ela) == 2 - assert removed_uri_record_status == 'REMOVE URIs: 1' - assert cover == ela[0]['uniform_resource_identifier'] - assert cdf == ela[1]['uniform_resource_identifier'] + assert removed_uri_record_status == "REMOVE URIs: 1" + assert cover == ela[0]["uniform_resource_identifier"] + assert cdf == ela[1]["uniform_resource_identifier"] removed_uri_record, removed_uri_record_status = Ebook.remove_uri( orig_cdf_record, - vendor='cantook', - url='http://la-chaux-de-fonds.ebibliomedia.ch', + vendor="cantook", + url="http://la-chaux-de-fonds.ebibliomedia.ch", dbcommit=True, - reindex=True + reindex=True, ) - ela = removed_uri_record['electronic_location_and_access'] + ela = removed_uri_record["electronic_location_and_access"] assert len(ela) == 1 - assert removed_uri_record_status == 'REMOVE URIs: 1' - assert cover == ela[0]['uniform_resource_identifier'] + assert removed_uri_record_status == "REMOVE URIs: 1" + assert cover == ela[0]["uniform_resource_identifier"] def test_merge_records_same(es, db, cdf_record, dojson_like_cdf_record): """Test merge ebook records.""" - cdf_record_pid = build_ebook_pid(cdf_record, 'cantook') + cdf_record_pid = build_ebook_pid(cdf_record, "cantook") new_cdf_record, cdf_status = Ebook.create_or_update( - cdf_record, vendor='cantook', dbcommit=True, reindex=True + cdf_record, vendor="cantook", dbcommit=True, reindex=True ) merged_record, merged_record_status = Ebook.create_or_update( - dojson_like_cdf_record, vendor='cantook', dbcommit=True, reindex=True + dojson_like_cdf_record, vendor="cantook", dbcommit=True, reindex=True ) - assert merged_record_status == 'UPDATE' - ela = merged_record['electronic_location_and_access'] + assert merged_record_status == "UPDATE" + ela = merged_record["electronic_location_and_access"] assert len(ela) == 2 def test_create_or_update_record(db, cdf_record): """Test create record.""" - record = Ebook.get_record_by_pid('cantook-5788be89dde6b2d458f42b35') + record = Ebook.get_record_by_pid("cantook-5788be89dde6b2d458f42b35") assert record is None new_record, status = Ebook.create_or_update( - cdf_record, vendor='cantook', dbcommit=True, reindex=True + cdf_record, vendor="cantook", dbcommit=True, reindex=True ) - assert status == 'CREATE' - record = Ebook.get_record_by_pid('cantook-5788be89dde6b2d458f42b35') - assert record['pid'] == 'cantook-5788be89dde6b2d458f42b35' - record['title'] = 'The Nest' + assert status == "CREATE" + record = Ebook.get_record_by_pid("cantook-5788be89dde6b2d458f42b35") + assert record["pid"] == "cantook-5788be89dde6b2d458f42b35" + record["title"] = "The Nest" mod_record, status = Ebook.create_or_update( - record, vendor='cantook', dbcommit=True, reindex=True + record, vendor="cantook", dbcommit=True, reindex=True ) - assert status == 'UPDATE' + assert status == "UPDATE" diff --git a/tests/api/test_cantook.py b/tests/api/test_cantook.py index 6325d60..629e34f 100644 --- a/tests/api/test_cantook.py +++ b/tests/api/test_cantook.py @@ -15,7 +15,7 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -'''Test ApiCantook.''' +"""Test ApiCantook.""" from __future__ import absolute_import, print_function @@ -23,39 +23,33 @@ def test_add_nonpublic_note(app, config_vs): - '''Test cantook merge.''' + """Test cantook merge.""" apicantook = ApiCantook(config=config_vs) record = { "electronic_location_and_access": [ { - 'electronic_format_type': 'epub', - 'uniform_resource_identifier': - 'http://mediatheque-valais.cantookstation.eu/' - 'resources/583fc6ef2357943cb70c641d', - 'materials_specified': 'Texte int\u00e9gral', - 'access_method': 'HTTP', - 'relationship': 'Resource' + "electronic_format_type": "epub", + "uniform_resource_identifier": "http://mediatheque-valais.cantookstation.eu/" + "resources/583fc6ef2357943cb70c641d", + "materials_specified": "Texte int\u00e9gral", + "access_method": "HTTP", + "relationship": "Resource", } ] } record = apicantook.add_nonpublic_note(record) - assert record[ - 'electronic_location_and_access' - ][0]['nonpublic_note'] == 'mv-cantook' + assert record["electronic_location_and_access"][0]["nonpublic_note"] == "mv-cantook" record = { "electronic_location_and_access": [ { - 'uniform_resource_identifier': - 'https://www.edenlivres.fr/p/227276', - 'materials_specified': 'Extrait', - 'access_method': 'HTTP', - 'relationship': 'Related resource' + "uniform_resource_identifier": "https://www.edenlivres.fr/p/227276", + "materials_specified": "Extrait", + "access_method": "HTTP", + "relationship": "Related resource", } ] } record = apicantook.add_nonpublic_note(record) - assert record[ - 'electronic_location_and_access' - ][0].get('nonpublic_note') is None + assert record["electronic_location_and_access"][0].get("nonpublic_note") is None diff --git a/tests/api/test_fetchers.py b/tests/api/test_fetchers.py index bd1f774..5aa7870 100644 --- a/tests/api/test_fetchers.py +++ b/tests/api/test_fetchers.py @@ -26,15 +26,16 @@ def test_item_id_fetcher(base_app, db): """Test fetcher.""" data = { - 'other_standard_identifier': [{ - 'standard_number_or_code': - 'http://cantookstation.com/resources/55373535cdd23087a9789b72' - }] + "other_standard_identifier": [ + { + "standard_number_or_code": "http://cantookstation.com/resources/55373535cdd23087a9789b72" + } + ] } # first record rec_uuid = uuid4() - ebook_pid_minter(rec_uuid, data, 'cantook') + ebook_pid_minter(rec_uuid, data, "cantook") fetched_pid = ebook_pid_fetcher(rec_uuid, data) assert fetched_pid.pid_type == fetched_pid.provider.pid_type - assert fetched_pid.pid_type == 'ebook' - assert fetched_pid.pid_value == 'cantook-55373535cdd23087a9789b72' + assert fetched_pid.pid_type == "ebook" + assert fetched_pid.pid_value == "cantook-55373535cdd23087a9789b72" diff --git a/tests/api/test_minters.py b/tests/api/test_minters.py index 876ca79..31c6b87 100644 --- a/tests/api/test_minters.py +++ b/tests/api/test_minters.py @@ -25,12 +25,13 @@ def test_ebook_id_minter(base_app, db): """Test minter.""" data = { - 'other_standard_identifier': [{ - 'standard_number_or_code': - 'http://cantookstation.com/resources/55373535cdd23087a9789b72' - }] + "other_standard_identifier": [ + { + "standard_number_or_code": "http://cantookstation.com/resources/55373535cdd23087a9789b72" + } + ] } # first record rec_uuid = uuid4() - ebook_pid_minter(rec_uuid, data, 'cantook') - assert data.get('pid') == 'cantook-55373535cdd23087a9789b72' + ebook_pid_minter(rec_uuid, data, "cantook") + assert data.get("pid") == "cantook-55373535cdd23087a9789b72" diff --git a/tests/conftest.py b/tests/conftest.py index 8d5e491..2557273 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -25,10 +25,10 @@ from rero_ebooks.apiharvester.models import ApiHarvestConfig from rero_ebooks.apiharvester.utils import api_source -pytest_plugins = ("celery.contrib.pytest", ) +pytest_plugins = ("celery.contrib.pytest",) -@pytest.fixture(scope='module') +@pytest.fixture(scope="module") def es(appctx): """Setup and teardown all registered Elasticsearch indices. @@ -44,7 +44,7 @@ def es(appctx): try: list(current_search.put_templates()) except IndexAlreadyExistsError: - current_search_client.indices.delete_template('*') + current_search_client.indices.delete_template("*") list(current_search.put_templates()) try: @@ -57,14 +57,14 @@ def es(appctx): try: yield current_search_client finally: - current_search_client.indices.delete(index='*') - current_search_client.indices.delete_template('*') + current_search_client.indices.delete(index="*") + current_search_client.indices.delete_template("*") @pytest.fixture(scope="module") def data(): """Init data.""" - with open(join(dirname(__file__), 'data/data.json')) as f: + with open(join(dirname(__file__), "data/data.json")) as f: data = json.load(f) return data @@ -72,35 +72,36 @@ def data(): @pytest.fixture(scope="module") def apiharvester_config_vs(data): """Config for VS.""" - return data.get('apiharvester_config_vs') + return data.get("apiharvester_config_vs") @pytest.fixture(scope="module") def apiharvester_config_nj(data): """Json response NJ.""" - return data.get('apiharvester_config_nj') + return data.get("apiharvester_config_nj") @pytest.fixture(scope="module") def apiharvester_apiresponse_vs(data): """Json response VS.""" - return data.get('apiresponse_vs') + return data.get("apiresponse_vs") -@pytest.fixture(scope='module') +@pytest.fixture(scope="module") def config_vs(apiharvester_config_vs): """Create api config VS.""" api_source( - name='VS', - url=apiharvester_config_vs['url'], - classname=apiharvester_config_vs['classname'], - code=apiharvester_config_vs['code'], - update=True) - config = ApiHarvestConfig.query.filter_by(name='VS').first() + name="VS", + url=apiharvester_config_vs["url"], + classname=apiharvester_config_vs["classname"], + code=apiharvester_config_vs["code"], + update=True, + ) + config = ApiHarvestConfig.query.filter_by(name="VS").first() return config -@pytest.fixture(scope='module') +@pytest.fixture(scope="module") def create_app(): """Create test app.""" from invenio_app.factory import create_api @@ -108,11 +109,11 @@ def create_app(): return create_api -@pytest.fixture(scope='module') +@pytest.fixture(scope="module") def app_config(app_config): """Create temporary instance dir for each test.""" - app_config['RATELIMIT_STORAGE_URL'] = 'memory://' - app_config['ACCOUNTS_USE_CELERY'] = False, - app_config['CACHE_TYPE'] = 'simple' - app_config['SEARCH_HOSTS'] = None + app_config["RATELIMIT_STORAGE_URL"] = "memory://" + app_config["ACCOUNTS_USE_CELERY"] = (False,) + app_config["CACHE_TYPE"] = "simple" + app_config["SEARCH_HOSTS"] = None return app_config diff --git a/tests/test_version.py b/tests/test_version.py index 6b7aeb7..30e1abf 100644 --- a/tests/test_version.py +++ b/tests/test_version.py @@ -23,4 +23,5 @@ def test_version(): """Test version import.""" from rero_ebooks import __version__ + assert __version__ diff --git a/tests/unit/test_apiharvester_cli.py b/tests/unit/test_apiharvester_cli.py index b612d40..5f7c638 100644 --- a/tests/unit/test_apiharvester_cli.py +++ b/tests/unit/test_apiharvester_cli.py @@ -30,8 +30,8 @@ FIXTURE_DIR = os.path.join( os.path.dirname(os.path.realpath(__file__)), - 'test_files', - ) + "test_files", +) def test_config(app, apiharvester_config_vs): @@ -41,35 +41,33 @@ def test_config(app, apiharvester_config_vs): res = runner.invoke(cli.info, obj=script_info) assert 0 == res.exit_code - assert res.output == '' + assert res.output == "" res = runner.invoke( cli.api_source_config, [ - 'VS', - '-U', apiharvester_config_vs['url'], - '-n', apiharvester_config_vs['classname'], - '-c', apiharvester_config_vs['code'], - '-u' + "VS", + "-U", + apiharvester_config_vs["url"], + "-n", + apiharvester_config_vs["classname"], + "-c", + apiharvester_config_vs["code"], + "-u", ], - obj=script_info + obj=script_info, ) assert 0 == res.exit_code - assert res.output == 'Add ApiHarvestConfig: VS\n' + assert res.output == "Add ApiHarvestConfig: VS\n" config_nj_filename = os.path.join( os.path.dirname(os.path.realpath(__file__)), - '../data/apisource-nj.yml', + "../data/apisource-nj.yml", ) res = runner.invoke( - cli.api_source_config_from_file, - [ - config_nj_filename, - '-u' - ], - obj=script_info + cli.api_source_config_from_file, [config_nj_filename, "-u"], obj=script_info ) assert 0 == res.exit_code - assert res.output == 'Add ApiHarvestConfig: NJ\n' + assert res.output == "Add ApiHarvestConfig: NJ\n" # @pytest.mark.skip( @@ -82,61 +80,60 @@ def test_harvest(app, apiharvester_config_vs, apiharvester_apiresponse_vs): script_info = ScriptInfo(create_app=lambda info: app) """Mock a request response.""" - responses.add_passthru( - re.compile('http://localhost:9200/(.*)') - ) - url = '{url}{static}'.format( - url=apiharvester_config_vs.get('url'), - static=('/v1/resources.json?start_at=1900-01-01T00:00:00' - '&page={page}{available}') + responses.add_passthru(re.compile("http://localhost:9200/(.*)")) + url = "{url}{static}".format( + url=apiharvester_config_vs.get("url"), + static=( + "/v1/resources.json?start_at=1900-01-01T00:00:00" "&page={page}{available}" + ), ) headers1 = { - 'X-Total-Pages': '1', - 'X-Total-Items': '1', - 'X-Per-Page': '20', - 'X-Current-Page': '1' + "X-Total-Pages": "1", + "X-Total-Items": "1", + "X-Per-Page": "20", + "X-Current-Page": "1", } responses.add( responses.GET, - url=url.format(page=1, available='&available=1'), + url=url.format(page=1, available="&available=1"), status=200, json=apiharvester_apiresponse_vs, - headers=headers1 + headers=headers1, ) responses.add( responses.GET, - url=url.format(page=2, available='&available=1'), + url=url.format(page=2, available="&available=1"), status=400, ) responses.add( responses.GET, - url=url.format(page=1, available=''), + url=url.format(page=1, available=""), status=200, json=apiharvester_apiresponse_vs, - headers=headers1 + headers=headers1, ) responses.add( responses.GET, - url=url.format(page=2, available=''), + url=url.format(page=2, available=""), status=400, ) - res = runner.invoke( - cli.harvest, - [ - '-n', 'VS', '-v' - ], - obj=script_info - ) + res = runner.invoke(cli.harvest, ["-n", "VS", "-v"], obj=script_info) - #assert 0 == res.exit_code - assert res.output.strip().split('\n') == [ - 'Harvest api: VS', - ('API page: 1 url: http://mediatheque-valais.cantookstation.eu/v1/' - 'resources.json?start_at=1900-01-01T00:00:00&page=1&available=1'), - ('API page: 1 url: http://mediatheque-valais.cantookstation.eu/v1/' - 'resources.json?start_at=1900-01-01T00:00:00&page=1'), - '1: cantook:mv-cantook cantook-immateriel.frO692039 = CREATE', - ('API harvest items=1 available=1 |' - ' got=1 new=1 updated=0 deleted=0 from VS.') + # assert 0 == res.exit_code + assert res.output.strip().split("\n") == [ + "Harvest api: VS", + ( + "API page: 1 url: http://mediatheque-valais.cantookstation.eu/v1/" + "resources.json?start_at=1900-01-01T00:00:00&page=1&available=1" + ), + ( + "API page: 1 url: http://mediatheque-valais.cantookstation.eu/v1/" + "resources.json?start_at=1900-01-01T00:00:00&page=1" + ), + "1: cantook:mv-cantook cantook-immateriel.frO692039 = CREATE", + ( + "API harvest items=1 available=1 |" + " got=1 new=1 updated=0 deleted=0 from VS." + ), ] diff --git a/tests/unit/test_dojson.py b/tests/unit/test_dojson.py index 62f4d1e..ddfdf2e 100644 --- a/tests/unit/test_dojson.py +++ b/tests/unit/test_dojson.py @@ -25,326 +25,253 @@ def test_json_system_control_number(): """Test System control number transformation.""" - data = { - 'id': '1234' - } + data = {"id": "1234"} assert cantook_json.do(data) == { - '__order__': [ - 'leader', - 'other_standard_identifier', - 'system_control_number' + "__order__": [ + "leader", + "fixed_length_data_elements", + "other_standard_identifier", + "system_control_number", + ], + "fixed_length_data_elements": "000000n########xx#|||||||||||||||||###|u", + "other_standard_identifier": [ + { + "standard_number_or_code": "cantook/1234", + "type_of_standard_number_or_code": "Unspecified type of standard number or code", + } ], - 'other_standard_identifier': [{ - 'standard_number_or_code': 'cantook/1234', - 'type_of_standard_number_or_code': - 'Unspecified type of standard number or code' - }], - 'system_control_number': { - 'system_control_number': 'cantook-1234' + "system_control_number": {"system_control_number": "cantook-1234"}, + "leader": { + "base_address_of_data": 0, + "bibliographic_level": "monograph_item", + "character_coding_scheme": "ucs_unicode", + "descriptive_cataloging_form": "unknown", + "encoding_level": "not_applicable", + "indicator_count": 2, + "length_of_the_implementation_defined_portion": 0, + "length_of_the_length_of_field_portion": 4, + "length_of_the_starting_character_position_portion": 5, + "record_length": 0, + "record_status": "corrected_or_revised", + "subfield_code_count": 2, + "type_of_record": "language_material", + "undefined": 0, }, - 'leader': { - 'base_address_of_data': 0, - 'bibliographic_level': 'monograph_item', - 'character_coding_scheme': 'ucs_unicode', - 'descriptive_cataloging_form': 'unknown', - 'encoding_level': 'not_applicable', - 'indicator_count': 2, - 'length_of_the_implementation_defined_portion': 0, - 'length_of_the_length_of_field_portion': 4, - 'length_of_the_starting_character_position_portion': 5, - 'record_length': 0, - 'record_status': 'corrected_or_revised', - 'subfield_code_count': 2, - 'type_of_record': 'language_material', - 'undefined': 0 - } } def test_json_languages(): """Test languages tranformation.""" - data = { - 'languages': [ - 'fre' - ] - } + data = {"languages": ["fre"]} assert cantook_json.do(data) == { - '__order__': ['language_code'], - 'language_code': [ - { - 'language_code_of_text_sound_track_or_separate_title': 'fre' - } - ] + "__order__": ["language_code"], + "language_code": [ + {"language_code_of_text_sound_track_or_separate_title": "fre"} + ], } def test_json_languages_and_translated_from(): """Test languages and translated_from tranformation.""" - data = { - 'languages': [ - 'fre' - ], - 'translated_from': [ - 'ger' - ] - } + data = {"languages": ["fre"], "translated_from": ["ger"]} assert cantook_json.do(data) == { - '__order__': ['language_code', 'language_code'], - 'language_code': [ + "__order__": ["language_code", "language_code"], + "language_code": [ + {"language_code_of_text_sound_track_or_separate_title": "fre"}, { - 'language_code_of_text_sound_track_or_separate_title': 'fre' + "language_code_of_original": "ger", + "translation_indication": "Item is or includes a translation", }, - { - 'language_code_of_original': 'ger', - 'translation_indication': 'Item is or includes a translation' - } - ] + ], } def test_json_title(): """Test title tranformation.""" - data = { - 'title': 'titre' - } + data = {"title": "titre"} assert cantook_json.do(data) == { - '__order__': ['title_statement'], - 'title_statement': {'title': 'titre'} + "__order__": ["title_statement"], + "title_statement": {"title": "titre"}, } def test_json_title_and_subtitle(): """Test title and subtitle tranformation.""" - data = { - 'title': 'titre', - 'subtitle': 'sous-titre' - } + data = {"title": "titre", "subtitle": "sous-titre"} assert cantook_json.do(data) == { - '__order__': ['title_statement'], - 'title_statement': { - 'title': 'titre', - 'remainder_of_title': 'sous-titre'} + "__order__": ["title_statement"], + "title_statement": {"title": "titre", "remainder_of_title": "sous-titre"}, } def test_json_publisher_name(): """Test publisher name tranformation.""" - data = { - 'publisher_name': 'Editions Gallimard' - } + data = {"publisher_name": "Editions Gallimard"} assert cantook_json.do(data) == { - '__order__': [ - 'production_publication_distribution_manufacture' - '_and_copyright_notice' + "__order__": [ + "production_publication_distribution_manufacture" "_and_copyright_notice" ], - 'production_publication_distribution_manufacture_and_copyright_notice': - { - 'name_of_producer_publisher_distributor_manufacturer': - 'Editions Gallimard', - 'function_of_entity': 'Publication' - } + "production_publication_distribution_manufacture_and_copyright_notice": { + "name_of_producer_publisher_distributor_manufacturer": "Editions Gallimard", + "function_of_entity": "Publication", + }, } def test_json_physical_description(): """Test physical description tranformation.""" - data = { - 'page_count': '1234' - } + data = {"page_count": "1234"} assert cantook_json.do(data) == { - '__order__': ['physical_description'], - 'physical_description': [{'extent': '1234 pages'}] + "__order__": ["physical_description"], + "physical_description": [{"extent": "1234 pages"}], } def test_json_summary(): """Test summary tranformation.""" - data = { - 'summary': 'résumé' - } + data = {"summary": "résumé"} assert cantook_json.do(data) == { - '__order__': ['summary'], - 'summary': {'summary': 'résumé'} + "__order__": ["summary"], + "summary": {"summary": "résumé"}, } def test_index_term_uncontrolled(): """Test Index term uncontrolled transformation.""" data = { - 'classifications': [ + "classifications": [ { - 'standard': 'bisac', - 'identifiers': [ - 'TRV015000' - ], - 'captions': [ - { - 'fr': None, - 'en': None - } - ] + "standard": "bisac", + "identifiers": ["TRV015000"], + "captions": [{"fr": None, "en": None}], }, { - 'standard': 'cantook', - 'identifiers': [ - 'tourism-travel' - ], - 'captions': [ - { - 'fr': 'Tourisme et voyages', - 'en': 'Tourism & Travel' - } - ] + "standard": "cantook", + "identifiers": ["tourism-travel"], + "captions": [{"fr": "Tourisme et voyages", "en": "Tourism & Travel"}], }, { - 'standard': 'feedbooks', - 'identifiers': [ - 'FBTRV015000' - ], - 'captions': [ - { - 'fr': 'Moyen-Orient', - 'en': 'Middle East' - } - ] - } + "standard": "feedbooks", + "identifiers": ["FBTRV015000"], + "captions": [{"fr": "Moyen-Orient", "en": "Middle East"}], + }, ] } assert cantook_json.do(data) == { - '__order__': ['index_term_uncontrolled', 'index_term_uncontrolled'], - 'index_term_uncontrolled': [ + "__order__": ["index_term_uncontrolled", "index_term_uncontrolled"], + "index_term_uncontrolled": [ { - '__order__': ['uncontrolled_term', 'uncontrolled_term'], - 'uncontrolled_term': [ - 'Tourisme et voyages', - 'Tourism & Travel' - ] + "__order__": ["uncontrolled_term", "uncontrolled_term"], + "uncontrolled_term": ["Tourisme et voyages", "Tourism & Travel"], }, { - '__order__': ['uncontrolled_term', 'uncontrolled_term'], - 'uncontrolled_term': [ - 'Moyen-Orient', - 'Middle East' - ] - } - ] + "__order__": ["uncontrolled_term", "uncontrolled_term"], + "uncontrolled_term": ["Moyen-Orient", "Middle East"], + }, + ], } def test_json_added_entry_personal_name(): """Test Added entry personal name transformation.""" data = { - 'contributors': [ - { - 'first_name': 'Victor', - 'last_name': 'Hugo', - 'nature': 'author' - }, - { - 'last_name': 'Toto', - 'nature': 'translated_by' - }, + "contributors": [ + {"first_name": "Victor", "last_name": "Hugo", "nature": "author"}, + {"last_name": "Toto", "nature": "translated_by"}, ] } assert cantook_json.do(data) == { - '__order__': [ - 'added_entry_personal_name', - 'added_entry_personal_name' - ], - 'added_entry_personal_name': [ + "__order__": ["added_entry_personal_name", "added_entry_personal_name"], + "added_entry_personal_name": [ { - 'type_of_personal_name_entry_element': 'Surname', - 'personal_name': 'Hugo, Victor', - 'relator_code': 'aut' + "type_of_personal_name_entry_element": "Surname", + "personal_name": "Hugo, Victor", + "relator_code": "aut", }, { - 'type_of_personal_name_entry_element': 'Forename', - 'personal_name': 'Toto', - 'relator_code': 'trl' - } - ] + "type_of_personal_name_entry_element": "Forename", + "personal_name": "Toto", + "relator_code": "trl", + }, + ], } def test_json_media(): """Test media tranformation.""" data = { - 'media': [ + "media": [ { - 'nature': 'epub', - 'key_type': 'isbn13', - 'id': 'immateriel.frO588299-9791028508067-epub', - 'key': '9791028508067', - 'issued_on': '2019-04-09T06:00:00+02:00', - 'current_holds': 0 + "nature": "epub", + "key_type": "isbn13", + "id": "immateriel.frO588299-9791028508067-epub", + "key": "9791028508067", + "issued_on": "2019-04-09T06:00:00+02:00", + "current_holds": 0, }, { - 'nature': 'paper', - 'key_type': 'isbn13', - 'id': 'immateriel.frO588299-9791028503154-paper', - 'key': '9791028514563', - 'issued_on': None, - 'current_holds': 0 - } + "nature": "paper", + "key_type": "isbn13", + "id": "immateriel.frO588299-9791028503154-paper", + "key": "9791028514563", + "issued_on": None, + "current_holds": 0, + }, ] } assert cantook_json.do(data) == { - '__order__': [ - 'international_standard_book_number', - 'production_publication_distribution_manufacture' - '_and_copyright_notice', - 'electronic_location_and_access' + "__order__": [ + "international_standard_book_number", + "production_publication_distribution_manufacture" "_and_copyright_notice", + "electronic_location_and_access", ], - 'international_standard_book_number': { - 'international_standard_book_number': '9791028508067' + "international_standard_book_number": { + "international_standard_book_number": "9791028508067" }, - 'production_publication_distribution_manufacture_and_copyright_notice': - { - 'date_of_production_publication_distribution_manufacture' - '_or_copyright_notice': - '2019' + "production_publication_distribution_manufacture_and_copyright_notice": { + "date_of_production_publication_distribution_manufacture" + "_or_copyright_notice": "2019" }, - 'electronic_location_and_access': [{'electronic_format_type': 'epub'}] + "electronic_location_and_access": [{"electronic_format_type": "epub"}], } def test_json_cover_flipbook_link(): """Test cover, flipbook, link tranformation.""" - data = {'cover': 'http://images.immateriel.fr/covers/FWK3BH5.png', - 'flipbook': 'http://livre.immateriel.fr/FWK3BH5?no_sign_in=true', - 'link': 'http://mediatheque-valais.cantookstation.eu/' - 'resources/58e878ce235794558ef07803'} + data = { + "cover": "http://images.immateriel.fr/covers/FWK3BH5.png", + "flipbook": "http://livre.immateriel.fr/FWK3BH5?no_sign_in=true", + "link": "http://mediatheque-valais.cantookstation.eu/" + "resources/58e878ce235794558ef07803", + } assert cantook_json.do(data) == { - '__order__': [ - 'electronic_location_and_access', - 'electronic_location_and_access', - 'electronic_location_and_access' + "__order__": [ + "electronic_location_and_access", + "electronic_location_and_access", + "electronic_location_and_access", ], - 'electronic_location_and_access': [ + "electronic_location_and_access": [ { - 'uniform_resource_identifier': - 'http://images.immateriel.fr/covers/FWK3BH5.png', - 'materials_specified': 'Image de couverture', - 'access_method': 'HTTP', - 'relationship': 'Related resource' + "uniform_resource_identifier": "http://images.immateriel.fr/covers/FWK3BH5.png", + "materials_specified": "Image de couverture", + "access_method": "HTTP", + "relationship": "Related resource", }, { - 'uniform_resource_identifier': - 'http://livre.immateriel.fr/FWK3BH5?no_sign_in=true', - 'materials_specified': 'Extrait', - 'access_method': 'HTTP', - 'relationship': 'Related resource' + "uniform_resource_identifier": "http://livre.immateriel.fr/FWK3BH5?no_sign_in=true", + "materials_specified": "Extrait", + "access_method": "HTTP", + "relationship": "Related resource", }, { - 'uniform_resource_identifier': - 'http://mediatheque-valais.cantookstation.eu/' - 'resources/58e878ce235794558ef07803', - 'materials_specified': 'Texte intégral', - 'access_method': 'HTTP', - 'relationship': 'Resource' - } - ] + "uniform_resource_identifier": "http://mediatheque-valais.cantookstation.eu/" + "resources/58e878ce235794558ef07803", + "materials_specified": "Texte intégral", + "access_method": "HTTP", + "relationship": "Resource", + }, + ], } @@ -380,47 +307,42 @@ def test_json_cover_flipbook_link_media(): res = cantook_json.do(data) ref = { - '__order__': [ - 'international_standard_book_number', - 'production_publication_distribution_manufacture' - '_and_copyright_notice', - 'electronic_location_and_access', - 'electronic_location_and_access', - 'electronic_location_and_access' + "__order__": [ + "international_standard_book_number", + "production_publication_distribution_manufacture" "_and_copyright_notice", + "electronic_location_and_access", + "electronic_location_and_access", + "electronic_location_and_access", ], - 'electronic_location_and_access': [ + "electronic_location_and_access": [ { - 'uniform_resource_identifier': - 'http://images.immateriel.fr/covers/FWK3BH5.png', - 'materials_specified': 'Image de couverture', - 'access_method': 'HTTP', - 'relationship': 'Related resource' + "uniform_resource_identifier": "http://images.immateriel.fr/covers/FWK3BH5.png", + "materials_specified": "Image de couverture", + "access_method": "HTTP", + "relationship": "Related resource", }, { - 'uniform_resource_identifier': - 'http://livre.immateriel.fr/FWK3BH5?no_sign_in=true', - 'materials_specified': 'Extrait', - 'access_method': 'HTTP', - 'relationship': 'Related resource' + "uniform_resource_identifier": "http://livre.immateriel.fr/FWK3BH5?no_sign_in=true", + "materials_specified": "Extrait", + "access_method": "HTTP", + "relationship": "Related resource", }, { - 'electronic_format_type': 'epub', - 'uniform_resource_identifier': - 'http://mediatheque-valais.cantookstation.eu/' - 'resources/58e878', - 'materials_specified': 'Texte intégral', - 'access_method': 'HTTP', - 'relationship': 'Resource' - } + "electronic_format_type": "epub", + "uniform_resource_identifier": "http://mediatheque-valais.cantookstation.eu/" + "resources/58e878", + "materials_specified": "Texte intégral", + "access_method": "HTTP", + "relationship": "Resource", + }, ], - 'international_standard_book_number': { - 'international_standard_book_number': '9791028508067' + "international_standard_book_number": { + "international_standard_book_number": "9791028508067" + }, + "production_publication_distribution_manufacture_and_copyright_notice": { + "date_of_production_publication_distribution_manufacture" + "_or_copyright_notice": "2019" }, - 'production_publication_distribution_manufacture_and_copyright_notice': - { - 'date_of_production_publication_distribution_manufacture' - '_or_copyright_notice': '2019' - } } assert ref == res @@ -428,15 +350,15 @@ def test_json_cover_flipbook_link_media(): def test_json_media_cover_flipbook_link(): """Test cover, flipbook, link tranformation. - The difference between this test and the test - test_json_cover_flipbook_link_media is the order of the input - data. In this test the media data arrive first and so, - in the result, the first element in the list - 'electronic_location_and_access' is the dict containing the key - 'electronic_format_type' (instead of the last element in the - test: test_json_cover_flipbook_link_media). + The difference between this test and the test + test_json_cover_flipbook_link_media is the order of the input + data. In this test the media data arrive first and so, + in the result, the first element in the list + 'electronic_location_and_access' is the dict containing the key + 'electronic_format_type' (instead of the last element in the + test: test_json_cover_flipbook_link_media). - Both cases are used to test all parts of the implementation. + Both cases are used to test all parts of the implementation. """ json_data = """ @@ -468,47 +390,41 @@ def test_json_media_cover_flipbook_link(): res = cantook_json.do(data) ref = { - '__order__': [ - 'international_standard_book_number', - 'production_publication_distribution_manufacture' - '_and_copyright_notice', - 'electronic_location_and_access', - 'electronic_location_and_access', - 'electronic_location_and_access' + "__order__": [ + "international_standard_book_number", + "production_publication_distribution_manufacture" "_and_copyright_notice", + "electronic_location_and_access", + "electronic_location_and_access", + "electronic_location_and_access", ], - 'electronic_location_and_access': [ + "electronic_location_and_access": [ { - 'electronic_format_type': 'epub', - 'uniform_resource_identifier': - 'http://mediatheque-valais.cantookstation.eu/' - 'resources/58e878', - 'materials_specified': 'Texte intégral', - 'access_method': 'HTTP', - 'relationship': 'Resource' + "electronic_format_type": "epub", + "uniform_resource_identifier": "http://mediatheque-valais.cantookstation.eu/" + "resources/58e878", + "materials_specified": "Texte intégral", + "access_method": "HTTP", + "relationship": "Resource", }, { - 'uniform_resource_identifier': - 'http://images.immateriel.fr/covers/FWK3BH5.png', - 'materials_specified': 'Image de couverture', - 'access_method': 'HTTP', - 'relationship': 'Related resource' + "uniform_resource_identifier": "http://images.immateriel.fr/covers/FWK3BH5.png", + "materials_specified": "Image de couverture", + "access_method": "HTTP", + "relationship": "Related resource", }, { - 'uniform_resource_identifier': - 'http://livre.immateriel.fr/FWK3BH5?no_sign_in=true', - 'materials_specified': 'Extrait', - 'access_method': 'HTTP', - 'relationship': 'Related resource' - } + "uniform_resource_identifier": "http://livre.immateriel.fr/FWK3BH5?no_sign_in=true", + "materials_specified": "Extrait", + "access_method": "HTTP", + "relationship": "Related resource", + }, ], - 'international_standard_book_number': { - 'international_standard_book_number': '9791028508067' + "international_standard_book_number": { + "international_standard_book_number": "9791028508067" + }, + "production_publication_distribution_manufacture_and_copyright_notice": { + "date_of_production_publication_distribution_manufacture" + "_or_copyright_notice": "2019" }, - 'production_publication_distribution_manufacture_and_copyright_notice': - { - 'date_of_production_publication_distribution_manufacture' - '_or_copyright_notice': - '2019' - } } assert ref == res