From 65b2164aa16ff2d2ad98b75784e4e84c17a434c2 Mon Sep 17 00:00:00 2001 From: rocky Date: Thu, 4 Apr 2024 12:23:00 -0400 Subject: [PATCH 1/2] Exprimental Mathics3 Module Guide section --- .gitignore | 1 + pymathics/natlang/__init__.py | 11 ++++++++++- .../__init__.py} | 0 pymathics/natlang/linguistic_data/lang_trans.py | 3 +++ .../natlang/{ => linguistic_data}/translation.py | 0 5 files changed, 14 insertions(+), 1 deletion(-) rename pymathics/natlang/{linguistic_data.py => linguistic_data/__init__.py} (100%) create mode 100644 pymathics/natlang/linguistic_data/lang_trans.py rename pymathics/natlang/{ => linguistic_data}/translation.py (100%) diff --git a/.gitignore b/.gitignore index d846b2a..7ffcbec 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ *~ +.python-version /.python-version /ChangeLog /build diff --git a/pymathics/natlang/__init__.py b/pymathics/natlang/__init__.py index 7b0498c..88c7aca 100644 --- a/pymathics/natlang/__init__.py +++ b/pymathics/natlang/__init__.py @@ -63,7 +63,16 @@ WordSimilarity, WordStem, ) -from pymathics.natlang.translation import LanguageIdentify + +from pymathics.natlang.linguistic_data import ( + DictionaryLookup, + DictionaryWordQ, + RandomWord, + WordData, + WordDefinition, + WordList, +) +from pymathics.natlang.linguistic_data.translation import LanguageIdentify from pymathics.natlang.version import __version__ pymathics_version_data = { diff --git a/pymathics/natlang/linguistic_data.py b/pymathics/natlang/linguistic_data/__init__.py similarity index 100% rename from pymathics/natlang/linguistic_data.py rename to pymathics/natlang/linguistic_data/__init__.py diff --git a/pymathics/natlang/linguistic_data/lang_trans.py b/pymathics/natlang/linguistic_data/lang_trans.py new file mode 100644 index 0000000..e1d7f13 --- /dev/null +++ b/pymathics/natlang/linguistic_data/lang_trans.py @@ -0,0 +1,3 @@ +""" +Languages & Translations +""" diff --git a/pymathics/natlang/translation.py b/pymathics/natlang/linguistic_data/translation.py similarity index 100% rename from pymathics/natlang/translation.py rename to pymathics/natlang/linguistic_data/translation.py From dd7d68ddd6795d8df7f9dc62147d1f4b33e87636 Mon Sep 17 00:00:00 2001 From: Juan Mauricio Matera Date: Sun, 7 Apr 2024 20:54:57 -0300 Subject: [PATCH 2/2] fix import in test (#20) * fix import in test * fixing osx workflow --- .github/workflows/osx.yml | 5 +++-- test/consistency-and-style/test_summary_text.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/osx.yml b/.github/workflows/osx.yml index c0769fc..c26f685 100644 --- a/.github/workflows/osx.yml +++ b/.github/workflows/osx.yml @@ -24,9 +24,10 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install OS dependencies run: | - brew install llvm@11 tesseract enchant mysql + brew install llvm tesseract enchant mysql python -m pip install --upgrade pip - LLVM_CONFIG=/usr/local/Cellar/llvm@11/11.1.0/bin/llvm-config pip install llvmlite + # LLVM_CONFIG=/usr/local/Cellar/llvm@11/11.1.0/bin/llvm-config pip install llvmlite + pip install llvmlite 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] diff --git a/test/consistency-and-style/test_summary_text.py b/test/consistency-and-style/test_summary_text.py index 53bbced..a4f28fc 100644 --- a/test/consistency-and-style/test_summary_text.py +++ b/test/consistency-and-style/test_summary_text.py @@ -8,7 +8,7 @@ from mathics.core.load_builtin import name_is_builtin_symbol from mathics.core.builtin import Builtin -from mathics.doc.common_doc import skip_doc +from mathics.doc.gather import skip_doc from pymathics.natlang import __file__ as module_initfile_path