diff --git a/README.md b/README.md index a2574dd..2c36d3c 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ -# iceaddr - [![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) [![Python 3.8](https://img.shields.io/badge/python-3.8-blue.svg)](https://www.python.org/downloads/release/python-380/) [![Release](https://shields.io/github/v/release/sveinbjornt/iceaddr?display_name=tag)]() [![PyPI](https://img.shields.io/pypi/v/iceaddr)]() [![Build](https://github.com/sveinbjornt/iceaddr/actions/workflows/python-package.yml/badge.svg)]() +# iceaddr + ### Look up Icelandic street addresses, postcodes and placenames `iceaddr` is a Python >=3.8 package to look up information about Icelandic streets, addresses, placenames, @@ -248,28 +248,26 @@ Then, after optionally creating a virtual environment, run the following command from the repository root to install dependencies: ```bash -pip install -r requirements.txt +pip install ".[dev]" ``` -Then, run the following command to build the database: +Then, run the following commands to build the database: ```bash -$ python build_db.py -... -$ python add_placename_data.py -... +python build_db.py +python add_placename_data.py ``` This creates an SQLite3 database in the repo root named `iceaddr.db`. Move this file to -`iceaddr/resources/` and you can now install your own version of the package: +`src/iceaddr/` and you can now install your own freshly built version of the package: ```bash -python setup.py install +python install . ``` ## Version History -* 0.5.7: Updated address and placename data. Now requires Python 3.8+ (18/09/2024) + * 0.5.6: Updated address and placename data. (11/08/2023) * 0.5.5: Updated address and placename data. Removed ISN93 coords. Now requires Python 3.7+ (11/12/2022) * 0.5.4: Updated address and placename data (09/11/2022) @@ -287,7 +285,7 @@ python setup.py install ## BSD License -Copyright (C) 2018-2023 Sveinbjorn Thordarson () +Copyright (C) 2018-2023 Sveinbjorn Thordarson [<sveinbjorn@sveinbjorn.org>](mailto:sveinbjorn@sveinbjorn.org) Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/tests/test_iceaddr.py b/tests/test_iceaddr.py index 32436ce..244d96a 100644 --- a/tests/test_iceaddr.py +++ b/tests/test_iceaddr.py @@ -55,11 +55,11 @@ def test_address_lookup(): "Vesturland og Vestfirðir", "Þéttbýli", ), - ("Höfðabraut", 3, 805, "Selfoss", "Suðurland og Reykjanes", "Þéttbýli"), + ("Höfðabraut", 3, 805, "Selfoss", "Suðurland og Reykjanes", "Stærra dreifbýli"), ] for p in POSTCODE_TO_PLACENAME: - # print("iceaddr_lookup('{0}', number={1}, postcode={2}".format(p[0], p[1], p[2])) + # print(f"iceaddr_lookup('{p[0]}', number={p[1]}, postcode={p[2]}" res = iceaddr_lookup(p[0], number=p[1], postcode=p[2]) assert res[0]["stadur_nf"] == p[3] assert res[0]["svaedi_nf"] == p[4]