Skip to content

Commit

Permalink
Add jupyter environment
Browse files Browse the repository at this point in the history
  • Loading branch information
glatteis committed Jun 25, 2024
1 parent 6d20697 commit e5def64
Show file tree
Hide file tree
Showing 7 changed files with 2,070 additions and 44 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ dmypy.json
# Cython debug symbols
cython_debug/

.ruff_cache/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
Expand Down
58 changes: 58 additions & 0 deletions notebooks/die.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
"from stormvogel.visualization import make_slider"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "a9624661970442ee8294e1bb4b93bd80",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"interactive(children=(IntSlider(value=10, description='x', max=30, min=-10), Output()), _dom_classes=('widget-\u2026"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"make_slider()"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "stormvogel--EyWACIn-py3.12",
"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.12.4"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
2,032 changes: 1,989 additions & 43 deletions poetry.lock

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions poetry.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[virtualenvs]
in-project = true
9 changes: 9 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ readme = "README.md"

[tool.poetry.dependencies]
python = "^3.11"
ipywidgets = "^8.1.3"

[tool.poetry.group.test.dependencies]
pytest = "^8.2.2"
Expand All @@ -21,8 +22,16 @@ pre-commit = "^3.7.1"
ruff = "^0.4.6"
pyright = "^1.1.368"

[tool.poetry.group.dev.dependencies]
ipykernel = "^6.29.4"
jupyterlab = "^4.2.2"

[tool.ruff]
src = ["stormvogel", "examples"]
line-length = 88
target-version = "py311"
fix = true

[tool.pyright]
venvPath = "."
venv = ".venv"
4 changes: 4 additions & 0 deletions pyrightconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"venvPath": ".",
"venv": ".venv"
}
7 changes: 6 additions & 1 deletion stormvogel/visualization.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
"""Contains stuff for visualization"""

from model import Model
from stormvogel.model import Model
from ipywidgets import interact


def show(m: Model):
pass


def make_slider():
return interact(lambda x: x, x=10)

0 comments on commit e5def64

Please sign in to comment.