Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
voisardf committed Oct 26, 2023
2 parents 9721536 + da2a25b commit f4e9eb7
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 24 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@ jobs:
needs: [lint, gitattributes]
steps:
- uses: actions/checkout@master
- name: Set up Python 3.8
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.11
- name: Install pypa/build
run: >-
python -m
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/daily_check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ jobs:
env:
PYTHON_TEST_VERSION: ${{ matrix.python-version }}
run: make tests
- name: Set up Python 3.8
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.11
- name: Install pypa/build
run: >-
python -m
Expand Down
6 changes: 6 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Changelog
=========

2.4.6
-----
- Fix error with large of contents and new pdf library (#1813)
- Fix timestamp for archived PDF (#1815)
- Library upgrades (SQLAlchemy, geoalchemy2, shapely, psycopg2, pyreproj, pyramid, responses, urllib, pillow, pypdf, jsonschema)

2.4.5
-----
- Fix base layer usage in grouped PLRs (#1302)
Expand Down
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
FROM python:3.11-buster

ENV DEBIAN_FRONTEND=noninteractive
ENV VIRTUALENV_PYTHON=/usr/bin/python3.8

ARG DEV_PACKAGES="build-essential"

Expand Down
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -328,12 +328,12 @@ tests: ${VENV_ROOT}/requirements-timestamp test-core test-contrib-print_proxy-ma
.PHONY: docker-tests
docker-tests:
echo "Running tests as user ${LOCAL_UID}:${LOCAL_GID}"
docker-compose run --rm -e PGHOST=oereb-db -e UID=${LOCAL_UID} -e GID=${LOCAL_GID} oereb-server make build lint tests
docker-compose down
docker compose run --rm -e PGHOST=oereb-db -e UID=${LOCAL_UID} -e GID=${LOCAL_GID} oereb-server make build lint tests
docker compose down

.PHONY: docker-clean-all
docker-clean-all:
docker-compose run --rm oereb-make clean-all
docker compose run --rm oereb-make clean-all

.PHONY: check
check: git-attributes lint test
Expand All @@ -354,10 +354,10 @@ updates: $(PIP_REQUIREMENTS)

.PHONY: serve-dev
serve-dev: development.ini build
docker-compose up -d oereb-db
docker compose up -d oereb-db
$(VENV_BIN)/pserve $< --reload

.PHONY: serve
serve: development.ini build
docker-compose up -d oereb-db
docker compose up -d oereb-db
$(VENV_BIN)/pserve $<
22 changes: 11 additions & 11 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ Starting the development server
#. Build run the initial build depending on your OS:

* ``docker network create print-network``
* Linux: ``docker-compose run --rm -u $(id -u):$(id -g) oereb-make build``
* MAC/Windows: ``docker-compose run --rm oereb-make build``
* Linux: ``docker compose run --rm -u $(id -u):$(id -g) oereb-make build``
* MAC/Windows: ``docker compose run --rm oereb-make build``

#. ``docker-compose up``
#. ``docker compose up``

Running ``docker-compose up`` will start the DB (it will automatically import the test/dev data on startup) and start
Running ``docker compose up`` will start the DB (it will automatically import the test/dev data on startup) and start
a running instance of the pyramid_oereb DEV server connected to the DB. The project folder is mounted
to it. So changes take effect.

Expand All @@ -45,8 +45,8 @@ To run the tests locally:
The docker way:
---------------
* ``docker network create print-network``
* Linux: ``docker-compose run --rm -u $(id -u):$(id -g) oereb-server make build tests``
* MAC/Windows: ``docker-compose run --rm oereb-server make build tests``
* Linux: ``docker compose run --rm -u $(id -u):$(id -g) oereb-server make build tests``
* MAC/Windows: ``docker compose run --rm oereb-server make build tests``

For systems having a local make tool, the following recipe can be used:
``make docker-tests``
Expand All @@ -59,7 +59,7 @@ Local tests:
------------
For local tests without the complete docker composition you need a running DB.
You can create one based on the oereb image:
``docker-compose up -d oereb-db``
``docker compose up -d oereb-db``

or create an empty postgis DB
``docker run -p 5555:5432 --name pg_oereb --rm -it -e POSTGRES_PASSWORD=pw postgis/postgis``
Expand All @@ -74,7 +74,7 @@ To run one specfic test:

.. code-block:: bash
docker-compose exec oereb-server PYTEST_OPTS="-k <name_of_the_test>" make tests
docker compose exec oereb-server PYTEST_OPTS="-k <name_of_the_test>" make tests
Troubleshooting
---------------
Expand All @@ -83,14 +83,14 @@ In this case cleanup can be done like:

.. code-block:: bash
docker-compose run --rm oereb-make clean-all
docker compose run --rm oereb-make clean-all
Useful ``make`` targets
=======================

Run the ``make`` targets found in the Makefile either in the ``oereb-server`` container (if using ``docker-compose``) or in your local shell (if running the server locally).
Run the ``make`` targets found in the Makefile either in the ``oereb-server`` container (if using ``docker compose``) or in your local shell (if running the server locally).
Some useful targets:

- ``make serve-dev`` to run the application
Expand All @@ -113,7 +113,7 @@ There are further make targets to check the validity of federal data:
Using MapFish-Print
===================

To be able to test the OEREB static extract (pdf), you need to run ``pyramid_oereb`` with ``docker-compose`` and to have a running instance of `pyramid_oereb_mfp <https://github.com/openoereb/pyramid_oereb_mfp>`__.
To be able to test the OEREB static extract (pdf), you need to run ``pyramid_oereb`` with ``docker compose`` and to have a running instance of `pyramid_oereb_mfp <https://github.com/openoereb/pyramid_oereb_mfp>`__.
The Docker network ``print-network`` is also required and can be created with:

.. code-block:: bash
Expand Down
8 changes: 8 additions & 0 deletions doc/source/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ Changes/Hints for migration
This chapter will give you hints on how to handle version migration, in particular regarding what you may need
to adapt in your project configuration, database etc. when upgrading to a new version.

Version 2.4.6
-------------
Bug-fix and maintenance release:

* Fix error with large of contents and new pdf library (#1813)
* Fix timestamp for archived PDF (#1815)
* Library upgrades (SQLAlchemy, geoalchemy2, shapely, psycopg2, pyreproj, pyramid, responses, urllib, pillow, pypdf, jsonschema)

Version 2.4.5
-------------
Bug-fix and maintenance release:
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pypdf==3.16.4
filetype==1.2.0
geoalchemy2==0.14.1
geoalchemy2==0.14.2
pyramid==2.0.2
pyramid-debugtoolbar==4.10
qrcode==7.4.2
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

setup(
name='pyramid_oereb',
version='2.4.5',
version='2.4.6',
description='pyramid_oereb, extension for pyramid web frame work to provide '
'a basic server part for the oereb project',
long_description='{readme}\n\n{changes}'.format(readme=README, changes=CHANGES),
Expand Down
2 changes: 1 addition & 1 deletion tests-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
jsonschema==4.19.1
lxml==4.9.3
pytest==7.4.2
pytest==7.4.3
pytest-cov==4.1.0
pytest-ordering==0.6
requests-mock==1.11.0
Expand Down

0 comments on commit f4e9eb7

Please sign in to comment.