Closed tony2guo closed 1 year ago
Since in https://github.com/vifactor/repostat/blob/fc6e974e0010c2d6c9cb91e122e345e0440e18c6/requirements.txt#L4 pandas does not pin to 1.x, Python>=3.8 will have pandas 2.x installed.
In pandas 2.0.1, https://github.com/vifactor/repostat/blob/fc6e974e0010c2d6c9cb91e122e345e0440e18c6/analysis/gitauthors.py#L15 will have TypeError: category type does not support sum operations due to https://github.com/pandas-dev/pandas/issues/46072. This can be fixed by authors_grouped.sum(numeric_only=True).
TypeError: category type does not support sum operations
authors_grouped.sum(numeric_only=True)
https://github.com/vifactor/repostat/blob/fc6e974e0010c2d6c9cb91e122e345e0440e18c6/report/htmlreportcreator.py#L79 will have AttributeError: 'DataFrame' object has no attribute 'append' due to https://github.com/pandas-dev/pandas/issues/35407. This can be fixed with concat or loc.
AttributeError: 'DataFrame' object has no attribute 'append'
It was tested in Python 3.8 with both pandas 1.3.3 and pandas 2.0.1 and Python 3.11 with pandas 2.0.1. I have also added Python 3.10 and 3.11 to the Ubuntu workflow and edited README.
Thanks!
Since in https://github.com/vifactor/repostat/blob/fc6e974e0010c2d6c9cb91e122e345e0440e18c6/requirements.txt#L4 pandas does not pin to 1.x, Python>=3.8 will have pandas 2.x installed.
In pandas 2.0.1, https://github.com/vifactor/repostat/blob/fc6e974e0010c2d6c9cb91e122e345e0440e18c6/analysis/gitauthors.py#L15 will have
TypeError: category type does not support sum operations
due to https://github.com/pandas-dev/pandas/issues/46072. This can be fixed byauthors_grouped.sum(numeric_only=True)
.https://github.com/vifactor/repostat/blob/fc6e974e0010c2d6c9cb91e122e345e0440e18c6/report/htmlreportcreator.py#L79 will have
AttributeError: 'DataFrame' object has no attribute 'append'
due to https://github.com/pandas-dev/pandas/issues/35407. This can be fixed with concat or loc.It was tested in Python 3.8 with both pandas 1.3.3 and pandas 2.0.1 and Python 3.11 with pandas 2.0.1. I have also added Python 3.10 and 3.11 to the Ubuntu workflow and edited README.