Skip to content

Commit

Permalink
Move to pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
GJBoth authored Feb 21, 2023
1 parent d1c5cf7 commit 54f6815
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 38 deletions.
6 changes: 4 additions & 2 deletions docs/examples/cgh.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@
"metadata": {},
"outputs": [],
"source": [
"# If in colab, install chromatix\n",
"# !pip install git+https://github.com/TuragaLab/chromatix"
"# If in colab, install Jax and chromatix. Don't forget to select a GPU!\n",
"!pip install --upgrade pip\n",
"!pip install \"jax[cuda11_cudnn82]==0.4.1\" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html\n",
"!pip install git+https://github.com/TuragaLab/chromatix.git\n"
]
},
{
Expand Down
12 changes: 7 additions & 5 deletions docs/examples/holoscope.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@
"metadata": {},
"outputs": [],
"source": [
"# If in colab, install chromatix\n",
"# !pip install git+https://github.com/TuragaLab/chromatix"
"# If in colab, install Jax and chromatix. Don't forget to select a GPU!\n",
"!pip install --upgrade pip\n",
"!pip install \"jax[cuda11_cudnn82]==0.4.1\" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html\n",
"!pip install git+https://github.com/TuragaLab/chromatix.git"
]
},
{
Expand Down Expand Up @@ -55,7 +57,7 @@
"from chromatix.utils import center_crop\n",
"\n",
"\n",
"from typing import Callable, Optional\n",
"from typing import Callable, Optional, Tuple\n",
"from chex import Array\n",
"\n",
"key = random.PRNGKey(42)\n",
Expand All @@ -79,7 +81,7 @@
"outputs": [],
"source": [
"# Parameters\n",
"camera_shape: tuple[int, int] = (256, 256)\n",
"camera_shape: Tuple[int, int] = (256, 256)\n",
"camera_pixel_pitch: float = 0.325\n",
"f: float = 100\n",
"NA: float = 0.8\n",
Expand Down Expand Up @@ -449,7 +451,7 @@
"outputs": [],
"source": [
"class Holoscope(nn.Module):\n",
" camera_shape: tuple[int, int] = (512, 512)\n",
" camera_shape: Tuple[int, int] = (512, 512)\n",
" camera_pixel_pitch: float = 0.325\n",
" f: float = 100\n",
" NA: float = 0.8\n",
Expand Down
49 changes: 18 additions & 31 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,36 +1,23 @@
[tool.poetry]
[build-system]
requires = ["setuptools", "setuptools-scm"]
build-backend = "setuptools.build_meta"

[project]
name = "chromatix"
version = "0.1.0"
description = ""
authors = ["Chromatix Team"]
license = "MIT"
authors = [
{name = "Gert-Jan Both", email = "[email protected]"},
{name = "Diptodip Deb", email = "[email protected]"}
]
description = "Differentiable lightfield simulation using Jax."
readme = "README.md"
requires-python = ">=3.8"
license = {text = "MIT"}
dependencies = ["jax >= 0.4.1", "einops >= 0.6.0", "flax >= 0.6.3", "chex>=0.1.5", "optax >=0.1.4", "scipy >= 1.10.0"]
dynamic = ["version"]

[tool.poetry.dependencies]
python = "^3.8, <3.12"
jax = "^0.4.1"
jaxlib = "^0.4.1"
einops = "^0.6.0"
flax = "^0.6.3"
chex = "^0.1.5"
optax = "^0.1.4"
scipy = "^1.10.0"


[tool.poetry.group.dev.dependencies]
black = "^23.1.0"
mypy = "^0.991"
pytest = "^7.2.0"
ruff = "^0.0.246"

[tool.poetry.group.docs.dependencies]
mkdocs = "^1.4.2"
mkdocs-material = "^9.0.6"
mkdocstrings-python = "^0.8.3"
[project.optional-dependencies]
dev = ["black >= 23.1.0", "mypy>= 0.991", "pytest>=7.2.0", "ruff >= 0.0.246"]
docs = ["mkdocs >= 1.4.2", "mkdocs-material >= 9.0.6", "mkdocstrings-python >= 0.8.3", "mkdocs-jupyter"]

[tool.ruff]
ignore = ["F401", "F403"] #ignore unused imports errors

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
ignore = ["F401", "F403"] #ignore unused imports errors

0 comments on commit 54f6815

Please sign in to comment.