diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5904cec..6dd35ce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,6 +26,12 @@ jobs: - name: Checkout repository uses: actions/checkout@v2.3.4 + # Install dependencies + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y libglpk-dev build-essential + # Build Docker image - id: get-timestamp name: Get timestamp @@ -37,14 +43,14 @@ jobs: uses: whoan/docker-build-with-cache-action@v5 with: dockerfile: Dockerfile - build_extra_args: "--compress=true --label org.opencontainers.image.revision=${{github.sha}} --label org.opencontainers.image.created=${{steps.get-timestamp.outputs.timestamp}}" + build_extra_args: '--compress=true --label org.opencontainers.image.revision=${{github.sha}} --label org.opencontainers.image.created=${{steps.get-timestamp.outputs.timestamp}}' registry: ghcr.io stages_image_name: biosimulators/tutorials-stages image_name: biosimulators/tutorials-stages image_tag: ${{github.sha}} push_image_and_stages: true username: ${{ secrets.DOCKER_REGISTRY_USERNAME }} - password: "${{ secrets.DOCKER_REGISTRY_TOKEN }}" + password: '${{ secrets.DOCKER_REGISTRY_TOKEN }}' - name: Label Docker image run: | diff --git a/Dockerfile b/Dockerfile index a78f379..20318c3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,6 +10,8 @@ LABEL \ org.opencontainers.image.vendor="BioSimulators Team" COPY requirements.txt /tmp/requirements.txt +RUN pip install --upgrade pip +RUN pip install --upgrade setuptools wheel RUN pip install -r /tmp/requirements.txt \ && rm /tmp/requirements.txt \ && pip uninstall -y ipyparallel diff --git a/README.md b/README.md index 0913abe..c7e457a 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1aI7Z6ZBcQzOc9PJllW9N9oeTcFtXfhTd#offline=true&sandboxMode=true) + [![Binder](https://mybinder.org/badge_logo.svg)](https://tutorial.biosimulators.org/) [![All Contributors](https://img.shields.io/github/all-contributors/biosimulators/Biosimulators_tutorials/HEAD)](#contributors-) @@ -5,27 +7,36 @@ # BioSimulators tutorials -This repository contains Jupyter notebooks with tutorials for the Python APIs for the simulation tools registered with BioSimulators and a Jupyter notebook server for running the notebooks. +This repository contains Jupyter notebooks with tutorials for the Python APIs for the simulation tools registered with BioSimulators and a Jupyter notebook server for running the notebooks. NEW: As an alternative to the Jupyter Notebooks and relative Jupyter Notebook server, we have added a [Google Colab Notebook](https://colab.research.google.com/drive/1aI7Z6ZBcQzOc9PJllW9N9oeTcFtXfhTd#offline=true&sandboxMode=true) for users that are more comfortable with a shareable, annotatable "sandbox environment". Complete with the required dependencies, input data, and explicitly-defined methods that are essential to interacting with `Biosimulators`, this Google Colab notebook serves as "click and play" experience. The tutorials are located in the [`tutorials`](tutorials) subdirectory. The [README](tutorials/README.md) in this directory summarizes the content of the tutorials. ## Getting started +### Running the tutorials online with Google Colab (web-based, minimal setup) + +Simply open [the Colab notebook](https://colab.research.google.com/drive/1aI7Z6ZBcQzOc9PJllW9N9oeTcFtXfhTd#offline=true&sandboxMode=true) in your browser or click on the above Colab badge. + ### Running the tutorials online with Binder -The easiest way to run the tutorials is with Binder. Simply open https://tutorial.biosimulators.org/ in your browser. + +Simply open https://tutorial.biosimulators.org/ in your browser or click on the above Binder Badge. ### Running the tutorials on your own machine + Run the following command to download the tutorials: + ``` docker pull ghcr.io/biosimulators/tutorials ``` Run the following command to launch a Jupyter notebook server at http://localhost:8888 for the tutorials in this repository: + ``` docker run -it --rm -p 8888:8888 ghcr.io/biosimulators/tutorials jupyter notebook --ip=0.0.0.0 --port=8888 ``` Alternatively, run the following command to launch a Jupyter lab server at http://localhost:8888 for the tutorials in this repository: + ``` docker run -it --rm -p 8888:8888 ghcr.io/biosimulators/tutorials jupyter lab --ip=0.0.0.0 --port=8888 ``` diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..036b339 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,10 @@ +[build-system] +requires = ["setuptools", "wheel", "cython"] +build-backend = "setuptools.build_meta" + +[tool.cythondialect] +include_dirs = ["include"] + +[tool.glpk] +include_dirs = ["include"] +library_dirs = ["lib"] diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 0000000..1dec140 --- /dev/null +++ b/pytest.ini @@ -0,0 +1,3 @@ +[pytest] +filterwarnings = + ignore::ImportWarning:evalidate diff --git a/requirements.tests.txt b/requirements.tests.txt index df29282..c846e0d 100644 --- a/requirements.tests.txt +++ b/requirements.tests.txt @@ -1,3 +1,4 @@ pytest nbmake +nbconvert pytest-forked diff --git a/requirements.txt b/requirements.txt index 36dde0c..9c439d1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,7 +9,7 @@ biosimulators-cbmpy biosimulators-copasi biosimulators-cobrapy biosimulators-tellurium -biosimulators-utils[sbml,logging,containers]>=0.1.152 +biosimulators-utils[sbml,logging,containers]>=0.1.175 ipython kisao numpy