Update GitHub Copilot instructions for SMRF#72
Merged
Conversation
Copilot
AI
changed the title
[WIP] Add Copilot instructions for SMRF repository
Add GitHub Copilot instructions for SMRF
Apr 3, 2026
There was a problem hiding this comment.
Pull request overview
Adds repository-specific GitHub Copilot guidance for the SMRF codebase by moving from a generic instruction stub to a detailed .github/copilot-instructions.md aligned with SMRF’s domain and structure.
Changes:
- Removes the old generic Copilot review guidance file under
.github/instructions/. - Adds
.github/copilot-instructions.mddescribing SMRF’s purpose, package layout, domain context (AWSM/topocalc/inicheck), and suggested test commands.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
.github/instructions/copilot-instructions.md |
Removes the previous generic Copilot instruction stub. |
.github/copilot-instructions.md |
Introduces SMRF-specific Copilot instructions (repo structure, domain context, review/testing guidance). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Agent-Logs-Url: https://github.com/iSnobal/smrf/sessions/f0b6fb60-3776-4d0f-b9ab-179af0683851 Co-authored-by: jomey <178649+jomey@users.noreply.github.com>
Use the higher level instructions under .github instead.
This was the actual file generated
06bd931 to
4382031
Compare
Member
|
Now that the organization wide instructions are merged, these are the updates specific to SMRF |
Hedrick-ARS
approved these changes
Apr 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Creates
.github/copilot-instructions.mdto give GitHub Copilot repository-specific context for the SMRF codebase, following the pattern established in iSnobal/awsm#36 PR.Contents
.github/instructions/(Ruff, NumPy docstrings, Cython, snow physics, etc.)topocalcdependency for topographic layers (load_topo.py,toporad.py);inicheck-managed.iniconfig filesmake build_extensions testsandpython3 -m unittest smrf/tests/data/test_topo.pyOriginal prompt
Create a repository-wide instruction set for the SMRF repository to provide context for GitHub Copilot. These instructions are adapted from the standard established in AWSM PR 36 but tailored specifically for SMRF's role and structure.
Instructions Content
Copilot Instructions for SMRF
Repository Description
The Spatial Modeling for Resources Framework (SMRF) is a Python-based framework designed to provide a modular approach to spatial modeling of meteorological data. SMRF acts as the primary forcing data engine for the Automated Water Supply Model (iSnobal/awsm), distributing point measurements or gridded data over a digital elevation model (DEM) to provide inputs for snow mass and energy balance models.
Repository Structure
The project follows a modular Python package structure:
smrf/: Main package directory.cli/: Command-line interface implementations.data/: Default configuration files, static resources, and sample data.distribute/: Classes for distributing meteorological variables (temp, precip, etc.).envphys/: Physical calculations for environmental variables (e.g., radiation, vapor pressure).framework/: Core logic for model execution, threading, and data management.output/: Handlers for various output formats (e.g., NetCDF).spatial/: Spatial operations and handling of DEM/grid data.tests/: Unit and integration tests.utils/: Common utility functions and helpers.docs/: Sphinx documentation.pyproject.toml&Makefile: Build system and task automation.Key Guidelines
1. Code Style & Standards
Adhere to the specialized iSnobal organization agents defined in
iSnobal/.github:@iSnobal/.github/instructions/python-style-agent.mdfor Ruff formatting, type hints, and naming conventions.@iSnobal/.github/instructions/legacy-migrator-agent.mdwhen refactoring complex or obscure legacy code.@iSnobal/.github/instructions/documentation-agent.mdfor NumPy-style docstrings and RST formatting.@iSnobal/.github/instructions/dependency-modernization-agent.mdfor Conda-based environment management.@iSnobal/.github/instructions/performance-cython-agent.mdfor C/Cython optimizations and NumPy vectorization.@iSnobal/.github/instructions/snow-physics-agent.mdfor physical correctness in radiation and energy balance logic.2. Domain Context
pysnobal(iSnobal wrapper), and iSnobal/awsm (orchestrator). SMRF provides the critical spatial distribution of meteorological variables required by iSnobal/awsm to drive snow mass and energy balance models.smrf/data/load_topo.pyorsmrf/envphys/solar/toporad.py), ensure the dependency on iSnobal/topocalc is maintained for physical consistency and topographic layer generation..iniconfiguration files (managed viainicheck). Ensure any changes to distribution methods or parameters are reflected in the expected.inistructure to maintain compatibility with model initialization and iSnobal/awsm orchestration workflows.3. Review Style
When providing feedback or reviewing code:
4. Testing & Build
Follow the specialized
@iSnobal/.github/instructions/testing-coverage-agent.mdfor detailed quality and coverage standards:unittestframework for all tests.smrf/tests.make build_extensions testspython3 -m unittest smrf/tests/data/test_topo.pyThe following is the prior conversation context from the user's chat exploration (may be truncated):
User: Revisit the 2. Domain Context and rewrite the models section from scratch and combine with Topocalc
Assistant: I have rewritten the Domain Context section to specifically focus on the relationship between SMRF, AWSM, and the
topocalcdependency as requested.Updated Domain Context Section: