Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
1 change: 1 addition & 0 deletions .github/workflows/ci_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ jobs:
. venv-pySDC/bin/activate
pip install -e /repositories/pySDC
pip install qmat
pip install pytest-isolate-mpi
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be added as a test dependency, directly in the pyproject.toml file, I beleive (see https://github.com/Parallel-in-Time/qmat/blob/4919f197bac230a27f8ccea4188645cb53fefd0a/pyproject.toml#L34) ... also, qmat should already be installed when installing pySDC

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I disagree. We still want environments without MPI after all.

Copy link
Member

@tlunet tlunet May 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hence the idea of optional dependencies defined in the pyproject.toml file. You could create a gusto one or a gusto-test, etc ... and simply install using :

pip install -e ./repositories/pySDC[gusto]

which would install the base dependencies, + the optional ones (cf here). It makes the pipeline way cleaner, and centralizes the dependencies in the pyproject.toml, which allows a better control for local or CI tests ...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can think of adding MPI dependencies there, but I don't really see the point, tbh. I prefer this way where the setup of the container and what goes into the container is all together. Outside of the testing pipeline people are not going to use the container and will not need the testing thing.

Also, turns out the test is flaky somehow and adding pytest-isolate-mpi did not at all fix it. This is pretty annoying :D

Copy link
Member

@tlunet tlunet May 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then, my guess is that you can remove this and the pip install qmat 😛 (stop the unnecessary code spamming ...)

# test installation
python -c "import pySDC; print(f'pySDC module: {pySDC}')"
- name: Install gusto
Expand Down
6 changes: 3 additions & 3 deletions pySDC/helpers/plot_helper.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import matplotlib as mpl
import matplotlib.pyplot as plt
from distutils.spawn import find_executable
import shutil

default_mpl_params = mpl.rcParams.copy()

Expand Down Expand Up @@ -100,7 +100,7 @@ def setup_mpl(font_size=8, reset=False):

mpl.rcParams.update(style_options)

if find_executable('latex'):
if shutil.which('latex'):
latex_support = {
"pgf.texsystem": "pdflatex", # change this if using xetex or lautex
"text.usetex": True, # use LaTeX to write all text
Expand All @@ -125,7 +125,7 @@ def newfig(textwidth, scale, ratio=0.6180339887):


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')
if save_pdf:
plt.savefig('{}.pdf'.format(filename), bbox_inches='tight')
Expand Down
4 changes: 4 additions & 0 deletions pySDC/tests/test_benchmarks/test_collocation.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def wrapper():
benchmark(wrapper)


@pytest.mark.base
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tlunet, do you agree with this markers? I don't think we need to run these tests in all environments. They are throwing some numpy deprecation warnings at the moment, which we will need to deal with someday.

Copy link
Member

@tlunet tlunet May 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are necessary. You just need to replace in the first assertion the == between arrays by some np.allclose (as the warning is suggesting ?)

EDIT : nvm, missread ...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a polynomial deprecation warrning ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't pay much attention to the warning, tbh. For now, I just want to run these tests only in the base environment and not in every environment.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, then that's fine indeed ... sorry I didn't realized that was an addition 😅

@pytest.mark.parametrize("node_type", node_types)
@pytest.mark.parametrize("quad_type", quad_types)
def test_canintegratepolynomials(node_type, quad_type):
Expand Down Expand Up @@ -61,6 +62,7 @@ def test_canintegratepolynomials(node_type, quad_type):
)


@pytest.mark.base
@pytest.mark.parametrize("node_type", node_types)
@pytest.mark.parametrize("quad_type", quad_types)
def test_relateQandSmat(node_type, quad_type):
Expand All @@ -82,6 +84,7 @@ def test_relateQandSmat(node_type, quad_type):
)


@pytest.mark.base
@pytest.mark.parametrize("node_type", node_types)
@pytest.mark.parametrize("quad_type", quad_types)
def test_partialquadraturewithQ(node_type, quad_type):
Expand All @@ -104,6 +107,7 @@ def test_partialquadraturewithQ(node_type, quad_type):
)


@pytest.mark.base
@pytest.mark.parametrize("node_type", node_types)
@pytest.mark.parametrize("quad_type", quad_types)
def test_partialquadraturewithS(node_type, quad_type):
Expand Down
Loading