pymc-devs / pymc-experimental

https://pymc-experimental.readthedocs.io
Other
77 stars 49 forks source link

Fix CI errors in statspace test suite #251

Closed jessegrabowski closed 12 months ago

jessegrabowski commented 12 months ago

The statsmodels import in the statespace tests are causing everyone's CI to break. This PR fixes that.

jessegrabowski commented 12 months ago

~@ricardoV94 can you look at how I wrote the ignore statement in setup.cfg and see if you understand why it's not working?~

I think the settings files for pymc-experimental need to be consolidated -- we have a pyproject.toml, pytest.ini, and setup.cfg, and all of them have pytest flags inside. I guess only pytest.ini is actually used, though.

jessegrabowski commented 12 months ago

Down to one error, but it's in pymc.sampling.jax. This line:

    postprocessing_backend: Literal["cpu", "gpu"] | None = None,

Is not 3.9 compatible (the pipe union operator for type hints was added in 3.10).

We can either skip the test here, or patch it on the pymc side. Thoughts @twiecki @ricardoV94 ?

twiecki commented 12 months ago

@jessegrabowski Let's xfail it here, merge, and fix it on pymc.

jessegrabowski commented 12 months ago

Looks like there's already a patch in the works here: https://github.com/pymc-devs/pymc/pull/6944

jessegrabowski commented 12 months ago

Make sure those config files I removed weren't there for some other reason (related to building for instance). They seemed to just have pytest and pre-commit settings that were being ignored anyway

twiecki commented 12 months ago

You can test that by running python setup.py sdist

jessegrabowski commented 12 months ago

Worked fine, I'm merging this.