enthought / chaco

Chaco is a Python package for building interactive and custom 2-D plots.
http://docs.enthought.com/chaco/
Other
291 stars 101 forks source link

Fix capitol image #880

Closed homosapien-lcy closed 1 year ago

homosapien-lcy commented 1 year ago

After the capitol.jpg moved, chaco/examples/user_guide/plot_types/create_plot_snapshots is broken, use importlib.resources to find the image for loading to fix this

homosapien-lcy commented 1 year ago

closes #879

homosapien-lcy commented 1 year ago

Can you please add an appropriate dependency to importlib_resources for Python < 3.9 here: https://github.com/enthought/chaco/blob/main/chaco/__init__.py#L19

Also a usage issue for importlib.resources.files.

Got it, just add a "check python3.9 then install importlib_resources" there. Just want to clarify, what do you mean by usage issue for importlib.resources.files?

corranwebster commented 1 year ago

Just want to clarify, what do you mean by usage issue for importlib.resources.files?

Meaning it should be used in a with statement, which you have now done.

This should be good to merge.

homosapien-lcy commented 1 year ago

Just want to clarify, what do you mean by usage issue for importlib.resources.files?

Meaning it should be used in a with statement, which you have now done.

This should be good to merge.

Thanks Corran! The merge is still block by the ci test, the good old RuntimeError Numpy... Is there anyway we can get around it?

RuntimeError: NumPy was built with baseline optimizations: 
(SSE SSE2 SSE3 SSSE3 SSE41 POPCNT SSE42 AVX F16C AVX2) but your machine doesn't support:
(AVX2).