Skip to content

Commit

Permalink
Merge pull request #296 from volkamerlab/base-ci-env-fix
Browse files Browse the repository at this point in the history
Base branch for CI/env fixes
  • Loading branch information
dominiquesydow authored Dec 31, 2022
2 parents f4f4e8c + bbd7f9b commit 66a8283
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 26 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ on:
push:
branches:
- "master"
- "maintenance/.+"
pull_request:
branches:
- "master"
- "maintenance/.+"
- "base-ci-env-fix"
schedule:
# Run a cron job once weekly on Monday
- cron: "0 3 * * 1"
Expand Down Expand Up @@ -76,10 +75,18 @@ jobs:
shell: bash -l {0}
run: |
PYTEST_ARGS="--nbval-lax --current-env --dist loadscope --numprocesses 2"
# Ignore T019 under Windows, see https://github.com/volkamerlab/teachopencadd/issues/313
PYTEST_IGNORE_T019="--ignore=teachopencadd/talktorials/T019_md_simulation/talktorial.ipynb"
# Temporarily ignored notebooks, see https://github.com/volkamerlab/teachopencadd/issues/303
PYTEST_IGNORE_T008="--ignore=teachopencadd/talktorials/T008_query_pdb/talktorial.ipynb"
if [ "$RUNNER_OS" != "Windows" ]; then
pytest $PYTEST_ARGS teachopencadd/talktorials/T*/talktorial.ipynb
# Temporarily ignore T019
pytest $PYTEST_ARGS teachopencadd/talktorials/ $PYTEST_IGNORE_T008 $PYTEST_IGNORE_T019
else
pytest $PYTEST_ARGS teachopencadd/talktorials/ --ignore=teachopencadd/talktorials/T008_md_simulation/talktorial.ipynb --ignore=teachopencadd/talktorials/T019_md_simulation/talktorial.ipynb
pytest $PYTEST_ARGS teachopencadd/talktorials/ $PYTEST_IGNORE_T008 $PYTEST_IGNORE_T019
fi
format:
Expand Down
21 changes: 9 additions & 12 deletions devtools/test_env.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
name: teachopencadd
name: teachopencadd
channels:
- conda-forge
- defaults
dependencies:
- python>=3.8
- pip
- jupyter
- jupyterlab>=3
# Workaround for jupyterlab, see https://github.com/volkamerlab/teachopencadd/issues/310
- jsonschema>=4.3.0
- nglview>=3
# https://github.com/volkamerlab/teachopencadd/issues/262
# Workaround for nglview, see https://github.com/volkamerlab/teachopencadd/issues/262
- ipywidgets<8
# Explicitly add numpy because of https://github.com/volkamerlab/teachopencadd/issues/150
- numpy
# New numpy version 1.2.4 too young, e.g. caused
# https://github.com/volkamerlab/teachopencadd/issues/299
- numpy<1.24
- scikit-learn
# API changed after v2.6, see https://github.com/volkamerlab/teachopencadd/issues/265
- tensorflow<=2.6
- seaborn
- matplotlib-venn
# Remove jsonschema once this issue is fixed: https://github.com/Yelp/bravado/issues/478
- jsonschema<4.0.0
- bravado
- requests
- requests-cache
Expand All @@ -38,15 +38,14 @@ dependencies:
- mdtraj
- plip
- openmm
# depends on openff-toolkit->ambertools -> not available on Windows yet!
# Dependency not included, see https://github.com/volkamerlab/teachopencadd/issues/313
# - openmmforcefields
- pdbfixer
- tqdm
- lxml
- kissim
## CI tests
# Workaround for https://github.com/computationalmodelling/nbval/issues/153
- pytest 5.*
- pytest
- pytest-xdist
- pytest-cov
- nbval
Expand All @@ -62,8 +61,6 @@ dependencies:
- sphinx-copybutton
- sphinx-gallery
- autodocsumm
## temporary fix for rdkit on MacOS
- fontconfig==2.13.1
- pip:
- black-nb
- nbsphinx-link
Expand Down
9 changes: 9 additions & 0 deletions teachopencadd/talktorials/T008_query_pdb/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
<div class="alert alert-block alert-danger">

<b>TeachOpenCADD note</b>: This notebook uses the Ligand Expo website (http://ligand-expo.rcsb.org/), which will be offline in January 2023. During that time, T008 will not work in its entirety. Please check the following issue to track when this notebook will be available again: https://github.com/volkamerlab/teachopencadd/issues/303

<b>Ligand Expo website note</b>: "Ligand Expo will be down from January 1-31, 2023. Requests to this service will return a 410 http error code (“Gone”) and a message to contact RCSB PDB."

</div>


# T008 · Protein data acquisition: Protein Data Bank (PDB)

**Note:** This talktorial is a part of TeachOpenCADD, a platform that aims to teach domain-specific skills and to provide pipeline templates as starting points for research projects.
Expand Down
13 changes: 13 additions & 0 deletions teachopencadd/talktorials/T008_query_pdb/talktorial.ipynb
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<div class=\"alert alert-block alert-danger\">\n",
"\n",
"<b>TeachOpenCADD note</b>: This notebook uses the Ligand Expo website (http://ligand-expo.rcsb.org/), which will be offline in January 2023. During that time, T008 will not work in its entirety. Please check the following issue to track when this notebook will be available again: https://github.com/volkamerlab/teachopencadd/issues/303\n",
" \n",
"<b>Ligand Expo website note</b>: \"Ligand Expo will be down from January 1-31, 2023. Requests to this service will return a 410 http error code (“Gone”) and a message to contact RCSB PDB.\"\n",
"\n",
"</div>"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2348,8 +2348,7 @@
}
],
"source": [
"project1.BindingSiteDetection.dogsitescorer_binding_sites_df.head()\n",
"# NBVAL_CHECK_OUTPUT"
"project1.BindingSiteDetection.dogsitescorer_binding_sites_df.head()"
]
},
{
Expand Down
19 changes: 11 additions & 8 deletions teachopencadd/talktorials/T019_md_simulation/talktorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,11 @@
"source": [
"import sys\n",
"if not on_colab and sys.platform.startswith((\"linux\", \"darwin\")):\n",
" !conda install -q -y -c conda-forge openmmforcefields"
" !mamba install -q -y -c conda-forge openmmforcefields\n",
" # Notes:\n",
" # - If you do not have mamba installed, install it or use conda instead\n",
" # - Under MacOS with an M1 chip you may need to use\n",
" # CONDA_SUBDIR=osx-64 in front of the above command"
]
},
{
Expand Down Expand Up @@ -394,9 +398,9 @@
"from rdkit.Chem import AllChem\n",
"import mdtraj as md\n",
"import pdbfixer\n",
"import simtk.openmm as mm\n",
"import simtk.openmm.app as app\n",
"from simtk.openmm import unit\n",
"import openmm as mm\n",
"import openmm.app as app\n",
"from openmm import unit\n",
"from openff.toolkit.topology import Molecule, Topology\n",
"from openmmforcefields.generators import GAFFTemplateGenerator"
]
Expand Down Expand Up @@ -718,10 +722,9 @@
" mol_topology = off_mol_topology.to_openmm()\n",
" mol_positions = off_mol.conformers[0]\n",
"\n",
" # convert units from Ångström to Nanometers\n",
" for atom in mol_positions:\n",
" coords = atom / atom.unit\n",
" atom = (coords / 10.0) * unit.nanometers # since openmm works in nm\n",
" # convert units from Ångström to nanometers\n",
" # since OpenMM works in nm\n",
" mol_positions = mol_positions.to(\"nanometers\")\n",
"\n",
" # combine topology and positions in modeller object\n",
" omm_mol = app.Modeller(mol_topology, mol_positions)\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@
"import numpy as np\n",
"from rdkit import Chem\n",
"from rdkit.Chem import MACCSkeys, Draw\n",
"from rdkit.Chem.AllChem import GetMorganFingerprintAsBitVect\n",
"from sklearn.model_selection import train_test_split\n",
"import matplotlib.pyplot as plt\n",
"from sklearn import metrics\n",
Expand Down

0 comments on commit 66a8283

Please sign in to comment.