From 4fb79fa224c6b281a233fe55dd54501c80c8761e Mon Sep 17 00:00:00 2001 From: rocky Date: Sat, 10 Aug 2024 03:44:47 -0400 Subject: [PATCH] Get ready for release 7.0.0 --- .github/workflows/ubuntu.yml | 17 ++--- .gitignore | 1 + ChangeLog-spell-corrected.diff | 124 +++++++++++++++++++++++++++++++++ Makefile | 1 + admin-tools/check-versions.sh | 27 +++++++ admin-tools/make-dist.sh | 26 ++----- admin-tools/pyenv-versions | 2 +- pymathics/graph/version.py | 2 +- 8 files changed, 171 insertions(+), 29 deletions(-) create mode 100644 ChangeLog-spell-corrected.diff create mode 100644 admin-tools/check-versions.sh diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index fe0e5e4..dfb382d 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -1,4 +1,4 @@ -name: Pymathics.graph (ubuntu) +name: Mathic3 Graph Module (ubuntu) on: push: @@ -8,14 +8,14 @@ on: jobs: build: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.9', '3.10'] + python-version: ['3.9', '3.10', '3.11'] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install dependencies @@ -24,11 +24,12 @@ jobs: python -m pip install pytest # Can comment out when next Mathics core and Mathics-scanner are released # python -m pip install -e git+https://github.com/Mathics3/mathics-scanner#egg=Mathics-Scanner[full] - python -m pip install -e git+https://github.com/Mathics3/mathics-core#egg=Mathics3[full] - (cd src/mathics3 && bash ./admin-tools/make-op-tables.sh) + # python -m pip install -e git+https://github.com/Mathics3/mathics-core#egg=Mathics3[full] + python -m pip install -e . + # (cd src/mathics3 && bash ./admin-tools/make-op-tables.sh) - name: install pymathics graph run: | make develop - - name: Test Mathics3 + - name: Test Mathics3 Module Graph run: | make -j3 check diff --git a/.gitignore b/.gitignore index f60ffe5..e6af09c 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ /.hypothesis /.python-version /ChangeLog +/Mathics3_graph.egg-info /build /dist /pymathics_graph.egg-info diff --git a/ChangeLog-spell-corrected.diff b/ChangeLog-spell-corrected.diff new file mode 100644 index 0000000..8feb1ef --- /dev/null +++ b/ChangeLog-spell-corrected.diff @@ -0,0 +1,124 @@ +--- ChangeLog 2024-08-10 03:46:00.609284564 -0400 ++++ ChangeLog-spell-corrected 2024-08-10 03:45:36.963397654 -0400 +@@ -6,7 +6,7 @@ + + 2024-08-08 R. Bernstein + +- * : Merge pull request #33 from Mathics3/dl_blanklines addiing blanklines between and the examples in docstrings ++ * : Merge pull request #33 from Mathics3/dl_blanklines adding blanklines between and the examples in docstrings + + 2024-08-06 rocky + +@@ -48,7 +48,7 @@ + + * Makefile, pymathics/graph/base.py, pymathics/graph/tree.py, + pymathics/graph/version.py, setup.py, +- test/consistency-and-style/test_summary_text.py, test/helper.py: ++ test/consistency-and-style/test_summary_text.py, test/helper.py: + fixes + + 2023-07-24 rocky +@@ -65,7 +65,7 @@ + + 2023-04-22 rocky + +- * pymathics/graph/properties.py, pymathics/graph/version.py: ++ * pymathics/graph/properties.py, pymathics/graph/version.py: + Revisions for NetWorkX >= 3.0.0 + + 2023-03-02 rocky +@@ -129,7 +129,7 @@ + 2023-02-17 rocky + + * pymathics/graph/__init__.py, pymathics/graph/base.py, +- pymathics/graph/eval/parametric.py, pymathics/graph/parametric.py: ++ pymathics/graph/eval/parametric.py, pymathics/graph/parametric.py: + Make a pass over parametric graph section.. Some type-checking corrections were made and some bugs found from + this fixed. + +@@ -145,7 +145,7 @@ + 2023-02-14 Juan Mauricio Matera + + * pymathics/graph/base.py, pymathics/graph/centralities.py, +- pymathics/graph/operations.py, pymathics/graph/parametric.py: ++ pymathics/graph/operations.py, pymathics/graph/parametric.py: + another round of small fixes (#20) * another round of small fixes * remove extra line + + 2023-02-14 Juan Mauricio Matera +@@ -225,7 +225,7 @@ + 2023-02-12 rocky + + * pymathics/graph/eval/tree.py, pymathics/graph/tree.py: Sort out +- Tree module ... This might be temporay though based on WMA docs ++ Tree module ... This might be temporary though based on WMA docs + + 2023-02-12 rocky + +@@ -331,7 +331,7 @@ + + * README.rst, pymathics/graph/__main__.py, + pymathics/graph/algorithms.py, pymathics/graph/generators.py, +- pymathics/graph/tree.py, pymathics/graph/version.py, setup.py: ++ pymathics/graph/tree.py, pymathics/graph/version.py, setup.py: + Changes for Mathics 6.0.0 + + 2022-07-31 rocky +@@ -386,7 +386,7 @@ + + 2022-07-19 rocky + +- * .pre-commit-config.yaml, pymathics/graph/__main__.py, setup.py: ++ * .pre-commit-config.yaml, pymathics/graph/__main__.py, setup.py: + WIP - conversion to mathics 5.0.0 + + 2022-07-11 rocky +@@ -444,7 +444,7 @@ + + 2021-02-15 rocky + +- * pymathics/graph/generators.py: KaryTree doc formating typo ++ * pymathics/graph/generators.py: KaryTree doc formatting typo + + 2020-12-24 rocky + +@@ -453,7 +453,7 @@ + 2020-12-24 rocky + + * NEWS.md, README.rst, admin-tools/.gitignore, +- admin-tools/make-dist.sh, admin-tools/pyenv-versions, setup.py: ++ admin-tools/make-dist.sh, admin-tools/pyenv-versions, setup.py: + Administrivia.... Add NEWS.md and code to build distribution + + 2020-12-24 rocky +@@ -532,7 +532,7 @@ + + 2020-12-05 rocky + +- * pymathics/graph/graph_generators.py, pymathics/graph/tree.py: ++ * pymathics/graph/graph_generators.py, pymathics/graph/tree.py: + graph layout should be Python string + + 2020-12-05 rocky +@@ -542,7 +542,7 @@ + + 2020-12-04 rocky + +- * pymathics/graph/__main__.py, pymathics/graph/graph_generators.py: ++ * pymathics/graph/__main__.py, pymathics/graph/graph_generators.py: + VertexLabeling->VertexLabels Use helper function in CompleteGraph + + 2020-12-04 rocky +@@ -582,7 +582,7 @@ + + 2020-11-29 rocky + +- * pymathics/graph/__main__.py, pymathics/graph/graph_generators.py: ++ * pymathics/graph/__main__.py, pymathics/graph/graph_generators.py: + DRY graph generators + + 2020-11-29 rocky +@@ -618,4 +618,3 @@ + 2020-11-05 rocky + + * pymathics.graph: Mathic Graph functions +- diff --git a/Makefile b/Makefile index e58c35f..8ec06cf 100644 --- a/Makefile +++ b/Makefile @@ -74,6 +74,7 @@ rmChangeLog: #: Create a ChangeLog from git via git log and git2cl ChangeLog: rmChangeLog git log --pretty --numstat --summary | $(GIT2CL) >$@ + patch ChangeLog < ChangeLog-spell-corrected.diff #: Run pytest consistency and style checks diff --git a/admin-tools/check-versions.sh b/admin-tools/check-versions.sh new file mode 100644 index 0000000..d4731ec --- /dev/null +++ b/admin-tools/check-versions.sh @@ -0,0 +1,27 @@ +#!/bin/bash +function finish { + cd $mathics_graph_owd +} + +# FIXME put some of the below in a common routine +mathics_graph_owd=$(pwd) +trap finish EXIT + +cd $(dirname ${BASH_SOURCE[0]}) +if ! source ./pyenv-versions ; then + exit $? +fi + +cd .. +for version in $PYVERSIONS; do + echo --- $version --- + if ! pyenv local $version ; then + exit $? + fi + make clean && pip install -e . + if ! make check; then + exit $? + fi + echo === $version === +done +finish diff --git a/admin-tools/make-dist.sh b/admin-tools/make-dist.sh index ba8c7ab..b3eb015 100755 --- a/admin-tools/make-dist.sh +++ b/admin-tools/make-dist.sh @@ -3,11 +3,11 @@ PACKAGE=pymathics-graph # FIXME put some of the below in a common routine function finish { - cd $owd + cd $mathics_graph_owd } cd $(dirname ${BASH_SOURCE[0]}) -owd=$(pwd) +mathics_graph_owd=$(pwd) trap finish EXIT if ! source ./pyenv-versions ; then @@ -19,21 +19,9 @@ cd .. source pymathics/graph/version.py echo $__version__ -for pyversion in $PYVERSIONS; do - if ! pyenv local $pyversion ; then - exit $? - fi - # pip bdist_egg create too-general wheels. So - # we narrow that by moving the generated wheel. - - # Pick out first two number of version, e.g. 3.7.9 -> 37 - first_two=$(echo $pyversion | cut -d'.' -f 1-2 | sed -e 's/\.//') - rm -fr build - python setup.py develop - python setup.py bdist_egg - python setup.py bdist_wheel - python setup.py bdist_wheel --universal - mv -v dist/${PACKAGE}-$VERSION-{py2.py3,py$first_two}-none-any.whl -done - +if ! pyenv local $pyversion ; then + exit $? +fi +python setup.py bdist_wheel --universal python ./setup.py sdist +finish diff --git a/admin-tools/pyenv-versions b/admin-tools/pyenv-versions index 81f43d8..406855c 100644 --- a/admin-tools/pyenv-versions +++ b/admin-tools/pyenv-versions @@ -5,4 +5,4 @@ if [[ $0 == ${BASH_SOURCE[0]} ]] ; then echo "This script should be *sourced* rather than run directly through bash" exit 1 fi -export PYVERSIONS='3.6.15 3.7.16 3.8.16 3.9.16 3.10.10' +export PYVERSIONS='3.8 3.9 3.10 3.11' diff --git a/pymathics/graph/version.py b/pymathics/graph/version.py index 7b0a251..cc1f721 100644 --- a/pymathics/graph/version.py +++ b/pymathics/graph/version.py @@ -5,4 +5,4 @@ # well as importing into Python. That's why there is no # space around "=" below. # fmt: off -__version__="7.0.0dev0" # noqa +__version__="7.0.0" # noqa