Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: instructions for new contributors #125

Merged
merged 5 commits into from
Apr 2, 2024

Conversation

ayewo
Copy link
Contributor

@ayewo ayewo commented Apr 1, 2024

This PR intends to close #44 by adding info to CONTRIBUTING.md on:

  • development setup
  • build instructions

Summary by CodeRabbit

  • Documentation
    • Expanded the Development Setup section in CONTRIBUTING.md to include details on required tools like Rust compiler, C/C++ compiler, Emscripten, Node.js, Yarn, and Tree-Sitter CLI. Added instructions for cloning the repository, setting up submodules, and running tests.

Copy link
Contributor

coderabbitai bot commented Apr 1, 2024

Walkthrough

The contribution guide has been enhanced by adding a detailed Development Setup section. This update outlines the necessary tools such as the Rust and C/C++ compilers, Emscripten, Node.js, Yarn, and Tree-Sitter CLI. It also includes instructions for cloning the repository, setting up submodules, and running tests, aiming to streamline the process for new contributors.

Changes

File(s) Change Summary
CONTRIBUTING.md Added Development Setup section with detailed instructions on required tools, cloning the repository, setting up submodules, and running tests.

Assessment against linked issues

Objective Addressed Explanation
Improve contribution guide (#44)

Poem

🎉🐰

In the garden of code, where ideas bloom,
A new path is paved, dispelling gloom.
With tools in hand, and steps so clear,
Contributors hop in, overcoming fear.
Through Rust and Node, they craft with glee,
A community grows, strong and free.
🌟📚

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Review Status

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 1fe2884 and 81d47d9.
Files selected for processing (1)
  • CONTRIBUTING.md (1 hunks)
Additional Context Used
Additional comments not posted (1)
CONTRIBUTING.md (1)

25-39: The instructions for building the code are clear and concise. However, it might be beneficial for contributors if you also include a brief explanation of what each command does. This can help new contributors understand the purpose behind the steps they are taking.

CONTRIBUTING.md Outdated
Comment on lines 14 to 21
A high level overview of tools you need to have installed:

* Rust compiler. You'll need [`rustc`](https://rustup.rs/) v1.74 or newer.
* C/C++ compiler. macOS: [Xcode Command Line Tools](https://download.developer.apple.com/Developer_Tools/Command_Line_Tools_for_Xcode_15.3/Command_Line_Tools_for_Xcode_15.3.dmg) via `xcode-select --install`, Linux: [gcc](https://learnubuntu.com/install-gcc/), Windows: [Microsoft Visual C++](https://visualstudio.microsoft.com/vs/features/cplusplus/).
* Emscripten: a C/C++ compiler toolchain for WASM. Install v3.1.56 with [`emsdk`](https://emscripten.org/docs/getting_started/downloads.html).
* Node.js runtime. You'll need [`node`](https://nodejs.org/en/download) v18.5.0 or newer.
* Yarn package manager. You'll need [`yarn`](https://classic.yarnpkg.com/en/docs/install) (classic). Install v1.22.19 with `npm install --global yarn`.
* Tree-Sitter CLI: provides [`tree-sitter`](https://github.com/tree-sitter/tree-sitter/tree/master/cli) binary for testing grammars. Install v0.22.2 with `npm install --global tree-sitter-cli`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding a hyphen to "high level" to form the compound adjective "high-level" as it modifies "overview" in the sentence.

- A high level overview of tools you need to have installed:
+ A high-level overview of tools you need to have installed:

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
A high level overview of tools you need to have installed:
* Rust compiler. You'll need [`rustc`](https://rustup.rs/) v1.74 or newer.
* C/C++ compiler. macOS: [Xcode Command Line Tools](https://download.developer.apple.com/Developer_Tools/Command_Line_Tools_for_Xcode_15.3/Command_Line_Tools_for_Xcode_15.3.dmg) via `xcode-select --install`, Linux: [gcc](https://learnubuntu.com/install-gcc/), Windows: [Microsoft Visual C++](https://visualstudio.microsoft.com/vs/features/cplusplus/).
* Emscripten: a C/C++ compiler toolchain for WASM. Install v3.1.56 with [`emsdk`](https://emscripten.org/docs/getting_started/downloads.html).
* Node.js runtime. You'll need [`node`](https://nodejs.org/en/download) v18.5.0 or newer.
* Yarn package manager. You'll need [`yarn`](https://classic.yarnpkg.com/en/docs/install) (classic). Install v1.22.19 with `npm install --global yarn`.
* Tree-Sitter CLI: provides [`tree-sitter`](https://github.com/tree-sitter/tree-sitter/tree/master/cli) binary for testing grammars. Install v0.22.2 with `npm install --global tree-sitter-cli`.
A high-level overview of tools you need to have installed:
* Rust compiler. You'll need [`rustc`](https://rustup.rs/) v1.74 or newer.
* C/C++ compiler. macOS: [Xcode Command Line Tools](https://download.developer.apple.com/Developer_Tools/Command_Line_Tools_for_Xcode_15.3/Command_Line_Tools_for_Xcode_15.3.dmg) via `xcode-select --install`, Linux: [gcc](https://learnubuntu.com/install-gcc/), Windows: [Microsoft Visual C++](https://visualstudio.microsoft.com/vs/features/cplusplus/).
* Emscripten: a C/C++ compiler toolchain for WASM. Install v3.1.56 with [`emsdk`](https://emscripten.org/docs/getting_started/downloads.html).
* Node.js runtime. You'll need [`node`](https://nodejs.org/en/download) v18.5.0 or newer.
* Yarn package manager. You'll need [`yarn`](https://classic.yarnpkg.com/en/docs/install) (classic). Install v1.22.19 with `npm install --global yarn`.
* Tree-Sitter CLI: provides [`tree-sitter`](https://github.com/tree-sitter/tree-sitter/tree/master/cli) binary for testing grammars. Install v0.22.2 with `npm install --global tree-sitter-cli`.

Copy link
Contributor

@morgante morgante left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding this!

CONTRIBUTING.md Outdated

A high level overview of tools you need to have installed:

* Rust compiler. You'll need [`rustc`](https://rustup.rs/) v1.74 or newer.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is redundant from the ## development tools section below - please consolidate.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Please see dbe396f.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Review Status

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 81d47d9 and e7edd40.
Files selected for processing (1)
  • CONTRIBUTING.md (1 hunks)
Additional Context Used
Additional comments not posted (2)
CONTRIBUTING.md (2)

16-21: Ensure all tool versions mentioned are up-to-date and consider specifying if newer versions are also supported. Additionally, for tools like rustc and node, it might be helpful to mention how to check the current installed version.


25-39: The build instructions are clear and concise. Consider adding a note about potential issues that contributors might encounter during setup (e.g., submodule permissions, test dependencies) and how to resolve them.

CONTRIBUTING.md Outdated Show resolved Hide resolved
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Review Status

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between e7edd40 and dbe396f.
Files selected for processing (1)
  • CONTRIBUTING.md (2 hunks)
Additional Context Used
Additional comments not posted (1)
CONTRIBUTING.md (1)

27-41: Ensure the build instructions are clear and easy to follow for new contributors. Consider adding a brief explanation of what each command does for those unfamiliar with Git or Cargo.

CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Review Status

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between dbe396f and 8949c57.
Files selected for processing (1)
  • CONTRIBUTING.md (2 hunks)
Additional Context Used
Additional comments not posted (2)
CONTRIBUTING.md (2)

14-23: The "Development Setup" section provides a comprehensive list of tools required for contributing. However, it's important to ensure that the versions of the tools mentioned are kept up-to-date to avoid potential issues for contributors. Regularly reviewing and updating these versions can help maintain the accuracy of the setup instructions.


16-16: In the "Development Setup" section, the Rust toolchain version is specified as v1.74 or newer. Given the rapid development of Rust, it's crucial to verify that this version remains compatible with the project's codebase and to update the documentation accordingly if newer versions introduce breaking changes.

Comment on lines +25 to +41
## Building the Code

Use `git` to clone this repository into a location of your choice.
```bash
git clone https://github.com/getgrit/gritql.git
```

Change into the cloned repository and make sure all submodules are correctly set up, including any nested submodules:
```bash
cd gritql
git submodule update --init --recursive
```

Before making any changes to the code, make sure you can run the tests and everything is initially passing:
```bash
cargo test --workspace
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "Building the Code" section clearly outlines the steps to clone the repository, set up submodules, and run tests. This is a significant improvement for new contributors. To further enhance this section, consider adding a troubleshooting subsection that addresses common issues encountered during the setup process, such as submodule initialization errors or test failures.

Would you like me to draft a troubleshooting subsection to address common setup issues?

@morgante morgante merged commit dbce137 into getgrit:main Apr 2, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve contribution guide
2 participants