Skip to content

Commit 3183f68

Browse files
committed
Merge branch 'dev-v2.11' into 2.11
2 parents 59d331e + fd86be7 commit 3183f68

72 files changed

Lines changed: 2379 additions & 1172 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.flake8

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[flake8]
2+
max-line-length=88
23
exclude =
34
.*
45
./contrib
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Create GitHub release
2+
3+
# Create a GitHub release when a tag is pushed
4+
on:
5+
push:
6+
tags:
7+
- 'ckan-**'
8+
9+
jobs:
10+
build:
11+
name: Create GitHub release
12+
runs-on: ubuntu-latest
13+
env:
14+
GH_TOKEN: ${{ github.token }}
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Build Changelog URL and create release
20+
run: |
21+
TAG_NAME=${{ github.ref_name }}
22+
CKAN_VERSION=$(echo $TAG_NAME | sed -s 's/ckan-//')
23+
MAJOR=$(echo $CKAN_VERSION | cut -d'.' -f1)
24+
MINOR=$(echo $CKAN_VERSION | cut -d'.' -f2)
25+
PATCH=$(echo $CKAN_VERSION | cut -d'.' -f3)
26+
27+
DATE=$(git log -1 --format=%ad --date=format:'%Y-%m-%d' $TAG_NAME)
28+
29+
URL="https://docs.ckan.org/en/$MAJOR.$MINOR/changelog.html#v-$MAJOR-$MINOR-$PATCH-$DATE"
30+
31+
NOTES="Full changelog here: $URL"
32+
33+
gh release create "$TAG_NAME" --verify-tag --title "$TAG_NAME" --notes "$NOTES"

.github/workflows/publish-pypi.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Publish to PyPI
2+
3+
# Publish to PyPI when a tag is pushed
4+
on:
5+
push:
6+
tags:
7+
- 'ckan-**'
8+
9+
jobs:
10+
build:
11+
name: Build distribution
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Set up Python
16+
uses: actions/setup-python@v5
17+
with:
18+
python-version: "3.9"
19+
- name: Install pypa/build
20+
run: >-
21+
python3 -m
22+
pip install
23+
build
24+
--user
25+
- name: Build a binary wheel and a source tarball
26+
run: python3 -m build
27+
- name: Store the distribution packages
28+
uses: actions/upload-artifact@v4
29+
with:
30+
name: python-package-distributions
31+
path: dist/
32+
33+
publish-to-pypi:
34+
name: Publish Python distribution on PyPI
35+
needs:
36+
- build
37+
runs-on: ubuntu-latest
38+
environment:
39+
name: pypi
40+
url: https://pypi.org/p/ckan
41+
permissions:
42+
id-token: write
43+
steps:
44+
- name: Download all the dists
45+
uses: actions/download-artifact@v4
46+
with:
47+
name: python-package-distributions
48+
path: dist/
49+
- name: Publish distribution to PyPI
50+
uses: pypa/gh-action-pypi-publish@release/v1
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Publish to TestPyPI
2+
3+
# Publish to Test PyPI when a pull request is merged to master
4+
on:
5+
push:
6+
branches:
7+
- 'master'
8+
9+
jobs:
10+
build:
11+
name: Build distribution
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Set up Python
16+
uses: actions/setup-python@v5
17+
with:
18+
python-version: "3.9"
19+
- name: Add timestamp to version number
20+
run: |
21+
TIMESTAMP=$(date +"%Y%m%d%H%M")
22+
sed -E -i 's/__version__ = "(.*)"$/__version__ = "\1.post'$TIMESTAMP'"/' ckan/__init__.py
23+
- name: Install pypa/build
24+
run: >-
25+
python3 -m
26+
pip install
27+
build
28+
--user
29+
- name: Build a binary wheel and a source tarball
30+
run: python3 -m build
31+
- name: Store the distribution packages
32+
uses: actions/upload-artifact@v4
33+
with:
34+
name: python-package-distributions
35+
path: dist/
36+
37+
publish-to-testpypi:
38+
name: Publish Python distribution on TestPyPI
39+
needs:
40+
- build
41+
runs-on: ubuntu-latest
42+
environment:
43+
name: test-pypi
44+
url: https://test.pypi.org/p/ckan
45+
permissions:
46+
id-token: write
47+
steps:
48+
- name: Download all the dists
49+
uses: actions/download-artifact@v4
50+
with:
51+
name: python-package-distributions
52+
path: dist/
53+
- name: Publish distribution to TestPyPI
54+
uses: pypa/gh-action-pypi-publish@release/v1
55+
with:
56+
repository-url: https://test.pypi.org/legacy/

CHANGELOG.rst

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,78 @@ Changelog
99

1010
.. towncrier release notes start
1111
12+
v.2.11.1 2024-12-11
13+
===================
14+
15+
Migration notes
16+
---------------
17+
18+
- This version requires a requirements upgrade on source installations
19+
20+
Minor changes
21+
-------------
22+
- Allow configuring datastore full text field indexes with new
23+
`ckan.datastore.default_fts_index_field_types` config option.
24+
25+
The default is "text tsvector" but this can be changed to
26+
"" to avoiding automatically creating separate full text indexes
27+
for any individual columns. This will result in a significant reduction
28+
in storage space. The whole-row full text index still
29+
exists for all tables.
30+
31+
After upgrading to CKAN 2.12 the default changes to "".
32+
33+
Use the `ckan datastore fts-index` command to remove existing
34+
column indexes to reclaim database space. (`#5847
35+
<https://github.com/ckan/ckan/pull/5847>`_)
36+
- Allow SECRET_KEY to fall back to beaker.session.secret for easier upgrades
37+
(`#7853 <https://github.com/ckan/ckan/pull/7853>`_)
38+
- `datastore_info` action method now has `side_effect_free`, allowing it to be
39+
available via GET requests in the API. (`#8457
40+
<https://github.com/ckan/ckan/pull/8457>`_)
41+
- Remove unnecessary beaker.session.secret warning (`#8468
42+
<https://github.com/ckan/ckan/pull/8468>`_)
43+
- Upgrade requirements with security issues (`#8505
44+
<https://github.com/ckan/ckan/pull/8505>`_)
45+
- Register pytest plugins as entrypoints to make them available to all
46+
extensions (`#8507 <https://github.com/ckan/ckan/pull/8507>`_)
47+
- Don't add author email to pyproject.toml if empty when creating an extension
48+
(`#8519 <https://github.com/ckan/ckan/pull/8519>`_)
49+
- Add id attribute to AnonymousUser
50+
(`#8571 <https://github.com/ckan/ckan/pull/8571>`_)
51+
- Automate publishing CKAN package to PyPI (`#8520
52+
<https://github.com/ckan/ckan/pull/8520>`_)
53+
- Automate creation of GitHub release (`#8570
54+
<https://github.com/ckan/ckan/pull/8570>`_)
55+
56+
57+
Bugfixes
58+
--------
59+
60+
- fix Page view tracking of datasets is not working if ckan is running at a
61+
subpath (`#5468 <https://github.com/ckan/ckan/pull/5468>`_)
62+
- Load the right i18n files for Chinese locales in DataTables View. (`#8432
63+
<https://github.com/ckan/ckan/pull/8432>`_)
64+
- Fix exception in `ckan generate extension` command (`#8437
65+
<https://github.com/ckan/ckan/pull/8437>`_)
66+
- Template helper `member_count` will return 0
67+
for unauthorized users. (`#8438 <https://github.com/ckan/ckan/pull/8438>`_)
68+
- Fix `tracking` extension to use ORM models and comply with new `ckan.model`
69+
models (`#8447 <https://github.com/ckan/ckan/pull/8447>`_)
70+
- Fix internal server error when viewing a deleted user. (`#8482
71+
<https://github.com/ckan/ckan/pull/8482>`_)
72+
- Fix display of user organizations page if user belongs to no organizations.
73+
(`#8483 <https://github.com/ckan/ckan/pull/8483>`_)
74+
- Fix error when viewing history of a deleted resource or its package before
75+
the deletion date. (`#8501 <https://github.com/ckan/ckan/pull/8501>`_)
76+
- Fix showing '0 members' for all groups on a dataset page. (`#8537
77+
<https://github.com/ckan/ckan/pull/8537>`_)
78+
- Include ``public`` folder in MANIFEST.in
79+
(`#8565 <https://github.com/ckan/ckan/pull/8565>`_)
80+
- Fix 403 error when a user removes itself from a group
81+
(`#8256 <https://github.com/ckan/ckan/pull/8256>`_)
82+
83+
1284
v.2.11.0 2024-08-21
1385
===================
1486

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ recursive-include ckanext *.py
1515
recursive-include ckanext/*/i18n *
1616
recursive-include ckanext/*/public *
1717
recursive-include ckanext/*/assets *
18+
recursive-include ckanext/*/migration *
1819
recursive-include ckanext/*/templates *
1920
recursive-include ckanext/*/theme/public *
2021
recursive-include ckanext/*/theme/templates *

ckan/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# encoding: utf-8
22

3-
__version__ = "2.11.0"
3+
__version__ = "2.11.1"
44

55
# The packaging system relies on this import, please do not remove it
66
# type_ignore_reason: pyright thinks it's iterable

ckan/config/config_declaration.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ groups:
141141
placeholder: egg:ckan
142142

143143
- key: SECRET_KEY
144+
legacy_key: beaker.session.secret
144145
validators: not_empty
145146
required: true
146147
placeholder_callable: secrets:token_urlsafe
@@ -156,6 +157,9 @@ groups:
156157
157158
When used in a cluster environment, the value must be the same on every machine.
158159
160+
If not provided, for backwards compatibility with earlier configurations the value of
161+
``beaker.session.secret`` will be used.
162+
159163
160164
- key: ckan.legacy_route_mappings
161165
default: {}
8.86 KB
Binary file not shown.

0 commit comments

Comments
 (0)