Skip to content
This repository has been archived by the owner on Oct 18, 2023. It is now read-only.

Commit

Permalink
Merge pull request #12 from GSA/ckan-2.10
Browse files Browse the repository at this point in the history
CKAN 2.10
  • Loading branch information
FuhuXia authored Jul 19, 2023
2 parents f3d644e + 0a2b4cb commit 275b142
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG CKAN_VERSION=2.9
ARG CKAN_VERSION=2.10
FROM openknowledge/ckan-dev:${CKAN_VERSION}
ARG CKAN_VERSION

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CKAN_VERSION ?= 2.9
CKAN_VERSION ?= 2.10
COMPOSE_FILE ?= docker-compose.yml

build: ## Build the docker containers
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@ A CKAN extension to display metrics about harvest sources.
- CSV Export: A comprehensive table of all harvest sources
- JSON Export: CSV raw data plus a second key `table_data_by_org` that includes the same data grouped by organization

Compatibility: Tested with CKAN 2.9, though it's expected to work with earlier versions compatible with ckanext-report.
This extension is compatible with these versions of CKAN.

CKAN version | Compatibility
------------ | -------------
<=2.8 | ???
2.9 | yes
2.10 | yes

## Usage

Expand Down
12 changes: 6 additions & 6 deletions ckanext/metrics_dashboard/tests/test_reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def test_get_harvest_results(self, app):
assert results['table_data_by_org'][organization['name']
]['total_datasets'] == 0
assert results['table_data_by_org'][organization['name']
]['organization_title'] == 'Test Organization'
]['organization_title'] == organization['display_name']

# test table data
assert len(results['table']) == 1
Expand All @@ -95,7 +95,7 @@ def test_get_harvest_results(self, app):
assert table['state'] == 'active'
assert table['frequency'] == 'MANUAL'
assert table['organization_name'] == 'myorg'
assert table['organization_title'] == 'Test Organization'
assert table['organization_title'] == organization['display_name']
assert table['job_count'] == 1
assert table['total_datasets'] == 0

Expand All @@ -114,7 +114,7 @@ def test_get_harvest_results_with_org(self, app):
assert results['table_data_by_org'][organization['name']
]['total_datasets'] == 0
assert results['table_data_by_org'][organization['name']
]['organization_title'] == 'Test Organization'
]['organization_title'] == organization['display_name']

# assert that table_data_by_org contains same entry as table
TestCase().assertDictEqual(results['table_data_by_org']['myorg']['packages'][0],
Expand All @@ -128,7 +128,7 @@ def test_get_harvest_results_with_org(self, app):
assert table['state'] == 'active'
assert table['frequency'] == 'MANUAL'
assert table['organization_name'] == 'myorg'
assert table['organization_title'] == 'Test Organization'
assert table['organization_title'] == organization['display_name']
assert table['job_count'] == 1
assert table['total_datasets'] == 0

Expand All @@ -147,7 +147,7 @@ def test_get_harvest_results_with_no_harvest_job(self, app):
assert results['table_data_by_org'][organization['name']
]['total_datasets'] == 0
assert results['table_data_by_org'][organization['name']
]['organization_title'] == 'Test Organization'
]['organization_title'] == organization['display_name']

# test table data
assert len(results['table']) == 1
Expand All @@ -157,7 +157,7 @@ def test_get_harvest_results_with_no_harvest_job(self, app):
assert table['state'] == 'active'
assert table['frequency'] == 'MANUAL'
assert table['organization_name'] == 'myorg'
assert table['organization_title'] == 'Test Organization'
assert table['organization_title'] == organization['display_name']
assert table['job_count'] == 0
assert table['total_datasets'] == 0
assert table['last_job_added'] == 'N/A'
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ services:
redis:
image: redis
solr:
image: ckan/ckan-solr-dev:${CKAN_VERSION}
image: ckan/ckan-solr-dev:2.9
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
-e git+https://github.com/ckan/ckanext-report.git@master#egg=ckanext-report
-e git+https://github.com/ckan/ckanext-harvest.git#egg=ckanext-harvest

ckanext-datagovtheme
ckanext-datagovtheme>=0.2.1
ckanext-datajson>=0.1.5

# ckan harvest dependencies
Expand Down

0 comments on commit 275b142

Please sign in to comment.