Skip to content

Commit 50cf246

Browse files
fxmartyecharlaix
andauthored
Add a CONTRIBUTING.md and CODE_OF_CONDUCT.md (#190)
* add contributing and code of conduct files * Update CONTRIBUTING.md Co-authored-by: Ella Charlaix <80481427+echarlaix@users.noreply.github.com> * Update CONTRIBUTING.md Co-authored-by: Ella Charlaix <80481427+echarlaix@users.noreply.github.com> * Update CONTRIBUTING.md Co-authored-by: Ella Charlaix <80481427+echarlaix@users.noreply.github.com> * Update CONTRIBUTING.md Co-authored-by: Ella Charlaix <80481427+echarlaix@users.noreply.github.com> Co-authored-by: Felix Marty <felix@huggingface.co> Co-authored-by: Ella Charlaix <80481427+echarlaix@users.noreply.github.com>
1 parent cf91bd7 commit 50cf246

File tree

2 files changed

+218
-0
lines changed

2 files changed

+218
-0
lines changed

CODE_OF_CONDUCT.md

+132
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, caste, color, religion, or sexual identity
10+
and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
* Demonstrating empathy and kindness toward other people
21+
* Being respectful of differing opinions, viewpoints, and experiences
22+
* Giving and gracefully accepting constructive feedback
23+
* Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
* Focusing on what is best not just for us as individuals, but for the
26+
overall community
27+
28+
Examples of unacceptable behavior include:
29+
30+
* The use of sexualized language or imagery, and sexual attention or
31+
advances of any kind
32+
* Trolling, insulting or derogatory comments, and personal or political attacks
33+
* Public or private harassment
34+
* Publishing others' private information, such as a physical or email
35+
address, without their explicit permission
36+
* Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at
63+
feedback@huggingface.co.
64+
All complaints will be reviewed and investigated promptly and fairly.
65+
66+
All community leaders are obligated to respect the privacy and security of the
67+
reporter of any incident.
68+
69+
## Enforcement Guidelines
70+
71+
Community leaders will follow these Community Impact Guidelines in determining
72+
the consequences for any action they deem in violation of this Code of Conduct:
73+
74+
### 1. Correction
75+
76+
**Community Impact**: Use of inappropriate language or other behavior deemed
77+
unprofessional or unwelcome in the community.
78+
79+
**Consequence**: A private, written warning from community leaders, providing
80+
clarity around the nature of the violation and an explanation of why the
81+
behavior was inappropriate. A public apology may be requested.
82+
83+
### 2. Warning
84+
85+
**Community Impact**: A violation through a single incident or series
86+
of actions.
87+
88+
**Consequence**: A warning with consequences for continued behavior. No
89+
interaction with the people involved, including unsolicited interaction with
90+
those enforcing the Code of Conduct, for a specified period of time. This
91+
includes avoiding interactions in community spaces as well as external channels
92+
like social media. Violating these terms may lead to a temporary or
93+
permanent ban.
94+
95+
### 3. Temporary Ban
96+
97+
**Community Impact**: A serious violation of community standards, including
98+
sustained inappropriate behavior.
99+
100+
**Consequence**: A temporary ban from any sort of interaction or public
101+
communication with the community for a specified period of time. No public or
102+
private interaction with the people involved, including unsolicited interaction
103+
with those enforcing the Code of Conduct, is allowed during this period.
104+
Violating these terms may lead to a permanent ban.
105+
106+
### 4. Permanent Ban
107+
108+
**Community Impact**: Demonstrating a pattern of violation of community
109+
standards, including sustained inappropriate behavior, harassment of an
110+
individual, or aggression toward or disparagement of classes of individuals.
111+
112+
**Consequence**: A permanent ban from any sort of public interaction within
113+
the community.
114+
115+
## Attribution
116+
117+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118+
version 2.0, available at
119+
[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0].
120+
121+
Community Impact Guidelines were inspired by
122+
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
123+
124+
For answers to common questions about this code of conduct, see the FAQ at
125+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available
126+
at [https://www.contributor-covenant.org/translations][translations].
127+
128+
[homepage]: https://www.contributor-covenant.org
129+
[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
130+
[Mozilla CoC]: https://github.com/mozilla/diversity
131+
[FAQ]: https://www.contributor-covenant.org/faq
132+
[translations]: https://www.contributor-covenant.org/translations

CONTRIBUTING.md

+86
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
2+
# How to contribute to Optimum?
3+
4+
Optimum is an open source project, so all contributions and suggestions are welcome.
5+
6+
You can contribute in many different ways: giving ideas, answering questions, reporting bugs, proposing enhancements, improving the documentation, fixing bugs,...
7+
8+
Many thanks in advance to every contributor.
9+
10+
## How to work on an open Issue?
11+
You have the list of open Issues at: https://github.com/huggingface/optimum/issues
12+
13+
Some of them may have the label `help wanted`: that means that any contributor is welcomed!
14+
15+
If you would like to work on any of the open Issues:
16+
17+
1. Make sure it is not already assigned to someone else. You have the assignee (if any) on the top of the right column of the Issue page.
18+
19+
2. You can self-assign it by commenting on the Issue page with one of the keywords: `#take` or `#self-assign`.
20+
21+
3. Work on your self-assigned issue and eventually create a Pull Request.
22+
23+
## How to create a Pull Request?
24+
1. Fork the [repository](https://github.com/huggingface/optimum) by clicking on the 'Fork' button on the repository's page. This creates a copy of the code under your GitHub user account.
25+
26+
2. Clone your fork to your local disk, and add the base repository as a remote:
27+
28+
```bash
29+
git clone git@github.com:<your Github handle>/optimum.git
30+
cd optimum
31+
git remote add upstream https://github.com/huggingface/optimum.git
32+
```
33+
34+
3. Create a new branch to hold your development changes:
35+
36+
```bash
37+
git checkout -b a-descriptive-name-for-my-changes
38+
```
39+
40+
**do not** work on the `main` branch.
41+
42+
4. Set up a development environment by running the following command in a virtual environment:
43+
44+
```bash
45+
pip install -e ".[dev]"
46+
```
47+
48+
(If optimum was already installed in the virtual environment, remove
49+
it with `pip uninstall optimum` before reinstalling it in editable
50+
mode with the `-e` flag.)
51+
52+
5. Develop the features on your branch.
53+
54+
6. Format your code. Run black and isort so that your newly added files look nice with the following command:
55+
56+
```bash
57+
make style
58+
```
59+
60+
7. Once you're happy with your changes, add the changed files using `git add` and make a commit with `git commit` to record your changes locally:
61+
62+
```bash
63+
git add modified_file.py
64+
git commit
65+
```
66+
67+
It is a good idea to sync your copy of the code with the original
68+
repository regularly. This way you can quickly account for changes:
69+
70+
```bash
71+
git fetch upstream
72+
git rebase upstream/main
73+
```
74+
75+
Push the changes to your account using:
76+
77+
```bash
78+
git push -u origin a-descriptive-name-for-my-changes
79+
```
80+
81+
8. Once you are satisfied, go the webpage of your fork on GitHub. Click on "Pull request" to send your to the project maintainers for review.
82+
83+
## Code of conduct
84+
85+
This project adheres to the HuggingFace [code of conduct](CODE_OF_CONDUCT.md).
86+
By participating, you are expected to uphold this code.

0 commit comments

Comments
 (0)