Skip to content

Commit 1689d16

Browse files
authored
Mathics3 module refactor (#7)
* Bump version * Use pyproject.toml * More liberal setuptools
1 parent 82cf989 commit 1689d16

File tree

8 files changed

+102
-90
lines changed

8 files changed

+102
-90
lines changed

.github/workflows/osx.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ on:
44
push:
55
branches: [ master ]
66
pull_request:
7-
branches: [ master ]
7+
branches: '**'
88

99
jobs:
1010
build:
1111
runs-on: macos-latest
1212
strategy:
1313
matrix:
1414
os: [macOS]
15-
python-version: [3.8, 3.9, 3.10, 3.11]
15+
python-version: ['3.11', '3.12', '3.13']
1616
steps:
1717
- uses: actions/checkout@v4
1818
- name: Set up Python ${{ matrix.python-version }}
@@ -23,12 +23,16 @@ jobs:
2323
run: |
2424
brew install llvm
2525
python -m pip install --upgrade pip
26-
pip install pytest
27-
# Can remove after next Mathics-core release
28-
# python -m pip install -e git+https://github.com/Mathics3/mathics-core#egg=Mathics3[full]
29-
- name: Install pymathics.hello
26+
python -m pip install pytest
27+
# Go over and comment out stuff when next Mathics core and Mathics-scanner are released
28+
python -m pip install -e git+https://github.com/Mathics3/mathics-scanner#egg=Mathics-Scanner[full]
29+
git clone https://github.com/Mathics3/mathics-core
30+
(cd mathics-core && pip3 install -e .[full])
31+
(cd mathics-core && bash ./admin-tools/make-JSON-tables.sh)
32+
python -m pip install -e git+https://github.com/Mathics3/Mathics3-Module-Base#egg=Mathics3-Module-Base
33+
- name: Install Mathic3 Hello Module
3034
run: |
31-
pip install -e .
32-
- name: Test Mathics
35+
python -m pip install -e .
36+
- name: Test Mathics3 Hello Module
3337
run: |
3438
make check

.github/workflows/ubuntu.yml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,33 @@ on:
44
push:
55
branches: [ master ]
66
pull_request:
7-
branches: [ master ]
7+
branches: '**'
88

99
jobs:
1010
build:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
python-version: [3.9, 3.11]
14+
python-version: ['3.10', '3.11', '3.12', '3.13']
1515
steps:
16-
- uses: actions/checkout@v2
16+
- uses: actions/checkout@v4
1717
- name: Set up Python ${{ matrix.python-version }}
18-
uses: actions/setup-python@v2
18+
uses: actions/setup-python@v5
1919
with:
2020
python-version: ${{ matrix.python-version }}
2121
- name: Install dependencies
2222
run: |
2323
python -m pip install --upgrade pip
24-
pip install pytest
25-
# Can remove after next Mathics-core release
26-
# python -m pip install -e git+https://github.com/Mathics3/mathics-core#egg=Mathics3[full]
27-
- name: Install pymathics.hello
24+
python -m pip install pytest
25+
# Go over and comment out stuff when next Mathics core and Mathics-scanner are released
26+
python -m pip install -e git+https://github.com/Mathics3/mathics-scanner#egg=Mathics-Scanner[full]
27+
git clone https://github.com/Mathics3/mathics-core
28+
(cd mathics-core && pip3 install -e .[full])
29+
(cd mathics-core && bash ./admin-tools/make-JSON-tables.sh)
30+
python -m pip install -e git+https://github.com/Mathics3/Mathics3-Module-Base#egg=Mathics3-Module-Base
31+
- name: install Mathic3 Hello Module
2832
run: |
29-
pip install -e .
30-
- name: Test Mathics
33+
python -m pip install -e .
34+
- name: Test Mathics3 Hello Module
3135
run: |
3236
make check

.github/workflows/windows.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ on:
44
push:
55
branches: [ master ]
66
pull_request:
7-
branches: [ master ]
7+
branches: '**'
88

99
jobs:
1010
build:
1111
runs-on: windows-latest
1212
strategy:
1313
matrix:
1414
os: [windows]
15-
python-version: [ 3.9, 3.11]
15+
python-version: ['3.11', '3.12', '3.13']
1616
steps:
1717
- uses: actions/checkout@v4
1818
- name: Set up Python ${{ matrix.python-version }}
@@ -22,13 +22,17 @@ jobs:
2222
- name: Install dependencies
2323
run: |
2424
python -m pip install --upgrade pip
25-
python -m pip install wheel
26-
pip install pytest
27-
# Can remove after next Mathics-core release
28-
# python -m pip install -e git+https://github.com/Mathics3/mathics-core#egg=Mathics3[full]
29-
- name: Install pymathics.hello
25+
python -m pip install pytest
26+
python -m pip install -e git+https://github.com/Mathics3/mathics-scanner#egg=Mathics-Scanner
27+
git clone --depth 1 https://github.com/Mathics3/mathics-core mathics-core
28+
cd mathics-core
29+
python -m pip install -e .
30+
bash admin-tools/make-JSON-tables.sh
31+
cd ..
32+
python -m pip install -e git+https://github.com/Mathics3/Mathics3-Module-Base#egg=Mathics3-Module-Base
33+
- name: Install Mathic3 Hello Module
3034
run: |
31-
pip install -e .
35+
python -m pip install -e .
3236
- name: Test Mathics
3337
run: |
3438
make check

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
*~
22
/.python-version
33
/ChangeLog
4+
/ChangeLog-spell-corrected
5+
/Mathics3_hello.egg-info
46
/build
57
/dist
68
/pymathics_hello.egg-info

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ repos:
66
hooks:
77
- id: check-merge-conflict
88
- id: debug-statements
9-
stages: [commit]
9+
stages: [pre-commit]
1010
- id: end-of-file-fixer
11-
stages: [commit]
11+
stages: [pre-commit]
1212
# - repo: https://github.com/pycqa/isort
1313
# rev: 5.10.1
1414
# hooks:
@@ -20,9 +20,9 @@ repos:
2020
- id: black
2121
language_version: python3
2222
exclude: 'pymathics/hello/version.py'
23-
stages: [commit]
23+
stages: [pre-commit]
2424
- repo: https://github.com/pycqa/flake8
2525
rev: 3.9.2
2626
hooks:
2727
- id: flake8
28-
stages: [commit]
28+
stages: [pre-commit]

pymathics/hello/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
# well as importing into Python. That's why there is no
66
# space around "=" below.
77
# fmt: off
8-
__version__="7.0.0" # noqa
8+
__version__="7.0.1dev0" # noqa

pyproject.toml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
[build-system]
2+
requires = [
3+
"setuptools",
4+
"mpmath>=1.2.0",
5+
"numpy<1.27",
6+
"matplotlib",
7+
"scipy>=1.10.0",
8+
"sympy>=1.11,<1.13",
9+
]
10+
build-backend = "setuptools.build_meta"
11+
12+
[project]
13+
name = "Mathics3-hello"
14+
description = 'Mathics3 Hello, World! module'
15+
dependencies = [
16+
"Mathics3-Module-Base",
17+
]
18+
requires-python = ">=3.10"
19+
readme = "README.rst"
20+
license = {text = "GPL"}
21+
keywords = ["Mathematica", "Wolfram", "Interpreter", "Shell", "Math", "CAS"]
22+
maintainers = [
23+
{name = "Mathics Group", email = "[email protected]"},
24+
]
25+
classifiers = [
26+
"Intended Audience :: Developers",
27+
"Intended Audience :: Science/Research",
28+
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
29+
"Programming Language :: Python",
30+
"Programming Language :: Python :: 3.10",
31+
"Programming Language :: Python :: 3.11",
32+
"Programming Language :: Python :: 3.12",
33+
"Programming Language :: Python :: 3.13",
34+
"Programming Language :: Python :: Implementation :: CPython",
35+
"Programming Language :: Python :: Implementation :: PyPy",
36+
"Topic :: Scientific/Engineering",
37+
"Topic :: Scientific/Engineering :: Mathematics",
38+
"Topic :: Software Development :: Interpreters",
39+
]
40+
dynamic = ["version"]
41+
42+
[project.urls]
43+
Homepage = "https://github.com/Mathics3/pymathics-hello"
44+
Downloads = "https://github.com/Mathics3/pymathics-hello/releases"
45+
46+
[project.optional-dependencies]
47+
dev = [
48+
"pytest",
49+
]
50+
51+
[tool.setuptools]
52+
packages = [
53+
"pymathics.hello",
54+
]
55+
56+
[tool.setuptools.dynamic]
57+
version = {attr = "pymathics.hello.__version__"}

setup.py

Lines changed: 0 additions & 59 deletions
This file was deleted.

0 commit comments

Comments
 (0)