modified query index for compatibility with pandas#9
Conversation
|
Imcompatible with python 2.7 and 3.5, passed with python 3.6+ due to pandas version bump to v1.0. Would you consider merging the pull request? |
|
These changes look great, having similar issues with recent pandas. I hope dropping Python 2.7 support isn't an issue (shouldn't be anyway). @MarvinT Any chance this'll be merged? |
| norm=norm, | ||
| orientation='horizontal', | ||
| ticks=range(vmin, vmax + 1)) | ||
| cb1.set_label('CTimer clocks') |
There was a problem hiding this comment.
This label looks a bit weird, is it correct?
MarvinT
left a comment
There was a problem hiding this comment.
Hey @zztin , sorry I didn't get to this earlier.
Thanks for updating the package. I am comfortable removing support for 2.7 and 3.5
Any idea why 3.7 tests are failing?
We'll have to change .travis.yml to only push to the compatible py versions because right now I have it push as a universal build.
Can you also format using black?
I've added a few comments inline as well
|
|
||
| __author__ = "Marvin Thielk; Martijn Vermaat; Liting Chen" | ||
| __contact__ = "marvin.thielk@gmail.com, martijn@vermaat.name, litingchen16@gmail.com" | ||
| __homepage__ = "https://github.com/zztin/calmap" |
There was a problem hiding this comment.
I don't mind adding you as a contact but can you leave the homepage pointing to my version since that's what pypi uses.
There was a problem hiding this comment.
I have reverted the changes. This was a mistake of mine to include in this PR :)
| how="sum", | ||
| vmin=None, | ||
| vmax=None, | ||
| cmap="Reds", |
There was a problem hiding this comment.
Is there a reason to change the default behavior here? its a kwarg so if anyone wants reds they can use it but this will change everyone's plots without documenting the changes anywhere...
There was a problem hiding this comment.
I will revert the change back to its default behavior.
| vmin=0, | ||
| vmax=16, |
There was a problem hiding this comment.
I feel like the defaults should be None
There was a problem hiding this comment.
I agree. It has been changed to None.
| ylabel_kws = dict( | ||
| fontsize=32, | ||
| color=kwargs.get("fillcolor", "whitesmoke"), | ||
| color=kwargs.get("fillcolor", "silver"), |
There was a problem hiding this comment.
It has been removed from the current PR.
| cmap = plt.get_cmap(cmap) | ||
| bounds = range(vmin, vmax +1) | ||
| norm = BoundaryNorm(bounds, cmap.N, extend='both') | ||
|
|
||
| cb1 = ColorbarBase(axes[-1], | ||
| cmap=cmap, | ||
| norm=norm, | ||
| orientation='horizontal', | ||
| ticks=range(vmin, vmax + 1)) |
There was a problem hiding this comment.
adding a colorbar should be an optional thing. I personally prefer the clean look of not having a color bar.
There was a problem hiding this comment.
It has been removed from this pull request. I am planning to send another pull request regarding the option to include a heatmap at a later stage.
|
Hi all!
Yes, I will look into them asap (before next week). Sorry for the delay!
Best,
Liting
…On Fri, Mar 5, 2021 at 12:37 AM Alexander Kvist Andreasen < ***@***.***> wrote:
I am also looking for a fix to these two exact issues and I would prefer
if the colorbar and other custom changes were left out as @MarvinT
<https://github.com/MarvinT> is also questioning. Are you still up for
making the changes @zztin <https://github.com/zztin> ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#9 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AH2QX2L4R6ZL32XAIPMZ5GLTB6ZNBANCNFSM4P2E4EAA>
.
|
|
Hi everyone! This issue goes away when you install pandas 1.0.5 on colab and restart the kernel (runtime). I'm not sure if this issue is related to colab only or happens on a local environment with the same package versions but I thought it could be useful if you know and consider it in your next update. |
Tests failed with KeyError: datetime.date(2014, 1, 15) in python 3.6+ for pandas compatibility. Also fixed: calmap/init.py:181: FutureWarning: weekofyear and week have been deprecated, please use DatetimeIndex.isocalendar().week instead
Add flexibility for plotting style: option to add border per month and plot title.
|
Python 3.7 failure of Travis CI is caused by numpy version, The travis environment shows some specific versions are used. Let me have a look if they raise version dependency issue: and the corresponding requirement file content: I built from scratch for the original master (https://github.com/MarvinT/calmap) with the above requirement files and follow the pip install part of travis.yml, and I did not get the same error. The dependency issue should be raised by the other steps of travis. Besides, I also run the original master travis CI[*], and the original master (https://github.com/MarvinT/calmap) travis config seems outdated a bit and not all python version will pass. My gut feeling shows this is for the same version dependency issue. [*] https://travis-ci.com/github/tai271828/calmap/builds/219751194 |
When people were working on this pull request MarvinT#9 , we were aware of the numpy version compatibility issue during CI. This commit would fix the issue by using numpy with explicit version.
When people were working on this pull request MarvinT#9 , we were aware of the numpy version compatibility issue during CI. This commit would fix the issue by using numpy with explicit version.
|
I fixed the Travis CI error based on this pull request with the pull request #10 . Please feel free to land my pull request, or cherry-pick it in this pull request if you want. |
When people were working on this pull request MarvinT#9 , we were aware of the numpy version compatibility issue during CI. This commit would fix the issue by using numpy with explicit version.
|
Hi all, Thank you @tai271828 for the Travis CI fix. I've included the changes listed in #10 in this PR. I have not taken into account the remark related to Colab notebook. Maybe the author could allow the issue page for submitting other issues? |
|
I just tested the latest |
|
@MarvinT This looks ready to merge! 🎉 |
MarvinT
left a comment
There was a problem hiding this comment.
Alright, thanks for all the work. I think the only thing left is updating the version number and I'll deploy it.
Co-authored-by: Erik Bjäreholt <erik.bjareholt@gmail.com>
|
and released! thanks all! |


In this fix 2 issues are addressed:
Tests failing on current version (216fc6b, tag: v0.0.8):
../calmap/__init__.py:238 KeyErrorDetails please see pytest log: https://pastebin.ubuntu.com/p/TQt7WRFzpc/
Future warning
current_projects/calmap/calmap/init.py:181: FutureWarning: weekofyear and week have been deprecated, please use DatetimeIndex.isocalendar().week instead, which returns a Series. To exactly reproduce the behavior of week and weekofyear and return an Index, you may call pd.Int64Index(idx.isocalendar().week)
"week": by_day.index.week,
My running environment:
Discussions and comments are very welcome!