From 07a5861ef55ccca7bac117daf150fdea9f80492c Mon Sep 17 00:00:00 2001 From: Jakob Fritz Date: Mon, 29 Apr 2024 14:39:49 +0200 Subject: [PATCH 01/47] Moved base-tests into separate job. Tests with special env are kept --- .github/workflows/ci_pipeline.yml | 67 ++++++++++++++++++++++++++++++- 1 file changed, 65 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_pipeline.yml b/.github/workflows/ci_pipeline.yml index e9b59cb75b..0a7691efcb 100644 --- a/.github/workflows/ci_pipeline.yml +++ b/.github/workflows/ci_pipeline.yml @@ -43,7 +43,7 @@ jobs: strategy: matrix: python: ['3.8', '3.9', '3.10'] - env: ['base', 'fenics', 'mpi4py', 'petsc'] + env: ['fenics', 'mpi4py', 'petsc'] defaults: run: @@ -65,7 +65,70 @@ jobs: echo "print('Loading sitecustomize.py...') import coverage coverage.process_startup() " > sitecustomize.py - coverage run -m pytest --continue-on-collection-errors -v --durations=0 pySDC/tests -m ${{ matrix.env }} + coverage run -m pytest --continue-on-collection-errors -v --durations=0 pySDC/tests pySDC/projects/*/tests -m ${{ matrix.env }} + + - name: Make coverage report + run: | + mv data data_${{ matrix.python }} + coverage combine + mv .coverage coverage_${{ matrix.env }}_${{ matrix.python }}.dat + + - name: Uploading artifacts + uses: actions/upload-artifact@v3 + if: matrix.python == '3.10' + with: + name: cpu-test-artifacts + path: | + data_3.10 + coverage_${{ matrix.env }}_3.10.dat + + project_cpu_tests_linux: + runs-on: ubuntu-latest + + strategy: + matrix: + python: ['3.8', '3.9', '3.10'] + env: + - AllenCahn_Bayreuth + - AsympConv + - compression + - DAE + - FastWaveSlowWave + - GPU + - Hamiltonian + - matrixPFASST + - Monodomain + - parallelSDC + - parallelSDC_reloaded + - PinTSimE + - RDC + - Resilience + - SDC_showdown + - Second_orderSDC + - soft_failure + - TOMS + + defaults: + run: + shell: bash -l {0} + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Install Conda environment with Micromamba + uses: mamba-org/setup-micromamba@v1 + with: + environment-file: "etc/environment-base.yml" + create-args: >- + python=${{ matrix.python }} + + - name: Run pytest for CPU stuff + run: | + echo "print('Loading sitecustomize.py...') + import coverage + coverage.process_startup() " > sitecustomize.py + coverage run -m pytest --continue-on-collection-errors -v --durations=0 pySDC/projects/${{ matrix.env }}/tests -m base - name: Make coverage report run: | From 8bfe003c4a74a06ac5d4a2636fcc22364b60afe4 Mon Sep 17 00:00:00 2001 From: Jakob Fritz Date: Mon, 29 Apr 2024 14:40:07 +0200 Subject: [PATCH 02/47] Moved test-files into project dirs --- .../AllenCahn_Bayreuth/tests}/__init__.py | 0 .../AllenCahn_Bayreuth/tests}/test_simple_forcing.py | 0 .../AllenCahn_Bayreuth/tests}/test_temp_forcing.py | 0 .../test_AC => projects/AsympConv/tests}/__init__.py | 0 .../test_asympconv => projects/AsympConv/tests}/test_PFASST.py | 0 .../test_projects/test_DAE => projects/DAE/tests}/test_DAEMesh.py | 0 .../test_DAE => projects/DAE/tests}/test_HookClass_DAE.py | 0 .../test_DAE => projects/DAE/tests}/test_SemiImplicitDAE.py | 0 .../test_DAE => projects/DAE/tests}/test_convergence.py | 0 .../test_DAE => projects/DAE/tests}/test_fully_implicit_DAE.py | 0 .../test_DAE => projects/DAE/tests}/test_iteration.py | 0 .../test_DAE => projects/DAE/tests}/test_playground.py | 0 .../test_DAE => projects/DAE/tests}/test_problems.py | 0 .../test_RDC => projects/FastWaveSlowWave/tests}/__init__.py | 0 .../FastWaveSlowWave/tests}/test_acoustic.py | 0 .../FastWaveSlowWave/tests}/test_boussinesq.py | 0 .../test_fwsw => projects/FastWaveSlowWave/tests}/test_fwsw.py | 0 .../test_SDC_showdown => projects/GPU/tests}/__init__.py | 0 .../test_projects/test_gpu => projects/GPU/tests}/test_ac.py | 0 .../test_projects/test_gpu => projects/GPU/tests}/test_heat.py | 0 .../test_TOMS => projects/Hamiltonian/tests}/__init__.py | 0 .../test_hamiltonian => projects/Hamiltonian/tests}/test_fput.py | 0 .../Hamiltonian/tests}/test_simple.py | 0 .../test_hamiltonian => projects/Hamiltonian/tests}/test_solar.py | 0 .../Monodomain/tests}/test_monodomain_convergence.py | 0 .../Monodomain/tests}/test_monodomain_iterations.py | 0 .../Monodomain/tests}/test_monodomain_iterations_parallel.py | 0 .../Monodomain/tests}/test_monodomain_stability_domain.py | 0 .../PinTSimE/tests}/test_SwitchEstimator.py | 0 .../PinTSimE/tests}/test_battery_model.py | 0 .../test_pintsime => projects/PinTSimE/tests}/test_buck_model.py | 0 .../PinTSimE/tests}/test_discontinuous_test_ODE.py | 0 .../PinTSimE/tests}/test_estimation_check.py | 0 .../PinTSimE/tests}/test_piline_model.py | 0 .../test_asympconv => projects/RDC/tests}/__init__.py | 0 .../test_RDC => projects/RDC/tests}/test_MLRDC_PFASST.py | 0 .../test_compression => projects/Resilience/tests}/__init__.py | 0 .../Resilience/tests}/test_FD_eigenvalues.py | 0 .../test_resilience => projects/Resilience/tests}/test_Lorenz.py | 0 .../Resilience/tests}/test_adaptive_collocation.py | 0 .../Resilience/tests}/test_efficient_sweepers.py | 0 .../Resilience/tests}/test_fault_injection.py | 0 .../test_resilience => projects/Resilience/tests}/test_order.py | 0 .../test_resilience => projects/Resilience/tests}/test_piline.py | 0 .../test_resilience => projects/Resilience/tests}/test_quench.py | 0 .../Resilience/tests}/test_schroedinger.py | 0 .../Resilience/tests}/test_strategies.py | 0 .../test_resilience => projects/Resilience/tests}/test_vdp.py | 0 .../test_fwsw => projects/SDC_showdown/tests}/__init__.py | 0 .../SDC_showdown/tests}/test_fisher.py | 0 .../SDC_showdown/tests}/test_grayscott.py | 0 .../test_gpu => projects/Second_orderSDC/tests}/__init__.py | 0 .../Second_orderSDC/tests}/test_convergence.py | 0 .../Second_orderSDC/tests}/test_stability.py | 0 .../test_hamiltonian => projects/TOMS/tests}/__init__.py | 0 .../TOMS/tests}/test_AllenCahn_contracting_circle.py | 0 .../TOMS/tests}/test_visualize_pySDC_with_PETSc.py | 0 .../test_matrixPFASST => projects/compression/tests}/__init__.py | 0 .../compression/tests}/test_proof_of_concept.py | 0 .../test_parallelSDC => projects/matrixPFASST/tests}/__init__.py | 0 .../matrixPFASST/tests}/test_controllers.py | 0 .../test_resilience => projects/parallelSDC/tests}/__init__.py | 0 .../parallelSDC/tests}/test_AllenCahn_parallel.py | 0 .../parallelSDC/tests}/test_fisher.py | 0 .../parallelSDC/tests}/test_preconditioner.py | 0 .../parallelSDC/tests}/test_preconditioner_MPI.py | 0 .../parallelSDC_reloaded/tests}/__init__.py | 0 .../parallelSDC_reloaded/tests}/test_parallelSDC_reloaded.py | 0 .../test_soft_failure => projects/soft_failure/tests}/__init__.py | 0 .../soft_failure/tests}/test_generate_statistics.py | 0 70 files changed, 0 insertions(+), 0 deletions(-) rename pySDC/{tests/test_projects => projects/AllenCahn_Bayreuth/tests}/__init__.py (100%) rename pySDC/{tests/test_projects/test_AC => projects/AllenCahn_Bayreuth/tests}/test_simple_forcing.py (100%) rename pySDC/{tests/test_projects/test_AC => projects/AllenCahn_Bayreuth/tests}/test_temp_forcing.py (100%) rename pySDC/{tests/test_projects/test_AC => projects/AsympConv/tests}/__init__.py (100%) rename pySDC/{tests/test_projects/test_asympconv => projects/AsympConv/tests}/test_PFASST.py (100%) rename pySDC/{tests/test_projects/test_DAE => projects/DAE/tests}/test_DAEMesh.py (100%) rename pySDC/{tests/test_projects/test_DAE => projects/DAE/tests}/test_HookClass_DAE.py (100%) rename pySDC/{tests/test_projects/test_DAE => projects/DAE/tests}/test_SemiImplicitDAE.py (100%) rename pySDC/{tests/test_projects/test_DAE => projects/DAE/tests}/test_convergence.py (100%) rename pySDC/{tests/test_projects/test_DAE => projects/DAE/tests}/test_fully_implicit_DAE.py (100%) rename pySDC/{tests/test_projects/test_DAE => projects/DAE/tests}/test_iteration.py (100%) rename pySDC/{tests/test_projects/test_DAE => projects/DAE/tests}/test_playground.py (100%) rename pySDC/{tests/test_projects/test_DAE => projects/DAE/tests}/test_problems.py (100%) rename pySDC/{tests/test_projects/test_RDC => projects/FastWaveSlowWave/tests}/__init__.py (100%) rename pySDC/{tests/test_projects/test_fwsw => projects/FastWaveSlowWave/tests}/test_acoustic.py (100%) rename pySDC/{tests/test_projects/test_fwsw => projects/FastWaveSlowWave/tests}/test_boussinesq.py (100%) rename pySDC/{tests/test_projects/test_fwsw => projects/FastWaveSlowWave/tests}/test_fwsw.py (100%) rename pySDC/{tests/test_projects/test_SDC_showdown => projects/GPU/tests}/__init__.py (100%) rename pySDC/{tests/test_projects/test_gpu => projects/GPU/tests}/test_ac.py (100%) rename pySDC/{tests/test_projects/test_gpu => projects/GPU/tests}/test_heat.py (100%) rename pySDC/{tests/test_projects/test_TOMS => projects/Hamiltonian/tests}/__init__.py (100%) rename pySDC/{tests/test_projects/test_hamiltonian => projects/Hamiltonian/tests}/test_fput.py (100%) rename pySDC/{tests/test_projects/test_hamiltonian => projects/Hamiltonian/tests}/test_simple.py (100%) rename pySDC/{tests/test_projects/test_hamiltonian => projects/Hamiltonian/tests}/test_solar.py (100%) rename pySDC/{tests/test_projects/test_monodomain => projects/Monodomain/tests}/test_monodomain_convergence.py (100%) rename pySDC/{tests/test_projects/test_monodomain => projects/Monodomain/tests}/test_monodomain_iterations.py (100%) rename pySDC/{tests/test_projects/test_monodomain => projects/Monodomain/tests}/test_monodomain_iterations_parallel.py (100%) rename pySDC/{tests/test_projects/test_monodomain => projects/Monodomain/tests}/test_monodomain_stability_domain.py (100%) rename pySDC/{tests/test_projects/test_pintsime => projects/PinTSimE/tests}/test_SwitchEstimator.py (100%) rename pySDC/{tests/test_projects/test_pintsime => projects/PinTSimE/tests}/test_battery_model.py (100%) rename pySDC/{tests/test_projects/test_pintsime => projects/PinTSimE/tests}/test_buck_model.py (100%) rename pySDC/{tests/test_projects/test_pintsime => projects/PinTSimE/tests}/test_discontinuous_test_ODE.py (100%) rename pySDC/{tests/test_projects/test_pintsime => projects/PinTSimE/tests}/test_estimation_check.py (100%) rename pySDC/{tests/test_projects/test_pintsime => projects/PinTSimE/tests}/test_piline_model.py (100%) rename pySDC/{tests/test_projects/test_asympconv => projects/RDC/tests}/__init__.py (100%) rename pySDC/{tests/test_projects/test_RDC => projects/RDC/tests}/test_MLRDC_PFASST.py (100%) rename pySDC/{tests/test_projects/test_compression => projects/Resilience/tests}/__init__.py (100%) rename pySDC/{tests/test_projects/test_resilience => projects/Resilience/tests}/test_FD_eigenvalues.py (100%) rename pySDC/{tests/test_projects/test_resilience => projects/Resilience/tests}/test_Lorenz.py (100%) rename pySDC/{tests/test_projects/test_resilience => projects/Resilience/tests}/test_adaptive_collocation.py (100%) rename pySDC/{tests/test_projects/test_resilience => projects/Resilience/tests}/test_efficient_sweepers.py (100%) rename pySDC/{tests/test_projects/test_resilience => projects/Resilience/tests}/test_fault_injection.py (100%) rename pySDC/{tests/test_projects/test_resilience => projects/Resilience/tests}/test_order.py (100%) rename pySDC/{tests/test_projects/test_resilience => projects/Resilience/tests}/test_piline.py (100%) rename pySDC/{tests/test_projects/test_resilience => projects/Resilience/tests}/test_quench.py (100%) rename pySDC/{tests/test_projects/test_resilience => projects/Resilience/tests}/test_schroedinger.py (100%) rename pySDC/{tests/test_projects/test_resilience => projects/Resilience/tests}/test_strategies.py (100%) rename pySDC/{tests/test_projects/test_resilience => projects/Resilience/tests}/test_vdp.py (100%) rename pySDC/{tests/test_projects/test_fwsw => projects/SDC_showdown/tests}/__init__.py (100%) rename pySDC/{tests/test_projects/test_SDC_showdown => projects/SDC_showdown/tests}/test_fisher.py (100%) rename pySDC/{tests/test_projects/test_SDC_showdown => projects/SDC_showdown/tests}/test_grayscott.py (100%) rename pySDC/{tests/test_projects/test_gpu => projects/Second_orderSDC/tests}/__init__.py (100%) rename pySDC/{tests/test_projects/test_second_orderSDC => projects/Second_orderSDC/tests}/test_convergence.py (100%) rename pySDC/{tests/test_projects/test_second_orderSDC => projects/Second_orderSDC/tests}/test_stability.py (100%) rename pySDC/{tests/test_projects/test_hamiltonian => projects/TOMS/tests}/__init__.py (100%) rename pySDC/{tests/test_projects/test_TOMS => projects/TOMS/tests}/test_AllenCahn_contracting_circle.py (100%) rename pySDC/{tests/test_projects/test_TOMS => projects/TOMS/tests}/test_visualize_pySDC_with_PETSc.py (100%) rename pySDC/{tests/test_projects/test_matrixPFASST => projects/compression/tests}/__init__.py (100%) rename pySDC/{tests/test_projects/test_compression => projects/compression/tests}/test_proof_of_concept.py (100%) rename pySDC/{tests/test_projects/test_parallelSDC => projects/matrixPFASST/tests}/__init__.py (100%) rename pySDC/{tests/test_projects/test_matrixPFASST => projects/matrixPFASST/tests}/test_controllers.py (100%) rename pySDC/{tests/test_projects/test_resilience => projects/parallelSDC/tests}/__init__.py (100%) rename pySDC/{tests/test_projects/test_parallelSDC => projects/parallelSDC/tests}/test_AllenCahn_parallel.py (100%) rename pySDC/{tests/test_projects/test_parallelSDC => projects/parallelSDC/tests}/test_fisher.py (100%) rename pySDC/{tests/test_projects/test_parallelSDC => projects/parallelSDC/tests}/test_preconditioner.py (100%) rename pySDC/{tests/test_projects/test_parallelSDC => projects/parallelSDC/tests}/test_preconditioner_MPI.py (100%) rename pySDC/{tests/test_projects/test_second_orderSDC => projects/parallelSDC_reloaded/tests}/__init__.py (100%) rename pySDC/{tests/test_projects => projects/parallelSDC_reloaded/tests}/test_parallelSDC_reloaded.py (100%) rename pySDC/{tests/test_projects/test_soft_failure => projects/soft_failure/tests}/__init__.py (100%) rename pySDC/{tests/test_projects/test_soft_failure => projects/soft_failure/tests}/test_generate_statistics.py (100%) diff --git a/pySDC/tests/test_projects/__init__.py b/pySDC/projects/AllenCahn_Bayreuth/tests/__init__.py similarity index 100% rename from pySDC/tests/test_projects/__init__.py rename to pySDC/projects/AllenCahn_Bayreuth/tests/__init__.py diff --git a/pySDC/tests/test_projects/test_AC/test_simple_forcing.py b/pySDC/projects/AllenCahn_Bayreuth/tests/test_simple_forcing.py similarity index 100% rename from pySDC/tests/test_projects/test_AC/test_simple_forcing.py rename to pySDC/projects/AllenCahn_Bayreuth/tests/test_simple_forcing.py diff --git a/pySDC/tests/test_projects/test_AC/test_temp_forcing.py b/pySDC/projects/AllenCahn_Bayreuth/tests/test_temp_forcing.py similarity index 100% rename from pySDC/tests/test_projects/test_AC/test_temp_forcing.py rename to pySDC/projects/AllenCahn_Bayreuth/tests/test_temp_forcing.py diff --git a/pySDC/tests/test_projects/test_AC/__init__.py b/pySDC/projects/AsympConv/tests/__init__.py similarity index 100% rename from pySDC/tests/test_projects/test_AC/__init__.py rename to pySDC/projects/AsympConv/tests/__init__.py diff --git a/pySDC/tests/test_projects/test_asympconv/test_PFASST.py b/pySDC/projects/AsympConv/tests/test_PFASST.py similarity index 100% rename from pySDC/tests/test_projects/test_asympconv/test_PFASST.py rename to pySDC/projects/AsympConv/tests/test_PFASST.py diff --git a/pySDC/tests/test_projects/test_DAE/test_DAEMesh.py b/pySDC/projects/DAE/tests/test_DAEMesh.py similarity index 100% rename from pySDC/tests/test_projects/test_DAE/test_DAEMesh.py rename to pySDC/projects/DAE/tests/test_DAEMesh.py diff --git a/pySDC/tests/test_projects/test_DAE/test_HookClass_DAE.py b/pySDC/projects/DAE/tests/test_HookClass_DAE.py similarity index 100% rename from pySDC/tests/test_projects/test_DAE/test_HookClass_DAE.py rename to pySDC/projects/DAE/tests/test_HookClass_DAE.py diff --git a/pySDC/tests/test_projects/test_DAE/test_SemiImplicitDAE.py b/pySDC/projects/DAE/tests/test_SemiImplicitDAE.py similarity index 100% rename from pySDC/tests/test_projects/test_DAE/test_SemiImplicitDAE.py rename to pySDC/projects/DAE/tests/test_SemiImplicitDAE.py diff --git a/pySDC/tests/test_projects/test_DAE/test_convergence.py b/pySDC/projects/DAE/tests/test_convergence.py similarity index 100% rename from pySDC/tests/test_projects/test_DAE/test_convergence.py rename to pySDC/projects/DAE/tests/test_convergence.py diff --git a/pySDC/tests/test_projects/test_DAE/test_fully_implicit_DAE.py b/pySDC/projects/DAE/tests/test_fully_implicit_DAE.py similarity index 100% rename from pySDC/tests/test_projects/test_DAE/test_fully_implicit_DAE.py rename to pySDC/projects/DAE/tests/test_fully_implicit_DAE.py diff --git a/pySDC/tests/test_projects/test_DAE/test_iteration.py b/pySDC/projects/DAE/tests/test_iteration.py similarity index 100% rename from pySDC/tests/test_projects/test_DAE/test_iteration.py rename to pySDC/projects/DAE/tests/test_iteration.py diff --git a/pySDC/tests/test_projects/test_DAE/test_playground.py b/pySDC/projects/DAE/tests/test_playground.py similarity index 100% rename from pySDC/tests/test_projects/test_DAE/test_playground.py rename to pySDC/projects/DAE/tests/test_playground.py diff --git a/pySDC/tests/test_projects/test_DAE/test_problems.py b/pySDC/projects/DAE/tests/test_problems.py similarity index 100% rename from pySDC/tests/test_projects/test_DAE/test_problems.py rename to pySDC/projects/DAE/tests/test_problems.py diff --git a/pySDC/tests/test_projects/test_RDC/__init__.py b/pySDC/projects/FastWaveSlowWave/tests/__init__.py similarity index 100% rename from pySDC/tests/test_projects/test_RDC/__init__.py rename to pySDC/projects/FastWaveSlowWave/tests/__init__.py diff --git a/pySDC/tests/test_projects/test_fwsw/test_acoustic.py b/pySDC/projects/FastWaveSlowWave/tests/test_acoustic.py similarity index 100% rename from pySDC/tests/test_projects/test_fwsw/test_acoustic.py rename to pySDC/projects/FastWaveSlowWave/tests/test_acoustic.py diff --git a/pySDC/tests/test_projects/test_fwsw/test_boussinesq.py b/pySDC/projects/FastWaveSlowWave/tests/test_boussinesq.py similarity index 100% rename from pySDC/tests/test_projects/test_fwsw/test_boussinesq.py rename to pySDC/projects/FastWaveSlowWave/tests/test_boussinesq.py diff --git a/pySDC/tests/test_projects/test_fwsw/test_fwsw.py b/pySDC/projects/FastWaveSlowWave/tests/test_fwsw.py similarity index 100% rename from pySDC/tests/test_projects/test_fwsw/test_fwsw.py rename to pySDC/projects/FastWaveSlowWave/tests/test_fwsw.py diff --git a/pySDC/tests/test_projects/test_SDC_showdown/__init__.py b/pySDC/projects/GPU/tests/__init__.py similarity index 100% rename from pySDC/tests/test_projects/test_SDC_showdown/__init__.py rename to pySDC/projects/GPU/tests/__init__.py diff --git a/pySDC/tests/test_projects/test_gpu/test_ac.py b/pySDC/projects/GPU/tests/test_ac.py similarity index 100% rename from pySDC/tests/test_projects/test_gpu/test_ac.py rename to pySDC/projects/GPU/tests/test_ac.py diff --git a/pySDC/tests/test_projects/test_gpu/test_heat.py b/pySDC/projects/GPU/tests/test_heat.py similarity index 100% rename from pySDC/tests/test_projects/test_gpu/test_heat.py rename to pySDC/projects/GPU/tests/test_heat.py diff --git a/pySDC/tests/test_projects/test_TOMS/__init__.py b/pySDC/projects/Hamiltonian/tests/__init__.py similarity index 100% rename from pySDC/tests/test_projects/test_TOMS/__init__.py rename to pySDC/projects/Hamiltonian/tests/__init__.py diff --git a/pySDC/tests/test_projects/test_hamiltonian/test_fput.py b/pySDC/projects/Hamiltonian/tests/test_fput.py similarity index 100% rename from pySDC/tests/test_projects/test_hamiltonian/test_fput.py rename to pySDC/projects/Hamiltonian/tests/test_fput.py diff --git a/pySDC/tests/test_projects/test_hamiltonian/test_simple.py b/pySDC/projects/Hamiltonian/tests/test_simple.py similarity index 100% rename from pySDC/tests/test_projects/test_hamiltonian/test_simple.py rename to pySDC/projects/Hamiltonian/tests/test_simple.py diff --git a/pySDC/tests/test_projects/test_hamiltonian/test_solar.py b/pySDC/projects/Hamiltonian/tests/test_solar.py similarity index 100% rename from pySDC/tests/test_projects/test_hamiltonian/test_solar.py rename to pySDC/projects/Hamiltonian/tests/test_solar.py diff --git a/pySDC/tests/test_projects/test_monodomain/test_monodomain_convergence.py b/pySDC/projects/Monodomain/tests/test_monodomain_convergence.py similarity index 100% rename from pySDC/tests/test_projects/test_monodomain/test_monodomain_convergence.py rename to pySDC/projects/Monodomain/tests/test_monodomain_convergence.py diff --git a/pySDC/tests/test_projects/test_monodomain/test_monodomain_iterations.py b/pySDC/projects/Monodomain/tests/test_monodomain_iterations.py similarity index 100% rename from pySDC/tests/test_projects/test_monodomain/test_monodomain_iterations.py rename to pySDC/projects/Monodomain/tests/test_monodomain_iterations.py diff --git a/pySDC/tests/test_projects/test_monodomain/test_monodomain_iterations_parallel.py b/pySDC/projects/Monodomain/tests/test_monodomain_iterations_parallel.py similarity index 100% rename from pySDC/tests/test_projects/test_monodomain/test_monodomain_iterations_parallel.py rename to pySDC/projects/Monodomain/tests/test_monodomain_iterations_parallel.py diff --git a/pySDC/tests/test_projects/test_monodomain/test_monodomain_stability_domain.py b/pySDC/projects/Monodomain/tests/test_monodomain_stability_domain.py similarity index 100% rename from pySDC/tests/test_projects/test_monodomain/test_monodomain_stability_domain.py rename to pySDC/projects/Monodomain/tests/test_monodomain_stability_domain.py diff --git a/pySDC/tests/test_projects/test_pintsime/test_SwitchEstimator.py b/pySDC/projects/PinTSimE/tests/test_SwitchEstimator.py similarity index 100% rename from pySDC/tests/test_projects/test_pintsime/test_SwitchEstimator.py rename to pySDC/projects/PinTSimE/tests/test_SwitchEstimator.py diff --git a/pySDC/tests/test_projects/test_pintsime/test_battery_model.py b/pySDC/projects/PinTSimE/tests/test_battery_model.py similarity index 100% rename from pySDC/tests/test_projects/test_pintsime/test_battery_model.py rename to pySDC/projects/PinTSimE/tests/test_battery_model.py diff --git a/pySDC/tests/test_projects/test_pintsime/test_buck_model.py b/pySDC/projects/PinTSimE/tests/test_buck_model.py similarity index 100% rename from pySDC/tests/test_projects/test_pintsime/test_buck_model.py rename to pySDC/projects/PinTSimE/tests/test_buck_model.py diff --git a/pySDC/tests/test_projects/test_pintsime/test_discontinuous_test_ODE.py b/pySDC/projects/PinTSimE/tests/test_discontinuous_test_ODE.py similarity index 100% rename from pySDC/tests/test_projects/test_pintsime/test_discontinuous_test_ODE.py rename to pySDC/projects/PinTSimE/tests/test_discontinuous_test_ODE.py diff --git a/pySDC/tests/test_projects/test_pintsime/test_estimation_check.py b/pySDC/projects/PinTSimE/tests/test_estimation_check.py similarity index 100% rename from pySDC/tests/test_projects/test_pintsime/test_estimation_check.py rename to pySDC/projects/PinTSimE/tests/test_estimation_check.py diff --git a/pySDC/tests/test_projects/test_pintsime/test_piline_model.py b/pySDC/projects/PinTSimE/tests/test_piline_model.py similarity index 100% rename from pySDC/tests/test_projects/test_pintsime/test_piline_model.py rename to pySDC/projects/PinTSimE/tests/test_piline_model.py diff --git a/pySDC/tests/test_projects/test_asympconv/__init__.py b/pySDC/projects/RDC/tests/__init__.py similarity index 100% rename from pySDC/tests/test_projects/test_asympconv/__init__.py rename to pySDC/projects/RDC/tests/__init__.py diff --git a/pySDC/tests/test_projects/test_RDC/test_MLRDC_PFASST.py b/pySDC/projects/RDC/tests/test_MLRDC_PFASST.py similarity index 100% rename from pySDC/tests/test_projects/test_RDC/test_MLRDC_PFASST.py rename to pySDC/projects/RDC/tests/test_MLRDC_PFASST.py diff --git a/pySDC/tests/test_projects/test_compression/__init__.py b/pySDC/projects/Resilience/tests/__init__.py similarity index 100% rename from pySDC/tests/test_projects/test_compression/__init__.py rename to pySDC/projects/Resilience/tests/__init__.py diff --git a/pySDC/tests/test_projects/test_resilience/test_FD_eigenvalues.py b/pySDC/projects/Resilience/tests/test_FD_eigenvalues.py similarity index 100% rename from pySDC/tests/test_projects/test_resilience/test_FD_eigenvalues.py rename to pySDC/projects/Resilience/tests/test_FD_eigenvalues.py diff --git a/pySDC/tests/test_projects/test_resilience/test_Lorenz.py b/pySDC/projects/Resilience/tests/test_Lorenz.py similarity index 100% rename from pySDC/tests/test_projects/test_resilience/test_Lorenz.py rename to pySDC/projects/Resilience/tests/test_Lorenz.py diff --git a/pySDC/tests/test_projects/test_resilience/test_adaptive_collocation.py b/pySDC/projects/Resilience/tests/test_adaptive_collocation.py similarity index 100% rename from pySDC/tests/test_projects/test_resilience/test_adaptive_collocation.py rename to pySDC/projects/Resilience/tests/test_adaptive_collocation.py diff --git a/pySDC/tests/test_projects/test_resilience/test_efficient_sweepers.py b/pySDC/projects/Resilience/tests/test_efficient_sweepers.py similarity index 100% rename from pySDC/tests/test_projects/test_resilience/test_efficient_sweepers.py rename to pySDC/projects/Resilience/tests/test_efficient_sweepers.py diff --git a/pySDC/tests/test_projects/test_resilience/test_fault_injection.py b/pySDC/projects/Resilience/tests/test_fault_injection.py similarity index 100% rename from pySDC/tests/test_projects/test_resilience/test_fault_injection.py rename to pySDC/projects/Resilience/tests/test_fault_injection.py diff --git a/pySDC/tests/test_projects/test_resilience/test_order.py b/pySDC/projects/Resilience/tests/test_order.py similarity index 100% rename from pySDC/tests/test_projects/test_resilience/test_order.py rename to pySDC/projects/Resilience/tests/test_order.py diff --git a/pySDC/tests/test_projects/test_resilience/test_piline.py b/pySDC/projects/Resilience/tests/test_piline.py similarity index 100% rename from pySDC/tests/test_projects/test_resilience/test_piline.py rename to pySDC/projects/Resilience/tests/test_piline.py diff --git a/pySDC/tests/test_projects/test_resilience/test_quench.py b/pySDC/projects/Resilience/tests/test_quench.py similarity index 100% rename from pySDC/tests/test_projects/test_resilience/test_quench.py rename to pySDC/projects/Resilience/tests/test_quench.py diff --git a/pySDC/tests/test_projects/test_resilience/test_schroedinger.py b/pySDC/projects/Resilience/tests/test_schroedinger.py similarity index 100% rename from pySDC/tests/test_projects/test_resilience/test_schroedinger.py rename to pySDC/projects/Resilience/tests/test_schroedinger.py diff --git a/pySDC/tests/test_projects/test_resilience/test_strategies.py b/pySDC/projects/Resilience/tests/test_strategies.py similarity index 100% rename from pySDC/tests/test_projects/test_resilience/test_strategies.py rename to pySDC/projects/Resilience/tests/test_strategies.py diff --git a/pySDC/tests/test_projects/test_resilience/test_vdp.py b/pySDC/projects/Resilience/tests/test_vdp.py similarity index 100% rename from pySDC/tests/test_projects/test_resilience/test_vdp.py rename to pySDC/projects/Resilience/tests/test_vdp.py diff --git a/pySDC/tests/test_projects/test_fwsw/__init__.py b/pySDC/projects/SDC_showdown/tests/__init__.py similarity index 100% rename from pySDC/tests/test_projects/test_fwsw/__init__.py rename to pySDC/projects/SDC_showdown/tests/__init__.py diff --git a/pySDC/tests/test_projects/test_SDC_showdown/test_fisher.py b/pySDC/projects/SDC_showdown/tests/test_fisher.py similarity index 100% rename from pySDC/tests/test_projects/test_SDC_showdown/test_fisher.py rename to pySDC/projects/SDC_showdown/tests/test_fisher.py diff --git a/pySDC/tests/test_projects/test_SDC_showdown/test_grayscott.py b/pySDC/projects/SDC_showdown/tests/test_grayscott.py similarity index 100% rename from pySDC/tests/test_projects/test_SDC_showdown/test_grayscott.py rename to pySDC/projects/SDC_showdown/tests/test_grayscott.py diff --git a/pySDC/tests/test_projects/test_gpu/__init__.py b/pySDC/projects/Second_orderSDC/tests/__init__.py similarity index 100% rename from pySDC/tests/test_projects/test_gpu/__init__.py rename to pySDC/projects/Second_orderSDC/tests/__init__.py diff --git a/pySDC/tests/test_projects/test_second_orderSDC/test_convergence.py b/pySDC/projects/Second_orderSDC/tests/test_convergence.py similarity index 100% rename from pySDC/tests/test_projects/test_second_orderSDC/test_convergence.py rename to pySDC/projects/Second_orderSDC/tests/test_convergence.py diff --git a/pySDC/tests/test_projects/test_second_orderSDC/test_stability.py b/pySDC/projects/Second_orderSDC/tests/test_stability.py similarity index 100% rename from pySDC/tests/test_projects/test_second_orderSDC/test_stability.py rename to pySDC/projects/Second_orderSDC/tests/test_stability.py diff --git a/pySDC/tests/test_projects/test_hamiltonian/__init__.py b/pySDC/projects/TOMS/tests/__init__.py similarity index 100% rename from pySDC/tests/test_projects/test_hamiltonian/__init__.py rename to pySDC/projects/TOMS/tests/__init__.py diff --git a/pySDC/tests/test_projects/test_TOMS/test_AllenCahn_contracting_circle.py b/pySDC/projects/TOMS/tests/test_AllenCahn_contracting_circle.py similarity index 100% rename from pySDC/tests/test_projects/test_TOMS/test_AllenCahn_contracting_circle.py rename to pySDC/projects/TOMS/tests/test_AllenCahn_contracting_circle.py diff --git a/pySDC/tests/test_projects/test_TOMS/test_visualize_pySDC_with_PETSc.py b/pySDC/projects/TOMS/tests/test_visualize_pySDC_with_PETSc.py similarity index 100% rename from pySDC/tests/test_projects/test_TOMS/test_visualize_pySDC_with_PETSc.py rename to pySDC/projects/TOMS/tests/test_visualize_pySDC_with_PETSc.py diff --git a/pySDC/tests/test_projects/test_matrixPFASST/__init__.py b/pySDC/projects/compression/tests/__init__.py similarity index 100% rename from pySDC/tests/test_projects/test_matrixPFASST/__init__.py rename to pySDC/projects/compression/tests/__init__.py diff --git a/pySDC/tests/test_projects/test_compression/test_proof_of_concept.py b/pySDC/projects/compression/tests/test_proof_of_concept.py similarity index 100% rename from pySDC/tests/test_projects/test_compression/test_proof_of_concept.py rename to pySDC/projects/compression/tests/test_proof_of_concept.py diff --git a/pySDC/tests/test_projects/test_parallelSDC/__init__.py b/pySDC/projects/matrixPFASST/tests/__init__.py similarity index 100% rename from pySDC/tests/test_projects/test_parallelSDC/__init__.py rename to pySDC/projects/matrixPFASST/tests/__init__.py diff --git a/pySDC/tests/test_projects/test_matrixPFASST/test_controllers.py b/pySDC/projects/matrixPFASST/tests/test_controllers.py similarity index 100% rename from pySDC/tests/test_projects/test_matrixPFASST/test_controllers.py rename to pySDC/projects/matrixPFASST/tests/test_controllers.py diff --git a/pySDC/tests/test_projects/test_resilience/__init__.py b/pySDC/projects/parallelSDC/tests/__init__.py similarity index 100% rename from pySDC/tests/test_projects/test_resilience/__init__.py rename to pySDC/projects/parallelSDC/tests/__init__.py diff --git a/pySDC/tests/test_projects/test_parallelSDC/test_AllenCahn_parallel.py b/pySDC/projects/parallelSDC/tests/test_AllenCahn_parallel.py similarity index 100% rename from pySDC/tests/test_projects/test_parallelSDC/test_AllenCahn_parallel.py rename to pySDC/projects/parallelSDC/tests/test_AllenCahn_parallel.py diff --git a/pySDC/tests/test_projects/test_parallelSDC/test_fisher.py b/pySDC/projects/parallelSDC/tests/test_fisher.py similarity index 100% rename from pySDC/tests/test_projects/test_parallelSDC/test_fisher.py rename to pySDC/projects/parallelSDC/tests/test_fisher.py diff --git a/pySDC/tests/test_projects/test_parallelSDC/test_preconditioner.py b/pySDC/projects/parallelSDC/tests/test_preconditioner.py similarity index 100% rename from pySDC/tests/test_projects/test_parallelSDC/test_preconditioner.py rename to pySDC/projects/parallelSDC/tests/test_preconditioner.py diff --git a/pySDC/tests/test_projects/test_parallelSDC/test_preconditioner_MPI.py b/pySDC/projects/parallelSDC/tests/test_preconditioner_MPI.py similarity index 100% rename from pySDC/tests/test_projects/test_parallelSDC/test_preconditioner_MPI.py rename to pySDC/projects/parallelSDC/tests/test_preconditioner_MPI.py diff --git a/pySDC/tests/test_projects/test_second_orderSDC/__init__.py b/pySDC/projects/parallelSDC_reloaded/tests/__init__.py similarity index 100% rename from pySDC/tests/test_projects/test_second_orderSDC/__init__.py rename to pySDC/projects/parallelSDC_reloaded/tests/__init__.py diff --git a/pySDC/tests/test_projects/test_parallelSDC_reloaded.py b/pySDC/projects/parallelSDC_reloaded/tests/test_parallelSDC_reloaded.py similarity index 100% rename from pySDC/tests/test_projects/test_parallelSDC_reloaded.py rename to pySDC/projects/parallelSDC_reloaded/tests/test_parallelSDC_reloaded.py diff --git a/pySDC/tests/test_projects/test_soft_failure/__init__.py b/pySDC/projects/soft_failure/tests/__init__.py similarity index 100% rename from pySDC/tests/test_projects/test_soft_failure/__init__.py rename to pySDC/projects/soft_failure/tests/__init__.py diff --git a/pySDC/tests/test_projects/test_soft_failure/test_generate_statistics.py b/pySDC/projects/soft_failure/tests/test_generate_statistics.py similarity index 100% rename from pySDC/tests/test_projects/test_soft_failure/test_generate_statistics.py rename to pySDC/projects/soft_failure/tests/test_generate_statistics.py From 5b3be356ab04280344a6de4e6d7bad0d6ee1cd0a Mon Sep 17 00:00:00 2001 From: Jakob Fritz Date: Mon, 29 Apr 2024 16:15:08 +0200 Subject: [PATCH 03/47] Ignore projects without tests in base-env --- .github/workflows/ci_pipeline.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci_pipeline.yml b/.github/workflows/ci_pipeline.yml index 0a7691efcb..545250eb40 100644 --- a/.github/workflows/ci_pipeline.yml +++ b/.github/workflows/ci_pipeline.yml @@ -89,12 +89,12 @@ jobs: matrix: python: ['3.8', '3.9', '3.10'] env: - - AllenCahn_Bayreuth + # - AllenCahn_Bayreuth - AsympConv - - compression + # - compression - DAE - FastWaveSlowWave - - GPU + # - GPU - Hamiltonian - matrixPFASST - Monodomain @@ -103,7 +103,7 @@ jobs: - PinTSimE - RDC - Resilience - - SDC_showdown + # - SDC_showdown - Second_orderSDC - soft_failure - TOMS @@ -128,7 +128,7 @@ jobs: echo "print('Loading sitecustomize.py...') import coverage coverage.process_startup() " > sitecustomize.py - coverage run -m pytest --continue-on-collection-errors -v --durations=0 pySDC/projects/${{ matrix.env }}/tests -m base + coverage run -m pytest --continue-on-collection-errors -v --durations=0 pySDC/projects/${{ matrix.env }}/tests -m 'not fenics and not mpi4py and not petsc' - name: Make coverage report run: | From a1ef2a1938a7c4ae7407564468f4acc59388dca8 Mon Sep 17 00:00:00 2001 From: Jakob Fritz Date: Mon, 29 Apr 2024 16:19:44 +0200 Subject: [PATCH 04/47] Monodomain needs more packages, therefore moved to separate env --- .github/workflows/ci_pipeline.yml | 6 +++--- etc/environment-monodomain.yml | 16 ++++++++++++++++ 2 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 etc/environment-monodomain.yml diff --git a/.github/workflows/ci_pipeline.yml b/.github/workflows/ci_pipeline.yml index 545250eb40..9bb69dfa14 100644 --- a/.github/workflows/ci_pipeline.yml +++ b/.github/workflows/ci_pipeline.yml @@ -43,7 +43,7 @@ jobs: strategy: matrix: python: ['3.8', '3.9', '3.10'] - env: ['fenics', 'mpi4py', 'petsc'] + env: ['fenics', 'mpi4py', 'petsc', 'monodomain'] defaults: run: @@ -97,7 +97,7 @@ jobs: # - GPU - Hamiltonian - matrixPFASST - - Monodomain + # - Monodomain - parallelSDC - parallelSDC_reloaded - PinTSimE @@ -128,7 +128,7 @@ jobs: echo "print('Loading sitecustomize.py...') import coverage coverage.process_startup() " > sitecustomize.py - coverage run -m pytest --continue-on-collection-errors -v --durations=0 pySDC/projects/${{ matrix.env }}/tests -m 'not fenics and not mpi4py and not petsc' + coverage run -m pytest --continue-on-collection-errors -v --durations=0 pySDC/projects/${{ matrix.env }}/tests -m 'base' - name: Make coverage report run: | diff --git a/etc/environment-monodomain.yml b/etc/environment-monodomain.yml new file mode 100644 index 0000000000..4dfd7a89a9 --- /dev/null +++ b/etc/environment-monodomain.yml @@ -0,0 +1,16 @@ +name: pySDC +channels: + - conda-forge + - defaults +dependencies: + - numpy>=1.15.4 + - scipy>=0.17.1 + - matplotlib>=3.0,<=3.5.3 + - dill>=0.2.6 + - mpich + - mpi4py-fft>=2.0.2 + - mpi4py>=3.0.0 + - pytest + - pytest-cov + - pytest-timeout + - tqdm \ No newline at end of file From f9eb38890c9f9b8e62c483e66c9a3d75e93489f5 Mon Sep 17 00:00:00 2001 From: Jakob Fritz Date: Tue, 30 Apr 2024 08:17:43 +0200 Subject: [PATCH 05/47] Moved libpressio and monodomain-tests back to where they were --- .github/workflows/ci_pipeline.yml | 3 +-- etc/environment-monodomain.yml | 16 ---------------- .../tests_compression}/__init__.py | 0 .../tests_compression}/test_proof_of_concept.py | 0 .../test_monodomain_convergence.py | 0 .../test_monodomain_iterations.py | 0 .../test_monodomain_iterations_parallel.py | 0 .../test_monodomain_stability_domain.py | 0 8 files changed, 1 insertion(+), 18 deletions(-) delete mode 100644 etc/environment-monodomain.yml rename pySDC/{projects/compression/tests => tests/tests_compression}/__init__.py (100%) rename pySDC/{projects/compression/tests => tests/tests_compression}/test_proof_of_concept.py (100%) rename pySDC/{projects/Monodomain/tests => tests/tests_monodomain}/test_monodomain_convergence.py (100%) rename pySDC/{projects/Monodomain/tests => tests/tests_monodomain}/test_monodomain_iterations.py (100%) rename pySDC/{projects/Monodomain/tests => tests/tests_monodomain}/test_monodomain_iterations_parallel.py (100%) rename pySDC/{projects/Monodomain/tests => tests/tests_monodomain}/test_monodomain_stability_domain.py (100%) diff --git a/.github/workflows/ci_pipeline.yml b/.github/workflows/ci_pipeline.yml index 9bb69dfa14..1fd03c8bc7 100644 --- a/.github/workflows/ci_pipeline.yml +++ b/.github/workflows/ci_pipeline.yml @@ -43,7 +43,7 @@ jobs: strategy: matrix: python: ['3.8', '3.9', '3.10'] - env: ['fenics', 'mpi4py', 'petsc', 'monodomain'] + env: ['fenics', 'mpi4py', 'petsc'] defaults: run: @@ -97,7 +97,6 @@ jobs: # - GPU - Hamiltonian - matrixPFASST - # - Monodomain - parallelSDC - parallelSDC_reloaded - PinTSimE diff --git a/etc/environment-monodomain.yml b/etc/environment-monodomain.yml deleted file mode 100644 index 4dfd7a89a9..0000000000 --- a/etc/environment-monodomain.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: pySDC -channels: - - conda-forge - - defaults -dependencies: - - numpy>=1.15.4 - - scipy>=0.17.1 - - matplotlib>=3.0,<=3.5.3 - - dill>=0.2.6 - - mpich - - mpi4py-fft>=2.0.2 - - mpi4py>=3.0.0 - - pytest - - pytest-cov - - pytest-timeout - - tqdm \ No newline at end of file diff --git a/pySDC/projects/compression/tests/__init__.py b/pySDC/tests/tests_compression/__init__.py similarity index 100% rename from pySDC/projects/compression/tests/__init__.py rename to pySDC/tests/tests_compression/__init__.py diff --git a/pySDC/projects/compression/tests/test_proof_of_concept.py b/pySDC/tests/tests_compression/test_proof_of_concept.py similarity index 100% rename from pySDC/projects/compression/tests/test_proof_of_concept.py rename to pySDC/tests/tests_compression/test_proof_of_concept.py diff --git a/pySDC/projects/Monodomain/tests/test_monodomain_convergence.py b/pySDC/tests/tests_monodomain/test_monodomain_convergence.py similarity index 100% rename from pySDC/projects/Monodomain/tests/test_monodomain_convergence.py rename to pySDC/tests/tests_monodomain/test_monodomain_convergence.py diff --git a/pySDC/projects/Monodomain/tests/test_monodomain_iterations.py b/pySDC/tests/tests_monodomain/test_monodomain_iterations.py similarity index 100% rename from pySDC/projects/Monodomain/tests/test_monodomain_iterations.py rename to pySDC/tests/tests_monodomain/test_monodomain_iterations.py diff --git a/pySDC/projects/Monodomain/tests/test_monodomain_iterations_parallel.py b/pySDC/tests/tests_monodomain/test_monodomain_iterations_parallel.py similarity index 100% rename from pySDC/projects/Monodomain/tests/test_monodomain_iterations_parallel.py rename to pySDC/tests/tests_monodomain/test_monodomain_iterations_parallel.py diff --git a/pySDC/projects/Monodomain/tests/test_monodomain_stability_domain.py b/pySDC/tests/tests_monodomain/test_monodomain_stability_domain.py similarity index 100% rename from pySDC/projects/Monodomain/tests/test_monodomain_stability_domain.py rename to pySDC/tests/tests_monodomain/test_monodomain_stability_domain.py From 6ee4c5c0a90c7e54f1951d5a0564765f6ddbc408 Mon Sep 17 00:00:00 2001 From: Jakob Fritz Date: Tue, 30 Apr 2024 08:19:54 +0200 Subject: [PATCH 06/47] Forgot to move them in subdir "test_projects" --- pySDC/tests/{ => test_projects}/tests_compression/__init__.py | 0 .../tests_compression/test_proof_of_concept.py | 0 .../tests_monodomain/test_monodomain_convergence.py | 0 .../tests_monodomain/test_monodomain_iterations.py | 0 .../tests_monodomain/test_monodomain_iterations_parallel.py | 0 .../tests_monodomain/test_monodomain_stability_domain.py | 0 6 files changed, 0 insertions(+), 0 deletions(-) rename pySDC/tests/{ => test_projects}/tests_compression/__init__.py (100%) rename pySDC/tests/{ => test_projects}/tests_compression/test_proof_of_concept.py (100%) rename pySDC/tests/{ => test_projects}/tests_monodomain/test_monodomain_convergence.py (100%) rename pySDC/tests/{ => test_projects}/tests_monodomain/test_monodomain_iterations.py (100%) rename pySDC/tests/{ => test_projects}/tests_monodomain/test_monodomain_iterations_parallel.py (100%) rename pySDC/tests/{ => test_projects}/tests_monodomain/test_monodomain_stability_domain.py (100%) diff --git a/pySDC/tests/tests_compression/__init__.py b/pySDC/tests/test_projects/tests_compression/__init__.py similarity index 100% rename from pySDC/tests/tests_compression/__init__.py rename to pySDC/tests/test_projects/tests_compression/__init__.py diff --git a/pySDC/tests/tests_compression/test_proof_of_concept.py b/pySDC/tests/test_projects/tests_compression/test_proof_of_concept.py similarity index 100% rename from pySDC/tests/tests_compression/test_proof_of_concept.py rename to pySDC/tests/test_projects/tests_compression/test_proof_of_concept.py diff --git a/pySDC/tests/tests_monodomain/test_monodomain_convergence.py b/pySDC/tests/test_projects/tests_monodomain/test_monodomain_convergence.py similarity index 100% rename from pySDC/tests/tests_monodomain/test_monodomain_convergence.py rename to pySDC/tests/test_projects/tests_monodomain/test_monodomain_convergence.py diff --git a/pySDC/tests/tests_monodomain/test_monodomain_iterations.py b/pySDC/tests/test_projects/tests_monodomain/test_monodomain_iterations.py similarity index 100% rename from pySDC/tests/tests_monodomain/test_monodomain_iterations.py rename to pySDC/tests/test_projects/tests_monodomain/test_monodomain_iterations.py diff --git a/pySDC/tests/tests_monodomain/test_monodomain_iterations_parallel.py b/pySDC/tests/test_projects/tests_monodomain/test_monodomain_iterations_parallel.py similarity index 100% rename from pySDC/tests/tests_monodomain/test_monodomain_iterations_parallel.py rename to pySDC/tests/test_projects/tests_monodomain/test_monodomain_iterations_parallel.py diff --git a/pySDC/tests/tests_monodomain/test_monodomain_stability_domain.py b/pySDC/tests/test_projects/tests_monodomain/test_monodomain_stability_domain.py similarity index 100% rename from pySDC/tests/tests_monodomain/test_monodomain_stability_domain.py rename to pySDC/tests/test_projects/tests_monodomain/test_monodomain_stability_domain.py From 61039522654161e6cdf5449227558f41cf8430ae Mon Sep 17 00:00:00 2001 From: Jakob Fritz Date: Tue, 30 Apr 2024 08:21:07 +0200 Subject: [PATCH 07/47] Same path as earlier --- .../{tests_compression => test_compression}/__init__.py | 0 .../test_proof_of_concept.py | 0 .../test_monodomain_convergence.py | 0 .../test_monodomain_iterations.py | 0 .../test_monodomain_iterations_parallel.py | 0 .../test_monodomain_stability_domain.py | 0 6 files changed, 0 insertions(+), 0 deletions(-) rename pySDC/tests/test_projects/{tests_compression => test_compression}/__init__.py (100%) rename pySDC/tests/test_projects/{tests_compression => test_compression}/test_proof_of_concept.py (100%) rename pySDC/tests/test_projects/{tests_monodomain => test_monodomain}/test_monodomain_convergence.py (100%) rename pySDC/tests/test_projects/{tests_monodomain => test_monodomain}/test_monodomain_iterations.py (100%) rename pySDC/tests/test_projects/{tests_monodomain => test_monodomain}/test_monodomain_iterations_parallel.py (100%) rename pySDC/tests/test_projects/{tests_monodomain => test_monodomain}/test_monodomain_stability_domain.py (100%) diff --git a/pySDC/tests/test_projects/tests_compression/__init__.py b/pySDC/tests/test_projects/test_compression/__init__.py similarity index 100% rename from pySDC/tests/test_projects/tests_compression/__init__.py rename to pySDC/tests/test_projects/test_compression/__init__.py diff --git a/pySDC/tests/test_projects/tests_compression/test_proof_of_concept.py b/pySDC/tests/test_projects/test_compression/test_proof_of_concept.py similarity index 100% rename from pySDC/tests/test_projects/tests_compression/test_proof_of_concept.py rename to pySDC/tests/test_projects/test_compression/test_proof_of_concept.py diff --git a/pySDC/tests/test_projects/tests_monodomain/test_monodomain_convergence.py b/pySDC/tests/test_projects/test_monodomain/test_monodomain_convergence.py similarity index 100% rename from pySDC/tests/test_projects/tests_monodomain/test_monodomain_convergence.py rename to pySDC/tests/test_projects/test_monodomain/test_monodomain_convergence.py diff --git a/pySDC/tests/test_projects/tests_monodomain/test_monodomain_iterations.py b/pySDC/tests/test_projects/test_monodomain/test_monodomain_iterations.py similarity index 100% rename from pySDC/tests/test_projects/tests_monodomain/test_monodomain_iterations.py rename to pySDC/tests/test_projects/test_monodomain/test_monodomain_iterations.py diff --git a/pySDC/tests/test_projects/tests_monodomain/test_monodomain_iterations_parallel.py b/pySDC/tests/test_projects/test_monodomain/test_monodomain_iterations_parallel.py similarity index 100% rename from pySDC/tests/test_projects/tests_monodomain/test_monodomain_iterations_parallel.py rename to pySDC/tests/test_projects/test_monodomain/test_monodomain_iterations_parallel.py diff --git a/pySDC/tests/test_projects/tests_monodomain/test_monodomain_stability_domain.py b/pySDC/tests/test_projects/test_monodomain/test_monodomain_stability_domain.py similarity index 100% rename from pySDC/tests/test_projects/tests_monodomain/test_monodomain_stability_domain.py rename to pySDC/tests/test_projects/test_monodomain/test_monodomain_stability_domain.py From 777334757cfd5c4646a34bb5466162ef2154a53a Mon Sep 17 00:00:00 2001 From: Jakob Fritz Date: Tue, 30 Apr 2024 09:51:06 +0200 Subject: [PATCH 08/47] Moved monodomain and compression tests again and updated paths in test-jobs. Also removed need for tags in testing, as only a specific dir is tested --- .github/workflows/ci_pipeline.yml | 5 ++--- .../Monodomain/tests}/test_monodomain_convergence.py | 0 .../Monodomain/tests}/test_monodomain_iterations.py | 0 .../Monodomain/tests}/test_monodomain_iterations_parallel.py | 0 .../Monodomain/tests}/test_monodomain_stability_domain.py | 0 .../compression/tests}/__init__.py | 0 .../compression/tests}/test_proof_of_concept.py | 0 7 files changed, 2 insertions(+), 3 deletions(-) rename pySDC/{tests/test_projects/test_monodomain => projects/Monodomain/tests}/test_monodomain_convergence.py (100%) rename pySDC/{tests/test_projects/test_monodomain => projects/Monodomain/tests}/test_monodomain_iterations.py (100%) rename pySDC/{tests/test_projects/test_monodomain => projects/Monodomain/tests}/test_monodomain_iterations_parallel.py (100%) rename pySDC/{tests/test_projects/test_monodomain => projects/Monodomain/tests}/test_monodomain_stability_domain.py (100%) rename pySDC/{tests/test_projects/test_compression => projects/compression/tests}/__init__.py (100%) rename pySDC/{tests/test_projects/test_compression => projects/compression/tests}/test_proof_of_concept.py (100%) diff --git a/.github/workflows/ci_pipeline.yml b/.github/workflows/ci_pipeline.yml index 1fd03c8bc7..2f55aac88c 100644 --- a/.github/workflows/ci_pipeline.yml +++ b/.github/workflows/ci_pipeline.yml @@ -91,7 +91,6 @@ jobs: env: # - AllenCahn_Bayreuth - AsympConv - # - compression - DAE - FastWaveSlowWave # - GPU @@ -170,7 +169,7 @@ jobs: source /opt/spack/share/spack/setup-env.sh spack load libpressio - coverage run -m pytest --continue-on-collection-errors -v --durations=0 pySDC/tests -m libpressio + coverage run -m pytest --continue-on-collection-errors -v --durations=0 pySDC/projects/compression/tests - name: Make coverage report run: | @@ -218,7 +217,7 @@ jobs: echo "print('Loading sitecustomize.py...') import coverage coverage.process_startup() " > sitecustomize.py - coverage run -m pytest --continue-on-collection-errors -v --durations=0 pySDC/tests -m monodomain + coverage run -m pytest --continue-on-collection-errors -v --durations=0 pySDC/projects/Monodomain/tests - name: Make coverage report run: | diff --git a/pySDC/tests/test_projects/test_monodomain/test_monodomain_convergence.py b/pySDC/projects/Monodomain/tests/test_monodomain_convergence.py similarity index 100% rename from pySDC/tests/test_projects/test_monodomain/test_monodomain_convergence.py rename to pySDC/projects/Monodomain/tests/test_monodomain_convergence.py diff --git a/pySDC/tests/test_projects/test_monodomain/test_monodomain_iterations.py b/pySDC/projects/Monodomain/tests/test_monodomain_iterations.py similarity index 100% rename from pySDC/tests/test_projects/test_monodomain/test_monodomain_iterations.py rename to pySDC/projects/Monodomain/tests/test_monodomain_iterations.py diff --git a/pySDC/tests/test_projects/test_monodomain/test_monodomain_iterations_parallel.py b/pySDC/projects/Monodomain/tests/test_monodomain_iterations_parallel.py similarity index 100% rename from pySDC/tests/test_projects/test_monodomain/test_monodomain_iterations_parallel.py rename to pySDC/projects/Monodomain/tests/test_monodomain_iterations_parallel.py diff --git a/pySDC/tests/test_projects/test_monodomain/test_monodomain_stability_domain.py b/pySDC/projects/Monodomain/tests/test_monodomain_stability_domain.py similarity index 100% rename from pySDC/tests/test_projects/test_monodomain/test_monodomain_stability_domain.py rename to pySDC/projects/Monodomain/tests/test_monodomain_stability_domain.py diff --git a/pySDC/tests/test_projects/test_compression/__init__.py b/pySDC/projects/compression/tests/__init__.py similarity index 100% rename from pySDC/tests/test_projects/test_compression/__init__.py rename to pySDC/projects/compression/tests/__init__.py diff --git a/pySDC/tests/test_projects/test_compression/test_proof_of_concept.py b/pySDC/projects/compression/tests/test_proof_of_concept.py similarity index 100% rename from pySDC/tests/test_projects/test_compression/test_proof_of_concept.py rename to pySDC/projects/compression/tests/test_proof_of_concept.py From 120b4378ef761a3e98567875d043b7750af061d3 Mon Sep 17 00:00:00 2001 From: Jakob Fritz Date: Tue, 30 Apr 2024 10:24:56 +0200 Subject: [PATCH 09/47] Add (mostly empty) files with additional requirements for projects --- .github/workflows/ci_pipeline.yml | 14 +++++++++----- pySDC/projects/AllenCahn_Bayreuth/env_update.yml | 6 ++++++ pySDC/projects/AsympConv/env_update.yml | 0 pySDC/projects/DAE/env_update.yml | 0 pySDC/projects/FastWaveSlowWave/env_update.yml | 0 pySDC/projects/Hamiltonian/env_update.yml | 0 pySDC/projects/PinTSimE/env_update.yml | 0 pySDC/projects/RDC/env_update.yml | 0 pySDC/projects/Resilience/env_update.yml | 0 pySDC/projects/SDC_showdown/env_update.yml | 6 ++++++ pySDC/projects/Second_orderSDC/env_update.yml | 0 pySDC/projects/TOMS/env_update.yml | 0 pySDC/projects/deprecated/env_update.yml | 0 pySDC/projects/matrixPFASST/env_update.yml | 0 pySDC/projects/parallelSDC/env_update.yml | 0 pySDC/projects/parallelSDC_reloaded/env_update.yml | 0 pySDC/projects/soft_failure/env_update.yml | 0 17 files changed, 21 insertions(+), 5 deletions(-) create mode 100644 pySDC/projects/AllenCahn_Bayreuth/env_update.yml create mode 100644 pySDC/projects/AsympConv/env_update.yml create mode 100644 pySDC/projects/DAE/env_update.yml create mode 100644 pySDC/projects/FastWaveSlowWave/env_update.yml create mode 100644 pySDC/projects/Hamiltonian/env_update.yml create mode 100644 pySDC/projects/PinTSimE/env_update.yml create mode 100644 pySDC/projects/RDC/env_update.yml create mode 100644 pySDC/projects/Resilience/env_update.yml create mode 100644 pySDC/projects/SDC_showdown/env_update.yml create mode 100644 pySDC/projects/Second_orderSDC/env_update.yml create mode 100644 pySDC/projects/TOMS/env_update.yml create mode 100644 pySDC/projects/deprecated/env_update.yml create mode 100644 pySDC/projects/matrixPFASST/env_update.yml create mode 100644 pySDC/projects/parallelSDC/env_update.yml create mode 100644 pySDC/projects/parallelSDC_reloaded/env_update.yml create mode 100644 pySDC/projects/soft_failure/env_update.yml diff --git a/.github/workflows/ci_pipeline.yml b/.github/workflows/ci_pipeline.yml index 2f55aac88c..b5f3c632f4 100644 --- a/.github/workflows/ci_pipeline.yml +++ b/.github/workflows/ci_pipeline.yml @@ -43,7 +43,7 @@ jobs: strategy: matrix: python: ['3.8', '3.9', '3.10'] - env: ['fenics', 'mpi4py', 'petsc'] + env: ['base', 'fenics', 'mpi4py', 'petsc'] defaults: run: @@ -65,7 +65,7 @@ jobs: echo "print('Loading sitecustomize.py...') import coverage coverage.process_startup() " > sitecustomize.py - coverage run -m pytest --continue-on-collection-errors -v --durations=0 pySDC/tests pySDC/projects/*/tests -m ${{ matrix.env }} + coverage run -m pytest --continue-on-collection-errors -v --durations=0 pySDC/tests -m ${{ matrix.env }} - name: Make coverage report run: | @@ -89,7 +89,7 @@ jobs: matrix: python: ['3.8', '3.9', '3.10'] env: - # - AllenCahn_Bayreuth + - AllenCahn_Bayreuth - AsympConv - DAE - FastWaveSlowWave @@ -101,7 +101,7 @@ jobs: - PinTSimE - RDC - Resilience - # - SDC_showdown + - SDC_showdown - Second_orderSDC - soft_failure - TOMS @@ -121,12 +121,16 @@ jobs: create-args: >- python=${{ matrix.python }} + - name: Install additional packages as needed + run: | + micromamba install -y --file pySDC/projects/${{ matrix.env }}/env_update.yml --freeze-installed + - name: Run pytest for CPU stuff run: | echo "print('Loading sitecustomize.py...') import coverage coverage.process_startup() " > sitecustomize.py - coverage run -m pytest --continue-on-collection-errors -v --durations=0 pySDC/projects/${{ matrix.env }}/tests -m 'base' + coverage run -m pytest --continue-on-collection-errors -v --durations=0 pySDC/projects/${{ matrix.env }}/tests - name: Make coverage report run: | diff --git a/pySDC/projects/AllenCahn_Bayreuth/env_update.yml b/pySDC/projects/AllenCahn_Bayreuth/env_update.yml new file mode 100644 index 0000000000..dfbb1a3049 --- /dev/null +++ b/pySDC/projects/AllenCahn_Bayreuth/env_update.yml @@ -0,0 +1,6 @@ +name: pySDC +channels: + - conda-forge + - defaults +dependencies: + - mpi4py diff --git a/pySDC/projects/AsympConv/env_update.yml b/pySDC/projects/AsympConv/env_update.yml new file mode 100644 index 0000000000..e69de29bb2 diff --git a/pySDC/projects/DAE/env_update.yml b/pySDC/projects/DAE/env_update.yml new file mode 100644 index 0000000000..e69de29bb2 diff --git a/pySDC/projects/FastWaveSlowWave/env_update.yml b/pySDC/projects/FastWaveSlowWave/env_update.yml new file mode 100644 index 0000000000..e69de29bb2 diff --git a/pySDC/projects/Hamiltonian/env_update.yml b/pySDC/projects/Hamiltonian/env_update.yml new file mode 100644 index 0000000000..e69de29bb2 diff --git a/pySDC/projects/PinTSimE/env_update.yml b/pySDC/projects/PinTSimE/env_update.yml new file mode 100644 index 0000000000..e69de29bb2 diff --git a/pySDC/projects/RDC/env_update.yml b/pySDC/projects/RDC/env_update.yml new file mode 100644 index 0000000000..e69de29bb2 diff --git a/pySDC/projects/Resilience/env_update.yml b/pySDC/projects/Resilience/env_update.yml new file mode 100644 index 0000000000..e69de29bb2 diff --git a/pySDC/projects/SDC_showdown/env_update.yml b/pySDC/projects/SDC_showdown/env_update.yml new file mode 100644 index 0000000000..959ff0fa19 --- /dev/null +++ b/pySDC/projects/SDC_showdown/env_update.yml @@ -0,0 +1,6 @@ +name: pySDC +channels: + - conda-forge + - defaults +dependencies: + - petsc4py diff --git a/pySDC/projects/Second_orderSDC/env_update.yml b/pySDC/projects/Second_orderSDC/env_update.yml new file mode 100644 index 0000000000..e69de29bb2 diff --git a/pySDC/projects/TOMS/env_update.yml b/pySDC/projects/TOMS/env_update.yml new file mode 100644 index 0000000000..e69de29bb2 diff --git a/pySDC/projects/deprecated/env_update.yml b/pySDC/projects/deprecated/env_update.yml new file mode 100644 index 0000000000..e69de29bb2 diff --git a/pySDC/projects/matrixPFASST/env_update.yml b/pySDC/projects/matrixPFASST/env_update.yml new file mode 100644 index 0000000000..e69de29bb2 diff --git a/pySDC/projects/parallelSDC/env_update.yml b/pySDC/projects/parallelSDC/env_update.yml new file mode 100644 index 0000000000..e69de29bb2 diff --git a/pySDC/projects/parallelSDC_reloaded/env_update.yml b/pySDC/projects/parallelSDC_reloaded/env_update.yml new file mode 100644 index 0000000000..e69de29bb2 diff --git a/pySDC/projects/soft_failure/env_update.yml b/pySDC/projects/soft_failure/env_update.yml new file mode 100644 index 0000000000..e69de29bb2 From 10b35fb97e0e2991c22c2af0e47c0faa96a3d8dd Mon Sep 17 00:00:00 2001 From: Jakob Fritz Date: Tue, 30 Apr 2024 10:32:36 +0200 Subject: [PATCH 10/47] Empty env-files are not allowed. Therefore added pytest to all files (already satisfied by env-base --- pySDC/projects/AsympConv/env_update.yml | 6 ++++++ pySDC/projects/DAE/env_update.yml | 6 ++++++ pySDC/projects/FastWaveSlowWave/env_update.yml | 6 ++++++ pySDC/projects/Hamiltonian/env_update.yml | 6 ++++++ pySDC/projects/PinTSimE/env_update.yml | 6 ++++++ pySDC/projects/RDC/env_update.yml | 6 ++++++ pySDC/projects/Resilience/env_update.yml | 6 ++++++ pySDC/projects/Second_orderSDC/env_update.yml | 6 ++++++ pySDC/projects/TOMS/env_update.yml | 6 ++++++ pySDC/projects/deprecated/env_update.yml | 0 pySDC/projects/matrixPFASST/env_update.yml | 6 ++++++ pySDC/projects/parallelSDC/env_update.yml | 6 ++++++ pySDC/projects/parallelSDC_reloaded/env_update.yml | 6 ++++++ pySDC/projects/soft_failure/env_update.yml | 6 ++++++ 14 files changed, 78 insertions(+) delete mode 100644 pySDC/projects/deprecated/env_update.yml diff --git a/pySDC/projects/AsympConv/env_update.yml b/pySDC/projects/AsympConv/env_update.yml index e69de29bb2..29e9552504 100644 --- a/pySDC/projects/AsympConv/env_update.yml +++ b/pySDC/projects/AsympConv/env_update.yml @@ -0,0 +1,6 @@ +name: pySDC +channels: + - conda-forge + - defaults +dependencies: + - pytest diff --git a/pySDC/projects/DAE/env_update.yml b/pySDC/projects/DAE/env_update.yml index e69de29bb2..29e9552504 100644 --- a/pySDC/projects/DAE/env_update.yml +++ b/pySDC/projects/DAE/env_update.yml @@ -0,0 +1,6 @@ +name: pySDC +channels: + - conda-forge + - defaults +dependencies: + - pytest diff --git a/pySDC/projects/FastWaveSlowWave/env_update.yml b/pySDC/projects/FastWaveSlowWave/env_update.yml index e69de29bb2..29e9552504 100644 --- a/pySDC/projects/FastWaveSlowWave/env_update.yml +++ b/pySDC/projects/FastWaveSlowWave/env_update.yml @@ -0,0 +1,6 @@ +name: pySDC +channels: + - conda-forge + - defaults +dependencies: + - pytest diff --git a/pySDC/projects/Hamiltonian/env_update.yml b/pySDC/projects/Hamiltonian/env_update.yml index e69de29bb2..29e9552504 100644 --- a/pySDC/projects/Hamiltonian/env_update.yml +++ b/pySDC/projects/Hamiltonian/env_update.yml @@ -0,0 +1,6 @@ +name: pySDC +channels: + - conda-forge + - defaults +dependencies: + - pytest diff --git a/pySDC/projects/PinTSimE/env_update.yml b/pySDC/projects/PinTSimE/env_update.yml index e69de29bb2..29e9552504 100644 --- a/pySDC/projects/PinTSimE/env_update.yml +++ b/pySDC/projects/PinTSimE/env_update.yml @@ -0,0 +1,6 @@ +name: pySDC +channels: + - conda-forge + - defaults +dependencies: + - pytest diff --git a/pySDC/projects/RDC/env_update.yml b/pySDC/projects/RDC/env_update.yml index e69de29bb2..29e9552504 100644 --- a/pySDC/projects/RDC/env_update.yml +++ b/pySDC/projects/RDC/env_update.yml @@ -0,0 +1,6 @@ +name: pySDC +channels: + - conda-forge + - defaults +dependencies: + - pytest diff --git a/pySDC/projects/Resilience/env_update.yml b/pySDC/projects/Resilience/env_update.yml index e69de29bb2..29e9552504 100644 --- a/pySDC/projects/Resilience/env_update.yml +++ b/pySDC/projects/Resilience/env_update.yml @@ -0,0 +1,6 @@ +name: pySDC +channels: + - conda-forge + - defaults +dependencies: + - pytest diff --git a/pySDC/projects/Second_orderSDC/env_update.yml b/pySDC/projects/Second_orderSDC/env_update.yml index e69de29bb2..29e9552504 100644 --- a/pySDC/projects/Second_orderSDC/env_update.yml +++ b/pySDC/projects/Second_orderSDC/env_update.yml @@ -0,0 +1,6 @@ +name: pySDC +channels: + - conda-forge + - defaults +dependencies: + - pytest diff --git a/pySDC/projects/TOMS/env_update.yml b/pySDC/projects/TOMS/env_update.yml index e69de29bb2..29e9552504 100644 --- a/pySDC/projects/TOMS/env_update.yml +++ b/pySDC/projects/TOMS/env_update.yml @@ -0,0 +1,6 @@ +name: pySDC +channels: + - conda-forge + - defaults +dependencies: + - pytest diff --git a/pySDC/projects/deprecated/env_update.yml b/pySDC/projects/deprecated/env_update.yml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/pySDC/projects/matrixPFASST/env_update.yml b/pySDC/projects/matrixPFASST/env_update.yml index e69de29bb2..29e9552504 100644 --- a/pySDC/projects/matrixPFASST/env_update.yml +++ b/pySDC/projects/matrixPFASST/env_update.yml @@ -0,0 +1,6 @@ +name: pySDC +channels: + - conda-forge + - defaults +dependencies: + - pytest diff --git a/pySDC/projects/parallelSDC/env_update.yml b/pySDC/projects/parallelSDC/env_update.yml index e69de29bb2..29e9552504 100644 --- a/pySDC/projects/parallelSDC/env_update.yml +++ b/pySDC/projects/parallelSDC/env_update.yml @@ -0,0 +1,6 @@ +name: pySDC +channels: + - conda-forge + - defaults +dependencies: + - pytest diff --git a/pySDC/projects/parallelSDC_reloaded/env_update.yml b/pySDC/projects/parallelSDC_reloaded/env_update.yml index e69de29bb2..29e9552504 100644 --- a/pySDC/projects/parallelSDC_reloaded/env_update.yml +++ b/pySDC/projects/parallelSDC_reloaded/env_update.yml @@ -0,0 +1,6 @@ +name: pySDC +channels: + - conda-forge + - defaults +dependencies: + - pytest diff --git a/pySDC/projects/soft_failure/env_update.yml b/pySDC/projects/soft_failure/env_update.yml index e69de29bb2..29e9552504 100644 --- a/pySDC/projects/soft_failure/env_update.yml +++ b/pySDC/projects/soft_failure/env_update.yml @@ -0,0 +1,6 @@ +name: pySDC +channels: + - conda-forge + - defaults +dependencies: + - pytest From c1d5c05f556045176f0695a2e6b93e9fbf6e28f5 Mon Sep 17 00:00:00 2001 From: Jakob Fritz Date: Tue, 30 Apr 2024 10:33:41 +0200 Subject: [PATCH 11/47] Removed python-versions from matrix for faster CI (and debugging) --- .github/workflows/ci_pipeline.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_pipeline.yml b/.github/workflows/ci_pipeline.yml index b5f3c632f4..1b08fc421a 100644 --- a/.github/workflows/ci_pipeline.yml +++ b/.github/workflows/ci_pipeline.yml @@ -42,7 +42,8 @@ jobs: strategy: matrix: - python: ['3.8', '3.9', '3.10'] + # python: ['3.8', '3.9', '3.10'] + python: ['3.10'] env: ['base', 'fenics', 'mpi4py', 'petsc'] defaults: @@ -87,7 +88,8 @@ jobs: strategy: matrix: - python: ['3.8', '3.9', '3.10'] + # python: ['3.8', '3.9', '3.10'] + python: ['3.10'] env: - AllenCahn_Bayreuth - AsympConv From bce66a92d808d1bfd7ed1e2de4a0d051d663a3ba Mon Sep 17 00:00:00 2001 From: Jakob Fritz Date: Tue, 30 Apr 2024 10:40:58 +0200 Subject: [PATCH 12/47] Don't stop other jobs of matrix if a single one fails --- .github/workflows/ci_pipeline.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci_pipeline.yml b/.github/workflows/ci_pipeline.yml index 1b08fc421a..a487ccb191 100644 --- a/.github/workflows/ci_pipeline.yml +++ b/.github/workflows/ci_pipeline.yml @@ -87,6 +87,7 @@ jobs: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: # python: ['3.8', '3.9', '3.10'] python: ['3.10'] From 623a44a96bc6068f34306019776ea091b1d34053 Mon Sep 17 00:00:00 2001 From: Jakob Fritz Date: Tue, 30 Apr 2024 10:41:10 +0200 Subject: [PATCH 13/47] additional dependency needed --- pySDC/projects/AllenCahn_Bayreuth/env_update.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/pySDC/projects/AllenCahn_Bayreuth/env_update.yml b/pySDC/projects/AllenCahn_Bayreuth/env_update.yml index dfbb1a3049..3ab2aed33f 100644 --- a/pySDC/projects/AllenCahn_Bayreuth/env_update.yml +++ b/pySDC/projects/AllenCahn_Bayreuth/env_update.yml @@ -4,3 +4,4 @@ channels: - defaults dependencies: - mpi4py + - mpi4py_fft From 14f0760fe5e6a41245a5f9a18c5d720ddd794bdd Mon Sep 17 00:00:00 2001 From: Jakob Fritz Date: Tue, 30 Apr 2024 10:46:46 +0200 Subject: [PATCH 14/47] Corrected typo in dependency --- pySDC/projects/AllenCahn_Bayreuth/env_update.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pySDC/projects/AllenCahn_Bayreuth/env_update.yml b/pySDC/projects/AllenCahn_Bayreuth/env_update.yml index 3ab2aed33f..052982633d 100644 --- a/pySDC/projects/AllenCahn_Bayreuth/env_update.yml +++ b/pySDC/projects/AllenCahn_Bayreuth/env_update.yml @@ -4,4 +4,4 @@ channels: - defaults dependencies: - mpi4py - - mpi4py_fft + - mpi4py-fft From 838928eefe0fb4fd1629c434ef27c671742f0cde Mon Sep 17 00:00:00 2001 From: Jakob Fritz Date: Tue, 30 Apr 2024 10:55:26 +0200 Subject: [PATCH 15/47] Add mpi4py to more projects --- pySDC/projects/Resilience/env_update.yml | 2 +- pySDC/projects/parallelSDC/env_update.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pySDC/projects/Resilience/env_update.yml b/pySDC/projects/Resilience/env_update.yml index 29e9552504..dfbb1a3049 100644 --- a/pySDC/projects/Resilience/env_update.yml +++ b/pySDC/projects/Resilience/env_update.yml @@ -3,4 +3,4 @@ channels: - conda-forge - defaults dependencies: - - pytest + - mpi4py diff --git a/pySDC/projects/parallelSDC/env_update.yml b/pySDC/projects/parallelSDC/env_update.yml index 29e9552504..dfbb1a3049 100644 --- a/pySDC/projects/parallelSDC/env_update.yml +++ b/pySDC/projects/parallelSDC/env_update.yml @@ -3,4 +3,4 @@ channels: - conda-forge - defaults dependencies: - - pytest + - mpi4py From d0acf316678007f4d5b70f1f8677a89fe92bdd55 Mon Sep 17 00:00:00 2001 From: Jakob Fritz Date: Tue, 30 Apr 2024 10:56:08 +0200 Subject: [PATCH 16/47] Changed order for faster results across env and projects As order of dimensions in matrix determines which param is varied first --- .github/workflows/ci_pipeline.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci_pipeline.yml b/.github/workflows/ci_pipeline.yml index a487ccb191..f5838f94a3 100644 --- a/.github/workflows/ci_pipeline.yml +++ b/.github/workflows/ci_pipeline.yml @@ -42,9 +42,9 @@ jobs: strategy: matrix: + env: ['base', 'fenics', 'mpi4py', 'petsc'] # python: ['3.8', '3.9', '3.10'] python: ['3.10'] - env: ['base', 'fenics', 'mpi4py', 'petsc'] defaults: run: @@ -89,8 +89,6 @@ jobs: strategy: fail-fast: false matrix: - # python: ['3.8', '3.9', '3.10'] - python: ['3.10'] env: - AllenCahn_Bayreuth - AsympConv @@ -108,6 +106,8 @@ jobs: - Second_orderSDC - soft_failure - TOMS + # python: ['3.8', '3.9', '3.10'] + python: ['3.10'] defaults: run: From c040884000860aad3984ead5b79530ccb7100c69 Mon Sep 17 00:00:00 2001 From: Jakob Fritz Date: Tue, 30 Apr 2024 11:16:01 +0200 Subject: [PATCH 17/47] Resilience needs additional package --- pySDC/projects/Resilience/env_update.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/pySDC/projects/Resilience/env_update.yml b/pySDC/projects/Resilience/env_update.yml index dfbb1a3049..052982633d 100644 --- a/pySDC/projects/Resilience/env_update.yml +++ b/pySDC/projects/Resilience/env_update.yml @@ -4,3 +4,4 @@ channels: - defaults dependencies: - mpi4py + - mpi4py-fft From 08126f2571bf6e053224b374c84ca3d6f4b0d13b Mon Sep 17 00:00:00 2001 From: Jakob Fritz Date: Tue, 30 Apr 2024 11:21:24 +0200 Subject: [PATCH 18/47] Limiting version of petsc4py maybe this fixes the error of the project-tests --- pySDC/projects/SDC_showdown/env_update.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pySDC/projects/SDC_showdown/env_update.yml b/pySDC/projects/SDC_showdown/env_update.yml index 959ff0fa19..f7f3a158bd 100644 --- a/pySDC/projects/SDC_showdown/env_update.yml +++ b/pySDC/projects/SDC_showdown/env_update.yml @@ -3,4 +3,4 @@ channels: - conda-forge - defaults dependencies: - - petsc4py + - petsc4py<3.20 From a15148a49c4e2fd292384dcd0b1a7238846ca7e2 Mon Sep 17 00:00:00 2001 From: Jakob Fritz Date: Tue, 30 Apr 2024 11:24:55 +0200 Subject: [PATCH 19/47] Adapted requirements from mpi4py-env --- pySDC/projects/AllenCahn_Bayreuth/env_update.yml | 4 ++-- pySDC/projects/Resilience/env_update.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pySDC/projects/AllenCahn_Bayreuth/env_update.yml b/pySDC/projects/AllenCahn_Bayreuth/env_update.yml index 052982633d..def30a815b 100644 --- a/pySDC/projects/AllenCahn_Bayreuth/env_update.yml +++ b/pySDC/projects/AllenCahn_Bayreuth/env_update.yml @@ -3,5 +3,5 @@ channels: - conda-forge - defaults dependencies: - - mpi4py - - mpi4py-fft + - mpi4py>=3.0.0 + - mpi4py-fft>=2.0.2 diff --git a/pySDC/projects/Resilience/env_update.yml b/pySDC/projects/Resilience/env_update.yml index 052982633d..def30a815b 100644 --- a/pySDC/projects/Resilience/env_update.yml +++ b/pySDC/projects/Resilience/env_update.yml @@ -3,5 +3,5 @@ channels: - conda-forge - defaults dependencies: - - mpi4py - - mpi4py-fft + - mpi4py>=3.0.0 + - mpi4py-fft>=2.0.2 From 4af3596e83d2cc07136401a4f4552716b865bfd1 Mon Sep 17 00:00:00 2001 From: Jakob Fritz Date: Tue, 30 Apr 2024 11:38:58 +0200 Subject: [PATCH 20/47] Increase timeout for single test --- pySDC/projects/DAE/tests/test_problems.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pySDC/projects/DAE/tests/test_problems.py b/pySDC/projects/DAE/tests/test_problems.py index dbc901cfbb..69f4540fec 100644 --- a/pySDC/projects/DAE/tests/test_problems.py +++ b/pySDC/projects/DAE/tests/test_problems.py @@ -611,7 +611,7 @@ def test_WSCC9_update_YBus(): YBus_line_outage, YBus_line6_8_outage ), 'YBus after line outage does not match with the one it should supposed to!' - +@pytest.mark.timeout(360) @pytest.mark.base def test_WSCC9_SDC_detection(): """ From bec097884efa1e0ceaff64f1eb078b3feb84a69f Mon Sep 17 00:00:00 2001 From: Jakob Fritz Date: Tue, 30 Apr 2024 11:44:09 +0200 Subject: [PATCH 21/47] Added parallel execution and moved pytest-order to only job where it is used --- .github/workflows/ci_pipeline.yml | 2 +- etc/environment-base.yml | 2 +- pySDC/projects/TOMS/env_update.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci_pipeline.yml b/.github/workflows/ci_pipeline.yml index f5838f94a3..39579faeb2 100644 --- a/.github/workflows/ci_pipeline.yml +++ b/.github/workflows/ci_pipeline.yml @@ -133,7 +133,7 @@ jobs: echo "print('Loading sitecustomize.py...') import coverage coverage.process_startup() " > sitecustomize.py - coverage run -m pytest --continue-on-collection-errors -v --durations=0 pySDC/projects/${{ matrix.env }}/tests + coverage run -m pytest --continue-on-collection-errors -v --durations=0 --workers auto pySDC/projects/${{ matrix.env }}/tests - name: Make coverage report run: | diff --git a/etc/environment-base.yml b/etc/environment-base.yml index 97f7fbeb62..e88f0f936e 100644 --- a/etc/environment-base.yml +++ b/etc/environment-base.yml @@ -12,6 +12,6 @@ dependencies: - pytest - pytest-benchmark - pytest-timeout - - pytest-order + - pytest-parallel - coverage[toml] - sphinx diff --git a/pySDC/projects/TOMS/env_update.yml b/pySDC/projects/TOMS/env_update.yml index 29e9552504..5a0770ed0a 100644 --- a/pySDC/projects/TOMS/env_update.yml +++ b/pySDC/projects/TOMS/env_update.yml @@ -3,4 +3,4 @@ channels: - conda-forge - defaults dependencies: - - pytest + - pytest-order From c65f7dd386c8d432224f220cd6e93fdb9dfd32d5 Mon Sep 17 00:00:00 2001 From: Jakob Fritz Date: Tue, 30 Apr 2024 11:56:20 +0200 Subject: [PATCH 22/47] Fixed linting error and added parallel kw to coverage --- pySDC/projects/DAE/tests/test_problems.py | 1 + pyproject.toml | 1 + 2 files changed, 2 insertions(+) diff --git a/pySDC/projects/DAE/tests/test_problems.py b/pySDC/projects/DAE/tests/test_problems.py index 69f4540fec..3a63626d9f 100644 --- a/pySDC/projects/DAE/tests/test_problems.py +++ b/pySDC/projects/DAE/tests/test_problems.py @@ -611,6 +611,7 @@ def test_WSCC9_update_YBus(): YBus_line_outage, YBus_line6_8_outage ), 'YBus after line outage does not match with the one it should supposed to!' + @pytest.mark.timeout(360) @pytest.mark.base def test_WSCC9_SDC_detection(): diff --git a/pyproject.toml b/pyproject.toml index 37f2be3aad..a6bf75b311 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -98,6 +98,7 @@ omit = ['*/pySDC/tests/*', '*/data/*', '*/pySDC/playgrounds/*', '*/pySDC/project relative_files = true concurrency = ['multiprocessing'] source = ['pySDC'] +parallel = true [tool.coverage.report] skip_empty = true From 7822ca2082f899cb85930f7c611267c09280dd31 Mon Sep 17 00:00:00 2001 From: Jakob Fritz Date: Tue, 30 Apr 2024 12:22:59 +0200 Subject: [PATCH 23/47] Removed pytest-parallel again As it is unmaintained and leads to errors with coverage --- .github/workflows/ci_pipeline.yml | 2 +- etc/environment-base.yml | 1 - pyproject.toml | 3 +-- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci_pipeline.yml b/.github/workflows/ci_pipeline.yml index 39579faeb2..f5838f94a3 100644 --- a/.github/workflows/ci_pipeline.yml +++ b/.github/workflows/ci_pipeline.yml @@ -133,7 +133,7 @@ jobs: echo "print('Loading sitecustomize.py...') import coverage coverage.process_startup() " > sitecustomize.py - coverage run -m pytest --continue-on-collection-errors -v --durations=0 --workers auto pySDC/projects/${{ matrix.env }}/tests + coverage run -m pytest --continue-on-collection-errors -v --durations=0 pySDC/projects/${{ matrix.env }}/tests - name: Make coverage report run: | diff --git a/etc/environment-base.yml b/etc/environment-base.yml index e88f0f936e..87e4443283 100644 --- a/etc/environment-base.yml +++ b/etc/environment-base.yml @@ -12,6 +12,5 @@ dependencies: - pytest - pytest-benchmark - pytest-timeout - - pytest-parallel - coverage[toml] - sphinx diff --git a/pyproject.toml b/pyproject.toml index a6bf75b311..d347fe28ca 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -94,11 +94,10 @@ skip-string-normalization = true exclude = '''playgrounds/''' [tool.coverage.run] -omit = ['*/pySDC/tests/*', '*/data/*', '*/pySDC/playgrounds/*', '*/pySDC/projects/deprecated/*'] +omit = ['*/pySDC/tests/*', '*/data/*', '*/pySDC/playgrounds/*', '*/pySDC/projects/deprecated/*', '*/pySDC/projects/*/tests/*'] relative_files = true concurrency = ['multiprocessing'] source = ['pySDC'] -parallel = true [tool.coverage.report] skip_empty = true From c759c3aabb70e59ed85ea8720bc5bfde1cac241c Mon Sep 17 00:00:00 2001 From: Jakob Fritz Date: Thu, 2 May 2024 11:12:03 +0200 Subject: [PATCH 24/47] Adde first version of documentation for new projects --- CONTRIBUTING.md | 1 + docs/contrib/06_new_project.md | 40 ++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 docs/contrib/06_new_project.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0ea0d6a70a..500d94c020 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -15,5 +15,6 @@ This follows a specific OOP framework, you can look at the page on [custom imple 4. [Naming Conventions](./docs/contrib/03_naming_conventions.md) 5. [Custom Implementations](./docs/contrib/04_custom_implementations.md) 6. [Documenting Code](./docs/contrib/05_documenting_code.md) +7. [Adding a project](./docs/contrib/06_new_project.md) :arrow_left: [Back to main page](./README.md) diff --git a/docs/contrib/06_new_project.md b/docs/contrib/06_new_project.md new file mode 100644 index 0000000000..7a8708a855 --- /dev/null +++ b/docs/contrib/06_new_project.md @@ -0,0 +1,40 @@ +# Adding a project to pySDC (and automatic testing) + +When adding a new project to pySDC, it needs to be tested. +In order to run those tests as fast as possible, a few steps are needed, that are given below. + +## Add a directory in 'pySDC/projects' + +First, create a new directory in `pySDC/projects` with the name of your project. +The code of the new project should go into that newly created directory. + +## Add an environment-file + +In addition to the codde of your projects, an environment-file is needed. +This includes the dependencies that are required for your project to run. +The file needs to be named `env_update.yml` and needs to follow the structure shown below: + +```yaml +name: pySDC +channels: + - conda-forge + - defaults +dependencies: + - numpy +``` + +The list of dependencies can be extended as needed. +The name should stay `pySDC`. The channels cover most of the usual packages. +If a package is needed that cannot be found in those channels by conda (or mamba), +please add the correct channel to the list. + +## Add tests to the project + +In order to automatically find the tests of your project, please add the tests to a subdirectory called `tests` in the directory of your project. Furthermore, the files should start with `test_` and the functions should also start with that. For more information see the documentation of pytest on [test discovery](). + +## Add the project in the CI-file + +To run the tests of all projects in parallel, the projects are explicitly mentioned in the CI-file. +In order to run the tests of your project, please add the name of your project **as your directory is named** +in the [CI-File](./../../.github/workflows/ci_pipeline.yml) +in the job `project_cpu_tests_linux` in the list `strategy/matrix/env`. From 908919153e12d7ba313fb44d5b05b1b99d7c9008 Mon Sep 17 00:00:00 2001 From: Jakob Fritz Date: Thu, 2 May 2024 12:17:04 +0200 Subject: [PATCH 25/47] Moved pytest dependencies into separate file --- .github/workflows/ci_pipeline.yml | 6 +++++- etc/environment-base.yml | 5 ----- etc/environment-cupy.yml | 4 ---- etc/environment-fenics.yml | 4 ---- etc/environment-mpi4py.yml | 3 --- etc/environment-petsc.yml | 4 ---- etc/environment-tests.yml | 11 +++++++++++ 7 files changed, 16 insertions(+), 21 deletions(-) create mode 100644 etc/environment-tests.yml diff --git a/.github/workflows/ci_pipeline.yml b/.github/workflows/ci_pipeline.yml index f5838f94a3..ed58b90f46 100644 --- a/.github/workflows/ci_pipeline.yml +++ b/.github/workflows/ci_pipeline.yml @@ -61,6 +61,10 @@ jobs: create-args: >- python=${{ matrix.python }} + - name: Install additional packages as needed + run: | + micromamba install -y --file etc/envrionment-tests.yml --freeze-installed + - name: Run pytest for CPU stuff run: | echo "print('Loading sitecustomize.py...') @@ -126,7 +130,7 @@ jobs: - name: Install additional packages as needed run: | - micromamba install -y --file pySDC/projects/${{ matrix.env }}/env_update.yml --freeze-installed + micromamba install -y --file pySDC/projects/${{ matrix.env }}/env_update.yml --file etc/envrionment-tests.yml --freeze-installed - name: Run pytest for CPU stuff run: | diff --git a/etc/environment-base.yml b/etc/environment-base.yml index 87e4443283..6ee1d85923 100644 --- a/etc/environment-base.yml +++ b/etc/environment-base.yml @@ -9,8 +9,3 @@ dependencies: - sympy>=1.0 - numba>=0.35 - dill>=0.2.6 - - pytest - - pytest-benchmark - - pytest-timeout - - coverage[toml] - - sphinx diff --git a/etc/environment-cupy.yml b/etc/environment-cupy.yml index c847cfc5a7..dab002f58e 100644 --- a/etc/environment-cupy.yml +++ b/etc/environment-cupy.yml @@ -7,8 +7,4 @@ dependencies: - scipy>=0.17.1 - matplotlib>=3.0 - dill>=0.2.6 - - pytest - - pytest-cov - - pytest-timeout - - pytest-order - cupy diff --git a/etc/environment-fenics.yml b/etc/environment-fenics.yml index 443a45ef9e..8604b24a97 100644 --- a/etc/environment-fenics.yml +++ b/etc/environment-fenics.yml @@ -9,7 +9,3 @@ dependencies: - dill>=0.2.6 - fenics>=2019.1.0 - mpi4py<=3.1.4 - - pytest - - pytest-cov - - pytest-timeout - - pytest-order diff --git a/etc/environment-mpi4py.yml b/etc/environment-mpi4py.yml index e7539720f0..0dd3f23bb0 100644 --- a/etc/environment-mpi4py.yml +++ b/etc/environment-mpi4py.yml @@ -10,6 +10,3 @@ dependencies: - mpich - mpi4py-fft>=2.0.2 - mpi4py>=3.0.0 - - pytest - - pytest-cov - - pytest-timeout diff --git a/etc/environment-petsc.yml b/etc/environment-petsc.yml index 7b5b4f3900..cc22fd7145 100644 --- a/etc/environment-petsc.yml +++ b/etc/environment-petsc.yml @@ -10,7 +10,3 @@ dependencies: - mpich - petsc4py<3.20 - mpi4py>=3.0.0 - - pytest - - pytest-cov - - pytest-timeout - - pytest-order diff --git a/etc/environment-tests.yml b/etc/environment-tests.yml new file mode 100644 index 0000000000..3fd78e3401 --- /dev/null +++ b/etc/environment-tests.yml @@ -0,0 +1,11 @@ +name: pySDC +channels: + - conda-forge + - defaults +dependencies: + - pytest + - pytest-benchmark + - pytest-timeout + - pytest-order + - coverage[toml] + - sphinx From 0c4252a4ece2eee4a2fc927a4d15ce07c1ae0906 Mon Sep 17 00:00:00 2001 From: Jakob Fritz Date: Thu, 2 May 2024 12:20:26 +0200 Subject: [PATCH 26/47] Corrected typo --- .github/workflows/ci_pipeline.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_pipeline.yml b/.github/workflows/ci_pipeline.yml index ed58b90f46..f5324bc53f 100644 --- a/.github/workflows/ci_pipeline.yml +++ b/.github/workflows/ci_pipeline.yml @@ -63,7 +63,7 @@ jobs: - name: Install additional packages as needed run: | - micromamba install -y --file etc/envrionment-tests.yml --freeze-installed + micromamba install -y --file etc/environment-tests.yml --freeze-installed - name: Run pytest for CPU stuff run: | @@ -130,7 +130,7 @@ jobs: - name: Install additional packages as needed run: | - micromamba install -y --file pySDC/projects/${{ matrix.env }}/env_update.yml --file etc/envrionment-tests.yml --freeze-installed + micromamba install -y --file pySDC/projects/${{ matrix.env }}/env_update.yml --file etc/environment-tests.yml --freeze-installed - name: Run pytest for CPU stuff run: | From d927cd374b00414ad388678a836ef9158d12665e Mon Sep 17 00:00:00 2001 From: Jakob Fritz Date: Thu, 2 May 2024 14:19:01 +0200 Subject: [PATCH 27/47] Moved requirements for projects into separate files --- .github/workflows/ci_pipeline.yml | 4 ++-- .../environment.yml} | 4 ++++ pySDC/projects/AsympConv/environment.yml | 8 ++++++++ .../{AsympConv/env_update.yml => DAE/environment.yml} | 4 +++- pySDC/projects/FastWaveSlowWave/environment.yml | 10 ++++++++++ pySDC/projects/Hamiltonian/env_update.yml | 6 ------ pySDC/projects/Hamiltonian/environment.yml | 9 +++++++++ pySDC/projects/PinTSimE/env_update.yml | 6 ------ pySDC/projects/PinTSimE/environment.yml | 9 +++++++++ pySDC/projects/RDC/env_update.yml | 6 ------ .../{DAE/env_update.yml => RDC/environment.yml} | 4 +++- .../env_update.yml => Resilience/environment.yml} | 3 +++ .../SDC_showdown/{env_update.yml => environment.yml} | 3 +++ pySDC/projects/Second_orderSDC/env_update.yml | 6 ------ pySDC/projects/Second_orderSDC/environment.yml | 10 ++++++++++ pySDC/projects/TOMS/env_update.yml | 6 ------ pySDC/projects/TOMS/environment.yml | 8 ++++++++ pySDC/projects/matrixPFASST/env_update.yml | 6 ------ .../env_update.yml => matrixPFASST/environment.yml} | 4 +++- .../parallelSDC/{env_update.yml => environment.yml} | 4 ++++ pySDC/projects/parallelSDC_reloaded/env_update.yml | 6 ------ pySDC/projects/parallelSDC_reloaded/environment.yml | 9 +++++++++ pySDC/projects/soft_failure/env_update.yml | 6 ------ pySDC/projects/soft_failure/environment.yml | 9 +++++++++ 24 files changed, 97 insertions(+), 53 deletions(-) rename pySDC/projects/{Resilience/env_update.yml => AllenCahn_Bayreuth/environment.yml} (65%) create mode 100644 pySDC/projects/AsympConv/environment.yml rename pySDC/projects/{AsympConv/env_update.yml => DAE/environment.yml} (59%) create mode 100644 pySDC/projects/FastWaveSlowWave/environment.yml delete mode 100644 pySDC/projects/Hamiltonian/env_update.yml create mode 100644 pySDC/projects/Hamiltonian/environment.yml delete mode 100644 pySDC/projects/PinTSimE/env_update.yml create mode 100644 pySDC/projects/PinTSimE/environment.yml delete mode 100644 pySDC/projects/RDC/env_update.yml rename pySDC/projects/{DAE/env_update.yml => RDC/environment.yml} (59%) rename pySDC/projects/{AllenCahn_Bayreuth/env_update.yml => Resilience/environment.yml} (66%) rename pySDC/projects/SDC_showdown/{env_update.yml => environment.yml} (60%) delete mode 100644 pySDC/projects/Second_orderSDC/env_update.yml create mode 100644 pySDC/projects/Second_orderSDC/environment.yml delete mode 100644 pySDC/projects/TOMS/env_update.yml create mode 100644 pySDC/projects/TOMS/environment.yml delete mode 100644 pySDC/projects/matrixPFASST/env_update.yml rename pySDC/projects/{FastWaveSlowWave/env_update.yml => matrixPFASST/environment.yml} (59%) rename pySDC/projects/parallelSDC/{env_update.yml => environment.yml} (54%) delete mode 100644 pySDC/projects/parallelSDC_reloaded/env_update.yml create mode 100644 pySDC/projects/parallelSDC_reloaded/environment.yml delete mode 100644 pySDC/projects/soft_failure/env_update.yml create mode 100644 pySDC/projects/soft_failure/environment.yml diff --git a/.github/workflows/ci_pipeline.yml b/.github/workflows/ci_pipeline.yml index f5324bc53f..17d0764bf3 100644 --- a/.github/workflows/ci_pipeline.yml +++ b/.github/workflows/ci_pipeline.yml @@ -124,13 +124,13 @@ jobs: - name: Install Conda environment with Micromamba uses: mamba-org/setup-micromamba@v1 with: - environment-file: "etc/environment-base.yml" + environment-file: "pySDC/projects/${{ matrix.env }}/env_update.yml" create-args: >- python=${{ matrix.python }} - name: Install additional packages as needed run: | - micromamba install -y --file pySDC/projects/${{ matrix.env }}/env_update.yml --file etc/environment-tests.yml --freeze-installed + micromamba install -y --file etc/environment-tests.yml --freeze-installed - name: Run pytest for CPU stuff run: | diff --git a/pySDC/projects/Resilience/env_update.yml b/pySDC/projects/AllenCahn_Bayreuth/environment.yml similarity index 65% rename from pySDC/projects/Resilience/env_update.yml rename to pySDC/projects/AllenCahn_Bayreuth/environment.yml index def30a815b..91f3ae538f 100644 --- a/pySDC/projects/Resilience/env_update.yml +++ b/pySDC/projects/AllenCahn_Bayreuth/environment.yml @@ -5,3 +5,7 @@ channels: dependencies: - mpi4py>=3.0.0 - mpi4py-fft>=2.0.2 + - matplotlib>=3.0 + - dill>=0.2.6 + - scipy>=0.17.1 + diff --git a/pySDC/projects/AsympConv/environment.yml b/pySDC/projects/AsympConv/environment.yml new file mode 100644 index 0000000000..998ab0efa2 --- /dev/null +++ b/pySDC/projects/AsympConv/environment.yml @@ -0,0 +1,8 @@ +name: pySDC +channels: + - conda-forge + - defaults +dependencies: + - matplotlib>=3.0 + - scipy>=0.17.1 + - dill>=0.2.6 diff --git a/pySDC/projects/AsympConv/env_update.yml b/pySDC/projects/DAE/environment.yml similarity index 59% rename from pySDC/projects/AsympConv/env_update.yml rename to pySDC/projects/DAE/environment.yml index 29e9552504..3d332962d4 100644 --- a/pySDC/projects/AsympConv/env_update.yml +++ b/pySDC/projects/DAE/environment.yml @@ -3,4 +3,6 @@ channels: - conda-forge - defaults dependencies: - - pytest + - numpy + - scipy>=0.17.1 + - dill>=0.2.6 diff --git a/pySDC/projects/FastWaveSlowWave/environment.yml b/pySDC/projects/FastWaveSlowWave/environment.yml new file mode 100644 index 0000000000..d2b8d7e218 --- /dev/null +++ b/pySDC/projects/FastWaveSlowWave/environment.yml @@ -0,0 +1,10 @@ +name: pySDC +channels: + - conda-forge + - defaults +dependencies: + - numpy + - matplotlib>=3.0 + - scipy>=0.17.1 + - sympy>=1.0 + - dill>=0.2.6 diff --git a/pySDC/projects/Hamiltonian/env_update.yml b/pySDC/projects/Hamiltonian/env_update.yml deleted file mode 100644 index 29e9552504..0000000000 --- a/pySDC/projects/Hamiltonian/env_update.yml +++ /dev/null @@ -1,6 +0,0 @@ -name: pySDC -channels: - - conda-forge - - defaults -dependencies: - - pytest diff --git a/pySDC/projects/Hamiltonian/environment.yml b/pySDC/projects/Hamiltonian/environment.yml new file mode 100644 index 0000000000..59d683a4c9 --- /dev/null +++ b/pySDC/projects/Hamiltonian/environment.yml @@ -0,0 +1,9 @@ +name: pySDC +channels: + - conda-forge + - defaults +dependencies: + - dill>=0.2.6 + - numpy + - matplotlib>=3.0 + - scipy>=0.17.1 diff --git a/pySDC/projects/PinTSimE/env_update.yml b/pySDC/projects/PinTSimE/env_update.yml deleted file mode 100644 index 29e9552504..0000000000 --- a/pySDC/projects/PinTSimE/env_update.yml +++ /dev/null @@ -1,6 +0,0 @@ -name: pySDC -channels: - - conda-forge - - defaults -dependencies: - - pytest diff --git a/pySDC/projects/PinTSimE/environment.yml b/pySDC/projects/PinTSimE/environment.yml new file mode 100644 index 0000000000..bcc3f1bc76 --- /dev/null +++ b/pySDC/projects/PinTSimE/environment.yml @@ -0,0 +1,9 @@ +name: pySDC +channels: + - conda-forge + - defaults +dependencies: + - numpy + - scipy>=0.17.1 + - dill>=0.2.6 + - matplotlib>=3.0 diff --git a/pySDC/projects/RDC/env_update.yml b/pySDC/projects/RDC/env_update.yml deleted file mode 100644 index 29e9552504..0000000000 --- a/pySDC/projects/RDC/env_update.yml +++ /dev/null @@ -1,6 +0,0 @@ -name: pySDC -channels: - - conda-forge - - defaults -dependencies: - - pytest diff --git a/pySDC/projects/DAE/env_update.yml b/pySDC/projects/RDC/environment.yml similarity index 59% rename from pySDC/projects/DAE/env_update.yml rename to pySDC/projects/RDC/environment.yml index 29e9552504..7b7d8f3827 100644 --- a/pySDC/projects/DAE/env_update.yml +++ b/pySDC/projects/RDC/environment.yml @@ -3,4 +3,6 @@ channels: - conda-forge - defaults dependencies: - - pytest + - numpy + - dill>=0.2.6 + - scipy>=0.17.1 diff --git a/pySDC/projects/AllenCahn_Bayreuth/env_update.yml b/pySDC/projects/Resilience/environment.yml similarity index 66% rename from pySDC/projects/AllenCahn_Bayreuth/env_update.yml rename to pySDC/projects/Resilience/environment.yml index def30a815b..557c42c949 100644 --- a/pySDC/projects/AllenCahn_Bayreuth/env_update.yml +++ b/pySDC/projects/Resilience/environment.yml @@ -5,3 +5,6 @@ channels: dependencies: - mpi4py>=3.0.0 - mpi4py-fft>=2.0.2 + - matplotlib>=3.0 + - dill>=0.2.6 + - scipy>=0.17.1 diff --git a/pySDC/projects/SDC_showdown/env_update.yml b/pySDC/projects/SDC_showdown/environment.yml similarity index 60% rename from pySDC/projects/SDC_showdown/env_update.yml rename to pySDC/projects/SDC_showdown/environment.yml index f7f3a158bd..2917d1ad6f 100644 --- a/pySDC/projects/SDC_showdown/env_update.yml +++ b/pySDC/projects/SDC_showdown/environment.yml @@ -4,3 +4,6 @@ channels: - defaults dependencies: - petsc4py<3.20 + - matplotlib>=3.0 + - dill>=0.2.6 + - scipy>=0.17.1 diff --git a/pySDC/projects/Second_orderSDC/env_update.yml b/pySDC/projects/Second_orderSDC/env_update.yml deleted file mode 100644 index 29e9552504..0000000000 --- a/pySDC/projects/Second_orderSDC/env_update.yml +++ /dev/null @@ -1,6 +0,0 @@ -name: pySDC -channels: - - conda-forge - - defaults -dependencies: - - pytest diff --git a/pySDC/projects/Second_orderSDC/environment.yml b/pySDC/projects/Second_orderSDC/environment.yml new file mode 100644 index 0000000000..95ab6a5fff --- /dev/null +++ b/pySDC/projects/Second_orderSDC/environment.yml @@ -0,0 +1,10 @@ +name: pySDC +channels: + - conda-forge + - defaults +dependencies: + - numpy + - numba>=0.35 + - dill>=0.2.6 + - matplotlib>=3.0 + - scipy>=0.17.1 diff --git a/pySDC/projects/TOMS/env_update.yml b/pySDC/projects/TOMS/env_update.yml deleted file mode 100644 index 5a0770ed0a..0000000000 --- a/pySDC/projects/TOMS/env_update.yml +++ /dev/null @@ -1,6 +0,0 @@ -name: pySDC -channels: - - conda-forge - - defaults -dependencies: - - pytest-order diff --git a/pySDC/projects/TOMS/environment.yml b/pySDC/projects/TOMS/environment.yml new file mode 100644 index 0000000000..1343111e30 --- /dev/null +++ b/pySDC/projects/TOMS/environment.yml @@ -0,0 +1,8 @@ +name: pySDC +channels: + - conda-forge + - defaults +dependencies: + - dill>=0.2.6 + - matplotlib>=3.0 + - scipy>=0.17.1 diff --git a/pySDC/projects/matrixPFASST/env_update.yml b/pySDC/projects/matrixPFASST/env_update.yml deleted file mode 100644 index 29e9552504..0000000000 --- a/pySDC/projects/matrixPFASST/env_update.yml +++ /dev/null @@ -1,6 +0,0 @@ -name: pySDC -channels: - - conda-forge - - defaults -dependencies: - - pytest diff --git a/pySDC/projects/FastWaveSlowWave/env_update.yml b/pySDC/projects/matrixPFASST/environment.yml similarity index 59% rename from pySDC/projects/FastWaveSlowWave/env_update.yml rename to pySDC/projects/matrixPFASST/environment.yml index 29e9552504..3d332962d4 100644 --- a/pySDC/projects/FastWaveSlowWave/env_update.yml +++ b/pySDC/projects/matrixPFASST/environment.yml @@ -3,4 +3,6 @@ channels: - conda-forge - defaults dependencies: - - pytest + - numpy + - scipy>=0.17.1 + - dill>=0.2.6 diff --git a/pySDC/projects/parallelSDC/env_update.yml b/pySDC/projects/parallelSDC/environment.yml similarity index 54% rename from pySDC/projects/parallelSDC/env_update.yml rename to pySDC/projects/parallelSDC/environment.yml index dfbb1a3049..ca4725d61f 100644 --- a/pySDC/projects/parallelSDC/env_update.yml +++ b/pySDC/projects/parallelSDC/environment.yml @@ -4,3 +4,7 @@ channels: - defaults dependencies: - mpi4py + - numpy + - matplotlib>=3.0 + - dill>=0.2.6 + - scipy>=0.17.1 diff --git a/pySDC/projects/parallelSDC_reloaded/env_update.yml b/pySDC/projects/parallelSDC_reloaded/env_update.yml deleted file mode 100644 index 29e9552504..0000000000 --- a/pySDC/projects/parallelSDC_reloaded/env_update.yml +++ /dev/null @@ -1,6 +0,0 @@ -name: pySDC -channels: - - conda-forge - - defaults -dependencies: - - pytest diff --git a/pySDC/projects/parallelSDC_reloaded/environment.yml b/pySDC/projects/parallelSDC_reloaded/environment.yml new file mode 100644 index 0000000000..b0c4bd2123 --- /dev/null +++ b/pySDC/projects/parallelSDC_reloaded/environment.yml @@ -0,0 +1,9 @@ +name: pySDC +channels: + - conda-forge + - defaults +dependencies: + - numpy + - matplotlib>=3.0 + - dill>=0.2.6 + - scipy>=0.17.1 diff --git a/pySDC/projects/soft_failure/env_update.yml b/pySDC/projects/soft_failure/env_update.yml deleted file mode 100644 index 29e9552504..0000000000 --- a/pySDC/projects/soft_failure/env_update.yml +++ /dev/null @@ -1,6 +0,0 @@ -name: pySDC -channels: - - conda-forge - - defaults -dependencies: - - pytest diff --git a/pySDC/projects/soft_failure/environment.yml b/pySDC/projects/soft_failure/environment.yml new file mode 100644 index 0000000000..d9f0172d84 --- /dev/null +++ b/pySDC/projects/soft_failure/environment.yml @@ -0,0 +1,9 @@ +name: pySDC +channels: + - conda-forge + - defaults +dependencies: + - dill>=0.2.6 + - numpy + - scipy>=0.17.1 + - matplotlib>=3.0 From cb20190f8aa3fa1d8e8076bce830705ca79d29e6 Mon Sep 17 00:00:00 2001 From: Jakob Fritz Date: Thu, 2 May 2024 14:31:14 +0200 Subject: [PATCH 28/47] Used wrong filename --- .github/workflows/ci_pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_pipeline.yml b/.github/workflows/ci_pipeline.yml index 17d0764bf3..70cd9bc159 100644 --- a/.github/workflows/ci_pipeline.yml +++ b/.github/workflows/ci_pipeline.yml @@ -124,7 +124,7 @@ jobs: - name: Install Conda environment with Micromamba uses: mamba-org/setup-micromamba@v1 with: - environment-file: "pySDC/projects/${{ matrix.env }}/env_update.yml" + environment-file: "pySDC/projects/${{ matrix.env }}/environment.yml" create-args: >- python=${{ matrix.python }} From f217ea1979bd12efb199f44f54f08252f0a05372 Mon Sep 17 00:00:00 2001 From: Jakob Fritz Date: Thu, 2 May 2024 14:55:00 +0200 Subject: [PATCH 29/47] Postprocessing needs other environment And should wait until also the project-tests are finished --- .github/workflows/ci_pipeline.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci_pipeline.yml b/.github/workflows/ci_pipeline.yml index 70cd9bc159..b0bb907a4b 100644 --- a/.github/workflows/ci_pipeline.yml +++ b/.github/workflows/ci_pipeline.yml @@ -287,6 +287,7 @@ jobs: needs: - lint - user_cpu_tests_linux + - project_cpu_tests_linux - user_libpressio_tests - user_monodomain_tests_linux # - wait_for_gitlab @@ -302,7 +303,7 @@ jobs: - name: Install Conda environment with Micromamba uses: mamba-org/setup-micromamba@v1 with: - environment-file: "etc/environment-base.yml" + environment-file: "etc/environment-tests.yml" - name: Downloading artifacts uses: actions/download-artifact@v3 From c2b202b2de4614cee6f521a2dc8ba75539dc08c0 Mon Sep 17 00:00:00 2001 From: Jakob Fritz Date: Thu, 2 May 2024 18:12:20 +0200 Subject: [PATCH 30/47] Updated documentation --- docs/contrib/05_documenting_code.md | 2 +- docs/contrib/06_new_project.md | 17 ++++++++++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/docs/contrib/05_documenting_code.md b/docs/contrib/05_documenting_code.md index bbbee8cbe3..efae0b56ad 100644 --- a/docs/contrib/05_documenting_code.md +++ b/docs/contrib/05_documenting_code.md @@ -90,4 +90,4 @@ A more detailed example is given [here ...](https://sphinxcontrib-napoleon.readt :arrow_left: [Back to custom implementations](./04_custom_implementations.md) --- :arrow_up: [Contributing Summary](./../../CONTRIBUTING.md) --- -:arrow_right: [Next to a cute picture of cat](https://www.vecteezy.com/photo/2098203-silver-tabby-cat-sitting-on-green-background) \ No newline at end of file +:arrow_right: [Next to Adding a new project](./06_new_project.md) diff --git a/docs/contrib/06_new_project.md b/docs/contrib/06_new_project.md index 7a8708a855..4a0280231b 100644 --- a/docs/contrib/06_new_project.md +++ b/docs/contrib/06_new_project.md @@ -1,5 +1,11 @@ # Adding a project to pySDC (and automatic testing) +When you do a project with pySDC we appreciate it if you merge it back to the main repository. +We are committed to keeping your work reproducible and prevent it from fading into oblivion. +To that end, please write extensive tests for your code and add them to the project. +See the [contribution guide](./../../CONTRIBUTING.md) for general advice on testing etc. +This guide will detail only how to add a project to pySDC. + When adding a new project to pySDC, it needs to be tested. In order to run those tests as fast as possible, a few steps are needed, that are given below. @@ -10,9 +16,10 @@ The code of the new project should go into that newly created directory. ## Add an environment-file -In addition to the codde of your projects, an environment-file is needed. +The testing pipeline uses [micromamba]() +and requires an environment file for setup. This includes the dependencies that are required for your project to run. -The file needs to be named `env_update.yml` and needs to follow the structure shown below: +The file needs to be named `environment.yml` and needs to follow the structure shown below: ```yaml name: pySDC @@ -32,9 +39,13 @@ please add the correct channel to the list. In order to automatically find the tests of your project, please add the tests to a subdirectory called `tests` in the directory of your project. Furthermore, the files should start with `test_` and the functions should also start with that. For more information see the documentation of pytest on [test discovery](). -## Add the project in the CI-file +## Add the project to the continuous integration pipeline To run the tests of all projects in parallel, the projects are explicitly mentioned in the CI-file. In order to run the tests of your project, please add the name of your project **as your directory is named** in the [CI-File](./../../.github/workflows/ci_pipeline.yml) in the job `project_cpu_tests_linux` in the list `strategy/matrix/env`. + +:arrow_left: [Back to Documenting Code](./05_documenting_code.md) --- +:arrow_up: [Contributing Summary](./../../CONTRIBUTING.md) --- +:arrow_right: [Next to a cute picture of cat](https://www.vecteezy.com/photo/2098203-silver-tabby-cat-sitting-on-green-background) \ No newline at end of file From 51a6f3913a726d4738ea8dca0b1dc758787163fe Mon Sep 17 00:00:00 2001 From: Jakob Fritz Date: Thu, 2 May 2024 18:13:07 +0200 Subject: [PATCH 31/47] This environment-file makes job run faster locally (and succeed) --- pySDC/projects/parallelSDC/environment.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pySDC/projects/parallelSDC/environment.yml b/pySDC/projects/parallelSDC/environment.yml index ca4725d61f..45f8cb089f 100644 --- a/pySDC/projects/parallelSDC/environment.yml +++ b/pySDC/projects/parallelSDC/environment.yml @@ -3,8 +3,9 @@ channels: - conda-forge - defaults dependencies: - - mpi4py - - numpy - - matplotlib>=3.0 - - dill>=0.2.6 + - numpy>=1.15.4 - scipy>=0.17.1 + - matplotlib>=3.0,<=3.5.3 + - dill>=0.2.6 + - mpich + - mpi4py>=3.0.0 From 0765de6011ab781e9e5ad624558a76f8e9064286 Mon Sep 17 00:00:00 2001 From: Jakob Fritz Date: Thu, 2 May 2024 18:37:20 +0200 Subject: [PATCH 32/47] Moved sphinx into separate environment for creation of pages --- .github/workflows/ci_pipeline.yml | 2 +- etc/environment-postprocess.yml | 7 +++++++ etc/environment-tests.yml | 1 - 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 etc/environment-postprocess.yml diff --git a/.github/workflows/ci_pipeline.yml b/.github/workflows/ci_pipeline.yml index b0bb907a4b..bd38d1fa43 100644 --- a/.github/workflows/ci_pipeline.yml +++ b/.github/workflows/ci_pipeline.yml @@ -303,7 +303,7 @@ jobs: - name: Install Conda environment with Micromamba uses: mamba-org/setup-micromamba@v1 with: - environment-file: "etc/environment-tests.yml" + environment-file: "etc/environment-postprocess.yml" - name: Downloading artifacts uses: actions/download-artifact@v3 diff --git a/etc/environment-postprocess.yml b/etc/environment-postprocess.yml new file mode 100644 index 0000000000..9f3d64c01a --- /dev/null +++ b/etc/environment-postprocess.yml @@ -0,0 +1,7 @@ +name: pySDC +channels: + - conda-forge + - defaults +dependencies: + - coverage[toml] + - sphinx diff --git a/etc/environment-tests.yml b/etc/environment-tests.yml index 3fd78e3401..e96ec1050c 100644 --- a/etc/environment-tests.yml +++ b/etc/environment-tests.yml @@ -8,4 +8,3 @@ dependencies: - pytest-timeout - pytest-order - coverage[toml] - - sphinx From eebbdd3b89a71f3c3063efccfab926abde748fea Mon Sep 17 00:00:00 2001 From: Jakob Fritz Date: Fri, 3 May 2024 10:34:50 +0200 Subject: [PATCH 33/47] Added more python-versions again --- .github/workflows/ci_pipeline.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci_pipeline.yml b/.github/workflows/ci_pipeline.yml index bd38d1fa43..5dacc89435 100644 --- a/.github/workflows/ci_pipeline.yml +++ b/.github/workflows/ci_pipeline.yml @@ -43,8 +43,7 @@ jobs: strategy: matrix: env: ['base', 'fenics', 'mpi4py', 'petsc'] - # python: ['3.8', '3.9', '3.10'] - python: ['3.10'] + python: ['3.8', '3.9', '3.10', '3.11', '3.12'] defaults: run: @@ -110,8 +109,7 @@ jobs: - Second_orderSDC - soft_failure - TOMS - # python: ['3.8', '3.9', '3.10'] - python: ['3.10'] + python: ['3.8', '3.9', '3.10', '3.11', '3.12'] defaults: run: From b858c33c7fdec93b049845f5232f5b817c127c27 Mon Sep 17 00:00:00 2001 From: Jakob Fritz Date: Fri, 3 May 2024 10:37:25 +0200 Subject: [PATCH 34/47] Readded pytest markers for libpressio and monodomain --- .github/workflows/ci_pipeline.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_pipeline.yml b/.github/workflows/ci_pipeline.yml index 5dacc89435..302951f0fa 100644 --- a/.github/workflows/ci_pipeline.yml +++ b/.github/workflows/ci_pipeline.yml @@ -178,7 +178,7 @@ jobs: source /opt/spack/share/spack/setup-env.sh spack load libpressio - coverage run -m pytest --continue-on-collection-errors -v --durations=0 pySDC/projects/compression/tests + coverage run -m pytest --continue-on-collection-errors -v --durations=0 pySDC/projects/compression/tests -m libpressio - name: Make coverage report run: | @@ -226,7 +226,7 @@ jobs: echo "print('Loading sitecustomize.py...') import coverage coverage.process_startup() " > sitecustomize.py - coverage run -m pytest --continue-on-collection-errors -v --durations=0 pySDC/projects/Monodomain/tests + coverage run -m pytest --continue-on-collection-errors -v --durations=0 pySDC/projects/Monodomain/tests -m monodomain - name: Make coverage report run: | From 1a4b58f591c1e0a0f1fe1e22922c3f16a81f046c Mon Sep 17 00:00:00 2001 From: Jakob Fritz Date: Fri, 3 May 2024 10:40:39 +0200 Subject: [PATCH 35/47] Added text from robert about how to get a pySDC-version --- docs/contrib/06_new_project.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/contrib/06_new_project.md b/docs/contrib/06_new_project.md index 4a0280231b..bc6bb94b0a 100644 --- a/docs/contrib/06_new_project.md +++ b/docs/contrib/06_new_project.md @@ -37,7 +37,9 @@ please add the correct channel to the list. ## Add tests to the project -In order to automatically find the tests of your project, please add the tests to a subdirectory called `tests` in the directory of your project. Furthermore, the files should start with `test_` and the functions should also start with that. For more information see the documentation of pytest on [test discovery](). +In order to automatically find the tests of your project, please add the tests to a subdirectory called `tests` in the directory of your project. +Furthermore, the files should start with `test_` and the functions should also start with that. +For more information see the documentation of pytest on [test discovery](). ## Add the project to the continuous integration pipeline @@ -46,6 +48,13 @@ In order to run the tests of your project, please add the name of your project * in the [CI-File](./../../.github/workflows/ci_pipeline.yml) in the job `project_cpu_tests_linux` in the list `strategy/matrix/env`. +## Getting a DOI of pySDC for publication + +If your project is published and you need a dedicated pySDC version with a DOI, please get in touch with us and/or open a new issue. +We will help you with this as soon as possible. +Note that a final DOI is usually only necessary once a paper is accepted and the final proofs are due. +We strongly encourage to describe and cite the current version of pySDC already during initial submission, though. + :arrow_left: [Back to Documenting Code](./05_documenting_code.md) --- :arrow_up: [Contributing Summary](./../../CONTRIBUTING.md) --- :arrow_right: [Next to a cute picture of cat](https://www.vecteezy.com/photo/2098203-silver-tabby-cat-sitting-on-green-background) \ No newline at end of file From 4c16d0ff9e2df50fcdf21f2597a983eec0ad57c2 Mon Sep 17 00:00:00 2001 From: Jakob Fritz Date: Fri, 3 May 2024 11:00:23 +0200 Subject: [PATCH 36/47] Added fail-fast as false to always test complete matrix Even if single jobs fail. This helps during development. It could be removed afterwards, as it reduces computation time by skipping other tests --- .github/workflows/ci_pipeline.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci_pipeline.yml b/.github/workflows/ci_pipeline.yml index 302951f0fa..4fe5338d49 100644 --- a/.github/workflows/ci_pipeline.yml +++ b/.github/workflows/ci_pipeline.yml @@ -41,6 +41,7 @@ jobs: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: env: ['base', 'fenics', 'mpi4py', 'petsc'] python: ['3.8', '3.9', '3.10', '3.11', '3.12'] From 087befdb6dad0728865261c06e8131b9844750f4 Mon Sep 17 00:00:00 2001 From: Jakob Fritz Date: Fri, 3 May 2024 11:02:07 +0200 Subject: [PATCH 37/47] Removed upper limit of matplotlib. Let's see if anything fails and if so, where --- etc/environment-mpi4py.yml | 2 +- pySDC/playgrounds/12th_PinT_Workshop/environment-tutorial.yml | 2 +- pySDC/projects/parallelSDC/environment.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/etc/environment-mpi4py.yml b/etc/environment-mpi4py.yml index 0dd3f23bb0..c33d3f6b6d 100644 --- a/etc/environment-mpi4py.yml +++ b/etc/environment-mpi4py.yml @@ -5,7 +5,7 @@ channels: dependencies: - numpy>=1.15.4 - scipy>=0.17.1 - - matplotlib>=3.0,<=3.5.3 + - matplotlib>=3.0 - dill>=0.2.6 - mpich - mpi4py-fft>=2.0.2 diff --git a/pySDC/playgrounds/12th_PinT_Workshop/environment-tutorial.yml b/pySDC/playgrounds/12th_PinT_Workshop/environment-tutorial.yml index f8ce023019..7384dd9512 100644 --- a/pySDC/playgrounds/12th_PinT_Workshop/environment-tutorial.yml +++ b/pySDC/playgrounds/12th_PinT_Workshop/environment-tutorial.yml @@ -5,7 +5,7 @@ channels: dependencies: - numpy>=1.15.4 - scipy>=0.17.1 - - matplotlib>=3.0,<=3.5.3 + - matplotlib>=3.0 - dill>=0.2.6 - mpich - mpi4py>=3.0.0 diff --git a/pySDC/projects/parallelSDC/environment.yml b/pySDC/projects/parallelSDC/environment.yml index 45f8cb089f..e15979d3b0 100644 --- a/pySDC/projects/parallelSDC/environment.yml +++ b/pySDC/projects/parallelSDC/environment.yml @@ -5,7 +5,7 @@ channels: dependencies: - numpy>=1.15.4 - scipy>=0.17.1 - - matplotlib>=3.0,<=3.5.3 + - matplotlib>=3.0 - dill>=0.2.6 - mpich - mpi4py>=3.0.0 From 8a0271f1d2ffb90f9ebd0f5715efefbb3f98d06d Mon Sep 17 00:00:00 2001 From: Jakob Fritz Date: Fri, 3 May 2024 11:09:36 +0200 Subject: [PATCH 38/47] Removed lines in docs --- docs/contrib/06_new_project.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/docs/contrib/06_new_project.md b/docs/contrib/06_new_project.md index bc6bb94b0a..8fa8c0213a 100644 --- a/docs/contrib/06_new_project.md +++ b/docs/contrib/06_new_project.md @@ -6,9 +6,6 @@ To that end, please write extensive tests for your code and add them to the proj See the [contribution guide](./../../CONTRIBUTING.md) for general advice on testing etc. This guide will detail only how to add a project to pySDC. -When adding a new project to pySDC, it needs to be tested. -In order to run those tests as fast as possible, a few steps are needed, that are given below. - ## Add a directory in 'pySDC/projects' First, create a new directory in `pySDC/projects` with the name of your project. From 782c0bcad35d3b1940359ae85e9765c940491229 Mon Sep 17 00:00:00 2001 From: Jakob Fritz Date: Fri, 3 May 2024 11:53:45 +0200 Subject: [PATCH 39/47] Added mpich for project resilience --- pySDC/projects/Resilience/environment.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/pySDC/projects/Resilience/environment.yml b/pySDC/projects/Resilience/environment.yml index 557c42c949..a085015a2d 100644 --- a/pySDC/projects/Resilience/environment.yml +++ b/pySDC/projects/Resilience/environment.yml @@ -5,6 +5,7 @@ channels: dependencies: - mpi4py>=3.0.0 - mpi4py-fft>=2.0.2 + - mpich - matplotlib>=3.0 - dill>=0.2.6 - scipy>=0.17.1 From 6ba1eba5f758747e33575216ddf0cd5886736722 Mon Sep 17 00:00:00 2001 From: Jakob Fritz Date: Fri, 3 May 2024 12:05:48 +0200 Subject: [PATCH 40/47] Readded upper limit for matplotlib As otherwise, the tests take very long --- pySDC/projects/parallelSDC/environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pySDC/projects/parallelSDC/environment.yml b/pySDC/projects/parallelSDC/environment.yml index e15979d3b0..45f8cb089f 100644 --- a/pySDC/projects/parallelSDC/environment.yml +++ b/pySDC/projects/parallelSDC/environment.yml @@ -5,7 +5,7 @@ channels: dependencies: - numpy>=1.15.4 - scipy>=0.17.1 - - matplotlib>=3.0 + - matplotlib>=3.0,<=3.5.3 - dill>=0.2.6 - mpich - mpi4py>=3.0.0 From 8b127fa723a3f81e3de30a5b128d242b7c21198e Mon Sep 17 00:00:00 2001 From: Jakob Fritz Date: Fri, 3 May 2024 12:47:14 +0200 Subject: [PATCH 41/47] Unified two similar tests --- .../tests/test_preconditioner_MPI.py | 26 ++----------------- 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/pySDC/projects/parallelSDC/tests/test_preconditioner_MPI.py b/pySDC/projects/parallelSDC/tests/test_preconditioner_MPI.py index 80582825a0..1be3ecf314 100644 --- a/pySDC/projects/parallelSDC/tests/test_preconditioner_MPI.py +++ b/pySDC/projects/parallelSDC/tests/test_preconditioner_MPI.py @@ -6,35 +6,13 @@ @pytest.mark.slow @pytest.mark.mpi4py @pytest.mark.timeout(0) -def test_preconditioner_playground_MPI_5(): +@pytest.mark.parametrize('num_procs', [3,5]) +def test_preconditioner_playground_MPI(num_procs): # Set python path once my_env = os.environ.copy() my_env['PYTHONPATH'] = '../../..:.' my_env['COVERAGE_PROCESS_START'] = 'pyproject.toml' cwd = '.' - num_procs = 5 - cmd = ( - 'mpirun -np ' + str(num_procs) + ' python pySDC/projects/parallelSDC/preconditioner_playground_MPI.py' - ).split() - p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=my_env, cwd=cwd) - p.wait() - for line in p.stdout: - print(line) - for line in p.stderr: - print(line) - assert p.returncode == 0, 'ERROR: did not get return code 0, got %s with %2i processes' % (p.returncode, num_procs) - - -@pytest.mark.slow -@pytest.mark.mpi4py -@pytest.mark.timeout(0) -def test_preconditioner_playground_MPI_3(): - # Set python path once - my_env = os.environ.copy() - my_env['PYTHONPATH'] = '../../..:.' - my_env['COVERAGE_PROCESS_START'] = 'pyproject.toml' - cwd = '.' - num_procs = 3 cmd = ( 'mpirun -np ' + str(num_procs) + ' python pySDC/projects/parallelSDC/preconditioner_playground_MPI.py' ).split() From 170ffacc0765c2f1b4ae8cfbcd6039d7345a4b1b Mon Sep 17 00:00:00 2001 From: Jakob Fritz Date: Fri, 3 May 2024 18:15:39 +0200 Subject: [PATCH 42/47] Exclude combination of parallelSDC and newer python As I could not find and fix the specific reason for the issue --- .github/workflows/ci_pipeline.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci_pipeline.yml b/.github/workflows/ci_pipeline.yml index 4fe5338d49..40fe78b74d 100644 --- a/.github/workflows/ci_pipeline.yml +++ b/.github/workflows/ci_pipeline.yml @@ -111,6 +111,9 @@ jobs: - soft_failure - TOMS python: ['3.8', '3.9', '3.10', '3.11', '3.12'] + exclude: + - env: parallelSDC + python: ['3.11', '3.12'] defaults: run: From e40f68d606e6403b810aab2297aa8c23cd289e81 Mon Sep 17 00:00:00 2001 From: Jakob Fritz Date: Fri, 3 May 2024 18:19:43 +0200 Subject: [PATCH 43/47] Reformatted --- .github/workflows/ci_pipeline.yml | 4 +++- pySDC/projects/parallelSDC/tests/test_preconditioner_MPI.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_pipeline.yml b/.github/workflows/ci_pipeline.yml index 40fe78b74d..2030fafa97 100644 --- a/.github/workflows/ci_pipeline.yml +++ b/.github/workflows/ci_pipeline.yml @@ -113,7 +113,9 @@ jobs: python: ['3.8', '3.9', '3.10', '3.11', '3.12'] exclude: - env: parallelSDC - python: ['3.11', '3.12'] + python: '3.11' + - env: parallelSDC + python: '3.12' defaults: run: diff --git a/pySDC/projects/parallelSDC/tests/test_preconditioner_MPI.py b/pySDC/projects/parallelSDC/tests/test_preconditioner_MPI.py index 1be3ecf314..9e0a72aabe 100644 --- a/pySDC/projects/parallelSDC/tests/test_preconditioner_MPI.py +++ b/pySDC/projects/parallelSDC/tests/test_preconditioner_MPI.py @@ -6,7 +6,7 @@ @pytest.mark.slow @pytest.mark.mpi4py @pytest.mark.timeout(0) -@pytest.mark.parametrize('num_procs', [3,5]) +@pytest.mark.parametrize('num_procs', [3, 5]) def test_preconditioner_playground_MPI(num_procs): # Set python path once my_env = os.environ.copy() From 33e00d8f2239d56187a4732cecbd5c6792c4134e Mon Sep 17 00:00:00 2001 From: Jakob Fritz Date: Mon, 6 May 2024 09:10:20 +0200 Subject: [PATCH 44/47] Print content of data-dir for debugging --- .github/workflows/ci_pipeline.yml | 6 ++++++ etc/environment-postprocess.yml | 2 ++ 2 files changed, 8 insertions(+) diff --git a/.github/workflows/ci_pipeline.yml b/.github/workflows/ci_pipeline.yml index 2030fafa97..a5c66a3bfd 100644 --- a/.github/workflows/ci_pipeline.yml +++ b/.github/workflows/ci_pipeline.yml @@ -149,6 +149,12 @@ jobs: coverage combine mv .coverage coverage_${{ matrix.env }}_${{ matrix.python }}.dat + - name: Print for Debugging + if: matrix.python == '3.10' + run: | + pwd + ls -lah data_3.10 + - name: Uploading artifacts uses: actions/upload-artifact@v3 if: matrix.python == '3.10' diff --git a/etc/environment-postprocess.yml b/etc/environment-postprocess.yml index 9f3d64c01a..b9d93619dd 100644 --- a/etc/environment-postprocess.yml +++ b/etc/environment-postprocess.yml @@ -5,3 +5,5 @@ channels: dependencies: - coverage[toml] - sphinx + - numpy + - scipy From 3e9ada140701ffd4da2aad87ad642b16cd3ae77f Mon Sep 17 00:00:00 2001 From: Jakob Fritz Date: Mon, 6 May 2024 09:51:26 +0200 Subject: [PATCH 45/47] Added dependencies to postprocessing --- etc/environment-postprocess.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/etc/environment-postprocess.yml b/etc/environment-postprocess.yml index b9d93619dd..88926a7cbe 100644 --- a/etc/environment-postprocess.yml +++ b/etc/environment-postprocess.yml @@ -7,3 +7,6 @@ dependencies: - sphinx - numpy - scipy + - matplotlib + - dill + - numba From dbfef28896d73a9304ccbc84a29a52c18887dd6c Mon Sep 17 00:00:00 2001 From: Jakob Fritz Date: Mon, 6 May 2024 09:51:49 +0200 Subject: [PATCH 46/47] Updated path to CI-File in documentation Now it uses a Github-URL instead of a relative path --- docs/contrib/06_new_project.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/contrib/06_new_project.md b/docs/contrib/06_new_project.md index 8fa8c0213a..059da620a5 100644 --- a/docs/contrib/06_new_project.md +++ b/docs/contrib/06_new_project.md @@ -42,7 +42,7 @@ For more information see the documentation of pytest on [test discovery]() in the job `project_cpu_tests_linux` in the list `strategy/matrix/env`. ## Getting a DOI of pySDC for publication From b851eebad7908dbec6e51ce85c0071fff45b4967 Mon Sep 17 00:00:00 2001 From: Jakob Fritz Date: Mon, 6 May 2024 09:53:19 +0200 Subject: [PATCH 47/47] Removed printing in CI again (added for debugging) --- .github/workflows/ci_pipeline.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/ci_pipeline.yml b/.github/workflows/ci_pipeline.yml index a5c66a3bfd..2030fafa97 100644 --- a/.github/workflows/ci_pipeline.yml +++ b/.github/workflows/ci_pipeline.yml @@ -149,12 +149,6 @@ jobs: coverage combine mv .coverage coverage_${{ matrix.env }}_${{ matrix.python }}.dat - - name: Print for Debugging - if: matrix.python == '3.10' - run: | - pwd - ls -lah data_3.10 - - name: Uploading artifacts uses: actions/upload-artifact@v3 if: matrix.python == '3.10'