From 5f350b3b1d1cd64986b79f7db8a514484ae01369 Mon Sep 17 00:00:00 2001 From: rocky Date: Sat, 28 Mar 2026 18:39:33 -0400 Subject: [PATCH 1/3] Create builtin-functions in System namespace --- pymathics/graph/__init__.py | 67 +++++++++++++++++++++++++++++++++++++ pymathics/graph/boxes.py | 2 +- 2 files changed, 68 insertions(+), 1 deletion(-) diff --git a/pymathics/graph/__init__.py b/pymathics/graph/__init__.py index 17c9e9b..f06e1c0 100644 --- a/pymathics/graph/__init__.py +++ b/pymathics/graph/__init__.py @@ -117,6 +117,73 @@ "requires": ["networkx"], } +_BUILTINS_ = ( + "AcyclicGraphQ", + "AdjacencyList", + "BalancedTree", + "BarbellGraph", + "BetweennessCentrality", + "BinomialTree", + "ClosenessCentrality", + "CompleteGraph", + "CompleteKaryTree", + "ConnectedComponents", + "ConnectedGraphQ", + "CycleGraph", + "DegreeCentrality", + "DirectedEdge", + "DirectedGraphQ", + "EdgeConnectivity", + "EdgeCount", + "EdgeDelete", + "EdgeIndex", + "EdgeList", + "EdgeRules", + "EigenvectorCentrality", + "FindShortestPath", + "FindSpanningTree", + "FindVertexCut", + "Graph", + "GraphAtlas", + "GraphAtom", + "GraphBox", + "GraphData", + "GraphDistance", + "GraphQ", + "HITSCentrality", + "HighlightGraph", + "HknHararyGraph", + "HmnHararyGraph", + "KaryTree", + "KatzCentrality", + "LadderGraph", + "LoopFreeGraphQ", + "MixedGraphQ", + "MultigraphQ", + "PageRankCentrality", + "PathGraph", + "PathGraphQ", + "PlanarGraphQ", + "Property", + "PropertyValue", + "RandomGraph", + "RandomTree", + "SimpleGraphQ", + "StarGraph", + "TreeGraph", + "TreeGraphAtom", + "TreeGraphQ", + "UndirectedEdge", + "VertexAdd", + "VertexConnectivity", + "VertexCount", + "VertexDegree", + "VertexDelete", + "VertexIndex", + "VertexList", + "WeaklyConnectedComponents", +) + # These are the publicly exported names __all__ = [ "AcyclicGraphQ", diff --git a/pymathics/graph/boxes.py b/pymathics/graph/boxes.py index a9ef826..e64ecc3 100644 --- a/pymathics/graph/boxes.py +++ b/pymathics/graph/boxes.py @@ -10,7 +10,7 @@ import tempfile from typing import Tuple -from mathics.core.element import BaseElement, BoxElementMixin +from mathics.core.element import BoxElementMixin from pymathics.graph.format import png_format_graph, svg_format_graph From 5ed9156173dd32de0ad6923dc2cc8b54c74e8e8f Mon Sep 17 00:00:00 2001 From: rocky Date: Sat, 28 Mar 2026 18:49:37 -0400 Subject: [PATCH 2/3] adjust CI --- .github/workflows/consistency-checks.yml | 7 +++++-- .github/workflows/ubuntu.yml | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/consistency-checks.yml b/.github/workflows/consistency-checks.yml index 1db3be8..ed12b47 100644 --- a/.github/workflows/consistency-checks.yml +++ b/.github/workflows/consistency-checks.yml @@ -24,8 +24,11 @@ jobs: python -m pip install pytest setuptools python -m pip install Mathics3-Module-Base # Until the next Mathics3-scanner release - git clone https://github.com/Mathics3/Mathics3-scanner - (cd Mathics3-scanner && pip3 install -e .[full] --no-build-isolation && bash -x ./admin-tools/make-JSON-tables.sh) + git clone --depth 1 https://github.com/Mathics3/Mathics3-scanner.git + cd Mathics3-scanner/ + pip install -e . + bash -x admin-tools/make-JSON-tables.sh + cd .. # Until the next mathics-core release git clone https://github.com/Mathics3/mathics-core (cd mathics-core && python -m pip install --no-build-isolation -e .[full]) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index e029a80..616efe4 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -1,4 +1,4 @@ -name: Mathic3 Module networkx (ubuntu) +name: Mathics3 Module networkx (ubuntu) on: push: From 088cb276857ee3dfed889f023eb0e8a013e88dea Mon Sep 17 00:00:00 2001 From: rocky Date: Sat, 18 Apr 2026 08:51:03 -0400 Subject: [PATCH 3/3] Small tweaks --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 98a9f96..12496fa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [build-system] requires = [ - "setuptools", # CVE-2024-38335 recommends this - "mathics-core >= 9.0.1", + "setuptools", + "mathics-core > 9.0.1", "Mathics3-Module-Base", "networkx>=3.0.0", "matplotlib",