Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
31 changes: 31 additions & 0 deletions .github/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# SPDX-License-Identifier: Apache-2.0
# Licensed to the Ed-Fi Alliance under one or more agreements.
# The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0.
# See the LICENSE and NOTICES files in the project root for more information.

name: Copilot Setup Steps
on:
pull_request:
paths:
- '.github/workflows/copilot-setup-steps.yml'
workflow_dispatch:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should also run this file on pull request if this file itself has changed.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added pull_request trigger for when this workflow file changes in commit 3d69259.


jobs:
setup:
name: Setup
runs-on: ubuntu-latest
permissions:
contents: read

defaults:
run:
working-directory: ./src

steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Setup .NET
uses: actions/setup-dotnet@2016bd2012dba4e32de620c46fe006a3ac9f0602 # v5.0.1
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore Ed-Fi-SDG.sln
89 changes: 89 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# Agent Instructions

This document provides instructions for AI coding agents working on this repository.

## Project Overview

This is a C# .NET project for the Ed-Fi Sample Data Generator (SDG), which produces realistic, cohesive, and fictional datasets for use in demonstrations and testing.

## Development Environment

### Prerequisites

- .NET 6.0 SDK or later
- A C# compatible IDE (Visual Studio, Visual Studio Code, or JetBrains Rider)

### Setup Steps

1. Clone the repository
2. Navigate to the `src` directory
3. Run `dotnet restore Ed-Fi-SDG.sln` to restore dependencies
4. Run `dotnet build` to build the solution
5. Run `dotnet test` to execute tests

## C# Coding Standards

### General Guidelines

- Follow the existing code style and conventions in the repository
- Adhere to the `.editorconfig` file settings for formatting and style
- Use meaningful variable and method names
- Keep methods small and focused on a single responsibility
- Write XML documentation comments for public APIs
- Prefer composition over inheritance where appropriate

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a bullet emphasizing adherence to the .editorconfig file.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added bullet emphasizing adherence to .editorconfig file settings in commit 3d69259.


### Naming Conventions

- Use PascalCase for class names, method names, and public properties
- Use camelCase for local variables and private fields
- Use UPPER_CASE for constants
- Prefix interface names with 'I' (e.g., `IService`)
- Use async suffix for asynchronous methods (e.g., `GetDataAsync`)

### Code Organization

- Keep related classes in appropriate namespaces
- One class per file (except for small, tightly coupled helper classes)
- Place unit tests in corresponding test projects
- Use dependency injection for loose coupling

### Error Handling

- Use exceptions for exceptional conditions, not flow control
- Catch specific exceptions rather than generic Exception
- Provide meaningful error messages
- Clean up resources properly using `using` statements or try-finally blocks

### Testing

- Write unit tests for new functionality
- Follow the Arrange-Act-Assert pattern in tests
- Use descriptive test method names that explain what is being tested
- Ensure tests are isolated and can run independently

## Building and Testing

### Build the Solution

```bash
cd src
dotnet build Ed-Fi-SDG.sln
```

### Run Tests

```bash
cd src
dotnet test
```

### Run Specific Tests

```bash
cd src
dotnet test --filter "FullyQualifiedName~YourTestNamespace"
```

## License

This project is licensed under the Apache License, Version 2.0. See the LICENSE file for details.