Metadata-Version: 2.2
Name: flex-rf
Version: 0.1.0.dev0
Summary: Bootstrap wrapper package for RF workflows built on released tidy3d
Author-Email: "Flexcompute Inc." <support@flexcompute.com>
Project-URL: homepage, https://www.flexcompute.com/
Requires-Python: <3.15,>=3.11
Requires-Dist: tidy3d<2.12,>=2.10.2
Description-Content-Type: text/markdown

# flex-rf

Bootstrap wrapper package for the initial `flex-rf` Python client, built on
top of released `tidy3d`.

This package is intentionally narrow. The supported bootstrap surface is:

- `flex_rf.tidy3d`: wrapper-phase compatibility namespace built on top of `tidy3d`
- `flex_rf.web.run(...)`: minimal execution facade for wrapped workflows

Top-level `flex_rf` stays minimal so it does not block the future RF-native API.

## Usage

```python
import flex_rf.tidy3d as rf
from flex_rf import web

sim = rf.Simulation(
    size=(20e-3, 10e-3, 5e-3),
    structures=[
        rf.Structure(
            geometry=rf.Box(center=(0, 0, 0), size=(10e-3, 1e-3, 35e-6)),
            medium=rf.Medium(permittivity=4.4),
        )
    ],
    boundary_spec=rf.BoundarySpec.all_sides(rf.PML()),
)

modeler = rf.TerminalComponentModeler(
    simulation=sim,
    ports=[rf.LumpedPort(name="p1")],
    freqs=[1e9, 5e9, 10e9],
)

data = web.run(modeler)
```

## Notes

- This is the pure wrapper bootstrap, not the RF-native API.
- The package also carries the in-progress C++/Python build scaffolding from the
  RF template branch so that native components can be added without reworking
  the package layout later.
- The package currently tracks a tested `tidy3d` compatibility range rather than
  promising support for every future release automatically.
- Broader web lifecycle helpers can be added later once the bootstrap contract is stable.
- The compatibility namespace currently includes `tidy3d.rf` plus a small set of supporting root `tidy3d` types needed for basic wrapped RF workflows.

## Build

Requires CMake 3.26+, a C++17 compiler, and Python 3.11+.

```sh
# Build a wheel
uv build --wheel

# Or install the package in the current environment
uv pip install .
```

## Development

This scaffold intentionally keeps development workflows minimal:

```sh
# Sync the project and dev dependencies
uv sync --frozen

# Run the wrapper pytest coverage
just test
```

The package-local `justfile` keeps the bootstrap build/test flow aligned with
the existing PhotonForge and Tidy3D Extras package workflows.
