-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
31 changed files
with
2,436 additions
and
1,642 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
name: CI | ||
on: | ||
push: | ||
branches: | ||
- "*" | ||
pull_request: | ||
branches: | ||
- master | ||
workflow_dispatch: | ||
|
||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
|
||
concurrency: | ||
group: "${{ github.ref }}-${{ github.head_ref }}" | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
tests: | ||
name: CI-${{ matrix.os }} | py${{ matrix.python-version }} | ${{ matrix.rdkit-version }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
python-version: [3.6, 3.8] | ||
rdkit-version: ["rdkit>2020.03.1"] | ||
include: | ||
- name: CI min version | ||
os: ubuntu-latest | ||
python-version: 3.6 | ||
rdkit-version: "rdkit==2020.03.1" | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Cache conda | ||
uses: actions/cache@v2 | ||
env: | ||
CACHE_NUMBER: 0 | ||
with: | ||
path: ~/conda_pkgs_dir | ||
key: | ||
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ | ||
hashFiles('etc/example-environment.yml') }} | ||
|
||
- name: Setup Conda | ||
uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
mamba-version: "*" | ||
channels: conda-forge,defaults | ||
use-only-tar-bz2: true | ||
|
||
- name: Check conda and pip | ||
run: | | ||
which python | ||
python --version | ||
pip --version | ||
conda --version | ||
mamba --version | ||
- name: Install conda dependencies | ||
run: | | ||
mamba install ${{ matrix.rdkit-version }} | ||
mamba list | ||
- name: Install package through pip | ||
run: | | ||
pip install .[tests] | ||
pip list | ||
- name: Run tests | ||
run: | | ||
pytest --color=yes --disable-pytest-warnings --cov=mols2grid --cov-report=xml tests/ | ||
- name: Measure tests coverage | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
file: coverage.xml | ||
fail_ci_if_error: True | ||
verbose: True | ||
|
||
- name: Prepare for build | ||
run: | | ||
pip uninstall -y mols2grid | ||
python setup.py sdist bdist_wheel | ||
echo "$SCRIPT" > test_install.py | ||
cat test_install.py | ||
env: | ||
SCRIPT: | | ||
import mols2grid as mg | ||
from rdkit import RDConfig | ||
sdf = f"{RDConfig.RDDocsDir}/Book/data/solubility.test.sdf" | ||
mg.save(sdf, output="/dev/null", subset=["img", "mols2grid-id"]) | ||
- name: Test tar.gz build | ||
run: | | ||
pip install dist/mols2grid-*.tar.gz | ||
python test_install.py | ||
pip uninstall -y mols2grid | ||
- name: Test wheel build | ||
run: | | ||
pip install dist/mols2grid-*.whl | ||
python test_install.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
include README.md LICENSE CHANGELOG.md | ||
recursive-include mols2grid/templates * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.