From 88b9de1e9d27d8f624fe6860282e0ae29ac13163 Mon Sep 17 00:00:00 2001 From: Jovanka Date: Tue, 14 May 2024 16:17:39 +0200 Subject: [PATCH 01/15] Update config settings if they are not setup in the ini file --- ckanext/dcatde_berlin/plugin.py | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/ckanext/dcatde_berlin/plugin.py b/ckanext/dcatde_berlin/plugin.py index aacd347..c977af6 100644 --- a/ckanext/dcatde_berlin/plugin.py +++ b/ckanext/dcatde_berlin/plugin.py @@ -15,13 +15,19 @@ class Dcatde_BerlinPlugin(plugins.SingletonPlugin): # Implementation IConfigurer # ------------------------------------------------------------------- - def update_config(self, config): - config['ckanext.dcat.enable_content_negotiation'] = True - config['ckanext.dcat.rdf.profiles'] = 'euro_dcat_ap dcatap_de' - config['ckanext.dcatde.contributorid'] = 'berlinOpenData' - config['ckanext.dcatde.version'] = '1.0.1' - config['ckanext.dcatde_berlin.formats'] = 'ttl xml jsonld' - config['ckanext.dcatde_berlin.additional_endpoints'] = f'/{no_fisbroker_blueprint.CATALOG_ENDPOINT_PATH}' + def update_config(self, config): + config['ckanext.dcat.enable_content_negotiation'] = config.get( + 'ckanext.dcat.enable_content_negotiation', True) + config['ckanext.dcat.rdf.profiles'] = config.get( + 'ckanext.dcat.rdf.profiles', 'euro_dcat_ap dcatap_de') + config['ckanext.dcatde.contributorid'] = config.get( + 'ckanext.dcatde.contributorid','berlinOpenData') + config['ckanext.dcatde.version'] = config.get( + 'ckanext.dcatde.version', '1.0.1') + config['ckanext.dcatde_berlin.formats'] = config.get( + 'ckanext.dcatde_berlin.formats', 'ttl xml jsonld rdf') + config['ckanext.dcatde_berlin.additional_endpoints'] = config.get( + 'ckanext.dcatde_berlin.additional_endpoints', f'/{no_fisbroker_blueprint.CATALOG_ENDPOINT_PATH}') # ------------------------------------------------------------------- # Implementation IBlueprint From 69eb811169372f69cf589e24d5f7a5cca3f3633e Mon Sep 17 00:00:00 2001 From: Jovanka Date: Tue, 29 Oct 2024 10:09:00 +0100 Subject: [PATCH 02/15] Add Changelog message --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c2bcca9..7553187 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Development +- Update config settings (read from .ini file or use default value if the variable is not set) + ## [0.3.4](https://github.com/berlinonline/ckanext-dcatde_berlin/releases/tag/0.3.4) _(2023-05-19)_ From a664cb2736aac09802e34f032e4e9bee504ca185 Mon Sep 17 00:00:00 2001 From: Jovanka Date: Tue, 29 Oct 2024 10:14:05 +0100 Subject: [PATCH 03/15] Fix failing Github Actions --- .github/workflows/test.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6e5db92..2fe9805 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,18 +20,20 @@ jobs: # needs: lint strategy: matrix: - ckan-version: [2.9] + ckan-base-version: [2.9] + ckan-version: [py3.9] + solr-version: [solr8] fail-fast: false - name: CKAN ${{ matrix.ckan-version }} + name: CKAN ${{ matrix.ckan-base-version }} runs-on: ubuntu-latest container: - image: openknowledge/ckan-dev:${{ matrix.ckan-version }} + image: ckan/ckan-dev:${{ matrix.ckan-base-version }}-${{ matrix.ckan-version }} services: solr: - image: ckan/ckan-solr-dev:${{ matrix.ckan-version }} + image: ckan/ckan-solr:${{ matrix.ckan-base-version }}-${{ matrix.solr-version }} postgres: - image: ckan/ckan-postgres-dev:${{ matrix.ckan-version }} + image: ckan/ckan-postgres-dev:${{ matrix.ckan-base-version }} env: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres From f57d75eaccf51a03427883076c84a4683f568ce2 Mon Sep 17 00:00:00 2001 From: Jovanka Date: Tue, 29 Oct 2024 10:40:00 +0100 Subject: [PATCH 04/15] Pin setuptools==44.1.0 --- .github/workflows/test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2fe9805..03c5dbc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -50,8 +50,11 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Install CURL + run: apt install curl -y - name: Install requirements run: | + pip install setuptools==44.1.0 pip install -r dev-requirements.txt pip install -e . # Replace default path to CKAN core config file with the one on the container From 2d4257f4ad669e6609a1c796088d474e6256d2fa Mon Sep 17 00:00:00 2001 From: Jovanka Date: Tue, 29 Oct 2024 10:47:40 +0100 Subject: [PATCH 05/15] fix step for installing setuptools --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 03c5dbc..c3e6eb9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -52,9 +52,10 @@ jobs: - uses: actions/checkout@v2 - name: Install CURL run: apt install curl -y + - name: Install specific setuptools version (44.1.0) + run: pip install setuptools==44.1.0 - name: Install requirements run: | - pip install setuptools==44.1.0 pip install -r dev-requirements.txt pip install -e . # Replace default path to CKAN core config file with the one on the container From 2106d5df79578e99ea7183dccefa69e964e2ef67 Mon Sep 17 00:00:00 2001 From: Jovanka Date: Tue, 29 Oct 2024 10:55:36 +0100 Subject: [PATCH 06/15] Pin pip to 22.0.4 --- .github/workflows/test.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c3e6eb9..51a8dfa 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -52,8 +52,10 @@ jobs: - uses: actions/checkout@v2 - name: Install CURL run: apt install curl -y - - name: Install specific setuptools version (44.1.0) - run: pip install setuptools==44.1.0 + - name: Install specific pip(22.0.4) && setuptools version (44.1.0) + run: | + pip install pip==22.0.4 + pip install setuptools==44.1.0 - name: Install requirements run: | pip install -r dev-requirements.txt From 730fadb59174144ff84f55b63f5efc1b92f8f8be Mon Sep 17 00:00:00 2001 From: Jovanka Date: Tue, 29 Oct 2024 11:24:10 +0100 Subject: [PATCH 07/15] try new docker tag --- .github/workflows/test.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 51a8dfa..1acf712 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -28,7 +28,7 @@ jobs: name: CKAN ${{ matrix.ckan-base-version }} runs-on: ubuntu-latest container: - image: ckan/ckan-dev:${{ matrix.ckan-base-version }}-${{ matrix.ckan-version }} + image: ckan/ckan-dev:${{ matrix.ckan-base-version }} services: solr: image: ckan/ckan-solr:${{ matrix.ckan-base-version }}-${{ matrix.solr-version }} @@ -52,10 +52,6 @@ jobs: - uses: actions/checkout@v2 - name: Install CURL run: apt install curl -y - - name: Install specific pip(22.0.4) && setuptools version (44.1.0) - run: | - pip install pip==22.0.4 - pip install setuptools==44.1.0 - name: Install requirements run: | pip install -r dev-requirements.txt From 9d19be79bc445fa19237cc2add844d8c13343c8b Mon Sep 17 00:00:00 2001 From: Jovanka Date: Fri, 1 Nov 2024 11:07:11 +0100 Subject: [PATCH 08/15] install curl --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1acf712..7741ab7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,7 +26,7 @@ jobs: fail-fast: false name: CKAN ${{ matrix.ckan-base-version }} - runs-on: ubuntu-latest + runs-on: alpine-latest container: image: ckan/ckan-dev:${{ matrix.ckan-base-version }} services: @@ -51,7 +51,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Install CURL - run: apt install curl -y + run: apk install curl -y - name: Install requirements run: | pip install -r dev-requirements.txt From 2f5b5bd57b01b49a39040032b663c75e661e98d4 Mon Sep 17 00:00:00 2001 From: Jovanka Date: Tue, 5 Nov 2024 11:54:01 +0100 Subject: [PATCH 09/15] fix runs on --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7741ab7..ec04e0d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,7 +26,7 @@ jobs: fail-fast: false name: CKAN ${{ matrix.ckan-base-version }} - runs-on: alpine-latest + runs-on: ubuntu-latest container: image: ckan/ckan-dev:${{ matrix.ckan-base-version }} services: From 2ecf6bea454c2c805ec815d29b0298e4ccaf1779 Mon Sep 17 00:00:00 2001 From: Jovanka Date: Tue, 10 Dec 2024 12:15:38 +0100 Subject: [PATCH 10/15] Update README - change company information - text correction --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index bbabe68..6d69eac 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# ckanext-berlindcatde_berlinath +# ckanext-berlindcatde [![Tests](https://github.com/berlinonline/ckanext-dcatde_berlin/workflows/Tests/badge.svg?branch=master)](https://github.com/berlinonline/ckanext-dcatde_berlin/actions) [![Code Coverage](http://codecov.io/github/berlinonline/ckanext-dcatde_berlin/coverage.svg?branch=master)](http://codecov.io/github/berlinonline/ckanext-dcatde_berlin?branch=master) @@ -20,7 +20,7 @@ This plugin has been tested with CKAN 2.9.5 (which requires Python 3). ## License -This material is copyright © [BerlinOnline Stadtportal GmbH & Co. KG](https://www.berlinonline.net/). +This material is copyright © [BerlinOnline Stadtportal GmbH](https://www.berlinonline.net/). This extension is open and licensed under the GNU Affero General Public License (AGPL) v3.0. Its full text may be found at: From 9c1e804e4315a15b8a79293e16c3735fe1447e6f Mon Sep 17 00:00:00 2001 From: Jovanka Date: Tue, 10 Dec 2024 12:20:51 +0100 Subject: [PATCH 11/15] change docker images --- .github/workflows/test.yml | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ec04e0d..7130597 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,31 +4,18 @@ on: branches: - '**' jobs: - # lint: - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v2 - # - uses: actions/setup-python@v2 - # with: - # python-version: '3.6' - # - name: Install requirements - # run: pip install flake8 pycodestyle - # - name: Check syntax - # run: flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics --exclude ckan - test: # needs: lint - strategy: - matrix: - ckan-base-version: [2.9] - ckan-version: [py3.9] - solr-version: [solr8] - fail-fast: false + matrix: + ckan-base-version: [2.9] + ckan-version: [py3.9] + solr-version: [solr8] + fail-fast: false name: CKAN ${{ matrix.ckan-base-version }} runs-on: ubuntu-latest container: - image: ckan/ckan-dev:${{ matrix.ckan-base-version }} + image: ckan/ckan-dev:${{ matrix.ckan-base-version }}-${{ matrix.ckan-version }} services: solr: image: ckan/ckan-solr:${{ matrix.ckan-base-version }}-${{ matrix.solr-version }} @@ -50,8 +37,6 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Install CURL - run: apk install curl -y - name: Install requirements run: | pip install -r dev-requirements.txt From 9edb774ecbab48ce2e10c2a8a5c89842d893373a Mon Sep 17 00:00:00 2001 From: Jovanka Date: Tue, 10 Dec 2024 12:22:54 +0100 Subject: [PATCH 12/15] fix indent --- .github/workflows/test.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7130597..84f2838 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,11 +6,12 @@ on: jobs: test: # needs: lint - matrix: - ckan-base-version: [2.9] - ckan-version: [py3.9] - solr-version: [solr8] - fail-fast: false + strategy: + matrix: + ckan-base-version: [2.9] + ckan-version: [py3.9] + solr-version: [solr8] + fail-fast: false name: CKAN ${{ matrix.ckan-base-version }} runs-on: ubuntu-latest From f30a97717b5e9026148f6e4287c5a32cdf026196 Mon Sep 17 00:00:00 2001 From: Jovanka Date: Tue, 10 Dec 2024 12:31:01 +0100 Subject: [PATCH 13/15] change checkout version and install curl --- .github/workflows/test.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 84f2838..6ac7e51 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,7 +11,7 @@ jobs: ckan-base-version: [2.9] ckan-version: [py3.9] solr-version: [solr8] - fail-fast: false + fail-fast: false name: CKAN ${{ matrix.ckan-base-version }} runs-on: ubuntu-latest @@ -37,7 +37,9 @@ jobs: CKAN_REDIS_URL: redis://redis:6379/1 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 + - name: Install CURL + run: apk install curl -y - name: Install requirements run: | pip install -r dev-requirements.txt From fca9145ebf7cb8964802803e1b993ec8d321743e Mon Sep 17 00:00:00 2001 From: Jovanka Date: Wed, 11 Dec 2024 11:17:37 +0100 Subject: [PATCH 14/15] Change docker user to root instead of ckan for CI/CD --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6ac7e51..48f5ee0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,6 +17,7 @@ jobs: runs-on: ubuntu-latest container: image: ckan/ckan-dev:${{ matrix.ckan-base-version }}-${{ matrix.ckan-version }} + options: --user root services: solr: image: ckan/ckan-solr:${{ matrix.ckan-base-version }}-${{ matrix.solr-version }} From 6e9f8d0aee673dec7dc74c11e61e8b1a6b1eba08 Mon Sep 17 00:00:00 2001 From: Jovanka Date: Wed, 11 Dec 2024 11:24:23 +0100 Subject: [PATCH 15/15] fix installing curl --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 48f5ee0..1654649 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -40,7 +40,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Install CURL - run: apk install curl -y + run: apt install curl -y - name: Install requirements run: | pip install -r dev-requirements.txt