Skip to content

Commit 7201144

Browse files
committed
Use pyproject.toml
1 parent d97307b commit 7201144

File tree

8 files changed

+86
-89
lines changed

8 files changed

+86
-89
lines changed

.github/workflows/docs-deploy.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
run: |
4141
python -m pip install --upgrade pip setuptools
4242
# remove pygfx from install_requires, we install using pygfx@main
43-
sed -i "/pygfx/d" ./setup.py
43+
sed -i "/pygfx/d" ./pyproject.toml
4444
pip install git+https://github.com/pygfx/pygfx.git@main
4545
pip install -e ".[docs,notebook,imgui]"
4646
- name: Show wgpu backend
@@ -68,7 +68,7 @@ jobs:
6868
if: ${{ github.ref == 'refs/heads/main' }}
6969
# any push to main goes to fastplotlib.org/ver/dev
7070
run: echo "DOCS_VERSION_DIR=dev" >> "$GITHUB_ENV"
71-
71+
7272
# upload docs via SCP
7373
- name: Deploy docs
7474
uses: appleboy/scp-action@v0.1.7
@@ -90,7 +90,7 @@ jobs:
9090
with:
9191
message: |
9292
📚 Docs preview built and uploaded! https://www.fastplotlib.org/ver/${{ env.DOCS_VERSION_DIR }}
93-
93+
9494
# upload docs via SCP
9595
- name: Deploy docs release
9696
if: ${{ github.ref_type == 'tag' }}

.github/workflows/screenshots.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
run: |
3737
python -m pip install --upgrade pip setuptools
3838
# remove pygfx from install_requires, we install using pygfx@main
39-
sed -i "/pygfx/d" ./setup.py
39+
sed -i "/pygfx/d" ./pyproject.toml
4040
pip install git+https://github.com/pygfx/pygfx.git@main
4141
- name: Install fastplotlib
4242
run: |

MANIFEST.in

Lines changed: 0 additions & 4 deletions
This file was deleted.

fastplotlib/VERSION

Lines changed: 0 additions & 1 deletion
This file was deleted.

fastplotlib/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from pathlib import Path
22

3+
from ._version import __version__, version_info
34
# this must be the first import for auto-canvas detection
45
from .utils import loop # noqa
56
from .graphics import *
@@ -20,9 +21,6 @@
2021
from .utils import config, enumerate_adapters, select_adapter, print_wgpu_report
2122

2223

23-
with open(Path(__file__).parent.joinpath("VERSION"), "r") as f:
24-
__version__ = f.read().split("\n")[0]
25-
2624
if len(enumerate_adapters()) < 1:
2725
from warnings import warn
2826

fastplotlib/_version.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
__version__ = "0.4.0"
2+
3+
version_info = tuple(
4+
int(i) if i.isnumeric() else i for i in __version__.split("+")[0].split(".")
5+
)

pyproject.toml

Lines changed: 76 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,78 @@
1+
# ===== Project info
2+
3+
[project]
4+
dynamic = ["version"]
5+
name = "fastplotlib"
6+
description = "Next-gen fast plotting library running on WGPU using the pygfx rendering engine "
7+
readme = "README.md"
8+
license = { file = "LICENSE" }
9+
authors = [{ name = "Kushal Kolar" }, { name = "Caitlin Lewis" }]
10+
keywords = [
11+
"visualization",
12+
"science",
13+
"interactive",
14+
"pygfx",
15+
"webgpu",
16+
"wgpu",
17+
"vulkan",
18+
"gpu",
19+
]
20+
requires-python = ">= 3.10"
21+
dependencies = ["numpy>=1.23.0", "pygfx~=0.9.0", "wgpu>=0.20.0", "cmap>=0.1.3"]
22+
23+
[project.optional-dependencies]
24+
docs = [
25+
"sphinx",
26+
"sphinx-gallery",
27+
"pydata-sphinx-theme",
28+
"glfw",
29+
"ipywidgets>=8.0.0,<9",
30+
"sphinx-copybutton",
31+
"sphinx-design",
32+
"pandoc",
33+
"imageio[ffmpeg]",
34+
"matplotlib",
35+
"scikit-learn",
36+
]
37+
notebook = [
38+
"jupyterlab",
39+
"jupyter-rfb>=0.5.1",
40+
"ipywidgets>=8.0.0,<9",
41+
"sidecar",
42+
]
43+
tests = [
44+
"pytest",
45+
"nbmake",
46+
"black",
47+
"scipy",
48+
"imageio[ffmpeg]",
49+
"scikit-learn",
50+
"tqdm",
51+
]
52+
imgui = ["imgui-bundle"]
53+
dev = ["fastplotlib[docs,notebook,tests,imgui]"]
54+
55+
[project.urls]
56+
Homepage = "https://www.fastplotlib.org/"
57+
Documentation = "https://www.fastplotlib.org/"
58+
Repository = "https://github.com/fastplotlib/fastplotlib"
59+
60+
# ===== Building
61+
162
[build-system]
2-
requires = ["setuptools", "wheel"]
63+
requires = ["flit_core >=3.2,<4"]
64+
build-backend = "flit_core.buildapi"
65+
66+
# ===== Tooling
67+
68+
# [tool.ruff]
69+
# line-length = 88
370

71+
# [tool.ruff.lint]
72+
# select = ["F", "E", "W", "N", "B", "RUF", "TC"]
73+
# ignore = [
74+
# "E501", # Line too long
75+
# "E731", # Do not assign a `lambda` expression, use a `def`
76+
# "B019", # Use of `functools.lru_cache` or `functools.cache` on methods can lead to memory leaks
77+
# "RUF012", # Mutable class attributes should be annotated with `typing.ClassVar`"
78+
# ]

setup.py

Lines changed: 0 additions & 76 deletions
This file was deleted.

0 commit comments

Comments
 (0)