Skip to content

Comments

Test Python + NumPy in CI#405

Open
paulmelnikow wants to merge 11 commits intotinyobjloader:releasefrom
curvewise-forks:python-tests
Open

Test Python + NumPy in CI#405
paulmelnikow wants to merge 11 commits intotinyobjloader:releasefrom
curvewise-forks:python-tests

Conversation

@paulmelnikow
Copy link
Contributor

@paulmelnikow paulmelnikow commented Feb 18, 2026

Add test tasks to GitHub Actions which test the generated wheels using different Python and NumPy versions. It seems to be working well at this point. I've added four tests for issues #400 and they are all failing in the way I expect – surfacing disparities between num_face_vertices and numpy_num_face_vertices().

I've also added tests for issue #401 which is passing, and #402 is also covered in the #400 tests so those will need further investigation at a later time.

Closes #403

@paulmelnikow paulmelnikow changed the title Rough in python tests Test Python + NumPy in CI Feb 19, 2026
@paulmelnikow paulmelnikow marked this pull request as ready for review February 19, 2026 23:28
on: [push, pull_request]

jobs:
check_format:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The format job wasn't working correctly anymore – the default Python version in Azure Pipelines no longer works with our version of black – so it needed maintenance. I moved it to GitHub Actions so all the Python CI would be in one place.

If you'd like to remove Azure Pipelines entirely, I could move the one remaining job to GitHub Actions in a follow-on PR.

working-directory: python/tests
run: uv run --project . black --check ..

build_wheels_quick:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the Python tests depend on cibuildwheel, I broke out a separate build task with just the wheels needed for testing, so that the Python tests don't take quite so long to start. (As is, the builds we need for testing take 2 minutes, which makes for slow iteration times.)

name: cibw-wheels-quick
path: ./wheelhouse/*.whl

test_wheels:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the new test task

except:
__version__ = "2.0.0rc10"

with open("README.md", "r", encoding="utf8") as fh:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was causing a warning or an error in build, since it conflicts with the readme directive in pyproject.toml.

make && ./tester
displayName: Run unit tests

- job: python_format
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the job I moved to GitHub Actions and fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Testing strategy for NumPy + Python

1 participant