Skip to content

Commit e1de324

Browse files
glass-wmikemhenry
andauthored
Remove Travis and move to GitHub Actions (#31)
* remove travisCI references * format with Black * trying initial GHA * update ci.yml * use Black default line length in GHA * revert to Black -l 99 * update gitignore * fix Black formatting using v21.9b0 * update pylint threshold and test variable names * fix pylint and add some type hints * add more type hinting * update docs * update env * Update README.md * Update README.md Co-authored-by: Mike Henry <[email protected]>
1 parent 7ca27ba commit e1de324

17 files changed

+870
-595
lines changed

.github/workflows/ci.yml

+125
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- "master"
7+
- "dev"
8+
pull_request:
9+
branches:
10+
- "master"
11+
- "dev"
12+
schedule:
13+
# Run a cron job once daily
14+
- cron: "0 0 * * *"
15+
16+
jobs:
17+
test:
18+
name: ${{ matrix.name }}
19+
runs-on: ${{ matrix.os }}
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
include:
24+
- name: Linux, Python 3.7
25+
os: ubuntu-latest
26+
python-version: "3.7"
27+
conda-installer: https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh
28+
29+
- name: Linux, Python 3.9
30+
os: ubuntu-latest
31+
python-version: "3.9"
32+
conda-installer: https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh
33+
34+
- name: MacOS, Python 3.7
35+
os: macOS-latest
36+
python-version: "3.7"
37+
conda-installer: https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-MacOSX-x86_64.sh
38+
39+
steps:
40+
- uses: actions/checkout@v2
41+
42+
- uses: conda-incubator/setup-miniconda@v2
43+
with:
44+
installer-url: ${{ matrix.conda-installer }}
45+
python-version: ${{ matrix.python-version }}
46+
activate-environment: test
47+
channel-priority: true
48+
environment-file: devtools/conda-envs/env.yaml
49+
auto-activate-base: false
50+
use-mamba: true
51+
52+
- name: Additional info about the build
53+
shell: bash
54+
run: |
55+
uname -a
56+
df -h
57+
ulimit -a
58+
- name: Environment Information
59+
shell: bash -l {0}
60+
run: |
61+
conda info --all
62+
conda list
63+
mamba --version
64+
- name: Install package
65+
shell: bash -l {0}
66+
run: |
67+
python -m pip install --no-deps .
68+
- name: Run tests
69+
shell: bash -l {0}
70+
run: |
71+
pytest -v --cov=openff/arsenic --cov-report=xml --color=yes openff/arsenic/tests/
72+
- name: CodeCov
73+
uses: codecov/codecov-action@v1
74+
if: always()
75+
with:
76+
token: ${{ secrets.CODECOV_TOKEN }}
77+
file: ./coverage.xml
78+
flags: unittests
79+
yml: ./.codecov.yml
80+
81+
lint-format:
82+
name: Lint & format checks
83+
runs-on: ubuntu-18.04
84+
85+
steps:
86+
- uses: actions/checkout@v2
87+
88+
- uses: conda-incubator/setup-miniconda@v2
89+
with:
90+
installer-url: https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh
91+
python-version: "3.7"
92+
activate-environment: test
93+
channel-priority: true
94+
environment-file: devtools/conda-envs/env.yaml
95+
auto-activate-base: false
96+
use-mamba: true
97+
98+
- name: Additional info about the build
99+
shell: bash
100+
run: |
101+
uname -a
102+
df -h
103+
ulimit -a
104+
- name: Environment Information
105+
shell: bash -l {0}
106+
run: |
107+
conda info --all
108+
conda list
109+
- name: Install linter / formatter
110+
shell: bash -l {0}
111+
run: |
112+
mamba install pylint black
113+
- name: Install package
114+
shell: bash -l {0}
115+
run: |
116+
python -m pip install --no-deps .
117+
- name: Run pylint
118+
shell: bash -l {0}
119+
run: |
120+
pylint openff/arsenic/ --fail-under 6
121+
- name: Run black check
122+
shell: bash -l {0}
123+
if: always()
124+
run: |
125+
black --check -l 99 openff/arsenic/ --exclude openff/arsenic/_version.py

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -100,3 +100,7 @@ ENV/
100100

101101
# mypy
102102
.mypy_cache/
103+
104+
# VSCode
105+
.vscode
106+

.travis.yml

-57
This file was deleted.

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ openff-arsenic
22
==============================
33
[//]: # (Badges)
44

5-
[![Travis Build Status](https://travis-ci.com/openforcefield/openff-arsenic.svg?branch=master)](https://travis-ci.com/openforcefield/openff-arsenic)
5+
66
[![codecov](https://codecov.io/gh/openforcefield/openff-arsenic/branch/master/graph/badge.svg)](https://codecov.io/gh/openforcefield/openff-arsenic/branch/master)
77
[![Documentation Status](https://readthedocs.org/projects/openff-arsenic/badge/?version=latest)](https://openff-arsenic.readthedocs.io/en/latest/?badge=latest)
88

devtools/README.md

-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ conda installation, and other development tools not directly related to the codi
1111
You should test your code, but do not feel compelled to use these specific programs. You also may not need Unix and
1212
Windows testing if you only plan to deploy on specific platforms. These are just to help you get started
1313

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

1816
### Conda Environment:
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
1-
name: test
1+
name: arsenic
22
channels:
3+
- conda-forge
34
dependencies:
4-
# Base depends
5+
# Base depends
56
- python
67
- pip
7-
8-
# Testing
9-
- pytest
10-
- pytest-cov
11-
- codecov
8+
- black
129
- networkx
1310
- numpy
1411
- matplotlib
1512
- seaborn
1613
- plotly
1714
- scikit-learn
15+
- sphinx
16+
- sphinx_rtd_theme
1817

19-
# Pip-only installs
20-
#- pip:
21-
# - codecov
18+
# format
19+
- black
2220

21+
# testing
22+
- pytest
23+
- pytest-cov
24+
- codecov

devtools/travis-ci/before_install.sh

-41
This file was deleted.

docs/api.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ API Documentation
44
.. autosummary::
55
:toctree: autosummary
66

7-
arsenic.plotting
8-
arsenic.plotlying
9-
arsenic.stats
10-
arsenic.wrangle
7+
openff.arsenic.plotting
8+
openff.arsenic.plotlying
9+
openff.arsenic.stats
10+
openff.arsenic.wrangle

0 commit comments

Comments
 (0)