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

Backports for v0.14.4 #4464

Merged
merged 16 commits into from
Mar 3, 2023
Merged
Show file tree
Hide file tree
Changes from 7 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
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ global-exclude *.py[co]
global-exclude *~
global-exclude *.ipynb_checkpoints/*
global-exclude *.whl
graft panel/examples
graft examples
graft doc/
graft panel/dist
18 changes: 18 additions & 0 deletions doc/releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,24 @@

See [the HoloViz blog](https://blog.holoviz.org/tag/panel.html) for a visual summary of the major features added in each release.

## Version 0.14.4

Date: 2023-03-02

This release is a small bug fix release preceding the upcoming major release of Panel 1.0. Many thanks to the contributors to this release which include @MarcSkovMadsen, @maximlt, @Hoxbro and @philippjfr.

### Bugs

- Client-side search filters don't use regex ([4423](https://github.com/holoviz/panel/pull/4423))
- Fix RGGPlot pane ([#4380](https://github.com/holoviz/panel/pull/4380))
- Distribute again the examples folder ([#4484](https://github.com/holoviz/panel/pull/4484))
- Array comparison matches NaNs ([#4481](https://github.com/holoviz/panel/pull/4481))
- Use cache from previous sessions when using `to_disk` ([#4481](https://github.com/holoviz/panel/pull/4481))

### Misc

- Use latest react-grid from CDN ([#4461](https://github.com/holoviz/panel/pull/4461))

## Version 0.14.3

Date: 2023-01-28
Expand Down
2 changes: 1 addition & 1 deletion examples/apps/django_multi_apps/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ cffi==1.13.2
channels==2.4.0
colorcet==2.0.5
constantly==15.1.0
cryptography==3.3.2
cryptography==39.0.1
daphne==2.4.1
Django==3.1.14
holoviews==1.13.2
Expand Down
5 changes: 2 additions & 3 deletions panel/io/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,7 @@ def wrapped_func(*args, **kwargs):

func_cache = state._memoize_cache.get(func_hash)

empty = func_cache is None
if empty:
if func_cache is None:
if to_disk:
from diskcache import Index
cache = Index(os.path.join(cache_path, func_hash))
Expand All @@ -376,7 +375,7 @@ def wrapped_func(*args, **kwargs):
if ttl is not None:
_cleanup_ttl(func_cache, ttl, time)

if not empty and hash_value in func_cache:
if hash_value in func_cache:
with lock:
ret, ts, count, _ = func_cache[hash_value]
func_cache[hash_value] = (ret, ts, count+1, time)
Expand Down
4 changes: 2 additions & 2 deletions panel/io/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ class comparable_array(np.ndarray):
"""

def __eq__(self, other: Any) -> bool:
return super().__eq__(other).all().item()
return np.array_equal(self, other, equal_nan=True)

def __ne__(self, other: Any) -> bool:
return super().__ne__(other).all().item()
return not np.array_equal(self, other, equal_nan=True)

def monkeypatch_events(events: List['DocumentChangedEvent']) -> None:
"""
Expand Down
2 changes: 1 addition & 1 deletion panel/pane/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ class RGGPlot(PNG):
def applies(cls, obj: Any) -> float | bool | None:
return type(obj).__name__ == 'GGPlot' and hasattr(obj, 'r_repr')

def _img(self):
def _data(self):
from rpy2 import robjects
from rpy2.robjects.lib import grdevices
with grdevices.render_to_bytesio(grdevices.png,
Expand Down
2 changes: 1 addition & 1 deletion panel/template/fast/grid/fast_grid_template.html
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@
);
}
}
ReactDOM.render(<ResponsiveGrid />, document.getElementById('responsive-grid'))
ReactDOM.render(<ResponsiveGrid />, document.getElementById('responsive-grid'));
addFullScreenToggle()
</script>

Expand Down
2 changes: 1 addition & 1 deletion panel/template/react/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class ReactTemplate(BasicTemplate):
'react': f"{config.npm_cdn}/react@18/umd/react.production.min.js",
'react-dom': f"{config.npm_cdn}/react-dom@18/umd/react-dom.production.min.js",
'babel': f"{config.npm_cdn}/babel-standalone@latest/babel.min.js",
'react-grid': "https://cdnjs.cloudflare.com/ajax/libs/react-grid-layout/1.1.1/react-grid-layout.min.js"
'react-grid': f"{config.npm_cdn}/react-grid-layout@1.3.4/dist/react-grid-layout.min.js"
},
'css': {
'bootstrap': CSS_URLS['bootstrap4'],
Expand Down
2 changes: 1 addition & 1 deletion panel/template/react/react.html
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@
);
}
}
ReactDOM.render(<ResponsiveGrid />, document.getElementById('responsive-grid'))
ReactDOM.render(<ResponsiveGrid />, document.getElementById('responsive-grid'));
</script>

{{ embed(roots.js_area) }}
Expand Down
10 changes: 5 additions & 5 deletions panel/widgets/tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,22 +469,22 @@ def _get_header_filters(self, df):
elif op == 'in':
filters.append(col.isin(val))
elif op == 'like':
filters.append(col.str.lower().str.contains(val.lower()))
filters.append(col.str.contains(val, case=False, regex=False))
elif op == 'starts':
filters.append(col.str.startsWith(val))
elif op == 'ends':
filters.append(col.str.endsWith(val))
elif op == 'keywords':
match_all = filt_def.get(col_name, {}).get('matchAll', False)
sep = filt_def.get(col_name, {}).get('separator', ' ')
matches = val.lower().split(sep)
matches = val.split(sep)
if match_all:
for match in matches:
filters.append(col.str.lower().str.contains(match))
filters.append(col.str.contains(match, case=False, regex=False))
else:
filt = col.str.lower().str.contains(matches[0])
filt = col.str.contains(matches[0], case=False, regex=False)
for match in matches[1:]:
filt |= col.str.lower().str.contains(match)
filt |= col.str.contains(match, case=False, regex=False)
filters.append(filt)
elif op == 'regex':
raise ValueError("Regex filtering not supported.")
Expand Down