From 67a02776123e0534bc6fbaa9423ffb893f1152e9 Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Tue, 14 Sep 2021 21:34:02 +0100 Subject: [PATCH] Revert "Adding dag inspector to ci" --- .circleci/config.yml | 2 +- .github/workflows/ci_with_install.yml | 2 +- Dockerfile | 3 +-- README.md | 7 ++----- requirements-test.txt | 2 -- setup.py | 4 ++++ tests/test_python_api.py | 16 +++++++++------- 7 files changed, 18 insertions(+), 18 deletions(-) delete mode 100644 requirements-test.txt diff --git a/.circleci/config.yml b/.circleci/config.yml index eb11a85..cffc35d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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 diff --git a/.github/workflows/ci_with_install.yml b/.github/workflows/ci_with_install.yml index 8a92ac2..2730673 100644 --- a/.github/workflows/ci_with_install.yml +++ b/.github/workflows/ci_with_install.yml @@ -26,4 +26,4 @@ jobs: - name: Run test_utils run: | - pytest tests/test_python_api.py -vv + pytest tests/test_python_api.py -v diff --git a/Dockerfile b/Dockerfile index 5e4d911..a1f91fa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 @@ -84,3 +82,4 @@ COPY tests tests/ COPY examples/*.py examples/ RUN python setup.py install + diff --git a/README.md b/README.md index 0a8974c..fac6912 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/requirements-test.txt b/requirements-test.txt deleted file mode 100644 index 6aa3f81..0000000 --- a/requirements-test.txt +++ /dev/null @@ -1,2 +0,0 @@ -dagmc_h5m_file_inspector -pytest \ No newline at end of file diff --git a/setup.py b/setup.py index 67a6ae4..5b418a9 100644 --- a/setup.py +++ b/setup.py @@ -24,5 +24,9 @@ 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', ], + tests_require=[ + "pytest", + ], python_requires='>=3.6', + install_requires=["pytest"], ) diff --git a/tests/test_python_api.py b/tests/test_python_api.py index 213e868..9bad5c6 100644 --- a/tests/test_python_api.py +++ b/tests/test_python_api.py @@ -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): @@ -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", ) @@ -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"""