Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
8d901c0
Refactor plugin class
pdelboca Feb 14, 2023
4d96646
Sanitize blueprint endpoints.
pdelboca Feb 14, 2023
3708a99
Drop code checking for older versions
pdelboca Feb 14, 2023
da8e0ee
Remove old controller class
pdelboca Feb 14, 2023
48185b2
Do not run tests in not supported versions
pdelboca Feb 14, 2023
20f9ab1
Drop pylons route support in templates
pdelboca Feb 14, 2023
e12a275
Migrate static logic to assets
pdelboca Feb 14, 2023
ac1ec04
Fix search endpoint
pdelboca Feb 14, 2023
7157c15
Refactor test for 2.9/2.10 support
pdelboca Feb 14, 2023
641625c
Clean old PY2 code
pdelboca Feb 14, 2023
548bfff
Bump version
pdelboca Feb 14, 2023
85ca35b
Update README.rst and Changelog
pdelboca Feb 14, 2023
e499e11
Add Changelog entry
pdelboca Feb 14, 2023
0a1b43a
Fix css class for image to support BS5
pdelboca Feb 14, 2023
2027d53
Rename get_wysiwyg_editor to showcase_get_wysiwyg_editor to avoid nam…
pdelboca Feb 14, 2023
cb545b3
Replace request.params
pdelboca Feb 14, 2023
506c8ee
Upgrade CKEditor version
pdelboca Feb 14, 2023
27f6cd1
Add CSRF token to CKEditor file upload
pdelboca Feb 14, 2023
75f0206
Update CKEditor documentation and build directory
pdelboca Feb 14, 2023
72141f2
Update CHANGELOG with CKEditor update
pdelboca Feb 14, 2023
a9c86ce
Merge pull request #164 from pdelboca/add-csrf-and-drop-support-old-v…
pdelboca Feb 16, 2023
f5462da
String prefix cleanup
pdelboca Mar 15, 2023
d912160
Add csrf_input to all forms
pdelboca Jun 15, 2023
c025ad6
Fix BS5 class
pdelboca Jun 15, 2023
7b4a0fc
Add trophy icon to nav bar
pdelboca Jun 15, 2023
bcf115f
Merge pull request #167 from ckan/fixes-bs5-and-csrf
pdelboca Jun 15, 2023
9e57022
Merge pull request #165 from ckan/string-prefix-cleanup
pdelboca Jun 15, 2023
1763b72
Add en_AU translation for showcase module
MarkCalvert Mar 4, 2024
4e760d3
Merge pull request #1 from dbca-wa/develop
MarkCalvert Mar 6, 2024
1f1048e
Fix navigation menu headers
avdata99 Apr 17, 2024
b0be224
clean vars
avdata99 Apr 17, 2024
322eee1
Merge pull request #169 from avdata99/fix_header
pdelboca Apr 17, 2024
f24b0cd
Merge pull request #168 from dbca-wa/master
pdelboca Apr 17, 2024
77b7f38
Test 2.11, update action versions
amercader Jul 12, 2024
881e928
Use shared metadata to define model, add alembic migration
amercader Jul 12, 2024
ffe5647
Update tests
amercader Jul 12, 2024
d24f792
Merge pull request #170 from ckan/2.11-support
amercader Jul 12, 2024
b85d810
Refactor template variable assignments in new_package_form.html to fi…
MarkCalvert Nov 4, 2024
b181371
Update MANIFEST.in to include migration files and public assets
avdata99 Jan 21, 2025
1862ab5
Drop CKAN 2.9 support
avdata99 Jan 21, 2025
2291989
Update CHANGELOG
bellisk Jan 28, 2025
b640cae
Bump version to v1.8.0
bellisk Jan 28, 2025
0852227
Merge pull request #174 from avdata99/missing_install_files
bellisk Jan 29, 2025
52fe2d4
Merge pull request #173 from salsadigitalauorg/master
bellisk Jan 29, 2025
aaadcf8
Update CHANGELOG
bellisk Jan 29, 2025
bd91ac2
Bump version to 1.8.1
bellisk Jan 29, 2025
0925eb5
Pass value for search_facets into facet_list.html
bellisk Jan 29, 2025
171fb16
Clear up c object from templates
bellisk Jan 29, 2025
901e967
Update c object to g object
bellisk Jan 29, 2025
4960d85
Pass missing extra_vars to templates
bellisk Jan 29, 2025
4370856
Pass extra vars to templates instead of adding to global object
bellisk Feb 3, 2025
0918b94
Merge pull request #178 from bellisk/update-facet-list
stefina Feb 5, 2025
aaf4e1c
fix: remove deprecated highlight_actions-attribute
stefina Feb 5, 2025
6a9b6e9
Merge pull request #179 from stefina/fix/remove-highlight-actions
stefina Feb 5, 2025
c2cfe10
Merge commit '6a9b6e96c4482b9becbfb0bdd27083d51b4900ed' into upstream…
peterVorman Jun 2, 2025
c5dc278
ci
peterVorman Jun 2, 2025
8e1139d
add link to showcases in account header
peterVorman Jun 3, 2025
1d2cec1
Add initial 1x1 pixel image
jguo144 Jul 14, 2025
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
45 changes: 24 additions & 21 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ name: Tests
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v4.2.2
- uses: actions/setup-python@v5.6.0
with:
python-version: '3.8'
python-version: '3.12'
- name: Install requirements
run: pip install flake8 pycodestyle
- name: Check syntax
Expand All @@ -17,16 +17,23 @@ jobs:
needs: lint
strategy:
matrix:
ckan-version: ["2.10", 2.9, 2.9-py2, 2.8, 2.7]
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
runs-on: ubuntu-24.04
container:
image: openknowledge/ckan-dev:${{ matrix.ckan-version }}
image: ${{ matrix.ckan-image }}
options: --user root
services:
solr:
image: ckan/ckan-solr:${{ matrix.ckan-version }}
image: ckan/ckan-solr:${{ matrix.ckan-version }}-solr9
postgres:
image: ckan/ckan-postgres-dev:${{ matrix.ckan-version }}
env:
Expand All @@ -44,33 +51,29 @@ jobs:
CKAN_REDIS_URL: redis://redis:6379/1

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4.2.2
- name: Install requirements
run: |
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

- name: Setup extension (CKAN >= 2.9)
if: ${{ matrix.ckan-version != '2.7' && matrix.ckan-version != '2.8' }}
run: |
ckan -c test.ini db init
- name: Setup extension (CKAN < 2.9)
if: ${{ matrix.ckan-version == '2.7' || matrix.ckan-version == '2.8' }}
run: |
paster --plugin=ckan db init -c test.ini
ckan -c test.ini db upgrade -p showcase

- name: Run tests
run: pytest --ckan-ini=test.ini --cov=ckanext.showcase --cov-report=xml --cov-append --disable-warnings ckanext/showcase/tests
run: pytest --ckan-ini=test.ini --cov=ckanext.showcase --cov-report=term-missing --cov-append --disable-warnings ckanext/showcase/tests

- name: Install unzip for SonarQube and cov
run: apt-get -y install unzip curl

- name: Upload coverage report to codecov
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml

- name: SonarQube Scan
uses: sonarsource/sonarqube-scan-action@master
with:
with:
args: >
-Dsonar.projectKey=ckanext-showcase
-Dsonar.sources=ckanext/showcase
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ __pycache__/
# Distribution / packaging
.Python
env/
build/
develop-eggs/
sdist/
*.egg-info/
Expand Down
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
# Ckanext-showcase CHANGELOG

## v1.8.1 2025-01-29

* Fixes delete and update showcase buttons (#173)
* Update MANIFEST.in to include migration files and public assets (#174)

## v1.8.0 2025-01-28

* Add CKAN 2.11 support (#170)

## v1.7.0 2024-04-17

* Fix navigation menu headers (#169)
* Add English Australia (en_AU) translation files (#168)

## v1.6.1 2023-06-15
* Fixed BS5 class and add CSRF support to all forms (#167)
* String prefix cleanup (#165)

## v1.6.0 2023-02-14

* Dropped support for CKAN 2.7 and 2.8
* Dropped support for Python 2
* Add support for CSRF token
* Sanitize blueprint names. All views should be called using `showcase_blueprint.<endpoint>`
* Rename get_showcase_wysiwyg_editor to avoid name clashes with other extensions (like `ckanext-pages`)
* Update CKEditor to it's latest version: 36.0.1

## v1.5.1 2022-08-10

* Dependency update
Expand Down
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ include README.rst
recursive-include ckanext/showcase/templates *
recursive-include ckanext/showcase/i18n *
recursive-include ckanext/showcase/fanstatic *
recursive-include ckanext/showcase/migration *.ini *.py *.mako
recursive-include ckanext/showcase/public *.*
30 changes: 16 additions & 14 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ ckanext-showcase is intended to be a more powerful replacement for the
Requirements
------------

Tested on CKAN 2.7 to 2.10..
Tested on CKAN 2.9 to 2.11.

Note: Use `1.5.2` for older CKAN versions (2.7 and 2.8).

------------
Installation
Expand All @@ -54,10 +56,12 @@ To install ckanext-showcase:
config file (by default the config file is located at
``/etc/ckan/default/production.ini``).

4. Restart CKAN. For example if you've deployed CKAN with Apache on Ubuntu::
4. Create the database tables::

ckan db upgrade -p showcase

sudo service apache2 reload

5. Restart CKAN.

------------------------
Development Installation
Expand All @@ -68,7 +72,7 @@ do::

git clone https://github.com/ckan/ckanext-showcase.git
cd ckanext-showcase
python setup.py develop
pip install -e .
pip install -r dev-requirements.txt


Expand All @@ -79,11 +83,14 @@ repository contains all the files needed to edit and customize it if needed::
npm install
npx webpack --config webpack.config.js

The webpack will use as entrypoint a file located in `ckanext/showcase/fanstatic/src/ckeditor.js`,
create a build and save it to `ckanext/showcase/fanstatic/dist/ckeditor.js`
Build anatomy
* assets/build/ckeditor.js - The ready-to-use editor bundle, containing the editor and all plugins.
* assets/js/showcase-editor - The CKAN module that will load and config the bundle when using it as data-module attribute.
* assets/src/ckeditor.js - The source entry point of the build. Based on it the build/ckeditor.js file is created by webpack. It defines the editor creator, the list of plugins and the default configuration of a build.
* webpack.config.js - The webpack configuration used to build the editor.

More info on how to build CKEditor from source:
https://ckeditor.com/docs/ckeditor5/latest/builds/guides/integration/advanced-setup.html#scenario-2-building-from-source
https://ckeditor.com/docs/ckeditor5/latest/installation/getting-started/quick-start-other.html#building-the-editor-from-source


---
Expand Down Expand Up @@ -168,20 +175,15 @@ HTML you can use the ```showcase markdown_to_html``` command.

From the ``ckanext-showcase`` directory::

paster showcase markdown-to-html -c {path to production.ini}
ckan -c {path to production.ini} showcase markdown-to-html

-----------------
Running the Tests
-----------------

To run the tests, do::

nosetests --ckan --nologcapture --with-pylons=test.ini

To run the tests and produce a coverage report, first make sure you have
coverage installed in your virtualenv (``pip install coverage``) then run::

nosetests --ckan --nologcapture --with-pylons=test.ini --with-coverage --cover-package=ckanext.showcase --cover-inclusive --cover-erase --cover-tests
pytest --ckan-ini=test.ini ckanext/showcase/tests


------------------------------------
Expand Down
Loading