Commit 4f7d7d34 authored by Min Xu's avatar Min Xu Committed by Mandeep Singh Baines
Browse files

[doc] added a bit details to initial setup (#14)

parent e10de4b5
*~
*.swp
*.pyc
*.pyo
.mypy_cache/
*.egg-info/
......@@ -3,7 +3,9 @@ We want to make contributing to this project as easy and transparent as
possible.
## Our Development Process
Minor changes and improvements will be released on an ongoing basis. Larger changes (e.g., changesets implementing a new paper) will be released on a more periodic basis.
Minor changes and improvements will be released on an ongoing basis. Larger
changes (e.g., changesets implementing a new paper) will be released on a
more periodic basis.
## Pull Requests
We actively welcome your pull requests.
......@@ -29,19 +31,61 @@ Facebook has a [bounty program](https://www.facebook.com/whitehat/) for the safe
disclosure of security bugs. In those cases, please go through the process
outlined on that page and do not file a public issue.
## Environment setup
```
~$ python3 -m venv venv2
~$ source venv2/bin/activate
(venv2) ~$ cd git/fairscale/
(venv2) ~/git/fairscale $ pip3 install -r requirements-test.txt
```
## Coding Style
* In your editor, install the [editorconfig](https://editorconfig.org/) extension which should ensure that you are following the same standards as us.
* In your editor, install the [editorconfig](https://editorconfig.org/) extension
which should ensure that you are following the same standards as us.
* Ideally, run black and isort before opening up your PR.
```
black ./(mmf|tests|tools)/**/*.py
isort -rc (mmf|tests|tools)
black .
isort
flake8
```
* Read the [editorconfig](.editorconfig) file to understand the exact coding style preferences.
## Testing
### Static analysis
```
mypy .
```
### Unit tests
```
pytest
```
### CircleCI status
From your PR page, you can expand on the CircleCI results. For GPU test, you should see
what CI has run, like:
```
...
----- generated xml file: /home/circleci/fairscale/test-results/junit.xml ------
================== 217 passed, 2 xfailed in 218.74s (0:03:38) ==================
CircleCI received exit code 0
```
The number of passed and failed should give you an idea on whether your local
test was the same or not.
## Commit Guidelines
We follow the same guidelines as AngularJS. Each commit message consists of a **header**, a **body** and a **footer**. The header has a special format that includes a **type**, and a **subject**:
We follow the same guidelines as AngularJS. Each commit message consists of a **header**,
a **body** and a **footer**. The header has a special format that includes a **type**,
and a **subject**:
```
[<type>] <subject>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment