Skip to content

✨ Add early access and docstrings #165

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

Merged
merged 2 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions docs/early-access.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
title: CodeRabbit's Early Access Program
sidebar_label: Early Access
description: How Early Access works, what are the expectations and how to get started.
sidebar_position: 10
---

# Early Access Program

In CodeRabbit's dashboard, in the settings of a repository, there is the **Early Access** toggle, which enables early access features. Early access is divided into two categories: **Beta** and **Experiments**. Both are enabled by the same toggle but should be differentiated by a warning whenever they are used.

## Beta

Beta features are ready for public testing.

- The documentation may be incomplete or outdated.
- The changelog may be missing.
- The feature may not be fully stable, but it should give a general idea of the final user experience.
- Edge cases may not be fully covered.
- Some parts of the feature may not be implemented. For example, the GitHub integration may be prioritized over others.

Whenever you use a beta feature, you may see a warning like this:

:::warning
This feature is in [beta](/early-access#beta).
:::

## Experiments

Experiments are ways for CodeRabbit's development team to gather more experience with in-development features.

- They are highly unstable and may not work at all.
- There is no guarantee that they will reach the beta stage and they may be cancelled at any time without any prior notice.
- They are not ready for public use and may not be sufficiently documented.
- They do not represent the end result of the planned feature and do not have a satisfactory user experience.
- We are not gathering feedback for experiments - the direction they take can vary widely.

Whenever you use an experiment, you may see a warning like this:

:::warning
This feature is [experimental](/early-access#experiments).
:::
4 changes: 4 additions & 0 deletions docs/finishing-touches/_category_.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
label: Finishing Touches
position: 12
collapsible: true
collapsed: true
73 changes: 73 additions & 0 deletions docs/finishing-touches/docstrings.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
---
title: Docstrings generation with CodeRabbit
sidebar_label: Docstrings (Experiment)
description: Automated docstrings pull requests with CodeRabbit
---

# Docstrings

Docstrings generation is part of the [finishing touches](/future-developments#finishing-touches) initiative.

:::warning
The [docstrings](/finishing-touches/docstrings) feature is [experimental](/early-access#experiments).
:::

## Usage

Once you are done with your pull request and its reviews, you may want to perform finishing touches to your code, such as adding in-code documentation. You can request CodeRabbit to generate docstrings by typing `@coderabbitai generate docstrings` in a comment under that pull request.

Once sent, CodeRabbit will perform the following actions:

- All functions that are in the pull request's changes will be fetched using `ast-grep`
- Docstrings will be generated for the functions where they are missing or incomplete
- These docstrings will be committed in a new branch in the same repository
- CodeRabbit will open a pull request from this new branch to the existing pull request

Here's an example of what a pull request may look like:

![Docstrings PR](/img/finishing-touches/docstrings-pull-request.png)

CodeRabbit cannot perform further modifications to opened pull requests. From there, it's your turn to checkout the branch and improve it to satisfaction. We believe that this workflow provides a significant headstart to documenting code.

We are testing this workflow internally to adjust the prompts, add more supported software forges, add more supported languages and craft an excellent user experience. However, you can use this preview and enjoy a sneak peek at the future of CodeRabbit.

## Supported software forges

The checked software forges are supported:

- [ ] Azure DevOps
- [ ] Bitbucket
- [x] GitHub
- [ ] GitLab

The presence of an unsupported software forge in this list does not constitute a commitment to support it in the future. Remember that the docstrings feature is [experimental](/early-access#experiments).

## Supported languages

The checked languages are supported:

- [ ] Bash
- [ ] C
- [x] C++
- [ ] C#
- [x] Elixir
- [x] Go
- [ ] Haskell
- [ ] Java
- [x] JavaScript
- [ ] Kotlin
- [ ] Lua
- [ ] Php
- [x] Python
- [ ] React TypeScript
- [ ] Ruby
- [ ] Rust
- [ ] Scala
- [ ] Swift
- [x] TypeScript

The presence of an unsupported language in this list does not constitute a commitment to support it in the future. Remember that the docstrings feature is [experimental](/early-access#experiments).

:::note
In the case of JavaScript and TypeScript, there are tons of ways to declare functions. At the moment, we only support the keyword `function` at the top level.
:::
File renamed without changes.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading