-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from fusion-energy/adding_ci_for_Examples
added examples ci
- Loading branch information
Showing
7 changed files
with
102 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
|
||
# This CI will launch a Docker image that contains all the dependencies required | ||
# within that image the pytest test suite is run | ||
|
||
|
||
name: CI with examples | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- develop | ||
- main | ||
|
||
jobs: | ||
testing: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: continuumio/miniconda3 | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: install package | ||
run: | | ||
pip install . | ||
- name: install cadquery as needed by the examples | ||
run: | | ||
apt-get --allow-releaseinfo-change update | ||
apt-get update -y | ||
apt-get upgrade -y | ||
apt-get install -y libgl1-mesa-glx libgl1-mesa-dev libglu1-mesa-dev freeglut3-dev libosmesa6 libosmesa6-dev libgles2-mesa-dev | ||
conda install -c conda-forge mamba | ||
mamba install -c conda-forge moab | ||
conda install -c cadquery -c conda-forge cadquery=master | ||
- name: Run examples | ||
run: | | ||
cd examples | ||
python one_volume_cadquery_tesselation.py | ||
python one_volume_mesh.py | ||
python two_volume_mesh.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,19 @@ | ||
import cadquery as cq | ||
import os | ||
from vertices_to_h5m import vertices_to_h5m | ||
|
||
result = cq.Workplane("front").box(2.0, 2.0, 0.5) | ||
|
||
# the inbuild cadquery tessellate does not quite do what is needed for multi | ||
# parts geometry but work for single part geometry. | ||
# The cad_to_dagmc package will provide a modified tessellate function in the future | ||
vertices, triangles = result.val().tessellate(tolerance=0.1) | ||
|
||
vertices_to_h5m( | ||
vertices=vertices, | ||
triangles=triangles, | ||
triangles=[triangles], | ||
material_tags=["mat1"], | ||
h5m_filename="one_cadquery_volume.h5m", | ||
) | ||
|
||
import os | ||
|
||
os.system("mbconvert one_cadquery_volume.h5m one_cadquery_volume.vtk") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters