diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..4be00813bc121a9deecc87c8597f1bcd868b3610 --- /dev/null +++ b/.gitignore @@ -0,0 +1,120 @@ +# upstream github folder +# git clone https://github.com/jupyterlite/demo.git + +*.bundle.* +lib/ +node_modules/ +.yarn-packages/ +*.egg-info/ +.ipynb_checkpoints +*.tsbuildinfo + +# Created by https://www.gitignore.io/api/python +# Edit at https://www.gitignore.io/?templates=python + +### Python ### +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +# lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +pip-wheel-metadata/ +share/python-wheels/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +.hypothesis/ +.pytest_cache/ + +# Translations +*.mo +*.pot + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# pyenv +.python-version + +# celery beat schedule file +celerybeat-schedule + +# SageMath parsed files +*.sage.py + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# Mr Developer +.mr.developer.cfg +.project +.pydevproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# OS X stuff +*.DS_Store + +# End of https://www.gitignore.io/api/python + +# jupyterlite +*.doit.db +_output +public/ diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..8de803003d6d21467a3a070d4a745fb9da1225d3 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,14 @@ +image: "python:latest" +pages: + stage: deploy + before_script: + - python -m pip install -r JupyterLiteSetup/requirements.txt + + script: + - cd JupyterLiteSetup && jupyter lite build --contents content --output-dir public && mv public .. + + artifacts: + paths: + - public # mandatory, other folder won't work + only: + - main # the branch you want to publish diff --git a/JupyterLiteSetup/content/data/dog.jpg b/JupyterLiteSetup/content/data/dog.jpg new file mode 100644 index 0000000000000000000000000000000000000000..6b077a64bd783960521faa48dd10c697c6f82668 Binary files /dev/null and b/JupyterLiteSetup/content/data/dog.jpg differ diff --git a/JupyterLiteSetup/content/example.ipynb b/JupyterLiteSetup/content/example.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..231fe84cc7ef53962f305c3f50f33bf05944e0b0 --- /dev/null +++ b/JupyterLiteSetup/content/example.ipynb @@ -0,0 +1,96 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "trusted": true + }, + "outputs": [], + "source": [ + "import pyolite\n", + "pyolite.__version__" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "trusted": true + }, + "outputs": [], + "source": [ + "print(\"Hello World\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "trusted": true + }, + "outputs": [], + "source": [ + "import matplotlib.pyplot as plt\n", + "import numpy as np\n", + "\n", + "plt.style.use('_mpl-gallery-nogrid')\n", + "\n", + "# make data\n", + "X, Y = np.meshgrid(np.linspace(-3, 3, 16), np.linspace(-3, 3, 16))\n", + "Z = (1 - X/2 + X**5 + Y**3) * np.exp(-X**2 - Y**2)\n", + "\n", + "# plot\n", + "fig, ax = plt.subplots()\n", + "\n", + "ax.imshow(Z)\n", + "\n", + "plt.show()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "plt.imshow(plt.imread(\"data/dog.jpg\"))\n", + "plt.axis(\"off\")\n", + "plt.show()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3.9.11 ('napari-env')", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.11" + }, + "vscode": { + "interpreter": { + "hash": "bb7a7b842930851728e0a2dafc827a6069e16b7869feb3e5989a9987e40ae401" + } + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/JupyterLiteSetup/jupyter-lite.json b/JupyterLiteSetup/jupyter-lite.json new file mode 100644 index 0000000000000000000000000000000000000000..6cfcd771e2e306a0f662369214c5c0fc94075f6e --- /dev/null +++ b/JupyterLiteSetup/jupyter-lite.json @@ -0,0 +1,10 @@ +{ + "jupyter-lite-schema-version": 0, + "jupyter-config-data": { + "disabledExtensions": [ + "@jupyterlab/drawio-extension", + "jupyterlab-kernel-spy", + "jupyterlab-tour" + ] + } +} diff --git a/JupyterLiteSetup/requirements.txt b/JupyterLiteSetup/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..4ed7bcfb4890b56f3e18993035bf213fde4c9f46 --- /dev/null +++ b/JupyterLiteSetup/requirements.txt @@ -0,0 +1,18 @@ +numpy +scipy +ipycanvas>=0.9.1 +ipyevents>=2.0.1 +ipyleaflet +ipympl>=0.8.2 +ipywidgets>=7.7,<8 +jupyterlab~=3.4.3 +jupyterlab-drawio +jupyterlab-language-pack-fr-FR +jupyterlab-language-pack-zh-CN +jupyterlab-fasta>=3,<4 +jupyterlab-geojson>=3,<4 +jupyterlab-tour +jupyterlab_miami_nights +jupyterlite==0.1.0b13 +plotly>=5,<6 +theme-darcula diff --git a/LICENCE b/LICENCE new file mode 100644 index 0000000000000000000000000000000000000000..f22bd2cef8f0713a2c56141d220814c2695ac9e3 --- /dev/null +++ b/LICENCE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 Benjamin Abel , Jan-Hendrik Müller + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE.