diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml new file mode 100644 index 0000000..73d9654 --- /dev/null +++ b/.github/workflows/copilot-setup-steps.yml @@ -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: + +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 diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..1b2b8ce --- /dev/null +++ b/AGENTS.md @@ -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 + +### 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.