Metadata-Version: 2.4
Name: truelies-osm-dybuf
Version: 0.5.0
Summary: Cross-language Gridex indexing and OSM DyBuf helpers for Truelies.
Author-email: Yuchi <yuchi518@gmail.com>
License-Expression: LicenseRef-Proprietary
Project-URL: Homepage, https://github.com/yuchi518/gen_tiles
Project-URL: Issues, https://github.com/yuchi518/gen_tiles/issues
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: dybuf<0.6,>=0.5.0

# truelies-osm-dybuf

Python runtime package for Truelies Gridex indexing and OSM DyBuf semantics. It is
the Python counterpart of npm `@truelies/osm-dybuf` and depends on the generic
`dybuf` package for JSON-equivalent binary encoding.

```python
from truelies_osm_dybuf.grid_index import grid_code_at_lonlat

grid_code = grid_code_at_lonlat(2, 121.56, 25.03)
```

Python snake_case and JavaScript camelCase APIs are tested against the shared release
snapshot at `tests/fixtures/gridex/grid-code-v1.json`. A repository-level test checks
that this snapshot matches the canonical fixture in `specs/` when the submodule is
available.

## Development

From the repository root:

```bash
python -m venv .venv-gridex
source .venv-gridex/bin/activate
pip install -e ./py pytest build twine
pytest -q py/tests
python -m build py
twine check py/dist/*
```

The initial `0.5.0` Python release intentionally contains the Gridex coordinate/index
core. OSM tile payload decoders remain JavaScript-only until a Python consumer needs
them; they are not duplicated merely to make the package surfaces look identical.

## Release

The `osm-dybuf-v*` tag workflow builds and tests both packages, then publishes the
Python package:

- PyPI through Trusted Publishing configured for the `pypi` GitHub environment.

The npm package keeps its existing local release flow: authenticate with `npm login`
and run `npm publish --access public` from `js/`.

Before creating a tag, both `py/pyproject.toml` and `js/package.json` must contain the
same release version.
