Skip to content

Commit 99368b3

Browse files
authored
Merge pull request #101 from geoadmin/feat_PB-2241_new_babs_signatures
PB-2241: implement new version of BABS signatures
2 parents e07536e + 6a82aba commit 99368b3

File tree

504 files changed

+3134
-408
lines changed

Some content is hidden

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

504 files changed

+3134
-408
lines changed

.pylintrc

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@ load-plugins=pylint_flask
3636
# Pickle collected data for later comparisons.
3737
persistent=yes
3838

39-
# When enabled, pylint would attempt to guess common misconfiguration and emit
40-
# user-friendly hints instead of false-positive error messages.
41-
suggestion-mode=yes
42-
4339
# Allow loading of arbitrary C extensions. Extensions are imported into the
4440
# active Python interpreter and may run arbitrary code.
4541
unsafe-load-any-extension=no
@@ -480,6 +476,9 @@ preferred-modules=
480476

481477
[DESIGN]
482478

479+
# Maximum number of positional arguments for function / method.
480+
max-positional-arguments = 8
481+
483482
# Maximum number of arguments for function / method.
484483
max-args=5
485484

@@ -513,8 +512,5 @@ min-public-methods=2
513512

514513
[EXCEPTIONS]
515514

516-
# Exceptions that will emit a warning when being caught. Defaults to
517-
# "BaseException, Exception".
518-
overgeneral-exceptions=BaseException,
519-
Exception,
520-
StandardError
515+
# Exceptions that will emit a warning when being caught.
516+
overgeneral-exceptions=builtins.BaseException,builtins.Exception

Pipfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@ werkzeug = "~=3.0.4"
1616
[dev-packages]
1717
yapf = "*"
1818
nose2 = "*"
19-
pylint = "*"
2019
pylint-flask = "*"
2120
cairosvg = "*"
21+
pandas = "*"
22+
openpyxl = "*"
23+
pylint = "*"
2224

2325
[requires]
2426
python_version = "3.12"

Pipfile.lock

Lines changed: 580 additions & 386 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
- [Docker](#docker)
2121
- [Maintenance](#maintenance)
2222
- [Convert Symbols from svg to png](#convert-symbols-from-svg-to-png)
23+
- [Additional requirements for new symbol sets](#additional-requirements-for-new-symbol-sets)
2324
- [Deployment](#deployment)
2425
- [Deployment configuration](#deployment-configuration)
2526

@@ -175,6 +176,11 @@ pipenv run python scripts/svg2png.py --help
175176
```pipenv run python scripts/svg2png.py -I ./tmp/new-icons -O ./static/images/babs2 -W 48 -H 48
176177
```
177178

179+
### Additional requirements for new symbol sets
180+
181+
- No special characters, umlauts or spaces in the filenames, such as e.g. `, `, `'` and the like. Only allowed exception is `-`. So all special characters will be replaced by `-` and umlauts will be mapped, e.g. `ö` to `oe`, `Ö` to `OE` and so on.
182+
- The symbol set provider should provide us with a list (e.g. Excel) that includes a column with the filename (including the `.svg` extension) of each icon and another column with the text, that we show in the mouseover tooltip when hovering over that specific icon. We need those columns for all the supported languages.
183+
178184
## Deployment
179185
180186
### Deployment configuration

app/settings.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,14 @@
2020

2121
UNLISTED_ICON_SETS = split_and_clean_string(os.environ.get('UNLISTED_ICON_SETS', ''))
2222

23-
ICON_SET_LANGUAGE = {'babs-v2-de': 'de', 'babs-v2-fr': 'fr', 'babs-v2-it': 'it'}
23+
ICON_SET_LANGUAGE = {
24+
'babs-v2-de': 'de',
25+
'babs-v2-fr': 'fr',
26+
'babs-v2-it': 'it',
27+
'babs-v3-de': 'de',
28+
'babs-v3-fr': 'fr',
29+
'babs-v3-it': 'it'
30+
}
2431
DEFAULT_COLOR = {"r": '255', "g": '0', "b": '0'}
2532
DEFAULT_ICON_SIZE = 48
2633
TRAP_HTTP_EXCEPTIONS = True

0 commit comments

Comments
 (0)