Metadata-Version: 2.2
Name: check-orbit
Version: 0.1.2
Summary: Pybind11 check_orbit extension built with CMake
Author-Email: Your Name <your.email@example.com>
License: MIT License
         
         Copyright (c) 2024 check-orbit contributors
         
         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.
         
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
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: Programming Language :: Python :: 3.14
Classifier: Programming Language :: C++
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# check_orbit

A high-performance Python extension for checking orbital geometry bounds, built with C++ and pybind11.

## ?? Installation

The easiest way to install is from PyPI:

```bash
pip install check-orbit
```

Pre-built wheels are available for:
- **Windows** (x86_64): Python 3.8-3.12
- **macOS** (Intel x86_64 & Apple Silicon arm64): Python 3.8-3.12
- **Linux** (x86_64 manylinux): Python 3.8-3.12

No build tools required! ??

## ?? Usage

```python
import check_orbit

# Check if orbit geometry intersects with lat/lon bounds
geom_blob = b"0,1,45.5,123.4\n1,2,46.2,124.1\n"
result = check_orbit.check_orbit_in_bounds(
    geom_blob, 
    min_lat=45.0, 
    max_lat=47.0, 
    start_lon=120.0, 
    end_lon=130.0
)
print(result)  # True

# Load geometry from SQLite database
latitudes, longitudes = check_orbit.load_geom_from_db(
    orbit_number=12345, 
    db_path="orbits.db"
)
```

## ??? Building from Source

If you need to build from source (e.g., for development):

### Prerequisites
- Python development headers and a C/C++ toolchain:
  - **macOS**: Xcode command line tools (`xcode-select --install`)
  - **Windows**: Visual Studio 2017+ with C++ tools
  - **Linux**: GCC or Clang
- CMake 3.15+

### Build and Install

```bash
python -m pip install --upgrade pip setuptools wheel scikit-build pybind11 cmake
cd NewPicker/core/cpp
python -m pip install .
```

### Create Distribution Wheel

```bash
cd NewPicker/core/cpp
python -m pip wheel . -w dist
```

## ??? Development & Contributing

### Project Structure
```
core/cpp/
??? check_orbit.cpp       # C++ implementation
??? CMakeLists.txt        # CMake build configuration
??? pyproject.toml        # Python package metadata
??? check_orbit/          # Python package
?   ??? __init__.py       # Package initialization
??? .circleci/
    ??? config.yml        # Multi-platform CI/CD
```

### Building Multi-Platform Wheels

We use CircleCI to automatically build wheels for all platforms. See [`CIRCLECI_SETUP.md`](CIRCLECI_SETUP.md) for setup instructions.

For local multi-platform builds, use:
```bash
# Requires appropriate platform and build tools
python -m cibuildwheel --platform <windows|macos|linux>
```

### Running Tests

```bash
cd NewPicker/core/cpp
python -m pytest tests/
```

## ?? Documentation

- **[CIRCLECI_SETUP.md](CIRCLECI_SETUP.md)** - Set up automated multi-platform builds
- **[BUILD_SUMMARY.md](BUILD_SUMMARY.md)** - Build troubleshooting and solutions
- **[PUBLISHING_GUIDE.md](PUBLISHING_GUIDE.md)** - How to publish to PyPI
- **[TROUBLESHOOTING.md](TROUBLESHOOTING.md)** - Common build errors and fixes

## ?? License

See [LICENSE](LICENSE) for details.

## ?? Links

- **PyPI**: https://pypi.org/project/check-orbit/
- **Repository**: https://github.jpl.nasa.gov/hungl/NewPicker

## ? Performance

This extension uses optimized C++ code for fast geometry checking:
- Native C++ performance (100-1000x faster than pure Python)
- Minimal memory overhead
- GIL release for multi-threaded applications
