Skip to content

Commit

Permalink
FIX: configobj
Browse files Browse the repository at this point in the history
  • Loading branch information
larsoner committed Sep 6, 2024
1 parent 7b7f805 commit 17e9344
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/run-mayavi-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
run: |
set -exo pipefail
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade "${{ matrix.qt-api }}" numpy "${{ matrix.vtk }}" pillow pytest traits traitsui
python -m pip install --upgrade "${{ matrix.qt-api }}" numpy "${{ matrix.vtk }}" pillow pytest traits traitsui configobj
- name: Install mayavi and tvtk
run: python -um pip install -ve .[app]
- name: Test Mayavi package
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ docs/build/

docs/html.zip
tvtk/tvtk_classes.zip
tvtk/tvtk_classes/
mayavi/images/m2_about.jpg
2 changes: 1 addition & 1 deletion mayavi/tools/data_wizards/loadtxt.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def _getconv(dtype):
return lambda x: int(float(x))
elif issubclass(typ, np.floating):
return float
elif issubclass(typ, np.complex128):
elif issubclass(typ, np.complexfloating):
return complex
else:
return str
Expand Down
4 changes: 2 additions & 2 deletions tvtk/code_gen.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
"""This module generates tvtk (Traited VTK) classes from the VTK-Python API.
This can be evoked for example by:
This can be evoked for example by running from the ``mayavi`` root:
..code-block:: console
$ python -ic "from tvtk.code_gen import main; main()" -szv
$ python -m tvtk.code_gen -szvno $PWD/tvtk
On failures you can then for example do ``import pdb; pdb.pm()`` to do
post-mortem debugging.
Expand Down
6 changes: 5 additions & 1 deletion tvtk/tests/test_array_ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@
# Copyright (c) 2005, Enthought, Inc.
# License: BSD Style.

import pytest
import unittest

import numpy

from tvtk.array_handler import ID_TYPE_CODE, set_id_type_array_py
from tvtk.array_ext import set_id_type_array
try:
from tvtk.array_ext import set_id_type_array
except ModuleNotFoundError: # not compiled
pytest.skip("array_ext not found", allow_module_level=True)


class TestArrayExt(unittest.TestCase):
Expand Down
14 changes: 7 additions & 7 deletions tvtk/wrapper_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -1591,22 +1591,22 @@ def _write_trait_with_range(self, klass, out, vtk_attr_name):
# the code for this trait,
# i.e. getattr(self, name_of_method)(...)
special_traits = {
'[a-zA-Z0-9]+\.Output$': (
r'[a-zA-Z0-9]+\.Output$': (
False, False, '_write_any_output'),
'[a-zA-Z0-9]+\.Source$': (
r'[a-zA-Z0-9]+\.Source$': (
False, False, '_write_any_source'),
'[a-zA-Z0-9]+\.ScalarType$': (
r'[a-zA-Z0-9]+\.ScalarType$': (
False, False, '_write_any_scalar_type'),

# In VTK > 4.5, Set/GetInput have multiple signatures
'[a-zA-Z0-9]+\.Input$': (
r'[a-zA-Z0-9]+\.Input$': (
False, False, '_write_any_input'),

'[a-zA-Z0-9]+\.InputConnection$': (
r'[a-zA-Z0-9]+\.InputConnection$': (
False, False, '_write_any_input_connection'),
'[a-zA-Z0-9\.]+FileName$': (
r'[a-zA-Z0-9\.]+FileName$': (
True, False, '_write_any_something_file_name'),
'[a-zA-Z0-9\.]+FilePrefix$': (
r'[a-zA-Z0-9\.]+FilePrefix$': (
True, False, '_write_any_something_file_prefix'),
'vtkImageReader2.HeaderSize$': (
True, False, '_write_image_reader2_header_size'),
Expand Down

0 comments on commit 17e9344

Please sign in to comment.