Skip to content

Commit

Permalink
Merge pull request #162 from GSA/ckan-210
Browse files Browse the repository at this point in the history
CKAN 2.10 + Cypress 12.10.0
  • Loading branch information
nickumia-reisys authored Jul 18, 2023
2 parents 4f27427 + 5efb291 commit fdfe725
Show file tree
Hide file tree
Showing 37 changed files with 409 additions and 149 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
uses: gsa/data.gov/.github/workflows/ckan-test.yml@main
with:
ext_name: datagovtheme
plugins: harvest datagovtheme
plugins: harvest datagovtheme geodatagov
secrets: inherit

ui-test:
Expand Down
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ syntax: glob
.vscode/

# Cypress
e2e/cypress/videos/*
e2e/cypress/screenshots/*
e2e/cypress/results/output.xml
cypress/e2e/videos/*
cypress/e2e/screenshots/*
cypress/e2e/results/output.xml
node_modules
package-lock.json
package-lock.json
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
ARG CKAN_VERSION=2.9
ARG CKAN_VERSION=2.10.1
FROM openknowledge/ckan-dev:${CKAN_VERSION}
ARG CKAN_VERSION

# Add timezone data if it does not exist
RUN if [[ "${CKAN_VERSION}" = "2.9" ]]; then sudo apk add tzdata; fi
# Add timezone data
RUN sudo apk add tzdata

COPY . $APP_DIR/
# WORKDIR /app

RUN pip install -r $APP_DIR/requirements.txt -r $APP_DIR/dev-requirements.txt -e $APP_DIR/.
5 changes: 4 additions & 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 All @@ -17,6 +17,9 @@ test: ## Run extension tests
ui-test:
CKAN_VERSION=$(CKAN_VERSION) docker-compose -f $(COMPOSE_FILE) -f docker-compose.test.yml up --abort-on-container-exit test

ui-interactive:
CYPRESS_BASE_URL=http://ckan:5000 npx cypress open

up: ## Start the containers
CKAN_VERSION=$(CKAN_VERSION) docker-compose -f $(COMPOSE_FILE) up

Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ This extension is compatible with these versions of CKAN.
CKAN version | Compatibility
------------ | -------------
<=2.8 | no
2.9 | yes
2.9 | 0.1.27 (last supported)
2.10 | >=0.2.0


### Configuration
Expand Down Expand Up @@ -115,10 +116,10 @@ In order to support multiple versions of CKAN, or even upgrade to new versions
of CKAN, we support development and testing through the `CKAN_VERSION`
environment variable.

$ make CKAN_VERSION=2.9 test
$ make CKAN_VERSION=2.10 test


Variable | Description | Default
-------- | ----------- | -------
CKAN_VERSION | Version of CKAN to use. | 2.9
CKAN_VERSION | Version of CKAN to use. | 2.10
COMPOSE_FILE | docker-compose service description file. | docker-compose.yml
6 changes: 2 additions & 4 deletions ckanext/datagovtheme/blueprint.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
from future import standard_library
standard_library.install_aliases()

import urllib.parse
import ckan.plugins as p
from ckan.plugins.toolkit import config
from ckan.lib.base import c, request, abort
from ckan.lib.base import abort
from ckan.common import c, request

from flask import Blueprint, redirect

Expand Down
Loading

0 comments on commit fdfe725

Please sign in to comment.