Skip to content

Commit 1cb9db2

Browse files
authored
chore: migrate community governance files to external repository πŸ“‹ (#1386)
* chore: migrate community governance files to external repository πŸ“‹ - move community meeting materials to areal-project/community - relocate code of conduct to external repository Signed-off-by: mingcheng <mingcheng@apache.org> * docs: reformat community governance files with line breaks πŸ“‹ Signed-off-by: mingcheng <mingcheng@apache.org> --------- Signed-off-by: mingcheng <mingcheng@apache.org>
1 parent 523da45 commit 1cb9db2

7 files changed

Lines changed: 21 additions & 504 deletions

File tree

β€Ž.github/PULL_REQUEST_TEMPLATE.mdβ€Ž

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ Fixes #(issue)
2424

2525
<!-- Mark with 'x' what you've done -->
2626

27-
- [ ] I have read the [Contributing Guide](../CONTRIBUTING.md)
27+
- [ ] I have read the
28+
[Contributing Guide](https://github.com/areal-project/community/blob/main/CONTRIBUTING.md)
2829
- [ ] Pre-commit hooks pass (`pre-commit run --all-files`)
2930
- [ ] Relevant tests pass; new tests added for new functionality
3031
- [ ] Documentation updated (if applicable; built with `./docs/build_all.sh`)
@@ -43,5 +44,6 @@ Fixes #(issue)
4344

4445
______________________________________________________________________
4546

46-
**Need help?** Check the [Contributing Guide](../CONTRIBUTING.md) or ask in
47-
[GitHub Discussions](https://github.com/areal-project/AReaL/discussions)!
47+
**Need help?** Check the
48+
[Contributing Guide](https://github.com/areal-project/community/blob/main/CONTRIBUTING.md)
49+
or ask in [GitHub Discussions](https://github.com/areal-project/AReaL/discussions)!

β€ŽCODE_OF_CONDUCT.mdβ€Ž

Lines changed: 2 additions & 155 deletions
Original file line numberDiff line numberDiff line change
@@ -1,155 +1,2 @@
1-
# Contributor Covenant 3.0 Code of Conduct
2-
3-
## Our Pledge
4-
5-
We pledge to make our community welcoming, safe, and equitable for all.
6-
7-
We are committed to fostering an environment that respects and promotes the dignity,
8-
rights, and contributions of all individuals, regardless of characteristics including
9-
race, ethnicity, caste, color, age, physical characteristics, neurodiversity,
10-
disability, sex or gender, gender identity or expression, sexual orientation, language,
11-
philosophy or religion, national or social origin, socio-economic position, level of
12-
education, or other status. The same privileges of participation are extended to
13-
everyone who participates in good faith and in accordance with this Covenant.
14-
15-
## Encouraged Behaviors
16-
17-
While acknowledging differences in social norms, we all strive to meet our community's
18-
expectations for positive behavior. We also understand that our words and actions may be
19-
interpreted differently than we intend based on culture, background, or native language.
20-
21-
With these considerations in mind, we agree to behave mindfully toward each other and
22-
act in ways that center our shared values, including:
23-
24-
1. Respecting the **purpose of our community**, our activities, and our ways of
25-
gathering.
26-
1. Engaging **kindly and honestly** with others.
27-
1. Respecting **different viewpoints** and experiences.
28-
1. **Taking responsibility** for our actions and contributions.
29-
1. Gracefully giving and accepting **constructive feedback**.
30-
1. Committing to **repairing harm** when it occurs.
31-
1. Behaving in other ways that promote and sustain the **well-being of our community**.
32-
33-
## Restricted Behaviors
34-
35-
We agree to restrict the following behaviors in our community. Instances, threats, and
36-
promotion of these behaviors are violations of this Code of Conduct.
37-
38-
1. **Harassment.** Violating explicitly expressed boundaries or engaging in unnecessary
39-
personal attention after any clear request to stop.
40-
1. **Character attacks.** Making insulting, demeaning, or pejorative comments directed
41-
at a community member or group of people.
42-
1. **Stereotyping or discrimination.** Characterizing anyone’s personality or behavior
43-
on the basis of immutable identities or traits.
44-
1. **Sexualization.** Behaving in a way that would generally be considered
45-
inappropriately intimate in the context or purpose of the community.
46-
1. **Violating confidentiality**. Sharing or acting on someone's personal or private
47-
information without their permission.
48-
1. **Endangerment.** Causing, encouraging, or threatening violence or other harm toward
49-
any person or group.
50-
1. Behaving in other ways that **threaten the well-being** of our community.
51-
52-
### Other Restrictions
53-
54-
1. **Misleading identity.** Impersonating someone else for any reason, or pretending to
55-
be someone else to evade enforcement actions.
56-
1. **Failing to credit sources.** Not properly crediting the sources of content you
57-
contribute.
58-
1. **Promotional materials**. Sharing marketing or other commercial content in a way
59-
that is outside the norms of the community.
60-
1. **Irresponsible communication.** Failing to responsibly present content which
61-
includes, links or describes any other restricted behaviors.
62-
63-
## Reporting an Issue
64-
65-
Tensions can occur between community members even when they are trying their best to
66-
collaborate. Not every conflict represents a code of conduct violation, and this Code of
67-
Conduct reinforces encouraged behaviors and norms that can help avoid conflicts and
68-
minimize harm.
69-
70-
When an incident does occur, it is important to report it promptly. To report a possible
71-
violation, **send an email to the project maintainer fuwth17@gmail.com**.
72-
73-
Community Moderators take reports of violations seriously and will make every effort to
74-
respond in a timely manner. They will investigate all reports of code of conduct
75-
violations, reviewing messages, logs, and recordings, or interviewing witnesses and
76-
other participants. Community Moderators will keep investigation and enforcement actions
77-
as transparent as possible while prioritizing safety and confidentiality. In order to
78-
honor these values, enforcement actions are carried out in private with the involved
79-
parties, but communicating to the whole community may be part of a mutually agreed upon
80-
resolution.
81-
82-
## Addressing and Repairing Harm
83-
84-
If an investigation by the Community Moderators finds that this Code of Conduct has been
85-
violated, the following enforcement ladder may be used to determine how best to repair
86-
harm, based on the incident's impact on the individuals involved and the community as a
87-
whole. Depending on the severity of a violation, lower rungs on the ladder may be
88-
skipped.
89-
90-
1. Warning
91-
1. Event: A violation involving a single incident or series of incidents.
92-
1. Consequence: A private, written warning from the Community Moderators.
93-
1. Repair: Examples of repair include a private written apology, acknowledgement of
94-
responsibility, and seeking clarification on expectations.
95-
1. Temporarily Limited Activities
96-
1. Event: A repeated incidence of a violation that previously resulted in a warning,
97-
or the first incidence of a more serious violation.
98-
1. Consequence: A private, written warning with a time-limited cooldown period
99-
designed to underscore the seriousness of the situation and give the community
100-
members involved time to process the incident. The cooldown period may be limited
101-
to particular communication channels or interactions with particular community
102-
members.
103-
1. Repair: Examples of repair may include making an apology, using the cooldown
104-
period to reflect on actions and impact, and being thoughtful about re-entering
105-
community spaces after the period is over.
106-
1. Temporary Suspension
107-
1. Event: A pattern of repeated violation which the Community Moderators have tried
108-
to address with warnings, or a single serious violation.
109-
1. Consequence: A private written warning with conditions for return from suspension.
110-
In general, temporary suspensions give the person being suspended time to reflect
111-
upon their behavior and possible corrective actions.
112-
1. Repair: Examples of repair include respecting the spirit of the suspension,
113-
meeting the specified conditions for return, and being thoughtful about how to
114-
reintegrate with the community when the suspension is lifted.
115-
1. Permanent Ban
116-
1. Event: A pattern of repeated code of conduct violations that other steps on the
117-
ladder have failed to resolve, or a violation so serious that the Community
118-
Moderators determine there is no way to keep the community safe with this person
119-
as a member.
120-
1. Consequence: Access to all community spaces, tools, and communication channels is
121-
removed. In general, permanent bans should be rarely used, should have strong
122-
reasoning behind them, and should only be resorted to if working through other
123-
remedies has failed to change the behavior.
124-
1. Repair: There is no possible repair in cases of this severity.
125-
126-
This enforcement ladder is intended as a guideline. It does not limit the ability of
127-
Community Managers to use their discretion and judgment, in keeping with the best
128-
interests of our community.
129-
130-
## Scope
131-
132-
This Code of Conduct applies within all community spaces, and also applies when an
133-
individual is officially representing the community in public or other spaces. Examples
134-
of representing our community include using an official email address, posting via an
135-
official social media account, or acting as an appointed representative at an online or
136-
offline event.
137-
138-
## Attribution
139-
140-
This Code of Conduct is adapted from the Contributor Covenant, version 3.0, permanently
141-
available at
142-
[https://www.contributor-covenant.org/version/3/0/](https://www.contributor-covenant.org/version/3/0/).
143-
144-
Contributor Covenant is stewarded by the Organization for Ethical Source and licensed
145-
under CC BY-SA 4.0. To view a copy of this license, visit
146-
[https://creativecommons.org/licenses/by-sa/4.0/](https://creativecommons.org/licenses/by-sa/4.0/)
147-
148-
For answers to common questions about Contributor Covenant, see the FAQ at
149-
[https://www.contributor-covenant.org/faq](https://www.contributor-covenant.org/faq).
150-
Translations are provided at
151-
[https://www.contributor-covenant.org/translations](https://www.contributor-covenant.org/translations).
152-
Additional enforcement and community guideline resources can be found at
153-
[https://www.contributor-covenant.org/resources](https://www.contributor-covenant.org/resources).
154-
The enforcement ladder was inspired by the work of
155-
[Mozilla’s code of conduct team](https://github.com/mozilla/inclusion).
1+
The latest version of this code of conduct can be found at
2+
https://github.com/areal-project/community/blob/main/CODE_OF_CONDUCT.md

β€ŽCONTRIBUTING.mdβ€Ž

Lines changed: 2 additions & 214 deletions
Original file line numberDiff line numberDiff line change
@@ -1,214 +1,2 @@
1-
# Contributing to AReaL
2-
3-
Thank you for your interest in contributing to AReaL! We welcome contributions from
4-
everyone, whether you're fixing bugs, improving documentations, adding new features, or
5-
helping with code reviews. This guide will help you get started.
6-
7-
Please review our [Code of Conduct](CODE_OF_CONDUCT.md) before participating and our
8-
[Governance](GOVERNANCE.md) document to understand how the project is managed.
9-
10-
## Table of Contents
11-
12-
- [Quick Start](#quick-start)
13-
- [Tips for Using AI-Assisted Coding](#tips-for-using-ai-assisted-coding)
14-
- [CI/CD](#cicd)
15-
16-
## Quick Start
17-
18-
1. **Fork and Clone:**
19-
20-
```bash
21-
# Fork the repository on GitHub, then:
22-
git clone https://github.com/YOUR-USERNAME/AReaL
23-
cd AReaL
24-
```
25-
26-
1. **Install Development Dependencies:**
27-
28-
Check our
29-
[installation guide](https://areal-project.github.io/AReaL/en/tutorial/installation.html)
30-
for detailed setup instructions.
31-
32-
1. **Set Up Pre-commit Hooks:**
33-
34-
```bash
35-
# Install hooks (includes formatting, linting, and commit message checks)
36-
pre-commit install --install-hooks
37-
# Subsequent commits will automatically check your files and commit messages:
38-
git commit -a -m 'feat(engine): my change'
39-
```
40-
41-
1. **Find an Issue:**
42-
43-
- Browse
44-
[good first issues](https://github.com/areal-project/AReaL/labels/good%20first%20issue)
45-
- Check [help wanted](https://github.com/areal-project/AReaL/labels/help%20wanted)
46-
issues
47-
- Or create a new issue using our
48-
[issue templates](https://github.com/areal-project/AReaL/issues/new/choose)
49-
50-
1. **Make Your Changes:**
51-
52-
- Create a branch: `git checkout -b your-feature-name`
53-
- Make your changes with proper formatting
54-
- Test your changes following the next step
55-
56-
1. **Test Your Changes:**
57-
58-
```bash
59-
# --sw: step-wise debugging
60-
# --lf: run the last failed test first
61-
pytest -sv --sw --lf tests/
62-
```
63-
64-
Our test suite includes:
65-
66-
- Running all examples to ensure they can execute one RL step
67-
- Checking individual engine functionalities, including rollout, forward-backward,
68-
and weight updates
69-
- Verifying numerical consistency of our packed data format with HuggingFace padded
70-
input, with and without Ulysses
71-
- Testing staleness management functionality
72-
- Ensuring GSM8K SFT loss decreases and RL rewards increase
73-
- Running other unit tests for individual components
74-
75-
Some unit tests require multiple GPUs. The entry point scripts are located under
76-
`tests/torchrun`. In the corresponding test files (e.g.,
77-
`test_data_redistribution.py`), we use subprocesses to launch distributed experiments
78-
with `torchrun` and wait for results.
79-
80-
If you have modified documentation, prepare doc in English and Chinese (use
81-
[/translate-doc-zh](../en/reference/ai_assisted_dev.md#commands) if needed), then
82-
build the docs and preview locally:
83-
84-
```bash
85-
./docs/build_all.sh
86-
```
87-
88-
1. **Submit a Pull Request**
89-
90-
We suggest applying our provided agent harness command `/create-pr` whenever possible.
91-
Use that in `claude`, `opencode`, or any other coding agent CLI.
92-
93-
**IMPORTANT**: For new features and code refactoring, please submit a corresponding
94-
issue or open a draft PR to discuss with the core developers before making any code
95-
changes. Directly opening a PR that conflicts with our future [roadmap](ROADMAP.md) may
96-
waste your effort.
97-
98-
## Tips for Using AI-Assisted Coding
99-
100-
See the full
101-
[AI-Assisted Development Guide](https://areal-project.github.io/AReaL/en/reference/ai_assisted_dev.html)
102-
for detailed documentation.
103-
104-
## CI/CD
105-
106-
### Pre-commit Checks
107-
108-
Pre-commit checks run automatically on every PR. CI executes
109-
`pre-commit run --all-files` to verify formatting (Ruff, clang-format, mdformat) and
110-
linting. Commit messages are also validated against
111-
[Conventional Commits](https://www.conventionalcommits.org/) format (e.g., `feat: ...`,
112-
`fix: ...`, `docs: ...`, `gov: ...`).
113-
114-
As long as you have `pre-commit install --install-hooks` set up locally, your code will
115-
be checked before each commit and your commit messages will be validated automatically.
116-
117-
### Tests
118-
119-
Tests for PRs are triggered when the PR is manually tagged with `safe-to-test`. The test
120-
suite runs on ephemeral GCP compute engines with 2 A100 GPUs (40GB memory).
121-
122-
> **IMPORTANT:** To re-run tests, **DO NOT** click the "Re-run workflow" button on
123-
> GitHub. Instead, remove the `safe-to-test` tag and then add it back.
124-
125-
**Writing Tests for New Features:**
126-
127-
If you have implemented a new feature, we highly recommend writing tests and adding them
128-
to our pytest workflow. Place your test files under `tests/test_*.py` and mark them with
129-
our pre-defined pytest markers:
130-
131-
- `slow`: Tests that take more than 30 seconds to run. These will not run in the CI/CD
132-
workflow unless also marked with `ci`.
133-
- `ci`: Tests that should run in the CI/CD workflow (only needed for `slow` tests).
134-
- `gpu`: Tests that use a single GPU.
135-
- `multi_gpu`: Tests that use more than one GPU.
136-
137-
Our CI/CD runs tests selected by `pytest -m "not slow or ci"`. Since our CI machines
138-
only have two GPUs, please skip tests that require more than 2 GPUs to prevent CI
139-
failures. For example:
140-
141-
```python
142-
import pytest
143-
from areal.infra.platforms import current_platform
144-
145-
# ordinary tests are supposed to run fast, and will run in CI
146-
def test_fast_operation():
147-
...
148-
149-
# slow operations that will NOT run in CI
150-
@pytest.mark.slow
151-
def test_slow_operation():
152-
...
153-
154-
# slow operations BUT must be tested in CI
155-
@pytest.mark.slow
156-
@pytest.mark.ci
157-
def test_slow_operation():
158-
...
159-
160-
# skip tests for more than 2 GPUs
161-
@pytest.mark.skipif(current_platform.device_count() < 4, reason="This test requires 4 GPUs")
162-
def test_some_multi_gpu_functionality():
163-
...
164-
```
165-
166-
### Image Building
167-
168-
The image building workflow can be triggered manually from any branch by users with
169-
write permissions to the repository.
170-
171-
**Triggering the Workflow:**
172-
173-
You can trigger the workflow from any branch using either method:
174-
175-
1. **Via GitHub UI:**
176-
177-
- Go to **Actions** β†’ **"Build and Test Docker Image"**
178-
- Click **"Run workflow"** dropdown
179-
- Select the branch you want to build from
180-
- Click **"Run workflow"**
181-
182-
1. **Via GitHub CLI:**
183-
184-
```bash
185-
# Build from main
186-
gh workflow run build-docker-image.yml --ref main
187-
188-
# Build from a feature branch
189-
gh workflow run build-docker-image.yml --ref feature/my-changes
190-
191-
# Build from current branch
192-
gh workflow run build-docker-image.yml --ref $(git branch --show-current)
193-
```
194-
195-
**Pipeline Stages:**
196-
197-
The workflow executes the following stages sequentially:
198-
199-
1. **Build**: Builds the Docker image and pushes it with `:test` tag
200-
1. **Test**: Automatically runs the full test suite using the `:test` image
201-
1. **Promote**: If tests pass, promotes the image by retagging `:test` β†’ `:dev`
202-
1. **Cleanup**: Always deletes the `:test` image from the registry (success or failure)
203-
204-
Building the image from scratch takes approximately 1-2 hours, plus additional time for
205-
running the test suite.
206-
207-
**Normal PR Testing:**
208-
209-
The PR-based test workflow (triggered by the `safe-to-test` label) remains unchanged and
210-
uses the `:dev` image. This allows testing PRs against the last known-good image.
211-
212-
______________________________________________________________________
213-
214-
Thank you for contributing to AReaL! πŸ™
1+
The latest version of this file can be found at
2+
https://github.com/areal-project/community/blob/main/CONTRIBUTING.md

0 commit comments

Comments
Β (0)