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

New Release 2024-12-18-rc1 #4514

Merged
merged 63 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
2ee0c1b
PB-1141 : update layer list in FAQ
pakb Nov 14, 2024
8ae1290
Merge pull request #4486 from geoadmin/bug-PB-1141-fix-faq-layer-list
pakb Nov 14, 2024
bd8eefc
BGDIDIC-2622: fix web url
faselm Nov 15, 2024
53b5f48
BGDIDIC-2622: fix lint
faselm Nov 15, 2024
102a3cf
Merge pull request #4491 from geoadmin/data-BGDIDIC-2622-cern
faselm Nov 18, 2024
3fde40b
BGDIDIC-2878: delete model
faselm Nov 19, 2024
d938a21
BGDIDIC-2878: delete makos
faselm Nov 19, 2024
aa57084
BGDIDIC-2878: delete legends
faselm Nov 19, 2024
3ee9d2d
Merge pull request #4492 from geoadmin/data-BGDIDIC-2878-geologie-geo…
faselm Nov 19, 2024
b4764f0
BGDIDIC-2888: add legends
faselm Nov 20, 2024
fc428bf
Merge pull request #4493 from geoadmin/data-BGDIDIC-2888-wohngebiete-…
faselm Nov 20, 2024
e67ee98
BGDIDIC-2888: fix legend typo
faselm Nov 21, 2024
d6d9505
Merge pull request #4494 from geoadmin/data-BGDIDIC-2888-wohngebiete-…
faselm Nov 21, 2024
a7b8d22
PB-1241: adapted lark transformer to work with v0.12
boecklic Nov 28, 2024
3faedc6
PB-1241: fix return value of other callback methods
ltclm Nov 28, 2024
6e3f990
PB-1241 :update lark_parser version from 0.7.8 to 0.12.0
ltclm Nov 29, 2024
6edcff5
PB-1241: remove the akhet library and revert some of the changes
ltclm Nov 28, 2024
52e958f
PB-1241: with the removal of the akhet library from the Pipfile
ltclm Nov 28, 2024
0b63b1e
PB-1241: remove robots.txt symlink from entrypoint
ltclm Nov 28, 2024
51f5b2e
PB-1241: remove locationmatch as the header is already set in the cal…
ltclm Nov 28, 2024
5624568
PB-1241: remove pyproj pin
ltclm Nov 29, 2024
6e49d84
Merge pull request #4498 from geoadmin/feat_PB-1241_akhet
ltclm Dec 2, 2024
bb96de1
BGDIDIC-1374: delete models
faselm Dec 2, 2024
fb40791
BGDIDIC-1374: adapt test identify for oereb v2
faselm Dec 2, 2024
077c534
BGDIDIC-403: add new attributes gpstime_min and gpstime_max
ltclm Dec 2, 2024
5fb2dc6
Merge pull request #4501 from geoadmin/data_BGDIDIC-403_schema_change
ltclm Dec 2, 2024
9f03dbd
Merge pull request #4500 from geoadmin/data-BGDIDIC-1374-decomm-oereb-v1
faselm Dec 2, 2024
da228e0
Merge pull request #4496 from geoadmin/master
rebert Dec 2, 2024
c93a074
BGDIDIC-1370 remove rasterization in tooltip
marionb Dec 2, 2024
87bebc7
Merge pull request #4502 from geoadmin/data-BGDIDIC-1370-sis-deraseti…
marionb Dec 3, 2024
eaf47cc
BGDIDIC-2622: update legends
faselm Dec 4, 2024
08bf53f
Merge pull request #4503 from geoadmin/data-BGDIDIC-2622-cern
faselm Dec 4, 2024
1e80791
PB-1269, PB-1241: Fix cross domain policy
ltshb Dec 5, 2024
1916d21
Merge pull request #4504 from geoadmin/bug-PB-1269-cross-domain-policy
ltshb Dec 5, 2024
8d515e5
BGDIDIC-1703: update legends
faselm Dec 5, 2024
d684813
Merge pull request #4505 from geoadmin/data-BGDIDIC-1703-hydroweb-mes…
faselm Dec 5, 2024
bd6f7d4
BGDIDIC-2651: update link labels
faselm Dec 5, 2024
216527d
Merge pull request #4506 from geoadmin/data-BGDIDIC-2651-geologie-ref…
faselm Dec 6, 2024
dce30b9
BGDIDIC-651 Remove rasterization
marionb Dec 9, 2024
d2b1cfa
Merge pull request #4507 from geoadmin/data-BGDIDIC-651_SPA_Remove_ra…
marionb Dec 9, 2024
1ca5150
solve conflicts
hansmannj Dec 9, 2024
733527d
BGDIDIC-2622: use stabil_id
faselm Dec 9, 2024
771d551
BGDIDIC-1370 Remove rasterization also for anhoerung layer
marionb Dec 9, 2024
6f8b2b6
BGDIDIC-2504: handle no data value
faselm Dec 10, 2024
94cf7bf
Merge pull request #4509 from geoadmin/data-BGDIDIC-1370-SIS_anhoereu…
marionb Dec 10, 2024
3968dd5
BGDIDIC-2504: update legends
faselm Dec 10, 2024
baf5ce5
PB-974: secrets.yml and README.md
hansmannj Dec 10, 2024
8faf724
Merge pull request #4511 from geoadmin/feat_PB-974_adapt_secrets_yml_…
hansmannj Dec 11, 2024
906fad1
Merge pull request #4510 from geoadmin/data-BGDIDIC-2622-cern
faselm Dec 11, 2024
0c448ad
Merge pull request #4512 from geoadmin/data-BGDIDIC-2504-lebensraumka…
faselm Dec 11, 2024
2fe1b26
deploy-20241218: update boundaries
rebert Dec 10, 2024
4dde4dd
add ltfas layers
faselm Dec 12, 2024
33a369f
add ltfas layers
faselm Dec 12, 2024
6fd7dd6
add ltfas layers
faselm Dec 12, 2024
78a71e2
Add announcements
mariokeusen Dec 13, 2024
28fa9c3
Update index.rst
GeoPhilo Dec 16, 2024
cd76fcc
deploy-20241218: update snowsport
rebert Dec 16, 2024
b8f1eec
PB-1167: add comment about changes in fuzzy search behaviour
ltclm Dec 16, 2024
7d74de7
add ltfas layers
faselm Dec 16, 2024
b201d8b
add updates wildruhe
mariokeusen Dec 16, 2024
c4b9800
Update index.rst
mariokeusen Dec 16, 2024
786ad8c
fix tables
ltclm Dec 17, 2024
adb3476
Merge pull request #4513 from geoadmin/feat-relnotes_20241218
rebert Dec 17, 2024
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: 9 additions & 9 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,15 @@ cachetools = "~=5.2"
decorator = "~=5.1"
esrijson = "~=0.4"
gatilegrid = "~=0.2"
geojson = "~=2.5"
lark_parser = "~=0.7.8"
geojson = "~=3.0"
lark_parser = "~=0.12.0"
networkx = "~=2.8"
papyrus = "~=2.4"
papyrus = "==2.5"
SQLAlchemy = "~=1.4.48"
GeoAlchemy2 = "~=0.13.0"
Pillow = "~=9.2"
polib = "~=1.1"
psycopg2-binary = "~=2.9"
pyproj = "~=3.4"
pyproj = "==3.6.1"
pyramid = "~=2.0"
pyramid-mako = "~=1.1"
pyramid-tm = "~=2.5"
Expand All @@ -28,15 +27,16 @@ pytz = "~=2022.4"
PyYAML = "~=6.0"
regex = "~=2022.9.13"
requests = "~=2.28"
Shapely = "~=1.8"
Shapely = "~=2.0"
numpy = "==2.0.2"
simplejson = "~=3.17"
unidecode = "~=1.3"
Akhet = "~=2.0"
logging-utilities = "~=3.1.1"
pyramid-exclog = "~=1.1"
GeoAlchemy2 = "==0.13.3"

[dev-packages]
waitress = "~=2.1"
waitress = "~=3.0"
PyRSS2Gen = "~=1.1"
flake8 = "*"
pep8 = "*"
Expand All @@ -51,7 +51,7 @@ Sphinx = "~=5.2"
sphinx-rtd-theme = "~=1.0"
nose2 = "*"
coverage = "~=4.5"
numpy = "*"
numpy = "==2.0.2"
requests-mock = "~=1.12.1"

[requires]
Expand Down
196 changes: 122 additions & 74 deletions Pipfile.lock

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ make setup
Build the Pylons settings files and run the local `waitress` server

```bash
summon make serve
summon -p ssm make serve
```

You may want to customize the variables. Copy the file `.env.default` as `.ven.mine`,
change the variables you want and use them with

```bash
summon make ENV_FILE=.env.mine serve
summon -p ssm make ENV_FILE=.env.mine serve
```

:book: You need some external ressource to run the service, see [External ressources dependencies](#external-ressources-dependencies)
Expand All @@ -71,7 +71,7 @@ You can use the ssh port forwarding feature to have access to `pg-geodata-replic
ssh ssh0a.prod.bgdi.ch -L 5432:pg-geodata-replica.bgdi.ch:5432
```

Then set the `DBHOST` environment variable to `localhost` (you can do this in your own environment file e.g. `.env.mine` and run the make file as follow: `summon make ENV_FILE=.env.mine serve`)
Then set the `DBHOST` environment variable to `localhost` (you can do this in your own environment file e.g. `.env.mine` and run the make file as follow: `summon -p ssm make ENV_FILE=.env.mine serve`)

### S3 Vector Bucket Access

Expand All @@ -96,7 +96,7 @@ make dockerbuild
### Docker run locally

```bash
summon make dockerrun
summon -p ssm make dockerrun
```

:book: You need some external ressource to run the service, see [External ressources dependencies](#external-ressources-dependencies)
Expand Down Expand Up @@ -130,19 +130,19 @@ See [External Ressources Dependencies](#external-ressources-dependencies) for mo
To run the tests enter

```bash
summon make test
summon -p ssm make test
```

Or if you use your own environment file

```bash
summon make ENV_FILE=.env.mine test
summon -p ssm make ENV_FILE=.env.mine test
```

**:warning: If you don't have AWS Access you can disable the S3 tests as follow**

```bash
summon make S3_TESTS=0 test
summon -p ssm make S3_TESTS=0 test
```

## Download WMS image legends
Expand Down
19 changes: 19 additions & 0 deletions apache/wsgi-py3.conf.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,32 @@ WSGIPassAuthorization On
# Redirect no-slash target to slashed version
RedirectMatch ^${APACHE_ENTRY_PATH}$ ${APACHE_ENTRY_PATH}/

# Info
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^${APACHE_ENTRY_PATH}/static/info\.json https://%{HTTP_HOST}%{REQUEST_URI} [R,L]

# Info
RewriteRule ^${APACHE_ENTRY_PATH}/info.json ${APACHE_ENTRY_PATH}/static/info.json [PT]

# Static for cross domain flash/arcgis
RewriteRule ^${APACHE_ENTRY_PATH}/(crossdomain.xml|clientaccesspolicy.xml) ${APACHE_ENTRY_PATH}/static/$1 [PT]
<LocationMatch ^${APACHE_ENTRY_PATH}/static/(crossdomain.xml|clientaccesspolicy.xml)>
Header set Content-type "text/x-cross-domain-policy"
</LocationMatch>

# New style config url (see mf-geoadmin3 #4687)
RewriteRule ^${APACHE_ENTRY_PATH}/configs/(de|fr|it|rm|en)/layersConfig\.json ${APACHE_ENTRY_PATH}/rest/services/all/MapServer/layersConfig?lang=$1 [PT]
RewriteRule ^${APACHE_ENTRY_PATH}/configs/(de|fr|it|rm|en)/translations\.json ${APACHE_ENTRY_PATH}/rest/services/translations?lang=$1 [PT]
RewriteRule ^${APACHE_ENTRY_PATH}/configs/(de|fr|it|rm|en)/catalog\.(\w+)\.json ${APACHE_ENTRY_PATH}/rest/services/$2/CatalogServer?lang=$1 [PT]
RewriteRule ^${APACHE_ENTRY_PATH}/configs/(de|fr|it|rm|en)/services\.json ${APACHE_ENTRY_PATH}/rest/services [PT]
RewriteRule ^${APACHE_ENTRY_PATH}/configs/services\.json ${APACHE_ENTRY_PATH}/rest/services [PT]

# Robots static files
RewriteRule ^${APACHE_ENTRY_PATH}/robots.txt ${APACHE_ENTRY_PATH}/static/${ROBOTS_FILE} [PT]
<LocationMatch ^${APACHE_ENTRY_PATH}/static/(robots.txt|robots_dev.txt|robots_prod.txt)>
Header set Content-type "text/plain"
</LocationMatch>

############ WSGI #################################3

${LOAD_WSGI_MODULE_DIRECTIVE}
Expand Down
3 changes: 0 additions & 3 deletions chsdi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ def main(global_config, **settings):
request_method = tuple(settings.get('request_method').replace(' ', '').split(','))
config = Configurator(settings=settings, request_factory=WsgiSchemeAdaptedRequest)
config.include('pyramid_mako')
config.include('akhet.static')

# wrapper around all views
# This is a wrapper function around all views. If OPTIONS is given, an empty string will be returned
Expand Down Expand Up @@ -111,12 +110,10 @@ def datetime_adapter(obj, request):
config.add_route('translations', '/rest/services/translations', request_method=request_method)

config.add_route('stationboard', '/stationboard/stops/{id}', request_method=request_method)
config.add_route('faqlist', '/rest/services/{map}/faqlist', request_method=request_method)
config.add_route('color', '/color/{r},{g},{b}/{image}', request_method=request_method)

# Static route
static_max_age = int(settings['static_max_age']) if settings['static_max_age'] else None
config.add_static_route('chsdi', 'static', cache_max_age=static_max_age)

# Some views for specific routes
config.add_view(route_name='dev', renderer='chsdi:templates/index.mako')
Expand Down
6 changes: 3 additions & 3 deletions chsdi/lib/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
expression: WORD is_not_null
| WORD IS_NOT BOOLEAN
| WORD operators SIGNED_NUMBER
| WORD operators_likes ESCAPED_QUOTED_STRING
| WORD operators_likes ESCAPED_QUOTED_STRING

operators: OPERATORS -> ops
operators_likes: OPERATORS | LIKES
Expand Down Expand Up @@ -121,7 +121,7 @@ def operators_likes(self, s):

def BOOLEAN(self, s):
# log.debug(u'boolean: {}'.format(str(s)))
return "true" == str(s[0]).lower()
return "true" if s.lower() == "true" else "false"

def IS_NOT(self, s):
return str(s[0]).lower()
return s.lower()
20 changes: 0 additions & 20 deletions chsdi/models/vector/dritte.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,35 +145,15 @@ class AsylPlanning:
class AsylPlanningAnhoerung(Base, AsylPlanning, Vector):
__tablename__ = 'sachplan_asyl_plmeasures_anhorung'
__bodId__ = 'ch.sem.sachplan-asyl_anhoerung'
__minscale__ = 20005
__maxscale__ = 500005


class AsylPlanningRasterAnhoerung(Base, AsylPlanning, Vector):
__tablename__ = 'sachplan_asyl_plmeasures_r_anhorung'
__bodId__ = 'ch.sem.sachplan-asyl_anhoerung'
__maxscale__ = 20005
__minscale__ = 1


class AsylPlanningKraft(Base, AsylPlanning, Vector):
__tablename__ = 'sachplan_asyl_plmeasures_kraft'
__bodId__ = 'ch.sem.sachplan-asyl_kraft'
__minscale__ = 20005
__maxscale__ = 500005


class AsylPlanningRasterKraft(Base, AsylPlanning, Vector):
__tablename__ = 'sachplan_asyl_plmeasures_r_kraft'
__bodId__ = 'ch.sem.sachplan-asyl_kraft'
__maxscale__ = 20005
__minscale__ = 1


register('ch.sem.sachplan-asyl_anhoerung', AsylPlanningAnhoerung)
register('ch.sem.sachplan-asyl_anhoerung', AsylPlanningRasterAnhoerung)
register('ch.sem.sachplan-asyl_kraft', AsylPlanningKraft)
register('ch.sem.sachplan-asyl_kraft', AsylPlanningRasterKraft)


class ArmasuisseNaturLandschaftArmee(Base, Vector):
Expand Down
17 changes: 10 additions & 7 deletions chsdi/models/vector/evd.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ class SachplanCernAnhoerungFac:
__table_args__ = ({'schema': 'sbfi', 'autoload': False})
__bodId__ = 'ch.sbfi.sachplan-cern_anhoerung'
__label__ = 'objname_de'
id = Column('bgdi_id', Integer, primary_key=True)
id = Column('stabil_id', Unicode, primary_key=True)
objname_de = Column('objname_de', Unicode)
objname_fr = Column('objname_fr', Unicode)
objname_it = Column('objname_it', Unicode)
Expand All @@ -262,25 +262,23 @@ class SachplanCernAnhoerungFac:

class SachplanCernAnhoerungFacPnt(Base, SachplanCernAnhoerungFac, Vector):
__tablename__ = 'sachplan_cern_anhoerung_fac_pnt'
__template__ = 'templates/htmlpopup/sbfi_sachplan_cern_anhoerung_pnt.mako'
__template__ = 'templates/htmlpopup/sbfi_sachplan_cern_anhoerung_fac_pnt.mako'

register('ch.sbfi.sachplan-cern_anhoerung', SachplanCernAnhoerungFacPnt)


class SachplanCernAnhoerungFacLine(Base, SachplanCernAnhoerungFac, Vector):
__tablename__ = 'sachplan_cern_anhoerung_fac_line'
__template__ = 'templates/htmlpopup/sbfi_sachplan_cern_anhoerung_line.mako'
__template__ = 'templates/htmlpopup/sbfi_sachplan_cern_anhoerung_fac_line.mako'

register('ch.sbfi.sachplan-cern_anhoerung', SachplanCernAnhoerungFacLine)


class SachplanCernAnhoerungPlmPoly(Base, Vector):
__tablename__ = 'sachplan_cern_anhoerung_plm_poly'
class SachplanCernAnhoerungPlm:
__table_args__ = ({'schema': 'sbfi', 'autoload': False})
__bodId__ = 'ch.sbfi.sachplan-cern_anhoerung'
__template__ = 'templates/htmlpopup/sbfi_sachplan_cern_anhoerung_poly.mako'
__label__ = 'plname_de'
id = Column('bgdi_id', Integer, primary_key=True)
id = Column('stabil_id', Unicode, primary_key=True)
plname_de = Column('plname_de', Unicode)
plname_fr = Column('plname_fr', Unicode)
plname_it = Column('plname_it', Unicode)
Expand All @@ -306,6 +304,11 @@ class SachplanCernAnhoerungPlmPoly(Base, Vector):
doc_web_it = Column('doc_web_it', Unicode)
the_geom = Column(Geometry2D)


class SachplanCernAnhoerungPlmPoly(Base, SachplanCernAnhoerungPlm, Vector):
__tablename__ = 'sachplan_cern_anhoerung_plm_poly'
__template__ = 'templates/htmlpopup/sbfi_sachplan_cern_anhoerung_plm_poly.mako'

register('ch.sbfi.sachplan-cern_anhoerung', SachplanCernAnhoerungPlmPoly)


Expand Down
Loading
Loading