brunorosilva / plotly-calplot

The easiest and best looking Calendar Heatmap you'll find, made with Plotly.
https://pypi.org/project/plotly-calplot/
104 stars 10 forks source link

Dependent on pandas version <2.0.0 #27

Closed tamidodo closed 9 months ago

tamidodo commented 1 year ago

Is there any way this could be updated to be compatible with newer releases of pandas?

brunorosilva commented 1 year ago

Hi Tammy, could you post the error you're getting? As far as I'm aware, there are not supposed to be any issues with any pandas version above 1.0.5.

tamidodo commented 1 year ago
Screenshot 2023-06-27 at 1 12 01 PM
tamidodo commented 1 year ago

So if I pip install pandas 2.0.2 it throws that error about plotly-calplot requiring pandas<2.0.0 and if I pip install plotly-calplot after pandas, it uninstalls the version of pandas I have and installs it's own version of pandas (1.5.3):

Screenshot 2023-06-27 at 1 13 10 PM
brunorosilva commented 1 year ago

@tamidodo thanks so much, I wasn't aware of it. I'll find a fix. Meanwhile I'd suggest you to use conda, poetry or venv so that you can install plotly_calplot and use pandas < 2.0.0 in a isolated environment (without uninstalling pandas 2.0.2 from your default env).

I'm a fan of poetry as it handles lib versioning, the commands would look like

pip install poetry
poetry init

config for your project and a pyproject.toml will be created

poetry add plotly-calplot pandas

by default it uses pypi as a host, but if your company has a custom lib repo you can change it

brunorosilva commented 1 year ago

Hi, @tamidodo

Did you try installing the libs in the inverse order? first plotly-calplot then pandas?

I've created a notebook showcasing it. Here's a gist for it.

tamidodo commented 1 year ago

To be clear, I have ways of getting around the installation and automatic uninstalling, I'm mostly just adding this issue to document it in case it's something that can be fixed in the package because as a user, you have to know about the issue to implement workarounds which just seemed a little janky.

jcbloch commented 1 year ago

+1 on updating to pandas 2 FWIW, I think this will get the job done (didn't create a PR; didn't build, didn't bump version, etc) https://github.com/AuDigent/plotly-calplot

rileywiley commented 1 year ago

To be clear, I have ways of getting around the installation and automatic uninstalling, I'm mostly just adding this issue to document it in case it's something that can be fixed in the package because as a user, you have to know about the issue to implement workarounds which just seemed a little janky.

How did you get around the issue? The rest of my app is dependent on Pandas 2 so I don't want to go downgrade.

jcbloch commented 1 year ago

please see the fork.

https://github.com/brunorosilva/plotly-calplot/compare/main...AuDigent:plotly-calplot:main