Skip to content

Create generic fz-Model plugin template based on fz-Scale#1

Merged
yannrichet-asnr merged 4 commits intomainfrom
copilot/remove-scale-references
Nov 28, 2025
Merged

Create generic fz-Model plugin template based on fz-Scale#1
yannrichet-asnr merged 4 commits intomainfrom
copilot/remove-scale-references

Conversation

Copy link
Contributor

Copilot AI commented Nov 28, 2025

Transform this repository into a generic template for creating custom Funz model plugins. Based on the structure from fz-Scale, all Scale-specific code is removed and replaced with a mock implementation that remains installable and functional.

Structure

  • .fz/models/Model.json - Generic model config with ${} variable syntax
  • .fz/calculators/Model.sh - Mock calculator demonstrating execution pattern
  • .fz/calculators/localhost_Model.json - Local execution config
  • examples/Model/input.txt - Example input with variable substitution
  • tests/test_plugin.py - Validates structure and fz integration
  • .github/workflows/ci.yml - CI for JSON/shell validation and fz tests

Usage

import fz

# Parse variables from input
variables = fz.fzi("examples/Model/input.txt", "Model")
# {'x': ...}

# Compile with values
fz.fzc("examples/Model/input.txt", {"x": 3.14}, "Model", output_dir="out")
# Creates out/x=3.14/input.txt with ${x} replaced

Creating Custom Plugins

  1. Rename Model.jsonYourModel.json, update id field
  2. Rename Model.shYourModel.sh, implement actual simulation calls
  3. Update output section in model JSON with parsing commands for your output files
  4. Update localhost_Model.json with new model mappings
Original prompt

Use https://github.com/Funz/fz-Scale as a basis for this generic/template repository for a new custom model plugin. Remove all references to Scale code, but keep the plugin usable for installation with a mock launching script.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits November 28, 2025 11:39
Co-authored-by: yannrichet-asnr <148193180+yannrichet-asnr@users.noreply.github.com>
Co-authored-by: yannrichet-asnr <148193180+yannrichet-asnr@users.noreply.github.com>
Co-authored-by: yannrichet-asnr <148193180+yannrichet-asnr@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove Scale code references from custom model plugin Create generic fz-Model plugin template based on fz-Scale Nov 28, 2025
@yannrichet-asnr yannrichet-asnr marked this pull request as ready for review November 28, 2025 13:09
@yannrichet-asnr yannrichet-asnr merged commit 45c8461 into main Nov 28, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments