You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update contribution guidelines and PULL_REQUEST_TEMPLATE (#2878)
* Update contribution guidelines and PULL_REQUEST_TEMPLATE
Based on this discussion, we need to update the docs for contributing
to faker-ruby.
https://github.com/orgs/faker-ruby/discussions/2877
* Better wording
* Update CONTRIBUTING.md
Co-authored-by: Thiago Araujo <[email protected]>
* Update PULL_REQUEST_TEMPLATE.md
* Update CONTRIBUTING.md
---------
Co-authored-by: Thiago Araujo <[email protected]>
Copy file name to clipboardExpand all lines: .github/PULL_REQUEST_TEMPLATE.md
+5-6Lines changed: 5 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,13 +21,13 @@ Feel free to discard it if you need to (e.g. when you just fix a typo). -->
21
21
### Motivation / Background
22
22
23
23
<!--
24
-
Describe why this Pull Request needs to be merged. What bug have you fixed? What feature have you added? Why is it important?
24
+
Describe why this Pull Request needs to be merged. What bug have you fixed? Why is it important?
25
25
If you are fixing a specific issue, include "Fixes #ISSUE" (replace with the issue number, remove the quotes) and the issue will be linked to this PR.
26
26
27
-
If you're proposing a new generator, please follow the [Documentation guidelines](https://github.com/faker-ruby/faker/blob/main/CONTRIBUTING.md#documentation).
27
+
If you're proposing a new generator or locale, please review and follow the [Contributing guidelines](https://github.com/faker-ruby/faker/blob/main/CONTRIBUTING.md) first.
28
28
-->
29
29
30
-
This Pull Request has been created because [REPLACE ME]
30
+
This Pull Request has been created because [REPLACE ME].
31
31
32
32
### Additional information
33
33
@@ -42,8 +42,7 @@ Before submitting the PR make sure the following are checked:
42
42
*[ ] Tests are added or updated if you fix a bug, refactor something, or add a feature.
43
43
*[ ] Tests and Rubocop are passing before submitting your proposed changes.
44
44
45
-
If you're proposing a new generator:
45
+
If you're proposing a new generator or locale:
46
46
47
-
*[ ] Open an issue first for discussion before you write any code.
48
47
*[ ] Double-check the existing generators documentation to make sure the new generator you want to add doesn't already exist.
49
-
*[ ] You've reviewed and followed the [Documentation guidelines](https://github.com/faker-ruby/faker/blob/main/CONTRIBUTING.md#documentation).
48
+
*[ ] You've reviewed and followed the [Contributing guidelines](https://github.com/faker-ruby/faker/blob/main/CONTRIBUTING.md).
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+24-9Lines changed: 24 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,25 +4,33 @@ We are always happy to make improvements to Faker. There are many ways to contri
4
4
5
5
Following these guidelines helps to communicate that you respect the time of the developers managing and developing this open source project. In return, they should reciprocate that respect by addressing your issue, assessing changes, and helping you finalize your pull requests.
6
6
7
-
Have a fix for a problem you've been running into or an idea for a new feature you think would be useful? Here's what you need to do:
7
+
## Reporting a bug
8
+
9
+
Have a fix for a problem you've been running into? Here's what you need to do:
8
10
9
11
- Fork this repo and clone your fork to somewhere on your machine.
10
12
-[Ensure that you have a working environment](#setting-up-your-environment).
11
13
- Read up on the [architecture of the gem](#architecture), [how to run tests](#running-the-tests), and [the code style we use in this project](#code-style).
12
14
- Cut a new branch and write a failing test for the feature or bugfix you plan on implementing.
13
15
-[Make sure your branch is well managed as you go along](#managing-your-branch).
14
-
- Review the guidelines for [adding new generators](#adding-new-generators), [adding YAML files](#yaml-files), and [YARD docs](#yard-docs).
15
16
-[Refrain from updating the changelog](#a-word-on-the-changelog).
16
17
- Push to your fork and submit a pull request.
17
18
-[Ensure that the test suite passes on GitHub Actions and make any necessary changes to your branch to bring it to green](#continuous-integration).
18
19
20
+
## What contributions we are looking for
21
+
22
+
faker-ruby already has lots of generators and locales. We appreciate any efforts made into updating the **existing** locales by:
23
+
24
+
- adding new translations
25
+
- updating the existing translations
26
+
- fixing any outdated/wrong translations
27
+
19
28
Although we maintain Faker in our free time, we try to respond to contributions in a timely manner. Once we look at your pull request, we may give you feedback. For instance, we may suggest some changes to make to your code to fit within the project style or discuss alternate ways of addressing the issue in question. Assuming we're happy with everything, we'll then bring your changes into main. Now you're a contributor!
20
29
21
30
## Setting up your environment
22
31
23
32
Faker requires Ruby version >= 2.7. After forking, and cloning the repo, navigate to the directory, and run:
24
33
25
-
26
34
```ruby
27
35
bundle install
28
36
```
@@ -32,17 +40,14 @@ Run `rake` to ensure the project is all setup. It runs the tests and rubocop. Th
32
40
## Architecture
33
41
34
42
This project follows the typical structure for a gem: code is located in `/lib` and tests are in `/test`. Generators
35
-
36
43
docs are available in the `/doc` folder.
37
44
38
-
39
45
## Running the tests
40
46
41
47
To run all of the tests, simply run:
42
48
43
49
```ruby
44
50
bundle exec rake test
45
-
46
51
```
47
52
48
53
## Code Style
@@ -64,21 +69,31 @@ There are a few ways to run RuboCop:
64
69
65
70
```ruby
66
71
`bundle exec rubocop`#-> to run Rubocop only
67
-
68
72
`bundle exec rake`#-> to run the test suite and rubocop after.
69
73
```
70
74
71
75
## Managing your branch
72
76
73
77
- Use well-crafted commit messages and Pull Requests descriptions, providing context if possible. Please use the Pull Request template when opening a new PR.
74
-
- When updating documentation, or README, [skip running worfklow runs](https://docs.github.com/en/actions/managing-workflow-runs/skipping-workflow-runs).
78
+
- When updating documentation, or README, [skip running CI](https://docs.github.com/en/actions/managing-workflow-runs/skipping-workflow-runs).
75
79
- Squash "WIP" commits and remove merge commits by rebasing your branch against main. We try to keep our commit history as clean as possible.
76
80
- To prevent pushing with test failures or Rubocop offenses, see [Setup a custom pre-push git hook](#setup-a-custom-pre-push-git-hook).
77
81
78
-
## Adding new generators
82
+
## Adding new generators/locales
83
+
84
+
New generators will only be added to the gem after:
85
+
86
+
- there's been a poll in the [community](https://github.com/orgs/faker-ruby/discussions/categories/new-feature-locale-generator). Use this to get feedback on how others would use it, what edge cases to cover, etc.
87
+
- the community is interested in the feature.
88
+
89
+
This allow us to measure the interest and see some traction before we decide to accept the proposal for a new generator.
90
+
91
+
**Note**: we will not accept new generators/locales that do not follow the requirements above.
79
92
80
93
### General Guidelines
81
94
95
+
Once the feature has met the requirements above, please review these guidelines before opening a PR:
96
+
82
97
- Avoid:
83
98
- Hurtful language that can convey exclusionary behavior, such as racism, sexism, homophobia.
84
99
- Graphically violent or harmful terms towards any living beings.
0 commit comments