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

Switch to upstream with only translations added #4

Open
wants to merge 111 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
cce366d
Bump lodash from 4.17.19 to 4.17.21
dependabot[bot] May 11, 2021
85f9cd4
Bump hosted-git-info from 2.8.8 to 2.8.9
dependabot[bot] May 11, 2021
66e2d37
Bump browserslist from 4.12.0 to 4.16.6
dependabot[bot] May 26, 2021
f5de710
Bump postcss from 7.0.29 to 7.0.36
dependabot[bot] Jun 17, 2021
7513192
added german translations
rickelt Jul 2, 2021
58acb30
Nachbesserung, Paket zu Datensatz
rickelt Jul 5, 2021
cf74694
Merge pull request #1 from rickelt/german-translation
ondics Jul 5, 2021
78c8bf7
Bump path-parse from 1.0.6 to 1.0.7
dependabot[bot] Aug 12, 2021
60b8089
Bump color-string from 1.5.3 to 1.6.0
dependabot[bot] Aug 17, 2021
adf9c21
Merge pull request #116 from ondics/master
stefina Nov 19, 2021
0888869
Merge pull request #121 from ckan/dependabot/npm_and_yarn/color-strin…
stefina Nov 19, 2021
73e8438
Merge pull request #119 from ckan/dependabot/npm_and_yarn/path-parse-…
stefina Nov 19, 2021
9aa49b6
Merge pull request #110 from ckan/dependabot/npm_and_yarn/lodash-4.17.21
stefina Nov 19, 2021
a08be6e
Merge pull request #111 from ckan/dependabot/npm_and_yarn/hosted-git-…
stefina Nov 19, 2021
f1b83b3
Merge pull request #113 from ckan/dependabot/npm_and_yarn/browserslis…
stefina Nov 19, 2021
1cb4dad
Merge pull request #114 from ckan/dependabot/npm_and_yarn/postcss-7.0.36
stefina Nov 19, 2021
5bf0e23
Add French translations
bobeal Nov 27, 2018
f8aa37e
fix: fuzzy marks in translation file
bobeal Nov 24, 2021
9e14f8e
Merge pull request #124 from ozwillo/french-translations
bellisk Nov 24, 2021
7591c07
freeze six to version >=v1.12.0
Nov 24, 2021
6c2776d
repair logic 'package_showcase_list'
Nov 24, 2021
ec3f027
repair logic 'showcase_package_list'
Nov 24, 2021
3a46ec9
Merge pull request #125 from sabinem/freeze-six-version
bellisk Nov 25, 2021
05b4eab
Merge pull request #127 from sabinem/repair-logic-showcase_package_list
bellisk Nov 25, 2021
716220b
Merge pull request #126 from sabinem/repair-logic-package_showcase_list
bellisk Nov 25, 2021
9cf931a
Fix version number in setup.py
bellisk Jan 4, 2022
420f4d3
Merge pull request #131 from ckan/fix-version-number
bellisk Jan 4, 2022
0f19df8
Escape trailing underscore
bellisk Jan 4, 2022
796dcea
Move minimal requirements into setup.py
bellisk Jan 4, 2022
6558829
Merge pull request #134 from ckan/move-minimal-requirements-into-setup
bellisk Jan 4, 2022
5be825d
Merge pull request #133 from ckan/escape-underscore-in-readme
bellisk Jan 4, 2022
668fec0
Bump version
bellisk Jan 4, 2022
193a3a3
Add zh_Hant_TW translations
u10313335 Dec 22, 2021
bc19157
Bump shelljs from 0.8.4 to 0.8.5
dependabot[bot] Jan 15, 2022
7b95dfc
Merge pull request #137 from ckan/dependabot/npm_and_yarn/shelljs-0.8.5
bellisk Jan 17, 2022
d68c073
Merge pull request #136 from depositar/zh-hant-tw-translations
bellisk Jan 17, 2022
704b4a0
Bump version to 1.4.8
bellisk Jan 17, 2022
fd26468
Fix typo
u10313335 Jan 30, 2022
f182fed
Bump ajv from 6.12.2 to 6.12.6
dependabot[bot] Feb 13, 2022
234595c
Bump minimist from 1.2.5 to 1.2.6
dependabot[bot] Mar 26, 2022
7727cb3
Run tests on 2.10
pdelboca Apr 8, 2022
8e6332f
Do not use built-in as validators
pdelboca Apr 8, 2022
40aefde
Use jinja2 truncate filter
pdelboca Apr 8, 2022
f9a4276
Fix IPackageController for CKAN 2.10
pdelboca Apr 8, 2022
fc3acd2
Fix url_for
pdelboca Apr 8, 2022
e23526e
Fix get_action calls
pdelboca Apr 8, 2022
6440087
Fix typos on IPackage methods
pdelboca Apr 8, 2022
6e0f79c
Fix stats.html routes
pdelboca Apr 8, 2022
cca3a57
Rename deprecated request.params
pdelboca Apr 8, 2022
e4ddba0
Use plugins.toolkit
pdelboca Apr 8, 2022
8bcab93
Keep request.params for backwards compatibility
pdelboca Apr 8, 2022
1db1e86
Clean log_message logic
pdelboca Apr 15, 2022
855604e
Deprecate logic to migrate from Related Items
pdelboca Apr 15, 2022
45c68f0
Clean leftover of related items
pdelboca Apr 15, 2022
2555f0d
Clean old drill_down_url
pdelboca Apr 15, 2022
68211c6
Copy logic from core
pdelboca Apr 20, 2022
2754d7e
Clean old moderated context value
pdelboca Apr 20, 2022
8fce295
Fix config object access
pdelboca Apr 20, 2022
32c56e7
Simplify IPackageController logic
pdelboca Apr 20, 2022
1d58e7e
Simplify context objects
pdelboca Apr 20, 2022
de10d0a
Clean unused imports
pdelboca Apr 20, 2022
028b8d0
Clean not accessed import
pdelboca Apr 20, 2022
19aaaf4
_prepare() do not have argument
pdelboca Apr 20, 2022
478b681
Keep user for check_access
pdelboca Apr 20, 2022
0d569e0
Restore user for auth_check
pdelboca Apr 20, 2022
3fe625e
Do not check for auth twice
pdelboca Apr 20, 2022
433683a
Revert "Simplify context objects"
pdelboca Apr 20, 2022
f2f1fd3
Upgrade c to g
pdelboca Apr 20, 2022
e4b852f
Fix lint
pdelboca Apr 20, 2022
09cc528
Drop support for 2.5
pdelboca Apr 20, 2022
6651997
Clean unused imports
pdelboca Apr 20, 2022
f24ba95
Clean support for 2.5
pdelboca Apr 20, 2022
33cb2ab
Merge pull request #143 from pdelboca/2.10-support
amercader Apr 20, 2022
02cbc03
Updated supported versions
amercader Apr 20, 2022
f9d3794
Merge pull request #139 from depositar/fix_add_to_showcase
amercader Apr 20, 2022
17a5a3f
Bump version
amercader Apr 20, 2022
c365dfe
Bump terser from 4.6.13 to 4.8.1
dependabot[bot] Jul 21, 2022
4c77f8d
Merge pull request #140 from ckan/dependabot/npm_and_yarn/ajv-6.12.6
bellisk Aug 10, 2022
ef89a04
Merge pull request #142 from ckan/dependabot/npm_and_yarn/minimist-1.2.6
bellisk Aug 10, 2022
73d9bf5
Merge pull request #146 from ckan/dependabot/npm_and_yarn/terser-4.8.1
bellisk Aug 10, 2022
b472647
Bump version to 1.5.1
bellisk Aug 10, 2022
cea5b22
add blank line to readme file
Oct 4, 2022
07ee01c
Merge pull request #151 from sabinem/add-blank-line-to-readme
bellisk Oct 5, 2022
5842769
Fix 2.9 compatibility
pdelboca Nov 2, 2022
43c75fc
Skip tests in 2.8/2.7
pdelboca Nov 2, 2022
3e6e6b9
Add support for 2.10 in tests
pdelboca Nov 2, 2022
a18087f
Fix CKAN check version
pdelboca Nov 2, 2022
f6ec458
Merge pull request #154 from pdelboca/fix-2.9-support
pdelboca Nov 2, 2022
51e35c5
Bump version
pdelboca Nov 2, 2022
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
ef3cbc6
Added opendata-specific translations
bzar Apr 24, 2023
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
18 changes: 6 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.6'
python-version: '3.10'
- name: Install requirements
run: pip install flake8 pycodestyle
- name: Check syntax
Expand All @@ -17,7 +17,7 @@ jobs:
needs: lint
strategy:
matrix:
ckan-version: [2.9, 2.9-py2, 2.8, 2.7]
ckan-version: ["2.10", 2.9]
fail-fast: false

name: CKAN ${{ matrix.ckan-version }}
Expand All @@ -26,7 +26,7 @@ jobs:
image: openknowledge/ckan-dev:${{ matrix.ckan-version }}
services:
solr:
image: ckan/ckan-solr-dev:${{ matrix.ckan-version }}
image: ckan/ckan-solr:${{ matrix.ckan-version }}
postgres:
image: ckan/ckan-postgres-dev:${{ matrix.ckan-version }}
env:
Expand All @@ -44,7 +44,7 @@ jobs:
CKAN_REDIS_URL: redis://redis:6379/1

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Install requirements
run: |
pip install -r requirements.txt
Expand All @@ -53,16 +53,10 @@ jobs:
# 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
- name: Run tests
run: pytest --ckan-ini=test.ini --cov=ckanext.showcase --cov-report=xml --cov-append --disable-warnings ckanext/showcase/tests

- name: Upload coverage report to codecov
uses: codecov/codecov-action@v1
with:
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
38 changes: 38 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,43 @@
# Ckanext-showcase CHANGELOG

## 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

## v1.5.0 2022-04-20

* Support for CKAN 2.10 (#143)
* Fix message in Add to showcase button (#139)

## v1.4.8 2022-01-17

* Add Chinese (Traditional, Taiwan) translations (#136)
* Dependency update

## v1.4.7 2022-01-04

* Fix ReST in README (#133)
* Move minimal requirements into setup.py (#134)

## v1.4.6 2022-01-04

* Fix version in setup.py and add to changelog (#130)

## v1.4.5 2021-11.25

* Add German and French translations (#124, #126)
* Fix logic for API routes (#128)
* Dependency updates

## v1.4.4 2021-08-17

* Fix hardcoded route (#118)
Expand Down
54 changes: 12 additions & 42 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,9 @@ ckanext-showcase is intended to be a more powerful replacement for the
Requirements
------------

Tested on CKAN 2.9 and 2.10.

Compatible with CKAN 2.9.

N.B. The ``migrate`` command, detailed below, requires the Related Item models
and actions, which have been removed in CKAN 2.6. If you wish to migrate your
Related Items, please first upgrade CKAN to 2.5, do the migration, then
continue upgrading to CKAN 2.6+.

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

------------
Installation
Expand Down Expand Up @@ -75,7 +70,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 @@ -86,11 +81,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 @@ -157,30 +155,6 @@ The Showcase extension adds the following pages to the user interface:
* To add a Showcase Admin : ``http://127.0.0.1:5000/ckan-admin/showcase_admins``


----------------------------
Migrating from Related Items
----------------------------

If you already have Related Items in your database, you can use the ``showcase
migrate`` command to create Showcases from Related Items.

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

paster showcase migrate -c {path to production.ini}

Note that each Related Item must have a unique title before migration can
proceed. If you prefer resolving duplicates as showcases, you can use the --allow-duplicates
option to migrate them anyways. Duplicate Relations will be created as
'duplicate_' + original_related_title + '_' + related_id

paster showcase migrate -c {path to production.ini} --allow-duplicates

The Related Item property ``type`` will become a Showcase tag. The Related Item
properties ``created``, ``owner_id``, ``view_count``, and ``featured`` have no
equivalent in Showcases and will not be migrated.

Related Item data is not removed from the database by this command.

---------------------
Configuration
---------------------
Expand All @@ -199,20 +173,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 Expand Up @@ -288,3 +257,4 @@ See: "Internationalizing strings in extensions" : http://docs.ckan.org/en/latest
3. Compile your language catalog ( You can force pybabel compile to compile messages marked as fuzzy with the -f)

python setup.py compile_catalog -f -l es

Loading