Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix empty STL export and CI failure issues #34

Merged
merged 7 commits into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix reviewdog format
  • Loading branch information
Kayvv committed Dec 7, 2023
commit 036c1cc581c7db2d9bcb06eff8f887c915aae524
4 changes: 2 additions & 2 deletions src/sparc/client/zinchelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import os
import re

from cmlibs.exporter.vtk import ArgonSceneExporter as VTKExporter
from cmlibs.exporter.stl import ArgonSceneExporter as STLExporter
from cmlibs.exporter.vtk import ArgonSceneExporter as VTKExporter
from cmlibs.utils.zinc.field import get_group_list, field_exists
from cmlibs.zinc.context import Context
from cmlibs.zinc.result import RESULT_OK
Expand Down Expand Up @@ -171,7 +171,7 @@ def get_scaffold_as_stl(self, dataset_id, output_location=None):
field_iterator = fm.createFielditerator()
field = field_iterator.next()
while field.isValid() and not coordinates.isValid():
if field_exists(fm, field.getName(), 'FiniteElement', 3):
if field_exists(fm, field.getName(), "FiniteElement", 3):
coordinates = field

field = field_iterator.next()
Expand Down
4 changes: 1 addition & 3 deletions tests/test_zinc.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,7 @@ def _mock_get_scaffold(self, dataset_id):

def test_export_scaffold_into_stl_format_non_default_coordinates(zinc):
# create a temporary output file
output_location = os.path.abspath(
os.path.join(os.path.dirname(__file__), "resources/")
)
output_location = os.path.abspath(os.path.join(os.path.dirname(__file__), "resources/"))

zinc._get_scaffold = _mock_get_scaffold.__get__(zinc)

Expand Down