Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
301c136
fix for datatables UI
Sep 24, 2024
c0f702a
merged pmd changes
Oct 8, 2024
a662d7d
fixed hight of body
ThHanke Nov 4, 2024
d9292fe
Update test.yml
ThHanke Nov 4, 2024
2388c0b
Update test.yml
ThHanke Nov 4, 2024
8f70c6a
Update README.md
ThHanke Nov 4, 2024
779b4ed
Update test.yml
ThHanke Jan 10, 2025
75fd30e
counters updated async
Jan 14, 2025
1250ff8
Merge pull request #4 from Mat-O-Lab/async_counters
ThHanke Jan 14, 2025
676ff73
switched to async counter fetch
Jan 14, 2025
d889f04
banners top and bottom are two different files now, index page changes
Jan 14, 2025
9693049
fixed index header
Jan 16, 2025
89c3f2e
switch to faster api endpoint for counts
Jan 17, 2025
12c99f7
using num_resource property to sum up
Jan 17, 2025
80a6c6e
Update promoted.html
ThHanke Jan 17, 2025
3b2878a
Update promoted.html
ThHanke Jan 17, 2025
49dc64a
Update promoted.html
ThHanke Jan 17, 2025
c028937
removed page.html overrides
Jan 21, 2025
dd3d1c6
stats endpoint speedup
Jan 21, 2025
8f4a8f2
added function to submit form with shift + return
Jan 22, 2025
e0db305
banners now configuable in admin interface
Jan 30, 2025
1a65d4f
Update config.html
ThHanke Jan 31, 2025
7bd9867
Update plugin.py
ThHanke Jan 31, 2025
b0a48a5
added attributen logo, for right side footer
Feb 3, 2025
4ab8278
small change to header elements scaling
Feb 3, 2025
14777be
some fixes to hover and placement
Feb 4, 2025
e963a97
changes to css
Feb 4, 2025
876a2bd
refitted whole data privacy act
Feb 5, 2025
5996d8e
collected strings to tanslate
Feb 6, 2025
c7d39c7
slight changes to layout
Feb 10, 2025
98c1860
added german translation
Feb 10, 2025
d0898dc
Update plugin.py
ThHanke Feb 10, 2025
f6ccfe6
Update plugin.py
ThHanke Feb 10, 2025
75b27cd
Update style.css
ThHanke Feb 10, 2025
424fb72
Update style.css
ThHanke Feb 10, 2025
0b5f4b0
Update style.css
ThHanke Feb 10, 2025
1c4c14a
Update style.css
ThHanke Feb 10, 2025
b0e34e9
Update footer.html
ThHanke Feb 11, 2025
172eec0
fixed a typo for organization lik in landing view
Feb 11, 2025
9f7c58f
Update views.py
ThHanke Feb 11, 2025
ccca9e4
Update views.py
ThHanke Feb 11, 2025
dc00a44
translation fix
Feb 12, 2025
2a486a2
Merge branch 'main' of github.com:Mat-O-Lab/ckanext-matolabtheme
Feb 12, 2025
0565a58
changes to dataprivacy
Mar 4, 2025
01b8cab
dark mode now optional to be set in theme config
Mar 11, 2025
beda52c
theme_config route fix
Mar 11, 2025
a2f3b21
small fixed to dark mode
Mar 11, 2025
6233224
fixed an error for user object
Mar 24, 2025
fb22c95
Update test.yml
ThHanke Mar 24, 2025
48d92cb
fixed version check
Mar 24, 2025
006d2cc
added user profile again
Mar 24, 2025
3549118
small fix to user header
Mar 24, 2025
97882fa
removed dark_model config in admin form, some kind of value change in…
Mar 28, 2025
d129048
some code formating
Mar 28, 2025
117c8bd
update setup.py and Readme
ThHanke May 13, 2025
b959e69
add pypi workflow
ThHanke May 13, 2025
a83c2f6
Update setup.py
ThHanke May 13, 2025
8db2470
Update setup.py
ThHanke May 13, 2025
e0de28b
Update setup.py
ThHanke May 13, 2025
96951cf
fixing package includes
ThHanke May 13, 2025
c39e821
fixed data privacy act and translation
May 19, 2025
898f7ac
small formal fix to protection act
May 19, 2025
9fce280
added legal notice url link in footer
May 19, 2025
9a09ced
Merge branch 'main' of github.com:Mat-O-Lab/ckanext-matolabtheme
May 19, 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
105 changes: 105 additions & 0 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: upload-pypi

on:
release:
types: [published]

permissions:
contents: write
id-token: write


jobs:
release-build:
runs-on: ubuntu-latest

steps:
- name: Set version from release tag
run: echo "VERSION=${{ github.event.release.tag_name }}" >> $GITHUB_ENV
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.x"

- name: Build release distributions
run: |
# NOTE: put your own distribution build steps here.
python -m pip install build
python -m build

- name: Upload distributions
uses: actions/upload-artifact@v4
with:
name: release-dists
path: dist/

pypi-publish:
runs-on: ubuntu-latest
needs:
- release-build
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write

# Dedicated environments with protections for publishing are strongly recommended.
# For more information, see: https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#deployment-protection-rules
environment:
name: pypi
# OPTIONAL: uncomment and update to include your PyPI project URL in the deployment status:
#url: https://pypi.org/p/${GITHUB_REPOSITORY#*/}
#
# ALTERNATIVE: if your GitHub Release name is the PyPI project version string
# ALTERNATIVE: exactly, uncomment the following line instead:
url: https://pypi.org/project/${GITHUB_REPOSITORY#*/}/${{ github.event.release.name }}

steps:
- name: Retrieve release distributions
uses: actions/download-artifact@v4
with:
name: release-dists
path: dist/

- name: Publish release distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist/
sign-package:
runs-on: ubuntu-latest
needs:
- release-build
steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: release-dists
path: dist/
- name: Sign the dists with Sigstore
uses: sigstore/gh-action-sigstore-python@v3.0.0
with:
inputs: >-
./dist/*.tar.gz
./dist/*.whl
publish-to-testpypi:
name: Publish Python 🐍 distribution 📦 to TestPyPI
needs:
- release-build
runs-on: ubuntu-latest

environment:
name: testpypi
url: https://test.pypi.org/p/${GITHUB_REPOSITORY#*/}

permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing

steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: release-dists
path: dist/
- name: Publish distribution 📦 to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
25 changes: 17 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.7'
python-version: '3.11'
- name: Install requirements
run: pip install flake8 pycodestyle
- name: Check syntax
Expand All @@ -18,16 +18,25 @@ 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"
solr-image: "2.11-solr9-spatial"
harvester-version: 'master'
- ckan-version: "2.10"
ckan-image: "ckan/ckan-dev:2.10-py3.10"
solr-image: "2.10-solr9-spatial"
harvester-version: 'master'
fail-fast: false

name: CKAN ${{ matrix.ckan-version }}
name: CKAN ${{ matrix.ckan-version }}, Solr ${{ matrix.solr-image }}
runs-on: ubuntu-latest
container:
image: ckan/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.solr-image }}
postgres:
image: ckan/ckan-postgres-dev:${{ matrix.ckan-version }}
env:
Expand All @@ -36,14 +45,14 @@ 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
env:
CKAN_SQLALCHEMY_URL: postgresql://ckan_default:pass@postgres/ckan_test
CKAN_DATASTORE_WRITE_URL: postgresql://datastore_write:pass@postgres/datastore_test
CKAN_DATASTORE_READ_URL: postgresql://datastore_read:pass@postgres/datastore_test
CKAN_SOLR_URL: http://solr:8983/solr/ckan
CKAN_REDIS_URL: redis://redis:6379/1

steps:
- uses: actions/checkout@v3
- name: Install requirements
Expand All @@ -63,4 +72,4 @@ jobs:
- name: Upload coverage report to codecov
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
file: ./coverage.xml--cov=ckanext.matolabtheme
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ include LICENSE
include requirements.txt
recursive-include ckanext/matolabtheme *.html *.json *.js *.less *.css *.mo *.yml
recursive-include ckanext/matolabtheme/migration *.ini *.py *.mako
recursive-include ckanext/matolabtheme/public/static *.svg *.png
119 changes: 35 additions & 84 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,17 @@
[![Tests](https://github.com/Mat-O-Lab/ckanext-matolabtheme/actions/workflows/test.yml/badge.svg)](https://github.com/Mat-O-Lab/ckanext-matolabtheme/actions/workflows/test.yml)
# ckanext-matolabtheme

**TODO:** Put a description of your extension here: What does it do? What features does it have? Consider including some screenshots or embedding a video!

CKAN theme of the Mat-O-Lab Project, changes landing Page and add alternative Data Privacy Act in English and German.

## Requirements

**TODO:** For example, you might want to mention here which versions of CKAN this
extension works with.

If your extension works across different versions you can add the following table:

Compatibility with core CKAN versions:

| CKAN version | Compatible? |
| --------------- | ------------- |
| 2.6 and earlier | not tested |
| 2.7 | not tested |
| 2.8 | not tested |
| 2.9 | not tested |
| 2.9 and earlier | not tested |
| 2.10 | yes |
| 2.11 | yes |

Suggested values:

Expand All @@ -30,106 +23,64 @@ Suggested values:

## Installation

**TODO:** Add any additional install steps to the list below.
For example installing any non-Python dependencies or adding any required
config settings.

To install ckanext-matolabtheme:
To install the extension:

1. Activate your CKAN virtual environment, for example:

. /usr/lib/ckan/default/bin/activate

2. Clone the source and install it on the virtualenv

git clone https://github.com/Mat-O-Lab/ckanext-matolabtheme.git
cd ckanext-matolabtheme
pip install -e .
pip install -r requirements.txt

```bash
. /usr/lib/ckan/default/bin/activate
```
2. Use pip to install package
```bash
pip install ckanext-matolabtheme
```
3. Add `matolabtheme` to the `ckan.plugins` setting in your CKAN
config file (by default the config file is located at
`/etc/ckan/default/ckan.ini`).

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

sudo service apache2 reload
   config file (by default the config file is located at
   `/etc/ckan/default/ckan.ini`).

4. Restart CKAN. For example, if you've deployed CKAN with Apache on Ubuntu:
```bash
sudo service apache2 reload
```

## Config settings

```bash
CKANINI__CKANEXT__MATOLABTHEME__CONTACT_URL = <url to contact site>
CKANINI__CKANEXT__MATOLABTHEME__LEGAL_PERSON_MD = <Legal Body Address in Markdown>
CKANINI__CKANEXT__MATOLABTHEME__DSVGO_CONTACT_MD = <Contact to adress with dsvgo conflicts in markdown>
CKANINI__CKANEXT__MATOLABTHEME__CONTACT_URL=<url to contact site>
CKANINI__CKANEXT__MATOLABTHEME__LEGAL_PERSON_MD=<Legal Body Address in Markdown>
CKANINI__CKANEXT__MATOLABTHEME__LEGAL_NOTICE_URL=<Url to your legal notice information>
CKANINI__CKANEXT__MATOLABTHEME__DSVGO_CONTACT_MD=<Contact to adress with dsvgo conflicts in markdown>
CKANINI__CKANEXT__MATOLABTHEME__CONTACT_DP_COMMISSIONER_EMAIL_MD="[datenprotection_commissioner@example.de](mailto:datenschutzbeauftragte@example.de?subject=dataprotection ${CKAN_HOST})"
CKANINI__CKAN__FAVICON=/img/favicon.png
```
or ckan.ini parameters.
```bash
ckan.matolabtheme.contact_url = <url to contact site>
ckan.matolabtheme.legal_person_md = <Legal Body Address in Markdown>
ckan.matolabtheme.legal_notice_url = <Url to your legal notice information>
ckan.matolabtheme.dsvgo_contact_md = <Contact to adress with dsvgo conflicts in markdown>
ckan.matolabtheme.dsvgo_contact_md = "[datenprotection_commissioner@example.de](mailto:datenschutzbeauftragte@example.de?subject=dataprotection]"
ckan.favicon = /img/favicon.png
```
If no contact_url is given, it will relate to the about page!


**TODO:** Document any optional config settings here. For example:

# The minimum number of hours to wait before re-checking a resource
# (optional, default: 24).
ckanext.matolabtheme.some_setting = some_default_value


## Developer installation

To install ckanext-matolabtheme for development, activate your CKAN virtualenv and
To install ckanext-csvtocsvw for development, activate your CKAN virtualenv and
do:

git clone https://github.com/Mat-O-Lab/ckanext-matolabtheme.git
cd ckanext-matolabtheme
python setup.py develop
pip install -r dev-requirements.txt

```bash
git clone https://github.com/Mat-O-Lab/ckanext-matolabtheme.git
cd ckanext-matolabtheme
python setup.py develop
pip install -r dev-requirements.txt
```

## Tests

To run the tests, do:

pytest --ckan-ini=test.ini


## Releasing a new version of ckanext-matolabtheme

If ckanext-matolabtheme should be available on PyPI you can follow these steps to publish a new version:

1. Update the version number in the `setup.py` file. See [PEP 440](http://legacy.python.org/dev/peps/pep-0440/#public-version-identifiers) for how to choose version numbers.

2. Make sure you have the latest version of necessary packages:

pip install --upgrade setuptools wheel twine

3. Create a source and binary distributions of the new version:

python setup.py sdist bdist_wheel && twine check dist/*

Fix any errors you get.

4. Upload the source distribution to PyPI:

twine upload dist/*

5. Commit any outstanding changes:

git commit -a
git push

6. Tag the new release of the project on GitHub with the version number from
the `setup.py` file. For example if the version number in `setup.py` is
0.0.1 then do:

git tag 0.0.1
git push --tags
```bash
pytest --ckan-ini=test.ini
```

## License

Expand Down
Loading
Loading