Metadata-Version: 2.4
Name: pohualli
Version: 0.4.0
Summary: Python port (in progress) of the Turbo Pascal Pohualli calendrical utility
Author: Port Maintainers
License: GNU GENERAL PUBLIC LICENSE
        Version 3, 29 June 2007
        
        Copyright (C) 2025  muscariello
        
        Everyone is permitted to copy and distribute verbatim copies
        of this license document, but changing it is not allowed.
        
        Preamble
        
        The GNU General Public License is a free, copyleft license for
        software and other kinds of works.
        
        The licenses for most software and other practical works are designed
        to take away your freedom to share and change the works. By contrast,
        the GNU General Public License is intended to guarantee your freedom to
        share and change all versions of a program--to make sure it remains free
        software for all its users. We, the Free Software Foundation, use the
        GNU General Public License for most of our software; it applies also to
        any other work released this way by its authors. You can apply it to
        your programs, too.
        
        When we speak of free software, we are referring to freedom, not
        price. Our General Public Licenses are designed to make sure that you
        have the freedom to distribute copies of free software (and charge for
        them if you wish), that you receive source code or can get it if you
        want it, that you can change the software or use pieces of it in new
        free programs, and that you know you can do these things.
        
        To protect your rights, we need to prevent others from denying you
        these rights or asking you to surrender the rights. Therefore, you have
        certain responsibilities if you distribute copies of the software, or if
        you modify it: responsibilities to respect the freedom of others.
        
        For example, if you distribute copies of such a program, whether
        gratis or for a fee, you must pass on to the recipients the same
        freedoms that you received. You must make sure that they, too, receive
        or can get the source code. And you must show them these terms so they
        know their rights.
        
        Developers that use the GNU GPL protect your rights with two steps:
        (1) assert copyright on the software, and (2) offer you this License
        giving you legal permission to copy, distribute and/or modify it.
        
        For the developers' and authors' protection, the GPL clearly explains
        that there is no warranty for this free software. For both users' and
        authors' sake, the GPL requires that modified versions be marked as
        changed, so that their problems will not be attributed erroneously to
        authors of previous versions.
        
        Some devices are designed to deny users access to install or run
        modified versions of the software inside them, although the manufacturer
        can do so. This is fundamentally incompatible with the aim of
        protecting users' freedom to change the software. The systematic
        pattern of such abuse occurs in the area of products for individuals to
        use, which is precisely where it is most unacceptable. Therefore, we
        have designed this version of the GPL to prohibit the practice for
        those products. If such problems arise substantially in other domains,
        we stand ready to extend this provision to those domains in future
        versions of the GPL, as needed to protect the freedom of users.
        
        Finally, every program is threatened constantly by software patents.
        States should not allow patents to restrict development and use of
        software on general-purpose computers, but in those that do, we wish to
        avoid the special danger that patents applied to a free program could
        make it effectively proprietary. To prevent this, the GPL assures that
        patents cannot be used to render the program non-free.
        
        The precise terms and conditions for copying, distribution and
        modification follow.
        
        <... Full GPLv3 text omitted for brevity in this file snippet. Include the complete license text in your repository for compliance or retrieve from https://www.gnu.org/licenses/gpl-3.0.txt ...>
        
        END OF TERMS AND CONDITIONS
        
        For the full license text, see https://www.gnu.org/licenses/gpl-3.0.txt
        
        
Project-URL: Homepage, https://github.com/muscariello/pohualli-python
Project-URL: Documentation, https://muscariello.github.io/pohualli-python/
Project-URL: Source, https://github.com/muscariello/pohualli-python
Project-URL: Issues, https://github.com/muscariello/pohualli-python/issues
Keywords: maya,aztec,calendar,mesoamerican,astronomy,long-count,tzolkin,haab
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Astronomy
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: coverage>=7.6.0; extra == "dev"
Provides-Extra: docs
Requires-Dist: mkdocs>=1.6.0; extra == "docs"
Requires-Dist: mkdocs-material>=9.5.0; extra == "docs"
Requires-Dist: mkdocs-gen-files; extra == "docs"
Requires-Dist: mkdocs-literate-nav; extra == "docs"
Requires-Dist: mkdocs-section-index; extra == "docs"
Dynamic: license-file

# Pohualli (Python Port)

[![CI](https://github.com/muscariello/pohualli-python/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/muscariello/pohualli-python/actions/workflows/ci.yml) [![Coverage](https://codecov.io/gh/muscariello/pohualli-python/branch/main/graph/badge.svg)](https://codecov.io/gh/muscariello/pohualli-python) [![Docs](https://img.shields.io/badge/docs-GitHub%20Pages-blue)](https://muscariello.github.io/pohualli-python/) [![PyPI](https://img.shields.io/pypi/v/pohualli.svg)](https://pypi.org/project/pohualli/)

Python reimplementation of the original Turbo Pascal Pohualli calendrical utility.

## Highlights

- Maya and Aztec core calculations (Tzolk'in, Haab, Long Count, Year Bearer)
- 819-day cycle, planetary synodic helpers, zodiac and moon heuristics
- Correlation presets and configurable correction offsets
- CLI, Python API, and JSON-RPC backend
- Flutter desktop UI for macOS and Windows

## Install

### PyPI (CLI + library)

```bash
pip install pohualli
```

### From source (development)

```bash
git clone https://github.com/muscariello/pohualli-python.git
cd pohualli-python
pip install -e .[dev,docs]
```

## CLI Quick Examples

```bash
pohualli from-jdn 2451545 --json
pohualli search-range 584283 584400 --tzolkin-value 4 --limit 2
pohualli derive-autocorr 2451545 --tzolkin "4 Ahau"
```

## Python Quick Example

```python
from pohualli import compute_composite

result = compute_composite(2451545)
print(result.tzolkin_name, result.long_count)
```

## RPC Backend (used by Flutter)

```bash
pohualli-rpc
```

JSON-RPC methods:

- `health`
- `list_correlations`
- `convert`
- `derive_autocorr`
- `search_range`
- `quit`

## Flutter Desktop App

- Project: `flutter/pohualli_desktop`
- Workflow: `.github/workflows/flutter-desktop.yml`
- Release artifacts include a bundled self-contained backend executable (`pohualli-rpc-bin`)

Run locally:

```bash
cd flutter/pohualli_desktop
flutter pub get
flutter run -d macos
# or: flutter run -d windows
```

Build locally:

```bash
flutter build macos --release
flutter build windows --release
```

## Testing

```bash
pytest -q
```

Flutter checks:

```bash
cd flutter/pohualli_desktop
flutter analyze
flutter test --coverage
```

## Documentation

- Docs site: https://muscariello.github.io/pohualli-python/
- Desktop usage guide: `docs/usage/desktop.md`

## License

GPL-3.0-only
