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

Support DuckDBPyRelation kernel computations #37

Merged
Changes from 1 commit
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
8ff4a09
start more data sources
MarcSkovMadsen Oct 29, 2024
d915fc8
git add .
MarcSkovMadsen Oct 30, 2024
4a4a429
align on theme_key
MarcSkovMadsen Oct 31, 2024
e9d581c
abort
MarcSkovMadsen Oct 31, 2024
f1e2a35
add spec parameter
MarcSkovMadsen Oct 31, 2024
f45aed2
spec implementation
MarcSkovMadsen Nov 1, 2024
36b1477
improve explanation
MarcSkovMadsen Nov 1, 2024
a6fd018
clean
MarcSkovMadsen Nov 1, 2024
268b490
earthquake
MarcSkovMadsen Nov 1, 2024
886527b
tmp
MarcSkovMadsen Nov 2, 2024
b4651b1
Merge branch 'tmp/spec-str' into enhancement/spec-parameter
MarcSkovMadsen Nov 2, 2024
d36035a
support file paths
MarcSkovMadsen Nov 2, 2024
7072ebe
add more functionality
MarcSkovMadsen Nov 3, 2024
b5ef027
Merge branch 'enhancement/align-pygwalker-anywidget' into enhancement…
MarcSkovMadsen Nov 3, 2024
c0740a8
work on bike sharing
MarcSkovMadsen Nov 3, 2024
36e4c04
support more renders
MarcSkovMadsen Nov 3, 2024
623239b
minor updates
MarcSkovMadsen Nov 3, 2024
82c5dc1
closer to streamlit app
MarcSkovMadsen Nov 4, 2024
74f34e1
improve spec
MarcSkovMadsen Nov 4, 2024
405f64e
add tab
MarcSkovMadsen Nov 5, 2024
66661b9
improve docs
MarcSkovMadsen Nov 5, 2024
df26cb3
improve GraphicRenderer
MarcSkovMadsen Nov 5, 2024
b7f56f5
bike sharing works
MarcSkovMadsen Nov 6, 2024
32cda63
Merge branch 'enhancement/explain-how-to-serve' into enhancement/pygw…
MarcSkovMadsen Nov 6, 2024
f61092f
docs
MarcSkovMadsen Nov 6, 2024
487bbfd
display no data message
MarcSkovMadsen Nov 6, 2024
5909476
display no data message
MarcSkovMadsen Nov 6, 2024
90fe561
update readme
MarcSkovMadsen Nov 6, 2024
6da0eae
fix README
MarcSkovMadsen Nov 6, 2024
26252a3
absolute urls
MarcSkovMadsen Nov 6, 2024
11c3241
clean
MarcSkovMadsen Nov 6, 2024
fd9ba28
simplify
MarcSkovMadsen Nov 6, 2024
5748608
rename to kernel_computation
MarcSkovMadsen Nov 7, 2024
ee7c3b9
comment
MarcSkovMadsen Nov 7, 2024
eff09c5
Merge branch 'enhancement/pygwalker-bike-sharing-app' into enhancemen…
MarcSkovMadsen Nov 7, 2024
89d6bac
polars poc
MarcSkovMadsen Nov 7, 2024
15881d1
merge MarcSkovMadsen:fix/main-branch
MarcSkovMadsen Nov 9, 2024
6b074fd
narwhals backends support
MarcSkovMadsen Nov 9, 2024
5bd77de
mention more backends might be supported
MarcSkovMadsen Nov 9, 2024
4f59ee9
merge main
MarcSkovMadsen Nov 9, 2024
ffb8464
fix uv
MarcSkovMadsen Nov 9, 2024
2793b85
fix pytest
MarcSkovMadsen Nov 9, 2024
897a931
fix pytest
MarcSkovMadsen Nov 9, 2024
61494dd
remove unused specs
MarcSkovMadsen Nov 9, 2024
9b41afd
fix spec links
MarcSkovMadsen Nov 9, 2024
71ab0ab
fix specs
MarcSkovMadsen Nov 9, 2024
cfa9de7
bump version
MarcSkovMadsen Nov 9, 2024
225d3fc
fix spec urls
MarcSkovMadsen Nov 9, 2024
b4e4b4b
update db support table
MarcSkovMadsen Nov 9, 2024
3ab04a9
add data backends
MarcSkovMadsen Nov 10, 2024
1d8b99d
fix
MarcSkovMadsen Nov 10, 2024
d3bed74
wip duckdb kernel support
MarcSkovMadsen Nov 10, 2024
d809028
fix
MarcSkovMadsen Nov 10, 2024
e0e89f6
mark xfail
MarcSkovMadsen Nov 10, 2024
619026d
simplify
MarcSkovMadsen Nov 10, 2024
403507b
simplify readme
MarcSkovMadsen Nov 10, 2024
9f38035
Merge branch 'main' into enhancement/support-duckdb-relation
philippjfr Nov 10, 2024
77cee96
Apply suggestions from code review
philippjfr Nov 10, 2024
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
Prev Previous commit
Next Next commit
merge main
MarcSkovMadsen committed Nov 9, 2024
commit 4f59ee9ab83efa04b183007fb9fc38b301f24a20
5 changes: 2 additions & 3 deletions examples/bikesharing_dashboard/bikesharing_dashboard.py
Original file line number Diff line number Diff line change
@@ -9,8 +9,7 @@

ROOT = Path(__file__).parent
# Source: https://kanaries-app.s3.ap-northeast-1.amazonaws.com/public-datasets/bike_sharing_dc.csv
DATASET = "https://kanaries-app.s3.ap-northeast-1.amazonaws.com/public-datasets/bike_sharing_dc.csv"
# https://cdn.jsdelivr.net/gh/panel-extensions/panel-graphic-walker@main/examples/bikesharing_dashboard/bikesharing_dashboard.json
DATASET = "https://datasets.holoviz.org/bikesharing_dc/v1/bikesharing_dc.parquet"
SPEC_PATH = ROOT / "bikesharing_dashboard.json"
ACCENT = "#ff4a4a"

@@ -38,7 +37,7 @@

@pn.cache
def get_data():
return pd.read_csv(DATASET)
return pd.read_parquet(DATASET)


data = get_data()
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -46,7 +46,7 @@ examples = [
kernel = [
"duckdb ; platform_system != 'Emscripten'",
"gw-dsl-parser ; platform_system != 'Emscripten'",
"pygwalker ; platform_system != 'Emscripten'"
"pygwalker ; platform_system != 'Emscripten'",
]

[tool.hatch.build.targets.wheel]
18 changes: 10 additions & 8 deletions src/panel_gwalker/_gwalker.js
Original file line number Diff line number Diff line change
@@ -185,7 +185,14 @@ export function render({ model }) {
})
}, [containerHeight])

if (renderer=='profiler') {
useEffect(() => {
if (storeRef.current === null) {
return
}
storeRef.current.resetVisualization()
}, [fields])

if (renderer === "profiler") {
return <TableWalker
storeRef={storeRef}
ref={graphicWalkerRef}
@@ -198,11 +205,8 @@ export function render({ model }) {
hideProfiling={hideProfiling}
{...config}
/>
}

if (renderer=='viewer') {
} else if (renderer === "viewer") {
// See https://github.com/Kanaries/pygwalker/blob/main/app/src/index.tsx#L466

return (
<>
{transformedIndexSpec?.map((chart, index) => (
@@ -227,9 +231,7 @@ export function render({ model }) {
))}
</>
);
}

if (renderer=='chart') {
} else if (renderer === "chart") {
if (!data | !transformedData) {
return <div>No data to render. Set 'kernel_computation=False' when creating GraphicWalker.</div>;
}
1 change: 0 additions & 1 deletion src/panel_gwalker/_pygwalker.py
Original file line number Diff line number Diff line change
@@ -62,7 +62,6 @@ def get_data_parser(
infer_number_to_dimension,
other_params,
)
breakpoint()
msg = f"Data type {type(object)} is currently not supported"
raise NotImplementedError(msg)

1 change: 0 additions & 1 deletion src/panel_gwalker/_utils.py
Original file line number Diff line number Diff line change
@@ -18,7 +18,6 @@
from narwhals.typing import FrameT



def configure_debug_log_level():
format_ = FORMAT
level = logging.DEBUG
You are viewing a condensed version of this merge commit. You can view the full changes here.