diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b60fa0a2..67ee278e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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" @@ -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: diff --git a/devtools/test_env.yml b/devtools/test_env.yml index 7d43b2dc..0c498b89 100644 --- a/devtools/test_env.yml +++ b/devtools/test_env.yml @@ -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 @@ -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 @@ -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 diff --git a/teachopencadd/talktorials/T008_query_pdb/README.md b/teachopencadd/talktorials/T008_query_pdb/README.md index df143026..b141bc4a 100644 --- a/teachopencadd/talktorials/T008_query_pdb/README.md +++ b/teachopencadd/talktorials/T008_query_pdb/README.md @@ -1,3 +1,12 @@ +
+ +TeachOpenCADD note: 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 + +Ligand Expo website note: "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." + +
+ + # 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. diff --git a/teachopencadd/talktorials/T008_query_pdb/talktorial.ipynb b/teachopencadd/talktorials/T008_query_pdb/talktorial.ipynb index 57ecfd2c..ed28b1f8 100644 --- a/teachopencadd/talktorials/T008_query_pdb/talktorial.ipynb +++ b/teachopencadd/talktorials/T008_query_pdb/talktorial.ipynb @@ -1,5 +1,18 @@ { "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "
\n", + "\n", + "TeachOpenCADD note: 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", + "Ligand Expo website note: \"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", + "
" + ] + }, { "cell_type": "markdown", "metadata": {}, diff --git a/teachopencadd/talktorials/T018_automated_cadd_pipeline/talktorial.ipynb b/teachopencadd/talktorials/T018_automated_cadd_pipeline/talktorial.ipynb index 40e5b684..cdd8b0f0 100644 --- a/teachopencadd/talktorials/T018_automated_cadd_pipeline/talktorial.ipynb +++ b/teachopencadd/talktorials/T018_automated_cadd_pipeline/talktorial.ipynb @@ -2348,8 +2348,7 @@ } ], "source": [ - "project1.BindingSiteDetection.dogsitescorer_binding_sites_df.head()\n", - "# NBVAL_CHECK_OUTPUT" + "project1.BindingSiteDetection.dogsitescorer_binding_sites_df.head()" ] }, { diff --git a/teachopencadd/talktorials/T019_md_simulation/talktorial.ipynb b/teachopencadd/talktorials/T019_md_simulation/talktorial.ipynb index 55a5fe66..aa7be162 100644 --- a/teachopencadd/talktorials/T019_md_simulation/talktorial.ipynb +++ b/teachopencadd/talktorials/T019_md_simulation/talktorial.ipynb @@ -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" ] }, { @@ -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" ] @@ -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", diff --git a/teachopencadd/talktorials/T022_ligand_based_screening_neural_network/talktorial.ipynb b/teachopencadd/talktorials/T022_ligand_based_screening_neural_network/talktorial.ipynb index a01d639e..cccbdff3 100644 --- a/teachopencadd/talktorials/T022_ligand_based_screening_neural_network/talktorial.ipynb +++ b/teachopencadd/talktorials/T022_ligand_based_screening_neural_network/talktorial.ipynb @@ -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",