aesara-devs / aehmc

An HMC/NUTS implementation in Aesara
MIT License
33 stars 6 forks source link

Set `filterwarnings` to `error` in the tests #79

Closed brandonwillard closed 2 years ago

brandonwillard commented 2 years ago

Our tests should not allow un-caught/checked warnings.

The addition to setup.cfg mentioned here should be sufficient. We'll need to update our tests to prevent them from failing, though.

rlouf commented 2 years ago

It looks like it was done in this commit: https://github.com/aesara-devs/aehmc/commit/dde2d83cf7865c8554b6accdfaad91613d36d154

I've tried only specifying error, and the tests fail due to a DeprecationWarning in aesara, while they pass with the current version of setup.cfg. Is that expected?

brandonwillard commented 2 years ago

It looks like it was done in this commit: dde2d83

Oh, yeah, this one can probably be closed then.

I've tried only specifying error, and the tests fail due to a DeprecationWarning in aesara, while they pass with the current version of setup.cfg. Is that expected?

The current settings should make warnings emitted from within aesara fail. I didn't enable all errors because some dependency was emitting a warning and it's mostly out of our control.

rlouf commented 2 years ago

The current settings should make warnings emitted from within aesara fail. I didn't enable all errors because some dependency was emitting a warning and it's mostly out of our control.

Aesara imports numpy.disutils which in turn raises a DeprecationWarning, so that's probably what you saw. Otherwise sounds like a sane behavior.