Metadata-Version: 2.2
Name: flexcompute-rf
Version: 0.2.0.dev1
Summary: Extremely large radio-frequency and microwave electrodynamics simulations.
Author-Email: "Flexcompute Inc." <support@flexcompute.com>
Project-URL: homepage, https://www.flexcompute.com/
Requires-Python: <3.15,>=3.11
Requires-Dist: click>=8.0
Requires-Dist: flexcompute-core==0.0.1.dev3
Requires-Dist: tidy3d==2.13.0.dev1
Requires-Dist: tomlkit>=0.13
Provides-Extra: notebooks
Requires-Dist: bayesian-optimization<4.0.0,>=2.0.0; extra == "notebooks"
Requires-Dist: gdstk<1.1,>=0.9.49; extra == "notebooks"
Requires-Dist: plotly>=5.0; extra == "notebooks"
Requires-Dist: pyvista[jupyter]<0.48.0,>=0.45; extra == "notebooks"
Requires-Dist: rtree==1.4.1; extra == "notebooks"
Requires-Dist: scikit-rf<2.0.0,>=1.9.0; extra == "notebooks"
Requires-Dist: trimesh<5.0.0,>=4.6; extra == "notebooks"
Description-Content-Type: text/markdown

# flexcompute-rf

`flexcompute-rf` is a software package for extremely large radio-frequency and
microwave electrodynamics simulations using the finite-difference time-domain
(FDTD) method. You can work with `flexcompute-rf` through the Python package or
through a web-based graphical user interface.

Read the [RF documentation](https://docs.flexcompute.com/rf/latest/) for
guides, examples, and API reference material.

## Development

The committed `uv.lock` covers flexcompute-rf's own third-party and test dependencies.
The internal packages, `flexcompute-core` and `tidy3d`, are excluded from it: third-party
dependencies always resolve from a lockfile, and the exact internal build present
in a venv is chosen by an explicit install step rather than by resolution. Both
stay declared in `[project] dependencies`, so built distributions keep their
runtime metadata. The standard recipes install them from the same Compute
checkout before running Python code:

```bash
just build-dev
just test-dev
```

Those recipes install tidy3d's own third-party closure from tidy3d's lockfile
first. flexcompute-rf declares only `click` and `tomlkit`, so unlike tidy3d -- whose
lock already covers every flexcompute-core dependency -- flexcompute-rf's lock contains none of
tidy3d's, and installing tidy3d `--no-deps` alone would leave `h5py`, `dask`,
`boto3` and others missing.

When installing an excluded package by hand, pass `--no-config`.
`exclude-dependencies` lives under `[tool.uv]` and `uv pip install` reads it from
the directory it runs in, so from inside `src/flexcompute-rf` the install otherwise
reports success without installing anything.

## Quickstart

Install the latest stable `flexcompute-rf` package:

```bash
pip install --user flexcompute-rf
```

Configure `flexcompute-rf` with the API key from your account:

1. Get your API key from the [RF GUI](https://tidy3d.simulation.cloud/).
2. Run:

```bash
flexcompute-rf configure --apikey=XXX
```

`flexcompute-rf` stores credentials in its own configuration, separate from Tidy3D.
By default this is `~/.config/flexcompute/rf/config.toml`; if `FLEXCOMPUTE_RF_BASE_DIR` is
set, the file is written under `$FLEXCOMPUTE_RF_BASE_DIR/config/config.toml`.

Flex RF and Tidy3D share one Flexcompute API key, so an existing Tidy3D setup
keeps working without a separate `flexcompute-rf configure`. Precedence for API keys
is:

1. `FLEXCOMPUTE_RF_APIKEY`
2. the flexcompute-rf `config.toml`
3. `SIMCLOUD_APIKEY`
4. Tidy3D's configured key (`tidy3d configure`, `~/.config/tidy3d/config.toml`)

Runtime-only logging and local cache settings can be configured with
`flexcompute.rf.config` and are applied only around `flexcompute.rf.web` calls:

```python
import flexcompute.rf

flexcompute.rf.config.logging.level = "ERROR"
flexcompute.rf.config.local_cache.enabled = False
```

These runtime settings are process-local and are not written to flexcompute-rf or
Tidy3D config files. Persistent cache enablement, directory, and size limits are
configured through the CLI:

```bash
flexcompute-rf cache configure --enabled --directory ~/.cache/flexcompute-rf/simulations --max-size-gb 20 --max-entries 1000
flexcompute-rf cache info
flexcompute-rf cache clear
```

For wrapper-phase notebooks that need to silence Tidy3D warnings before a
`flexcompute.rf.web` call, use the Tidy3D compatibility namespace directly:

```python
import flexcompute.rf.tidy3d as rf

rf.config.logging.level = "ERROR"
```

## Start Here

After installation, choose the workflow that fits how you want to work with
`flexcompute-rf`.

### Choose Your Workflow

- Use the Python package when you want scriptable simulation setup,
  automation, and postprocessing.
- Use the RF GUI when you want a browser-based workflow for simulation setup
  and job management: [RF GUI](https://tidy3d.simulation.cloud/)
- Open the RF API reference for the main `flexcompute-rf` and Tidy3D microwave entry
  points: [Tidy3D microwave API reference](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/microwave/index.html)

## Related Products

`flexcompute-rf` is part of a broader product ecosystem:

- [PhotonForge](https://docs.flexcompute.com/projects/photonforge/en/latest/)
  for photonics design and simulation workflows.
- [RF GUI](https://tidy3d.simulation.cloud/) for browser-based simulation
  setup and job management.
- [Tidy3D microwave docs](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/microwave/index.html)
  for deeper RF reference material.

## Learn More

- [About our solver](https://www.flexcompute.com/tidy3d/)
