Skip to content

agalliani/repo-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Details of Files Generated by init.sh

Here is an overview of the main files created by the script, with a focus on those fundamental for collaboration and advanced use of Copilot/AI:

  • .github/copilot-instructions.md:

    • Contains rules, conventions, and example prompts to guide Copilot and other AI agents in generating code and documentation.
    • Recommended structure:
      # Instructions for Copilot/AI
      
      ## Project objectives
      - Clearly and concisely describe what the project should do.
      
      ## Style conventions
      - List formatting rules, variable names, function/class structure, etc.
      
      ## Example prompts
      - Provide examples of comments or requests that lead to quality code generation.
      - Example:
          ```python
          # Write a function that calculates the average of a list of numbers
          ```
      
      ## Documentation rules
      - How docstrings, comments, README, etc. should be written.
      
      ## Best practices for using Copilot
      - Tips on how to get useful suggestions and how to validate generated code.
  • .github/COMMIT_CONVENTION.md: Rules for commit messages (e.g., Conventional Commits).

  • .github/CONTRIBUTING.md: Guidelines for contributing to the project.

  • .github/PULL_REQUEST_TEMPLATE.md: Template for pull requests.

  • .github/SECURITY.md: How to report security vulnerabilities.

  • .github/CODEOWNERS: Defines code review owners.

  • .github/ISSUE_TEMPLATE/: Templates for bug reports and feature requests.

  • .gitignore: Excludes common files and folders from version control.

  • CHANGELOG.md: History of relevant changes.

  • LICENSE: Project license (e.g., MIT).

  • package.json: Base configuration for Node.js projects.

  • README.md: Main project documentation.

  • jest.config.js, setupTests.js: Configuration and setup for JavaScript/React tests.

  • pytest.ini, requirements-dev.txt: Configuration and dependencies for Python testing and development.

  • .editorconfig, .prettierrc, .eslintrc.json, .flake8: Formatting and linting rules for various languages.

Customize these files according to your team's and project's needs to get the most out of Copilot and collaboration.

Project Template with Copilot

This repository is designed as a template to quickly start new projects, leveraging the capabilities of GitHub Copilot.

Repository Structure

  • src/ — Folder for project source code
  • docs/ — Documentation and guides
  • .gitignore — File to exclude common files/folders
  • init.sh — Automatic initialization script for the project structure and base files (see below)

What init.sh Does

The init.sh script automates the creation of the repository's base structure and all fundamental files for a new project. Specifically:

  • Creates the .github/ folder with templates for issues, pull requests, contribution guidelines, security, commit conventions, and Copilot/AI instructions.
  • Generates common configuration files such as .gitignore, LICENSE, CHANGELOG.md, package.json, README.md, test files (jest.config.js, setupTests.js, pytest.ini), and configuration files for formatting and linting (.editorconfig, .prettierrc, .eslintrc.json, .flake8).
  • Prepares templates for issues and feature requests in .github/ISSUE_TEMPLATE/.
  • Creates files for managing development dependencies (requirements-dev.txt).

Purpose: to speed up the startup of a new project by providing a complete and customizable base, ready to be adapted to specific needs.

How to use:

  1. Run bash init.sh from the repository root.
  2. Customize the generated files according to your project's needs.

Note: You can modify the script to add/remove files or change default content.

How to Use This Template

  1. Click on "Use this template" on GitHub to create a new repository based on this one.
  2. Customize the structure according to your needs.
  3. Start writing code in the src/ folder.

Tips & Tricks for Copilot

  • Write clear comments: Copilot generates better code if comments are detailed.
  • Leverage suggestions: Press Tab to accept, Esc to ignore, and Ctrl+Space to see more options.
  • Request complex functions: Describe what you want to achieve, Copilot can generate entire functions or classes.
  • Refactoring: Use Copilot to improve existing code, not just to write new code.
  • Documentation: Ask Copilot to generate docstrings or comments for your code.

Usage Example

# src/example.py
"""Example function generated with Copilot"""
def add(a, b):
    """Returns the sum of two numbers"""
    return a + b

For questions or suggestions, open an issue!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages