Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
gmweaver committed Jun 6, 2024
1 parent 9f4d708 commit ad9f13a
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 60 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
cibw_build: ["cp39-* cp310-* cp311-*"]
os: [ubuntu-latest, macos-13, macos-latest]

steps:
- uses: actions/checkout@v4
Expand Down
35 changes: 0 additions & 35 deletions install_libpostal.sh

This file was deleted.

2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[project]
name = "libpypostal"
version = "1.1.0"
readme = "README.md"
requires-python = ">=3.8"

[build-system]
requires = ["setuptools"]
Expand Down
19 changes: 0 additions & 19 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,5 @@
import ctypes.util
import subprocess
import tempfile

from setuptools import setup, Extension


def _libpostal_installed() -> bool:
"""Checks if libpostal is installed."""
return ctypes.util.find_library("postal") is not None


def _install_libpostal() -> None:
"""Installs libpostal."""
with tempfile.TemporaryDirectory() as tempdir:
subprocess.run(["./install_libpostal.sh", tempdir], check=True)


# if not _libpostal_installed():
# _install_libpostal()

ext_modules = [
Extension(
"libpypostal._parser",
Expand Down
8 changes: 4 additions & 4 deletions tests/test_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from libpypostal import parser


@patch("libpypostal._parse_address")
@patch("libpypostal.parser._parse_address")
def test_parse_address_single_match_each_component(
mock__parser_parse_address: MagicMock,
) -> None:
Expand Down Expand Up @@ -44,11 +44,11 @@ def test_parse_address_single_match_each_component(

assert actual == expected
mock__parser_parse_address.assert_called_once_with(
test_address, language=None, country=None
test_address, language=None, country_code=None
)


@patch("libpypostal._parse_address")
@patch("libpypostal.parser._parse_address")
def test_parse_address_multiple_matches_for_component(
mock__parser_parse_address: MagicMock,
) -> None:
Expand Down Expand Up @@ -89,5 +89,5 @@ def test_parse_address_multiple_matches_for_component(

assert actual == expected
mock__parser_parse_address.assert_called_once_with(
test_address, language=None, country=None
test_address, language=None, country_code=None
)

0 comments on commit ad9f13a

Please sign in to comment.