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

Add example of Finnish addresses #20

Merged
merged 6 commits into from
Apr 3, 2023
Merged

Add example of Finnish addresses #20

merged 6 commits into from
Apr 3, 2023

Conversation

jampukka
Copy link
Collaborator

An example on how-to-run hakunapi to serve addresses of buildings of Finland available from https://www.avoindata.fi/data/fi/dataset/rakennusten-osoitetiedot-koko-suomi

@teezip
Copy link
Collaborator

teezip commented Mar 17, 2023

Read through sample readme, script and conf files under examples/finnish_addresses/.

Seems OK to me. Few minor comments below.

The section "Configuring and running hakunapi" in readme.md:

  • after "Restart your tomcat ... http://localhost:8080/features" it would be nice to have a short list of actions needed after testing in localhost
  • for example what parts in "addresses.properties" should be edited before deploying on a real test or prod server to get server resource links to match a real server
  • no need to have instructions how to setup such server, that's out of scope, but about hakunapi configuration

Other comments:

  • Maybe "api.contact.email" in "cfg/addresses.properties" should be left empty in demo?

@jampukka
Copy link
Collaborator Author

Added section about what to do next/preparing for production. Removed the fake email from example properties.

@teezip
Copy link
Collaborator

teezip commented Mar 27, 2023

Thanks for changes. The readme with "preparing for production" section is good now.

@teezip
Copy link
Collaborator

teezip commented Mar 31, 2023

As commented in #18 : The demo implementation behind https://beta-paikkatieto.maanmittauslaitos.fi/inspire-addresses/features/v1/ is now the demo of Hakunapi called "finnish-addresses" implemented by this pull request.

Some comments from developers (in Finnish) about instructions

Ohjeesta puuttui

  1. komennosta HEADER:
    psql -d address_fin -c "\copy suomi_kunnat (sijaintikunta, nimi_suomi) FROM 'suomi_kunnat.csv' WITH (FORMAT CSV, DELIMITER ';' , HEADER)"

  2. Tiedoston nimi oli väärin: (insert_simple_address.sql
    psql -d address_fin -f simple_addresses.sql

  3. Tietoturva näkemys 

GRANT SELECT käyttjälle ja muut operaatiot tehtiin postgre käyttäjällä

@jampukka
Copy link
Collaborator Author

jampukka commented Apr 3, 2023

Fixed missing HEADER option from copy command, changed insert_simple_address.sql to the correct file name simple_addresses.sql, altered the scripts to suggest creating address_reader as read-only user and running the managerial parts of the scripts as postgres (or other superuser)

@jampukka jampukka merged commit e1c1357 into main Apr 3, 2023
@jampukka jampukka deleted the add-addresses-sample branch May 12, 2023 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants