Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 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
10 changes: 10 additions & 0 deletions .copilotignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Environment & secrets
.env
.env*
*.env
*.pem
*.key
*.cert

# Dependency lockfile
poetry.lock
30 changes: 30 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
name: "🐛 Bug Report"
about: Report a reproducible error, crash, or incorrect result in Zyra
title: "[Bug] "
labels: [bug]
assignees: ""
---

## Description
A clear and concise description of the bug.

## Steps to Reproduce
Steps to reproduce the behavior:
1. Run command `...`
2. Use dataset `...`
3. Observe error `...`

## Expected Behavior
What you expected to happen.

## Actual Behavior
What actually happened, including error messages/logs.

## Environment
- OS: [e.g. Ubuntu 22.04]
- Python version: [e.g. 3.10]
- Zyra version/commit: [e.g. main @ abc123]

## Additional Context
Add any other context (screenshots, configs, datasets).
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
blank_issues_enabled: false

issue_templates:
- name: "🐞 Bug Report"
description: "Report a reproducible problem in Zyra"
file: bug_report.md
labels: ["bug"]

- name: "✨ Feature Request"
description: "Propose a new feature or enhancement"
file: feature_request.md
labels: ["enhancement"]

- name: "⚡ Workflow Gap / Missing Command"
description: "Report missing CLI functionality needed for a workflow"
file: workflow_gap.md
labels: ["workflow-gap", "enhancement"]

contact_links:
- name: "📖 Documentation"
url: "https://github.com/NOAA-GSL/zyra/wiki"
about: "Check the Zyra documentation for guidance before opening an issue"
- name: "💬 Discussions"
url: "https://github.com/NOAA-GSL/zyra/discussions"
about: "For design, philosophy, and open-ended questions, please use Discussions"
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: "✨ Feature Request"
about: Suggest new functionality to improve Zyra
title: "[Feature] "
labels: [enhancement]
assignees: ""
---

## Summary
A clear and concise description of the feature you’d like to see.

## Motivation
Why is this feature important?
(Does it enable a new workflow, improve performance, enhance usability, etc.?)

## Proposed Solution
If you have ideas about implementation, describe them here.
(e.g., new CLI command, pipeline stage, visualization option)

## Alternatives Considered
Any alternative approaches you’ve tried or considered.

## Additional Context
Links, diagrams, or references that help explain the feature.
35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/workflow_gap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: "⚡ Workflow Gap / Missing Command"
about: "Report missing CLI functionality needed for a workflow"
title: "[Workflow Gap] <describe missing functionality>"
labels: ["workflow-gap", "enhancement"]
assignees: ""

---

## Summary
A workflow request requires functionality that is not currently implemented in the Zyra CLI.

## Current State
- **Available commands used:** <list existing commands from manifest>
- **Missing functionality:** <describe the missing step or CLI command>

## Desired Behavior
- Add support for: <new command or option>
- Expected usage example:
```bash
zyra <command> --options
```

## Implementation Plan (Proposal)
- [ ] Implement core functionality in `src/zyra/`
- [ ] Add tests in `tests/`
- [ ] Ensure comprehensive docstrings for auto-generated documentation
- [ ] Include example in sample workflows

## Context
<Explain why this functionality is needed, who benefits, and any dependencies.>

---

🔗 *Generated by Zyra Helper Bot to ensure workflows map cleanly to implemented commands.*
28 changes: 28 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Pull Request Template

## Summary

Provide a short summary of the changes in this PR.

## Related Issue

Closes #<issue-number>
(Ensure this PR links to a **Workflow Gap** issue if adding new CLI functionality)

## Changes

- [ ] Implemented functionality in `src/zyra/`
- [ ] Added/updated tests in `tests/`
- [ ] Verified comprehensive **docstrings** for auto-generated documentation
- [ ] Added/updated example in sample workflows

## Checklist

- [ ] Code follows project style guidelines
- [ ] All tests pass locally
- [ ] Documentation builds cleanly from docstrings
- [ ] I have linked this PR to a relevant issue

---

🔗 *Generated by Zyra Helper Bot to ensure contributors align PRs with workflow-gap issues.*
113 changes: 113 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
# Copilot Repository Instructions for Zyra

## Project Summary
Zyra is an open-source **Python framework for scientific data visualization**.
It provides a **modular pipeline** for:
- Data acquisition
- Data processing
- Rendering
- Dissemination (export, publishing)

The project supports **educators, researchers, and developers** who need reproducible, extensible workflows.

- **Language:** Python 3.10+
- **Package Manager:** [Poetry](https://python-poetry.org/)
- **Containerization:** Docker / Docker Compose
- **Linting/Formatting:** Ruff + Pre-commit hooks
- **Tests:** Pytest

---

## Environment & Build Instructions

### Bootstrap
- Always use **Poetry** for dependency management.
- Run:
```bash
poetry install
```
- This creates the virtual environment and installs dependencies from `pyproject.toml` + `poetry.lock`.

### Build & Run
- Build is managed via Poetry:
```bash
poetry build
```
- Run Zyra inside Poetry shell:
```bash
poetry shell
python -m zyra
```

### Tests
- Tests are located in `tests/`.
- Always run via Poetry:
```bash
poetry run pytest
```

### Lint & Formatting
- Ruff is configured in `ruff.toml`.
- Run:
```bash
poetry run ruff check .
poetry run ruff format .
```
- Pre-commit is configured in `.pre-commit-config.yaml`:
```bash
pre-commit install
pre-commit run --all-files
```

### Docker/Docker Compose
- To build the Docker image:
```bash
docker build -t zyra .
```
- To run with Compose:
```bash
docker-compose up
```

---

## Validation & CI
- GitHub Actions run on **push/PR**:
- Install & lint (`ruff`, `pre-commit`)
- Run tests (`pytest`)
- Build validation (`poetry build`)
- To replicate locally, run the same Poetry + lint/test steps listed above.

---

## Project Layout
- `src/zyra/` → Core source code modules
- `tests/` → Unit and integration tests
- `docs/` → Documentation and wiki sources
- `scripts/` → Utility scripts for workflows
- `samples/` → Example data and workflows
- `data/` → Supporting datasets

### Key Configuration Files
- `pyproject.toml` → Poetry, build, lint/test configs
- `poetry.lock` → Locked dependencies
- `ruff.toml` → Ruff lint/format rules
- `.pre-commit-config.yaml` → Git hooks
- `Dockerfile` / `docker-compose.yml` → Containerization setup

### Repo Root Files
- `README.md` – Overview, usage, examples
- `CONTRIBUTING.md` – Contribution guidelines
- `SECURITY.md` – Security practices
- `CITATION.cff` – Citation metadata
- `LICENSE` – Open source license

---

## Explicit Guidance for Copilot
- Always use **Poetry commands** (`poetry install`, `poetry run pytest`, `poetry run ruff check`) instead of raw `pip` or `pytest`.
- Trust these instructions for build, test, and validation steps.
- Only perform additional searching if these instructions are incomplete or produce errors.
- Keep contributions modular and ensure **tests + linting pass locally** before suggesting PRs.

---
34 changes: 34 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,40 @@ To keep development organized, we use a two-branch model:

---

## Workflow Gap Issues & PRs

Zyra now uses structured **Workflow Gap** issue and PR templates to ensure new CLI functionality is properly tracked.

### Filing Bug Reports
- Use the `🐞 Bug Report` template (`.github/ISSUE_TEMPLATE/bug_report.md`).
- Provide clear steps to reproduce, expected vs. actual behavior, and environment details.

### Filing Feature Requests
- Use the `✨ Feature Request` template (`.github/ISSUE_TEMPLATE/feature_request.md`).
- Describe the feature, motivation, proposed solution, and alternatives.
- Use this template only for enhancements that do **not** map directly to CLI commands.


### Filing Workflow Gap Issues
- Use the `⚡ Workflow Gap / Missing Command` template (`.github/ISSUE_TEMPLATE/workflow_gap.md`).
- Clearly describe:
- Which CLI commands exist today
- What is missing
- Why the feature is needed
- The template will guide you to include an implementation plan and examples.

### Submitting PRs for Workflow Gaps
- All PRs that add CLI functionality should link to the related Workflow Gap issue.
- The PR template (`.github/PULL_REQUEST_TEMPLATE.md`) includes a checklist:
- Add tests
- Write comprehensive **docstrings** (for auto-generated docs)
- Include examples in workflows
- Ensure all boxes are checked before requesting review.

By following these templates, contributors help keep Zyra’s CLI aligned with real workflows and ensure documentation stays accurate and reproducible.

---

## Code Style

- Python 3.10+ required.
Expand Down
38 changes: 38 additions & 0 deletions llm/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
LLM Content (Repo-only)

Purpose
- Repository-local content for LLM tooling that does not need to be packaged
with the Python distribution. Suitable for ChatGPT Actions, Open WebUI tools,
experiments, and deployment artifacts.

Layout
- `prompts/`: System and task prompts for human or tool use.
- `actions/`: ChatGPT Action definitions (`ai-plugin.json`, `openapi.yaml`).
- `open-webui/`: Local Python tools and examples (not imported by `zyra`).
- `examples/`: Snippets (curl payloads, screenshots, config examples).

Open WebUI Tool Settings (Valves)
- Tools in `llm/open-webui/tools/` (e.g., `zyra_cli_manifest.py`) expose configurable Valves in the Open WebUI UI
under Workspace → Tools → <tool> → Settings.
- Common valves for `zyra_cli_manifest`:
- `zyra_api_base`: Base URL for Zyra API (default `http://localhost:8000`). The tool calls `GET /commands` with
query params.
- `zyra_api_key`: Optional API key; may be left blank.
- `api_key_header`: Header to send the API key (default `X-API-Key`).
- `api_timeout` / `net_timeout`: Short timeouts (seconds) for API and other HTTP fetches.
- `caps_url`: Optional direct URL to `zyra_capabilities.json`; used if the API is unreachable. May be blank.
- `offline`: If true, skip all network fetches.
- If Settings doesn’t reflect new fields or optional status after a code update, re‑save (or remove/re‑add) the tool
and refresh the page — some builds cache the previous schema.

See also
- `llm/open-webui/README.md` for usage notes and paste‑ready tool workflow.

Configuration
- Set `ZYRA_LLM_DIR` to override the default external LLM directory.
- Default lookup path can be `llm/` when no env var is provided.

Conventions
- No secrets; prefer env vars and documented config.
- Keep prompts small, composable, and versioned via filenames.
- Use relative paths; avoid absolute paths.
14 changes: 14 additions & 0 deletions llm/actions/cli_manifest/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Zyra CLI Manifest API (ChatGPT-friendly OpenAPI)

Purpose
- Minimal OpenAPI spec that exposes the Zyra CLI manifest (`zyra_capabilities.json`) directly from GitHub.
- Quick to import into ChatGPT Actions or similar tools to let an LLM inspect available CLI commands.

Usage (ChatGPT Actions)
- In ChatGPT → Actions → Create, supply a URL to this `openapi.yaml` (host from a raw URL in your fork or static hosting).
- Only the `/zyra_capabilities.json` endpoint is active (served by GitHub raw). The `/execute` endpoint is a placeholder and not hosted.

Notes
- Anonymous access works; GitHub raw applies rate limits. For higher limits or non-public use, host a copy of the manifest yourself.
- Source of truth for this Action lives here (`llm/actions/cli_manifest/`).

Loading