Metadata-Version: 2.4
Name: ca-biositing-datamodels
Version: 0.0.2
Summary: Data models for CA Biositing project
Project-URL: Homepage, https://github.com/sustainability-software-lab/ca-biositing
Project-URL: Repository, https://github.com/sustainability-software-lab/ca-biositing.git
Project-URL: Issues, https://github.com/sustainability-software-lab/ca-biositing/issues
Author: SSEC Team
License: BSD 3-Clause License
        
        Copyright (c) 2025, University of Washington, eScience Institute, Scientific Software Engineering Center
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are met:
        
        1. Redistributions of source code must retain the above copyright notice, this
           list of conditions and the following disclaimer.
        
        2. Redistributions in binary form must reproduce the above copyright notice,
           this list of conditions and the following disclaimer in the documentation
           and/or other materials provided with the distribution.
        
        3. Neither the name of the copyright holder nor the names of its
           contributors may be used to endorse or promote products derived from
           this software without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
        AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
        DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
        FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
        SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
        CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
        OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.12
Requires-Dist: alembic<2,>=1.13.2
Requires-Dist: geoalchemy2<0.16,>=0.15.0
Requires-Dist: psycopg2-binary<3,>=2.9.6
Requires-Dist: pydantic-settings>=2.0.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: sqlalchemy>=2.0.0
Requires-Dist: sqlmodel<0.1,>=0.0.19
Description-Content-Type: text/markdown

# CA Biositing Data Models

SQLModel-based database models for the
[CA Biositing](https://github.com/sustainability-software-lab/ca-biositing)
project — a research platform for biomass feedstock siting in California.

This package provides 91 ORM models across 15 domain areas (resources, sampling,
analysis, infrastructure, external datasets), 7 materialized analytical views,
and Alembic-managed migrations backed by PostgreSQL with PostGIS.

## Installation

```bash
pip install ca-biositing-datamodels
```

## Quick Start

```python
from sqlmodel import Session, select
from ca_biositing.datamodels.database import get_engine
from ca_biositing.datamodels.models import Resource, FieldSample, Place

engine = get_engine()

with Session(engine) as session:
    resources = session.exec(select(Resource)).all()
```

## Key Dependencies

- [SQLModel](https://sqlmodel.tiangolo.com/) — ORM + Pydantic validation
- [SQLAlchemy](https://www.sqlalchemy.org/) >= 2.0
- [GeoAlchemy2](https://geoalchemy-2.readthedocs.io/) — PostGIS support
- [Alembic](https://alembic.sqlalchemy.org/) — database migrations

## Links

- [Repository](https://github.com/sustainability-software-lab/ca-biositing)
- [Issue Tracker](https://github.com/sustainability-software-lab/ca-biositing/issues)

## Contributors

[![Contributors](https://contrib.rocks/image?repo=sustainability-software-lab/ca-biositing)](https://github.com/sustainability-software-lab/ca-biositing/graphs/contributors)

## Acknowledgement

We acknowledge software engineering support from the University of Washington
[Scientific Software Engineering Center (SSEC)](https://escience.washington.edu/software-engineering/ssec/),
as part of the Schmidt Sciences
[Virtual Institute for Scientific Software (VISS)](https://www.schmidtsciences.org/).

## License

CA Biositing Data Models is licensed under the open source
[BSD 3-Clause License](https://opensource.org/license/bsd-3-clause).
