{"id":29430276,"url":"https://github.com/precice/case-generate","last_synced_at":"2025-07-12T17:06:25.465Z","repository":{"id":300196990,"uuid":"1005475511","full_name":"precice/case-generate","owner":"precice","description":"A python tool that generates the preCICE folders and files to kickstart a simulation setup.","archived":false,"fork":false,"pushed_at":"2025-06-27T14:36:21.000Z","size":2330,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-27T15:35:42.411Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/precice.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"custom":"https://precice.org/community-support-precice"}},"created_at":"2025-06-20T09:34:36.000Z","updated_at":"2025-06-27T14:26:40.000Z","dependencies_parsed_at":"2025-06-20T11:20:15.739Z","dependency_job_id":"d869778f-cef0-4879-8f0d-9b3504b62a29","html_url":"https://github.com/precice/case-generate","commit_stats":null,"previous_names":["precice/case-generate"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/precice/case-generate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/precice%2Fcase-generate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/precice%2Fcase-generate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/precice%2Fcase-generate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/precice%2Fcase-generate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/precice","download_url":"https://codeload.github.com/precice/case-generate/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/precice%2Fcase-generate/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265024860,"owners_count":23699621,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-07-12T17:06:24.152Z","updated_at":"2025-07-12T17:06:25.458Z","avatar_url":"https://github.com/precice.png","language":"Python","funding_links":["https://precice.org/community-support-precice"],"categories":[],"sub_categories":[],"readme":"# precice-generator\n\n![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/precice/case-generate/check.yml?label=Examples%20generation%20and%20validation%20using%20config-checker)\n\n![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/precice/case-generate/installation.yml?label=Installation%20Checker)\n\n![GitHub License](https://img.shields.io/github/license/precice/case-generate)\n\n## Project Overview\n\nThe preCICE case-generate package is a Python-based utility designed to automate the generation of preCICE configuration files from\nsimple YAML topology descriptions. This tool simplifies the process of setting up multi-physics simulations by transforming\nuser-defined YAML configurations into preCICE-compatible XML configuration files.\n\n## Key Features\n\n- Automated preCICE configuration generation\n- YAML-based input parsing\n- Flexible topology description support\n- Comprehensive error logging and handling\n- Simple command-line interface\n\n## Installation\n\n### Prerequisites\n\n- Python 3.9 or\n  higher ([workflow validated](https://github.com/precice/case-generate/actions/workflows/installation.yml)\n  with 3.9, 3.10, 3.11 and 3.12)\n- pip\n- venv\n- (preCICE library)\n\n### Manual Installation\n\n1. Clone the repository\n\n```bash\ngit clone https://github.com/precice/case-generate.git\ncd precice-generator\n```\n\n2. Create a virtual environment\n\n```bash\n# On Unix/macOS\npython -m venv venv\nsource venv/bin/activate\n\n# On Windows\npython -m venv venv\n.\\venv\\Scripts\\activate\n```\n\n3. Install the project\n\n```bash\n# Upgrade pip and install build tools\npython -m pip install --upgrade pip\npip install build\n\n# Install the project in editable mode\npip install -e .\n```\n\n### Using Setup Scripts\n\n#### Unix/macOS\n\n```bash\n./setup_scripts/install_dependencies.sh\n```\n\n#### Windows\n\n```powershell\n.\\setup_scripts\\install_dependencies.ps1\n```\n\n### Verifying Installation\n\n- Test the CLI tool\n\n```bash\nprecice-case-generate --help\n```\n\n## Usage\n\n### Command-Line Interface\n\nGenerate a preCICE configuration file from a YAML topology called `topology.yaml`:\n\n```bash\nprecice-case-generate\n```\n\nor pass a topology file via argument;\n\n```bash\nprecice-case-generate -f path/to/your/topology.yaml\n```\n\nThe `precice-case-generate` tool supports the following optional parameters:\n\n- `-f, --input-file`: Path to the input topology.yaml file.\n  - **Default**: `./topology.yaml`\n  - **Description**: Specify a custom topology file for configuration generation.\n\n- `-o, --output-path`: Destination path for the generated folder.\n  - **Default**: `./_generated/`\n  - **Description**: Choose a specific output location for generated files.\n\n- `-v, --verbose`: Enable verbose logging.\n  - **Default**: Disabled\n  - **Description**: Provides detailed logging information during execution.\n\n- `--validate-topology`: Validate the input topology.yaml against the preCICE topology schema.\n  - **Default**: Enabled\n  - **Description**: Ensures the topology file meets the required schema specifications.\n\nExample usage:\n```bash\nprecice-case-generate -f custom_topology.yaml -o /path/to/output -v\n```\n\n\u003e [!NOTE]\n\u003e You should validate your files by running them through precice-tools and the\n\u003e preCICE [config-checker](https://github.com/precice/case-generate) to avoid errors.\n\n### Configuration\n\n1. Prepare a YAML topology file describing your multi-physics simulation setup.\n2. Use the command-line interface to generate the preCICE configuration.\n3. The tool will create the necessary configuration files in the `_generated/` directory.\n\n## Creating Topology with MetaConfigurator\n\nYou can create a topology for your preCICE simulation using the online MetaConfigurator.\nWe provide a preloaded schema to help you get started:\n\n1. Open the MetaConfigurator with the preloaded\n   schema: [MetaConfigurator Link](https://metaconfigurator.github.io/meta-configurator/?schema=https://github.com/precice/case-generate/blob/main/schemas/topology-schema.json\u0026settings=https://github.com/precice/case-generate/blob/main/templates/metaConfiguratorSettings.json)\n\n2. Use the interactive interface to define your topology:\n    - The preloaded schema provides a structured way to describe your simulation components\n    - Add configuration details on the right side of the screen\n\n3. Once complete, export your topology as a YAML file\n    - Save the generated YAML file\n    - Use this file with the `precice-generator` tool to create your preCICE configuration\n    - Validate the generated preCICE config\n      with [config-checker](https://github.com/precice/config-check)\n    - Use `precice-config-checker` and/or `precice-tools check` to validate the generated preCICE config\n\n### Benefits of Using MetaConfigurator\n\n- Visual, user-friendly interface\n- Real-time validation against our predefined schema\n- Reduces manual configuration errors\n- Simplifies topology creation process\n\n## Example Configurations\n\n### Normal Examples (0-5)\n\nOur project provides a set of progressively complex example configurations to help you get started with preCICE\nsimulations:\n\n- Located in `examples/0` through `examples/5`\n- Designed for beginners and intermediate users\n- Each example includes:\n    - A `topology.yaml` file defining the simulation setup\n    - A `precice-config.xml` file\n    - Subdirectories for different simulation components\n- Showcase simple, linear multi-physics scenarios\n- Ideal for learning basic preCICE configuration concepts\n\n### Expert Examples\n\nFor advanced users, we offer more sophisticated configuration examples:\n\n- Located in `examples/expert`\n- Contain more advanced usage of topology options but extend the according example with the same number\n- Demonstrate advanced coupling strategies and intricate topology configurations\n- Targeted at users with a better understanding of preCICE\n\n\u003e [!TIP]\n\u003e Start with normal examples (0-5) and progress to expert examples as you become more comfortable with preCICE\n\u003e configurations.\n\n## Documentation\n\nThe template for our `topology.yaml` file can be found in the `schemas` folder.\n\nAlongside it, you will find `README.md`, which explains the topology's parameters.\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/new-feature`)\n3. Commit your changes (`git commit -m 'Add new feature'`)\n4. Push to the branch (`git push origin feature/new-feature`)\n5. Open a Pull Request\n\n## Troubleshooting\n\n- Ensure all dependencies are correctly installed\n- Verify the format of your input YAML file\n- Check the generated logs for detailed error information\n\n## Acknowledgements\n\nThis project was started with code from the [preCICE controller](https://github.com/precice/controller) repository.\nThe file `format_precice_config.py` was taken\nfrom [preCICE pre-commit hook file](https://github.com/precice/precice-pre-commit-hooks/blob/main/format_precice_config/format_precice_config.py)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprecice%2Fcase-generate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprecice%2Fcase-generate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprecice%2Fcase-generate/lists"}