Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
name: Setup Python with uv
description: Set up Python environment using uv package manager
description: Set up Python environment using uv package manager with caching

inputs:
install-extras:
description: 'Whether to install all extras with dependencies'
required: false
default: 'false'
python-version:
description: 'Python version to install'
required: false
default: '3.12'
install-extras:
description: 'Whether to install all extras with dependencies'
required: false
default: 'false'

runs:
using: composite
steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v4
with:
Expand All @@ -34,3 +32,4 @@ runs:
else
uv sync --group dev
fi

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Remove trailing blank line.

YAMLlint reports too many blank lines at the end of the file.

        else
          uv sync --group dev
        fi
-
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
else
uv sync --group dev
fi
🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 35-35: too many blank lines (1 > 0)

(empty-lines)

🤖 Prompt for AI Agents
.github/actions/setup-python-uv/action.yml around line 35: the file ends with an
extra trailing blank line which YAMLlint flags; remove the extra blank line(s)
at the end so the file ends with a single newline (no empty lines after the last
content line).

15 changes: 13 additions & 2 deletions resolved-workflows/lint.yml → .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,19 @@ jobs:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Setup Python with uv
uses: ./.github/actions/setup-python-uv
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v4
with:
version: "latest"
enable-cache: true

- name: Set up Python
run: uv python install 3.12

- name: Install dependencies
run: uv sync --group dev

- name: Run Ruff check
run: uv run ruff check src/ tests/
Expand Down
16 changes: 12 additions & 4 deletions resolved-workflows/tests.yml → .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,19 @@ jobs:
matrix:
python-version: ["3.12", "3.13"]
steps:
- name: Setup Python with uv
uses: ./.github/actions/setup-python-uv
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v4
with:
install-extras: 'true'
python-version: ${{ matrix.python-version }}
version: "latest"
enable-cache: true

- name: Set up Python
run: uv python install ${{ matrix.python-version }}

- name: Install dependencies
run: uv sync --group dev --all-extras

- name: Run tests
run: uv run pytest tests/ -v --tb=short
32 changes: 32 additions & 0 deletions .github/workflows/typecheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Mypy

on:
push:
branches: [main]
pull_request:
branches: [main]

permissions:
contents: read

jobs:
typecheck:
name: Type Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v4
with:
version: "latest"
enable-cache: true

- name: Set up Python
run: uv python install 3.12

- name: Install dependencies
run: uv sync --group dev

- name: Run Mypy
run: uv run mypy src/
22 changes: 22 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
MIT License

Copyright (c) 2025 Abstract-Data

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

189 changes: 0 additions & 189 deletions PR_CONFLICT_RESOLUTION.md

This file was deleted.

12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# RyanData Address Utils

A production-ready Python address parser that uses `usaddress` to parse US addresses into structured Pydantic models with ZIP code and state validation. Features extensible architecture with Protocols, ABCs, and Factory patterns.
[![Tests](https://github.com/Abstract-Data/RyanData-Address-Utils/actions/workflows/tests.yml/badge.svg)](https://github.com/Abstract-Data/RyanData-Address-Utils/actions/workflows/tests.yml)
[![Ruff](https://github.com/Abstract-Data/RyanData-Address-Utils/actions/workflows/lint.yml/badge.svg)](https://github.com/Abstract-Data/RyanData-Address-Utils/actions/workflows/lint.yml)
[![Mypy](https://github.com/Abstract-Data/RyanData-Address-Utils/actions/workflows/typecheck.yml/badge.svg)](https://github.com/Abstract-Data/RyanData-Address-Utils/actions/workflows/typecheck.yml)
[![Python 3.12+](https://img.shields.io/badge/python-3.12+-blue.svg)](https://www.python.org/downloads/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

A Python address parser built for Ryan Data that uses `usaddress` to parse US addresses into structured Pydantic models with ZIP code and state validation.

## Installation

Expand Down Expand Up @@ -41,7 +47,7 @@ result = service.parse("456 Oak Ave, Dallas TX 75201")
- **Validate states** - abbreviations and full names
- **Pandas integration** for batch processing
- **Extensible architecture** - swap parsers, data sources, validators
- **Builder pattern** for programmatic address construction
- **Builder pattern** for programmatic address constructionYes

## Pandas Integration

Expand All @@ -57,7 +63,7 @@ df = pd.DataFrame({
})

service = AddressService()
result = service.parse_dataframe(df, "address")
result = service.parse_dataframe(df, "address") # <-- This is where your named address column goes, and then it'll parse and add the split cols to the dataframe
print(result[["AddressNumber", "StreetName", "ZipCode"]])
```

Expand Down
Loading
Loading