Skip to content

Commit

Permalink
Merge branch 'master' of github.com:OneGov/onegov-cloud into ogc-1098…
Browse files Browse the repository at this point in the history
…-migrate-links-alle-links-ersetzen
  • Loading branch information
cyrillkuettel committed Oct 15, 2024
2 parents 1617cb3 + 0d5f068 commit 35ce6b0
Show file tree
Hide file tree
Showing 52 changed files with 665 additions and 582 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ jobs:
run: |
source /app/bin/activate
python -m pip install --upgrade uv
uv pip install .[mypy,lint]
uv pip compile setup.cfg -U \
| uv pip install .[mypy,lint] -r /dev/stdin
- name: Linting
run: |
Expand Down Expand Up @@ -173,7 +174,8 @@ jobs:
python -m pip install --upgrade uv
uv pip install pytest-split pytest-cov pytest-codecov pytest-xdist psutil
# TEMPORARY: editable build so we don't need a path-fix in codecov
uv pip install -e .[test]
uv pip compile setup.cfg -U \
| uv pip install -e .[test] -r /dev/stdin
env:
# NOTE: Suppress uv warning
UV_LINK_MODE: copy
Expand Down
108 changes: 56 additions & 52 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,63 @@
# Changes

## 2024.50

`2024-10-11` | [3f9655c562...eb0d0926ed](https://github.com/OneGov/onegov-cloud/compare/3f9655c562^...eb0d0926ed)

### Fsi

##### Survey improvements

- Exports can be made for single or multiple submission windows
- Submissions can now be deleted
- Changes to the survey are now prevented if there are any submissions
- Once the submission is made it is automatically confirmed, but can still be edited

`Feature` | [OGC-1821](https://linear.app/onegovcloud/issue/OGC-1821) | [eb0d0926ed](https://github.com/onegov/onegov-cloud/commit/eb0d0926edc51eb841747b8f31c16861628bc843)

### Newsletter

##### Move update subscription from edit bar to a link

`Feature` | [NONE](#NONE) | [7a76ef78e9](https://github.com/onegov/onegov-cloud/commit/7a76ef78e976d3aac3247179ab5cf16c152ac0ce)

### Org

##### Make editing rule for allocations possible.

`Feature` | [OGC-1397](https://linear.app/onegovcloud/issue/OGC-1397) | [3f9655c562](https://github.com/onegov/onegov-cloud/commit/3f9655c5627815d44a323795329c8c26114851b8)

##### Pins ancestor choices in contact inheritance select

`Feature` | [OGC-1853](https://linear.app/onegovcloud/issue/OGC-1853) | [5e97e3ee40](https://github.com/onegov/onegov-cloud/commit/5e97e3ee40cb61ecc22864cfc597262aa78c1d29)

##### Fixes regression in `login.pt` due to different providers shape

`Bugfix` | [5ab94875f5](https://github.com/onegov/onegov-cloud/commit/5ab94875f515ef8b36d62394c474f5863b3e8db6)

### Swissvotes

##### Update column name

`Bugfix` | [SWI-50](https://linear.app/swissvotes/issue/SWI-50) | [3b733fb1ad](https://github.com/onegov/onegov-cloud/commit/3b733fb1adfe54add16c829bd4951b859de3c292)

### Town6

##### Restyling of newsletter

Some style improvements of the newsletter and added images of events if there are any

`Feature` | [OGC-1788](https://linear.app/onegovcloud/issue/OGC-1788) | [981242fcfa](https://github.com/onegov/onegov-cloud/commit/981242fcfa871e767bdfaa068bb300edc4d49939)

### User

##### Actually allows multiple providers of the same type to coexist

`Bugfix` | [OGC-1750](https://linear.app/onegovcloud/issue/OGC-1750) | [59474454b8](https://github.com/onegov/onegov-cloud/commit/59474454b89a4ad3ac5cc7c1bc9c2c66a11d7285)

## 2024.49

`2024-10-07` | [4b2186bb38...3cefa442f2](https://github.com/OneGov/onegov-cloud/compare/4b2186bb38^...3cefa442f2)
`2024-10-07` | [4b2186bb38...1b5993f16a](https://github.com/OneGov/onegov-cloud/compare/4b2186bb38^...1b5993f16a)

### Feriennet

Expand Down Expand Up @@ -2099,54 +2154,3 @@ Use different script for fixed sidebar on scroll.

`Bugfix` | [OGC-1383](https://linear.app/onegovcloud/issue/OGC-1383) | [d67dbc756f](https://github.com/onegov/onegov-cloud/commit/d67dbc756f14d0756ca52c4af453191c64b8ce54)

## 2023.63

`2023-12-22` | [ceb6766745...e75dab14a2](https://github.com/OneGov/onegov-cloud/compare/ceb6766745^...e75dab14a2)

### Directory

##### Avoids `AttributeError` on entry with multiple files

`Bugfix` | [OGC-1378](https://linear.app/onegovcloud/issue/OGC-1378) | [ff6bb2dbf8](https://github.com/onegov/onegov-cloud/commit/ff6bb2dbf8ad60ebf4b39ec1dafcaaf76aa56bf3)

### Form

##### Sorts files by name when displaying a `MultipleUploadField`

`Feature` | [OGC-1392](https://linear.app/onegovcloud/issue/OGC-1392) | [682460c455](https://github.com/onegov/onegov-cloud/commit/682460c45597b4a0c8970501d60351762caea38f)

### Org

##### Show QRCode in directory entries

`Feature` | [OGC-1333](https://linear.app/onegovcloud/issue/OGC-1333) | [b335d3b9a4](https://github.com/onegov/onegov-cloud/commit/b335d3b9a43e6e8f71442da6d7e25490bb34026c)

##### Restrict mTAN access to numbers from CH, AT, DE, FR, IT, LI

`Feature` | [OGC-1391](https://linear.app/onegovcloud/issue/OGC-1391) | [31a3dd260b](https://github.com/onegov/onegov-cloud/commit/31a3dd260bd7fb57d158ab1d11f1bdd5ed998779)

##### Adds minimal mTAN reporting for billing purposes

This also increases the data retention period on TAN objects

`Feature` | [OGC-1340](https://linear.app/onegovcloud/issue/OGC-1340) | [bb51ef4c07](https://github.com/onegov/onegov-cloud/commit/bb51ef4c07fbe2a7e50b25d914f2cb94883509b5)

##### Fix marker visibility in directories for new access types

`Bugfix` | [OGC-1395](https://linear.app/onegovcloud/issue/OGC-1395) | [edf7be212d](https://github.com/onegov/onegov-cloud/commit/edf7be212db5ef1fc6a46e5f3d2b63be569a998a)

### Topics

##### For each topic, one can choose between 'eastern' and 'western' name order for listed persons

eastern order: family name, given name
western order: given name, family name

`Feature` | [OGC-1383](https://linear.app/onegovcloud/issue/OGC-1383) | [3b3b08f5ce](https://github.com/onegov/onegov-cloud/commit/3b3b08f5ced9d8e142ef18174f32376a69dfc2f0)

### Town

##### Submissions are now ordered by name

`Feature` | [OGC-1345](https://linear.app/onegovcloud/issue/OGC-1345) | [d6b4438fe0](https://github.com/onegov/onegov-cloud/commit/d6b4438fe038d16a980bee7973c7c566e67cf14e)

7 changes: 2 additions & 5 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@ install_requires =
html2text
html5lib
humanize
# FIXME: OGC-1854
icalendar<6
icalendar
isodate
itsdangerous
jsonpickle
Expand Down Expand Up @@ -202,14 +201,12 @@ mypy =
types-bleach
types-editdistance
types-html5lib
# FIXME: OGC-1854
types-icalendar<6
types-icalendar
types-ldap3
types-libsass
types-lxml
types-openpyxl
types-passlib
types-pillow
types-polib
types-psutil
types-psycopg2
Expand Down
2 changes: 1 addition & 1 deletion src/onegov/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# version is to create release-dependent urls, artifacts and caches. During
# development these dependencies do not need to be updated in lock-step.
#
__version__ = '2024.49'
__version__ = '2024.50'

# The module levels used for dependency tests and to have a well defined
# onegov core upgrade order.
Expand Down
4 changes: 3 additions & 1 deletion src/onegov/core/i18n/translation_string.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@
from typing import Literal
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from markupsafe import HasHTML
from typing import Protocol
from typing import Self

class HasHTML(Protocol):
def __html__(self, /) -> str: ...

class TStrCallable(Protocol):
@overload
def __call__(
Expand Down
8 changes: 2 additions & 6 deletions src/onegov/election_day/views/opendata_swiss.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,12 +322,8 @@ def translate(text: 'TranslationString', locale: str) -> str:
sub(dist, 'dcat:downloadURL', {'rdf:resource': url})

# Legal
license = sub(
dist, 'dct:license',
{'rdf:about': 'http://dcat-ap.ch/vocabulary/licenses/terms_by'}
)
sub(license, 'rdf:type', {
'rdf:resource': 'http://purl.org/dc/terms/RightsStatement'
sub(dist, 'dct:license', {
'rdf:resource': 'http://dcat-ap.ch/vocabulary/licenses/terms_by'
})

# Media Type
Expand Down
13 changes: 9 additions & 4 deletions src/onegov/event/collections/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,12 +432,17 @@ def from_ical(
if tags:
# categories may be in lists or they may be single values
# whose 'cats' member contains the texts
if not hasattr(tags, '__iter__'):
if (
not hasattr(tags, '__iter__')
# v6 added an __iter__ method to vCategory
# but it's not what we want to ierate over
or isinstance(tags, vCategory)
):
tags = [tags]

# Filter out strings or invalid objects without 'cats'
tags = [str(c) for tag in tags
if not isinstance(tag, str) and hasattr(tag, 'cats')
tags = [
str(c)
for tag in tags
for c in tag.cats
if c
]
Expand Down
2 changes: 1 addition & 1 deletion src/onegov/file/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def generate_thumbnail(
) -> tuple[BytesIO, tuple[str, str]]:
output = BytesIO()

thumbnail = Image.open(fp)
thumbnail: Image.Image = Image.open(fp)
thumbnail.thumbnail(self.size, Image.Resampling.LANCZOS)
thumbnail = thumbnail.convert('RGBA')

Expand Down
Loading

0 comments on commit 35ce6b0

Please sign in to comment.