From 689d665c6ed531c7f01d2936e06cdcb842672ebb Mon Sep 17 00:00:00 2001 From: Jovanka Date: Tue, 17 Dec 2024 12:08:24 +0100 Subject: [PATCH] 0.3.5 (#6) * Update config, fix failing CI/CD (#4) * Update config settings if they are not setup in the ini file * Fix failing Github Actions - change docker user to root instead of ckan for CI/CD - use new docker images * Update README - change company information - text correction --------- Co-authored-by: Jovanka * New release (#5) * Update Readme * Add publiccode.yml * New release changes --------- Co-authored-by: Jovanka --------- Co-authored-by: Jovanka --- .github/workflows/test.yml | 31 ++++++--------- CHANGELOG.md | 6 +++ README.md | 4 +- ckanext/dcatde_berlin/plugin.py | 20 ++++++---- publiccode.yml | 68 +++++++++++++++++++++++++++++++++ 5 files changed, 101 insertions(+), 28 deletions(-) create mode 100644 publiccode.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6e5db92..1654649 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,34 +4,25 @@ 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-version: [2.9] - fail-fast: false + 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 }} + options: --user root 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 @@ -47,7 +38,9 @@ jobs: CKAN_REDIS_URL: redis://redis:6379/1 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 + - name: Install CURL + run: apt install curl -y - name: Install requirements run: | pip install -r dev-requirements.txt diff --git a/CHANGELOG.md b/CHANGELOG.md index c2bcca9..ec0d6c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ ## Development +## [0.3.5](https://github.com/berlinonline/ckanext-dcatde_berlin/releases/tag/0.3.5) + +- Update config settings (read from .ini file or use default value if the variable is not set) +- Add OpenCode publiccode.yml file +- Update Readme + ## [0.3.4](https://github.com/berlinonline/ckanext-dcatde_berlin/releases/tag/0.3.4) _(2023-05-19)_ diff --git a/README.md b/README.md index bbabe68..f205fb4 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# ckanext-berlindcatde_berlinath +# ckanext-dcatde_berlin [![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: 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 diff --git a/publiccode.yml b/publiccode.yml new file mode 100644 index 0000000..dcb67bd --- /dev/null +++ b/publiccode.yml @@ -0,0 +1,68 @@ +# This repository adheres to the publiccode.yml standard by including this +# metadata file that makes public software easily discoverable. +# More info at https://github.com/italia/publiccode.yml + +publiccodeYmlVersion: '0.2' +name: ckanext-dcatde_berlin +applicationSuite: CKAN +url: 'https://github.com/berlinonline/ckanext-dcatde_berlin' +releaseDate: '2018-07-12' +softwareVersion: 0.3.5 +developmentStatus: stable +platforms: + - web +softwareType: addon +isBasedOn: 'https://github.com/GovDataOfficial/ckanext-dcatde' +categories: + - knowledge-management + - it-development +maintenance: + type: internal + contacts: + - name: Dr. Knud Möller + email: knud.moeller@berlinonline.de +legal: + license: GPL-3.0-only + mainCopyrightOwner: BerlinOnline GmbH + repoOwner: BerlinOnline GmbH +localisation: + localisationReady: false + availableLanguages: + - en +description: + en: + genericName: ckanext-dcatde_berlin + documentation: 'https://github.com/berlinonline/ckanext-dcatde_berlin?' + shortDescription: >- + This plugin belongs to a set of plugins for the Datenregister – the + non-public CKAN instance that is part of Berlin's open data portal + daten.berlin.de + longDescription: > + This plugin belongs to a set of plugins for the _Datenregister_ – the + non-public [CKAN](https://ckan.org/) instance that is part of Berlin's + open data portal [daten.berlin.de](https://daten.berlin.de/). + + + `ckanext-dcatde\_berlin` pefines a profile `dcatap\_de` that needs to be + layered right on top of `euro\_dcat\_ap`, as defined in + [ckanext-dcat](https://github.com/ckan/ckanext-dcat). + + + `ckanext-dcatde\_berlin` draws heavily on + [ckanext-dcatde](https://github.com/GovDataOfficial/ckanext-dcatde), but + is separate, because the underlying CKAN schema isn't quite the same, and + because `ckanext-dcatde\_berlin` requires the CKAN DB to be converted + before it can be used. + + + The plugin implements the following CKAN interfaces: + + + - + [IBlueprint](http://docs.ckan.org/en/latest/extensions/plugin-interfaces.html#ckan.plugins.interfaces.IBlueprint) + + + ## Requirements + + + This plugin has been tested with CKAN 2.9.11 (which requires Python 3).