Skip to content

Conversation

@max-models
Copy link
Member

@max-models max-models commented Oct 24, 2025

Solves the following issue(s):

Closes #45

Core changes:

None

Model-specific changes:

None

Documentation changes:

None

@max-models max-models linked an issue Oct 24, 2025 that may be closed by this pull request
@max-models
Copy link
Member Author

max-models commented Oct 26, 2025

It seems like the -k flag isn't working well with --testmon. When running the unit tests twice it still runs all of them unless I remove the -k flag. One option would be to categorize the tests in separate subdirectories instead and use --ignore=<PATH> to specify whether to run unit tests or model tests. I think it would be nice to organize the tests in src/struphy/tests with some subdirectories

@max-models
Copy link
Member Author

Seems like testmon might be problematic for MPI tests https://github.com/struphy-hub/struphy/actions/runs/18819880612/job/53694176303

from psydac.linalg.solvers import inverse

from struphy.linear_algebra.tests.test_saddlepoint_massmatrices import _plot_residual_norms
from struphy.tests.unit.linear_algebra.test_saddlepoint_massmatrices import _plot_residual_norms
Copy link
Member Author

Choose a reason for hiding this comment

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

I find it a bit odd to import a plotting function from a testing file, should it not be the opposite way around?

Copy link
Member

Choose a reason for hiding this comment

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

Yes i agree, please correct.

@spossann
Copy link
Member

It seems like the -k flag isn't working well with --testmon. When running the unit tests twice it still runs all of them unless I remove the -k flag. One option would be to categorize the tests in separate subdirectories instead and use --ignore=<PATH> to specify whether to run unit tests or model tests. I think it would be nice to organize the tests in src/struphy/tests with some subdirectories

We can remove the -k flag, move test_models.py and all test_verif_.py to a separate folder and use --ignore. I am against collecting all tests in one struphy/tests/ folder if not really necessary; it is much clearer when the test are next to the code they test.

@spossann
Copy link
Member

Seems like testmon might be problematic for MPI tests https://github.com/struphy-hub/struphy/actions/runs/18819880612/job/53694176303

If this problem persists, we can try to shorten the mpi unit tests (using pytest.mark.mpi), for example by replacing the long convergence tests by simpler non-parameter-scan tests.

@max-models
Copy link
Member Author

Seems like testmon might be problematic for MPI tests https://github.com/struphy-hub/struphy/actions/runs/18819880612/job/53694176303

If this problem persists, we can try to shorten the mpi unit tests (using pytest.mark.mpi), for example by replacing the long convergence tests by simpler non-parameter-scan tests.

This could be an option, but I think I can resolve it by only using --testmon to collect the tests which needs to be executed and then only running those, so we would do it in two steps: 1) filter test, 2) execute filtered tests. Now we do both of these in one go, and that seems not to work with --testmon.

@max-models
Copy link
Member Author

Moved to #96

@max-models max-models closed this Oct 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Only run the unit tests which touch changed code in the CI

3 participants