Commit 1af89aeb authored by nd-02110114's avatar nd-02110114
Browse files

revert changes

parent 3438b954
Loading
Loading
Loading
Loading
+14 −13
Original line number Diff line number Diff line
# Contributing to DeepChem

We actively encourage community contributions to DeepChem. The first place to start getting involved is [the tutorials](https://deepchem.readthedocs.io/en/latest/get_started/tutorials.html). Afterwards, we encourage contributors to give a shot to improving our documentation. While we take effort to provide good docs, there's plenty of room for improvement. All docs are hosted on Github, either in `README.md` file, or in the `docs/` directory.
We actively encourage community contributions to DeepChem. The first place to start getting involved is by running our examples locally. Afterwards, we encourage contributors to give a shot to improving our documentation. While we take effort to provide good docs, there's plenty of room for improvement. All docs are hosted on Github, either in `README.md` file, or in the `docs/` directory.

Once you've got a sense of how the package works, we encourage the use of Github issues to discuss more complex changes, raise requests for new features or propose changes to the global architecture of DeepChem. Once consensus is reached on the issue, please submit a PR with proposed modifications. All contributed code to DeepChem will be reviewed by a member of the DeepChem team, so please make sure your code style and documentation style match our guidelines!

## Pull Request Process

## Pull Request Process
Every contribution, must be a pull request and must have adequate time for review by other committers.

A member of the Technical Steering Committee will review the pull request. The default path of every contribution should be to merge. The discussion, review, and merge process should be designed as corrections that move the contribution into the path to merge. Once there are no more corrections, (dissent) changes should merge without further process.

On successful merge the author will be added as a member of the DeepChem organization.

## Coding Conventions
## Code Style Guidelines
DeepChem uses [yapf](https://github.com/google/yapf) to autoformat code.

DeepChem uses these tools or styles for keeping our codes healthy.
``` bash
pip install yapf==0.22.0
cd <git_root>
yapf -i <python_files changed>
```

- [YAPF](https://github.com/google/yapf) (code format)
- [Flake8](https://flake8.pycqa.org/en/latest/) (code style check)
- [mypy](http://mypy-lang.org/) (type check)
- [Numpy Doctsring](https://numpydoc.readthedocs.io/en/latest/index.html) (API documents)
- [doctest](https://docs.python.org/3/library/doctest.html) (interactive examples)
Our integration tests will fail if code is not formatted correctly

Before making a PR, please check your codes using them.
You can confirm how to check your codes from [Coding Conventions](https://deepchem.readthedocs.io/en/latest/development_guide/coding.html).
## Documentation Style Guidelines
DeepChem uses [NumPy style documentation](https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt). Please follow these conventions when documenting code, since we use [Sphinx+Napoleon](http://www.sphinx-doc.org/en/stable/ext/napoleon.html) to automatically generate [docs](https://deepchem.readthedocs.io/en/latest).

## The Agreement

Contributor offers to license certain software (a “Contribution” or multiple “Contributions”) to DeepChem, and DeepChem agrees to accept said Contributions, under the terms of the open source license [The MIT License](https://opensource.org/licenses/MIT)


The Contributor understands and agrees that DeepChem shall have the irrevocable and perpetual right to make and distribute copies of any Contribution, as well as to create and distribute collective works and derivative works of any Contribution, under [The MIT License](https://opensource.org/licenses/MIT).


DeepChem understands and agrees that Contributor retains copyright in its Contributions. Nothing in this Contributor Agreement shall be interpreted to prohibit Contributor from licensing its Contributions under different terms from the [The MIT License](https://opensource.org/licenses/MIT) or this Contributor Agreement.

## DeepChem Technical Steering Committee

The Technical Steering Committee admits and oversees all top-level of DeepChem.

The TSC exercises autonomy in setting up and maintaining procedures, policies, and management and administrative structures as it deems appropriate for the maintenance and operation of these projects and resources.
+4 −22
Original line number Diff line number Diff line
@@ -4,9 +4,9 @@ Coding Conventions
Code Formatting
---------------

.. _`YAPF`: https://github.com/google/yapf
.. _`yapf`: https://github.com/google/yapf

We use `YAPF`_ to format all of the code in DeepChem.  Although it sometimes
We use `yapf`_ to format all of the code in DeepChem.  Although it sometimes
produces slightly awkward formatting, it does have two major benefits.  First,
it ensures complete consistency throughout the entire codebase.  And second, it
avoids disagreements about how a piece of code should be formatted.
@@ -18,30 +18,12 @@ checking it in.

  yapf -i <modified file>

YAPF is run on every pull request to make sure the formatting is correct, so if
Yapf is run on every pull request to make sure the formatting is correct, so if
you forget to do this the continuous integration system will remind you.
Because different versions of YAPF can produce different results, it is
Because different versions of yapf can produce different results, it is
essential to use the same version that is being run on CI.  At present, that
is 0.22.  We periodically update it to newer versions.

Linting
-------

.. _`Flake8`: https://github.com/google/yapf

We use `Flake8` to check our code syntax. Lint tools basically provide these benefits.

- Prevent things like syntax errors or typos
- Save our review time (no need to check unused codes or typos)

Actually, we could remove a tons of unused codes by introducing Flake8 to DeepChem.
Whenever you modify a file, run :code:`flake8` on it.

.. code-block:: bash

  flake8 <modified file> --count --show-source --statistics

If the command return 0, it means your code pass Flake8 check.

Docstrings
----------