Skip to content
This repository has been archived by the owner on Aug 2, 2024. It is now read-only.

Commit

Permalink
Merge pull request #40 from fusion-energy/revert-38-adding_dag_inspec…
Browse files Browse the repository at this point in the history
…tor_to_ci

Revert "Adding dag inspector to ci"
  • Loading branch information
shimwell authored Sep 14, 2021
2 parents 2aaea52 + 67a0277 commit b8e1eda
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- run:
name: run utils tests
command:
pytest tests/test_python_api.py -vv
pytest tests/test_python_api.py -v

workflows:
version: 2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_with_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ jobs:
- name: Run test_utils
run: |
pytest tests/test_python_api.py -vv
pytest tests/test_python_api.py -v
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ RUN printf 'Fri May 28 2021' >> /root/.config/Coreform/licenses/cubit-learn.lic
# helps to identify Cubit related errrors
ENV CUBIT_VERBOSE=5

COPY requirements-test.txt requirements-test.txt
RUN pip install -r requirements-test.txt

FROM dependencies as final

Expand All @@ -84,3 +82,4 @@ COPY tests tests/
COPY examples/*.py examples/

RUN python setup.py install

7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,5 @@ method of installing is via pip.
pip install cad_to_h5m
```

[Cubit](https://coreform.com/products/coreform-cubit/) needs to be installed
separately to make full use of this package.

The [Svalinn Cubit Plugin](https://github.com/svalinn/Cubit-plugin) also needs
to be installed separately to make full use of this package.
Some Python dependencies (such as Numpy) are installed during the ```pip install cad_to_h5m``` process, however [Cubit](https://coreform.com/products/coreform-cubit/) needs
to be installed seperatly to make full use of this package.
2 changes: 0 additions & 2 deletions requirements-test.txt

This file was deleted.

4 changes: 4 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,9 @@
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
],
tests_require=[
"pytest",
],
python_requires='>=3.6',
install_requires=["pytest"],
)
16 changes: 9 additions & 7 deletions tests/test_python_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def setUp(self):
tar.extractall("tests")
tar.close()

url = "https://raw.githubusercontent.com/fusion-energy/neutronics_workflow/main/example_01_single_volume_cell_tally/stage_1_output/steel.stp"
url = "https://raw.githubusercontent.com/fusion-energy/neutronics_workflow/2f65bdeb802f2b1b25da683d13dcd2b29ffc9ed3/example_05_3D_unstructured_mesh_tally/stage_1_output/steel.stp"
urllib.request.urlretrieve(url, "tests/steel.stp")

def test_h5m_file_creation(self):
Expand Down Expand Up @@ -148,9 +148,10 @@ def test_exo_file_creation_with_different_sizes(self):
cad_to_h5m(
files_with_tags=[
{
"cad_filename": "tests/fusion_example_for_openmc_using_paramak-0.0.1/stp_files/pf_coils.stp",
"cad_filename": "tests/steel.stp",
"material_tag": "mat1",
"tet_mesh": "size 2"}],
"tet_mesh": "size 2"
}],
exo_filename="umesh_2.exo",
)

Expand All @@ -161,16 +162,17 @@ def test_exo_file_creation_with_different_sizes(self):
cad_to_h5m(
files_with_tags=[
{
"cad_filename": "tests/fusion_example_for_openmc_using_paramak-0.0.1/stp_files/pf_coils.stp",
"cad_filename": "tests/steel.stp",
"material_tag": "mat1",
"tet_mesh": "size 3"}],
"tet_mesh": "size 3"
}],
exo_filename="umesh_3.exo",
)

assert Path("umesh_3.exo").is_file()

# assert (Path("umesh_3.exo").stat().st_size >
# Path("umesh_2.exo").stat().st_size)
assert (Path("umesh_3.exo").stat().st_size >
Path("umesh_2.exo").stat().st_size)

def test_exo_file_creation_with_default_size(self):
"""Checks that a h5m file is created from stp files"""
Expand Down

0 comments on commit b8e1eda

Please sign in to comment.