Skip to content

Commit 221ca39

Browse files
Merge pull request #64 from Funz/docs/restructure-context-doc-and-skill-wrappers
docs: rename context/→doc/, document the installer, restructure skill wrapper guides
2 parents a75a14e + fc47aaf commit 221ca39

26 files changed

Lines changed: 310 additions & 117 deletions

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,6 @@ results*/
2525
output/
2626
# notebook work directories (generated by examples/)
2727
examples/work_*/
28+
# fz run scratch under examples/ (re-excluded: the !examples/** rule above
29+
# would otherwise un-ignore the global .fz rule for this path)
30+
examples/.fz/

CLAUDE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ codes to run parameter studies locally, over SSH, or on SLURM. Python rewrite of
99
`cli.py` (entry points `fz`, `fzi`, ... defined in pyproject.toml), `runners.py`
1010
(sh/ssh/slurm/funz/cache calculators), `interpreter.py` (variable/formula parsing,
1111
Python and R evaluation), `io.py`, `config.py` (env vars), `installer.py` (`fz install`).
12-
- `tests/` — pytest suite. `context/` — modular user docs. `skills/fz/` — Agent Skill
12+
- `tests/` — pytest suite. `doc/` — modular user docs. `skills/fz/` — Agent Skill
1313
(workflow + condensed reference). `examples/` — example models, algorithms, notebooks.
1414
- `fz/_version.py` is stamped by CI (`scripts/stamp_version.py`) — never edit manually.
1515

@@ -68,7 +68,7 @@ R-dependent code or tests.
6868
Python signatures consistent — every core function has a CLI twin with the same
6969
semantics, and CLI output must stay parseable with `--format json`.
7070
- When changing the public API or CLI flags, update **all three** doc surfaces:
71-
`README.md`, `context/`, and `skills/fz/reference.md` (the agent skill ships to users).
71+
`README.md`, `doc/`, and `skills/fz/reference.md` (the agent skill ships to users).
7272
- Default values live in `fz/config.py` and are env-overridable (`FZ_LOG_LEVEL`,
7373
`FZ_MAX_WORKERS`, `FZ_MAX_RETRIES` (default 5), `FZ_SSH_*`, `FZ_SHELL_PATH`).
7474
- User-facing release notes go in `NEWS.md`.

README.md

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1550,7 +1550,7 @@ results = fz.fzr("input.txt", input_variables, model, calculators=calculators)
15501550
- Broadcasts UDP message on port 19001
15511551
- Servers respond with their host, port, and supported codes
15521552
- Useful for dynamic calculator allocation in cluster environments
1553-
- See `context/funz-protocol.md` for detailed protocol documentation
1553+
- See `doc/funz-protocol.md` for detailed protocol documentation
15541554

15551555
**Protocol**:
15561556
- Text-based TCP socket communication
@@ -2430,7 +2430,7 @@ model = {
24302430
# C:\msys64\usr\bin\grep.exe 'pressure' output.txt | C:\msys64\usr\bin\awk.exe '{print $2}'
24312431
```
24322432

2433-
See `context/shell-path.md` and `examples/shell_path_example.md` for detailed documentation.
2433+
See `doc/shell-path.md` and `examples/shell_path_example.md` for detailed documentation.
24342434

24352435
### Timeout Configuration
24362436

@@ -3185,7 +3185,7 @@ The skill contains:
31853185

31863186
- **skills/fz/SKILL.md** - Step-by-step workflow for wrapping a simulation code
31873187
- **skills/fz/reference.md** - Condensed API/CLI reference, JSON schemas, environment variables
3188-
- **skills/fz/algorithms.md** - Interface for writing custom fzd algorithms
3188+
- **skills/fz/algorithm-wrapper.md** - Interface for writing custom fzd algorithms
31893189

31903190
See **[skills/howto.md](skills/howto.md)** for a complete walkthrough with example prompts
31913191
(parametric studies, SSH execution, cache reuse, optimization, headless usage).
@@ -3196,22 +3196,23 @@ See **[skills/howto.md](skills/howto.md)** for a complete walkthrough with examp
31963196

31973197
- **README.md** (this file) - Complete user guide with examples
31983198
- **NEWS.md** - Release notes and changelog (version 0.9.1 and later)
3199-
- **context/funz-protocol.md** - Funz protocol and UDP discovery documentation
3200-
- **context/shell-path.md** - FZ_SHELL_PATH configuration details
3199+
- **doc/funz-protocol.md** - Funz protocol and UDP discovery documentation
3200+
- **doc/shell-path.md** - FZ_SHELL_PATH configuration details
32013201

32023202
### Context Documentation
32033203

3204-
Modular documentation in the `context/` directory:
3205-
3206-
- **context/INDEX.md** - Documentation overview and navigation
3207-
- **context/overview.md** - High-level FZ concepts and design
3208-
- **context/core-functions.md** - API reference for fzi, fzc, fzo, fzr, fzl, fzd
3209-
- **context/calculators.md** - Calculator types, URIs, and configuration
3210-
- **context/model-definition.md** - Model structure, aliases, and output parsing
3211-
- **context/formulas-and-interpreters.md** - Formula evaluation (Python/R)
3212-
- **context/syntax-guide.md** - Input template syntax reference
3213-
- **context/parallel-and-caching.md** - Performance optimization strategies
3214-
- **context/quick-examples.md** - Common usage patterns and snippets
3204+
Modular documentation in the `doc/` directory:
3205+
3206+
- **doc/INDEX.md** - Documentation overview and navigation
3207+
- **doc/overview.md** - High-level FZ concepts and design
3208+
- **doc/core-functions.md** - API reference for fzi, fzc, fzo, fzr, fzl, fzd
3209+
- **doc/installing-models.md** - Installing models and algorithms (`fz install`)
3210+
- **doc/calculators.md** - Calculator types, URIs, and configuration
3211+
- **doc/model-definition.md** - Model structure, aliases, and output parsing
3212+
- **doc/formulas-and-interpreters.md** - Formula evaluation (Python/R)
3213+
- **doc/syntax-guide.md** - Input template syntax reference
3214+
- **doc/parallel-and-caching.md** - Performance optimization strategies
3215+
- **doc/quick-examples.md** - Common usage patterns and snippets
32153216

32163217
### Examples
32173218

context/INDEX.md renamed to doc/INDEX.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Quick reference index for finding specific topics in the FZ context documentatio
55
## Table of Contents
66

77
- [Getting Started](#getting-started)
8+
- [Installing Models & Algorithms](#installing-models--algorithms)
89
- [Variable Substitution](#variable-substitution)
910
- [Formula Evaluation](#formula-evaluation)
1011
- [Core Functions](#core-functions)
@@ -23,10 +24,21 @@ Quick reference index for finding specific topics in the FZ context documentatio
2324
| What is FZ? | overview.md | "What is FZ?" |
2425
| When to use FZ | overview.md | "When to Use FZ" |
2526
| Quick example | overview.md | "Quick Example" |
26-
| Four core functions | overview.md | "Four Core Functions" |
27+
| Core functions | overview.md | "Core Functions" |
2728
| Typical workflow | overview.md | "Typical Workflow" |
2829
| Installation | *(see README.md)* | - |
2930

31+
## Installing Models & Algorithms
32+
33+
| Topic | File | Section |
34+
|-------|------|---------|
35+
| Install a model | installing-models.md | "CLI" / "Python API" |
36+
| Install an fzd algorithm | installing-models.md | "CLI" / "Python API" |
37+
| Uninstall a model/algorithm | installing-models.md | "CLI" |
38+
| Source resolution (name/URL/zip) | installing-models.md | "Source resolution" |
39+
| `fz-<code>` repository convention | installing-models.md | "Source resolution" |
40+
| Project-local vs global install | installing-models.md | "Install location and discovery" |
41+
3042
## Variable Substitution
3143

3244
| Topic | File | Section |
@@ -186,6 +198,7 @@ Quick reference index for finding specific topics in the FZ context documentatio
186198
| Task | Start Here |
187199
|------|-----------|
188200
| Get started with FZ | overview.md |
201+
| Install a ready-made model or algorithm | installing-models.md |
189202
| Write an input template | syntax-guide.md |
190203
| Use formulas to calculate values | formulas-and-interpreters.md |
191204
| Parse input variables | core-functions.md → "fzi" |
@@ -221,6 +234,9 @@ Quick reference index for finding specific topics in the FZ context documentatio
221234
Quick keyword search:
222235

223236
- **Variables**: syntax-guide.md
237+
- **Install**: installing-models.md
238+
- **fz install**: installing-models.md → "CLI"
239+
- **Algorithm install**: installing-models.md
224240
- **Formulas**: syntax-guide.md, formulas-and-interpreters.md
225241
- **Python**: formulas-and-interpreters.md
226242
- **R**: formulas-and-interpreters.md

context/README.md renamed to doc/README.md

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ These context files are designed to:
1616
### 1. `overview.md` - Framework Introduction
1717
High-level overview of FZ including:
1818
- What FZ is and when to use it
19-
- The four core functions (fzi, fzc, fzo, fzr)
19+
- The six core functions (fzi, fzc, fzo, fzr, fzl, fzd)
2020
- Key concepts and typical workflows
2121
- Common patterns for different scenarios
2222

@@ -32,16 +32,27 @@ Detailed syntax reference for:
3232
**Use when**: Writing input templates or working with formulas
3333

3434
### 3. `core-functions.md` - API Reference
35-
Comprehensive guide to the four main functions:
35+
Comprehensive guide to the six core functions:
3636
- `fzi()` - Parse input variables
3737
- `fzc()` - Compile input files
3838
- `fzo()` - Read output files
3939
- `fzr()` - Run parametric calculations
40+
- `fzl()` - List and validate installed models / calculators
41+
- `fzd()` - Adaptive design of experiments
4042
- Function signatures, parameters, and return values
4143
- Examples for each function
4244

4345
**Use when**: Using FZ API functions in Python code
4446

47+
### 3b. `installing-models.md` - Installing Models and Algorithms
48+
How to obtain ready-made wrappers and `fzd` algorithms:
49+
- `fz install model|algorithm` and `fz uninstall` (CLI)
50+
- `install_model`/`install_algorithm`/`list_installed_*` (Python API)
51+
- Source resolution (short name, GitHub URL, local zip) and the `fz-<code>` convention
52+
- Project-local vs `--global` install locations
53+
54+
**Use when**: Wrapping a known code, or adding an optimization/sampling algorithm
55+
4556
### 4. `model-definition.md` - Model Configuration
4657
Complete model definition guide covering:
4758
- Model structure and all fields
@@ -56,6 +67,8 @@ Complete model definition guide covering:
5667
Guide to all calculator types:
5768
- `sh://` - Local shell execution
5869
- `ssh://` - Remote SSH execution
70+
- `slurm://` - SLURM workload manager
71+
- `funz://` - Legacy Funz server
5972
- `cache://` - Cached result reuse
6073
- Calculator aliases and configuration
6174
- Parallel execution and fallback chains
@@ -138,17 +151,21 @@ Task: How do I speed up my parametric study with 1000 cases?
138151
## File Organization
139152

140153
```
141-
context/
154+
doc/
142155
├── README.md # This file
143156
├── INDEX.md # Table of contents with sections
144157
├── overview.md # High-level framework introduction
145158
├── syntax-guide.md # Variable and formula syntax
146-
├── core-functions.md # API reference (fzi, fzc, fzo, fzr)
159+
├── core-functions.md # API reference (fzi, fzc, fzo, fzr, fzl, fzd)
160+
├── installing-models.md # Installing models and algorithms
147161
├── model-definition.md # Model configuration guide
148162
├── calculators.md # Calculator types and configuration
149163
├── formulas-and-interpreters.md # Formula evaluation (Python/R)
150-
├── parallel-and-caching.md # Parallel execution and caching
151-
└── quick-examples.md # Common patterns and examples
164+
├── parallel-and-caching.md # Parallel execution and caching
165+
├── fzd_content_format.md # fzd analysis content formats
166+
├── quick-examples.md # Common patterns and examples
167+
├── funz-protocol.md # Legacy Funz server protocol
168+
└── shell-path.md # FZ_SHELL_PATH configuration
152169
```
153170

154171
## Updating This Documentation
@@ -178,6 +195,6 @@ To improve this documentation:
178195

179196
## Version
180197

181-
These context files are for **FZ version 0.9.0+**
198+
These docs are for **fz version 1.0+**
182199

183-
Last updated: 2025-01-XX
200+
Last updated: 2026-06-13
File renamed without changes.
File renamed without changes.
File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,6 @@ Client Funz Server
663663

664664
- **Funz protocol tests**: `tests/test_funz_protocol.py`
665665
- **Integration tests**: `tests/test_funz_integration.py`
666-
- **Calculator types**: `context/calculators.md`
666+
- **Calculator types**: `doc/calculators.md`
667667
- **Implementation**: `fz/runners.py` (run_funz_calculation function)
668668
- **Java Funz**: https://github.com/Funz/funz-calculator
File renamed without changes.

0 commit comments

Comments
 (0)