Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust for Mathics-core 7.0.0 #72

Merged
merged 2 commits into from
Jul 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# THis is an EditorConfig file
# This is an EditorConfig file
# https://EditorConfig.org

root = true
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/osx.yml → .github/workflows/osx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
os: [macOS]
python-version: ['3.6', '3.7', '3.8', '3.9']
python-version: ['3.8', '3.9', '3.10']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -22,15 +22,18 @@ jobs:
- name: Install dependencies
run: |
brew install asymptote
python -m pip install --upgrade pip
python3 -m pip install --upgrade pip
# 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]
# python3 -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]
python -m pip install Mathics3[full]
git clone https://github.com/Mathics3/mathics-core
(cd mathics-core && pip3 install -e .[full])
(cd mathics-core && bash ./admin-tools/make-op-tables.sh)
# python -m pip install Mathics3[full]
- name: Install mathicsscript
run: |
make
- name: Test mathicsscript
run: |
pip install -r requirements-dev.txt
pip3 install -r requirements-dev.txt
make check
16 changes: 9 additions & 7 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,31 @@ on:

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ['3.6', '3.7', '3.8', '3.9']
python-version: ['3.7', '3.8', '3.9', '3.10']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt-get update -qq && sudo apt-get install -qq liblapack-dev llvm-dev asymptote
python -m pip install --upgrade pip
python3 -m pip install --upgrade pip
# 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]
python -m pip install Mathics3[full]
python -m pip install -e .
git clone https://github.com/Mathics3/mathics-core
(cd mathics-core && pip3 install -e .[full])
(cd mathics-core && bash ./admin-tools/make-op-tables.sh)
# python -m pip install Mathics3[full]
- name: Install mathicsscript
run: |
make
- name: Test mathicsscript
run: |
pip install pytest
pip3 install pytest
make check
18 changes: 9 additions & 9 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,28 @@ jobs:
strategy:
matrix:
os: [windows]
python-version: ['3.7', '3.8']
python-version: ['3.8', '3.9']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install wheel
choco install llvm --force
python3 -m pip install --upgrade pip
python3 -m pip install wheel
set LLVM_DIR="C:\Program Files\LLVM"
# 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-scanner#egg=Mathics-Scanner[full]
git clone https://github.com/Mathics3/mathics-core
bash -c '(cd mathics-core && pip3 install -e .[full])'
bash -c '(cd mathics-core && bash ./admin-tools/make-op-tables.sh)'
# python -m pip install Mathic3[full]
- name: Install mathicsscript
run: |
make
- name: Test mathicsscript
run: |
pip install -r requirements-dev.txt
pip3 install -r requirements-dev.txt
make check
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
*.pyc
*_dis
*~
./mathicsscript/inputrc-no-unicode
./mathicsscript/inputrc-unicode
.idea*
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
Expand All @@ -21,8 +23,7 @@
/.cache
/.coverage
/.eggs
./mathicsscript/inputrc-no-unicode
./mathicsscript/inputrc-unicode
/.hypothesis
/.mypy_cache
/.pytest_cache
/.python-version
Expand Down
7 changes: 7 additions & 0 deletions mathicsscript/settings.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
# -*- coding: utf-8 -*-

from mathics.core.definitions import Definitions
from mathics.core.load_builtin import import_and_load_builtins
from mathics.settings import default_pymathics_modules

# Initialize definitions
extension_modules = default_pymathics_modules


# from mathics.timing import TimeitContextManager
# with TimeitContextManager("import_and_load_builtins()"):
# import_and_load_builtins()

import_and_load_builtins()

definitions = Definitions(add_builtin=True, extension_modules=extension_modules)
pass
2 changes: 1 addition & 1 deletion mathicsscript/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
# well as importing into Python. That's why there is no
# space around "=" below.
# fmt: off
__version__="6.0.0" # noqa
__version__="7.0.0.dev0" # noqa
10 changes: 5 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
python setup.py --help install
"""

import sys
import platform

import os.path as osp
import re
from setuptools import setup, find_packages
Expand All @@ -25,9 +28,6 @@ def get_srcdir():

srcdir = get_srcdir()

import sys
import platform

# Ensure user has the correct Python version
if sys.version_info < (3, 6):
print("mathicsscript does not support Python %d.%d" % sys.version_info[:2])
Expand Down Expand Up @@ -75,7 +75,7 @@ def read(*rnames):
},
install_requires=[
"Mathics_Scanner>=1.3.0",
"Mathics3 >= 6.0.0,<6.1.0",
"Mathics3 >= 6.2.0,<7.1.0",
"click",
"colorama",
"columnize",
Expand Down Expand Up @@ -105,11 +105,11 @@ def read(*rnames):
"Intended Audience :: Science/Research",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Programming Language :: Python",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Scientific/Engineering",
Expand Down