How to contribute code
Last updated
Was this helpful?
Last updated
Was this helpful?
GitHub is our primary platform for collaborative software development within the Simpler Grants community. This guide will help you get started and make the most out of your code contribution experience.
Follow the established code style and standards.
Use clear and description variable names, comments and documentation where necessary.
Write tests for your code changes to ensure they function as expected
Run exiting tests and ensure they pass before submitting your pull request
Update any relevant documentation in the README files to reflect changes
Create a new fork of the simpler grants.gov repository for your changes. Fork names should conform to the simpler grants naming convention
For example
Next, create a feature branch using the following command, replacing feature-branch-name with a name that follows our branch naming schema
Clone the forked repository to your local machine using the following command:
Instruction on setting up the local development environment can be found in the README of the repository.
Make your desired changes to the codebase using your preferred editor. Once you're done, stage and commit your changes:
Push your changes to your forked repository on GitHub using the following command:
Frontend:
On the frontend of the project we enforce formatting, linting, typescript checks and unit testing before a code change can be accepted.
To run frontend tests:
API
In the API of the project we enforce formatting, linting and unit tests. These all must pass before code changes can be accepted.
To run API tests:
a. Navigate to your forked repository on GitHub
b. Click on the Pull Request button
c. Fill out the pull request form
d. Validate that GitHub automated integration testing is not failing. If it is go back and make changes to your code until all tests are passing again.
e. Submit the pull request for review by other developers within the community
Example pull request form:
Assign reviewers to your pull request who are knowledgeable about the project and can provide valuable feedback
Address any feedback or comments from reviewers promptly
Make necessary changes and iterate on your code until it meets the projects standard to be accepted
Once your pull request has been approved it will be merged into the main branch and deployed as necessary.
Major updates to the content of this page will be added here.
2/12/2024
Initial Content
Updated with Initial content
10/3/2024
Updated content
Updated content for hackathon
API Development Instructions
Front End Development Instructions
Need help with your local development environment? Post in the if you're having issues. We can walk you through the process of resolving blockers. We also use a CODEOWNERS file to automatically suggest and add folks knowledgeable about the area of the code you're making changes to.