From abdd9407973a1a03f17bb97c9ea9a14ed52c9831 Mon Sep 17 00:00:00 2001 From: koaning Date: Wed, 7 Jan 2026 20:29:59 +0100 Subject: [PATCH] Migrate to modern pyproject.toml and add CI workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Replace setup.py with pyproject.toml for modern Python packaging - Bump Python requirement to 3.10+ and version to 0.3.5 - Add GitHub Actions CI workflow to test installation across Python versions 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Haiku 4.5 --- .github/workflows/ci.yml | 28 ++++++++++++++++++++++++++++ pyproject.toml | 33 +++++++++++++++++++++++++++++++++ setup.py | 36 ------------------------------------ 3 files changed, 61 insertions(+), 36 deletions(-) create mode 100644 .github/workflows/ci.yml create mode 100644 pyproject.toml delete mode 100644 setup.py diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..a20e0cd --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,28 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + install: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.10", "3.11", "3.12"] + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install package + run: pip install . + + - name: Verify import + run: python -c "from drawdata import ScatterWidget, BarWidget; print('Import successful')" diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..beb76dd --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,33 @@ +[build-system] +requires = ["setuptools>=61.0"] +build-backend = "setuptools.build_meta" + +[project] +name = "drawdata" +version = "0.3.5" +description = "draw a dataset from inside Jupyter" +readme = "readme.md" +license = {text = "MIT"} +authors = [ + {name = "Vincent D. Warmerdam"} +] +requires-python = ">=3.10" +dependencies = [ + "anywidget>=0.9.2", +] +classifiers = [ + "Intended Audience :: Developers", + "Intended Audience :: Science/Research", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", + "Topic :: Scientific/Engineering", +] + +[tool.setuptools.packages.find] +exclude = ["notebooks"] + +[tool.setuptools.package-data] +drawdata = ["static/*.js", "static/*.css"] diff --git a/setup.py b/setup.py deleted file mode 100644 index a04033a..0000000 --- a/setup.py +++ /dev/null @@ -1,36 +0,0 @@ -import os -from setuptools import setup, find_packages - - -base_packages = [ - "anywidget>=0.9.2" -] - -def read(fname): - return open(os.path.join(os.path.dirname(__file__), fname)).read() - - -setup( - name="drawdata", - version="0.3.4", - description="draw a dataset from inside Jupyter", - author="Vincent D. Warmerdam", - packages=find_packages(exclude=["notebooks"]), - package_data={"drawdata": ["static/*.js", "static/*.css"]}, - long_description=read("readme.md"), - long_description_content_type="text/markdown", - install_requires=base_packages, - classifiers=[ - "Intended Audience :: Developers", - "Intended Audience :: Science/Research", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - "Topic :: Scientific/Engineering", - ], - license_files=["LICENSE"], -)