Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Geocodio/geocodio-library-python
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.3.0
Choose a base ref
...
head repository: Geocodio/geocodio-library-python
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.4.0
Choose a head ref
  • 3 commits
  • 3 files changed
  • 1 contributor

Commits on Nov 19, 2025

  1. fix(parser): support nested field structures with backward compatibility

    API changed response format from flat to nested structure for several fields:
    - Census: census2010: {...} → census: {2010: {...}}
    - ACS: acs-demographics: {...} → acs: {demographics: {...}}
    - School districts: school: [...] → school_districts: {elementary: {...}}
    
    Additionally, census field names changed (block → block_code, etc.) which
    would break existing code accessing the old field names.
    
    Changes:
    - Add nested census parsing with dynamic year support (census2020-census2099+)
    - Add nested ACS parsing supporting both simple and metric-specific formats
    - Add nested school districts parsing (dict and list formats)
    - Map new census field names to legacy names for backward compatibility
    - Update ZIP4Data and FFIECData models with complete field definitions
    - Remove hardcoded census year fields, use dynamic __getattr__ instead
    
    Backward compatibility ensured:
    - fields.census2020.block still works (maps to block_code)
    - fields.census2020.blockgroup still works (maps to block_group)
    - fields.census2020.tract still works (maps to tract_code)
    
    Future-proof:
    - census2031+ years work automatically without code changes
    - cd120+ congressional districts work automatically
    - Unknown API fields captured in extras dict
    
    Fixes #15
    Fixes #16
    Closes #14
    Closes #17
    sylvesterdamgaard committed Nov 19, 2025
    Configuration menu
    Copy the full SHA
    af65377 View commit details
    Browse the repository at this point in the history
  2. fix(tests): correct ZIP4Data field names in E2E test

    The test was checking for non-existent fields:
    - zip4.zip4 → zip4.plus4
    - zip4.delivery_point → zip4.city_delivery
    
    Also added validation for zip9 and valid_delivery_area fields
    to match the actual API response structure.
    
    Verified with real API - test now passes.
    sylvesterdamgaard committed Nov 19, 2025
    Configuration menu
    Copy the full SHA
    ee94771 View commit details
    Browse the repository at this point in the history
  3. Merge pull request #18 from Geocodio/fix/nested-field-parsing

    fix(parser): support nested field structures with backward compatibility
    sylvesterdamgaard authored Nov 19, 2025
    Configuration menu
    Copy the full SHA
    939c0be View commit details
    Browse the repository at this point in the history
Loading