Skip to content

Commit

Permalink
Merge pull request #2090 from openoereb/update_doc_and_fix_make_check…
Browse files Browse the repository at this point in the history
…_issues

Update doc and fix make check issues
  • Loading branch information
domfre authored Jan 10, 2025
2 parents 335a404 + 1c4a2b6 commit 55c46b9
Show file tree
Hide file tree
Showing 18 changed files with 45 additions and 38 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ Makefile text whitespace=indent-with-non-tab
*.png binary
*.jpg binary
*.jar binary
dev/sample_data/ch.*.json whitespace=-blank-at-eof
5 changes: 5 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ master
------
- Support Oereblex API version 1.2.5 via geolink-formatter 2.0.6 (#2081)

2.5.5
-------------
* Library upgrades (pillow, pytest, webtest, waitress, codecov/codecov-action, geoalchemy, JamesIves/github-pages-deploy-action, urllib3)
* Reset Python Docker Tag to 3.12.5

2.5.4
-----
- New parameter default_toc_length to define a default table of content pages number (#2042)
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ update_fed_data_urls: \

# hard apply the newly generated data to the project. Changes must then be committed
.PHONY: update_fed_data
update_fed_data_urls: prepare_fed_data
update_fed_data: prepare_fed_data
cp $(FED_JSONS) $(PG_DEV_DATA_DIR)

# do everything automatically: find the new URLs, generate json data, copy json to project
Expand Down
11 changes: 5 additions & 6 deletions dev/database/structure/80_oereb_fed_test.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2971,8 +2971,8 @@ OeREBKRM_V2_0.Dokumente.Dokument.Typ typ dokument \N
--

COPY contaminated_civil_aviation_sites.t_ili2db_basket (t_id, dataset, topic, t_ili_tid, attachmentkey, domains) FROM stdin;
2 1 OeREBKRM_V2_0.Dokumente \N OeREBKRM_V2_0_Gesetze_20210414.xml-2
81 80 OeREBKRMtrsfr_V2_0.Transferstruktur \N interlis.xtf-81
2 1 OeREBKRM_V2_0.Dokumente \N OeREBKRM_V2_0_Gesetze_20210414.xml-2
81 80 OeREBKRMtrsfr_V2_0.Transferstruktur \N interlis.xtf-81
\.


Expand Down Expand Up @@ -3820,9 +3820,9 @@ OeREBKRM_V2_0.Dokumente.Dokument.Typ typ dokument \N
--

COPY oerebkrmkvs_v2_0.t_ili2db_basket (t_id, dataset, topic, t_ili_tid, attachmentkey, domains) FROM stdin;
2 1 OeREBKRM_V2_0.Dokumente \N OeREBKRM_V2_0_Gesetze_20210414.xml-2
81 80 OeREBKRMkvs_V2_0.Thema \N OeREBKRM_V2_0_Themen_20210915.xml-81
179 178 OeREBKRMkvs_V2_0.Konfiguration \N OeREBKRM_V2_0_Logos_20210915.xml-179
2 1 OeREBKRM_V2_0.Dokumente \N OeREBKRM_V2_0_Gesetze_20210414.xml-2
81 80 OeREBKRMkvs_V2_0.Thema \N OeREBKRM_V2_0_Themen_20210915.xml-81
179 178 OeREBKRMkvs_V2_0.Konfiguration \N OeREBKRM_V2_0_Logos_20210915.xml-179
\.


Expand Down Expand Up @@ -6245,4 +6245,3 @@ ALTER TABLE ONLY oerebkrmkvs_v2_0.themaref
--
-- PostgreSQL database dump complete
--

7 changes: 7 additions & 0 deletions doc/source/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ master
------
- Support of Oereblex API version 1.2.5 via geolink-formatter 2.0.6 added (#2081). The oereblex schema version that is used to download oereblex xmls can be set in the file pyramid_oereb.yaml.

Version 2.5.5
-------------
Maintenance release:

* Library upgrades (pillow, pytest, webtest, waitress, codecov/codecov-action, geoalchemy, JamesIves/github-pages-deploy-action, urllib3)
* Reset Python Docker Tag to 3.12.5

Version 2.5.4
-------------
Feature and maintenance release:
Expand Down
26 changes: 13 additions & 13 deletions doc/source/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ Configuration
You are looking at a highly configurable piece of software. To get a good understanding of the server it
is recommended to read this part carefully.

The specifications of the oereb data model, the web services, the data extracts and the print layout
The specifications of the oereb data model, the web services, the data extracts and the print layout
by the Swiss Confederation are very precise `OEREB specifications
<https://www.cadastre.ch/de/manual-oereb/publication/instruction.html>`__ . Code development was guided
by the exact implementation of the specifications and the user requirements. Using this pyramid plugin,
you will get a running server providing all the services defined by the federal specifications.
<https://www.cadastre.ch/de/manual-oereb/publication/instruction.html>`__ . Code development was guided
by the exact implementation of the specifications and the user requirements. Using this pyramid plugin,
you will get a running server providing all the services defined by the federal specifications.
The binding of cantonal and federal data to the server is done by the configuration options.

This section describes the different possibilities to adapt the application to work with various data structures or
Expand Down Expand Up @@ -40,7 +40,7 @@ Interlis 2.3 OeREBKRM Transfer Model

All the federal data sets are provided in this data structure. So this is the schema and table model you
want to use for all the federal topics unless you want to transform the data to a specific database structure.
If your cantonal data is also stored based on this model, then you probably want to use this structure
If your cantonal data is also stored based on this model, then you probably want to use this structure
for all topics to homogenize your database content.
The `Ili2pg Oereb Data Import Manual <https://github.com/openoereb/ili2pg_oereb_data_import_manual>`__
explains how to use the ili2pg tool to create the corresponding schema and how to import the XML data.
Expand All @@ -51,7 +51,7 @@ OEREBlex Topic Model

This third model is usefull if you maintain your legal documents using the OEREBlex application and you
have a specific cantonal model for your data. It is similar to the pyramid_oereb standard model, but all
the document related tables are omitted. Instead the documents are linked by the geolink attribute.
the document related tables are omitted. Instead the documents are linked by the geolink attribute.

.. _configuration-additional-topics:

Expand All @@ -62,7 +62,7 @@ If you like to add one or more additional topics based on the *pyramid_oereb sta
you can use the internal command below creating an SQL script to establish the topic schema.

But before creating any new topic structure you have to add its configuration. Open the configuration file
(pyramid_oereb.yml) and copy the section from one of the existing **standard** topics which usually
(pyramid_oereb.yml) and copy the section from one of the existing **standard** topics which usually
looks like this:

.. code-block:: yaml
Expand Down Expand Up @@ -111,7 +111,7 @@ looks like this:
transfer_code: Hinweis
extract_code: Hint
Apply the necessary modifications/replacements for the new topic. This should at least be the schema name,
Apply the necessary modifications/replacements for the new topic. This should at least be the schema name,
code, geometry type and of course the models property within the source parameters:
Make sure that this source class is `pyramid_oereb.contrib.data_sources.*standard*.sources.plr.DatabaseSource`
and not interlis_2_3. - The same goes for the model_factory and the get_symbol element. It should be set to
Expand All @@ -124,26 +124,26 @@ Once the configuration set, run the following command:

.. code-block:: shell
create_standard_tables -c <YOUR_YAML_CONFIGURATION> -T [flag used to skip schema creation]
create_standard_tables -c <YOUR_YAML_CONFIGURATION> -T [flag used to skip schema creation]
--sql-file=<PATH_AND_SQL_SCRIPTNAME> -w [to over-write existing sql instead of append]
The first parameter ``-c or --configuration=YAML`` is the path to your YAML configuration file.
The first parameter ``-c or --configuration=YAML`` is the path to your YAML configuration file.
By default it's *pyramid_oereb.yml*

The second optional parameter ``-s or --section=SECTION`` allows you to specify the section containing
the configuration part to use. Default is *pyramid_oereb*.

The parameter ``-T or --tables-only`` skips the schema creation and creates only the tables.

The option ``--sql-file=SQL_FILE`` generates an SQL file containing the schema and table creation
The option ``--sql-file=SQL_FILE`` generates an SQL file containing the schema and table creation
commands. *SQL_FILE* should be the name or the absolute path of the file. E.g: my_sql_script.sql

If your yaml file uses the c2ctemplate style (starting with vars) you need to add the
``--c2ctemplate-style`` parameter.

The option ``-w or --over-write`` allows you to overwrite an existing sql file. Default is append.

Now you have set up an empty additional topic in your database and you can proceed with deploying
Now you have set up an empty additional topic in your database and you can proceed with deploying
your data into it.

Add additional interlis topics
Expand Down Expand Up @@ -213,7 +213,7 @@ and not standard. - The same goes for the model_factory and the get_symbol eleme
*interlis_2_3*.

Also define the language of the data and if it's a federal (true) or cantonal topic (false). You also want to
define that it is *NOT* the standard structure (false) and what lookup codes are used for the law_status
define that it is *NOT* the standard structure (false) and what lookup codes are used for the law_status
and document types.

Add an OEREBLex Topic
Expand Down
14 changes: 8 additions & 6 deletions doc/source/contrib/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ NOTE

- http://localhost:6543/oereb/versions/json
- http://localhost:6543/oereb/capabilities/json
- http://localhost:6543/oereb/getegrid/json/?XY=2608883,1261844
- http://localhost:6543/oereb/extract/reduced/xml/CH113928077734
- http://localhost:6543/oereb/getegrid/json?EN=2608883,1261844
- http://localhost:6543/oereb/extract/xml?EGRID=CH113928077734

...on Windows
~~~~~~~~~~~~~
Expand Down Expand Up @@ -313,12 +313,14 @@ Browser requests
Once your application has started as describe above,
you can try your oereb server as follows.
In your browser, check the following URL:
* http://localhost:6543/oereb/versions
* http://localhost:6543/oereb/capabilities

* http://localhost:6543/oereb/versions/json
* http://localhost:6543/oereb/capabilities/json

Now try the following requests; these are based on sample data:
* http://localhost:6543/oereb/getegrid/xml/?XY=2608883,1261844
* http://localhost:6543/oereb/extract/reduced/xml/CH113928077734

* http://localhost:6543/oereb/getegrid/xml?EN=2608883,1261844
* http://localhost:6543/oereb/extract/xml?EGRID=CH113928077734

Test suite
~~~~~~~~~~
Expand Down
2 changes: 1 addition & 1 deletion doc/source/contrib/data_sources/oereblex/index.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. _contrib-data-sources-oereblex:

ÖREBlex
=======
========


.. toctree::
Expand Down
2 changes: 1 addition & 1 deletion doc/source/contrib/data_sources/oereblex/index.rst.mako
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. _contrib-data-sources-oereblex:

ÖREBlex
=======
========


.. toctree::
Expand Down
1 change: 0 additions & 1 deletion doc/source/contrib/data_sources/standard/sources.rst
Original file line number Diff line number Diff line change
Expand Up @@ -325,4 +325,3 @@ Sources
:show-inheritance:

.. automethod:: __init__

1 change: 0 additions & 1 deletion doc/source/contrib/print_proxy/xml2pdf.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,3 @@ as an example, or use the ``create_standard_yaml`` script to regenerate your con
:inherited-members:

.. automethod:: __init__

4 changes: 2 additions & 2 deletions doc/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ Installation steps
1. Add package
..............

Add ``pyramid_oereb`` to the list of requirements in your application's ``setup.py``.
In your ``setup.py``, you should depend on ``pyramid_oereb[recommend]`` to get the recommended versions of
Add ``pyramid_oereb`` to the list of requirements in your application's ``setup.py`` or ``pyproject.toml``.
In your ``setup.py`` or ``pyproject.toml``, you should depend on ``pyramid_oereb[recommend]`` to get the recommended versions of
the dependencies of ``pyramid_oereb``, or ``pyramid_oereb[no-version]`` to get the dependencies of
``pyramid_oereb`` without specifying which versions of these dependencies shall be used. You shouldn't just
depend on ``pyramid_oereb`` because this will not take into account the dependencies of ``pyramid_oereb``.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "pyramid_oereb"
version = "2.5.4"
version = "2.5.5"
description = "pyramid_oereb, extension for pyramid web frame work to provide a basic server part for the oereb project"

classifiers=[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@
<data:Language>${localized_image.get('Language') | x}</data:Language>
<data:Blob>${localized_image.get('Image') | x}</data:Blob>
</data:LocalisedBlob>

Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ pyramid_oereb:
wms_url_params:
- TRANSPARENT: 'true'
- OTHERCUSTOM: 'myvalue'

Original file line number Diff line number Diff line change
Expand Up @@ -3874,7 +3874,6 @@
}
]
},

{
"LegendText": [
{
Expand Down
1 change: 0 additions & 1 deletion tests/resources/sample_data/document_type.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,3 @@
}
}
]

1 change: 0 additions & 1 deletion tests/resources/sample_data/law_status.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,3 @@
}
}
]

0 comments on commit 55c46b9

Please sign in to comment.