|
| 1 | +# CLAUDE.md |
| 2 | + |
| 3 | +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. |
| 4 | + |
| 5 | +## Project Overview |
| 6 | + |
| 7 | +This is **mapper-base**, a Python library providing base utilities for Senzing data mappers. It's used as a dependency by higher-level mapper projects (mapper-ijic, mapper-dowjones, etc.) for entity resolution tasks. |
| 8 | + |
| 9 | +The `base_library` class in `src/base_mapper.py` provides: |
| 10 | + |
| 11 | +- Date formatting and normalization (`formatDate`) |
| 12 | +- ISO country/state code conversion (`isoCountryCode`, `isoStateCode`) |
| 13 | +- Company vs person name detection (`isCompanyName`) |
| 14 | +- Statistics tracking (`updateStat`) |
| 15 | + |
| 16 | +Lookup tables in `src/base_variants.json` contain mappings for state codes, country codes, organization tokens, and person tokens. |
| 17 | + |
| 18 | +## Development Commands |
| 19 | + |
| 20 | +**Install all dependencies (development, testing, linting, docs):** |
| 21 | + |
| 22 | +```bash |
| 23 | +python -m pip install --group all . |
| 24 | +``` |
| 25 | + |
| 26 | +**Run pylint:** |
| 27 | + |
| 28 | +```bash |
| 29 | +pylint $(git ls-files '*.py' ':!:docs/source/*') |
| 30 | +``` |
| 31 | + |
| 32 | +**Run a single Python file directly:** |
| 33 | + |
| 34 | +```bash |
| 35 | +python src/base_mapper.py |
| 36 | +``` |
| 37 | + |
| 38 | +## Code Style |
| 39 | + |
| 40 | +- **Line length**: 120 characters |
| 41 | +- **Formatter**: Black with `line-length = 120` |
| 42 | +- **Import sorting**: isort with "black" profile |
| 43 | +- **Linting**: Pylint with relaxed rules (see `.pylintrc` for disabled checks including `missing-module-docstring`, `missing-function-docstring`, `invalid-name`, `line-too-long`) |
| 44 | + |
| 45 | +## Python Version Support |
| 46 | + |
| 47 | +Python 3.10, 3.11, 3.12, and 3.13 are supported and tested in CI. |
0 commit comments