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

Updates for np 2 and more #123

Merged
merged 5 commits into from
Jun 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
35 changes: 35 additions & 0 deletions .github/workflows/check-min-numpy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Run tests

on: [pull_request]

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9]

steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@v3
- name: Install osmesa
run: |
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install libosmesa6-dev
- name: Upgrade pip
run: python -m pip install --upgrade pip
- name: Setup yt_idv
run: python -m pip install -e .[test,minimal]
- name: Run Tests
env:
PYOPENGL_PLATFORM: osmesa
run: pytest --html=report.html --self-contained-html
- uses: actions/upload-artifact@v3
name: Upload pytest report
with:
name: pytest-report
path: report.html
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ repos:
- id: setup-cfg-fmt
args: [
--include-version-classifiers,
--max-py-version=3.10,
--max-py-version=3.11,
--min-py-version=3.9,
]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
Expand Down
12 changes: 6 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
[build-system]
requires = [
"setuptools >= 19.6",
"setuptools >= 61.2",
"wheel >= 0.36.2",
"Cython >= 0.29.21, < 3.0",
"oldest-supported-numpy",
"Cython>=3.0.3",
"numpy>=2.0.0",
]

[tool.black]
line-length = 88
target-version = [
'py36',
'py37',
'py38',
'py39',
'py310',
'py311',
]
include = '\.pyi?$'
exclude = '''
Expand Down
7 changes: 4 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ classifiers =
Natural Language :: English
Programming Language :: Python :: 3
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: Implementation :: CPython
keywords = yt_idv

Expand All @@ -35,7 +35,7 @@ install_requires =
traitlets>=5.0.5
traittypes>=0.2.1
yt>=4.1.0
python_requires = >=3.8
python_requires = >=3.9
include_package_data = True
zip_safe = False

Expand All @@ -53,8 +53,9 @@ dev =
Sphinx==1.8.5
twine==1.14.0
wheel==0.33.6
minimal =
numpy<2.0
test =
PyOpenGL-accelerate
pytest>=6.2.4
pytest-html

Expand Down
2 changes: 1 addition & 1 deletion yt_idv/cameras/trackball_camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def _map_to_surface(self, mouse_x, mouse_y):

def update_orientation(self, start_x, start_y, end_x, end_y):
self.orientation = update_orientation(
self.orientation, start_x, start_y, end_x, end_y
self.orientation.astype("float64"), start_x, start_y, end_x, end_y
)

rotation_matrix = quaternion_to_rotation_matrix(self.orientation)
Expand Down
Loading