invenio-vocabularies 9.1.2__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- invenio_vocabularies/__init__.py +16 -0
- invenio_vocabularies/administration/__init__.py +10 -0
- invenio_vocabularies/administration/views/__init__.py +10 -0
- invenio_vocabularies/administration/views/vocabularies.py +43 -0
- invenio_vocabularies/alembic/17c703ce1eb7_create_names_table.py +54 -0
- invenio_vocabularies/alembic/3ba812d80559_add_internal_name_id.py +36 -0
- invenio_vocabularies/alembic/4a9a4fd235f8_create_vocabulary_schemes.py +37 -0
- invenio_vocabularies/alembic/4f365fced43f_create_vocabularies_tables.py +92 -0
- invenio_vocabularies/alembic/55a700f897b6_add_names_and_afiliations_pid_column.py +96 -0
- invenio_vocabularies/alembic/6312f33645c1_create_affiliations_table.py +54 -0
- invenio_vocabularies/alembic/676dd587542d_create_funders_vocabulary_table.py +58 -0
- invenio_vocabularies/alembic/8ff82dfb0be8_create_vocabularies_branch.py +28 -0
- invenio_vocabularies/alembic/__init__.py +9 -0
- invenio_vocabularies/alembic/af2457652217_drop_unique_constraint_from_internal_id.py +37 -0
- invenio_vocabularies/alembic/e1146238edd3_create_awards_table.py +56 -0
- invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/.eslintrc.yml +11 -0
- invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/.prettierrc +1 -0
- invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/index.js +7 -0
- invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/package.json +25 -0
- invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/src/contrib/forms/Funding/AwardResults.js +95 -0
- invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/src/contrib/forms/Funding/CustomAwardForm.js +139 -0
- invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/src/contrib/forms/Funding/FunderDropdown.js +87 -0
- invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/src/contrib/forms/Funding/FundingField.js +244 -0
- invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/src/contrib/forms/Funding/FundingField.test.js +1 -0
- invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/src/contrib/forms/Funding/FundingFieldItem.js +152 -0
- invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/src/contrib/forms/Funding/FundingModal.js +246 -0
- invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/src/contrib/forms/Funding/NoAwardResults.js +37 -0
- invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/src/contrib/forms/Funding/index.js +8 -0
- invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/src/contrib/forms/index.js +7 -0
- invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/src/contrib/index.js +7 -0
- invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/src/index.js +7 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/i18next.js +36 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/_generatedTranslations.js +66 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ar/messages.po +96 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ar/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/bg/messages.po +94 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/bg/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ca/messages.po +94 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ca/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/cs/messages.po +97 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/cs/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/da/messages.po +94 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/da/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/de/messages.po +98 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/de/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/el/messages.po +94 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/el/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/en/messages.po +88 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/en/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/es/messages.po +96 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/es/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/et/messages.po +95 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/et/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/fa/messages.po +94 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/fa/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/fr/messages.po +96 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/fr/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/hr/messages.po +94 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/hr/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/hu/messages.po +96 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/hu/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/index.js +24 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/it/messages.po +96 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/it/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ja/messages.po +94 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ja/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ka/messages.po +94 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ka/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ko/messages.po +90 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ko/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/lt/messages.po +94 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/lt/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/no/messages.po +94 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/no/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/pl/messages.po +94 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/pl/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/pt/messages.po +94 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/pt/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ro/messages.po +95 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ro/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ru/messages.po +95 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/ru/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/sk/messages.po +94 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/sk/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/sv/messages.po +98 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/sv/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/tr/messages.po +96 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/tr/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/uk/messages.po +94 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/uk/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/zh_CN/messages.po +96 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/zh_CN/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/zh_TW/messages.po +94 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/messages/zh_TW/translations.json +28 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/package.json +19 -0
- invenio_vocabularies/assets/semantic-ui/translations/invenio_vocabularies/translations.pot +88 -0
- invenio_vocabularies/cli.py +175 -0
- invenio_vocabularies/config.py +231 -0
- invenio_vocabularies/contrib/__init__.py +9 -0
- invenio_vocabularies/contrib/affiliations/__init__.py +20 -0
- invenio_vocabularies/contrib/affiliations/affiliations.py +61 -0
- invenio_vocabularies/contrib/affiliations/api.py +13 -0
- invenio_vocabularies/contrib/affiliations/config.py +79 -0
- invenio_vocabularies/contrib/affiliations/datastreams.py +301 -0
- invenio_vocabularies/contrib/affiliations/facets.py +36 -0
- invenio_vocabularies/contrib/affiliations/jsonschemas/__init__.py +9 -0
- invenio_vocabularies/contrib/affiliations/jsonschemas/affiliations/affiliation-v1.0.0.json +63 -0
- invenio_vocabularies/contrib/affiliations/mappings/__init__.py +10 -0
- invenio_vocabularies/contrib/affiliations/mappings/os-v1/__init__.py +9 -0
- invenio_vocabularies/contrib/affiliations/mappings/os-v1/affiliations/affiliation-v1.0.0.json +112 -0
- invenio_vocabularies/contrib/affiliations/mappings/os-v1/affiliations/affiliation-v2.0.0.json +171 -0
- invenio_vocabularies/contrib/affiliations/mappings/os-v2/__init__.py +9 -0
- invenio_vocabularies/contrib/affiliations/mappings/os-v2/affiliations/affiliation-v1.0.0.json +112 -0
- invenio_vocabularies/contrib/affiliations/mappings/os-v2/affiliations/affiliation-v2.0.0.json +171 -0
- invenio_vocabularies/contrib/affiliations/mappings/v7/__init__.py +9 -0
- invenio_vocabularies/contrib/affiliations/mappings/v7/affiliations/affiliation-v1.0.0.json +112 -0
- invenio_vocabularies/contrib/affiliations/models.py +13 -0
- invenio_vocabularies/contrib/affiliations/resources.py +16 -0
- invenio_vocabularies/contrib/affiliations/schema.py +71 -0
- invenio_vocabularies/contrib/affiliations/services.py +15 -0
- invenio_vocabularies/contrib/awards/__init__.py +19 -0
- invenio_vocabularies/contrib/awards/api.py +13 -0
- invenio_vocabularies/contrib/awards/awards.py +96 -0
- invenio_vocabularies/contrib/awards/config.py +59 -0
- invenio_vocabularies/contrib/awards/datastreams.py +372 -0
- invenio_vocabularies/contrib/awards/jsonschemas/__init__.py +9 -0
- invenio_vocabularies/contrib/awards/jsonschemas/awards/award-v1.0.0.json +91 -0
- invenio_vocabularies/contrib/awards/mappings/__init__.py +9 -0
- invenio_vocabularies/contrib/awards/mappings/os-v1/__init__.py +9 -0
- invenio_vocabularies/contrib/awards/mappings/os-v1/awards/award-v1.0.0.json +147 -0
- invenio_vocabularies/contrib/awards/mappings/os-v2/__init__.py +9 -0
- invenio_vocabularies/contrib/awards/mappings/os-v2/awards/award-v1.0.0.json +147 -0
- invenio_vocabularies/contrib/awards/mappings/v7/__init__.py +9 -0
- invenio_vocabularies/contrib/awards/mappings/v7/awards/award-v1.0.0.json +147 -0
- invenio_vocabularies/contrib/awards/models.py +13 -0
- invenio_vocabularies/contrib/awards/resources.py +16 -0
- invenio_vocabularies/contrib/awards/schema.py +119 -0
- invenio_vocabularies/contrib/awards/serializer.py +47 -0
- invenio_vocabularies/contrib/awards/services.py +15 -0
- invenio_vocabularies/contrib/common/__init__.py +9 -0
- invenio_vocabularies/contrib/common/openaire/__init__.py +9 -0
- invenio_vocabularies/contrib/common/openaire/datastreams.py +84 -0
- invenio_vocabularies/contrib/common/ror/__init__.py +9 -0
- invenio_vocabularies/contrib/common/ror/datastreams.py +230 -0
- invenio_vocabularies/contrib/funders/__init__.py +19 -0
- invenio_vocabularies/contrib/funders/api.py +13 -0
- invenio_vocabularies/contrib/funders/config.py +78 -0
- invenio_vocabularies/contrib/funders/datastreams.py +97 -0
- invenio_vocabularies/contrib/funders/facets.py +36 -0
- invenio_vocabularies/contrib/funders/funders.py +72 -0
- invenio_vocabularies/contrib/funders/jsonschemas/__init__.py +9 -0
- invenio_vocabularies/contrib/funders/jsonschemas/funders/funder-v1.0.0.json +65 -0
- invenio_vocabularies/contrib/funders/mappings/__init__.py +9 -0
- invenio_vocabularies/contrib/funders/mappings/os-v1/__init__.py +9 -0
- invenio_vocabularies/contrib/funders/mappings/os-v1/funders/funder-v1.0.0.json +90 -0
- invenio_vocabularies/contrib/funders/mappings/os-v1/funders/funder-v2.0.0.json +156 -0
- invenio_vocabularies/contrib/funders/mappings/os-v2/__init__.py +9 -0
- invenio_vocabularies/contrib/funders/mappings/os-v2/funders/funder-v1.0.0.json +90 -0
- invenio_vocabularies/contrib/funders/mappings/os-v2/funders/funder-v2.0.0.json +156 -0
- invenio_vocabularies/contrib/funders/mappings/v7/__init__.py +9 -0
- invenio_vocabularies/contrib/funders/mappings/v7/funders/funder-v1.0.0.json +90 -0
- invenio_vocabularies/contrib/funders/models.py +13 -0
- invenio_vocabularies/contrib/funders/resources.py +16 -0
- invenio_vocabularies/contrib/funders/schema.py +88 -0
- invenio_vocabularies/contrib/funders/serializer.py +33 -0
- invenio_vocabularies/contrib/funders/services.py +15 -0
- invenio_vocabularies/contrib/names/__init__.py +19 -0
- invenio_vocabularies/contrib/names/api.py +13 -0
- invenio_vocabularies/contrib/names/components.py +24 -0
- invenio_vocabularies/contrib/names/config.py +75 -0
- invenio_vocabularies/contrib/names/datastreams.py +483 -0
- invenio_vocabularies/contrib/names/jsonschemas/__init__.py +9 -0
- invenio_vocabularies/contrib/names/jsonschemas/names/name-v1.0.0.json +68 -0
- invenio_vocabularies/contrib/names/mappings/__init__.py +9 -0
- invenio_vocabularies/contrib/names/mappings/os-v1/__init__.py +9 -0
- invenio_vocabularies/contrib/names/mappings/os-v1/names/name-v1.0.0.json +101 -0
- invenio_vocabularies/contrib/names/mappings/os-v1/names/name-v2.0.0.json +165 -0
- invenio_vocabularies/contrib/names/mappings/os-v2/__init__.py +9 -0
- invenio_vocabularies/contrib/names/mappings/os-v2/names/name-v1.0.0.json +101 -0
- invenio_vocabularies/contrib/names/mappings/os-v2/names/name-v2.0.0.json +165 -0
- invenio_vocabularies/contrib/names/mappings/v7/__init__.py +9 -0
- invenio_vocabularies/contrib/names/mappings/v7/names/name-v1.0.0.json +101 -0
- invenio_vocabularies/contrib/names/models.py +13 -0
- invenio_vocabularies/contrib/names/names.py +80 -0
- invenio_vocabularies/contrib/names/permissions.py +30 -0
- invenio_vocabularies/contrib/names/resources.py +54 -0
- invenio_vocabularies/contrib/names/s3client.py +50 -0
- invenio_vocabularies/contrib/names/schema.py +121 -0
- invenio_vocabularies/contrib/names/services.py +64 -0
- invenio_vocabularies/contrib/subjects/__init__.py +22 -0
- invenio_vocabularies/contrib/subjects/api.py +14 -0
- invenio_vocabularies/contrib/subjects/config.py +90 -0
- invenio_vocabularies/contrib/subjects/datastreams.py +63 -0
- invenio_vocabularies/contrib/subjects/euroscivoc/__init__.py +9 -0
- invenio_vocabularies/contrib/subjects/euroscivoc/datastreams.py +101 -0
- invenio_vocabularies/contrib/subjects/facets.py +23 -0
- invenio_vocabularies/contrib/subjects/gemet/__init__.py +9 -0
- invenio_vocabularies/contrib/subjects/gemet/datastreams.py +140 -0
- invenio_vocabularies/contrib/subjects/jsonschemas/__init__.py +10 -0
- invenio_vocabularies/contrib/subjects/jsonschemas/subjects/subject-v1.0.0.json +69 -0
- invenio_vocabularies/contrib/subjects/mappings/__init__.py +9 -0
- invenio_vocabularies/contrib/subjects/mappings/os-v1/__init__.py +9 -0
- invenio_vocabularies/contrib/subjects/mappings/os-v1/subjects/subject-v1.0.0.json +96 -0
- invenio_vocabularies/contrib/subjects/mappings/os-v2/__init__.py +9 -0
- invenio_vocabularies/contrib/subjects/mappings/os-v2/subjects/subject-v1.0.0.json +96 -0
- invenio_vocabularies/contrib/subjects/mappings/v7/__init__.py +9 -0
- invenio_vocabularies/contrib/subjects/mappings/v7/subjects/subject-v1.0.0.json +96 -0
- invenio_vocabularies/contrib/subjects/mesh/__init__.py +9 -0
- invenio_vocabularies/contrib/subjects/mesh/datastreams.py +48 -0
- invenio_vocabularies/contrib/subjects/models.py +14 -0
- invenio_vocabularies/contrib/subjects/nvs/__init__.py +9 -0
- invenio_vocabularies/contrib/subjects/nvs/datastreams.py +114 -0
- invenio_vocabularies/contrib/subjects/resources.py +17 -0
- invenio_vocabularies/contrib/subjects/schema.py +101 -0
- invenio_vocabularies/contrib/subjects/services.py +30 -0
- invenio_vocabularies/contrib/subjects/subjects.py +55 -0
- invenio_vocabularies/datastreams/__init__.py +18 -0
- invenio_vocabularies/datastreams/datastreams.py +239 -0
- invenio_vocabularies/datastreams/errors.py +29 -0
- invenio_vocabularies/datastreams/factories.py +86 -0
- invenio_vocabularies/datastreams/readers.py +448 -0
- invenio_vocabularies/datastreams/tasks.py +115 -0
- invenio_vocabularies/datastreams/transformers.py +130 -0
- invenio_vocabularies/datastreams/writers.py +222 -0
- invenio_vocabularies/datastreams/xml.py +34 -0
- invenio_vocabularies/ext.py +179 -0
- invenio_vocabularies/factories.py +193 -0
- invenio_vocabularies/fixtures.py +52 -0
- invenio_vocabularies/jobs.py +207 -0
- invenio_vocabularies/proxies.py +27 -0
- invenio_vocabularies/records/__init__.py +9 -0
- invenio_vocabularies/records/api.py +53 -0
- invenio_vocabularies/records/jsonschemas/__init__.py +9 -0
- invenio_vocabularies/records/jsonschemas/vocabularies/definitions-v1.0.0.json +30 -0
- invenio_vocabularies/records/jsonschemas/vocabularies/vocabulary-v1.0.0.json +55 -0
- invenio_vocabularies/records/mappings/__init__.py +9 -0
- invenio_vocabularies/records/mappings/os-v1/__init__.py +9 -0
- invenio_vocabularies/records/mappings/os-v1/vocabularies/vocabulary-v1.0.0.json +109 -0
- invenio_vocabularies/records/mappings/os-v2/__init__.py +9 -0
- invenio_vocabularies/records/mappings/os-v2/vocabularies/vocabulary-v1.0.0.json +109 -0
- invenio_vocabularies/records/mappings/v7/__init__.py +9 -0
- invenio_vocabularies/records/mappings/v7/vocabularies/vocabulary-v1.0.0.json +109 -0
- invenio_vocabularies/records/models.py +90 -0
- invenio_vocabularies/records/pidprovider.py +118 -0
- invenio_vocabularies/records/systemfields/__init__.py +16 -0
- invenio_vocabularies/records/systemfields/pid.py +125 -0
- invenio_vocabularies/records/systemfields/relations.py +51 -0
- invenio_vocabularies/resources/__init__.py +23 -0
- invenio_vocabularies/resources/config.py +105 -0
- invenio_vocabularies/resources/resource.py +156 -0
- invenio_vocabularies/resources/schema.py +21 -0
- invenio_vocabularies/resources/serializer.py +39 -0
- invenio_vocabularies/services/__init__.py +19 -0
- invenio_vocabularies/services/components.py +58 -0
- invenio_vocabularies/services/config.py +173 -0
- invenio_vocabularies/services/custom_fields/__init__.py +17 -0
- invenio_vocabularies/services/custom_fields/subject.py +82 -0
- invenio_vocabularies/services/custom_fields/vocabulary.py +96 -0
- invenio_vocabularies/services/facets.py +114 -0
- invenio_vocabularies/services/generators.py +38 -0
- invenio_vocabularies/services/permissions.py +30 -0
- invenio_vocabularies/services/querystr.py +57 -0
- invenio_vocabularies/services/results.py +110 -0
- invenio_vocabularies/services/schema.py +163 -0
- invenio_vocabularies/services/service.py +189 -0
- invenio_vocabularies/services/tasks.py +38 -0
- invenio_vocabularies/templates/semantic-ui/invenio_vocabularies/subjects.html +23 -0
- invenio_vocabularies/templates/semantic-ui/invenio_vocabularies/vocabularies-list.html +12 -0
- invenio_vocabularies/templates/semantic-ui/invenio_vocabularies/vocabulary-details.html +71 -0
- invenio_vocabularies/translations/ar/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/ar/LC_MESSAGES/messages.po +277 -0
- invenio_vocabularies/translations/bg/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/bg/LC_MESSAGES/messages.po +275 -0
- invenio_vocabularies/translations/ca/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/ca/LC_MESSAGES/messages.po +276 -0
- invenio_vocabularies/translations/cs/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/cs/LC_MESSAGES/messages.po +281 -0
- invenio_vocabularies/translations/da/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/da/LC_MESSAGES/messages.po +271 -0
- invenio_vocabularies/translations/de/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/de/LC_MESSAGES/messages.po +293 -0
- invenio_vocabularies/translations/el/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/el/LC_MESSAGES/messages.po +275 -0
- invenio_vocabularies/translations/es/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/es/LC_MESSAGES/messages.po +281 -0
- invenio_vocabularies/translations/et/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/et/LC_MESSAGES/messages.po +276 -0
- invenio_vocabularies/translations/fa/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/fa/LC_MESSAGES/messages.po +275 -0
- invenio_vocabularies/translations/fr/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/fr/LC_MESSAGES/messages.po +279 -0
- invenio_vocabularies/translations/hr/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/hr/LC_MESSAGES/messages.po +275 -0
- invenio_vocabularies/translations/hu/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/hu/LC_MESSAGES/messages.po +280 -0
- invenio_vocabularies/translations/it/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/it/LC_MESSAGES/messages.po +277 -0
- invenio_vocabularies/translations/ja/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/ja/LC_MESSAGES/messages.po +275 -0
- invenio_vocabularies/translations/ka/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/ka/LC_MESSAGES/messages.po +275 -0
- invenio_vocabularies/translations/ko/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/ko/LC_MESSAGES/messages.po +275 -0
- invenio_vocabularies/translations/lt/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/lt/LC_MESSAGES/messages.po +275 -0
- invenio_vocabularies/translations/messages.pot +270 -0
- invenio_vocabularies/translations/no/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/no/LC_MESSAGES/messages.po +275 -0
- invenio_vocabularies/translations/pl/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/pl/LC_MESSAGES/messages.po +275 -0
- invenio_vocabularies/translations/pt/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/pt/LC_MESSAGES/messages.po +275 -0
- invenio_vocabularies/translations/ro/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/ro/LC_MESSAGES/messages.po +280 -0
- invenio_vocabularies/translations/ru/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/ru/LC_MESSAGES/messages.po +276 -0
- invenio_vocabularies/translations/sk/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/sk/LC_MESSAGES/messages.po +276 -0
- invenio_vocabularies/translations/sv/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/sv/LC_MESSAGES/messages.po +280 -0
- invenio_vocabularies/translations/tr/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/tr/LC_MESSAGES/messages.po +277 -0
- invenio_vocabularies/translations/uk/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/uk/LC_MESSAGES/messages.po +275 -0
- invenio_vocabularies/translations/zh_CN/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/zh_CN/LC_MESSAGES/messages.po +276 -0
- invenio_vocabularies/translations/zh_TW/LC_MESSAGES/messages.mo +0 -0
- invenio_vocabularies/translations/zh_TW/LC_MESSAGES/messages.po +275 -0
- invenio_vocabularies/views.py +53 -0
- invenio_vocabularies/webpack.py +51 -0
- invenio_vocabularies-9.1.2.dist-info/METADATA +517 -0
- invenio_vocabularies-9.1.2.dist-info/RECORD +337 -0
- invenio_vocabularies-9.1.2.dist-info/WHEEL +6 -0
- invenio_vocabularies-9.1.2.dist-info/entry_points.txt +73 -0
- invenio_vocabularies-9.1.2.dist-info/licenses/AUTHORS.rst +13 -0
- invenio_vocabularies-9.1.2.dist-info/licenses/LICENSE +21 -0
- invenio_vocabularies-9.1.2.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
#
|
|
3
|
+
# Copyright (C) 2020-2025 CERN.
|
|
4
|
+
# Copyright (C) 2024-2025 Graz University of Technology.
|
|
5
|
+
#
|
|
6
|
+
# Invenio-Vocabularies is free software; you can redistribute it and/or
|
|
7
|
+
# modify it under the terms of the MIT License; see LICENSE file for more
|
|
8
|
+
# details.
|
|
9
|
+
|
|
10
|
+
"""Invenio module for managing vocabularies."""
|
|
11
|
+
|
|
12
|
+
from .ext import InvenioVocabularies
|
|
13
|
+
|
|
14
|
+
__version__ = "9.1.2"
|
|
15
|
+
|
|
16
|
+
__all__ = ("__version__", "InvenioVocabularies")
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
#
|
|
3
|
+
# Copyright (C) 2024 CERN.
|
|
4
|
+
# Copyright (C) 2024 Uni Münster.
|
|
5
|
+
#
|
|
6
|
+
# Invenio-Vocabularies is free software; you can redistribute it and/or
|
|
7
|
+
# modify it under the terms of the MIT License; see LICENSE file for more
|
|
8
|
+
# details.
|
|
9
|
+
|
|
10
|
+
"""Invenio administration views module for vocabularies."""
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
#
|
|
3
|
+
# Copyright (C) 2020-2024 CERN.
|
|
4
|
+
# Copyright (C) 2024 Uni Münster.
|
|
5
|
+
#
|
|
6
|
+
# Invenio-Vocabularies is free software; you can redistribute it and/or
|
|
7
|
+
# modify it under the terms of the MIT License; see LICENSE file for more
|
|
8
|
+
# details.
|
|
9
|
+
|
|
10
|
+
"""Invenio administration views module for Vocabularies."""
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
#
|
|
3
|
+
# Copyright (C) 2020-2024 CERN.
|
|
4
|
+
# Copyright (C) 2024 Uni Münster.
|
|
5
|
+
#
|
|
6
|
+
# Invenio-Vocabularies is free software; you can redistribute it and/or
|
|
7
|
+
# modify it under the terms of the MIT License; see LICENSE file for more
|
|
8
|
+
# details.
|
|
9
|
+
|
|
10
|
+
"""Vocabularies admin interface."""
|
|
11
|
+
|
|
12
|
+
from invenio_administration.views.base import AdminResourceListView
|
|
13
|
+
from invenio_i18n import lazy_gettext as _
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class VocabulariesListView(AdminResourceListView):
|
|
17
|
+
"""Configuration for vocabularies list view."""
|
|
18
|
+
|
|
19
|
+
api_endpoint = "/vocabularies/"
|
|
20
|
+
name = "vocabulary-types"
|
|
21
|
+
menu_label = _("Vocabulary Types")
|
|
22
|
+
resource_config = "vocabulary_admin_resource"
|
|
23
|
+
search_request_headers = {"Accept": "application/json"}
|
|
24
|
+
title = _("Vocabulary Types")
|
|
25
|
+
category = _("Site management")
|
|
26
|
+
|
|
27
|
+
pid_path = "id"
|
|
28
|
+
icon = "exchange"
|
|
29
|
+
template = "invenio_administration/search.html"
|
|
30
|
+
|
|
31
|
+
display_search = True
|
|
32
|
+
display_delete = False
|
|
33
|
+
display_edit = False
|
|
34
|
+
display_create = False
|
|
35
|
+
|
|
36
|
+
item_field_list = {
|
|
37
|
+
"id": {"text": _("Name"), "order": 1},
|
|
38
|
+
"count": {"text": _("Number of entries"), "order": 2},
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
search_config_name = "VOCABULARIES_TYPES_SEARCH"
|
|
42
|
+
search_facets_config_name = "VOCABULARIES_TYPES_FACETS"
|
|
43
|
+
search_sort_config_name = "VOCABULARIES_TYPES_SORT_OPTIONS"
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
#
|
|
2
|
+
# This file is part of Invenio.
|
|
3
|
+
# Copyright (C) 2021 CERN.
|
|
4
|
+
#
|
|
5
|
+
# Invenio is free software; you can redistribute it and/or modify it
|
|
6
|
+
# under the terms of the MIT License; see LICENSE file for more details.
|
|
7
|
+
|
|
8
|
+
"""Create names table."""
|
|
9
|
+
|
|
10
|
+
import sqlalchemy as sa
|
|
11
|
+
import sqlalchemy_utils
|
|
12
|
+
from alembic import op
|
|
13
|
+
from sqlalchemy.dialects import mysql, postgresql
|
|
14
|
+
|
|
15
|
+
# revision identifiers, used by Alembic.
|
|
16
|
+
revision = "17c703ce1eb7"
|
|
17
|
+
down_revision = "4a9a4fd235f8"
|
|
18
|
+
branch_labels = ()
|
|
19
|
+
depends_on = None
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def upgrade():
|
|
23
|
+
"""Upgrade database."""
|
|
24
|
+
op.create_table(
|
|
25
|
+
"name_metadata",
|
|
26
|
+
sa.Column(
|
|
27
|
+
"created",
|
|
28
|
+
sa.DateTime().with_variant(mysql.DATETIME(fsp=6), "mysql"),
|
|
29
|
+
nullable=False,
|
|
30
|
+
),
|
|
31
|
+
sa.Column(
|
|
32
|
+
"updated",
|
|
33
|
+
sa.DateTime().with_variant(mysql.DATETIME(fsp=6), "mysql"),
|
|
34
|
+
nullable=False,
|
|
35
|
+
),
|
|
36
|
+
sa.Column("id", sqlalchemy_utils.types.uuid.UUIDType(), nullable=False),
|
|
37
|
+
sa.Column(
|
|
38
|
+
"json",
|
|
39
|
+
sa.JSON()
|
|
40
|
+
.with_variant(sqlalchemy_utils.types.json.JSONType(), "mysql")
|
|
41
|
+
.with_variant(
|
|
42
|
+
postgresql.JSONB(none_as_null=True, astext_type=sa.Text()), "postgresql"
|
|
43
|
+
)
|
|
44
|
+
.with_variant(sqlalchemy_utils.types.json.JSONType(), "sqlite"),
|
|
45
|
+
nullable=True,
|
|
46
|
+
),
|
|
47
|
+
sa.Column("version_id", sa.Integer(), nullable=False),
|
|
48
|
+
sa.PrimaryKeyConstraint("id", name=op.f("pk_name_metadata")),
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def downgrade():
|
|
53
|
+
"""Downgrade database."""
|
|
54
|
+
op.drop_table("name_metadata")
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
#
|
|
2
|
+
# This file is part of Invenio.
|
|
3
|
+
# Copyright (C) 2024 CERN.
|
|
4
|
+
#
|
|
5
|
+
# Invenio is free software; you can redistribute it and/or modify it
|
|
6
|
+
# under the terms of the MIT License; see LICENSE file for more details.
|
|
7
|
+
|
|
8
|
+
"""Add internal name ID."""
|
|
9
|
+
|
|
10
|
+
import sqlalchemy as sa
|
|
11
|
+
from alembic import op
|
|
12
|
+
from sqlalchemy.dialects import postgresql
|
|
13
|
+
|
|
14
|
+
# revision identifiers, used by Alembic.
|
|
15
|
+
revision = "3ba812d80559"
|
|
16
|
+
down_revision = "55a700f897b6"
|
|
17
|
+
branch_labels = ()
|
|
18
|
+
depends_on = None
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def upgrade():
|
|
22
|
+
"""Upgrade database."""
|
|
23
|
+
op.add_column(
|
|
24
|
+
"name_metadata", sa.Column("internal_id", sa.String(length=255), nullable=True)
|
|
25
|
+
)
|
|
26
|
+
op.create_unique_constraint(
|
|
27
|
+
op.f("uq_name_metadata_internal_id"), "name_metadata", ["internal_id"]
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def downgrade():
|
|
32
|
+
"""Downgrade database."""
|
|
33
|
+
op.drop_constraint(
|
|
34
|
+
op.f("uq_name_metadata_internal_id"), "name_metadata", type_="unique"
|
|
35
|
+
)
|
|
36
|
+
op.drop_column("name_metadata", "internal_id")
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Copyright (C) 2021 Northwestern University.
|
|
3
|
+
#
|
|
4
|
+
# Invenio is free software; you can redistribute it and/or modify it
|
|
5
|
+
# under the terms of the MIT License; see LICENSE file for more details.
|
|
6
|
+
|
|
7
|
+
"""Create vocabulary schemes."""
|
|
8
|
+
|
|
9
|
+
import sqlalchemy as sa
|
|
10
|
+
from alembic import op
|
|
11
|
+
|
|
12
|
+
# revision identifiers, used by Alembic.
|
|
13
|
+
revision = "4a9a4fd235f8"
|
|
14
|
+
down_revision = "6312f33645c1"
|
|
15
|
+
branch_labels = ()
|
|
16
|
+
depends_on = None
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def upgrade():
|
|
20
|
+
"""Upgrade database."""
|
|
21
|
+
op.create_table(
|
|
22
|
+
"vocabularies_schemes",
|
|
23
|
+
sa.Column("id", sa.String(255), nullable=False),
|
|
24
|
+
sa.Column("parent_id", sa.String(255), nullable=False),
|
|
25
|
+
sa.Column("name", sa.String(255), nullable=True),
|
|
26
|
+
sa.Column("uri", sa.String(255), nullable=True),
|
|
27
|
+
sa.PrimaryKeyConstraint(
|
|
28
|
+
"id", "parent_id", name=op.f("pk_vocabularies_schemes")
|
|
29
|
+
),
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def downgrade():
|
|
34
|
+
"""Downgrade database."""
|
|
35
|
+
# ### commands auto generated by Alembic - please adjust! ###
|
|
36
|
+
op.drop_table("vocabularies_schemes")
|
|
37
|
+
# ### end Alembic commands ###
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
#
|
|
3
|
+
# This file is part of Invenio.
|
|
4
|
+
# Copyright (C) 2021 TU Wien.
|
|
5
|
+
#
|
|
6
|
+
# Invenio is free software; you can redistribute it and/or modify it
|
|
7
|
+
# under the terms of the MIT License; see LICENSE file for more details.
|
|
8
|
+
|
|
9
|
+
"""Create vocabularies tables."""
|
|
10
|
+
|
|
11
|
+
import sqlalchemy as sa
|
|
12
|
+
import sqlalchemy_utils
|
|
13
|
+
from alembic import op
|
|
14
|
+
from sqlalchemy.dialects import mysql, postgresql
|
|
15
|
+
|
|
16
|
+
# revision identifiers, used by Alembic.
|
|
17
|
+
revision = "4f365fced43f"
|
|
18
|
+
down_revision = "8ff82dfb0be8"
|
|
19
|
+
branch_labels = ()
|
|
20
|
+
depends_on = None
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def upgrade():
|
|
24
|
+
"""Upgrade database."""
|
|
25
|
+
op.create_table(
|
|
26
|
+
"subject_metadata",
|
|
27
|
+
sa.Column(
|
|
28
|
+
"created",
|
|
29
|
+
sa.DateTime().with_variant(mysql.DATETIME(fsp=6), "mysql"),
|
|
30
|
+
nullable=False,
|
|
31
|
+
),
|
|
32
|
+
sa.Column(
|
|
33
|
+
"updated",
|
|
34
|
+
sa.DateTime().with_variant(mysql.DATETIME(fsp=6), "mysql"),
|
|
35
|
+
nullable=False,
|
|
36
|
+
),
|
|
37
|
+
sa.Column("id", sqlalchemy_utils.types.uuid.UUIDType(), nullable=False),
|
|
38
|
+
sa.Column(
|
|
39
|
+
"json",
|
|
40
|
+
sa.JSON()
|
|
41
|
+
.with_variant(sqlalchemy_utils.types.json.JSONType(), "mysql")
|
|
42
|
+
.with_variant(
|
|
43
|
+
postgresql.JSONB(none_as_null=True, astext_type=sa.Text()),
|
|
44
|
+
"postgresql",
|
|
45
|
+
)
|
|
46
|
+
.with_variant(sqlalchemy_utils.types.json.JSONType(), "sqlite"),
|
|
47
|
+
nullable=True,
|
|
48
|
+
),
|
|
49
|
+
sa.Column("version_id", sa.Integer(), nullable=False),
|
|
50
|
+
sa.PrimaryKeyConstraint("id", name=op.f("pk_subject_metadata")),
|
|
51
|
+
)
|
|
52
|
+
op.create_table(
|
|
53
|
+
"vocabularies_metadata",
|
|
54
|
+
sa.Column(
|
|
55
|
+
"created",
|
|
56
|
+
sa.DateTime().with_variant(mysql.DATETIME(fsp=6), "mysql"),
|
|
57
|
+
nullable=False,
|
|
58
|
+
),
|
|
59
|
+
sa.Column(
|
|
60
|
+
"updated",
|
|
61
|
+
sa.DateTime().with_variant(mysql.DATETIME(fsp=6), "mysql"),
|
|
62
|
+
nullable=False,
|
|
63
|
+
),
|
|
64
|
+
sa.Column("id", sqlalchemy_utils.types.uuid.UUIDType(), nullable=False),
|
|
65
|
+
sa.Column(
|
|
66
|
+
"json",
|
|
67
|
+
sa.JSON()
|
|
68
|
+
.with_variant(sqlalchemy_utils.types.json.JSONType(), "mysql")
|
|
69
|
+
.with_variant(
|
|
70
|
+
postgresql.JSONB(none_as_null=True, astext_type=sa.Text()),
|
|
71
|
+
"postgresql",
|
|
72
|
+
)
|
|
73
|
+
.with_variant(sqlalchemy_utils.types.json.JSONType(), "sqlite"),
|
|
74
|
+
nullable=True,
|
|
75
|
+
),
|
|
76
|
+
sa.Column("version_id", sa.Integer(), nullable=False),
|
|
77
|
+
sa.PrimaryKeyConstraint("id", name=op.f("pk_vocabularies_metadata")),
|
|
78
|
+
)
|
|
79
|
+
op.create_table(
|
|
80
|
+
"vocabularies_types",
|
|
81
|
+
sa.Column("id", sa.String(255), nullable=False),
|
|
82
|
+
sa.Column("pid_type", sa.String(255), nullable=True),
|
|
83
|
+
sa.PrimaryKeyConstraint("id", name=op.f("pk_vocabularies_types")),
|
|
84
|
+
sa.UniqueConstraint("pid_type", name=op.f("uq_vocabularies_types_pid_type")),
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
def downgrade():
|
|
89
|
+
"""Downgrade database."""
|
|
90
|
+
op.drop_table("vocabularies_types")
|
|
91
|
+
op.drop_table("vocabularies_metadata")
|
|
92
|
+
op.drop_table("subject_metadata")
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
#
|
|
2
|
+
# This file is part of Invenio.
|
|
3
|
+
# Copyright (C) 2023 CERN.
|
|
4
|
+
#
|
|
5
|
+
# Invenio is free software; you can redistribute it and/or modify it
|
|
6
|
+
# under the terms of the MIT License; see LICENSE file for more details.
|
|
7
|
+
|
|
8
|
+
"""Add "pid" column to names and affiliations tables."""
|
|
9
|
+
|
|
10
|
+
import sqlalchemy as sa
|
|
11
|
+
from alembic import op
|
|
12
|
+
|
|
13
|
+
# revision identifiers, used by Alembic.
|
|
14
|
+
revision = "55a700f897b6"
|
|
15
|
+
down_revision = "e1146238edd3"
|
|
16
|
+
branch_labels = ()
|
|
17
|
+
depends_on = "999c62899c20"
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
pids_table = sa.sql.table(
|
|
21
|
+
"pidstore_pid",
|
|
22
|
+
sa.sql.column("pid_type"),
|
|
23
|
+
sa.sql.column("pid_value"),
|
|
24
|
+
sa.sql.column("object_uuid"),
|
|
25
|
+
sa.sql.column("object_type"),
|
|
26
|
+
)
|
|
27
|
+
names_table = sa.sql.table(
|
|
28
|
+
"name_metadata",
|
|
29
|
+
sa.sql.column("id"),
|
|
30
|
+
sa.sql.column("pid"),
|
|
31
|
+
)
|
|
32
|
+
affiliations_table = sa.sql.table(
|
|
33
|
+
"affiliation_metadata",
|
|
34
|
+
sa.sql.column("id"),
|
|
35
|
+
sa.sql.column("pid"),
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def upgrade():
|
|
40
|
+
"""Upgrade database."""
|
|
41
|
+
op.add_column(
|
|
42
|
+
"name_metadata",
|
|
43
|
+
sa.Column("pid", sa.String(255), nullable=True),
|
|
44
|
+
)
|
|
45
|
+
# populate from PIDStore
|
|
46
|
+
op.execute(
|
|
47
|
+
names_table.update()
|
|
48
|
+
.where(
|
|
49
|
+
names_table.c.id == pids_table.c.object_uuid,
|
|
50
|
+
pids_table.c.object_type == "rec",
|
|
51
|
+
pids_table.c.pid_type == "names",
|
|
52
|
+
)
|
|
53
|
+
.values(pid=pids_table.c.pid_value)
|
|
54
|
+
)
|
|
55
|
+
op.create_unique_constraint(
|
|
56
|
+
op.f("uq_name_metadata_pid"),
|
|
57
|
+
"name_metadata",
|
|
58
|
+
["pid"],
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
op.add_column(
|
|
62
|
+
"affiliation_metadata",
|
|
63
|
+
sa.Column("pid", sa.String(255), nullable=True),
|
|
64
|
+
)
|
|
65
|
+
# populate from PIDStore
|
|
66
|
+
op.execute(
|
|
67
|
+
affiliations_table.update()
|
|
68
|
+
.where(
|
|
69
|
+
affiliations_table.c.id == pids_table.c.object_uuid,
|
|
70
|
+
pids_table.c.object_type == "rec",
|
|
71
|
+
pids_table.c.pid_type == "aff",
|
|
72
|
+
)
|
|
73
|
+
.values(pid=pids_table.c.pid_value)
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
op.create_unique_constraint(
|
|
77
|
+
op.f("uq_affiliation_metadata_pid"),
|
|
78
|
+
"affiliation_metadata",
|
|
79
|
+
["pid"],
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
def downgrade():
|
|
84
|
+
"""Downgrade database."""
|
|
85
|
+
op.drop_constraint(
|
|
86
|
+
op.f("uq_name_metadata_pid"),
|
|
87
|
+
"name_metadata",
|
|
88
|
+
type_="unique",
|
|
89
|
+
)
|
|
90
|
+
op.drop_constraint(
|
|
91
|
+
op.f("uq_affiliation_metadata_pid"),
|
|
92
|
+
"affiliation_metadata",
|
|
93
|
+
type_="unique",
|
|
94
|
+
)
|
|
95
|
+
op.drop_column("name_metadata", "pid")
|
|
96
|
+
op.drop_column("affiliation_metadata", "pid")
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
#
|
|
2
|
+
# This file is part of Invenio.
|
|
3
|
+
# Copyright (C) 2021 CERN.
|
|
4
|
+
#
|
|
5
|
+
# Invenio is free software; you can redistribute it and/or modify it
|
|
6
|
+
# under the terms of the MIT License; see LICENSE file for more details.
|
|
7
|
+
|
|
8
|
+
"""Create affiliations table."""
|
|
9
|
+
|
|
10
|
+
import sqlalchemy as sa
|
|
11
|
+
import sqlalchemy_utils
|
|
12
|
+
from alembic import op
|
|
13
|
+
from sqlalchemy.dialects import mysql, postgresql
|
|
14
|
+
|
|
15
|
+
# revision identifiers, used by Alembic.
|
|
16
|
+
revision = "6312f33645c1"
|
|
17
|
+
down_revision = "4f365fced43f"
|
|
18
|
+
branch_labels = ()
|
|
19
|
+
depends_on = None
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def upgrade():
|
|
23
|
+
"""Upgrade database."""
|
|
24
|
+
op.create_table(
|
|
25
|
+
"affiliation_metadata",
|
|
26
|
+
sa.Column(
|
|
27
|
+
"created",
|
|
28
|
+
sa.DateTime().with_variant(mysql.DATETIME(fsp=6), "mysql"),
|
|
29
|
+
nullable=False,
|
|
30
|
+
),
|
|
31
|
+
sa.Column(
|
|
32
|
+
"updated",
|
|
33
|
+
sa.DateTime().with_variant(mysql.DATETIME(fsp=6), "mysql"),
|
|
34
|
+
nullable=False,
|
|
35
|
+
),
|
|
36
|
+
sa.Column("id", sqlalchemy_utils.types.uuid.UUIDType(), nullable=False),
|
|
37
|
+
sa.Column(
|
|
38
|
+
"json",
|
|
39
|
+
sa.JSON()
|
|
40
|
+
.with_variant(sqlalchemy_utils.types.json.JSONType(), "mysql")
|
|
41
|
+
.with_variant(
|
|
42
|
+
postgresql.JSONB(none_as_null=True, astext_type=sa.Text()), "postgresql"
|
|
43
|
+
)
|
|
44
|
+
.with_variant(sqlalchemy_utils.types.json.JSONType(), "sqlite"),
|
|
45
|
+
nullable=True,
|
|
46
|
+
),
|
|
47
|
+
sa.Column("version_id", sa.Integer(), nullable=False),
|
|
48
|
+
sa.PrimaryKeyConstraint("id", name=op.f("pk_affiliation_metadata")),
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def downgrade():
|
|
53
|
+
"""Downgrade database."""
|
|
54
|
+
op.drop_table("affiliation_metadata")
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
#
|
|
2
|
+
# This file is part of Invenio.
|
|
3
|
+
# Copyright (C) 2022 CERN.
|
|
4
|
+
#
|
|
5
|
+
# Invenio is free software; you can redistribute it and/or modify it
|
|
6
|
+
# under the terms of the MIT License; see LICENSE file for more details.
|
|
7
|
+
|
|
8
|
+
"""Create funders vocabulary table."""
|
|
9
|
+
|
|
10
|
+
import sqlalchemy as sa
|
|
11
|
+
import sqlalchemy_utils
|
|
12
|
+
from alembic import op
|
|
13
|
+
from sqlalchemy.dialects import mysql, postgresql
|
|
14
|
+
|
|
15
|
+
# revision identifiers, used by Alembic.
|
|
16
|
+
revision = "676dd587542d"
|
|
17
|
+
down_revision = "17c703ce1eb7"
|
|
18
|
+
branch_labels = ()
|
|
19
|
+
depends_on = None
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def upgrade():
|
|
23
|
+
"""Upgrade database."""
|
|
24
|
+
op.create_table(
|
|
25
|
+
"funder_metadata",
|
|
26
|
+
sa.Column(
|
|
27
|
+
"created",
|
|
28
|
+
sa.DateTime().with_variant(mysql.DATETIME(fsp=6), "mysql"),
|
|
29
|
+
nullable=False,
|
|
30
|
+
),
|
|
31
|
+
sa.Column(
|
|
32
|
+
"updated",
|
|
33
|
+
sa.DateTime().with_variant(mysql.DATETIME(fsp=6), "mysql"),
|
|
34
|
+
nullable=False,
|
|
35
|
+
),
|
|
36
|
+
sa.Column("id", sqlalchemy_utils.types.uuid.UUIDType(), nullable=False),
|
|
37
|
+
sa.Column(
|
|
38
|
+
"json",
|
|
39
|
+
sa.JSON()
|
|
40
|
+
.with_variant(sqlalchemy_utils.types.json.JSONType(), "mysql")
|
|
41
|
+
.with_variant(
|
|
42
|
+
postgresql.JSONB(none_as_null=True, astext_type=sa.Text()), "postgresql"
|
|
43
|
+
)
|
|
44
|
+
.with_variant(sqlalchemy_utils.types.json.JSONType(), "sqlite"),
|
|
45
|
+
nullable=True,
|
|
46
|
+
),
|
|
47
|
+
sa.Column("version_id", sa.Integer(), nullable=False),
|
|
48
|
+
sa.Column("pid", sa.String(255), nullable=True),
|
|
49
|
+
sa.PrimaryKeyConstraint("id", name=op.f("pk_funder_metadata")),
|
|
50
|
+
sa.UniqueConstraint("pid", name=op.f("uq_funder_metadata_pid")),
|
|
51
|
+
)
|
|
52
|
+
# ### end Alembic commands ###
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def downgrade():
|
|
56
|
+
"""Downgrade database."""
|
|
57
|
+
op.drop_table("funder_metadata")
|
|
58
|
+
# ### end Alembic commands ###
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
#
|
|
3
|
+
# This file is part of Invenio.
|
|
4
|
+
# Copyright (C) 2021 TU Wien.
|
|
5
|
+
#
|
|
6
|
+
# Invenio is free software; you can redistribute it and/or modify it
|
|
7
|
+
# under the terms of the MIT License; see LICENSE file for more details.
|
|
8
|
+
|
|
9
|
+
"""Create vocabularies branch."""
|
|
10
|
+
|
|
11
|
+
import sqlalchemy as sa
|
|
12
|
+
from alembic import op
|
|
13
|
+
|
|
14
|
+
# revision identifiers, used by Alembic.
|
|
15
|
+
revision = "8ff82dfb0be8"
|
|
16
|
+
down_revision = None
|
|
17
|
+
branch_labels = ("invenio_vocabularies",)
|
|
18
|
+
depends_on = "dbdbc1b19cf2"
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def upgrade():
|
|
22
|
+
"""Upgrade database."""
|
|
23
|
+
pass
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def downgrade():
|
|
27
|
+
"""Downgrade database."""
|
|
28
|
+
pass
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
#
|
|
2
|
+
# This file is part of Invenio.
|
|
3
|
+
# Copyright (C) 2016-2018 CERN.
|
|
4
|
+
#
|
|
5
|
+
# Invenio is free software; you can redistribute it and/or modify it
|
|
6
|
+
# under the terms of the MIT License; see LICENSE file for more details.
|
|
7
|
+
|
|
8
|
+
"""Drop unique constraint from internal id."""
|
|
9
|
+
|
|
10
|
+
import sqlalchemy as sa
|
|
11
|
+
from alembic import op
|
|
12
|
+
from sqlalchemy.dialects import postgresql
|
|
13
|
+
|
|
14
|
+
# revision identifiers, used by Alembic.
|
|
15
|
+
revision = "af2457652217"
|
|
16
|
+
down_revision = "3ba812d80559"
|
|
17
|
+
branch_labels = ()
|
|
18
|
+
depends_on = None
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def upgrade():
|
|
22
|
+
"""Upgrade database."""
|
|
23
|
+
op.drop_constraint("uq_name_metadata_internal_id", "name_metadata", type_="unique")
|
|
24
|
+
op.create_index(
|
|
25
|
+
op.f("ix_name_metadata_internal_id"),
|
|
26
|
+
"name_metadata",
|
|
27
|
+
["internal_id"],
|
|
28
|
+
unique=False,
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def downgrade():
|
|
33
|
+
"""Downgrade database."""
|
|
34
|
+
op.drop_index(op.f("ix_name_metadata_internal_id"), table_name="name_metadata")
|
|
35
|
+
op.create_unique_constraint(
|
|
36
|
+
"uq_name_metadata_internal_id", "name_metadata", ["internal_id"]
|
|
37
|
+
)
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
#
|
|
2
|
+
# This file is part of Invenio.
|
|
3
|
+
# Copyright (C) 2022 CERN.
|
|
4
|
+
#
|
|
5
|
+
# Invenio is free software; you can redistribute it and/or modify it
|
|
6
|
+
# under the terms of the MIT License; see LICENSE file for more details.
|
|
7
|
+
|
|
8
|
+
"""Create awards table."""
|
|
9
|
+
|
|
10
|
+
import sqlalchemy as sa
|
|
11
|
+
import sqlalchemy_utils
|
|
12
|
+
from alembic import op
|
|
13
|
+
from sqlalchemy.dialects import mysql, postgresql
|
|
14
|
+
|
|
15
|
+
# revision identifiers, used by Alembic.
|
|
16
|
+
revision = "e1146238edd3"
|
|
17
|
+
down_revision = "676dd587542d"
|
|
18
|
+
branch_labels = ()
|
|
19
|
+
depends_on = None
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def upgrade():
|
|
23
|
+
"""Downgrade database."""
|
|
24
|
+
op.create_table(
|
|
25
|
+
"award_metadata",
|
|
26
|
+
sa.Column(
|
|
27
|
+
"created",
|
|
28
|
+
sa.DateTime().with_variant(mysql.DATETIME(fsp=6), "mysql"),
|
|
29
|
+
nullable=False,
|
|
30
|
+
),
|
|
31
|
+
sa.Column(
|
|
32
|
+
"updated",
|
|
33
|
+
sa.DateTime().with_variant(mysql.DATETIME(fsp=6), "mysql"),
|
|
34
|
+
nullable=False,
|
|
35
|
+
),
|
|
36
|
+
sa.Column("id", sqlalchemy_utils.types.uuid.UUIDType(), nullable=False),
|
|
37
|
+
sa.Column(
|
|
38
|
+
"json",
|
|
39
|
+
sa.JSON()
|
|
40
|
+
.with_variant(sqlalchemy_utils.types.json.JSONType(), "mysql")
|
|
41
|
+
.with_variant(
|
|
42
|
+
postgresql.JSONB(none_as_null=True, astext_type=sa.Text()), "postgresql"
|
|
43
|
+
)
|
|
44
|
+
.with_variant(sqlalchemy_utils.types.json.JSONType(), "sqlite"),
|
|
45
|
+
nullable=True,
|
|
46
|
+
),
|
|
47
|
+
sa.Column("version_id", sa.Integer(), nullable=False),
|
|
48
|
+
sa.Column("pid", sa.String(255), nullable=True),
|
|
49
|
+
sa.PrimaryKeyConstraint("id", name=op.f("pk_award_metadata")),
|
|
50
|
+
sa.UniqueConstraint("pid", name=op.f("uq_award_metadata_pid")),
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def downgrade():
|
|
55
|
+
"""Upgrade database."""
|
|
56
|
+
op.drop_table("award_metadata")
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
#
|
|
3
|
+
# This file is part of Invenio.
|
|
4
|
+
# Copyright (C) 2023 CERN.
|
|
5
|
+
#
|
|
6
|
+
# Invenio is free software; you can redistribute it and/or modify
|
|
7
|
+
# it under the terms of the MIT License; see LICENSE file for more details.
|
|
8
|
+
|
|
9
|
+
extends:
|
|
10
|
+
- '@inveniosoftware/eslint-config-invenio'
|
|
11
|
+
- '@inveniosoftware/eslint-config-invenio/prettier'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"@inveniosoftware/eslint-config-invenio/prettier-config.js"
|