From 39cb3c17feb00b2693c9322b24a9c7ba0d222d05 Mon Sep 17 00:00:00 2001 From: "David L. Qiu" Date: Thu, 30 Oct 2025 14:27:19 -0700 Subject: [PATCH 1/2] prepare repo for PyPI release via Jupyter Releaser --- .gitignore | 3 +++ README.md | 2 +- jupyter_ai_magic_commands/__init__.py | 4 ++-- jupyter_ai_magic_commands/_version.py | 4 ---- package.json | 25 ------------------------- pyproject.toml | 20 +++++++++++--------- 6 files changed, 17 insertions(+), 41 deletions(-) delete mode 100644 jupyter_ai_magic_commands/_version.py delete mode 100644 package.json diff --git a/.gitignore b/.gitignore index e15106e..97e4c39 100644 --- a/.gitignore +++ b/.gitignore @@ -214,3 +214,6 @@ __marimo__/ # Streamlit .streamlit/secrets.toml + +# Auto-generated _version.py module +jupyter_ai_magic_commands/_version.py diff --git a/README.md b/README.md index ec1948d..a44bdf9 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# @jupyter-ai-contrib/jupyter-ai-magic-commands +# jupyter-ai-magic-commands Magics are currently provided for Jupyter AI via the package `jupyter-ai-magics` ([current version 2.31.6](https://pypi.org/project/jupyter-ai-magics)). This works with Jupyter AI v2 but will not work with the collection of extensions for v3 developed in https://github.com/jupyter-ai-contrib, which use `litellm` via the https://github.com/jupyter-ai-contrib/jupyter-ai-litellm repository. Therefore, we introduce an updated magics package, titled `jupyter_ai_magic_commands` (v0.0.1) for use with Jupyter AI v3. diff --git a/jupyter_ai_magic_commands/__init__.py b/jupyter_ai_magic_commands/__init__.py index 9d0529e..ab8f746 100644 --- a/jupyter_ai_magic_commands/__init__.py +++ b/jupyter_ai_magic_commands/__init__.py @@ -2,12 +2,12 @@ from typing import TYPE_CHECKING -from ._version import __version__ - if TYPE_CHECKING: from IPython.core.interactiveshell import InteractiveShell +__version__ = '0.0.0' + def load_ipython_extension(ipython: InteractiveShell): from .exception import store_exception from .magics import AiMagics diff --git a/jupyter_ai_magic_commands/_version.py b/jupyter_ai_magic_commands/_version.py deleted file mode 100644 index 96271bc..0000000 --- a/jupyter_ai_magic_commands/_version.py +++ /dev/null @@ -1,4 +0,0 @@ -# This file is auto-generated by Hatchling. As such, do not: -# - modify -# - track in version control e.g. be sure to add to .gitignore -__version__ = VERSION = '0.0.1' diff --git a/package.json b/package.json deleted file mode 100644 index 41ad1b1..0000000 --- a/package.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "@jupyter-ai-contrib/jupyter-ai-magic-commands", - "version": "0.0.1", - "description": "Jupyter AI magics Python package. Not published on NPM.", - "private": true, - "homepage": "https://github.com/jupyter-ai-contrib/jupyter-ai-magic-commands", - "bugs": { - "url": "https://github.com/jupyter-ai-contrib/jupyter-ai-magic-commands/issues", - "email": "jupyter@googlegroups.com" - }, - "license": "BSD-3-Clause", - "author": { - "name": "Project Jupyter", - "email": "jupyter@googlegroups.com" - }, - "repository": { - "type": "git", - "url": "https://github.com/jupyter-ai-contrib/jupyter-ai-magic-commands.git" - }, - "scripts": { - "dev:install": "uv pip install -e \".[dev,all]\"", - "dev:uninstall": "uv pip uninstall jupyter_ai_magic_commands", - "install-from-src": "uv pip install ." - } -} diff --git a/pyproject.toml b/pyproject.toml index 6b8cf4a..76b8645 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,10 +1,13 @@ [build-system] -requires = ["hatchling>=1.4.0", "hatch-nodejs-version"] +requires = ["hatchling>=1.4.0"] build-backend = "hatchling.build" [project] name = "jupyter_ai_magic_commands" readme = "README.md" +description = "Package providing Jupyter AI magic commands in IPython" +authors = [{ name = "Project Jupyter", email = "jupyter@googlegroups.com" }] +keywords = ["ipython", "ai", "magic-commands"] license = { file = "LICENSE" } requires-python = ">=3.9" classifiers = [ @@ -18,7 +21,7 @@ classifiers = [ "Programming Language :: Python :: 3.12", ] -dynamic = ["version", "description", "authors", "urls", "keywords"] +dynamic = ["version"] dependencies = [ "ipython", @@ -28,6 +31,11 @@ dependencies = [ "click>=8.1.0,<9", ] +[project.urls] +Documentation = "https://jupyter-ai.readthedocs.io/en/v3/" +Source = "https://github.com/jupyter-ai-contrib/jupyter-ai-magic-commands" +Tracker = "https://github.com/jupyter-ai-contrib/jupyter-ai-magic-commands/issues" + [project.optional-dependencies] dev = [ # used to run our linters and formatters locally @@ -45,10 +53,4 @@ all = [ ] [tool.hatch.version] -source = "nodejs" - -[tool.hatch.metadata.hooks.nodejs] -fields = ["description", "authors", "urls"] - -[tool.hatch.build.hooks.version] -path = "jupyter_ai_magic_commands/_version.py" +path = "jupyter_ai_magic_commands/__init__.py" From 1b2e4c39fb2e0295fef5b475e2ec2e8df327b444 Mon Sep 17 00:00:00 2001 From: "David L. Qiu" Date: Thu, 30 Oct 2025 14:30:53 -0700 Subject: [PATCH 2/2] add CHANGELOG.md --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..d82c0c7 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,6 @@ +# Changelog + + + + +