has2k1 / plotnine

A Grammar of Graphics for Python
https://plotnine.org
MIT License
3.92k stars 210 forks source link

Does plotnine 0.12.3 work with mizani 0.10.0? #716

Closed penguinpee closed 10 months ago

penguinpee commented 10 months ago

It seems I wasn't paying enough attention when updating packages in Fedora. I just realized that plotnine 0.12.3 has:

https://github.com/has2k1/plotnine/blob/d1f7dbfb8ee209dadf33b26221ba3b00e10f7d9e/pyproject.toml#L27

But I already updated mizani to 0.10.0 in two branches. One being the upcoming release, Fedora 39. Could I just lower the constraint to "mizani>0.9.0,<=0.10.0"? Or is that known to break things? During build I saw one test failing related to mizani:

==================================== ERRORS ====================================
______________ ERROR collecting tests/test_annotation_logticks.py ______________
ImportError while importing test module '/builddir/build/BUILD/plotnine-0.12.3/tests/test_annotation_logticks.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/test_annotation_logticks.py:4: in <module>
    from mizani.transforms import log_format, log_trans
E   ImportError: cannot import name 'log_format' from 'mizani.transforms' (/usr/lib/python3.12/site-packages/mizani/transforms.py)
=========================== short test summary info ============================
ERROR tests/test_annotation_logticks.py
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
======================= 248 deselected, 1 error in 1.69s =======================

I saw that in master https://github.com/has2k1/plotnine/commit/bb3f84b366e93081b3679e0695f877bec6d76f71 bumped that to:

https://github.com/has2k1/plotnine/blob/ef5650c4aabb29dcfe810043fb0fc8a4ea83f14b/pyproject.toml#L26

I'm wondering if I need to apply a patch to make 0.12.3 work with mizani 0.10.0.

penguinpee commented 10 months ago

I was able to downgrade mizani to 0.9.3 in order to satisfy the requirement of plotnine.

I'd still be interested in a patch to make it work. But I can also wait for the next release of plotnine, which most likely will support mizani >=0.10.0.

has2k1 commented 10 months ago

A patch is not a good idea, mizani-0.10.0 is a has significant cant API changes and it would big mismatch.

penguinpee commented 10 months ago

All right. I'll leave things as they are right now. We have mizani 0.9.3 and plotnine 0.12.3 available in Fedora.