Skip to content

Latest commit

 

History

History
93 lines (62 loc) · 4.94 KB

CONTRIBUTING.md

File metadata and controls

93 lines (62 loc) · 4.94 KB

Contributing to GenLayer Simulator

We're thrilled that you're interested in contributing to the GenLayer Simulator! This document will guide you through the contribution process.

What is the GenLayer Simulator?

The GenLayer Simulator is an interactive sandbox designed for developers to explore the potential of GenLayer's Intelligent Contracts. It replicates the GenLayer network's execution environment and consensus algorithm, providing a controlled and local environment to test different ideas and behaviors.

How You Can Contribute?

Contributions to the GenLayer Simulator are welcome in several forms:

Testing the Simulator and Providing Feedback

Help us make the simulator better by testing and giving feedback:

Sharing New Ideas and Use Cases

Have ideas for new features or use cases? We're eager to hear them! But first:

  • Ensure you have the Simulator installed first to explore existing use cases.
  • After familiarizing yourself with the simulator, contribute your unique use case and share your ideas in our Discord channel.

Bug fixing and Feature development

1. Set yourself up to start coding

  • 1.1. Pick an issue: Select one from the project GitHub repository issue list and assign it to yourself.

  • 1.2. Create a branch: create the branch that you will work on by using the link provided in the issue details page (right panel at the bottom - section "Development")

  • 1.3. Setup the Simulator locally: launch the simulator's frontend and backend by running the docker compose command (Please note that you must have docker, node, and npm installed)

    $ cp .env.example .env
    $ docker compose up

2. Submit your solution

  • 2.1. Install pre-commit hooks: this is used for linting, testing, and enforcing conventions.

    (.venv) $ pre-commit install

    To look into the configuration details, check the .pre-commit-config.yaml file.

    Some of the configurations applied are:

    • Python Black formatter
    • Python pytest for unit tests
    • ESLint for frontend code
    • Prettier for frontend code
    • Conventional commits for commit messages
  • 2.2. Black Formatter on Save File: Configure IDE extensions to format your code with Black before submitting it.

  • 2.3. Code solution: implement the solution in the code.

  • 2.4. Pull Request: Submit your changes through a pull request (PR). Fill the entire PR template and set the PR title as a valid conventional commit.

  • 2.5. Check PR and issue linking: if the issue and the PR are not linked, you can do it manually in the right panel of the Pull Request details page.

  • 2.6. PR Validation and Testing: Your PR will be automatically validated, analyzed, and tested. Please make sure all tests and validations pass before proceeding.

  • 2.7. Peer Review: One or more core contributors will review your PR. They may suggest changes or improvements.

  • 2.8. Approval and Merge: After approval from the reviewers, you can merge your PR with a squash and merge type of action.

3. Other considerations

  • 3.1. Small fixes don't require creating an issue: significantly small issues can be submitted through a valid Pull Request without needing to create an issue.

  • 3.2. Run the frontend in dev mode: to run the frontend separately from the backend and with hot reload enabled, first launch the backend without the frontend:

    $ docker compose upjsonrpc webrequest ollama database-migration postgres

    Then launch the frontend in dev mode:

    $ cd frontend
    $ npm install
    $ npm run dev

Improving Documentation

To contribute to our docs, visit our Documentation Repository to create new issues or contribute to existing issues.

Community

Connect with the GenLayer community to discuss, collaborate, and share insights:

Your continuous feedback drives better product development. Please engage with us regularly to test, discuss, and improve the GenLayer Simulator.