From 1b9688e5e5d453f99f7686caac8309e856fa67ed Mon Sep 17 00:00:00 2001 From: RemDelaporteMathurin Date: Fri, 13 Oct 2023 14:11:31 -0400 Subject: [PATCH 01/12] first implementation --- festim/exports/__init__.py | 0 festim/exports/vtx.py | 40 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 festim/exports/__init__.py create mode 100644 festim/exports/vtx.py diff --git a/festim/exports/__init__.py b/festim/exports/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/festim/exports/vtx.py b/festim/exports/vtx.py new file mode 100644 index 000000000..d920e78a7 --- /dev/null +++ b/festim/exports/vtx.py @@ -0,0 +1,40 @@ +from dolfinx.io import VTXWriter +import mpi4py + +class VTXExport: + """Export functions to VTX file + + Args: + filename (str): the name of the output file + + Attributes: + filename (str): the name of the output file + writer (dolfinx.io.VTXWriter): the VTX writer + + Usage: + >>> u = dolfinx.fem.Function(V) + >>> my_export = festim.VTXExport("my_export.bp") + >>> my_export.define_writer(mesh.comm, [u]) + >>> for t in range(10): + ... u.interpolate(lambda x: t * (x[0] ** 2 + x[1] ** 2 + x[2] ** 2)) + ... my_export.write(t) + """ + def __init__(self, filename: str) -> None: + self.filename = filename + + def define_writer(self, comm: mpi4py.MPI.Intracomm, functions: list) -> None: + """Define the writer + + Args: + comm (mpi4py.MPI.Intracomm): the MPI communicator + functions (list): the list of functions to export + """ + self.writer = VTXWriter(comm, self.filename, functions, "BP4") + + def write(self, t:float): + """Write functions to VTX file + + Args: + t (float): the time of export + """ + self.writer.write(t) \ No newline at end of file From 393f7b1d5f17603a6c1bcd500311c1c02337ba08 Mon Sep 17 00:00:00 2001 From: RemDelaporteMathurin Date: Fri, 13 Oct 2023 14:39:35 -0400 Subject: [PATCH 02/12] added VTX to init --- festim/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/festim/__init__.py b/festim/__init__.py index 0edcfb9ea..c2ab1ceb5 100644 --- a/festim/__init__.py +++ b/festim/__init__.py @@ -29,3 +29,5 @@ from .subdomain.surface_subdomain import SurfaceSubdomain1D from .subdomain.volume_subdomain import VolumeSubdomain1D + +from .exports.vtx import VTXExport From 1989c87623bc5d72d1c4fc3dd7eddae693dcad07 Mon Sep 17 00:00:00 2001 From: RemDelaporteMathurin Date: Fri, 13 Oct 2023 14:39:51 -0400 Subject: [PATCH 03/12] integration with HTransportModel --- festim/exports/vtx.py | 15 +++++++++++---- festim/hydrogen_transport_problem.py | 9 +++++++++ 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/festim/exports/vtx.py b/festim/exports/vtx.py index d920e78a7..12536f088 100644 --- a/festim/exports/vtx.py +++ b/festim/exports/vtx.py @@ -1,16 +1,19 @@ from dolfinx.io import VTXWriter import mpi4py + class VTXExport: """Export functions to VTX file Args: filename (str): the name of the output file + field (int): the field index to export Attributes: filename (str): the name of the output file writer (dolfinx.io.VTXWriter): the VTX writer - + field (festim.Species, list of festim.Species): the field index to export + Usage: >>> u = dolfinx.fem.Function(V) >>> my_export = festim.VTXExport("my_export.bp") @@ -19,8 +22,12 @@ class VTXExport: ... u.interpolate(lambda x: t * (x[0] ** 2 + x[1] ** 2 + x[2] ** 2)) ... my_export.write(t) """ - def __init__(self, filename: str) -> None: + + def __init__(self, filename: str, field=0) -> None: self.filename = filename + if not isinstance(field, list): + field = [field] + self.field = field def define_writer(self, comm: mpi4py.MPI.Intracomm, functions: list) -> None: """Define the writer @@ -31,10 +38,10 @@ def define_writer(self, comm: mpi4py.MPI.Intracomm, functions: list) -> None: """ self.writer = VTXWriter(comm, self.filename, functions, "BP4") - def write(self, t:float): + def write(self, t: float): """Write functions to VTX file Args: t (float): the time of export """ - self.writer.write(t) \ No newline at end of file + self.writer.write(t) diff --git a/festim/hydrogen_transport_problem.py b/festim/hydrogen_transport_problem.py index c6c971f9e..cad1e4405 100644 --- a/festim/hydrogen_transport_problem.py +++ b/festim/hydrogen_transport_problem.py @@ -110,6 +110,15 @@ def initialise(self): self.define_markers_and_measures() self.assign_functions_to_species() self.create_formulation() + self.defing_export_writers() + + def defing_export_writers(self): + """Defines the export writers of the model""" + for export in self.exports: + if isinstance(export, F.VTXExport): + export.define_writer( + MPI.COMM_WORLD, [field.solution for field in export.field] + ) def define_function_space(self): elements = ufl.FiniteElement("CG", self.mesh.mesh.ufl_cell(), 1) From 29c6b28419fdde11021fa8370ef1f1c06c0e4e00 Mon Sep 17 00:00:00 2001 From: RemDelaporteMathurin Date: Sun, 15 Oct 2023 13:05:06 -0400 Subject: [PATCH 04/12] added test + field is not optional --- festim/exports/vtx.py | 2 +- test/test_vtx.py | 60 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 test/test_vtx.py diff --git a/festim/exports/vtx.py b/festim/exports/vtx.py index 12536f088..c3f63114c 100644 --- a/festim/exports/vtx.py +++ b/festim/exports/vtx.py @@ -23,7 +23,7 @@ class VTXExport: ... my_export.write(t) """ - def __init__(self, filename: str, field=0) -> None: + def __init__(self, filename: str, field) -> None: self.filename = filename if not isinstance(field, list): field = [field] diff --git a/test/test_vtx.py b/test/test_vtx.py new file mode 100644 index 000000000..f2fb51bed --- /dev/null +++ b/test/test_vtx.py @@ -0,0 +1,60 @@ +import festim as F +import dolfinx +from mpi4py import MPI +import numpy as np + +mesh = dolfinx.mesh.create_unit_cube(MPI.COMM_WORLD, 10, 10, 10) +V = dolfinx.fem.FunctionSpace(mesh, ("Lagrange", 1)) + + +def test_vtx_export_one_function(tmpdir): + """Test can add one function to a vtx export""" + u = dolfinx.fem.Function(V) + + filename = tmpdir.join("my_export.bp") + my_export = F.VTXExport(filename, field=None) + my_export.define_writer(mesh.comm, [u]) + + for t in range(10): + u.interpolate(lambda x: t * (x[0] ** 2 + x[1] ** 2 + x[2] ** 2)) + + my_export.write(t) + + +def test_vtx_export_two_functions(tmpdir): + """Test can add two functions to a vtx export""" + u = dolfinx.fem.Function(V) + v = dolfinx.fem.Function(V) + + filename = tmpdir.join("my_export.bp") + my_export = F.VTXExport(filename, field=None) + + my_export.define_writer(mesh.comm, [u, v]) + + for t in range(10): + u.interpolate(lambda x: t * (x[0] ** 2 + x[1] ** 2 + x[2] ** 2)) + v.interpolate(lambda x: t * (x[0] ** 2 + x[1] ** 2 + x[2] ** 2)) + + my_export.write(t) + + +def test_vtx_integration_with_h_transport_problem(tmpdir): + my_model = F.HydrogenTransportProblem() + my_model.mesh = F.Mesh1D(vertices=np.array([0.0, 1.0, 2.0, 3.0, 4.0])) + my_mat = F.Material(D_0=1, E_D=0, name="mat") + my_model.subdomains = [ + F.VolumeSubdomain1D(1, borders=[0.0, 4.0], material=my_mat), + F.SurfaceSubdomain1D(1, x=0.0), + F.SurfaceSubdomain1D(2, x=4.0), + ] + my_model.species = [F.Species("H")] + my_model.temperature = 500 + + filename = tmpdir.join("my_export.bp") + my_export = F.VTXExport(filename, field=my_model.species[0]) + my_model.exports = [my_export] + + my_model.initialise() + + for t in range(10): + my_export.write(t) From ba512dd33e1ed054af9286d7aac294d1b8498fd1 Mon Sep 17 00:00:00 2001 From: RemDelaporteMathurin Date: Sun, 15 Oct 2023 13:05:12 -0400 Subject: [PATCH 05/12] added TODO --- festim/hydrogen_transport_problem.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/festim/hydrogen_transport_problem.py b/festim/hydrogen_transport_problem.py index cad1e4405..8be0ad9cd 100644 --- a/festim/hydrogen_transport_problem.py +++ b/festim/hydrogen_transport_problem.py @@ -115,6 +115,9 @@ def initialise(self): def defing_export_writers(self): """Defines the export writers of the model""" for export in self.exports: + # TODO implement when export.field is an int or str + # then find solution from index of species + if isinstance(export, F.VTXExport): export.define_writer( MPI.COMM_WORLD, [field.solution for field in export.field] From 36b7e5f67a8dc7cb9cf0c2b53e1f95a8756fd82a Mon Sep 17 00:00:00 2001 From: RemDelaporteMathurin Date: Sun, 15 Oct 2023 13:21:50 -0400 Subject: [PATCH 06/12] setters for filename and field --- festim/exports/vtx.py | 31 +++++++++++++++++++++++++++++-- test/test_vtx.py | 27 ++++++++++++++++++++++----- 2 files changed, 51 insertions(+), 7 deletions(-) diff --git a/festim/exports/vtx.py b/festim/exports/vtx.py index c3f63114c..d8008af30 100644 --- a/festim/exports/vtx.py +++ b/festim/exports/vtx.py @@ -1,6 +1,8 @@ from dolfinx.io import VTXWriter import mpi4py +import festim as F + class VTXExport: """Export functions to VTX file @@ -25,10 +27,35 @@ class VTXExport: def __init__(self, filename: str, field) -> None: self.filename = filename - if not isinstance(field, list): - field = [field] self.field = field + @property + def filename(self): + return self._filename + + @filename.setter + def filename(self, value): + if not isinstance(value, str): + raise TypeError("filename must be of type str") + if not value.endswith(".bp"): + raise ValueError("filename must end with .bp") + self._filename = value + + @property + def field(self): + return self._field + + @field.setter + def field(self, value): + if not isinstance(value, F.Species) and not isinstance(value, list): + raise TypeError( + "field must be of type festim.Species or list of festim.Species" + ) + + if not isinstance(value, list): + value = [value] + self._field = value + def define_writer(self, comm: mpi4py.MPI.Intracomm, functions: list) -> None: """Define the writer diff --git a/test/test_vtx.py b/test/test_vtx.py index f2fb51bed..e57173df3 100644 --- a/test/test_vtx.py +++ b/test/test_vtx.py @@ -3,6 +3,8 @@ from mpi4py import MPI import numpy as np +import pytest + mesh = dolfinx.mesh.create_unit_cube(MPI.COMM_WORLD, 10, 10, 10) V = dolfinx.fem.FunctionSpace(mesh, ("Lagrange", 1)) @@ -11,8 +13,8 @@ def test_vtx_export_one_function(tmpdir): """Test can add one function to a vtx export""" u = dolfinx.fem.Function(V) - filename = tmpdir.join("my_export.bp") - my_export = F.VTXExport(filename, field=None) + filename = str(tmpdir.join("my_export.bp")) + my_export = F.VTXExport(filename, field=F.Species("H")) my_export.define_writer(mesh.comm, [u]) for t in range(10): @@ -26,8 +28,8 @@ def test_vtx_export_two_functions(tmpdir): u = dolfinx.fem.Function(V) v = dolfinx.fem.Function(V) - filename = tmpdir.join("my_export.bp") - my_export = F.VTXExport(filename, field=None) + filename = str(tmpdir.join("my_export.bp")) + my_export = F.VTXExport(filename, field=[F.Species("1"), F.Species("2")]) my_export.define_writer(mesh.comm, [u, v]) @@ -50,7 +52,7 @@ def test_vtx_integration_with_h_transport_problem(tmpdir): my_model.species = [F.Species("H")] my_model.temperature = 500 - filename = tmpdir.join("my_export.bp") + filename = str(tmpdir.join("my_export.bp")) my_export = F.VTXExport(filename, field=my_model.species[0]) my_model.exports = [my_export] @@ -58,3 +60,18 @@ def test_vtx_integration_with_h_transport_problem(tmpdir): for t in range(10): my_export.write(t) + + +def test_field_attribute_is_always_list(): + """Test that the field attribute is always a list""" + my_export = F.VTXExport("my_export.bp", field=F.Species("H")) + assert isinstance(my_export.field, list) + + my_export = F.VTXExport("my_export.bp", field=[F.Species("H")]) + assert isinstance(my_export.field, list) + + +def test_filename_raises_error_with_wrong_extension(): + """Test that the filename attribute raises an error if the extension is not .bp""" + with pytest.raises(ValueError): + F.VTXExport("my_export.txt", field=[F.Species("H")]) From 9b5f4cf0b609c7bf7876adb4d84febe22253cc9e Mon Sep 17 00:00:00 2001 From: RemDelaporteMathurin Date: Sun, 15 Oct 2023 13:47:05 -0400 Subject: [PATCH 07/12] added tests + more type checks --- festim/exports/vtx.py | 11 ++++++++++- test/test_vtx.py | 14 ++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/festim/exports/vtx.py b/festim/exports/vtx.py index d8008af30..86e79364d 100644 --- a/festim/exports/vtx.py +++ b/festim/exports/vtx.py @@ -47,13 +47,22 @@ def field(self): @field.setter def field(self, value): + # check that field is festim.Species or list of festim.Species if not isinstance(value, F.Species) and not isinstance(value, list): raise TypeError( "field must be of type festim.Species or list of festim.Species" ) - + # check that all elements of list are festim.Species + if isinstance(value, list): + for element in value: + if not isinstance(element, F.Species): + raise TypeError( + "field must be of type festim.Species or list of festim.Species" + ) + # if field is festim.Species, convert to list if not isinstance(value, list): value = [value] + self._field = value def define_writer(self, comm: mpi4py.MPI.Intracomm, functions: list) -> None: diff --git a/test/test_vtx.py b/test/test_vtx.py index e57173df3..01fbe6460 100644 --- a/test/test_vtx.py +++ b/test/test_vtx.py @@ -71,7 +71,21 @@ def test_field_attribute_is_always_list(): assert isinstance(my_export.field, list) +# make test parametric to test for strings and integers +@pytest.mark.parametrize("field", ["H", 1, [F.Species("H"), 1]]) +def test_field_attribute_raises_error_when_invalid_type(field): + """Test that the field attribute raises an error if the type is not festim.Species or list""" + with pytest.raises(TypeError): + F.VTXExport("my_export.bp", field=field) + + def test_filename_raises_error_with_wrong_extension(): """Test that the filename attribute raises an error if the extension is not .bp""" with pytest.raises(ValueError): F.VTXExport("my_export.txt", field=[F.Species("H")]) + + +def test_filename_raises_error_when_wrong_type(): + """Test that the filename attribute raises an error if the extension is not .bp""" + with pytest.raises(TypeError): + F.VTXExport(1, field=[F.Species("H")]) From 8ea64579cd48c16f5ef1cf311edb7a2572d35b87 Mon Sep 17 00:00:00 2001 From: RemDelaporteMathurin Date: Sun, 15 Oct 2023 14:26:04 -0400 Subject: [PATCH 08/12] remove unused comment --- test/test_vtx.py | 1 - 1 file changed, 1 deletion(-) diff --git a/test/test_vtx.py b/test/test_vtx.py index 01fbe6460..c1b2445f7 100644 --- a/test/test_vtx.py +++ b/test/test_vtx.py @@ -71,7 +71,6 @@ def test_field_attribute_is_always_list(): assert isinstance(my_export.field, list) -# make test parametric to test for strings and integers @pytest.mark.parametrize("field", ["H", 1, [F.Species("H"), 1]]) def test_field_attribute_raises_error_when_invalid_type(field): """Test that the field attribute raises an error if the type is not festim.Species or list""" From 93f49cc7f0497449d6f101bf89d07f2b761a3b2c Mon Sep 17 00:00:00 2001 From: RemDelaporteMathurin Date: Sun, 15 Oct 2023 14:53:10 -0400 Subject: [PATCH 09/12] implemented a run method to HTransportProblem --- festim/hydrogen_transport_problem.py | 55 +++++++++++++++++++++++++++- test/test_permeation_problem.py | 52 +------------------------- 2 files changed, 55 insertions(+), 52 deletions(-) diff --git a/festim/hydrogen_transport_problem.py b/festim/hydrogen_transport_problem.py index c6c971f9e..2936e90d1 100644 --- a/festim/hydrogen_transport_problem.py +++ b/festim/hydrogen_transport_problem.py @@ -1,11 +1,14 @@ from dolfinx import fem from dolfinx.nls.petsc import NewtonSolver +from dolfinx.io import XDMFFile import ufl from mpi4py import MPI -from dolfinx.fem import Function +from dolfinx.fem import Function, form, assemble_scalar from dolfinx.mesh import meshtags -from ufl import TestFunction, dot, grad, Measure +from ufl import TestFunction, dot, grad, Measure, FacetNormal import numpy as np +import tqdm.autonotebook + import festim as F @@ -171,6 +174,10 @@ def assign_functions_to_species(self): spe.prev_solution = Function(self.function_space) spe.test_function = TestFunction(self.function_space) + # TODO remove this + self.u = self.species[0].solution + self.u_n = self.species[0].prev_solution + def create_formulation(self): """Creates the formulation of the model""" if len(self.sources) > 1: @@ -218,3 +225,47 @@ def create_solver(self): ) solver = NewtonSolver(MPI.COMM_WORLD, problem) self.solver = solver + + def run(self, final_time: float): + """Runs the model for a given time + + Args: + final_time (float): the final time of the simulation + + Returns: + list of float: the times of the simulation + list of float: the fluxes of the simulation + """ + t = 0 + times, flux_values = [], [] + + mobile_xdmf = XDMFFile(MPI.COMM_WORLD, "mobile_concentration.xdmf", "w") + mobile_xdmf.write_mesh(self.mesh.mesh) + + progress = tqdm.autonotebook.tqdm( + desc="Solving H transport problem", total=final_time + ) + while t < final_time: + progress.update(float(self.dt)) + t += float(self.dt) + + self.solver.solve(self.u) + + mobile_xdmf.write_function(self.u, t) + + cm = self.species[0].solution + # TODO this should be a property of Mesh + n = FacetNormal(self.mesh.mesh) + D = self.subdomains[0].material.get_diffusion_coefficient( + self.mesh.mesh, self.temperature + ) + surface_flux = form(D * dot(grad(cm), n) * self.ds(2)) + flux = assemble_scalar(surface_flux) + flux_values.append(flux) + times.append(t) + + # update previous solution + self.u_n.x.array[:] = self.u.x.array[:] + + mobile_xdmf.close() + return times, flux_values diff --git a/test/test_permeation_problem.py b/test/test_permeation_problem.py index b8534107e..8da02f878 100644 --- a/test/test_permeation_problem.py +++ b/test/test_permeation_problem.py @@ -81,33 +81,9 @@ def siverts_law(T, S_0, E_S, pressure): opts[f"{option_prefix}pc_factor_mat_solver_type"] = "mumps" ksp.setFromOptions() - mobile_xdmf = XDMFFile(MPI.COMM_WORLD, "mobile_concentration.xdmf", "w") - mobile_xdmf.write_mesh(my_model.mesh.mesh) - final_time = 50 - flux_values = [] - times = [] - t = 0 - progress = tqdm.autonotebook.tqdm( - desc="Solving H transport problem", total=final_time - ) - while t < final_time: - progress.update(float(my_model.dt)) - t += float(my_model.dt) - - my_model.solver.solve(u) - - mobile_xdmf.write_function(u, t) - - surface_flux = form(D * dot(grad(u), n) * my_model.ds(2)) - flux = assemble_scalar(surface_flux) - flux_values.append(flux) - times.append(t) - - mobile_H.prev_solution.x.array[:] = u.x.array[:] - - mobile_xdmf.close() + times, flux_values = my_model.run(final_time=final_time) # analytical solution S = S_0 * exp(-E_S / F.k_B / float(temperature)) @@ -211,33 +187,9 @@ def siverts_law(T, S_0, E_S, pressure): opts[f"{option_prefix}pc_factor_mat_solver_type"] = "mumps" ksp.setFromOptions() - mobile_xdmf = XDMFFile(MPI.COMM_WORLD, "mobile_concentration.xdmf", "w") - mobile_xdmf.write_mesh(my_model.mesh.mesh) - final_time = 50 - flux_values = [] - times = [] - t = 0 - progress = tqdm.autonotebook.tqdm( - desc="Solving H transport problem", total=final_time - ) - while t < final_time: - progress.update(float(my_model.dt)) - t += float(my_model.dt) - - my_model.solver.solve(u) - - mobile_xdmf.write_function(u, t) - - surface_flux = form(D * dot(grad(u), n) * my_model.ds(2)) - flux = assemble_scalar(surface_flux) - flux_values.append(flux) - times.append(t) - - mobile_H.prev_solution.x.array[:] = u.x.array[:] - - mobile_xdmf.close() + times, flux_values = my_model.run(final_time=final_time) # analytical solution S = S_0 * exp(-E_S / F.k_B / float(temperature)) From c2891686f3189fe8b7b51a8bb6d4f4560e6f86eb Mon Sep 17 00:00:00 2001 From: RemDelaporteMathurin Date: Sun, 15 Oct 2023 14:54:54 -0400 Subject: [PATCH 10/12] removed unused stuff --- test/test_permeation_problem.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/test/test_permeation_problem.py b/test/test_permeation_problem.py index 8da02f878..4eead7d14 100644 --- a/test/test_permeation_problem.py +++ b/test/test_permeation_problem.py @@ -1,16 +1,11 @@ -from mpi4py import MPI from petsc4py import PETSc -from dolfinx.io import XDMFFile from dolfinx.fem import ( Constant, dirichletbc, locate_dofs_topological, - form, - assemble_scalar, ) -from ufl import dot, grad, exp, FacetNormal +from ufl import exp, FacetNormal import numpy as np -import tqdm.autonotebook import festim as F @@ -42,10 +37,6 @@ def test_permeation_problem(): D = my_mat.get_diffusion_coefficient(my_mesh.mesh, temperature) V = my_model.function_space - u = mobile_H.solution - - # TODO this should be a property of Mesh - n = FacetNormal(my_mesh.mesh) def siverts_law(T, S_0, E_S, pressure): S = S_0 * exp(-E_S / F.k_B / T) From c9bfbc011fb29e331b5f2f823c27b55f06185b24 Mon Sep 17 00:00:00 2001 From: RemDelaporteMathurin Date: Mon, 16 Oct 2023 01:19:55 -0400 Subject: [PATCH 11/12] added vtx export to example test --- test/test_permeation_problem.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/test_permeation_problem.py b/test/test_permeation_problem.py index 4eead7d14..8ceddcda5 100644 --- a/test/test_permeation_problem.py +++ b/test/test_permeation_problem.py @@ -32,6 +32,8 @@ def test_permeation_problem(): temperature = Constant(my_mesh.mesh, 500.0) my_model.temperature = temperature + my_model.exports = [F.VTXExport("test.bp", field=mobile_H)] + my_model.initialise() D = my_mat.get_diffusion_coefficient(my_mesh.mesh, temperature) @@ -134,6 +136,8 @@ def test_permeation_problem_multi_volume(): temperature = Constant(my_mesh.mesh, 500.0) my_model.temperature = temperature + my_model.exports = [F.VTXExport("test.bp", field=mobile_H)] + my_model.initialise() D = my_mat.get_diffusion_coefficient(my_mesh.mesh, temperature) From b1f529f299b469c3f9ad08344d16e2b7113f2c4a Mon Sep 17 00:00:00 2001 From: J Dark Date: Tue, 17 Oct 2023 13:02:32 -0400 Subject: [PATCH 12/12] remove conda workflow --- .github/workflows/ci.yml | 66 ++++++++++++++++++++-------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 33036bf90..682bdeebc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,40 +2,40 @@ name: CI on: [pull_request, push] jobs: - run-on-conda: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Set up Conda - uses: conda-incubator/setup-miniconda@v2 - with: - activate-environment: myenv - mamba-version: "*" - channels: conda-forge, defaults - - - name: Create Conda environment - shell: bash -l {0} - run: | - mamba install -c conda-forge fenics-dolfinx - - - name: Install local package and dependencies - shell: bash -l {0} - run: | - pip install .[test] - - - name: Run tests - shell: bash -l {0} - run: | - pytest test/ --cov festim --cov-report xml --cov-report term + # run-on-conda: + # runs-on: ubuntu-latest + + # steps: + # - name: Checkout code + # uses: actions/checkout@v2 + + # - name: Set up Conda + # uses: conda-incubator/setup-miniconda@v2 + # with: + # activate-environment: myenv + # mamba-version: "*" + # channels: conda-forge, defaults + + # - name: Create Conda environment + # shell: bash -l {0} + # run: | + # mamba install -c conda-forge fenics-dolfinx + + # - name: Install local package and dependencies + # shell: bash -l {0} + # run: | + # pip install .[test] + + # - name: Run tests + # shell: bash -l {0} + # run: | + # pytest test/ --cov festim --cov-report xml --cov-report term - - name: Upload to codecov - uses: codecov/codecov-action@v3 - with: - token: ${{ secrets.CODECOV_TOKEN }} - files: ./coverage.xml + # - name: Upload to codecov + # uses: codecov/codecov-action@v3 + # with: + # token: ${{ secrets.CODECOV_TOKEN }} + # files: ./coverage.xml run-on-docker: runs-on: ubuntu-latest