diff --git a/.github/workflows/consistency-checks.yml b/.github/workflows/consistency-checks.yml index bdef478..365e689 100644 --- a/.github/workflows/consistency-checks.yml +++ b/.github/workflows/consistency-checks.yml @@ -13,7 +13,7 @@ jobs: NLTK_DATA: "/tmp" strategy: matrix: - python-version: ['3.13'] + python-version: ['3.14'] steps: - uses: actions/checkout@v6 - name: Set up Python ${{ matrix.python-version }} @@ -26,12 +26,12 @@ 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 https://github.com/Mathics3/Mathics3-scanner + #(cd Mathics3-scanner && pip3 install -e .[full] --no-build-isolation && bash -x ./admin-tools/make-JSON-tables.sh) # 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]) - (cd mathics-core && bash ./admin-tools/make-JSON-tables.sh) + # git clone https://github.com/Mathics3/mathics-core + # (cd mathics-core && python -m pip install --no-build-isolation -e .[full]) + # (cd mathics-core && bash ./admin-tools/make-JSON-tables.sh) - name: Install Mathics3 Module nltk run: | diff --git a/.github/workflows/osx.yml-needs-enchant-fixup b/.github/workflows/osx.yml-needs-enchant-fixup index d8e68dd..63c20e2 100644 --- a/.github/workflows/osx.yml-needs-enchant-fixup +++ b/.github/workflows/osx.yml-needs-enchant-fixup @@ -28,7 +28,7 @@ jobs: brew install llvm lld tesseract enchant mysql python -m pip install --upgrade pip pip install pytest pyenchant - # Go over and comment out stuff when next Mathics core and Mathics-scanner are released + # Go over and comment out stuff when next Mathics3 core and Mathics-scanner are released python -m pip install -e git+https://github.com/Mathics3/mathics-scanner#egg=Mathics-Scanner[full] git clone https://github.com/Mathics3/mathics-core (cd mathics-core && pip3 install -e .[full]) @@ -38,6 +38,6 @@ jobs: - name: Install Mathics3 Module nltk run: | make develop - - name: Test Mathics Module nltk + - name: Test Mathics3 Module nltk run: | make check diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 718535a..7218ce4 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -4,7 +4,7 @@ on: push: branches: [ master ] pull_request: - branches: '**' + branches: [ master ] jobs: build: @@ -24,15 +24,14 @@ jobs: run: | python -m pip install --upgrade pip python -m pip install pytest setuptools - # Go over and comment out stuff when next Mathics core and Mathics-scanner are released - # Go over and comment out stuff when next Mathics core and Mathics3-scanner are released - 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) + # Go over and comment out stuff when next Mathics3 core and Mathics3-scanner are released + # 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) # python -m pip install -e git+https://github.com/Mathics3/mathics-scanner#egg=Mathics-Scanner[full] # Until the next mathics-core release - git clone https://github.com/Mathics3/mathics-core - (cd mathics-core && pip3 install --no-biuild-isolation -e .[full]) - (cd mathics-core && bash -x ./admin-tools/make-JSON-tables.sh) + # git clone https://github.com/Mathics3/mathics-core + # (cd mathics-core && pip3 install --no-biuild-isolation -e .[full]) + # (cd mathics-core && bash -x ./admin-tools/make-JSON-tables.sh) - name: Install Mathics3 Module nltk run: | @@ -41,4 +40,5 @@ jobs: python -m pip install -e .[full] --no-build-isolation # make develop - name: Test Mathics3 Module nltk + run: | make -j3 check diff --git a/CHANGES.rst b/CHANGES.rst index f187590..8ac56cc 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,6 +1,17 @@ CHANGES ======= +10.0.0 +------ + +April 19, 2026 + +Supports Python 3.14. Python 3.10 support dropped. Python 3.10 may still work, but it's not supported. + +* Add basic ``WordTranslation``. +* Adjust for 10.0.0 API + + 9.0.2 ----- @@ -40,7 +51,7 @@ Adjust and correct packaging. Jan 26, 2025 -This release tracks the API changes in the Mathics Kernel. +This release tracks the API changes in the Mathics3 Kernel. Use the PyPI package ``PatternLite`` instead of the defunct 3.6-ish ``pattern`` (which has now been replaced with something totally different from NLP). @@ -83,12 +94,12 @@ We should assess the landscape for changes in modules that might be used here; t 2.2.0 ----- -Re-Release to use released Mathics 2.2.0 +Re-Release to use released Mathics3 2.2.0 1.1.0 ----- -Re-Release to use released Mathics 1.1.0 +Re-Release to use released Mathics3 1.1.0 * tests added. * README.rst has been updated with examples. diff --git a/Makefile b/Makefile index e89d274..760fcd6 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,10 @@ WORDLIST_SIZE ?= md SPACY_DOWNLOAD ?= $(lang)_core_web_$(WORDLIST_SIZE) .PHONY: all build \ - check clean \ + ChangeLog-without-corrections \ + check \ + check-consistency-and-style \ + clean \ develop dist doc doc-data \ pypi-setup \ pytest \ @@ -81,15 +84,19 @@ doctest: # doc mathics.pdf: mathics/doc/tex/data # (cd mathics/doc/tex && $(MAKE) mathics.pdf) + +#: Run pytest consistency and style checks +check-consistency-and-style: + MATHICS_LINT=t $(PYTHON) -m pytest test/consistency-and-style + +#: Create ChangeLog from version control without corrections +ChangeLog-without-corrections: + git log --pretty --numstat --summary | $(GIT2CL) >ChangeLog + #: Remove ChangeLog rmChangeLog: $(RM) ChangeLog || true #: 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 -check-consistency-and-style: - MATHICS_LINT=t $(PYTHON) -m pytest test/consistency-and-style +ChangeLog: rmChangeLog ChangeLog-without-corrections + patch -p0 ChangeLog < ChangeLog-spell-corrected.diff diff --git a/admin-tools/check-versions.sh b/admin-tools/check-versions.sh index ca16b90..fea50aa 100755 --- a/admin-tools/check-versions.sh +++ b/admin-tools/check-versions.sh @@ -1,10 +1,10 @@ #!/bin/bash function finish { - cd $mathics_natlang_owd + cd $mathics3_natlang_owd } # FIXME put some of the below in a common routine -mathics_natlang_owd=$(pwd) +mathics3_natlang_owd=$(pwd) trap finish EXIT cd $(dirname ${BASH_SOURCE[0]}) diff --git a/admin-tools/pyenv-versions b/admin-tools/pyenv-versions index d3dfeed..4da5213 100644 --- a/admin-tools/pyenv-versions +++ b/admin-tools/pyenv-versions @@ -6,4 +6,4 @@ if [[ $0 == ${BASH_SOURCE[0]} ]] ; then exit 1 fi -export PYVERSIONS='3.10 3.11 3.12 3.13' +export PYVERSIONS='3.11 3.12 3.13 3.14' diff --git a/pymathics/natlang/version.py b/pymathics/natlang/version.py index 0ad7b51..e2fcf46 100644 --- a/pymathics/natlang/version.py +++ b/pymathics/natlang/version.py @@ -5,4 +5,4 @@ # well as importing into Python. That's why there is no # space around "=" below. # fmt: off -__version__="9.0.2" # noqa +__version__="10.0.0" # noqa diff --git a/pyproject.toml b/pyproject.toml index b556b46..27b9ea3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ requires = [ "setuptools", "Mathics3-Module-Base", - "Mathics3>9.0.0", + "Mathics3>=10.0.0", "PatternLite", "langid", # replace with a supported newer package, e.g. via spacy "matplotlib", @@ -20,7 +20,7 @@ build-backend = "setuptools.build_meta" name = "Mathics3-Module-nltk" description = "Mathics3 Natural Language Toolkit module" dependencies = [ - "Mathics3>9.0.0", + "Mathics3>=10.0.0", "Mathics3-Module-Base>=9.0.0", "click>=8.0", "joblib>=1.0.1", @@ -39,7 +39,7 @@ readme = "README.rst" license = "GPL-3.0-or-later" keywords = ["Mathematica", "Wolfram", "Interpreter", "Shell", "Math", "CAS"] maintainers = [ - {name = "Mathics Group", email = "mathics-devel@googlegroups.com"}, + {name = "Mathics3 Group", email = "mathics-devel@googlegroups.com"}, ] classifiers = [ "Intended Audience :: Developers", @@ -50,7 +50,6 @@ classifiers = [ "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Scientific/Engineering", "Topic :: Scientific/Engineering :: Mathematics", "Topic :: Software Development :: Interpreters", diff --git a/test/helper.py b/test/helper.py index 58463d9..7aea515 100644 --- a/test/helper.py +++ b/test/helper.py @@ -38,7 +38,7 @@ def check_evaluation( expected_messages: Optional[tuple] = None, ): """ - Helper function to test Mathics expression against + Helper function to test Mathics3 expression against its results Compares the expressions represented by ``str_expr`` and ``str_expected`` by