Skip to content

Commit 1e5a8a2

Browse files
authored
Initial commit
0 parents  commit 1e5a8a2

22 files changed

+1842
-0
lines changed

.editorconfig

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
insert_final_newline = true
6+
charset = utf-8
7+
indent_style = tab
8+
indent_size = 4
9+
10+
[*.yml]
11+
indent_style = space
12+
indent_size = 2
13+
14+
[*.py]
15+
indent_style = space
16+
indent_size = 4
17+
trim_trailing_whitespace: true

.github/workflows/MSWindows.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Mathics3-Module-hello (MS Windows)
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: '**'
8+
9+
jobs:
10+
build:
11+
runs-on: windows-latest
12+
strategy:
13+
matrix:
14+
os: [windows]
15+
python-version: ['3.12', '3.13']
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Set up Python ${{ matrix.python-version }}
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
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
34+
run: |
35+
python -m pip install Mathics3
36+
python -m pip install --no-build-isolation -e .
37+
- name: Test Mathics
38+
run: |
39+
make check

.github/workflows/MacOS.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Mathics3 Module hello (macOS)
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: '**'
8+
9+
jobs:
10+
build:
11+
runs-on: macos-latest
12+
strategy:
13+
matrix:
14+
os: [macOS]
15+
python-version: ['3.12', '3.13']
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Set up Python ${{ matrix.python-version }}
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
- name: Install dependencies
23+
run: |
24+
brew install llvm
25+
python -m pip install --upgrade pip
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
34+
run: |
35+
python -m pip install Mathics3
36+
python -m pip install --no-build-isolation -e .
37+
- name: Test Mathics3 Hello Module
38+
run: |
39+
make check

.github/workflows/Ubuntu.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Mathics3-Module-hello (ubuntu)
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: '**'
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ['3.12', '3.13']
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Set up Python ${{ matrix.python-version }}
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
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
32+
run: |
33+
python -m pip install Mathics3
34+
python -m pip install --no-build-isolation -e .
35+
- name: Test Mathics3 Hello Module
36+
run: |
37+
make check

.github/workflows/autoblack.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# GitHub Action that uses Black to reformat the Python code in an incoming pull request.
2+
# If all Python code in the pull request is compliant with Black then this Action does nothing.
3+
# Othewrwise, Black is run and its changes are committed back to the incoming pull request.
4+
# https://github.com/cclauss/autoblack
5+
6+
name: autoblack
7+
on: [pull_request]
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Set up Python 3.11
14+
uses: actions/setup-python@v5
15+
with:
16+
python-version: 3.11
17+
- name: Install click, black and isort
18+
run: pip install 'click==8.2.1' 'black==25.11.0' 'isort==5.13.2'
19+
- name: Run isort --check .
20+
run: isort --check .
21+
- name: Run black --check --diff .
22+
run: black --check --diff .
23+
- name: If needed, commit black changes to the pull request
24+
if: failure()
25+
run: |
26+
black .
27+
git config --global user.name 'autoblack'
28+
git config --global user.email 'rocky@users.noreply.github.com'
29+
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
30+
git checkout $GITHUB_HEAD_REF
31+
git commit -am "fixup: Format Python code with Black"
32+
git push

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
*~
2+
/.python-version
3+
/ChangeLog
4+
/ChangeLog-spell-corrected
5+
/ChangeLog.orig
6+
/Mathics3_Module_hello.egg-info
7+
/Mathics3_hello.egg-info
8+
/build
9+
/dist
10+
/tmp
11+
__pycache__

.pre-commit-config.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
default_language_version:
2+
python: python
3+
repos:
4+
- repo: https://github.com/pre-commit/pre-commit-hooks
5+
rev: v4.5.0
6+
hooks:
7+
- id: check-merge-conflict
8+
- id: debug-statements
9+
stages: [pre-commit]
10+
exclude: ChangeLog-spell-corrected.diff
11+
- id: end-of-file-fixer
12+
stages: [pre-commit]
13+
exclude: ChangeLog-spell-corrected.diff
14+
- repo: https://github.com/pycqa/isort
15+
rev: 5.13.2
16+
hooks:
17+
- id: isort
18+
stages: [pre-commit]
19+
- repo: https://github.com/psf/black
20+
rev: 25.11.0
21+
hooks:
22+
- id: black
23+
language_version: python3
24+
exclude: 'pymathics/hello/version.py'
25+
stages: [pre-commit]

0 commit comments

Comments
 (0)