Skip to content

Commit

Permalink
Updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
sveinbjornt committed Sep 18, 2023
1 parent 307d3dd commit 393a6ac
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
22 changes: 10 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -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.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)
Expand All @@ -287,7 +285,7 @@ python setup.py install

## BSD License

Copyright (C) 2018-2023 Sveinbjorn Thordarson (<[email protected]>)
Copyright (C) 2018-2023 Sveinbjorn Thordarson [&lt;[email protected]&gt;](mailto:[email protected])

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
Expand Down
4 changes: 2 additions & 2 deletions tests/test_iceaddr.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 393a6ac

Please sign in to comment.