Unverified Commit 311692fd authored by MariBerry's avatar MariBerry Committed by GitHub
Browse files

Merge pull request #1 from deepchem/master

Update fork
parents 291b5c2f 6860317d
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -3,9 +3,17 @@ on:
  push: # ci work when pushing master branch
    branches:
      - master
    paths:
      - "scripts/install_deepchem_conda.ps1"
      - "scripts/install_deepchem_conda.sh"
      - "env.*.yml"
  pull_request: # ci work when creating a PR to master branch
    branches:
      - master
    paths:
      - "scripts/install_deepchem_conda.ps1"
      - "scripts/install_deepchem_conda.sh"
      - "env.*.yml"
jobs:
  bash-build:
    runs-on: ${{ matrix.os }}
+39 −4
Original line number Diff line number Diff line
@@ -124,8 +124,10 @@ jobs:
      if: runner.os == 'Linux' || runner.os == 'macOS'
      shell: bash -l {0}
      run: |
        CHANGED_FILES=`git diff --name-only $COMMIT_RANGE | grep .py$ | grep -v contrib/`
        CHANGED_FILES=`git diff --name-only $COMMIT_RANGE | grep .py$ | grep -v contrib/ || true`
        if [ -n "$CHANGED_FILES" ]; then
          yapf -d $CHANGED_FILES
        fi
    - name: Flake8
      shell: bash -l {0}
      run: source scripts/flake8_for_ci.sh
@@ -143,8 +145,8 @@ jobs:
      with:
        file: ./coverage.xml

  deploy:
    if: ${{ github.ref == 'master' }}
  pypi-build:
    if: github.event_name == 'push' && github.ref == 'refs/heads/master'
    needs: [build]
    runs-on: ubuntu-latest
    steps:
@@ -164,3 +166,36 @@ jobs:
      run: |
        python setup.py sdist bdist_wheel
        twine upload dist/*

  docker-build:
    if: github.event_name == 'push' && github.ref == 'refs/heads/master'
    needs: [build, pypi-build]
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Set up Docker Buildx
      id: buildx
      uses: docker/setup-buildx-action@master
    - name: Cache Docker layers
      uses: actions/cache@v2
      with:
        path: /tmp/.buildx-cache
        key: ${{ runner.os }}-buildx-${{ github.sha }}
        restore-keys: ${{ runner.os }}-buildx-
    - name: Login to DockerHub
      uses: docker/login-action@v1 
      with:
        username: ${{ secrets.DOCKER_HUB_USERNAME }}
        password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
    - name: Build and push
      id: docker_build
      uses: docker/build-push-action@v2
      with:
        builder: ${{ steps.buildx.outputs.name }}
        context: ./docker/nightly
        push: true
        tags: deepchemio/deepchem:latest
        cache-from: type=local,src=/tmp/.buildx-cache
        cache-to: type=local,dest=/tmp/.buildx-cache
    - name: Image digest
      run: echo ${{ steps.docker_build.outputs.digest }}
+25 −3
Original line number Diff line number Diff line
name: Release PyPI packages
name: Release
on:
  push:
    tags:
      - '*' # ci work when pushing a tag
jobs:
  release:
  pypi:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        python-version: [3.7]
    steps:
@@ -41,3 +40,26 @@ jobs:
      run: |
        python setup.py sdist bdist_wheel --release
        twine upload dist/*

  docker:
    needs: [pypi]
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Get the tag version
      id: get_tag_version
      run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
    - name: Login to DockerHub
      uses: docker/login-action@v1 
      with:
        username: ${{ secrets.DOCKER_HUB_USERNAME }}
        password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
    - name: Build and push
      id: docker_build
      uses: docker/build-push-action@v2
      with:
        context: ./docker/tag
        push: true
        tags: deepchemio/deepchem:${{ steps.get_tag_version.outputs.VERSION }}
    - name: Image digest
      run: echo ${{ steps.docker_build.outputs.digest }}
+32 −29
Original line number Diff line number Diff line
# DeepChem

[![Build Status](https://travis-ci.org/deepchem/deepchem.svg?branch=master)](https://travis-ci.org/deepchem/deepchem)
[![Coverage Status](https://coveralls.io/repos/github/deepchem/deepchem/badge.svg?branch=master)](https://coveralls.io/github/deepchem/deepchem?branch=master)
[![Documentation Status](https://readthedocs.org/projects/deepchem/badge/?version=latest)](https://deepchem.readthedocs.io/en/latest/?badge=latest)
[![Anaconda-Server Badge](https://anaconda.org/conda-forge/deepchem/badges/version.svg)](https://anaconda.org/conda-forge/deepchem)
[![PyPI version](https://badge.fury.io/py/deepchem.svg)](https://badge.fury.io/py/deepchem)
[![PyPI version](https://badge.fury.io/py/deepchem.svg)](https://pypi.org/project/deepchem/)
[![Documentation Status](https://readthedocs.org/projects/deepchem/badge/?version=latest)](https://deepchem.readthedocs.io/en/latest/?badge=latest)  
[![Test for DeepChem Core](https://github.com/deepchem/deepchem/workflows/Test%20for%20DeepChem%20Core/badge.svg)](https://github.com/deepchem/deepchem/actions?query=workflow%3A%22Test+for+DeepChem+Core%22)
[![Test for documents](https://github.com/deepchem/deepchem/workflows/Test%20for%20documents/badge.svg)](https://github.com/deepchem/deepchem/actions?query=workflow%3A%22Test+for+documents%22)
[![Test for build scripts](https://github.com/deepchem/deepchem/workflows/Test%20for%20build%20scripts/badge.svg)](https://github.com/deepchem/deepchem/actions?query=workflow%3A%22Test+for+build+scripts%22)
[![codecov](https://codecov.io/gh/deepchem/deepchem/branch/master/graph/badge.svg?token=5rOZB2BY3h)](https://codecov.io/gh/deepchem/deepchem)  

[Website](https://deepchem.io/) | [Documentation](https://deepchem.readthedocs.io/en/latest/) | [Colab Tutorial](https://github.com/deepchem/deepchem/tree/master/examples/tutorials) | [Discussion Forum](https://forum.deepchem.io/) | [Gitter](https://gitter.im/deepchem/Lobby)

@@ -36,49 +38,50 @@ DeepChem currently supports Python 3.6 through 3.7 and requires these packages o
- [scikit-learn](https://scikit-learn.org/stable/)
- [SciPy](https://www.scipy.org/)
- [TensorFlow](https://www.tensorflow.org/)
  - `deepchem>=2.4.0` requires tensorflow v2
  - `deepchem<2.4.0` requires tensorflow v1
  - `deepchem>=2.4.0` depends on TensorFlow v2
  - `deepchem<2.4.0` depends on TensorFlow v1

### Soft Requirements

DeepChem has a number of "soft" requirements.
If you face some errors like `ImportError: This class requires XXXX`, you may need to install some packages.

Please check [the document](https://deepchem.readthedocs.io/en/latest/requirements.html##soft-requirements) about soft requirements.
Please check [the document](https://deepchem.readthedocs.io/en/latest/requirements.html#soft-requirements) about soft requirements.

## Installation

### Stable version

**Caution!! : The latest stable version was published nearly a year ago. If you are a pip user or you face some errors, we recommend the nightly build version.**

RDKit is a soft requirement package, but many useful methods like molnet depend on it. We recommend installing RDKit with deepchem.
Please install tensorflow v2.3.* before installing deepchem.

```bash
pip install tensorflow==1.14
conda install -y -c conda-forge rdkit deepchem==2.3.0
pip install tensorflow==2.3.*
```

If you want GPU support:
Then, you install deepchem via pip or conda.  

```bash
pip install tensorflow-gpu==1.14
conda install -y -c conda-forge rdkit deepchem==2.3.0
pip install deepchem
```
or 
```
conda install -c conda-forge deepchem
```

### Nightly build version

You install the nightly build version via pip. The nightly version is built by the HEAD of DeepChem.
RDKit is a soft requirement package, but many useful methods like molnet depend on it.
We recommend installing RDKit with deepchem if you use conda.

```bash
pip install tensorflow==2.3.0
pip install --pre deepchem
conda install -y -c conda-forge rdkit
```

RDKit is a soft requirement package, but many useful methods like molnet depend on it. We recommend installing RDKit with deepchem if you use conda.
### Nightly build version

The nightly version is built by the HEAD of DeepChem.

```bash
conda install -y -c conda-forge rdkit
pip install tensorflow==2.3.*
pip install --pre deepchem
```

### Docker
@@ -87,18 +90,18 @@ If you want to install deepchem using a docker, you can pull two kinds of images
DockerHub : https://hub.docker.com/repository/docker/deepchemio/deepchem

- `deepchemio/deepchem:x.x.x`
  - Image built by using a conda package manager (x.x.x is a version of deepchem)
  - Image built by using a conda (x.x.x is a version of deepchem)
  - The x.x.x image is built when we push x.x.x. tag
  - Dockerfile is put in `docker/conda-forge` directory
  - Dockerfile is put in `docker/tag` directory
- `deepchemio/deepchem:latest`
  - Image built by the master branch of deepchem source codes
  - Image built from source codes
  - The latest image is built every time we commit to the master branch
  - Dockerfile is put in `docker/master` directory
  - Dockerfile is put in `docker/nightly` directory

You pull the image like this.

```bash
docker pull deepchemio/deepchem:2.3.0
docker pull deepchemio/deepchem:2.4.0
```

If you want to know docker usages with deepchem in more detail, please check [the document](https://deepchem.readthedocs.io/en/latest/installation.html#docker).
@@ -107,7 +110,7 @@ If you want to know docker usages with deepchem in more detail, please check [th

If you try install all soft dependencies at once or contribute to deepchem, we recommend you should install deepchem from source.

Please check [this introduction](https://deepchem.readthedocs.io/en/latest/installation.html#from-source).
Please check [this introduction](https://deepchem.readthedocs.io/en/latest/installation.html#from-source-with-conda).

## Getting Started

+1 −1
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@ Imports all submodules
"""

# If you push the tag, please remove `.dev`
__version__ = '2.4.0.dev'
__version__ = '2.5.0.dev'

import deepchem.data
import deepchem.feat
Loading