Skip to content

Commit

Permalink
add pandas req to notebook test
Browse files Browse the repository at this point in the history
  • Loading branch information
GemmaTuron committed Dec 19, 2023
1 parent 98f5b4b commit 911528b
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 32 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/test-colab.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,15 @@ jobs:
source activate
conda init
conda install google-colab -c conda-forge
pip install pandas
jupyter --version
- name: Test Google Colab Notebook with CLI shell commands
run: jupyter nbconvert --to notebook --execute notebooks/test-colab-notebook-cli.ipynb --output=output-cli.ipynb --ExecutePreprocessor.timeout=-1

- name: Test Google Colab Notebook with Python API commands
run: jupyter nbconvert --to notebook --execute notebooks/test-colab-notebook-python-api.ipynb --output=output-python-api.ipynb --ExecutePreprocessor.timeout=-1

- name: Upload Output of the Google Colab Notebook CLI
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # [email protected]
with:
Expand Down
63 changes: 32 additions & 31 deletions notebooks/test-colab-notebook-cli.ipynb
Original file line number Diff line number Diff line change
@@ -1,25 +1,10 @@
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"provenance": [],
"include_colab_link": true
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
},
"language_info": {
"name": "python"
}
},
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "view-in-github",
"colab_type": "text"
"colab_type": "text",
"id": "view-in-github"
},
"source": [
"<a href=\"https://colab.research.google.com/github/ersilia-os/ersilia/blob/master/notebooks/test-colab-notebook-cli.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
Expand Down Expand Up @@ -51,28 +36,44 @@
},
{
"cell_type": "code",
"source": [
"model_name = \"eos4e40\"\n",
"smi = \"CC(C)CC1=CC=C(C=C1)C(C)C(=O)O\""
],
"execution_count": 2,
"metadata": {
"id": "28yw34ZaV9rA"
},
"execution_count": 2,
"outputs": []
"outputs": [],
"source": [
"model_name = \"eos4e41\"\n",
"smi = \"CC(C)CC1=CC=C(C=C1)C(C)C(=O)O\""
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "MOROJyhcWBvV"
},
"outputs": [],
"source": [
"!ersilia fetch $model_name\n",
"!ersilia serve $model_name\n",
"!ersilia api -i \"$smi\" -o output-cli.csv"
],
"metadata": {
"id": "MOROJyhcWBvV"
},
"execution_count": null,
"outputs": []
]
}
]
}
],
"metadata": {
"colab": {
"include_colab_link": true,
"provenance": []
},
"kernelspec": {
"display_name": "Python 3",
"name": "python3"
},
"language_info": {
"name": "python",
"version": "3.10.13"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
2 changes: 1 addition & 1 deletion notebooks/test-colab-notebook-python-api.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
"source": [
"from ersilia import ErsiliaModel\n",
"\n",
"em = ErsiliaModel(\"chemprop-antibiotic\")"
"em = ErsiliaModel(\"chemprop-antibiotic-lite\")"
]
},
{
Expand Down

0 comments on commit 911528b

Please sign in to comment.