Skip to content

Commit

Permalink
Merge pull request #102 from MobleyLab/gha
Browse files Browse the repository at this point in the history
Migrate from Travis CI to GitHub Actions
  • Loading branch information
davidlmobley authored May 31, 2022
2 parents cc82c7d + e652165 commit f4e945b
Show file tree
Hide file tree
Showing 13 changed files with 91 additions and 358 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: CI

on:
push:
branches:
- "main"
- "master"
pull_request:
branches:
- "main"
- "master"

defaults:
run:
shell: bash -l {0}

jobs:
test:
name: ${{ matrix.os }}, 🐍=${{ matrix.python-version }}, OpenEye=${{ matrix.openeye }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macOS-latest, ubuntu-latest]
openeye: ["false"]
python-version: ["3.8", "3.9", "3.10"]

steps:
- uses: actions/checkout@v2

- uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
activate-environment: test
mamba-version: "*"
channels: conda-forge,defaults
channel-priority: true
environment-file: devtools/conda-envs/test_env_rdk.yaml
auto-activate-base: false

- name: Additional info about the build
shell: bash
run: |
uname -a
df -h
ulimit -a
- name: Environment Information
run: |
conda info
conda list
- name: Install package
run: |
python setup.py develop --no-deps
- name: Run tests
run: |
py.test -vv -s --nbval-lax --cov=chemper/ --cov-report=xml chemper/tests/
- name: Codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
fail_ci_if_error: false
93 changes: 0 additions & 93 deletions .travis.yml

This file was deleted.

52 changes: 23 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# <img src="https://github.com/mobleylab/chemper/blob/master/chemper_logo.svg" height=150>

[![Travis build](https://img.shields.io/travis/MobleyLab/chemper/master.svg?logo=linux&logoColor=white)](https://travis-ci.org/MobleyLab/chemper)
[![Travis build](https://img.shields.io/travis/MobleyLab/chemper/master.svg?logo=apple&logoColor=white)](https://travis-ci.org/MobleyLab/chemper)
[![AppVeyor build](https://img.shields.io/travis/MobleyLab/chemper/master.svg?logo=windows&logoColor=white)](https://ci.appveyor.com/project/bannanc/chemper)

[![Documentation Status](https://readthedocs.org/projects/chemper/badge/?version=latest)](http://chemper.readthedocs.io/en/latest/?badge=latest)
[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/MobleyLab/chemper.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/MobleyLab/chemper/context:python)
[![codecov](https://codecov.io/gh/MobleyLab/chemper/branch/master/graph/badge.svg)](https://codecov.io/gh/MobleyLab/chemper)
Expand All @@ -25,45 +21,41 @@ practical use in force field parameterization [2].

For a more extensive history and explanation, see our [preprint](http://doi.org/10.26434/chemrxiv.8304578.v1) [3].

## Prerequisites

We test with Python 3.6 and 3.7 and expect any version above 3.5 to behave well.
## Installation

This is a python tool kit with a few dependencies. We recommend installing
[miniconda](http://conda.pydata.org/miniconda.html). Then you can create an
environment with the following commands:
Chemper is available via `conda-forge`:

```bash
conda create -n [my env name] python=3.6 numpy networkx pytest
source activate [my env name]
```shell
conda install -c conda-forge chemper
```

This command will install all dependencies besides a toolkit for cheminformatics or storing of molecule
information. We seek to keep this tool independent of cheminformatics toolkit, but currently only support
[RDKit](http://www.rdkit.org/docs/index.html) and [OpenEye Toolkits](https://www.eyesopen.com/).
If you wish to add support please feel free to submit a pull request.
Make sure one of these tool kits is installed in your environment before installing chemper.
information. Also install [RDKit](http://www.rdkit.org/docs/Install.html) and/or
[OpenEye toolkits](https://docs.eyesopen.com/toolkits/python/quickstart-python/linuxosx.html) by
running:

#### RDKit environment

Conda installation according to [RDKit documentation](http://www.rdkit.org/docs/Install.html):
```bash
conda install -c rdkit rdkit
conda install -c conda-forge rdkit
```

#### OpenEye environment
Conda installation according to [OpenEye documentation](https://docs.eyesopen.com/toolkits/python/quickstart-python/linuxosx.html)
and/or

```bash
conda install -c openeye openeye-toolkits
```

## Installation

Hopefully chemper will be conda installable in the near future, but for now the best option
is to download or clone this repository and then install `chemper` from inside the `chemper` directory with:
```bash
pip install -e .
```
## Supported Python versions

We test with whatever Python versions are found in `.github/workflows/ci.yaml`. Chemper may function
on some older and/or newer versions as well.

## Supported chemiformatics toolkits

We seek to keep this tool independent of cheminformatics toolkit, but currently only support
[RDKit](http://www.rdkit.org/docs/index.html) and [OpenEye Toolkits](https://www.eyesopen.com/).
If you wish to add support please feel free to submit a pull request.
Make sure one of these toolkits is installed in your environment before installing chemper.

# Documentation

Expand Down Expand Up @@ -155,6 +147,8 @@ for automated chemical perception. However, the API is still in flux and nothing
This release matches the work published in our [preprint](http://doi.org/10.26434/chemrxiv.8304578.v1).
While the code is stable and there are tests showing how it should work the science it represents is still in the early stages and big changes to the algorithms and API should be expected in future releases.

### Version 1.0.1
This release includes non-behavior-breaking changes to support distribution on Python 3.10.

## Contributors

Expand Down
46 changes: 0 additions & 46 deletions appveyor.yml

This file was deleted.

4 changes: 2 additions & 2 deletions chemper/chemper_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"""

import os
import collections
from collections.abc import MutableMapping

def get_data_path(relative_path, package='chemper'):
"""
Expand Down Expand Up @@ -120,7 +120,7 @@ def is_valid_smirks(smirks):
"""


class TransformedDict(collections.MutableMapping):
class TransformedDict(MutableMapping):
"""A dictionary that applies an arbitrary key-altering
function before accessing the keys"""

Expand Down
15 changes: 0 additions & 15 deletions devtools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,13 @@ conda installation, and other development tools not directly related to the codi

## Manifest

### Continuous Integration

You should test your code, but do not feel compelled to use these specific programs. You also may not need Unix and
Windows testing if you only plan to deploy on specific platforms. These are just to help you get started

* `travis-ci`: Linux and OSX based testing through [Travis-CI](https://about.travis-ci.com/)
* `before_install.sh`: Pip/Miniconda pre-package installation script for Travis
* `appveyor`: Windows based testing through [AppVeyor](https://www.appveyor.com/) (there are no files directly related to this)

### Conda Environment:

This directory contains the files to setup the Conda environment for testing purposes

* `conda-envs`: directory containing the YAML file(s) which fully describe Conda Environments, their dependencies, and those dependency provenance's
* `test_env.yaml`: Simple test environment file with base dependencies. Channels are not specified here and therefore respect global Conda configuration

### Additional Scripts:

This directory contains OS agnostic helper scripts which don't fall in any of the previous categories
* `scripts`
* `create_conda_env.py`: Helper program for spinning up new conda environments based on a starter file with Python Version and Env. Name command-line options


## How to contribute changes
- Clone the repository if you have write access to the main repo, fork the repository if you are a collaborator.
Expand Down
1 change: 1 addition & 0 deletions devtools/conda-envs/test_env_rdk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ dependencies:

- rdkit
- numpy
- networkx

# Testing
- pytest
Expand Down
3 changes: 0 additions & 3 deletions devtools/conda-recipe/bld.bat

This file was deleted.

5 changes: 0 additions & 5 deletions devtools/conda-recipe/build.sh

This file was deleted.

29 changes: 0 additions & 29 deletions devtools/conda-recipe/meta.yaml

This file was deleted.

Loading

0 comments on commit f4e945b

Please sign in to comment.