Skip to content

Commit eebe5db

Browse files
authored
Merge pull request #1 from mmatera/ruff
ruff
2 parents fd71c0b + 8a6d5f1 commit eebe5db

File tree

16 files changed

+886
-63
lines changed

16 files changed

+886
-63
lines changed

.github/workflows/MSWindows.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,16 @@ jobs:
2424
python -m pip install --upgrade pip
2525
python -m pip install pytest
2626
# 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
27+
git clone --depth 1 https://github.com/Mathics3/mathics-scanner.git
28+
cd mathics-scanner
29+
pip install -e .
30+
bash -x admin-tools/make-JSON-tables.sh
31+
cd ..
32+
git clone https://github.com/Mathics3/mathics-core
33+
cd mathics-core
34+
pip3 install -e .[full]
35+
bash -x admin-tools/make-JSON-tables.sh
36+
cd ..
3337
- name: Install Mathic3 vectorizedplot Module
3438
run: |
3539
python -m pip install Mathics3

.github/workflows/MacOS.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,14 @@ jobs:
2525
python -m pip install --upgrade pip
2626
python -m pip install pytest
2727
# # 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
28+
git clone --depth 1 https://github.com/Mathics3/mathics-scanner.git
29+
cd mathics-scanner/
30+
pip install -e .
31+
bash -x admin-tools/make-JSON-tables.sh
32+
cd ..
33+
git clone https://github.com/Mathics3/mathics-core
34+
(cd mathics-core && pip3 install -e .[full])
35+
(cd mathics-core && bash ./admin-tools/make-JSON-tables.sh)
3336
- name: Install Mathic3 vectorizedplot Module
3437
run: |
3538
python -m pip install Mathics3

.github/workflows/autoblack.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@ jobs:
1616
python-version: 3.11
1717
- name: Install click, black and isort
1818
run: pip install 'click==8.2.1' 'black==25.11.0' 'isort==5.13.2'
19-
- name: Run isort --check .
20-
run: isort --check .
2119
- name: Run black --check --diff .
2220
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
21+
- name: Run isort --check --diff .
22+
run: isort --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

pymathics/vectorizedplot/__init__.py

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,25 @@
2222
</ul>
2323
"""
2424

25-
2625
from pymathics.vectorizedplot.version import __version__
26+
27+
# The try block is needed because at installation time, dependencies are not
28+
# available. After the installation is successfull, we want to make this availabe.
2729
try:
28-
from pymathics.vectorizedplot.plot_plot3d import ContourPlot3D, ParametricPlot3D, SphericalPlot3D
30+
from pymathics.vectorizedplot.plot_plot3d import (
31+
ContourPlot3D,
32+
ParametricPlot3D,
33+
SphericalPlot3D,
34+
)
2935

30-
__all__ = (
36+
_BUILTINS_ = (
3137
"ContourPlot3D",
3238
"ParametricPlot3D",
3339
"SphericalPlot3D",
34-
"__version__",
35-
"pymathics_version_data"
3640
)
3741
except ModuleNotFoundError:
38-
__all__ = (
39-
"__version__",
40-
"pymathics_version_data"
41-
)
42+
_BUILTINS_ = tuple()
43+
4244

4345
# To be recognized as an external mathics module, the following variable
4446
# is required:
@@ -53,3 +55,7 @@
5355
sort_order = "mathics.builtin.plotting-graphing-and-drawing"
5456

5557

58+
__all__ = tuple(_BUILTINS_) + (
59+
"__version__",
60+
"pymathics_version_data",
61+
)

pymathics/vectorizedplot/eval/colors.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from typing import Optional
77

88
import palettable
9-
109
from mathics.core.atoms import Integer0, Integer1, MachineReal, String
1110
from mathics.core.convert.expression import to_expression
1211
from mathics.core.element import BaseElement

0 commit comments

Comments
 (0)