diff --git a/.github/actions/import-db/action.yml b/.github/actions/import-db/action.yml index ea5d4e393a1..bdd4e320bba 100644 --- a/.github/actions/import-db/action.yml +++ b/.github/actions/import-db/action.yml @@ -22,21 +22,22 @@ runs: - uses: actions/checkout@v4 with: - repository: dataquest-dev/dspace-python-api - path: dspace-python-api + repository: dataquest-dev/dspace-import ref: 'main' + submodules: 'recursive' + path: 'dspace-import' - name: stop and remove containers id: import shell: bash - working-directory: dspace-python-api/scripts + working-directory: dspace-import/scripts env: DATADIR: ${{ inputs.DATADIR }} DB5PORT: 15432 DB5NAME: dspace-import-db5 DB7PORT: 543${{ inputs.INSTANCE }} - BEURL: http://dev-5.pc:8${{ inputs.INSTANCE }}/server/api/ + BEURL: http://dev-5.pc:8${{ inputs.INSTANCE }}/server/api run: | docker stop $DB5NAME || true echo "=====" @@ -61,4 +62,4 @@ runs: run: | docker stop ${{ steps.import.outputs.cid }} || true if: ${{ always() }} - + diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c16ceaf1ed9..4f8062ecbd7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -114,12 +114,12 @@ jobs: path: 'coverage/dspace-angular/lcov.info' retention-days: 14 - # Using docker-compose start backend using CI configuration + # Using docker compose start backend using CI configuration # and load assetstore from a cached copy - name: Start DSpace REST Backend via Docker (for e2e tests) run: | - docker-compose -f ./docker/docker-compose-ci.yml up -d - docker-compose -f ./docker/cli.yml -f ./docker/cli.assetstore.yml run --rm dspace-cli + docker compose -f ./docker/docker-compose-ci.yml up -d + docker compose -f ./docker/cli.yml -f ./docker/cli.assetstore.yml run --rm dspace-cli docker container ls # Run integration tests via Cypress.io @@ -188,7 +188,7 @@ jobs: run: kill -9 $(lsof -t -i:4000) - name: Shutdown Docker containers - run: docker-compose -f ./docker/docker-compose-ci.yml down + run: docker compose -f ./docker/docker-compose-ci.yml down # # Codecov upload is a separate job in order to allow us to restart this separate from the entire build/test # # job above. This is necessary because Codecov uploads seem to randomly fail at times. diff --git a/.github/workflows/create_bitstreams.yml b/.github/workflows/create_bitstreams.yml index 06ba9168cb4..793bb806445 100644 --- a/.github/workflows/create_bitstreams.yml +++ b/.github/workflows/create_bitstreams.yml @@ -14,61 +14,19 @@ on: - '8' jobs: - checkout-codebase: + import-specific-bitstreams: runs-on: dspace-dep-1 + env: + DSPACE_REST_API: http://dev-5.pc:8${{ github.event.inputs.INSTANCE }}/server/api steps: - uses: actions/checkout@v4 with: - repository: dataquest-dev/dspace-python-api + repository: dataquest-dev/dspace-rest-test + ref: master + submodules: 'recursive' - import-2: - if: inputs.INSTANCE == '2' - runs-on: dspace-dep-1 - needs: checkout-codebase - env: - DSPACE_REST_API: http://dev-5.pc:82/server/api/ - steps: - - name: install requirements and run import - run: | - pip install -r requirements.txt - cd tools/create_bitstreams - python3 create_bitstreams.py - - import-5: - if: inputs.INSTANCE == '5' - runs-on: dspace-dep-1 - needs: checkout-codebase - env: - DSPACE_REST_API: http://dev-5.pc:85/server/api/ - steps: - - name: install requirements and run import - run: | - pip install -r requirements.txt - cd tools/create_bitstreams - python3 create_bitstreams.py - - import-6: - if: inputs.INSTANCE == '6' - runs-on: dspace-dep-1 - needs: checkout-codebase - env: - DSPACE_REST_API: http://dev-5.pc:86/server/api/ - steps: - - name: install requirements and run import - run: | - pip install -r requirements.txt - cd tools/create_bitstreams - python3 create_bitstreams.py - - import-8: - if: inputs.INSTANCE == '8' - runs-on: dspace-dep-1 - needs: checkout-codebase - env: - DSPACE_REST_API: http://dev-5.pc:88/server/api/ - steps: - name: install requirements and run import run: | - pip install -r requirements.txt - cd tools/create_bitstreams + pip install -q -r requirements.txt + cd tests/integration python3 create_bitstreams.py diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 7cd8385c134..02fdc13b4d4 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -83,6 +83,12 @@ jobs: working-directory: build-scripts/run/ run: | ./start.sh dspace-$INSTANCE + cd ../.. + # this is not necessary, since extra.yml doesn't contain any new images that weren't pulled within script above + # docker compose --env-file $ENVFILE -p dspace-$INSTANCE -f docker/docker-compose.yml -f docker/docker-compose-rest.yml -f /opt/dspace-envs/8/extra.yml pull + docker compose --env-file $ENVFILE -p dspace-$INSTANCE -f docker/docker-compose.yml -f docker/docker-compose-rest.yml -f /opt/dspace-envs/8/extra.yml up -d --no-build + # this seems to be the easiest solution for now + docker restart dockerized-nginx-with-shibboleth-nginx-1 /bin/bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' http://dev-5.pc:8$INSTANCE/server/api)" != "200" ]]; do sleep 5; done' @@ -110,8 +116,156 @@ jobs: echo "dspace cleanup:" docker exec $DNAME /bin/bash -c "cd /dspace/bin && ./dspace cleanup -v" + echo "dspace reindex solr:" + docker exec $DNAME /bin/bash -c "cd /dspace/bin && ./dspace index-discovery -b" + + echo "dspace reindex OAI-PMH:" + docker exec $DNAME /bin/bash -c "cd /dspace/bin && ./dspace oai import -c" + echo "dspace checker:" docker exec $DNAME /bin/bash -c "cd /dspace/bin && ./dspace checker -v -l" echo "dspace healthcheck:" docker exec $DNAME /bin/bash -c "cd /dspace/bin && ./dspace healthcheck -v" + + playwright-after-deploy8: + runs-on: ubuntu-latest + needs: deploy-8 + timeout-minutes: 15 + if: '!inputs.IMPORT' + steps: + - name: run playwright + run: | + # wait until FE stabilizes a bit + sleep 3m + + curl -H "Accept: application/vnd.github.everest-preview+json" \ + -H "Authorization: token ${{ secrets.DEPLOY_DEV5_GH_ACTION_DISPATCH }}" \ + --request POST \ + https://api.github.com/repos/dataquest-dev/\ + dspace-ui-tests/actions/workflows/cron-test.yml/dispatches \ + --data "{\"ref\":\"refs/heads/master\"}" 2> /dev/null + + # wait for it to start + sleep 30s + + # get result of last job + RES=$(curl -H "Accept: application/vnd.github.everest-preview+json" -H "Authorization: token ${{ secrets.DEPLOY_DEV5_GH_ACTION_DISPATCH }}" https://api.github.com/repos/dataquest-dev/dspace-ui-tests/actions/workflows/cron-test.yml/runs?per_page=1 2> /dev/null | jq .workflow_runs[0].conclusion) + + # while job did not finish, sleep + while [[ $RES == 'null' ]]; do + sleep 10s + RES=$(curl -H "Accept: application/vnd.github.everest-preview+json" -H "Authorization: token ${{ secrets.DEPLOY_DEV5_GH_ACTION_DISPATCH }}" https://api.github.com/repos/dataquest-dev/dspace-ui-tests/actions/workflows/cron-test.yml/runs?per_page=1 2> /dev/null | jq .workflow_runs[0].conclusion) + done; + + echo $RES + # if last result is not success, return -1 and fail + if [[ $RES != \"success\" ]]; then + echo "playwright tests have failed! check appropriate action run" + exit 1 + fi; + + rest-tests-after-deploy8: + runs-on: ubuntu-latest + needs: playwright-after-deploy8 + timeout-minutes: 15 + steps: + - name: run rest-tests + run: | + curl -H "Accept: application/vnd.github.everest-preview+json" \ + -H "Authorization: token ${{ secrets.DEPLOY_DEV5_GH_ACTION_DISPATCH }}" \ + --request POST \ + https://api.github.com/repos/dataquest-dev/\ + dspace-rest-test/actions/workflows/run_unittests.yml/dispatches \ + --data "{\"ref\":\"refs/heads/master\"}" 2> /dev/null + + # wait for it to start + sleep 30s + + # get result of last job + RES=$(curl -H "Accept: application/vnd.github.everest-preview+json" -H "Authorization: token ${{ secrets.DEPLOY_DEV5_GH_ACTION_DISPATCH }}" https://api.github.com/repos/dataquest-dev/dspace-rest-test/actions/workflows/run_unittests.yml/runs?per_page=1 2> /dev/null | jq .workflow_runs[0].conclusion) + + # while job did not finish, sleep + while [[ $RES == 'null' ]]; do + sleep 10s + RES=$(curl -H "Accept: application/vnd.github.everest-preview+json" -H "Authorization: token ${{ secrets.DEPLOY_DEV5_GH_ACTION_DISPATCH }}" https://api.github.com/repos/dataquest-dev/dspace-rest-test/actions/workflows/run_unittests.yml/runs?per_page=1 2> /dev/null | jq .workflow_runs[0].conclusion) + done; + + echo $RES + # if last result is not success, return -1 and fail + if [[ $RES != \"success\" ]]; then + echo "rest-tests have failed! check appropriate action run" + exit 1 + fi; + + + playwright-after-import8: + runs-on: ubuntu-latest + needs: import-8 + if: inputs.IMPORT + timeout-minutes: 15 + steps: + - name: run playwright + run: | + # wait until FE stabilizes a bit + sleep 3m + + curl -H "Accept: application/vnd.github.everest-preview+json" \ + -H "Authorization: token ${{ secrets.DEPLOY_DEV5_GH_ACTION_DISPATCH }}" \ + --request POST \ + https://api.github.com/repos/dataquest-dev/\ + dspace-ui-tests/actions/workflows/cron-test.yml/dispatches \ + --data "{\"ref\":\"refs/heads/master\"}" 2> /dev/null + + # wait for it to start + sleep 30s + + # get result of last job + RES=$(curl -H "Accept: application/vnd.github.everest-preview+json" -H "Authorization: token ${{ secrets.DEPLOY_DEV5_GH_ACTION_DISPATCH }}" https://api.github.com/repos/dataquest-dev/dspace-ui-tests/actions/workflows/cron-test.yml/runs?per_page=1 2> /dev/null | jq .workflow_runs[0].conclusion) + + # while job did not finish, sleep + while [[ $RES == 'null' ]]; do + sleep 10s + RES=$(curl -H "Accept: application/vnd.github.everest-preview+json" -H "Authorization: token ${{ secrets.DEPLOY_DEV5_GH_ACTION_DISPATCH }}" https://api.github.com/repos/dataquest-dev/dspace-ui-tests/actions/workflows/cron-test.yml/runs?per_page=1 2> /dev/null | jq .workflow_runs[0].conclusion) + done; + + echo $RES + # if last result is not success, return -1 and fail + if [[ $RES != \"success\" ]]; then + + echo "playwright tests have failed! check appropriate action run" + exit 1 + fi; + + rest-tests-after-import8: + runs-on: ubuntu-latest + needs: playwright-after-import8 + timeout-minutes: 15 + steps: + - name: run rest-tests + run: | + curl -H "Accept: application/vnd.github.everest-preview+json" \ + -H "Authorization: token ${{ secrets.DEPLOY_DEV5_GH_ACTION_DISPATCH }}" \ + --request POST \ + https://api.github.com/repos/dataquest-dev/\ + dspace-rest-test/actions/workflows/run_unittests.yml/dispatches \ + --data "{\"ref\":\"refs/heads/master\"}" 2> /dev/null + + # wait for it to start + sleep 30s + + # get result of last job + RES=$(curl -H "Accept: application/vnd.github.everest-preview+json" -H "Authorization: token ${{ secrets.DEPLOY_DEV5_GH_ACTION_DISPATCH }}" https://api.github.com/repos/dataquest-dev/dspace-rest-test/actions/workflows/run_unittests.yml/runs?per_page=1 2> /dev/null | jq .workflow_runs[0].conclusion) + + # while job did not finish, sleep + while [[ $RES == 'null' ]]; do + sleep 10s + RES=$(curl -H "Accept: application/vnd.github.everest-preview+json" -H "Authorization: token ${{ secrets.DEPLOY_DEV5_GH_ACTION_DISPATCH }}" https://api.github.com/repos/dataquest-dev/dspace-rest-test/actions/workflows/run_unittests.yml/runs?per_page=1 2> /dev/null | jq .workflow_runs[0].conclusion) + done; + + echo $RES + # if last result is not success, return -1 and fail + if [[ $RES != \"success\" ]]; then + echo "rest-tests have failed! check appropriate action run" + exit 1 + fi; diff --git a/cypress/e2e/submission.cy.ts b/cypress/e2e/submission.cy.ts deleted file mode 100644 index 5b3af8bde58..00000000000 --- a/cypress/e2e/submission.cy.ts +++ /dev/null @@ -1,146 +0,0 @@ -// import { TEST_SUBMIT_USER, TEST_SUBMIT_USER_PASSWORD, TEST_SUBMIT_COLLECTION_NAME, TEST_SUBMIT_COLLECTION_UUID } from 'cypress/support/e2e'; -// import { createItemProcess } from '../support/commands'; - -// describe('New Submission page', () => { -// // NOTE: We already test that new submissions can be started from MyDSpace in my-dspace.spec.ts -// -// it('should create a new submission when using /submit path & pass accessibility', () => { -// // Test that calling /submit with collection & entityType will create a new submission -// cy.visit('/submit?collection='.concat(TEST_SUBMIT_COLLECTION_UUID).concat('&entityType=none')); -// -// // This page is restricted, so we will be shown the login form. Fill it out & submit. -// cy.loginViaForm(TEST_SUBMIT_USER, TEST_SUBMIT_USER_PASSWORD); -// -// // Should redirect to /workspaceitems, as we've started a new submission -// cy.url().should('include', '/workspaceitems'); -// -// // The Submission edit form tag should be visible -// cy.get('ds-submission-edit').should('be.visible'); -// -// // A Collection menu button should exist & it's value should be the selected collection -// cy.get('#collectionControlsMenuButton span').should('have.text', TEST_SUBMIT_COLLECTION_NAME); -// -// // 4 sections should be visible by default -// cy.get('div#section_traditionalpageone').should('be.visible'); -// cy.get('div#section_traditionalpagetwo').should('be.visible'); -// cy.get('div#section_upload').should('be.visible'); -// cy.get('div#section_license').should('be.visible'); -// -// // Discard button should work -// // Clicking it will display a confirmation, which we will confirm with another click -// cy.get('button#discard').click(); -// cy.get('button#discard_submit').click(); -// }); -// -// it('should block submission & show errors if required fields are missing', () => { -// // Create a new submission -// cy.visit('/submit?collection='.concat(TEST_SUBMIT_COLLECTION_UUID).concat('&entityType=none')); -// -// // This page is restricted, so we will be shown the login form. Fill it out & submit. -// cy.loginViaForm(TEST_SUBMIT_USER, TEST_SUBMIT_USER_PASSWORD); -// -// // Attempt an immediate deposit without filling out any fields -// cy.get('button#deposit').click(); -// -// // A warning alert should display. -// cy.get('ds-notification div.alert-success').should('not.exist'); -// cy.get('ds-notification div.alert-warning').should('be.visible'); -// -// // First section should have an exclamation error in the header -// // (as it has required fields) -// cy.get('div#traditionalpageone-header i.fa-exclamation-circle').should('be.visible'); -// -// // Title field should have class "is-invalid" applied, as it's required -// cy.get('input#dc_title').should('have.class', 'is-invalid'); -// -// // Date Year field should also have "is-valid" class -// cy.get('input#dc_date_issued_year').should('have.class', 'is-invalid'); -// -// // FINALLY, cleanup after ourselves. This also exercises the MyDSpace delete button. -// // Get our Submission URL, to parse out the ID of this submission -// cy.location().then(fullUrl => { -// // This will be the full path (/workspaceitems/[id]/edit) -// const path = fullUrl.pathname; -// // Split on the slashes -// const subpaths = path.split('/'); -// // Part 2 will be the [id] of the submission -// const id = subpaths[2]; -// -// // Even though form is incomplete, the "Save for Later" button should still work -// cy.get('button#saveForLater').click(); -// -// // "Save for Later" should send us to MyDSpace -// cy.url().should('include', '/mydspace'); -// -// // CLARIN -// // // A success alert should be visible -// // cy.get('ds-notification div.alert-success').should('be.visible'); -// // // Now, dismiss any open alert boxes (may be multiple, as tests run quickly) -// // cy.get('[data-dismiss="alert"]').click({multiple: true}); -// // -// // // This is the GET command that will actually run the search -// // cy.intercept('GET', '/server/api/discover/search/objects*').as('search-results'); -// // // On MyDSpace, find the submission we just saved via its ID -// // cy.get('[data-test="search-box"]').type(id); -// // cy.get('[data-test="search-button"]').click(); -// // -// // // Wait for search results to come back from the above GET command -// // cy.wait('@search-results'); -// // -// // // Delete our created submission & confirm deletion -// // cy.get('button#delete_' + id).click(); -// // cy.get('button#delete_confirm').click(); -// }); -// }); -// -// it('should allow for deposit if all required fields completed & file uploaded', () => { -// // Create a new submission -// cy.visit('/submit?collection='.concat(TEST_SUBMIT_COLLECTION_UUID).concat('&entityType=none')); -// -// // This page is restricted, so we will be shown the login form. Fill it out & submit. -// cy.loginViaForm(TEST_SUBMIT_USER, TEST_SUBMIT_USER_PASSWORD); -// -// // Fill out all required fields (Title, Date) -// cy.get('input#dc_title').type('DSpace logo uploaded via e2e tests'); -// cy.get('input#dc_date_issued_year').type('2022'); -// -// // Confirm the required license by checking checkbox -// // (NOTE: requires "force:true" cause Cypress claims this checkbox is covered by its own ) -// // CLARIN -// createItemProcess.clickOnDistributionLicenseToggle(); -// // click on the dropdown button to list options -// createItemProcess.clickOnLicenseSelectionButton(); -// // select `Public Domain Mark (PD)` from the selection -// createItemProcess.selectValueFromLicenseSelection(2); -// // // selected value should be seen as selected value in the selection -// createItemProcess.checkLicenseSelectionValue('GNU General Public License, version 2'); -// // CLARIN -// -// // Before using Cypress drag & drop, we have to manually trigger the "dragover" event. -// // This ensures our UI displays the dropzone that covers the entire submission page. -// // (For some reason Cypress drag & drop doesn't trigger this even itself & upload won't work without this trigger) -// cy.get('ds-uploader').trigger('dragover'); -// -// // This is the POST command that will upload the file -// cy.intercept('POST', '/server/api/submission/workspaceitems/*').as('upload'); -// -// // Upload our DSpace logo via drag & drop onto submission form -// // cy.get('div#section_upload') -// cy.get('div.ds-document-drop-zone').selectFile('src/assets/images/dspace-logo.png', { -// action: 'drag-drop' -// }); -// -// // Wait for upload to complete before proceeding -// cy.wait('@upload'); -// -// // CLARIN -// // // Wait for deposit button to not be disabled & click it. -// // cy.get('button#deposit').should('not.be.disabled').click(); -// // -// // // No warnings should exist. Instead, just successful deposit alert is displayed -// // cy.get('ds-notification div.alert-warning').should('not.exist'); -// // cy.get('ds-notification div.alert-success').should('be.visible'); -// // CLARIN -// }); -// -// }); diff --git a/docker/cli.yml b/docker/cli.yml index 6d1c0f1946a..efe9034b6f2 100644 --- a/docker/cli.yml +++ b/docker/cli.yml @@ -20,6 +20,9 @@ services: # __D__ => "-" (e.g. google__D__metadata => google-metadata) # dspace.dir dspace__P__dir: /dspace + dspace__P__server__P__url: ${REST_URL:-http://127.0.0.1:8080/server} + dspace__P__ui__P__url: ${UI_URL:-http://127.0.0.1:4000} + dspace__P__name: 'DSpace Started with Docker Compose' # db.url: Ensure we are using the 'dspacedb' image for our database db__P__url: 'jdbc:postgresql://dspacedb:543${INSTANCE}/dspace' # solr.server: Ensure we are using the 'dspacesolr' image for Solr @@ -40,6 +43,8 @@ services: assetstore__P__s3__P__endpoint: ${S3_ENDPOINT:-} volumes: - "assetstore:/dspace/assetstore" + - dspace_cli_logs:/dspace/log + - ./local.cfg:/dspace/config/local.cfg entrypoint: /dspace/bin/dspace command: help networks: @@ -49,6 +54,7 @@ services: volumes: assetstore: + dspace_cli_logs: networks: dspacenet: diff --git a/docker/docker-compose-rest.yml b/docker/docker-compose-rest.yml index 87cea6b1d31..17f37f6401d 100644 --- a/docker/docker-compose-rest.yml +++ b/docker/docker-compose-rest.yml @@ -94,7 +94,7 @@ services: TZ: ${TIMEZONE:-Europe/Bratislava} PGDATA: /pgdata POSTGRES_PASSWORD: dspace - image: dspace/dspace-postgres-pgcrypto + image: ${DSPACE_DB_IMAGE:-dataquest/dspace-postgres-pgcrypto:dspace-7_x} networks: dspacenet: ports: @@ -112,8 +112,7 @@ services: TZ: ${TIMEZONE:-Europe/Bratislava} restart: unless-stopped container_name: dspacesolr${INSTANCE} - # Uses official Solr image at https://hub.docker.com/_/solr/ - image: solr:8.11-slim + image: ${DSPACE_SOLR_IMAGE:-dataquest/dspace-solr:dspace-7_x} # Needs main 'dspace' container to start first to guarantee access to solr_configs depends_on: - dspace diff --git a/python_data_import/import/data/license_definitions.json b/python_data_import/import/data/license_definitions.json deleted file mode 100644 index b3fe1f90506..00000000000 --- a/python_data_import/import/data/license_definitions.json +++ /dev/null @@ -1,218 +0,0 @@ -[ - { - "name": "GNU General Public Licence, version 3", - "definition": "http://opensource.org/licenses/GPL-3.0", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "name": "GNU General Public License, version 2", - "definition": "http://www.gnu.org/licenses/gpl-2.0.html", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "name": "The MIT License (MIT)", - "definition": "http://opensource.org/licenses/mit-license.php", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "name": "Artistic License 2.0", - "definition": "http://opensource.org/licenses/Artistic-2.0", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "name": "Artistic License (Perl) 1.0", - "definition": "http://opensource.org/licenses/Artistic-Perl-1.0", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "name": "Attribution-NonCommercial-NoDerivs 3.0 Unported (CC BY-NC-ND 3.0)", - "definition": "http://creativecommons.org/licenses/by-nc-nd/3.0/", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "name": "BSD 2-Clause 'Simplified' or 'FreeBSD' license", - "definition": "http://opensource.org/licenses/BSD-2-Clause", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "name": "BSD 3-Clause 'New' or 'Revised' license", - "definition": "http://opensource.org/licenses/BSD-3-Clause", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "name": "Attribution-NonCommercial 3.0 Unported (CC BY-NC 3.0)", - "definition": "http://creativecommons.org/licenses/by-nc/3.0/", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "name": "Attribution-NonCommercial-ShareAlike 3.0 Unported (CC BY-NC-SA 3.0)", - "definition": "http://creativecommons.org/licenses/by-nc-sa/3.0/", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "name": "Attribution-NoDerivs 3.0 Unported (CC BY-ND 3.0)", - "definition": "http://creativecommons.org/licenses/by-nd/3.0/", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "name": "Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)", - "definition": "http://creativecommons.org/licenses/by-sa/3.0/", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "name": "Creative Commons - Attribution 3.0 Unported (CC BY 3.0)", - "definition": "http://creativecommons.org/licenses/by/3.0/", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "name": "PDTSL", - "definition": "https://lindat.mff.cuni.cz/repository/xmlui/page/licence-pdtsl", - "ePersonId": 1, - "labelId": 3, - "confirmation": 2, - "requiredInfo": "" - }, - { - "name": "HamleDT 1.0 Licence Agreement", - "definition": "https://lindat.mff.cuni.cz/repository/xmlui/page/licence-hamledt", - "ePersonId": 1, - "labelId": 3, - "confirmation": 2, - "requiredInfo": "SEND_TOKEN, NAME, ADDRESS, COUNTRY, EXTRA_EMAIL" - }, - { - "name": "HamleDT 2.0 Licence Agreement", - "definition": "https://lindat.mff.cuni.cz/repository/xmlui/page/licence-hamledt-2.0", - "ePersonId": 1, - "labelId": 2, - "confirmation": 0, - "requiredInfo": "SEND_TOKEN, NAME, ADDRESS, COUNTRY, EXTRA_EMAIL" - }, - { - "name": "Czech National Corpus (Shuffled Corpus Data)", - "definition": "https://lindat.mff.cuni.cz/repository/xmlui/page/license-cnc", - "ePersonId": 1, - "labelId": 2, - "confirmation": 1, - "requiredInfo": "" - }, - { - "name": "CC-BY-NC-SA + LDC99T42", - "definition": "https://lindat.mff.cuni.cz/repository/xmlui/page/license-pcedt2", - "ePersonId": 1, - "labelId": 3, - "confirmation": 1, - "requiredInfo": "" - }, - { - "name": "PDT 2.0 License", - "definition": "https://lindat.mff.cuni.cz/repository/xmlui/page/license-pdt2", - "ePersonId": 1, - "labelId": 2, - "confirmation": 1, - "requiredInfo": "" - }, - { - "name": "CC0-No Rights Reserved", - "definition": "http://creativecommons.org/publicdomain/zero/1.0/", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "name": "Apache License 2.0", - "definition": "http://opensource.org/licenses/Apache-2.0", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "name": "Creative Commons - Attribution 4.0 International (CC BY 4.0)", - "definition": "http://creativecommons.org/licenses/by/4.0/", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "name": "Creative Commons - Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)", - "definition": "http://creativecommons.org/licenses/by-sa/4.0/", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "name": "Creative Commons - Attribution-NoDerivatives 4.0 International (CC BY-ND 4.0)", - "definition": "http://creativecommons.org/licenses/by-nd/4.0/", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "name": "Creative Commons - Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)", - "definition": "http://creativecommons.org/licenses/by-nc/4.0/", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "name": "Creative Commons - Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)", - "definition": "http://creativecommons.org/licenses/by-nc-sa/4.0/", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "name": "Creative Commons - Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)", - "definition": "http://creativecommons.org/licenses/by-nc-nd/4.0/", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - } -] diff --git a/python_data_import/import/data/license_definitions_v2.json b/python_data_import/import/data/license_definitions_v2.json deleted file mode 100644 index f39b8c5a8bd..00000000000 --- a/python_data_import/import/data/license_definitions_v2.json +++ /dev/null @@ -1,604 +0,0 @@ -[ - { - "definition": "https://lindat.mff.cuni.cz/repository/xmlui/page/license-ud-2.10", - "name":"Licence Universal Dependencies v2.10", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition": "https://lindat.mff.cuni.cz/repository/xmlui/page/licence-unisegs-1.0", - "name": "Universal Segmentations 1.0 License Terms", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition": "https://lindat.mff.cuni.cz/repository/xmlui/page/license-corefud-0.2", - "name": "Licence CorefUD v0.2", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition": "https://lindat.mff.cuni.cz/repository/xmlui/page/license-ud-2.9", - "name": "Licence Universal Dependencies v2.9", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition": "https://lindat.mff.cuni.cz/repository/xmlui/page/licence-UDer-1.1", - "name": "Universal Derivations v1.1 License Agreement", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition": "https://lindat.mff.cuni.cz/repository/xmlui/page/license-ud-2.8", - "name": "Licence Universal Dependencies v2.8", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition": "https://lindat.mff.cuni.cz/repository/xmlui/page/license-corefud-0.1", - "name": "Licence CorefUD v0.1", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition": "https://lindat.mff.cuni.cz/repository/xmlui/page/deep-sequoia-licence", - "name": "Deep Sequoia Licence", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition": "https://lindat.mff.cuni.cz/repository/xmlui/page/license-ud-2.7", - "name": "Licence Universal Dependencies v2.7", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition": "https://lindat.mff.cuni.cz/repository/xmlui/page/licence-mwe-1.2-raw", - "name": "PARSEME Shared Task Raw Corpus Data (v. 1.2) Agreement", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition": "https://lindat.mff.cuni.cz/repository/xmlui/page/licence-mwe-1.2", - "name": "PARSEME Shared Task Data (v. 1.2) Agreement", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition": "https://lindat.mff.cuni.cz/repository/xmlui/page/licence-UDer-1.0", - "name": "Universal Derivations v1.0 License Agreement", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition": "https://lindat.mff.cuni.cz/repository/xmlui/page/license-ud-2.6", - "name": "Licence Universal Dependencies v2.6", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition": "https://lindat.mff.cuni.cz/repository/xmlui/page/licence-UD-2.5", - "name": "Licence Universal Dependencies v2.5", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition": "https://lindat.mff.cuni.cz/repository/xmlui/page/licence-UDer-0.5", - "name": "Universal Derivations v0.5 License Agreement", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition": "https://lindat.mff.cuni.cz/repository/xmlui/page/licence-UD-2.4", - "name": "Licence Universal Dependencies v2.4", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition": "https://lindat.mff.cuni.cz/repository/xmlui/page/licence-mwe-literal", - "name": "License agreement for The Multilingual corpus of literal occurrences of multiword expressions", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition": "https://lindat.mff.cuni.cz/repository/xmlui/page/licence-UD-2.3", - "name": "Licence Universal Dependencies v2.3", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition": "https://lindat.mff.cuni.cz/repository/xmlui/page/licence-mwe-1.1", - "name": "PARSEME Shared Task Data (v. 1.1) Agreement", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition": "https://lindat.mff.cuni.cz/repository/xmlui/page/licence-UD-2.2", - "name": "Licence Universal Dependencies v2.2", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition": "https://lindat.mff.cuni.cz/repository/xmlui/page/licence-UD-2.1", - "name": "Licence Universal Dependencies v2.1", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition": "https://lindat.mff.cuni.cz/repository/xmlui/page/licence-mwe-1.0", - "name": "PARSEME Shared Task Data (v. 1.0) Agreement", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition": "https://lindat.mff.cuni.cz/repository/xmlui/page/licence-UD-2.0", - "name": "Licence Universal Dependencies v2.0", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition": "https://lindat.mff.cuni.cz/repository/xmlui/page/licence-UD-1.4", - "name": "Licence Universal Dependencies v1.4", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition": "https://lindat.mff.cuni.cz/repository/xmlui/page/licence-UD-1.3", - "name": "Licence Universal Dependencies v1.3", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition": "https://lindat.mff.cuni.cz/repository/xmlui/page/licence-TAUS_QT21", - "name": "AGREEMENT ON THE USE OF DATA IN QT21 APE Task", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition": "https://lindat.mff.cuni.cz/repository/xmlui/page/licence-TAUS_QT21", - "name": "AGREEMENT ON THE USE OF DATA IN QT21", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition": "https://lindat.mff.cuni.cz/repository/xmlui/page/licence-UD-1.2", - "name": "Licence Universal Dependencies v1.2", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition": "https://lindat.mff.cuni.cz/repository/xmlui/page/licence-hamledt-3.0", - "name": "HamleDT 3.0 License Terms", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition": "https://lindat.mff.cuni.cz/repository/xmlui/page/licence-UD-1.1", - "name": "Licence Universal Dependencies v1.1", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition": "http://creativecommons.org/licenses/by-nc-nd/4.0/", - "name": "Creative Commons - Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition": "http://creativecommons.org/licenses/by-nc-sa/4.0/", - "name": "Creative Commons - Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition": "http://creativecommons.org/licenses/by-nc/4.0/", - "name":"Creative Commons - Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition": "http://creativecommons.org/licenses/by-nd/4.0/", - "name":"Creative Commons - Attribution-NoDerivatives 4.0 International (CC BY-ND 4.0)", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition": "http://creativecommons.org/licenses/by-sa/4.0/", - "name":"Creative Commons - Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition": "http://creativecommons.org/licenses/by/4.0/", - "name": "Creative Commons - Attribution 4.0 International (CC BY 4.0)", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition": "https://lindat.mff.cuni.cz/repository/xmlui/page/license-ud-1.0", - "name":"Universal Dependencies 1.0 License Set", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition": "http://creativecommons.org/publicdomain/mark/1.0/", - "name": "Public Domain Mark (PD)", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition": "http://opendatacommons.org/licenses/pddl/summary/", - "name":"Open Data Commons Public Domain Dedication and License (PDDL)", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition": "http://opendatacommons.org/licenses/odbl/summary/", - "name":"Open Data Commons Open Database License (ODbL)", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition": "http://opendatacommons.org/licenses/by/summary/", - "name":"Open Data Commons Attribution License (ODC-By)", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition": "http://opensource.org/licenses/MPL-2.0", - "name":"Mozilla Public License 2.0", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition": "http://opensource.org/licenses/LGPL-3.0", - "name": "GNU Library or Lesser General Public License 3.0 (LGPL-3.0)", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition": "http://opensource.org/licenses/LGPL-2.1", - "name": "GNU Library or Lesser General Public License 2.1 or later (LGPL-2.1)", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition": "http://opensource.org/licenses/LGPL-2.1", - "name": "GNU Library or Lesser General Public License 2.1 (LGPL-2.1)", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition": "http://opensource.org/licenses/GPL-2.0", - "name":"GNU General Public License 2 or later (GPL-2.0)", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition": "http://opensource.org/licenses/EPL-1.0", - "name":"Eclipse Public License 1.0 (EPL-1.0)", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition": "http://opensource.org/licenses/CDDL-1.0", - "name": "Common Development and Distribution License (CDDL-1.0)", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition": "http://opensource.org/licenses/AGPL-3.0", - "name": "Affero General Public License 3 (AGPL-3.0)", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition": "http://www.affero.org/oagpl.html", - "name":"Affero General Public License 1 (AGPL-1.0)", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition": "http://opensource.org/licenses/Apache-2.0", - "name": "Apache License 2.0", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition": "http://opensource.org/licenses/Artistic-2.0", - "name": "Artistic License 2.0", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition": "http://opensource.org/licenses/Artistic-Perl-1.0", - "name": "Artistic License (Perl) 1.0", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition": "http://opensource.org/licenses/GPL-3.0", - "name": "GNU General Public Licence, version 3", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition":"http://opensource.org/licenses/BSD-2-Clause", - "name":"BSD 2-Clause Simplified or FreeBSD license", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition":"http://opensource.org/licenses/BSD-3-Clause", - "name": "BSD 3-Clause New or Revised license", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition":"http://creativecommons.org/publicdomain/zero/1.0/", - "name": "Public Domain Dedication (CC Zero)", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition":"http://opensource.org/licenses/mit-license.php", - "name": "The MIT License (MIT)", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition":"http://creativecommons.org/licenses/by/3.0/", - "name": "Creative Commons - Attribution 3.0 Unported (CC BY 3.0)", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition":"http://creativecommons.org/licenses/by-sa/3.0/", - "name": "Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition":"http://creativecommons.org/licenses/by-nd/3.0/", - "name": "Attribution-NoDerivs 3.0 Unported (CC BY-ND 3.0)", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition":"http://creativecommons.org/licenses/by-nc-nd/3.0/", - "name": "Attribution-NonCommercial-NoDerivs 3.0 Unported (CC BY-NC-ND 3.0)", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition":"http://www.gnu.org/licenses/gpl-2.0.html", - "name": "GNU General Public License, version 2", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition":"http://creativecommons.org/licenses/by-nc-sa/3.0/", - "name": "Attribution-NonCommercial-ShareAlike 3.0 Unported (CC BY-NC-SA 3.0)", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition":"http://creativecommons.org/licenses/by-nc/3.0/", - "name": "Attribution-NonCommercial 3.0 Unported (CC BY-NC 3.0)", - "ePersonId": 1, - "labelId": 1, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition":"https://lindat.mff.cuni.cz/repository/xmlui/page/license-lb", - "name": "Dictionary of Medieval Latin in the Czech Lands - digital version 2.2 License Agreement", - "ePersonId": 1, - "labelId": 2, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition":"https://lindat.mff.cuni.cz/repository/xmlui/page/license-cnc-data", - "name": "License Agreement for Czech National Corpus Data", - "ePersonId": 1, - "labelId": 2, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition":"https://lindat.mff.cuni.cz/repository/xmlui/page/license-NLPC-WeC", - "name": "NLP Centre Web Corpus License", - "ePersonId": 1, - "labelId": 2, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition":"https://lindat.mff.cuni.cz/repository/xmlui/page/licence-hamledt-2.0", - "name": "HamleD 2.0 Licence Agreement", - "ePersonId": 1, - "labelId": 2, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition":"https://lindat.mff.cuni.cz/repository/xmlui/page/licence-hamledt", - "name": "HamleD 1.0 Licence Agreement", - "ePersonId": 1, - "labelId": 2, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition":"https://lindat.mff.cuni.cz/repository/xmlui/page/license-cnc", - "name": "Czech National Corpus (Shuffled Corpus Data)", - "ePersonId": 1, - "labelId": 2, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition":"https://lindat.mff.cuni.cz/repository/xmlui/page/license-pdt2", - "name": "PDT 2.0 License", - "ePersonId": 1, - "labelId": 2, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition": "https://lindat.mff.cuni.cz/repository/xmlui/page/license-pcedt2", - "name": "CC-BY-NC-SA + LDC99T42", - "ePersonId": 1, - "labelId": 3, - "confirmation": 0, - "requiredInfo": "" - }, - { - "definition":"https://lindat.mff.cuni.cz/repository/xmlui/page/licence-pdtsl", - "name": "PDTSL", - "ePersonId": 1, - "labelId": 2, - "confirmation": 0, - "requiredInfo": "" - }, - { - "id": 68, - "definition":"https://lindat.mff.cuni.cz/repository/xmlui/page/license-PAWS", - "name": "PAWS License", - "ePersonId": 1, - "labelId": 3, - "confirmation": 0, - "requiredInfo": "" - } - ] - \ No newline at end of file diff --git a/python_data_import/import/data/license_labels.json b/python_data_import/import/data/license_labels.json deleted file mode 100644 index bc687e33e80..00000000000 --- a/python_data_import/import/data/license_labels.json +++ /dev/null @@ -1,98 +0,0 @@ -[ - { - "id": 1, - "label": "PUB", - "title": "Publicly Available", - "extended": false - }, - { - "id": 2, - "label": "ACA", - "title": "Academic Use", - "extended": false - }, - { - "id": 3, - "label": "RES", - "title": "Restricted Use", - "extended": false - }, - { - "id": 4, - "label": "CC", - "title": "Distributed under Creative Commons", - "extended": true - }, - { - "id": 5, - "label": "BY", - "title": "Attribution Required", - "extended": true - }, - { - "id": 6, - "label": "SA", - "title": "Share Alike", - "extended": true - }, - { - "id": 7, - "label": "NC", - "title": "Noncommercial", - "extended": true - }, - { - "id": 8, - "label": "ND", - "title": "No Derivative Works", - "extended": true - }, - { - "id": 9, - "label": "Inf", - "title": "Inform Before Use", - "extended": true - }, - { - "id": 10, - "label": "ReD", - "title": "Redeposit Modified", - "extended": true - }, - { - "id": 11, - "label": "ZERO", - "title": "No Copyright", - "extended": true - }, - { - "id": 12, - "label": "GPLv3", - "title": "GNU General Public License, version 3.0", - "extended": true - }, - { - "id": 13, - "label": "GPLv2", - "title": "GNU General Public License, version 2.0", - "extended": true - }, - { - "id": 14, - "label": "BSD", - "title": "BSD", - "extended": true - }, - { - "id": 15, - "label": "MIT", - "title": "The MIT License", - "extended": true - }, - { - "id": 16, - "label": "OSI", - "title": "The Open Source Initiative", - "extended": true - } -] \ No newline at end of file diff --git a/python_data_import/import_initial_data.py b/python_data_import/import_initial_data.py deleted file mode 100644 index f848ad10fc5..00000000000 --- a/python_data_import/import_initial_data.py +++ /dev/null @@ -1,15 +0,0 @@ -import sys -sys.path.insert(1, 'lib') -from support import logs - -orig = logs.write_to_console - -logs.write_to_console = True - -import import_license_labels_2_db -import import_licenses_2_db - -import_license_labels_2_db.import_license_labels() -import_licenses_2_db.import_licenses() - -logs.write_to_console = orig diff --git a/python_data_import/import_license_labels_2_db.py b/python_data_import/import_license_labels_2_db.py deleted file mode 100644 index b4b77ddc0b3..00000000000 --- a/python_data_import/import_license_labels_2_db.py +++ /dev/null @@ -1,41 +0,0 @@ -import json - -import const -from support.dspace_proxy import rest_proxy -from support.item_checking import import_license_label -from support.logs import log, Severity - - -def import_license_labels(): - log('Going to import license labels.') - # Opening JSON file - with open('import/data/license_labels.json') as json_file: - licenseLabelsJson = json.load(json_file) - lic_labels = {} - lic_respo = rest_proxy.d.api_get(const.API_URL + '/core/clarinlicenselabels?page=0&size=2000').json() - if const.EMBEDDED in lic_respo: - license_labels = lic_respo["_embedded"]["clarinlicenselabels"] - for lic in license_labels: - if lic["label"] in lic_labels: - log("DUPLICATE LABELS FOUND ON WEBSITE!!", Severity.WARN) - lic_labels[lic["label"]] = lic - - for licenseLabel in licenseLabelsJson: - if licenseLabel["label"] in lic_labels: - log(f"License label {licenseLabel['title']} was already imported; skipping.") - all_good = True - check_attrs = ["id", "title", "extended"] - original = licenseLabel - installed = lic_labels[licenseLabel["label"]] - for attr in check_attrs: - if original[attr] != installed[attr]: - log(f"bad value of {attr} for {licenseLabel['label']}: original {original[attr]};" - f" found on server: {installed[attr]}.", Severity.WARN) - all_good = False - if not all_good: - log("incorrectly imported icense label " + str(licenseLabel), Severity.WARN) - else: - import_license_label(licenseLabel["id"], licenseLabel["label"], licenseLabel["title"], licenseLabel["extended"]) - log(f'License label: {licenseLabel} imported!') - - diff --git a/python_data_import/import_licenses_2_db.py b/python_data_import/import_licenses_2_db.py deleted file mode 100644 index d3a897ec2a9..00000000000 --- a/python_data_import/import_licenses_2_db.py +++ /dev/null @@ -1,26 +0,0 @@ -import json - -import const -from support.dspace_proxy import rest_proxy -from support.item_checking import import_license -from support.logs import log - - -def import_licenses(): - log('Going to import licenses.') - # Opening JSON file - with open('import/data/license_definitions_v2.json') as json_file: - license_definitions = json.load(json_file) - lic_def = [] - lic_respo = rest_proxy.d.api_get(const.API_URL + '/core/clarinlicenses?page=0&size=2000').json() - if const.EMBEDDED in lic_respo: - licenses = lic_respo["_embedded"]["clarinlicenses"] - for lic in licenses: - lic_def.append(lic["definition"]) - for lic in license_definitions: - if lic["definition"] in lic_def: - log(lic["definition"] + " was already imported; skipping.") - continue - else: - import_license(lic["name"], lic["definition"], lic["labelId"], lic["confirmation"], lic["requiredInfo"]) - diff --git a/python_data_import/lib b/python_data_import/lib deleted file mode 160000 index a22159ab082..00000000000 --- a/python_data_import/lib +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a22159ab0829e8b0fd55ad43377fbadfc44ce29d diff --git a/src/app/bitstream-page/clarin-license-agreement-page/clarin-license-agreement-page.component.html b/src/app/bitstream-page/clarin-license-agreement-page/clarin-license-agreement-page.component.html index 5d9c4574583..b73952718d5 100644 --- a/src/app/bitstream-page/clarin-license-agreement-page/clarin-license-agreement-page.component.html +++ b/src/app/bitstream-page/clarin-license-agreement-page/clarin-license-agreement-page.component.html @@ -43,7 +43,7 @@