Skip to content

Conversation

@brownbaerchen
Copy link
Contributor

Since the regular Python assert works with booleans instead of callables, I was a bit confused why I had to add lambda for the parallel version now. The only situations where a callable is required as argument in parallel_assert that @connorjward could come up with are dubious coding practice.
So, to streamline the workflow for new users, we decided to switch to boolean argument, while still allowing callables, but raising a warning in that case.

I also added a basic CI pipeline with some unit tests for this. This includes tests that passing callables to parallel_assert still works.

Copy link
Collaborator

@connorjward connorjward left a comment

Choose a reason for hiding this comment

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

This is brilliant. Thank you!

Copy link
Collaborator

@connorjward connorjward left a comment

Choose a reason for hiding this comment

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

very very close now

@connorjward connorjward merged commit b94617b into firedrakeproject:main Mar 1, 2025
5 checks passed
@connorjward
Copy link
Collaborator

Thanks!

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.

2 participants