Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for pandas 2.1 #22

Merged
merged 9 commits into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,12 @@ jobs:
- uses: conda-incubator/setup-miniconda@v2
with:
python-version: "3.10"
channels: pyviz/label/dev,conda-forge
channels: pyviz/label/dev
auto-update-conda: true
- name: Install packages
run: |
conda install -y conda-build hatch anaconda-client
conda install -y conda-build anaconda-client
pipx install hatch # not on defaults
- name: Build conda package
run: |
hatch run conda:build
Expand Down
5 changes: 4 additions & 1 deletion holonote/annotate/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,10 @@ def _add_annotation_fields(self, index_value, fields=None):

new_fields = pd.DataFrame([dict(fields, **{self._field_df.index.name:index_value})])
new_fields = new_fields.set_index(self._field_df.index.name)
self._field_df = pd.concat((self._field_df, new_fields))
if self._field_df.empty:
self._field_df = new_fields
else:
self._field_df = pd.concat((self._field_df, new_fields))

def delete_annotation(self, index):
if index is None:
Expand Down
9 changes: 2 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ classifiers = [
"Programming Language :: Python :: 3.11",
"Operating System :: OS Independent",
]
dependencies = ["holoviews >=1.18.0a1", "pandas <2.1"]
dependencies = ["holoviews >=1.18.0a1", "pandas"]

[project.optional-dependencies]
dev = [
Expand All @@ -34,7 +34,7 @@ detached = true
scripts.build = "bash conda/build.sh"

[tool.hatch.envs.test]
dependencies = ["pytest"]
dependencies = ["pytest", "pytest-github-actions-annotate-failures"]
scripts.run = "python -m pytest holonote/tests"
matrix = [{ python = ["3.9", "3.10", "3.11"] }]

Expand All @@ -47,11 +47,6 @@ scripts.update = "pre-commit autoupdate"
addopts = "-vv"
filterwarnings = [
"error",
# 2023-09: Ignore Bokeh UserWarning, which needs to be fixed in HoloViews
"ignore:found multiple competing values for:UserWarning:holoviews.plotting.bokeh.plot",
# 2023-09: Wrong warning, when a timedelta is compared to another scalar.
# Fixed in newer versions of Numpy: https://github.com/numpy/numpy/issues/10095
"ignore:elementwise comparison failed:DeprecationWarning:bokeh.core.property.bases",
]

[tool.ruff]
Expand Down