Skip to content

Commit

Permalink
Adding Contribution guidelines (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucifercr07 authored Sep 26, 2024
1 parent fbd2139 commit a4b5008
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.idea/
.vscode/
.env
97 changes: 97 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
DiceDB welcomes your contributions! Whether you're fixing bugs, adding new features, or improving the documentation, your help is valuable.

To maintain the project's quality and consistency, please follow these guidelines:

- Keep the code consistent: Use the same coding style and conventions throughout the project.
- Keep the git repository consistent: Follow proper git practices to avoid conflicts and ensure a clean history.

## Create a branch for your change

```text
$ cd playground-mono
#
# ensure you are starting from the latest code base
# the following steps, ensure your fork's (origin's) master is up-to-date
#
$ git fetch upstream
$ git checkout master
$ git merge upstream/master
# create a branch for your issue
$ git checkout -b <your issue branch>
```

Make the necessary changes. If the changes you plan to make are too big, make sure you break them down into smaller tasks.

## Making the changes

Follow the best practices when you are making changes.

### Code documentation

Please ensure your code is adequately documented. Some things to consider for documentation:

- Always include struct, module, and package level docs. We are looking for information about what functionality is provided, what state is maintained, whether there are concurrency/thread-safety concerns and any exceptional behavior that the class might exhibit.
- Document public methods and their parameters.

### Backward and Forward compatibility changes

Make sure you consider both backward and forward compatibility issues while making your changes.

- For backward compatibility, consider cases where one component is using the new version and another is still on the old version. Will it break?
- For forward compatibility, consider rollback cases.

## Creating a Pull Request (PR)

- **Verify code-style**
- **Push changes and create a PR for review**

Commit your changes with a meaningful commit message.

```text
$ git add <files required for the change>
$ git commit -m "Meaningful oneliner for the change"
$ git push origin <your issue branch>
After this, create a PullRequest in `github <https://github.com/dicedb/docs/pulls>`_. Make sure you have linked the relevant Issue in the description with "Closes #number" or "Fixes #number".
```

- Once you receive comments on GitHub on your changes, be sure to respond to them on GitHub and address the concerns. If any discussions happen offline for the changes in question, make sure to capture the outcome of the discussion, so others can follow along as well.

It is possible that while your change is being reviewed, other changes were made to the master branch. Be sure to pull rebase your change on the new changes thus:

```text
# commit your changes
$ git add <updated files>
$ git commit -m "Meaningful message for the update"
# pull new changes
$ git checkout master
$ git merge upstream/master
$ git checkout <your issue branch>
$ git rebase master
At this time, if rebase flags any conflicts, resolve the conflicts and follow the instructions provided by the rebase command.
Run additional tests/validations for the new changes and update the PR by pushing your changes:
```

```text
git push origin <your issue branch>
```

- When you have addressed all comments and have an approved PR, one of the committers can merge your PR.
- After your change is merged, check to see if any documentation needs to be updated. If so, create a PR for documentation.

## Timeline for working on Issues

### Issues

- Assigned issues imply intent to work on them.
- Can't work on it? Unassigned yourself to allow others to contribute.
- Provide updates on long-running issues to show progress.
- Inactive issues may be unassigned after a reasonable period.

### Pull Requests (PRs)

- We appreciate timely completion of PRs.
- If a PR becomes inactive, we may close it.
- Need more time? Just let us know in the comments.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,10 @@ DiceDB Playground is an interactive platform designed to let users experiment wi
Allows users to search and play with various DiceDB commands in real-time.

This repository hosts backend service implementation of the Playground.

## How to contribute

The Code Contribution Guidelines are published at [CONTRIBUTING.md](CONTRIBUTING.md); please read them before you start making any changes. This would allow us to have a consistent standard of coding practices and developer experience.

Contributors can join the [Discord Server](https://discord.gg/6r8uXWtXh7) for quick collaboration.

0 comments on commit a4b5008

Please sign in to comment.