Skip to content

Latest commit

 

History

History
76 lines (49 loc) · 2.73 KB

File metadata and controls

76 lines (49 loc) · 2.73 KB

Contributing to Synapse Framework

The project welcomes contributions from the community!

Set up your development environment

  1. Install Go (if not already installed)

  2. Clone the repository:

    git clone https://github.com/vyrelabs/synapse
    
  3. Navigate to the project directory:

    cd synapse
    
  4. Install Taskfile (if not already installed)

  5. Run all tests to verify your setup with task test:all or run individual component tests with task test PKG=fetcher (replace fetcher with the desired component name, see project's Taskfile).

Considerations for designing abstractions and APIs

  1. Try to stay compatible with standard library interfaces, when applicable.
  2. Prefer interface segregation for low couping with bare-minimum & necessary exposed methods, when possible.
  3. Try to expose safe minimal public API surface with sensible configurable options and defaults. In case the unsafe operations are exposed for standard library compatibility, document them clearly about the potential risks and usage guidelines.

Overall, shrink the API surface, so there's less for the end-users and implementors to mess up.

Contributing

Before writing code for a new feature, please first discuss the change you wish to make via github discussions to ensure that it aligns with the project's goals and to avoid any duplication of effort.

To contribute, please follow these guidelines:

  1. Fork the repository: https://github.com/vyrelabs/synapse

  2. Clone your forked repository to your local machine.

git clone forked-repo-url
  1. Create a new branch for your feature or bug fix.
git checkout -b your-bug-or-feature-branch
  1. Once you have made your changes, ensure that you:

    • Add/Modify tests to cover your changes
    • Update relevant documentation
    • Add/Modify examples, if necessary
    • Run the test suite with task test to verify everything works as expected
  2. Run task lint to ensure your code adheres to the project's coding standards

  3. Make your changes and commit them with clear, descriptive conventoinal commit message. Ensure that you've "Sign-off" your commits. You can do this by adding the -s flag to your git commit command:

    git commit -s
    
  4. Push your changes to your forked repository.

  5. Open a Pull Request (PR) against the relevant branch in the Synapse repository with a clear description of your changes and reference any related issues, if applicable.