diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 19f6fd95..f3eddf4e 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -20,10 +20,10 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: '3.12' - name: Setup Headless Display run: | - sudo apt-get install libgl1-mesa-glx + sudo apt-get install libgl1 libglx-mesa0 sudo apt-get install -y xvfb Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & sleep 3 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 0a210545..9e4088a6 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -11,7 +11,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: "3.11" + python-version: "3.12" - name: Install Style dependencies run: | python -m pip install --upgrade pip diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fe915e07..3260339b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,7 +18,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.8', '3.9', '3.10', '3.11'] + python-version: ['3.9', '3.10', '3.11', '3.12'] os: [ubuntu-latest, macOS-latest, windows-latest] steps: - uses: actions/checkout@v4 @@ -44,7 +44,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: 3.12 - name: Build and Publish to PyPI env: TWINE_USERNAME: __token__ diff --git a/PVGeo/__init__.py b/PVGeo/__init__.py index a731b507..af6df8da 100644 --- a/PVGeo/__init__.py +++ b/PVGeo/__init__.py @@ -40,7 +40,6 @@ def tryVTK(): from .interface import * # VTK-dependent imports complete -from . import version from .cmaps import * # Project MetaData @@ -49,7 +48,3 @@ def tryVTK(): __copyright__ = '2018, Bane Sullivan' __version__ = '3.0.1' __displayname__ = 'PVGeo' - - -# Now check that NumPy is at a satisfactory version -version.check_numpy() diff --git a/PVGeo/filters/voxelize.py b/PVGeo/filters/voxelize.py index aacd4dd3..be0fc84a 100644 --- a/PVGeo/filters/voxelize.py +++ b/PVGeo/filters/voxelize.py @@ -17,7 +17,6 @@ from .. import _helpers, interface from ..base import FilterBase -from ..version import check_numpy from .xyz import RotationTool ############################################################################### @@ -102,8 +101,6 @@ def estimate_uniform_spacing(self, x, y, z): def points_to_grid(self, xo, yo, zo, dx, dy, dz, grid=None): """Convert XYZ points to a ``vtkUnstructuredGrid``.""" - if not check_numpy(alert='warn'): - return grid if grid is None: grid = vtk.vtkUnstructuredGrid() diff --git a/PVGeo/readers/delimited.py b/PVGeo/readers/delimited.py index 58799bc3..d59ad708 100644 --- a/PVGeo/readers/delimited.py +++ b/PVGeo/readers/delimited.py @@ -124,7 +124,7 @@ def _file_contents_to_data_frame(self, contents): df = pd.read_csv( StringIO("\n".join(content)), names=self.get_titles(), - delim_whitespace=self.get_split_on_white_space(), + sep=r'\s+', ) else: df = pd.read_csv( diff --git a/PVGeo/ubc/tensor.py b/PVGeo/ubc/tensor.py index f05e1a11..17196d15 100644 --- a/PVGeo/ubc/tensor.py +++ b/PVGeo/ubc/tensor.py @@ -200,7 +200,7 @@ def ubc_model_2d(FileName): ) names = ['col%d' % i for i in range(dim[0])] df = pd.read_csv( - FileName, names=names, delim_whitespace=True, skiprows=1, comment='!' + FileName, names=names, sep=r'\s+', skiprows=1, comment='!' ) data = df.values if np.shape(data)[0] != dim[1] and np.shape(data)[1] != dim[0]: @@ -484,7 +484,7 @@ def _read_up_front(self): self.__indices = pd.read_csv( StringIO("\n".join(content[1::])), names=['i', 'j', 'k'], - delim_whitespace=True, + sep=r'\s+', ) # NOTE: K indices are inverted self.need_to_read(flag=False) diff --git a/PVGeo/version.py b/PVGeo/version.py deleted file mode 100644 index 2ec6d76d..00000000 --- a/PVGeo/version.py +++ /dev/null @@ -1,37 +0,0 @@ -__all__ = [ - 'check_numpy', -] - -__displayname__ = 'Version Verifier' - -try: - from ._helpers import PVGeoError -except ImportError: - PVGeoError = RuntimeError - - -def check_numpy(alert='print'): - """A method to check the active environment's version of NumPy for - compatibility with PVGeo. - - Args: - alert (str): raise a ``'warn'`` (warning) or an ``'error'`` (PVGeoError) if NumPy is not at a satisfactory version. - """ - import warnings - - import numpy as np - - v = np.array(np.__version__.split('.')[0:2], dtype=int) - if v[0] >= 1 and v[1] >= 10: - return True - msg = ( - 'WARNING: Your version of NumPy is below 1.10.x (you are using %s), please update the NumPy module used in ParaView for performance enhancement. Some filters/readers may be unavailable or crash otherwise.' - % np.__version__ - ) - if alert == 'error': - raise PVGeoError(msg) - elif alert == 'warn': - warnings.warn(msg) - elif alert == 'print': - print(msg) - return False diff --git a/README.md b/README.md index e6ddc463..09c3c3fb 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ environment (we highly recommend using anaconda) and install *PVGeo* through pip pip install PVGeo ``` -Now *PVGeo* is ready for use in your standard Python environment (>=3.8) +Now *PVGeo* is ready for use in your standard Python environment (>=3.9) with all dependencies installed! Go ahead and test your install: ```bash diff --git a/docs/source/overview/getting-started.rst b/docs/source/overview/getting-started.rst index 3fb68cd3..910251e8 100644 --- a/docs/source/overview/getting-started.rst +++ b/docs/source/overview/getting-started.rst @@ -4,7 +4,7 @@ Getting Started Using PVGeo in a Python Environment ----------------------------------- -If you'd like to use PVGeo in Python (>=3.8), then simply +If you'd like to use PVGeo in Python (>=3.9), then simply install PVGeo to your active Python environment with ``pip`` or ``conda`` diff --git a/requirements.txt b/requirements.txt index 003652d2..7667597a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -vtk>=8.1.1 +vtk>=8.1.1,<9.4 pyvista>=0.20.1 numpy>=1.13 scipy>=1.1 diff --git a/setup.py b/setup.py index 804db408..4435f463 100644 --- a/setup.py +++ b/setup.py @@ -36,7 +36,7 @@ + 'https://anaconda.org/anaconda/vtk' ) else: - install_requires.append(['vtk>=8.1']) + install_requires.append(['vtk>=8.1,<9.4']) setuptools.setup( name="PVGeo", @@ -49,7 +49,7 @@ url="https://github.com/OpenGeoVis/PVGeo", packages=setuptools.find_packages(), install_requires=install_requires, - python_requires='>=3.8', + python_requires='>=3.9', extras_require={ 'pyproj': ['pyproj>=1.9'], 'omf': ['omf>=0.9.3', 'omfvista>=0.2.0'],