Skip to content

Mathics3 module refactor #7

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
20 changes: 12 additions & 8 deletions .github/workflows/osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
branches: '**'

jobs:
build:
runs-on: macos-latest
strategy:
matrix:
os: [macOS]
python-version: [3.8, 3.9, 3.10, 3.11]
python-version: ['3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -23,12 +23,16 @@ jobs:
run: |
brew install llvm
python -m pip install --upgrade pip
pip install pytest
# Can remove after next Mathics-core release
# python -m pip install -e git+https://github.com/Mathics3/mathics-core#egg=Mathics3[full]
- name: Install pymathics.hello
python -m pip install pytest
# Go over and comment out stuff 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]
git clone https://github.com/Mathics3/mathics-core
(cd mathics-core && pip3 install -e .[full])
(cd mathics-core && bash ./admin-tools/make-JSON-tables.sh)
python -m pip install -e git+https://github.com/Mathics3/Mathics3-Module-Base#egg=Mathics3-Module-Base
- name: Install Mathic3 Hello Module
run: |
pip install -e .
- name: Test Mathics
python -m pip install -e .
- name: Test Mathics3 Hello Module
run: |
make check
24 changes: 14 additions & 10 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,33 @@ on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
branches: '**'

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9, 3.11]
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
# Can remove after next Mathics-core release
# python -m pip install -e git+https://github.com/Mathics3/mathics-core#egg=Mathics3[full]
- name: Install pymathics.hello
python -m pip install pytest
# Go over and comment out stuff 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]
git clone https://github.com/Mathics3/mathics-core
(cd mathics-core && pip3 install -e .[full])
(cd mathics-core && bash ./admin-tools/make-JSON-tables.sh)
python -m pip install -e git+https://github.com/Mathics3/Mathics3-Module-Base#egg=Mathics3-Module-Base
- name: install Mathic3 Hello Module
run: |
pip install -e .
- name: Test Mathics
python -m pip install -e .
- name: Test Mathics3 Hello Module
run: |
make check
20 changes: 12 additions & 8 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
branches: '**'

jobs:
build:
runs-on: windows-latest
strategy:
matrix:
os: [windows]
python-version: [ 3.9, 3.11]
python-version: ['3.9', '3.11', '3.12']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -22,13 +22,17 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install wheel
pip install pytest
# Can remove after next Mathics-core release
# python -m pip install -e git+https://github.com/Mathics3/mathics-core#egg=Mathics3[full]
- name: Install pymathics.hello
python -m pip install pytest
python -m pip install -e git+https://github.com/Mathics3/mathics-scanner#egg=Mathics-Scanner
git clone --depth 1 https://github.com/Mathics3/mathics-core mathics-core
cd mathics-core
python -m pip install -e .
bash admin-tools/make-JSON-tables.sh
cd ..
python -m pip install -e git+https://github.com/Mathics3/Mathics3-Module-Base#egg=Mathics3-Module-Base
- name: Install Mathic3 Hello Module
run: |
pip install -e .
python -m pip install -e .
- name: Test Mathics
run: |
make check
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
*~
/.python-version
/ChangeLog
/ChangeLog-spell-corrected
/Mathics3_hello.egg-info
/build
/dist
/pymathics_hello.egg-info
Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ repos:
hooks:
- id: check-merge-conflict
- id: debug-statements
stages: [commit]
stages: [pre-commit]
- id: end-of-file-fixer
stages: [commit]
stages: [pre-commit]
# - repo: https://github.com/pycqa/isort
# rev: 5.10.1
# hooks:
Expand All @@ -20,9 +20,9 @@ repos:
- id: black
language_version: python3
exclude: 'pymathics/hello/version.py'
stages: [commit]
stages: [pre-commit]
- repo: https://github.com/pycqa/flake8
rev: 3.9.2
hooks:
- id: flake8
stages: [commit]
stages: [pre-commit]
2 changes: 1 addition & 1 deletion pymathics/hello/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# well as importing into Python. That's why there is no
# space around "=" below.
# fmt: off
__version__="7.0.0" # noqa
__version__="7.0.1dev0" # noqa
58 changes: 58 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
[build-system]
requires = [
"setuptools>=70.0.0", # CVE-2024-38335 recommends this
"mpmath>=1.2.0",
"numpy<1.27",
"matplotlib",
"scipy>=1.10.0",
"sympy>=1.11,<1.13",
]
build-backend = "setuptools.build_meta"

[project]
name = "Mathics3-hello"
description = 'Mathics3 Hello, World! module'
dependencies = [
"Mathics3-Module-Base",
]
requires-python = ">=3.9" # Sympy 1.11 is supported only down to 3.8
readme = "README.rst"
license = {text = "GPL"}
keywords = ["Mathematica", "Wolfram", "Interpreter", "Shell", "Math", "CAS"]
maintainers = [
{name = "Mathics Group", email = "[email protected]"},
]
classifiers = [
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Programming Language :: Python",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Mathematics",
"Topic :: Software Development :: Interpreters",
]
dynamic = ["version"]

[project.urls]
Homepage = "https://github.com/Mathics3/pymathics-hello"
Downloads = "https://github.com/Mathics3/pymathics-hello/releases"

[project.optional-dependencies]
dev = [
"pytest",
]

[tool.setuptools]
packages = [
"pymathics.hello",
]

[tool.setuptools.dynamic]
version = {attr = "pymathics.hello.__version__"}
59 changes: 0 additions & 59 deletions setup.py

This file was deleted.