Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update - CKAN 2.10 compatibility and UI/Schemas/Profiles improvements #104

Merged
merged 83 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
49c4d24
Fix translated_fields generation
mjanez Aug 1, 2024
2128d6c
Fix file_size in resource metadata info
mjanez Aug 1, 2024
2da1c1f
Add form tabs to dataset creation/editing datasets/resources
mjanez Aug 4, 2024
9bb1e8d
Merge branch 'main' into feature/dcat-ap-schemas
mjanez Aug 4, 2024
0e63426
Improve schema geodcat_ap_es to include form_tabs
mjanez Aug 4, 2024
f980580
form_tabs_allowed is not optional
mjanez Aug 4, 2024
34aedfb
Updated schema names and improved validators
mjanez Aug 14, 2024
d949571
Add ckanext-dcat custom profiles
mjanez Aug 22, 2024
8f0e6f3
Add SHACL tests for custom profiles
mjanez Aug 22, 2024
bb9f4fd
Fix F821 undefined name
mjanez Aug 22, 2024
b5dc788
Update test.ini
mjanez Aug 22, 2024
e1e488c
Add deprecated decorator to mark functions as deprecated
mjanez Aug 22, 2024
f3f655f
Refactor dataset graph
mjanez Aug 22, 2024
617d3ee
Update ckan DCAT-AP JSON samples
mjanez Aug 22, 2024
d062580
Refactor access rights handling in EuDCATAPProfile
mjanez Aug 22, 2024
2184aad
Add reference and representation_type
mjanez Aug 22, 2024
5091c67
Fix test error, add harvest to plugins
mjanez Aug 22, 2024
3ff0417
Fix test_shacl
mjanez Aug 22, 2024
af0710a
FIx test_shacl & update example ckan datasets
mjanez Aug 22, 2024
a29d367
Refactor test command to include logging level in pytest for ckanext.…
mjanez Aug 22, 2024
5d9a305
Refactor test command to use correct utils in pytest for ckanext.sche…
mjanez Aug 22, 2024
ba289eb
Refactor test command to include fluent plugin in tests
mjanez Aug 22, 2024
ce772ba
Refactor access rights handling in EU DCAT-AP profile
mjanez Aug 22, 2024
e635d71
Todo legacy datasets
mjanez Aug 22, 2024
2b4ddad
FIx shacl file path to include version subdir
mjanez Aug 22, 2024
13d12eb
Refactor GitHub Actions workflow to only trigger on pull requests
mjanez Aug 22, 2024
3eb49e7
Include harvest plugin in tests
mjanez Aug 22, 2024
29f80bd
Improve error reporting in SHACL validation tests using pytest.fail
mjanez Aug 22, 2024
f1841e8
Refactor test_shacl.py to simplify error reporting
mjanez Aug 22, 2024
0b2d0cc
Fix rights bug
mjanez Aug 22, 2024
75a45bd
Fix eu_dcat_ap profile
mjanez Aug 23, 2024
7a51f3d
Improve es_dcat (NTI-RISP) Profile
mjanez Aug 23, 2024
dcd144e
FIx templates with new profiles
mjanez Aug 23, 2024
2386bc7
Refactor field mapping in SchemingDCATHarvester
mjanez Aug 23, 2024
ff4de2c
Add codelists for DCAT profiles
mjanez Aug 23, 2024
5c183ac
Add conftest.py for testing with clean database
mjanez Aug 27, 2024
9b16a8f
Add docker-compose tests
mjanez Aug 27, 2024
4b5c4b7
Merge pull request #100 from mjanez/feature/docker-tests
mjanez Aug 27, 2024
c294495
Fix search and index to ensure proper functionality
mjanez Sep 10, 2024
7fb647a
Improve profiles and add DCAT-AP/GeoDCAT-AP 3
mjanez Sep 10, 2024
0d6559b
Improve schemas to align names with ckanext-dcat
mjanez Sep 16, 2024
8cb65ff
Improve profiles and add DCAT-AP 3
mjanez Sep 16, 2024
4810b07
Improve general UI, Home
mjanez Sep 16, 2024
ef76bb3
Update package/resource forms to Tabs
mjanez Sep 16, 2024
4dca2e4
Improve i18n and icons
mjanez Sep 16, 2024
c7aabef
Fix and improve templates for CKAN 2.10
mjanez Sep 16, 2024
f358203
Fix fa icons for license/social templates
mjanez Sep 16, 2024
7c303d9
Fix before_update
mjanez Sep 16, 2024
fdf55e8
Improve package_item.html template
mjanez Sep 16, 2024
a344aec
Improve base admin config template
mjanez Sep 16, 2024
006078e
Update configuration and add stats init to plugin
mjanez Sep 16, 2024
3da105a
Refactor code to remove debug logging statements
mjanez Sep 16, 2024
6954453
Refactor download metadata template and improve metadata profiles
mjanez Sep 16, 2024
0ffa59e
Improve metadata_info and profile badges
mjanez Sep 16, 2024
c4d131b
Refactor new_source_form.html to use Bootstrap 5 data attributes
mjanez Sep 16, 2024
e136909
Add docs and templates for harvesters
mjanez Sep 16, 2024
69e04f3
Add xls_template_config
mjanez Sep 16, 2024
66dc66d
Improve style to improve header language selector dropdown menu
mjanez Sep 16, 2024
1af58e1
Fix tabs slug-preview and dataset-map
mjanez Sep 16, 2024
fb8abf6
Fix Solr indexing by converting dict fields to JSON strings
mjanez Sep 18, 2024
e3bb1ee
Update open data stats: Skip statistics update during DB initializati…
mjanez Sep 18, 2024
0cbb625
Improve form tabs
mjanez Sep 18, 2024
448113e
Fix package snippets
mjanez Sep 18, 2024
4b10208
Fix organization create/edit button bugs
mjanez Sep 18, 2024
3026467
Fix spatial_query snippet bugs
mjanez Sep 18, 2024
2c02458
Fix xloader logs styles for 2.10
mjanez Sep 18, 2024
50945d0
Fix tags containers
mjanez Sep 18, 2024
537504c
Improve datastore/data api and downloads templates
mjanez Sep 18, 2024
767fa65
Update version to 4.0.0
mjanez Sep 19, 2024
bac0862
Fix xloader logs styles for 2.10
mjanez Sep 19, 2024
6dc1e4c
Improve about_themes.html template to conditionally render theme cards
mjanez Sep 19, 2024
f2a0ed8
Improve tests
mjanez Sep 19, 2024
ddc4de6
Removed unnecessary data-bs attributes for custom slug-preview module
mjanez Sep 20, 2024
fcec54b
Fix api button accordions
mjanez Sep 20, 2024
eefdcac
Add highlighting and quote alerts
mjanez Sep 20, 2024
53f9dc1
Improve admin pages
mjanez Sep 20, 2024
8f22343
Include Update Internationalization (i18n) Files guide
mjanez Sep 20, 2024
1e504ca
Update i18n files and templates for internationalization support
mjanez Sep 20, 2024
32300b8
Refactor social account configuration in SchemingDCATPlugin
mjanez Sep 20, 2024
4bfcea4
Update test to use custom ckan-solr image
mjanez Sep 21, 2024
e3d81ff
Update CKAN version to 2.10 in Test dockerfile
mjanez Sep 21, 2024
5cd2bef
Improve README images
mjanez Sep 22, 2024
3a68063
Merge pull request #101 from mjanez/feature/2.10-update
mjanez Sep 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
omit =
*/site-packages/*
*/python?.?/*
ckan/*
ckan/*
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
build
dist
*.egg-info/
20 changes: 0 additions & 20 deletions .github/workflows/flake8.yml

This file was deleted.

75 changes: 50 additions & 25 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
name: schemingdcat-test
run-name: ${{ github.actor }} probando schemingdcat-test
on: [workflow_dispatch]
name: Tests
env:
COLUMNS: 120
on: [pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
python-version: '3.9'
- name: Install requirements
run: pip install flake8 pycodestyle
- name: Check syntax
Expand All @@ -18,15 +19,23 @@ jobs:
needs: lint
strategy:
matrix:
ckan-version: ["2.10", 2.9]
include:
- ckan-version: "2.11"
ckan-image: "ckan/ckan-dev:2.11-py3.10"
- ckan-version: "2.10"
ckan-image: "ckan/ckan-dev:2.10-py3.10"
- ckan-version: "2.9"
ckan-image: "ckan/ckan-dev:2.9-py3.9"
fail-fast: false

name: CKAN ${{ matrix.ckan-version }}
runs-on: ubuntu-latest
container:
image: openknowledge/ckan-dev:${{ matrix.ckan-version }}
image: ${{ matrix.ckan-image }}
services:
solr:
image: ckan/ckan-solr:${{ matrix.ckan-version }}
# Custom image with spatial support and advanced schema
image: ghcr.io/mjanez/ckan-solr:2.10-solr9-spatial
postgres:
image: ckan/ckan-postgres-dev:${{ matrix.ckan-version }}
env:
Expand All @@ -35,7 +44,7 @@ jobs:
POSTGRES_DB: postgres
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
redis:
image: redis:3
image: redis:7-alpine
env:
CKAN_SQLALCHEMY_URL: postgresql://ckan_default:pass@postgres/ckan_test
CKAN_DATASTORE_WRITE_URL: postgresql://datastore_write:pass@postgres/datastore_test
Expand All @@ -44,25 +53,41 @@ jobs:
CKAN_REDIS_URL: redis://redis:6379/1

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3
with:
repository: mjanez/ckanext-scheming
- name: Install requirements
- uses: actions/checkout@v4
- name: Install requirements (common)
run: |
pwd
echo $GITHUB_WORKSPACE
ls -al $GITHUB_WORKSPACE
pip install --upgrade pip
pip install -r requirements.txt
pip install -r dev-requirements.txt
pip install -e .
# Replace default path to CKAN core config file with the one on the container
sed -i -e 's/use = config:.*/use = config:\/srv\/app\/src\/ckan\/test-core.ini/' test.ini
sed -i -e 's/use = config:.*/use = config:\/srv\/app\/src\/ckan\/test-core.ini/' test_subclass.ini
- name: Install requirements (2.9)
run: |
pip install -U pytest-rerunfailures
if: ${{ matrix.ckan-version == '2.9' }}
- name: Setup other extensions
run: |
# Install ckanext-dcat
git clone https://github.com/mjanez/ckanext-dcat
pip install -e ckanext-dcat
pip install -r ckanext-dcat/requirements.txt

# Install ckanext-harvest
git clone https://github.com/ckan/ckanext-harvest
pip install -e ckanext-harvest
pip install -r ckanext-harvest/requirements.txt

# Install ckanext-scheming
git clone https://github.com/ckan/ckanext-scheming
pip install -e ckanext-scheming

# Install ckanext-fluent
git clone https://github.com/mjanez/ckanext-fluent
pip install -e ckanext-fluent

- name: Setup extension
run: |
pip install -r test-requirements.txt
ckan -c test.ini db init
- name: Run all tests
run: pytest --ckan-ini=test.ini --cov=ckanext.scheming ckanext/scheming/tests
- name: Run plugin subclassing tests
run: pytest --ckan-ini=test_subclass.ini ckanext/scheming/tests/test_dataset_display.py ckanext/scheming/tests/test_form.py::TestDatasetFormNew ckanext/scheming/tests/test_dataset_logic.py
ckan -c test.ini db pending-migrations --apply
- name: Run tests
run: pytest --log-cli-level=INFO --ckan-ini=test.ini --cov=ckanext.schemingdcat --cov-report=term-missing --cov-append --disable-warnings ckanext/schemingdcat/tests
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
.ropeproject
node_modules
**/node_modules/
bower_components
.vscode
.idea
*.log

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*.pyc
.pytest_cache

# C extensions
*.so
Expand Down Expand Up @@ -52,3 +57,9 @@ docs/_build/
ckanext/schemingdcat/i18n/tools/output/*
ckanext/schemingdcat/i18n/tools/input/*
ckanext/schemingdcat/i18n/tools/input/input.yaml

# custom harvesters
doc/harvesters/*_config.json
!doc/harvesters/ckan_template_config.json
!doc/harvesters/xls_template_config.json
!doc/harvesters/csw_template_config.json
50 changes: 49 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,54 @@
# Changelog

## [Unreleased](https://github.com/ckan/ckanext-dcat/compare/v3.2.1...HEAD)
## [Unreleased](https://github.com/ckan/ckanext-dcat/compare/v4.0.0...HEAD)

## [v4.0.0](https://github.com/mjanez/ckanext-schemingdcat/compare/v4.0.0...v3.2.2) - 2024-09-18
* Fix search and index to ensure proper functionality by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/c294495
* Improve profiles and add DCAT-AP/GeoDCAT-AP 3 by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/7fb647a
* Bug - CKAN 2.10 - Fix request.args() #41 by @mjanez
* Develop feature/form-tabs #87 by @mjanez
* DCAT - Custom DCAT-AP/GeoDCAT-AP (ES/EU) profiles in schemingdcat #93 by @mjanez
* Schema - Transform contact, publisher, author and maintainer to list of dicts (repeating subfields) #95 by @mjanez
* Enhanced DCAT-AP profiles to ensure MQA DCAT-AP compliance #99 by @mjanez
* Feature - Fix tests #22 by @mjanez
* Improve schemas to align names with ckanext-dcat by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/0d6559b
* Improve profiles and add DCAT-AP 3 by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/8cb65ff
* Improve general UI, Home by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/4810b07
* Update package/resource forms to Tabs by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/ef76bb3
* Improve i18n and icons by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/4dca2e4
* Fix and improve templates for CKAN 2.10 by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/c7aabef
* Fix fa icons for license/social templates by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/f358203
* Fix before_update by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/7c303d9
* Improve package_item.html template by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/fdf55e8
* Improve base admin config template by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/a344aec
* Update configuration and add stats init to plugin by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/006078e
* Refactor code to remove debug logging statements by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/3da105a
* Refactor download metadata template and improve metadata profiles by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/6954453
* Improve metadata_info and profile badges by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/0ffa59e
* Refactor new_source_form.html to use Bootstrap 5 data attributes by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/c4d131b
* Add docs and templates for harvesters by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/e136909
* Add xls_template_config by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/69e04f3
* Improve style to improve header language selector dropdown menu by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/66dc66d
* New DCAT-AP/GeoDCAT-AP Schemas and DCAT Profiles & Form tabs for datasets/resources #97 by @mjanez
* Fix tabs slug-preview and dataset-map by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/1af58e1
* Fix Solr indexing by converting dict fields to JSON strings by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/fb8abf6
* Update open data stats: Skip statistics update during DB initialization by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/e3bb1ee
* Improve form tabs by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/0cbb625
* Fix package snippets by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/448113e
* Fix organization create/edit button bugs by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/4b10208
* Fix spatial_query snippet bugs by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/3026467
* Fix xloader logs styles for 2.10 by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/2c02458
* Fix tags containers by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/commit/50945d0
* Improve datastore/data api and downloads templates by @mjanez

## [v3.2.2](https://github.com/mjanez/ckanext-schemingdcat/compare/v3.2.2...v3.2.1) - 2024-08-28
* Feature/ckan harvester improve by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/pull/86
* Update v3.2.2 by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/pull/85
* Fix bug when schemingdcat.endpoints_yaml is None by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/pull/89
* Feature/ckan harvester improve by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/pull/90
* Fix harvester by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/pull/91
* Add allow_private_datasets to ckan harvester by @mjanez in https://github.com/mjanez/ckanext-schemingdcat/pull/98
* Fixed bugs with localised_filesize snippet 43cc8b025e6e7574dad952b1a6b680a4a66dbcff

## [v3.2.0](https://github.com/mjanez/ckanext-schemingdcat/compare/v3.2.1...v3.2.0) - 2024-05-17
* Enhance harvester, field mapping validation lib and harvest templates #81
Expand Down
Loading
Loading