Skip to content

Latest commit

 

History

History
57 lines (39 loc) · 1.5 KB

CONTRIBUTING.md

File metadata and controls

57 lines (39 loc) · 1.5 KB

TensorLayer Contributor Guideline

Continuous integration

We appreciate contributions either by adding / improving examples or extending / fixing the core library. To make your contributions, you would need to follow the pep8 coding style and numpydoc document style. We rely on Continuous Integration (CI) for checking push commits. The following tools are used to ensure that your commits can pass through the CI test:

  • yapf (format code), compulsory
  • isort (sort imports), optional
  • autoflake (remove unused imports), optional

You can simply run

make format

to apply those tools before submitting your PR.

Build from sources

# First clone the repository and change the current directory to the newly cloned repository
git clone https://github.com/tensorlayer/tensorlayer.git
cd tensorlayer

# Install virtualenv if necessary
pip install virtualenv

# Then create a virtualenv called `venv`
virtualenv venv

# Activate the virtualenv

## Linux:
source venv/bin/activate

## Windows:
venv\Scripts\activate.bat

# ============= IF TENSORFLOW IS NOT ALREADY INSTALLED ============= #

# for a machine **without** an NVIDIA GPU
pip install -e .[all_cpu_dev] --upgrade

# for a machine **with** an NVIDIA GPU
pip install -e .[all_gpu_dev] --upgrade

Launching the unittest:

pytest