Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions docs/guides/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -425,30 +425,30 @@ From here, explore the [example models](../examples/index.md) or the [Rosetta St
## Interactive Notebook

/// marimo-embed-file
filepath: packages/gds-examples/guides/getting_started/notebook.py
filepath: packages/gds-examples/notebooks/getting_started.py
height: 800px
mode: read
///

To run the notebook locally:

```bash
uv run marimo run packages/gds-examples/guides/getting_started/notebook.py
uv run marimo run packages/gds-examples/notebooks/getting_started.py
```

Run the test suite:

```bash
uv run --package gds-examples pytest packages/gds-examples/guides/getting_started/ -v
uv run --package gds-examples pytest packages/gds-examples/tests/test_getting_started.py -v
```

## Source Files

| File | Purpose |
|------|---------|
| [`stage1_minimal.py`](https://github.com/BlockScience/gds-core/blob/main/packages/gds-examples/guides/getting_started/stage1_minimal.py) | Minimal heater model |
| [`stage2_feedback.py`](https://github.com/BlockScience/gds-core/blob/main/packages/gds-examples/guides/getting_started/stage2_feedback.py) | Feedback loop with policies |
| [`stage3_dsl.py`](https://github.com/BlockScience/gds-core/blob/main/packages/gds-examples/guides/getting_started/stage3_dsl.py) | gds-control DSL version |
| [`stage4_verify_viz.py`](https://github.com/BlockScience/gds-core/blob/main/packages/gds-examples/guides/getting_started/stage4_verify_viz.py) | Verification and visualization |
| [`stage5_query.py`](https://github.com/BlockScience/gds-core/blob/main/packages/gds-examples/guides/getting_started/stage5_query.py) | SpecQuery API |
| [`notebook.py`](https://github.com/BlockScience/gds-core/blob/main/packages/gds-examples/guides/getting_started/notebook.py) | Interactive marimo notebook |
| [`stage1_minimal.py`](https://github.com/BlockScience/gds-core/blob/main/packages/gds-examples/gds_examples/getting_started/stage1_minimal.py) | Minimal heater model |
| [`stage2_feedback.py`](https://github.com/BlockScience/gds-core/blob/main/packages/gds-examples/gds_examples/getting_started/stage2_feedback.py) | Feedback loop with policies |
| [`stage3_dsl.py`](https://github.com/BlockScience/gds-core/blob/main/packages/gds-examples/gds_examples/getting_started/stage3_dsl.py) | gds-control DSL version |
| [`stage4_verify_viz.py`](https://github.com/BlockScience/gds-core/blob/main/packages/gds-examples/gds_examples/getting_started/stage4_verify_viz.py) | Verification and visualization |
| [`stage5_query.py`](https://github.com/BlockScience/gds-core/blob/main/packages/gds-examples/gds_examples/getting_started/stage5_query.py) | SpecQuery API |
| [`getting_started.py`](https://github.com/BlockScience/gds-core/blob/main/packages/gds-examples/notebooks/getting_started.py) | Interactive marimo notebook |
14 changes: 6 additions & 8 deletions docs/guides/interoperability.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ This validates GDS as an **interoperability substrate**, not just a modeling fra
### Nash Equilibrium Analysis

/// marimo-embed-file
filepath: packages/gds-examples/guides/nash_equilibrium/notebook.py
filepath: packages/gds-examples/notebooks/nash_equilibrium.py
height: 800px
mode: read
///
Expand All @@ -244,8 +244,7 @@ To run locally:

```bash
uv sync --all-packages --extra nash
cd packages/gds-examples && \
uv run marimo run guides/nash_equilibrium/notebook.py
uv run marimo run packages/gds-examples/notebooks/nash_equilibrium.py
```

```bash
Expand All @@ -257,16 +256,15 @@ uv run --package gds-examples pytest \
### Evolution of Trust Simulation

/// marimo-embed-file
filepath: packages/gds-examples/guides/evolution_of_trust/notebook.py
filepath: packages/gds-examples/notebooks/evolution_of_trust.py
height: 800px
mode: read
///

To run locally:

```bash
cd packages/gds-examples && \
uv run marimo run guides/evolution_of_trust/notebook.py
uv run marimo run packages/gds-examples/notebooks/evolution_of_trust.py
```

```bash
Expand All @@ -283,8 +281,8 @@ uv run --package gds-examples pytest \
| `games/evolution_of_trust/model.py` | OGS structure with Nicky Case payoffs |
| `games/evolution_of_trust/strategies.py` | 8 strategy implementations |
| `games/evolution_of_trust/tournament.py` | Match, tournament, evolutionary dynamics |
| `guides/nash_equilibrium/notebook.py` | Interactive Nash analysis notebook |
| `guides/evolution_of_trust/notebook.py` | Interactive simulation notebook |
| `notebooks/nash_equilibrium.py` | Interactive Nash analysis notebook |
| `notebooks/evolution_of_trust.py` | Interactive simulation notebook |

All paths relative to `packages/gds-examples/`.

Expand Down
18 changes: 9 additions & 9 deletions docs/guides/rosetta-stone.md
Original file line number Diff line number Diff line change
Expand Up @@ -308,37 +308,37 @@ h_theta : X -> X where h = f . g
This is the "Rosetta Stone" -- the same mathematical structure expressed in different domain languages, all grounded in GDS theory.

```python
from guides.rosetta.comparison import canonical_spectrum_table
from gds_examples.rosetta.comparison import canonical_spectrum_table

print(canonical_spectrum_table())
```

## Interactive Notebook

/// marimo-embed-file
filepath: packages/gds-examples/guides/rosetta/notebook.py
filepath: packages/gds-examples/notebooks/rosetta.py
height: 800px
mode: read
///

To run the notebook locally:

```bash
uv run marimo run packages/gds-examples/guides/rosetta/notebook.py
uv run marimo run packages/gds-examples/notebooks/rosetta.py
```

Run the test suite:

```bash
uv run --package gds-examples pytest packages/gds-examples/guides/rosetta/ -v
uv run --package gds-examples pytest packages/gds-examples/tests/test_rosetta.py -v
```

## Source Files

| File | Purpose |
|------|---------|
| [`stockflow_view.py`](https://github.com/BlockScience/gds-core/blob/main/packages/gds-examples/guides/rosetta/stockflow_view.py) | Stock-flow DSL model |
| [`control_view.py`](https://github.com/BlockScience/gds-core/blob/main/packages/gds-examples/guides/rosetta/control_view.py) | Control DSL model |
| [`game_view.py`](https://github.com/BlockScience/gds-core/blob/main/packages/gds-examples/guides/rosetta/game_view.py) | Game theory DSL model |
| [`comparison.py`](https://github.com/BlockScience/gds-core/blob/main/packages/gds-examples/guides/rosetta/comparison.py) | Cross-domain canonical comparison |
| [`notebook.py`](https://github.com/BlockScience/gds-core/blob/main/packages/gds-examples/guides/rosetta/notebook.py) | Interactive marimo notebook |
| [`stockflow_view.py`](https://github.com/BlockScience/gds-core/blob/main/packages/gds-examples/gds_examples/rosetta/stockflow_view.py) | Stock-flow DSL model |
| [`control_view.py`](https://github.com/BlockScience/gds-core/blob/main/packages/gds-examples/gds_examples/rosetta/control_view.py) | Control DSL model |
| [`game_view.py`](https://github.com/BlockScience/gds-core/blob/main/packages/gds-examples/gds_examples/rosetta/game_view.py) | Game theory DSL model |
| [`comparison.py`](https://github.com/BlockScience/gds-core/blob/main/packages/gds-examples/gds_examples/rosetta/comparison.py) | Cross-domain canonical comparison |
| [`rosetta.py`](https://github.com/BlockScience/gds-core/blob/main/packages/gds-examples/notebooks/rosetta.py) | Interactive marimo notebook |
16 changes: 8 additions & 8 deletions docs/guides/verification.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ The core workflow: build a broken model, run checks, inspect findings, fix error

```python
from gds.verification.engine import verify
from guides.verification.broken_models import (
from gds_examples.verification.broken_models import (
dangling_wiring_system,
fixed_pipeline_system,
)
Expand Down Expand Up @@ -375,28 +375,28 @@ for finding in report.findings:
## Interactive Notebook

/// marimo-embed-file
filepath: packages/gds-examples/guides/verification/notebook.py
filepath: packages/gds-examples/notebooks/verification.py
height: 800px
mode: read
///

To run the notebook locally:

```bash
uv run marimo run packages/gds-examples/guides/verification/notebook.py
uv run marimo run packages/gds-examples/notebooks/verification.py
```

Run the test suite:

```bash
uv run --package gds-examples pytest packages/gds-examples/guides/verification/ -v
uv run --package gds-examples pytest packages/gds-examples/tests/test_verification_guide.py -v
```

## Source Files

| File | Purpose |
|------|---------|
| [`broken_models.py`](https://github.com/BlockScience/gds-core/blob/main/packages/gds-examples/guides/verification/broken_models.py) | Deliberately broken models for each check |
| [`verification_demo.py`](https://github.com/BlockScience/gds-core/blob/main/packages/gds-examples/guides/verification/verification_demo.py) | Generic and semantic check demos |
| [`domain_checks_demo.py`](https://github.com/BlockScience/gds-core/blob/main/packages/gds-examples/guides/verification/domain_checks_demo.py) | StockFlow domain check demos |
| [`notebook.py`](https://github.com/BlockScience/gds-core/blob/main/packages/gds-examples/guides/verification/notebook.py) | Interactive marimo notebook |
| [`broken_models.py`](https://github.com/BlockScience/gds-core/blob/main/packages/gds-examples/gds_examples/verification/broken_models.py) | Deliberately broken models for each check |
| [`verification_demo.py`](https://github.com/BlockScience/gds-core/blob/main/packages/gds-examples/gds_examples/verification/verification_demo.py) | Generic and semantic check demos |
| [`domain_checks_demo.py`](https://github.com/BlockScience/gds-core/blob/main/packages/gds-examples/gds_examples/verification/domain_checks_demo.py) | StockFlow domain check demos |
| [`notebook.py`](https://github.com/BlockScience/gds-core/blob/main/packages/gds-examples/notebooks/verification.py) | Interactive marimo notebook |
14 changes: 7 additions & 7 deletions docs/guides/visualization.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,28 +206,28 @@ mermaid_str = system_to_mermaid(system, theme="dark")
## Interactive Notebook

/// marimo-embed-file
filepath: packages/gds-examples/guides/visualization/notebook.py
filepath: packages/gds-examples/notebooks/visualization.py
height: 800px
mode: read
///

To run the notebook locally:

```bash
uv run marimo run packages/gds-examples/guides/visualization/notebook.py
uv run marimo run packages/gds-examples/notebooks/visualization.py
```

Run the test suite:

```bash
uv run --package gds-examples pytest packages/gds-examples/guides/visualization/ -v
uv run --package gds-examples pytest packages/gds-examples/tests/test_visualization_guide.py -v
```

## Source Files

| File | Purpose |
|------|---------|
| [`all_views_demo.py`](https://github.com/BlockScience/gds-core/blob/main/packages/gds-examples/guides/visualization/all_views_demo.py) | All 6 view types on the SIR model |
| [`theme_customization.py`](https://github.com/BlockScience/gds-core/blob/main/packages/gds-examples/guides/visualization/theme_customization.py) | 5 built-in theme demos |
| [`cross_dsl_views.py`](https://github.com/BlockScience/gds-core/blob/main/packages/gds-examples/guides/visualization/cross_dsl_views.py) | Cross-DSL visualization comparison |
| [`notebook.py`](https://github.com/BlockScience/gds-core/blob/main/packages/gds-examples/guides/visualization/notebook.py) | Interactive marimo notebook |
| [`all_views_demo.py`](https://github.com/BlockScience/gds-core/blob/main/packages/gds-examples/gds_examples/visualization/all_views_demo.py) | All 6 view types on the SIR model |
| [`theme_customization.py`](https://github.com/BlockScience/gds-core/blob/main/packages/gds-examples/gds_examples/visualization/theme_customization.py) | 5 built-in theme demos |
| [`cross_dsl_views.py`](https://github.com/BlockScience/gds-core/blob/main/packages/gds-examples/gds_examples/visualization/cross_dsl_views.py) | Cross-DSL visualization comparison |
| [`visualization.py`](https://github.com/BlockScience/gds-core/blob/main/packages/gds-examples/notebooks/visualization.py) | Interactive marimo notebook |
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def generate_canonical_view(spec: GDSSpec) -> str:


if __name__ == "__main__":
from guides.getting_started.stage3_dsl import build_spec, build_system
from gds_examples.getting_started.stage3_dsl import build_spec, build_system

spec = build_spec()
system = build_system()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
def build_query(spec: GDSSpec | None = None) -> SpecQuery:
"""Create a SpecQuery for the thermostat model."""
if spec is None:
from guides.getting_started.stage3_dsl import build_spec
from gds_examples.getting_started.stage3_dsl import build_spec

spec = build_spec()
return SpecQuery(spec)
Expand Down Expand Up @@ -80,7 +80,7 @@ def show_dependency_graph(query: SpecQuery) -> dict[str, set[str]]:


if __name__ == "__main__":
from guides.getting_started.stage3_dsl import build_spec
from gds_examples.getting_started.stage3_dsl import build_spec

spec = build_spec()
query = build_query(spec)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
"""

from gds.canonical import CanonicalGDS, project_canonical
from guides.rosetta.control_view import build_spec as build_control_spec
from guides.rosetta.game_view import build_spec as build_game_spec
from guides.rosetta.stockflow_view import build_spec as build_sf_spec
from gds_examples.rosetta.control_view import build_spec as build_control_spec
from gds_examples.rosetta.game_view import build_spec as build_game_spec
from gds_examples.rosetta.stockflow_view import build_spec as build_sf_spec


def build_all_canonicals() -> dict[str, CanonicalGDS]:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
check_completeness,
check_determinism,
)
from guides.verification.broken_models import (
from gds_examples.verification.broken_models import (
covariant_cycle_system,
dangling_wiring_system,
empty_canonical_spec,
Expand Down
15 changes: 0 additions & 15 deletions packages/gds-examples/guides/evolution_of_trust/conftest.py

This file was deleted.

35 changes: 0 additions & 35 deletions packages/gds-examples/guides/getting_started/README.md

This file was deleted.

15 changes: 0 additions & 15 deletions packages/gds-examples/guides/nash_equilibrium/conftest.py

This file was deleted.

65 changes: 0 additions & 65 deletions packages/gds-examples/guides/rosetta/README.md

This file was deleted.

Empty file.
Empty file.
Loading