From b97fb24c7b25be01dcc38fea3c35c1c23e789d0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Moreira?= Date: Thu, 28 Mar 2024 19:24:47 +0100 Subject: [PATCH 01/46] Create release if not created by hand and only run on tag or release --- .github/workflows/release_wheel.yml | 99 ++++++++++++++++++++++------- 1 file changed, 77 insertions(+), 22 deletions(-) diff --git a/.github/workflows/release_wheel.yml b/.github/workflows/release_wheel.yml index ae10b9b..9549f89 100644 --- a/.github/workflows/release_wheel.yml +++ b/.github/workflows/release_wheel.yml @@ -1,19 +1,45 @@ name: Build and release wheel on: - push: - branches: - - "master" + push: tags: - '[0-9]+.[0-9]+.[0-9]+' - '[0-9]+.[0-9]+.[0-9]+rc[x0-9]+' - - '[0-9]+.[0-9]+.[0-9]+-rc[x0-9]+' + - '[0-9]+.[0-9]+.[0-9]+-rc[x0-9]+' + pull_request: + release: + types: [published] + workflow_dispatch: defaults: run: shell: bash jobs: + prepare: + name: "Prepare" + runs-on: ubuntu-22.04 + outputs: + version: ${{ steps.get_version.outputs.VERSION }} + create_release: ${{ steps.check_release.outputs.CREATE_RELEASE }} + steps: + - name: Get the version + id: get_version + run: echo "VERSION=${GITHUB_REF##*/}" >> $GITHUB_OUTPUT + - name: Check create release for tag + if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') + id: check_release + run: | + URL="https://api.github.com/repos/${{ github.repository }}/releases/tags/${{ steps.get_version.outputs.VERSION }}" + StatusCode=$(curl -o -I -L -s -w "%{http_code}" -X GET -G $URL) + if [ "$StatusCode" == 200 ]; then + echo "Release exists" + echo "CREATE_RELEASE=false" >> $GITHUB_OUTPUT + else + echo "Release does not exist" + echo "CREATE_RELEASE=true" >> $GITHUB_OUTPUT + fi build_wheel: + needs: [prepare] runs-on: ubuntu-22.04 steps: - name: Checkout @@ -22,22 +48,51 @@ jobs: run: | cd .. docker run -v ./Centre-Registry:/src -v ./whl:/whl registry.gitlab.com/clarin-eric/docker-alpine-wheeler:0.0.1-a6 - - name: Create release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.ref }} - release_name: ${{ github.ref }} - draft: false - prerelease: true - body_path: CHANGELOG.md - - name: Add to release - uses: shogo82148/actions-upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: 'Tar wheeler output' + run: tar -cvf workspace.tar /home/runner/work/Centre-Registry/whl/*.whl + - uses: actions/upload-artifact@v4 with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: /home/runner/work/Centre-Registry/whl/*.whl - asset_content_type: application/gzip + name: workspace + path: workspace.tar + retention-days: 1 + release: + name: "Release" + needs: [prepare, build_wheel] + # Run job for github releases and tag pushes (without github release) + if: github.event_name == 'release' || needs.prepare.outputs.create_release == 'true' + runs-on: ubuntu-22.04 + steps: + - name: 'Download workspace' + uses: actions/download-artifact@v4 + with: + name: workspace + - name: 'Untar workspace' + run: tar -xf workspace.tar + # For github releases -> upload release package to existing release + # For tag pushes without github release -> create a github release with release package + - name: Create release + if: needs.prepare.outputs.create_release == 'true' + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: ${{ github.ref }} + draft: false + prerelease: true + body_path: CHANGELOG.md + - uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + # Pseudo-ternary expression: get "upload_url" from the release created above, or from github "release" event when release is pre-created + upload_url: ${{ needs.prepare.outputs.create_release == 'true' && steps.create_release.outputs.upload_url || github.event.release.upload_url }} + asset_path: /home/runner/work/Centre-Registry/whl/*.whl + asset_content_type: application/gzip + - uses: eregon/publish-release@v1 + if: needs.prepare.outputs.create_release == 'true' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + release_id: ${{ steps.create_release.outputs.id }} From a0cf24592164d790f97150fd3a821081057f2c86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Moreira?= Date: Thu, 28 Mar 2024 19:30:34 +0100 Subject: [PATCH 02/46] Run github actions for every push to master branch --- .github/workflows/release_wheel.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release_wheel.yml b/.github/workflows/release_wheel.yml index 9549f89..8e65687 100644 --- a/.github/workflows/release_wheel.yml +++ b/.github/workflows/release_wheel.yml @@ -1,7 +1,9 @@ name: Build and release wheel on: - push: + push: + branches: + - "master" tags: - '[0-9]+.[0-9]+.[0-9]+' - '[0-9]+.[0-9]+.[0-9]+rc[x0-9]+' From 7766011f3a6e27e1494b96777a38451a41d19a19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Moreira?= Date: Thu, 28 Mar 2024 19:40:08 +0100 Subject: [PATCH 03/46] Fix upload-release-asset CI config --- .github/workflows/release_wheel.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release_wheel.yml b/.github/workflows/release_wheel.yml index 8e65687..b412dd6 100644 --- a/.github/workflows/release_wheel.yml +++ b/.github/workflows/release_wheel.yml @@ -84,7 +84,8 @@ jobs: draft: false prerelease: true body_path: CHANGELOG.md - - uses: actions/upload-release-asset@v1 + - name: Add to existing release + uses: shogo82148/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: From 3bfe8fdad787ba6d61e0692ee80cb8ff7086cfeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Moreira?= Date: Thu, 28 Mar 2024 19:43:22 +0100 Subject: [PATCH 04/46] Fix upload-release-asset CI config --- .github/workflows/release_wheel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release_wheel.yml b/.github/workflows/release_wheel.yml index b412dd6..ac87327 100644 --- a/.github/workflows/release_wheel.yml +++ b/.github/workflows/release_wheel.yml @@ -85,7 +85,7 @@ jobs: prerelease: true body_path: CHANGELOG.md - name: Add to existing release - uses: shogo82148/upload-release-asset@v1 + uses: shogo82148/actions-upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: From 7c6b50131eee9cec306474ff9358fb4e23d6e2db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Moreira?= Date: Thu, 28 Mar 2024 19:49:47 +0100 Subject: [PATCH 05/46] Remove leading / from asset path --- .github/workflows/release_wheel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release_wheel.yml b/.github/workflows/release_wheel.yml index ac87327..d18813d 100644 --- a/.github/workflows/release_wheel.yml +++ b/.github/workflows/release_wheel.yml @@ -91,7 +91,7 @@ jobs: with: # Pseudo-ternary expression: get "upload_url" from the release created above, or from github "release" event when release is pre-created upload_url: ${{ needs.prepare.outputs.create_release == 'true' && steps.create_release.outputs.upload_url || github.event.release.upload_url }} - asset_path: /home/runner/work/Centre-Registry/whl/*.whl + asset_path: home/runner/work/Centre-Registry/whl/*.whl asset_content_type: application/gzip - uses: eregon/publish-release@v1 if: needs.prepare.outputs.create_release == 'true' From 7b87bb1f5d5083791175f28e7df00d96e9e1b198 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Moreira?= Date: Thu, 28 Mar 2024 19:51:54 +0100 Subject: [PATCH 06/46] Make CI workspace untar verbose --- .github/workflows/release_wheel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release_wheel.yml b/.github/workflows/release_wheel.yml index d18813d..2bb57a6 100644 --- a/.github/workflows/release_wheel.yml +++ b/.github/workflows/release_wheel.yml @@ -69,7 +69,7 @@ jobs: with: name: workspace - name: 'Untar workspace' - run: tar -xf workspace.tar + run: tar -xvf workspace.tar # For github releases -> upload release package to existing release # For tag pushes without github release -> create a github release with release package - name: Create release From de80f9642cf5394e40ea9420bbdfeee69d31e8f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Moreira?= Date: Thu, 28 Mar 2024 20:01:00 +0100 Subject: [PATCH 07/46] Add CHANGELOG.md to workspace shared objects It is need for automatically created released from pushed tags --- .github/workflows/release_wheel.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release_wheel.yml b/.github/workflows/release_wheel.yml index 2bb57a6..04dfbbb 100644 --- a/.github/workflows/release_wheel.yml +++ b/.github/workflows/release_wheel.yml @@ -50,8 +50,8 @@ jobs: run: | cd .. docker run -v ./Centre-Registry:/src -v ./whl:/whl registry.gitlab.com/clarin-eric/docker-alpine-wheeler:0.0.1-a6 - - name: 'Tar wheeler output' - run: tar -cvf workspace.tar /home/runner/work/Centre-Registry/whl/*.whl + - name: 'Tar wheeler output and changelog' + run: tar -cvf workspace.tar /home/runner/work/Centre-Registry/whl/*.whl CHANGELOG.md - uses: actions/upload-artifact@v4 with: name: workspace From 3971119b19b67d8f5375c1d1363fdb9627a4ceee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Moreira?= Date: Thu, 28 Mar 2024 20:02:39 +0100 Subject: [PATCH 08/46] Add relative path prefix --- .github/workflows/release_wheel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release_wheel.yml b/.github/workflows/release_wheel.yml index 04dfbbb..2307747 100644 --- a/.github/workflows/release_wheel.yml +++ b/.github/workflows/release_wheel.yml @@ -51,7 +51,7 @@ jobs: cd .. docker run -v ./Centre-Registry:/src -v ./whl:/whl registry.gitlab.com/clarin-eric/docker-alpine-wheeler:0.0.1-a6 - name: 'Tar wheeler output and changelog' - run: tar -cvf workspace.tar /home/runner/work/Centre-Registry/whl/*.whl CHANGELOG.md + run: tar -cvf workspace.tar /home/runner/work/Centre-Registry/whl/*.whl ./CHANGELOG.md - uses: actions/upload-artifact@v4 with: name: workspace From 2b5e7a547cb28e1256e89b69c98c80279fe9f194 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Moreira?= Date: Thu, 28 Mar 2024 20:03:55 +0100 Subject: [PATCH 09/46] Debug commit --- .github/workflows/release_wheel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release_wheel.yml b/.github/workflows/release_wheel.yml index 2307747..551cd1d 100644 --- a/.github/workflows/release_wheel.yml +++ b/.github/workflows/release_wheel.yml @@ -51,7 +51,7 @@ jobs: cd .. docker run -v ./Centre-Registry:/src -v ./whl:/whl registry.gitlab.com/clarin-eric/docker-alpine-wheeler:0.0.1-a6 - name: 'Tar wheeler output and changelog' - run: tar -cvf workspace.tar /home/runner/work/Centre-Registry/whl/*.whl ./CHANGELOG.md + run: pwd && tar -cvf workspace.tar /home/runner/work/Centre-Registry/whl/*.whl ./CHANGELOG.md - uses: actions/upload-artifact@v4 with: name: workspace From ba4720c74ff504030183b1e0df6fb9ac9e62cf23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Moreira?= Date: Thu, 28 Mar 2024 20:06:40 +0100 Subject: [PATCH 10/46] Use relative paths --- .github/workflows/release_wheel.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release_wheel.yml b/.github/workflows/release_wheel.yml index 551cd1d..d3577c2 100644 --- a/.github/workflows/release_wheel.yml +++ b/.github/workflows/release_wheel.yml @@ -51,7 +51,7 @@ jobs: cd .. docker run -v ./Centre-Registry:/src -v ./whl:/whl registry.gitlab.com/clarin-eric/docker-alpine-wheeler:0.0.1-a6 - name: 'Tar wheeler output and changelog' - run: pwd && tar -cvf workspace.tar /home/runner/work/Centre-Registry/whl/*.whl ./CHANGELOG.md + run: tar -cvf workspace.tar ../whl/*.whl ./CHANGELOG.md - uses: actions/upload-artifact@v4 with: name: workspace @@ -91,7 +91,7 @@ jobs: with: # Pseudo-ternary expression: get "upload_url" from the release created above, or from github "release" event when release is pre-created upload_url: ${{ needs.prepare.outputs.create_release == 'true' && steps.create_release.outputs.upload_url || github.event.release.upload_url }} - asset_path: home/runner/work/Centre-Registry/whl/*.whl + asset_path: ./whl/*.whl asset_content_type: application/gzip - uses: eregon/publish-release@v1 if: needs.prepare.outputs.create_release == 'true' From 54fb522a4083d2c797ffd65dd4c47206ab89491f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Moreira?= Date: Thu, 28 Mar 2024 20:19:34 +0100 Subject: [PATCH 11/46] Replace deprecated action on node 16 --- .github/workflows/release_wheel.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release_wheel.yml b/.github/workflows/release_wheel.yml index d3577c2..11a61d1 100644 --- a/.github/workflows/release_wheel.yml +++ b/.github/workflows/release_wheel.yml @@ -75,15 +75,17 @@ jobs: - name: Create release if: needs.prepare.outputs.create_release == 'true' id: create_release - uses: actions/create-release@v1 + uses: ncipollo/release-action@v1 + permissions: + contents: write env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: ${{ github.ref }} - release_name: ${{ github.ref }} + tag: ${{ github.ref }} + name: ${{ github.ref }} draft: false prerelease: true - body_path: CHANGELOG.md + bodyFile: CHANGELOG.md - name: Add to existing release uses: shogo82148/actions-upload-release-asset@v1 env: From 74a0f188dff8e1d4b09619d55fbaf0b9474cccf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Moreira?= Date: Thu, 28 Mar 2024 20:21:11 +0100 Subject: [PATCH 12/46] Set permission in the right place --- .github/workflows/release_wheel.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release_wheel.yml b/.github/workflows/release_wheel.yml index 11a61d1..0f144f0 100644 --- a/.github/workflows/release_wheel.yml +++ b/.github/workflows/release_wheel.yml @@ -63,6 +63,8 @@ jobs: # Run job for github releases and tag pushes (without github release) if: github.event_name == 'release' || needs.prepare.outputs.create_release == 'true' runs-on: ubuntu-22.04 + permissions: + contents: write steps: - name: 'Download workspace' uses: actions/download-artifact@v4 @@ -76,8 +78,6 @@ jobs: if: needs.prepare.outputs.create_release == 'true' id: create_release uses: ncipollo/release-action@v1 - permissions: - contents: write env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: From e8d667cd920ecbfce2b60796bf9f36ab22ea1250 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Moreira?= Date: Thu, 28 Mar 2024 20:24:49 +0100 Subject: [PATCH 13/46] Let github action generate release tag and name --- .github/workflows/release_wheel.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/release_wheel.yml b/.github/workflows/release_wheel.yml index 0f144f0..3336c05 100644 --- a/.github/workflows/release_wheel.yml +++ b/.github/workflows/release_wheel.yml @@ -81,8 +81,6 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag: ${{ github.ref }} - name: ${{ github.ref }} draft: false prerelease: true bodyFile: CHANGELOG.md From 10dfbf9110faccf03b0396a809790e9afe6b4d17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Moreira?= Date: Thu, 28 Mar 2024 20:30:23 +0100 Subject: [PATCH 14/46] Use own computed version --- .github/workflows/release_wheel.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release_wheel.yml b/.github/workflows/release_wheel.yml index 3336c05..7e853b2 100644 --- a/.github/workflows/release_wheel.yml +++ b/.github/workflows/release_wheel.yml @@ -81,6 +81,8 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: + tag: ${{ needs.prepare.outputs.version }} + name: ${{ needs.prepare.outputs.version }} draft: false prerelease: true bodyFile: CHANGELOG.md From 6746c913e49144965645d95b1aeb1daf8a70a6d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Moreira?= Date: Thu, 28 Mar 2024 22:54:31 +0100 Subject: [PATCH 15/46] Dynamic wheel versioning --- .github/workflows/release_wheel.yml | 2 +- pyproject.toml | 17 +++++++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release_wheel.yml b/.github/workflows/release_wheel.yml index 7e853b2..ca4434c 100644 --- a/.github/workflows/release_wheel.yml +++ b/.github/workflows/release_wheel.yml @@ -49,7 +49,7 @@ jobs: - name: Build wheel run: | cd .. - docker run -v ./Centre-Registry:/src -v ./whl:/whl registry.gitlab.com/clarin-eric/docker-alpine-wheeler:0.0.1-a6 + docker run -v ./Centre-Registry:/src -v ./whl:/whl registry.gitlab.com/clarin-eric/docker-alpine-wheeler:0.0.1-a7 - name: 'Tar wheeler output and changelog' run: tar -cvf workspace.tar ../whl/*.whl ./CHANGELOG.md - uses: actions/upload-artifact@v4 diff --git a/pyproject.toml b/pyproject.toml index 5f30d22..9ba65bd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,6 +31,7 @@ python = '>=3.11.*,<4.0' Django = '4.2.11' django-debug-toolbar = '4.3.0' djangorestframework = '3.15.1' +poetry-dynamic-versioning = {extras = ["plugin"], version = "^1.2.0"} [tool.poetry.group.test.dependencies] lxml = '4.9.4' @@ -38,6 +39,18 @@ selenium = '4.19.0' jsonschema = '4.21.1' django-test-migrations = '1.3.0' +[tool.poetry-dynamic-versioning] +enable = true +vcs = "git" +pattern = "^(?P\\d+\\.\\d+\\.\\d+)(-?((?P[a-zA-Z]+)\\.?(?P\\d+)?))?" +format-jinja = """ + {%- if distance == 0 -%} + {{ base }}{{ stage }} + {%- else -%} + {{ base }}{{ stage }}{{ distance }}+{{commit}} + {%- endif -%} +""" + [build-system] -requires = ["poetry-core>=1.0.0"] -build-backend = "poetry.core.masonry.api" +requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning>=1.0.0,<2.0.0"] +build-backend = "poetry_dynamic_versioning.backend" From 069e861fbd18d475d4cbcbb9a3b17e73970c5a29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Moreira?= Date: Thu, 28 Mar 2024 23:05:13 +0100 Subject: [PATCH 16/46] Make sure wheel release version comforms to PEP440 style --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 9ba65bd..b569f89 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,9 +45,9 @@ vcs = "git" pattern = "^(?P\\d+\\.\\d+\\.\\d+)(-?((?P[a-zA-Z]+)\\.?(?P\\d+)?))?" format-jinja = """ {%- if distance == 0 -%} - {{ base }}{{ stage }} + {{ serialize_pep440(base, stage, revision) }} {%- else -%} - {{ base }}{{ stage }}{{ distance }}+{{commit}} + {{ serialize_pep440(base, stage, revision, dev=distance, metadata=[commit]) }} {%- endif -%} """ From eee4f3af9b985624ee006361d84fa4ca59a26c33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Moreira?= Date: Thu, 28 Mar 2024 23:20:19 +0100 Subject: [PATCH 17/46] Update wheeler image in github actions --- .github/workflows/release_wheel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release_wheel.yml b/.github/workflows/release_wheel.yml index ca4434c..40cab94 100644 --- a/.github/workflows/release_wheel.yml +++ b/.github/workflows/release_wheel.yml @@ -49,7 +49,7 @@ jobs: - name: Build wheel run: | cd .. - docker run -v ./Centre-Registry:/src -v ./whl:/whl registry.gitlab.com/clarin-eric/docker-alpine-wheeler:0.0.1-a7 + docker run -v ./Centre-Registry:/src -v ./whl:/whl registry.gitlab.com/clarin-eric/docker-alpine-wheeler:0.0.1-a8 - name: 'Tar wheeler output and changelog' run: tar -cvf workspace.tar ../whl/*.whl ./CHANGELOG.md - uses: actions/upload-artifact@v4 From 46c39c15a318190a0e035c0ccbc97064ac5536f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Moreira?= Date: Thu, 28 Mar 2024 23:27:42 +0100 Subject: [PATCH 18/46] Update wheeler image in github actions --- .github/workflows/release_wheel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release_wheel.yml b/.github/workflows/release_wheel.yml index 40cab94..d0e2c14 100644 --- a/.github/workflows/release_wheel.yml +++ b/.github/workflows/release_wheel.yml @@ -49,7 +49,7 @@ jobs: - name: Build wheel run: | cd .. - docker run -v ./Centre-Registry:/src -v ./whl:/whl registry.gitlab.com/clarin-eric/docker-alpine-wheeler:0.0.1-a8 + docker run -v ./Centre-Registry:/src -v ./whl:/whl registry.gitlab.com/clarin-eric/docker-alpine-wheeler:0.0.1-a9 - name: 'Tar wheeler output and changelog' run: tar -cvf workspace.tar ../whl/*.whl ./CHANGELOG.md - uses: actions/upload-artifact@v4 From 633811db4dfcf99bdea2d8690646539c130de5d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Moreira?= Date: Thu, 28 Mar 2024 23:30:57 +0100 Subject: [PATCH 19/46] Fetch tags in checkout action Needed for version computing --- .github/workflows/release_wheel.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release_wheel.yml b/.github/workflows/release_wheel.yml index d0e2c14..7a24cef 100644 --- a/.github/workflows/release_wheel.yml +++ b/.github/workflows/release_wheel.yml @@ -46,6 +46,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + with: + fetch-tags: true - name: Build wheel run: | cd .. From 9859e865d18eb2e918a3e56d11e2c8ca43f4152b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Moreira?= Date: Thu, 28 Mar 2024 23:33:07 +0100 Subject: [PATCH 20/46] Fetch the whole repo --- .github/workflows/release_wheel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release_wheel.yml b/.github/workflows/release_wheel.yml index 7a24cef..f8eaf32 100644 --- a/.github/workflows/release_wheel.yml +++ b/.github/workflows/release_wheel.yml @@ -47,7 +47,7 @@ jobs: - name: Checkout uses: actions/checkout@v4 with: - fetch-tags: true + fetch-depth: 0 - name: Build wheel run: | cd .. From b070faf2f289eb484283d828c45976aefc690d35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Moreira?= Date: Thu, 28 Mar 2024 23:43:41 +0100 Subject: [PATCH 21/46] Update wheeler image in github actions --- .github/workflows/release_wheel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release_wheel.yml b/.github/workflows/release_wheel.yml index f8eaf32..fbc07ab 100644 --- a/.github/workflows/release_wheel.yml +++ b/.github/workflows/release_wheel.yml @@ -51,7 +51,7 @@ jobs: - name: Build wheel run: | cd .. - docker run -v ./Centre-Registry:/src -v ./whl:/whl registry.gitlab.com/clarin-eric/docker-alpine-wheeler:0.0.1-a9 + docker run -v ./Centre-Registry:/src -v ./whl:/whl registry.gitlab.com/clarin-eric/docker-alpine-wheeler:0.0.1-a10 - name: 'Tar wheeler output and changelog' run: tar -cvf workspace.tar ../whl/*.whl ./CHANGELOG.md - uses: actions/upload-artifact@v4 From 1da8762b6aa7c2c770d6880c7ab2a6d2830cb4f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Moreira?= Date: Thu, 28 Mar 2024 23:46:22 +0100 Subject: [PATCH 22/46] Set default version to 0.0.0dev This is overriden by the poetry-dynamic-versioning plugin --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b569f89..c385e9b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [tool.poetry] name = "clarin_centre_registry" description = "CLARIN Centre Registry Django project configuration" -version = "3.0.1-rc" +version = "0.0.0dev" license = "../LICENSE.txt" authors = [ "Beatriz Sanchez Bribian", From 0f58eab01bcea80da8df2baf6e7741c64869184e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Moreira?= Date: Wed, 3 Apr 2024 14:34:34 +0200 Subject: [PATCH 23/46] Remove poetry-dynamic-versioning plugin from project dependencies --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c385e9b..ca62d5e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,7 +31,6 @@ python = '>=3.11.*,<4.0' Django = '4.2.11' django-debug-toolbar = '4.3.0' djangorestframework = '3.15.1' -poetry-dynamic-versioning = {extras = ["plugin"], version = "^1.2.0"} [tool.poetry.group.test.dependencies] lxml = '4.9.4' From 2bf5fe3996cbf4509f90c1389b7ede800dce7816 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Moreira?= Date: Wed, 3 Apr 2024 14:53:42 +0200 Subject: [PATCH 24/46] Serialize assessmentdates in /api/all_centres_full rest response --- centre-registry-app/centre_registry/serializers.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/centre-registry-app/centre_registry/serializers.py b/centre-registry-app/centre_registry/serializers.py index 7cff52a..1fddeaa 100644 --- a/centre-registry-app/centre_registry/serializers.py +++ b/centre-registry-app/centre_registry/serializers.py @@ -30,6 +30,11 @@ class Meta: model = Organisation fields = '__all__' +class AssessmentDatesSerializer(serializers.ModelSerializer): + class Meta: + model = AssessmentDates + fields = '__all__' + class CentreSerializer(serializers.ModelSerializer): type = CentreTypeSerializer(many=True) @@ -38,6 +43,7 @@ class CentreSerializer(serializers.ModelSerializer): monitoring_contacts = ContactSerializer(many=True) consortium = ConsortiumSerializer() organisation_fk = OrganisationSerializer() + assessmentdates = AssessmentDatesSerializer() class Meta: model = Centre From e55ba5e047dc1dbbf6646c854fbd2b6f1d67dd74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Moreira?= Date: Wed, 3 Apr 2024 15:05:11 +0200 Subject: [PATCH 25/46] Deprecate trac in build metadata --- Centre-Registry-config/pyproject.toml | 3 +-- centre-registry-app/pyproject.toml | 3 +-- pyproject.toml | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Centre-Registry-config/pyproject.toml b/Centre-Registry-config/pyproject.toml index 05da36a..926f67c 100644 --- a/Centre-Registry-config/pyproject.toml +++ b/Centre-Registry-config/pyproject.toml @@ -14,14 +14,13 @@ maintainers = [ "Andre Moreira ", "" ] - packages = [ { include = "centre_registry_project" }, ] [tool.poetry.urls] changelog = "https://github.com/clarin-eric/Centre-Registry/blob/master/LICENSE.txt" -documentation = "https://trac.clarin.eu/wiki/Centre%20Registry" +documentation = "https://github.com/clarin-eric/Centre-Registry/" homepage = "https://centres.clarin.eu/" repository = "https://github.com/clarin-eric/Centre-Registry/" diff --git a/centre-registry-app/pyproject.toml b/centre-registry-app/pyproject.toml index 0287510..e88a7a0 100644 --- a/centre-registry-app/pyproject.toml +++ b/centre-registry-app/pyproject.toml @@ -18,10 +18,9 @@ packages = [ { include = "centre_registry" }, ] - [tool.poetry.urls] changelog = "https://github.com/clarin-eric/Centre-Registry/blob/master/LICENSE.txt" -documentation = "https://trac.clarin.eu/wiki/Centre%20Registry" +documentation = "https://github.com/clarin-eric/Centre-Registry/" homepage = "https://centres.clarin.eu/" repository = "https://github.com/clarin-eric/Centre-Registry/" diff --git a/pyproject.toml b/pyproject.toml index ca62d5e..5158ebc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,6 @@ maintainers = [ "Andre Moreira ", "" ] - packages = [ { include = "centre_registry_project", from = "Centre-Registry-config" }, { include = "centre_registry", from = "centre-registry-app" }, @@ -22,7 +21,7 @@ packages = [ [tool.poetry.urls] changelog = "https://github.com/clarin-eric/Centre-Registry/blob/master/LICENSE.txt" -documentation = "https://trac.clarin.eu/wiki/Centre%20Registry" +documentation = "https://github.com/clarin-eric/Centre-Registry/" homepage = "https://centres.clarin.eu/" repository = "https://github.com/clarin-eric/Centre-Registry/" From 9052559816eab02794c73e4a8e880824798b9722 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Moreira?= Date: Wed, 3 Apr 2024 15:05:46 +0200 Subject: [PATCH 26/46] Upgrade lxml to 5.2.1 --- centre-registry-app/pyproject.toml | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/centre-registry-app/pyproject.toml b/centre-registry-app/pyproject.toml index e88a7a0..47a0148 100644 --- a/centre-registry-app/pyproject.toml +++ b/centre-registry-app/pyproject.toml @@ -31,7 +31,7 @@ django-debug-toolbar = '4.3.0' djangorestframework = '3.15.1' [tool.poetry.group.test.dependencies] -lxml = '4.9.4' +lxml = '5.2.1' selenium = '4.19.0' jsonschema = '4.21.1' django-test-migrations = '1.3.0' diff --git a/pyproject.toml b/pyproject.toml index 5158ebc..d115d22 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,7 +32,7 @@ django-debug-toolbar = '4.3.0' djangorestframework = '3.15.1' [tool.poetry.group.test.dependencies] -lxml = '4.9.4' +lxml = '5.2.1' selenium = '4.19.0' jsonschema = '4.21.1' django-test-migrations = '1.3.0' From 30a440aa99277a477f24260a0552c47557cbcdbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Moreira?= Date: Wed, 3 Apr 2024 15:10:31 +0200 Subject: [PATCH 27/46] Add import for AssessmentDates --- centre-registry-app/centre_registry/serializers.py | 1 + 1 file changed, 1 insertion(+) diff --git a/centre-registry-app/centre_registry/serializers.py b/centre-registry-app/centre_registry/serializers.py index 1fddeaa..a6cc72c 100644 --- a/centre-registry-app/centre_registry/serializers.py +++ b/centre-registry-app/centre_registry/serializers.py @@ -1,5 +1,6 @@ from rest_framework import serializers +from centre_registry.models import AssessmentDates from centre_registry.models import Centre from centre_registry.models import CentreType from centre_registry.models import Contact From 87b142e47d823b62b8dbe88ee24cc19e1d89d848 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Moreira?= Date: Wed, 3 Apr 2024 15:22:26 +0200 Subject: [PATCH 28/46] Update lxml new version in changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dfa21ca..649cd8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ - Django 4.1.11 to Django 4.2.11 - django-debug-toolbar 4.2.0 to 4.3.0 - Jsonschema 4.19.1 to 4.21.1 - - lxml 4.9.3 to 4.9.4 + - lxml 4.9.3 to 5.2.1 - Selenium 4.13.0 to 4.19.0 - Added dependency on djangorestframework 3.15.1 From cb332440693082d2ec100632590f97b86bc74154 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Moreira?= Date: Wed, 3 Apr 2024 15:50:16 +0200 Subject: [PATCH 29/46] Update available /api/model calls in docs --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3f505e2..237335d 100644 --- a/README.md +++ b/README.md @@ -13,8 +13,8 @@ Gives a KML file (Keyhole Markup) with geographical information about Centres of use in mapping applications. For example: `api/KML/EBC` `api/model/M`, where M is one of the models in the administration interface `CentreType`, -`Centre`, `Contact`, `Consortium`, `FCSEndpoint`, `URLReference`, `MetadataFormat`, -`OAIPMHEndpoint`, `SAMLIdentityFederation`, `SAMLServiceProvider`: +`Centre`, `Contact`, `Consortium`, `FCSEndpoint`, `URLReference`, `Organisation`, +`OAIPMHEndpoint`, `OAIPMHEndpointSet`, `SAMLIdentityFederation`, `SAMLServiceProvider`: Gives a JSON representation of all data belonging to that model in the database. `api/all_centres_full`, for all Centres of any type with fully expanded relations into values From dd6c8aea27aa56769bb06f22f2b9494423822980 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Moreira?= Date: Wed, 3 Apr 2024 16:31:31 +0200 Subject: [PATCH 30/46] Set many=True for AssessmentDatesSerializer --- centre-registry-app/centre_registry/serializers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/centre-registry-app/centre_registry/serializers.py b/centre-registry-app/centre_registry/serializers.py index a6cc72c..c6d3c95 100644 --- a/centre-registry-app/centre_registry/serializers.py +++ b/centre-registry-app/centre_registry/serializers.py @@ -44,7 +44,7 @@ class CentreSerializer(serializers.ModelSerializer): monitoring_contacts = ContactSerializer(many=True) consortium = ConsortiumSerializer() organisation_fk = OrganisationSerializer() - assessmentdates = AssessmentDatesSerializer() + assessmentdates = AssessmentDatesSerializer(many=True) class Meta: model = Centre From 23f0610ccc63c94179bbfb70fcd92fa2ff9ff30a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Moreira?= Date: Mon, 22 Apr 2024 16:21:20 +0200 Subject: [PATCH 31/46] Serialize "type" and remove "id" fields from assessment dates serialization --- centre-registry-app/centre_registry/serializers.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/centre-registry-app/centre_registry/serializers.py b/centre-registry-app/centre_registry/serializers.py index c6d3c95..5a5e18e 100644 --- a/centre-registry-app/centre_registry/serializers.py +++ b/centre-registry-app/centre_registry/serializers.py @@ -11,8 +11,7 @@ class CentreTypeSerializer(serializers.ModelSerializer): class Meta: model = CentreType - fields = '__all__' - + fields = ['type'] class ContactSerializer(serializers.ModelSerializer): class Meta: @@ -32,9 +31,11 @@ class Meta: fields = '__all__' class AssessmentDatesSerializer(serializers.ModelSerializer): + type = CentreTypeSerializer(many=True) + class Meta: model = AssessmentDates - fields = '__all__' + exclude = ['id'] class CentreSerializer(serializers.ModelSerializer): From fa2cd3de330990e92c5cd3c7c634fab32ea29d8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Moreira?= Date: Mon, 22 Apr 2024 18:01:28 +0200 Subject: [PATCH 32/46] Fix latitude validation --- centre-registry-app/centre_registry/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/centre-registry-app/centre_registry/models.py b/centre-registry-app/centre_registry/models.py index 6c55a82..fccad4e 100644 --- a/centre-registry-app/centre_registry/models.py +++ b/centre-registry-app/centre_registry/models.py @@ -33,7 +33,7 @@ def is_valid_latitude(latitude): def validate_latitude(latitude): try: - if is_valid_longitude(parse_decimal_degree(latitude)): + if is_valid_latitude(parse_decimal_degree(latitude)): return except Exception as exception: raise ValidationError( From 84fcab2553e122290b79975244d429ac80f737eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Moreira?= Date: Mon, 22 Apr 2024 22:09:16 +0200 Subject: [PATCH 33/46] Fix coordinates validation logic and allow up to 18 decimal places --- centre-registry-app/centre_registry/models.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/centre-registry-app/centre_registry/models.py b/centre-registry-app/centre_registry/models.py index fccad4e..78afadf 100644 --- a/centre-registry-app/centre_registry/models.py +++ b/centre-registry-app/centre_registry/models.py @@ -14,11 +14,16 @@ from django.db.models import CASCADE, PROTECT, SET_NULL, SET_DEFAULT, SET, DO_NOTHING +def raise_coordinate_validation_error(coordinate, exception): + raise ValidationError( + '{0} is not a valid Decimal Degree coordinate. '.format( + str(coordinate))) from exception + def parse_decimal_degree(degree): """ Extracts a float decimal degree from a string. """ - return re_match(r'^[+\-]{0,1}[0-9]{1,3}\.[0-9]{1,8}$', degree).group(0) + return re_match(r'^[+\-]{0,1}[0-9]{1,3}\.[0-9]{1,18}$', degree).group(0) def is_valid_longitude(longitude): @@ -35,17 +40,20 @@ def validate_latitude(latitude): try: if is_valid_latitude(parse_decimal_degree(latitude)): return + else: + raise_coordinate_validation_error(latitude) except Exception as exception: - raise ValidationError( - '{0} is not a valid Decimal Degree latitude. '.format( - str(latitude))) from exception + raise_coordinate_validation_error(latitude, exception) def validate_longitude(longitude): try: if is_valid_longitude(parse_decimal_degree(longitude)): return - except Exception as exception:import ast + else: + raise_coordinate_validation_error(longitude) + except Exception as exception: + raise_coordinate_validation_error(longitude, exception) class Contact(Model): From f8d94e989895acaa013e1af2f5c968224bb9ea2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Moreira?= Date: Mon, 22 Apr 2024 22:12:33 +0200 Subject: [PATCH 34/46] Code style fix --- centre-registry-app/centre_registry/models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/centre-registry-app/centre_registry/models.py b/centre-registry-app/centre_registry/models.py index 78afadf..f605c76 100644 --- a/centre-registry-app/centre_registry/models.py +++ b/centre-registry-app/centre_registry/models.py @@ -19,6 +19,7 @@ def raise_coordinate_validation_error(coordinate, exception): '{0} is not a valid Decimal Degree coordinate. '.format( str(coordinate))) from exception + def parse_decimal_degree(degree): """ Extracts a float decimal degree from a string. From 171d2e5949c6b47a85bc76a16b74583409016278 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Moreira?= Date: Wed, 24 Apr 2024 10:42:09 +0200 Subject: [PATCH 35/46] Remove version declaration from submodule poetry metadata --- Centre-Registry-config/pyproject.toml | 3 +-- centre-registry-app/pyproject.toml | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Centre-Registry-config/pyproject.toml b/Centre-Registry-config/pyproject.toml index 926f67c..3837b36 100644 --- a/Centre-Registry-config/pyproject.toml +++ b/Centre-Registry-config/pyproject.toml @@ -1,7 +1,6 @@ [tool.poetry] name = "Centre-Registry-config" description = "CLARIN Centre Registry Django project configuration" -version = "3.0.1" license = "../LICENSE.txt" authors = [ "Beatriz Sanchez Bribian", @@ -29,4 +28,4 @@ requires = ["poetry-core>=1.0.0"] build-backend = "poetry.core.masonry.api" [tool.poetry.dependencies] -centre-registry-app = "3.0.1" +centre-registry-app = ">=3.0.*" diff --git a/centre-registry-app/pyproject.toml b/centre-registry-app/pyproject.toml index 47a0148..a08c61e 100644 --- a/centre-registry-app/pyproject.toml +++ b/centre-registry-app/pyproject.toml @@ -1,7 +1,6 @@ [tool.poetry] name = "centre_registry_app" description = "CLARIN Centre Registry, a Django application. " -version = "3.0.1" license = "../LICENSE.txt" authors = [ "Beatriz Sanchez Bribian", From 7501cbed05b9fdf1b5fc74ca50eaa03ed92486ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Moreira?= Date: Wed, 24 Apr 2024 10:44:41 +0200 Subject: [PATCH 36/46] Update CHANGELOG.md --- CHANGELOG.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 649cd8f..fb2246c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,13 +1,14 @@ # Changelog -## [3.0.1] - 28.03.2024 +## [3.0.1] - 24.04.2024 ### New features +- `api/all_centres_full` endpoint for CLARIN website - project root `.pytoml` building Centre Registry packages (`centre-registry-app`; `Centre-Registry-config`) into a single package - `.whl` build and distribution via release -- `api/all_centres_full` endpoint for main website consumption ### Changed features +- Fixed validation of geographical coordinates on administration interface. #79 - Updated dependencies: - Django 4.1.11 to Django 4.2.11 - django-debug-toolbar 4.2.0 to 4.3.0 From 87c280c834e34dff4deb5711b41370ca987d1b5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Moreira?= Date: Wed, 24 Apr 2024 10:52:46 +0200 Subject: [PATCH 37/46] Updated travis CI install command --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ce9bf74..f29a270 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,7 +39,7 @@ env: addons: sauce_connect: true install: - - pip install -e 'centre-registry-app/' + - pip install -e . - pip install -r 'centre-registry-app/requirements_test.txt' script: - Centre-Registry-config/manage.py migrate From edca7587253f58c3dea0cf0d6c669b1007afa9fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Moreira?= Date: Wed, 24 Apr 2024 11:00:31 +0200 Subject: [PATCH 38/46] Remove duplicated dependency declaration Dependencies are declared in the respective submodules .toml files --- pyproject.toml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index d115d22..e084b55 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,18 +25,6 @@ documentation = "https://github.com/clarin-eric/Centre-Registry/" homepage = "https://centres.clarin.eu/" repository = "https://github.com/clarin-eric/Centre-Registry/" -[tool.poetry.dependencies] -python = '>=3.11.*,<4.0' -Django = '4.2.11' -django-debug-toolbar = '4.3.0' -djangorestframework = '3.15.1' - -[tool.poetry.group.test.dependencies] -lxml = '5.2.1' -selenium = '4.19.0' -jsonschema = '4.21.1' -django-test-migrations = '1.3.0' - [tool.poetry-dynamic-versioning] enable = true vcs = "git" From c5895431222eaba6ffea0235444f49491fbd8bf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Moreira?= Date: Wed, 24 Apr 2024 11:09:35 +0200 Subject: [PATCH 39/46] Revert "Remove duplicated dependency declaration" This reverts commit edca7587253f58c3dea0cf0d6c669b1007afa9fc. --- pyproject.toml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index e084b55..d115d22 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,6 +25,18 @@ documentation = "https://github.com/clarin-eric/Centre-Registry/" homepage = "https://centres.clarin.eu/" repository = "https://github.com/clarin-eric/Centre-Registry/" +[tool.poetry.dependencies] +python = '>=3.11.*,<4.0' +Django = '4.2.11' +django-debug-toolbar = '4.3.0' +djangorestframework = '3.15.1' + +[tool.poetry.group.test.dependencies] +lxml = '5.2.1' +selenium = '4.19.0' +jsonschema = '4.21.1' +django-test-migrations = '1.3.0' + [tool.poetry-dynamic-versioning] enable = true vcs = "git" From 28a7916bd8364fa702c49d3eda4d4e76e7aee4c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Moreira?= Date: Wed, 24 Apr 2024 10:52:46 +0200 Subject: [PATCH 40/46] Updated travis CI install command --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ce9bf74..f29a270 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,7 +39,7 @@ env: addons: sauce_connect: true install: - - pip install -e 'centre-registry-app/' + - pip install -e . - pip install -r 'centre-registry-app/requirements_test.txt' script: - Centre-Registry-config/manage.py migrate From 5cd2d98d7e51579ba4516782fca1210c060263ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Moreira?= Date: Wed, 24 Apr 2024 11:00:31 +0200 Subject: [PATCH 41/46] Remove duplicated dependency declaration Dependencies are declared in the respective submodules .toml files --- pyproject.toml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index d115d22..e084b55 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,18 +25,6 @@ documentation = "https://github.com/clarin-eric/Centre-Registry/" homepage = "https://centres.clarin.eu/" repository = "https://github.com/clarin-eric/Centre-Registry/" -[tool.poetry.dependencies] -python = '>=3.11.*,<4.0' -Django = '4.2.11' -django-debug-toolbar = '4.3.0' -djangorestframework = '3.15.1' - -[tool.poetry.group.test.dependencies] -lxml = '5.2.1' -selenium = '4.19.0' -jsonschema = '4.21.1' -django-test-migrations = '1.3.0' - [tool.poetry-dynamic-versioning] enable = true vcs = "git" From 861873c300e91c69f5e4557a417f4387eafb4b65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Moreira?= Date: Wed, 24 Apr 2024 11:09:35 +0200 Subject: [PATCH 42/46] Revert "Remove duplicated dependency declaration" This reverts commit edca7587253f58c3dea0cf0d6c669b1007afa9fc. --- pyproject.toml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index e084b55..d115d22 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,6 +25,18 @@ documentation = "https://github.com/clarin-eric/Centre-Registry/" homepage = "https://centres.clarin.eu/" repository = "https://github.com/clarin-eric/Centre-Registry/" +[tool.poetry.dependencies] +python = '>=3.11.*,<4.0' +Django = '4.2.11' +django-debug-toolbar = '4.3.0' +djangorestframework = '3.15.1' + +[tool.poetry.group.test.dependencies] +lxml = '5.2.1' +selenium = '4.19.0' +jsonschema = '4.21.1' +django-test-migrations = '1.3.0' + [tool.poetry-dynamic-versioning] enable = true vcs = "git" From 298f7cdc6bbc4626afd12aa850091c2c32d22138 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Moreira?= Date: Wed, 24 Apr 2024 12:47:43 +0200 Subject: [PATCH 43/46] Revert "Remove version declaration from submodule poetry metadata" This reverts commit 171d2e5949c6b47a85bc76a16b74583409016278. --- Centre-Registry-config/pyproject.toml | 3 ++- centre-registry-app/pyproject.toml | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Centre-Registry-config/pyproject.toml b/Centre-Registry-config/pyproject.toml index 3837b36..926f67c 100644 --- a/Centre-Registry-config/pyproject.toml +++ b/Centre-Registry-config/pyproject.toml @@ -1,6 +1,7 @@ [tool.poetry] name = "Centre-Registry-config" description = "CLARIN Centre Registry Django project configuration" +version = "3.0.1" license = "../LICENSE.txt" authors = [ "Beatriz Sanchez Bribian", @@ -28,4 +29,4 @@ requires = ["poetry-core>=1.0.0"] build-backend = "poetry.core.masonry.api" [tool.poetry.dependencies] -centre-registry-app = ">=3.0.*" +centre-registry-app = "3.0.1" diff --git a/centre-registry-app/pyproject.toml b/centre-registry-app/pyproject.toml index a08c61e..47a0148 100644 --- a/centre-registry-app/pyproject.toml +++ b/centre-registry-app/pyproject.toml @@ -1,6 +1,7 @@ [tool.poetry] name = "centre_registry_app" description = "CLARIN Centre Registry, a Django application. " +version = "3.0.1" license = "../LICENSE.txt" authors = [ "Beatriz Sanchez Bribian", From 27f1fd619621734a1bb29d6cc52e093a06f67767 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Moreira?= Date: Wed, 24 Apr 2024 12:48:05 +0200 Subject: [PATCH 44/46] Revert "Updated travis CI install command" This reverts commit 87c280c834e34dff4deb5711b41370ca987d1b5c. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f29a270..ce9bf74 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,7 +39,7 @@ env: addons: sauce_connect: true install: - - pip install -e . + - pip install -e 'centre-registry-app/' - pip install -r 'centre-registry-app/requirements_test.txt' script: - Centre-Registry-config/manage.py migrate From 3dcf0a4e40e8affa0c1d67c40ca0762679f2f43a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Moreira?= Date: Wed, 24 Apr 2024 10:44:41 +0200 Subject: [PATCH 45/46] Update CHANGELOG.md --- CHANGELOG.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 649cd8f..fb2246c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,13 +1,14 @@ # Changelog -## [3.0.1] - 28.03.2024 +## [3.0.1] - 24.04.2024 ### New features +- `api/all_centres_full` endpoint for CLARIN website - project root `.pytoml` building Centre Registry packages (`centre-registry-app`; `Centre-Registry-config`) into a single package - `.whl` build and distribution via release -- `api/all_centres_full` endpoint for main website consumption ### Changed features +- Fixed validation of geographical coordinates on administration interface. #79 - Updated dependencies: - Django 4.1.11 to Django 4.2.11 - django-debug-toolbar 4.2.0 to 4.3.0 From 70111057dc4e84f9f3b96a1feaa12c4840c00f33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Moreira?= Date: Thu, 25 Apr 2024 11:21:08 +0200 Subject: [PATCH 46/46] Update release day in changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fb2246c..aa44ad0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## [3.0.1] - 24.04.2024 +## [3.0.1] - 25.04.2024 ### New features - `api/all_centres_full` endpoint for CLARIN website