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

docs(i): Update Contributing Guidelines #3522

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

shahzadlone
Copy link
Member

@shahzadlone shahzadlone commented Mar 10, 2025

Relevant issue(s)

Resolves #3353

Description

  • Since we started getting more PR requests from external devs, threw this together a little while back
  • Add CI workflow descriptions requested by @ChrisBQu
  • Add PR title rules
  • A few other bits
  • Rendered here

@shahzadlone shahzadlone added the documentation Improvements or additions to documentation label Mar 10, 2025
@shahzadlone shahzadlone added this to the DefraDB v0.17 milestone Mar 10, 2025
@shahzadlone shahzadlone requested a review from a team March 10, 2025 14:35
@shahzadlone shahzadlone self-assigned this Mar 10, 2025
Copy link

codecov bot commented Mar 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.50%. Comparing base (ef8284e) to head (26b2b78).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #3522      +/-   ##
===========================================
- Coverage    78.51%   78.50%   -0.01%     
===========================================
  Files          397      397              
  Lines        37599    37599              
===========================================
- Hits         29519    29515       -4     
- Misses        6390     6394       +4     
  Partials      1690     1690              
Flag Coverage Δ
all-tests 78.50% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 15 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ef8284e...26b2b78. Read the comment docs.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@AndrewSisley AndrewSisley left a comment

Choose a reason for hiding this comment

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

I think you have tried to be too comprehensive here, and I fear that the extra words will discourage would-be-contributors and hide the truely key bits of information within this document.

Consider getting Ashutosh's thoughts on this, as IMO it is an important document.


You are encouraged to join the [Source Network Discord](https://discord.gg/w7jYQVJ) to discuss ideas, ask questions, and find inspiration for future developments.
It is recommended that before you begin, familiarize yourself with the following:
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion: Most of these are only relevant to fairly small sections of the codebase, and listing them here may discourage people as it presents Defra as more complicated than it is.

I strongly suggest the removal of everything apart from Project documentation, Git, GitHub and Go.

I also suggest the removal of GitHub and Git, as the use of only very small subset of features is required to successfully contribute is required, and suggesting the read the entire documentation is going to be a waste of time and off-putting.

I suggest the removal of Go, because it is kind of obvious, and, if they are going to contribute to .go files, it is the first thing they are going to google if they need to.

pkgsite
# open http://localhost:8080/github.com/sourcenetwork/defradb
```
- Refer to [go.dev/doc/comment](https://go.dev/doc/comment) for guidelines on writing Go doc comments.
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion: I suggest removing the go-docs stuff from here, as we pay very little attention to it, and we may waste the limited attention and enthusiasm of people reading this document by diverting them to the go-doc docs and our poorly maintained ones.


- [Go](https://go.dev/doc/install)
- Cargo/rustc, typically installed via [rustup](https://www.rust-lang.org/tools/install)
- [SourceHub](https://github.com/sourcenetwork/sourcehub), installed via `make install`
Copy link
Contributor

Choose a reason for hiding this comment

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

todo: IMO these 3 lines are the most important in the entire document and you appear to have removed them. Please put them back, preferably near the start of the document.

- Cargo/rustc, typically installed via [rustup](https://www.rust-lang.org/tools/install)
- [SourceHub](https://github.com/sourcenetwork/sourcehub), installed via `make install`
### Sign the CLA
Read and accept the Contributor License Agreement (for first-time contributors).
Copy link
Contributor

Choose a reason for hiding this comment

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

question: What license?

8. Pushing your feature branch with the commit changes, on to your fork.
9. [Opening a pull request](#opening-pull-request) from your branch on your fork, targeting the `develop` branch of the main repository.

### Limited Use of Branch Flow
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion: This document is for new contributors, I recommend removing this section - it is a waste of reading-time for them and makes the project appear more complex/daunting than it needs to appear.

- Refer to [go.dev/doc/comment](https://go.dev/doc/comment) for guidelines on writing Go doc comments.
### Asking for review
- Request a review from the *database-team*.
- Discuss and adapt the pull request as needed by following the commenting etiquette defined below.
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion: Neither of these are required, I suggest their removal in order to keep this document focused.


## Testing
### Title Format
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion: IMO this is section is either in the wrong place, or duplicated, and should be moved or removed.

I prefer removal, as it is also duplicating the documentation that should be present in the workflow that actually performs this check, and as such will be very obvious to contributors when it fails, and I don't want us to spend time maintaining duplicate documentation.

3. Creating a feature branch on the clone of your forked repository.
4. Making changes on the feature branch.
5. Writing tests for the changed behavior, if applicable.
6. Ensuring that all the `make` target checks are passing:
Copy link
Contributor

Choose a reason for hiding this comment

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

nitpick: The CI does (6), I would avoid spending space/attention here on it.


3. Make changes on the feature branch.
4. Write tests for the changed behavior, if applicable.
5. Ensure that all the `make` target checks pass:
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion: This is a duplicate of an early section, and optional. I suggest removal of (5).

- `make mocks`
- `make lint`
- `make tidy`
- `make test`
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion: Figuring out how to compile/run the tests can be a pain in some repos, and needs to be done very early on in development - I suggest adding a How to compile and run the tests section, preferably early on in this document.

@shahzadlone
Copy link
Member Author

I think you have tried to be too comprehensive here, and I fear that the extra words will discourage would-be-contributors and hide the truely key bits of information within this document.

I think you are right in some areas there is "more" details then necessary. Mostly due to not knowing where to put some of the things (most of these belong on a newly on boarding members wiki page that are internal specific). Some new PRs that are coming in, it would be nice to pin point one location for them to go for all their "PR related conventions, i.e. title syntax, etc."

Consider getting Ashutosh's thoughts on this, as IMO it is an important document.

Good idea, @ashutosh-src

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document CI workflows that run on PR and update contributing guidelines
2 participants