Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pySDC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
atml-ati
pySDC
Commits
1b5b2dcf
Unverified
Commit
1b5b2dcf
authored
1 month ago
by
Thomas Baumann
Committed by
GitHub
1 month ago
Browse files
Options
Downloads
Patches
Plain Diff
Make plot helper compatible with Python 3.13 (#549)
parent
8f9bf8c6
No related branches found
No related tags found
No related merge requests found
Pipeline
#283021
passed
4 weeks ago
Stage: benchmark
Changes
2
Pipelines
4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
pySDC/helpers/plot_helper.py
+3
-3
3 additions, 3 deletions
pySDC/helpers/plot_helper.py
pySDC/tests/test_benchmarks/test_collocation.py
+4
-0
4 additions, 0 deletions
pySDC/tests/test_benchmarks/test_collocation.py
with
7 additions
and
3 deletions
pySDC/helpers/plot_helper.py
+
3
−
3
View file @
1b5b2dcf
import
matplotlib
as
mpl
import
matplotlib
as
mpl
import
matplotlib.pyplot
as
plt
import
matplotlib.pyplot
as
plt
from
distutils.spawn
import
find_executable
import
shutil
default_mpl_params
=
mpl
.
rcParams
.
copy
()
default_mpl_params
=
mpl
.
rcParams
.
copy
()
...
@@ -100,7 +100,7 @@ def setup_mpl(font_size=8, reset=False):
...
@@ -100,7 +100,7 @@ def setup_mpl(font_size=8, reset=False):
mpl
.
rcParams
.
update
(
style_options
)
mpl
.
rcParams
.
update
(
style_options
)
if
find_executable
(
'
latex
'
):
if
shutil
.
which
(
'
latex
'
):
latex_support
=
{
latex_support
=
{
"
pgf.texsystem
"
:
"
pdflatex
"
,
# change this if using xetex or lautex
"
pgf.texsystem
"
:
"
pdflatex
"
,
# change this if using xetex or lautex
"
text.usetex
"
:
True
,
# use LaTeX to write all text
"
text.usetex
"
:
True
,
# use LaTeX to write all text
...
@@ -125,7 +125,7 @@ def newfig(textwidth, scale, ratio=0.6180339887):
...
@@ -125,7 +125,7 @@ def newfig(textwidth, scale, ratio=0.6180339887):
def
savefig
(
filename
,
save_pdf
=
True
,
save_pgf
=
True
,
save_png
=
True
):
def
savefig
(
filename
,
save_pdf
=
True
,
save_pgf
=
True
,
save_png
=
True
):
if
save_pgf
and
find_executable
(
'
latex
'
):
if
save_pgf
and
shutil
.
which
(
'
latex
'
):
plt
.
savefig
(
'
{}.pgf
'
.
format
(
filename
),
bbox_inches
=
'
tight
'
)
plt
.
savefig
(
'
{}.pgf
'
.
format
(
filename
),
bbox_inches
=
'
tight
'
)
if
save_pdf
:
if
save_pdf
:
plt
.
savefig
(
'
{}.pdf
'
.
format
(
filename
),
bbox_inches
=
'
tight
'
)
plt
.
savefig
(
'
{}.pdf
'
.
format
(
filename
),
bbox_inches
=
'
tight
'
)
...
...
This diff is collapsed.
Click to expand it.
pySDC/tests/test_benchmarks/test_collocation.py
+
4
−
0
View file @
1b5b2dcf
...
@@ -25,6 +25,7 @@ def test_benchmark_collocation(benchmark):
...
@@ -25,6 +25,7 @@ def test_benchmark_collocation(benchmark):
benchmark
(
wrapper
)
benchmark
(
wrapper
)
@pytest.mark.base
@pytest.mark.parametrize
(
"
node_type
"
,
node_types
)
@pytest.mark.parametrize
(
"
node_type
"
,
node_types
)
@pytest.mark.parametrize
(
"
quad_type
"
,
quad_types
)
@pytest.mark.parametrize
(
"
quad_type
"
,
quad_types
)
def
test_canintegratepolynomials
(
node_type
,
quad_type
):
def
test_canintegratepolynomials
(
node_type
,
quad_type
):
...
@@ -61,6 +62,7 @@ def test_canintegratepolynomials(node_type, quad_type):
...
@@ -61,6 +62,7 @@ def test_canintegratepolynomials(node_type, quad_type):
)
)
@pytest.mark.base
@pytest.mark.parametrize
(
"
node_type
"
,
node_types
)
@pytest.mark.parametrize
(
"
node_type
"
,
node_types
)
@pytest.mark.parametrize
(
"
quad_type
"
,
quad_types
)
@pytest.mark.parametrize
(
"
quad_type
"
,
quad_types
)
def
test_relateQandSmat
(
node_type
,
quad_type
):
def
test_relateQandSmat
(
node_type
,
quad_type
):
...
@@ -82,6 +84,7 @@ def test_relateQandSmat(node_type, quad_type):
...
@@ -82,6 +84,7 @@ def test_relateQandSmat(node_type, quad_type):
)
)
@pytest.mark.base
@pytest.mark.parametrize
(
"
node_type
"
,
node_types
)
@pytest.mark.parametrize
(
"
node_type
"
,
node_types
)
@pytest.mark.parametrize
(
"
quad_type
"
,
quad_types
)
@pytest.mark.parametrize
(
"
quad_type
"
,
quad_types
)
def
test_partialquadraturewithQ
(
node_type
,
quad_type
):
def
test_partialquadraturewithQ
(
node_type
,
quad_type
):
...
@@ -104,6 +107,7 @@ def test_partialquadraturewithQ(node_type, quad_type):
...
@@ -104,6 +107,7 @@ def test_partialquadraturewithQ(node_type, quad_type):
)
)
@pytest.mark.base
@pytest.mark.parametrize
(
"
node_type
"
,
node_types
)
@pytest.mark.parametrize
(
"
node_type
"
,
node_types
)
@pytest.mark.parametrize
(
"
quad_type
"
,
quad_types
)
@pytest.mark.parametrize
(
"
quad_type
"
,
quad_types
)
def
test_partialquadraturewithS
(
node_type
,
quad_type
):
def
test_partialquadraturewithS
(
node_type
,
quad_type
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment