Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Base branch for CI/env fixes #296

Merged
merged 48 commits into from
Dec 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
b562bce
CI: Exclude T021 from Windows tests
dominiquesydow Dec 27, 2022
494dcbd
CI: Remove explicit numpy install (#150 resolved)
dominiquesydow Dec 27, 2022
e29f69e
CI: Unpin tensorflow+install last; reverts #265
dominiquesydow Dec 27, 2022
4edc07b
Create new base branch for CI/env fixes
dominiquesydow Dec 27, 2022
c160da3
CI: Add base-ci-env-fix to CI (tmp)
dominiquesydow Dec 27, 2022
ce201da
Create new branch [skip ci]
dominiquesydow Dec 27, 2022
a1b5a88
Env: Remove jsonschema
dominiquesydow Dec 27, 2022
e05e78c
CI: Test only T011/12/14 (tmp)
dominiquesydow Dec 27, 2022
421f9b0
CI: Test all notebooks (no T019 under Windows)
dominiquesydow Dec 27, 2022
7794cd3
Rm tensorflow from env+T021/22 from CI
dominiquesydow Dec 27, 2022
dc65b41
CI: Add base-ci-env-fix branch
dominiquesydow Dec 27, 2022
8b80929
CI: Rm T021/22 from CI
dominiquesydow Dec 27, 2022
2ed424c
Env: Add numpy<1.24 and tensorflow
dominiquesydow Dec 27, 2022
fdfec11
CI: Fix pytest ignores
dominiquesydow Dec 27, 2022
cb51575
Merge pull request #294 from volkamerlab/t008-fix-numpy-error
dominiquesydow Dec 27, 2022
97ea795
Merge branch 'base-ci-env-fix' into unpin-jsonschema
dominiquesydow Dec 27, 2022
e989d36
CI: Remove base-ci-env-fix from on.push.branches [skip ci]
dominiquesydow Dec 27, 2022
075132c
Merge pull request #297 from volkamerlab/unpin-jsonschema
dominiquesydow Dec 27, 2022
9e2024f
T018: Remove nbval check
dominiquesydow Dec 28, 2022
1bf68a4
Merge pull request #304 from volkamerlab/t018-dog-urls
dominiquesydow Dec 28, 2022
d6cafc9
T008: Add Ligand Expo website downtime note
dominiquesydow Dec 28, 2022
9961786
CI: Remove T008 from CI in Jan 2023
dominiquesydow Dec 28, 2022
ccbc012
CI: Fix ignore flags [skip ci]
dominiquesydow Dec 28, 2022
87f4a45
Merge pull request #305 from volkamerlab/t008-rm-from-ci-in-jan
dominiquesydow Dec 28, 2022
d744994
T019: Add MacOS/M1 chip conda comment
dominiquesydow Dec 28, 2022
3e8905c
T019: Update import: simtk.openmm > openmm
dominiquesydow Dec 28, 2022
d1c13a5
T019: Change atom.unit > atom.units
dominiquesydow Dec 28, 2022
928029e
CI: Temporarily test only T019
dominiquesydow Dec 28, 2022
846233f
T019: Use mamba (not conda) for openmmforcefield install
dominiquesydow Dec 28, 2022
e834c9e
T019: Fix Angström to nm conversion
dominiquesydow Dec 28, 2022
cec5d3b
Merge pull request #306 from volkamerlab/t019-openmm-unit
dominiquesydow Dec 28, 2022
96ec2a2
T021: Add GetMorganFingerprintAsBitVect import
dominiquesydow Dec 30, 2022
8fa605e
CI: Test only T021 and T022 (tmp)
dominiquesydow Dec 30, 2022
3a16016
CI: Add back all notebooks [skip ci]
dominiquesydow Dec 30, 2022
8a0ef18
Merge pull request #309 from volkamerlab/t021-t022-fixes
dominiquesydow Dec 30, 2022
236e70e
CI: Fix bug in syntax
dominiquesydow Dec 30, 2022
4cf2ae0
CI: Fix pytest ignores
dominiquesydow Dec 30, 2022
ec01e61
CI: Add comment for numpy version pin
dominiquesydow Dec 30, 2022
6018351
CI: Add comment for openmmforcefield install in T019
dominiquesydow Dec 30, 2022
0ef6da5
CI: Add outdated comments
dominiquesydow Dec 30, 2022
eb210f5
CI: Test reverting back to tensorflow pin <=2.6
dominiquesydow Dec 30, 2022
6d8e501
CI: Unpin fontconfig
dominiquesydow Dec 30, 2022
5c355bb
CI: Update comments (minor)
dominiquesydow Dec 31, 2022
4f476c2
CI: Remove explicit jupyter install; implicitly covered by jupyterlab
dominiquesydow Dec 31, 2022
eccb30a
CI: Pin jsonschema>=4.3.0 to fix JLab's ModuleNotFoundError
dominiquesydow Dec 31, 2022
483c699
Env: Unpin pytest (workaround not needed any more? works locally)
dominiquesydow Dec 31, 2022
43db85f
CI: Temporarily ignore T019 until fixed in #308
dominiquesydow Dec 31, 2022
bbd7f9b
Env/CI: Update T019 comments [skip ci]
dominiquesydow Dec 31, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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