From 5fef25b4e1f7dcce67fb17630d05789b813af24a Mon Sep 17 00:00:00 2001 From: Randy Zwitch Date: Wed, 9 Feb 2022 14:39:38 -0500 Subject: [PATCH] Version 0.5 (#27) --- setup.py | 6 +++--- .../test_package.test_basic/first_test/tags_level_3.txt | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) delete mode 100644 tests/visual_baseline/test_package.test_basic/first_test/tags_level_3.txt diff --git a/setup.py b/setup.py index 1c895aa..f8013ed 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setuptools.setup( name="streamlit_folium", - version="0.4.0", + version="0.5.0", author="Randy Zwitch", author_email="randy@streamlit.io", description="Render Folium objects in Streamlit", @@ -12,6 +12,6 @@ packages=setuptools.find_packages(), include_package_data=True, classifiers=[], - python_requires=">=3.6", - install_requires=["streamlit>=0.79", "folium>=0.11"], + python_requires=">=3.7", + install_requires=["streamlit>=1.2", "folium>=0.11"], ) diff --git a/tests/visual_baseline/test_package.test_basic/first_test/tags_level_3.txt b/tests/visual_baseline/test_package.test_basic/first_test/tags_level_3.txt deleted file mode 100644 index 207f268..0000000 --- a/tests/visual_baseline/test_package.test_basic/first_test/tags_level_3.txt +++ /dev/null @@ -1 +0,0 @@ -[["noscript", []], ["div", [["id", "root"]]], ["div", [["class", []]]], ["div", [["class", ["withScreencast"]]]], ["div", [["tabindex", "-1"]]], ["div", [["class", ["stApp", "css-fg4pbf", "eczokvf0"]]]], ["header", [["class", ["css-1moshnm", "e8zbici0"]], ["tabindex", "-1"]]], ["div", [["class", ["css-fk4es0", "e8zbici1"]], ["data-testid", "stDecoration"]]], ["div", [["class", ["css-r698ls", "e8zbici2"]], ["data-testid", "stToolbar"]]], ["span", [["aria-expanded", "false"], ["aria-haspopup", "true"], ["id", "MainMenu"]]], ["button", [["class", ["css-d1b1ld", "edgvbvh6"]], ["kind", "icon"]]], ["svg", [["aria-hidden", "true"], ["class", ["e1fb0mya0", "css-xq1lnh-EmotionIconBase", "ex0cdmw0"]], ["color", "inherit"], ["fill", "currentColor"], ["focusable", "false"], ["viewbox", "0 0 8 8"], ["xmlns", "http://www.w3.org/2000/svg"]]], ["path", [["d", "M0 1v1h8V1H0zm0 2.97v1h8v-1H0zm0 3v1h8v-1H0z"]]], ["div", [["class", ["reportview-container", "css-1wrcr25", "eknhn3m0"]], ["data-layout", "narrow"], ["data-testid", "stReportViewContainer"]]], ["section", [["class", ["main", "css-1v3fvcr", "eknhn3m1"]], ["tabindex", "0"]]], ["div", [["class", ["block-container", "css-12oz5g7", "eknhn3m2"]], ["style", "position: relative;"]]], ["div", [["style", "overflow: visible; width: 0px;"]]], ["div", [["class", ["element-container", "css-1e5imcs", "e1tzin5v1"]], ["data-stale", "false"], ["style", "width: 704px;"]]], ["div", [["class", ["stMarkdown"]], ["style", "width: 704px;"]]], ["div", [["class", ["css-177yq5e", "e16nr0p30"]], ["data-testid", "stMarkdownContainer"]]], ["h1", [["id", "streamlit-folium"]]], ["div", [["class", ["css-f341up", "e16nr0p31"]]]], ["a", [["class", ["css-d94sfw", "e16nr0p32"]], ["href", "#streamlit-folium"]]], ["svg", [["fill", "none"], ["height", "18"], ["stroke", "currentColor"], ["stroke-linecap", "round"], ["stroke-linejoin", "round"], ["stroke-width", "2"], ["viewbox", "0 0 24 24"], ["width", "18"], ["xmlns", "http://www.w3.org/2000/svg"]]], ["path", [["d", "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"]]], ["path", [["d", "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"]]], ["span", [["class", ["css-10trblm", "e16nr0p33"]]]], ["div", [["class", ["element-container", "css-1e5imcs", "e1tzin5v1"]], ["data-stale", "false"], ["style", "width: 704px;"]]], ["div", [["class", ["stMarkdown"]], ["style", "width: 704px;"]]], ["div", [["class", ["css-177yq5e", "e16nr0p30"]], ["data-testid", "stMarkdownContainer"]]], ["div", [["class", ["stCodeBlock", "css-jja0az", "e10mrw3y3"]]]], ["div", [["class", ["css-xjsf0x", "e10mrw3y2"]]]], ["button", [["class", ["css-aivdhp", "e10mrw3y1"]], ["data-clipboard-text", "import streamlit as st\nfrom streamlit_folium import folium_static\nimport folium\nimport branca\n\npage = st.radio(\n \"Select map type\", [\"Single map\", \"Dual map\", \"Branca figure\"], index=0\n)\n\n# center on Liberty Bell, add marker\nif page == \"Single map\":\n m = folium.Map(location=[39.949610, -75.150282], zoom_start=16)\n tooltip = \"Liberty Bell\"\n folium.Marker(\n [39.949610, -75.150282], popup=\"Liberty Bell\", tooltip=tooltip\n ).add_to(m)\n\nelif page == \"Dual map\":\n m = folium.plugins.DualMap(location=[39.949610, -75.150282], zoom_start=16)\n tooltip = \"Liberty Bell\"\n folium.Marker(\n [39.949610, -75.150282], popup=\"Liberty Bell\", tooltip=tooltip\n ).add_to(m)\n\nelif page == \"Branca figure\":\n m = branca.element.Figure()\n fm = folium.Map(location=[39.949610, -75.150282], zoom_start=16)\n tooltip = \"Liberty Bell\"\n folium.Marker(\n [39.949610, -75.150282], popup=\"Liberty Bell\", tooltip=tooltip\n ).add_to(fm)\n m.add_child(fm)\n\n# call to render Folium map in Streamlit\nfolium_static(m)"], ["style", "top: 0px; right: 0px;"], ["title", "Copy to clipboard"]]], ["svg", [["fill", "none"], ["height", "16"], ["stroke", "currentColor"], ["stroke-linecap", "round"], ["stroke-linejoin", "round"], ["stroke-width", "2"], ["viewbox", "0 0 24 24"], ["width", "16"], ["xmlns", "http://www.w3.org/2000/svg"]]], ["rect", [["height", "13"], ["rx", "2"], ["ry", "2"], ["width", "13"], ["x", "9"], ["y", "9"]]], ["path", [["d", "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"]]], ["pre", [["class", ["css-1qcggol", "e10mrw3y0"]]]], ["code", [["class", ["language-python"]]]], ["span", [["class", ["token", "keyword"]]]], ["span", [["class", ["token", "keyword"]]]], ["span", [["class", ["token", "keyword"]]]], ["span", [["class", ["token", "keyword"]]]], ["span", [["class", ["token", "keyword"]]]], ["span", [["class", ["token", "keyword"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "string"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "string"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "string"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "string"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "number"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "comment"]]]], ["span", [["class", ["token", "keyword"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "string"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "number"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "number"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "number"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "string"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "number"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "number"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "string"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "keyword"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "string"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "number"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "number"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "number"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "string"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "number"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "number"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "string"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "keyword"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "string"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "number"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "number"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "number"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "string"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "number"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "number"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "string"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "comment"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["div", [["class", ["element-container", "css-1e5imcs", "e1tzin5v1"]], ["data-stale", "false"], ["style", "width: 704px;"]]], ["div", [["class", ["row-widget", "stRadio"]], ["style", "width: 704px;"]]], ["label", [["class", ["css-qrbaxs", "effi0qh0"]]]], ["div", [["class", ["st-b4", "st-ba", "st-bb", "st-bc", "st-bd", "st-be"]], ["role", "radiogroup"]]], ["label", [["class", ["st-bf", "st-b4", "st-bg", "st-bd", "st-as", "st-at", "st-bh", "st-bi", "st-bj", "st-av", "st-aw", "st-ay", "st-ax"]], ["data-baseweb", "radio"]]], ["div", [["class", ["st-bg", "st-bk", "st-bl", "st-bm", "st-bn", "st-bo", "st-az", "st-b4", "st-bp", "st-bq", "st-br", "st-bs", "st-bt", "st-bu", "st-bv", "st-bw", "st-bx", "st-by", "st-b2", "st-bz"]]]], ["div", [["class", ["st-c0", "st-bl", "st-bm", "st-bn", "st-bo", "st-c1", "st-b2", "st-bz", "st-c2"]]]], ["input", [["checked", ""], ["class", ["st-b0", "st-an", "st-c3", "st-as", "st-c4", "st-at", "st-c5", "st-c6", "st-c7", "st-c8", "st-bh", "st-c9"]], ["name", ""], ["tabindex", "0"], ["type", "radio"], ["value", "0"]]], ["div", [["class", ["st-bw", "st-ca", "st-cb", "st-ae", "st-af", "st-ag", "st-ah", "st-ai", "st-aj"]]]], ["label", [["class", ["st-bf", "st-b4", "st-bg", "st-bd", "st-as", "st-at", "st-bh", "st-bi", "st-bj", "st-av", "st-aw", "st-ay", "st-ax"]], ["data-baseweb", "radio"]]], ["div", [["class", ["st-bg", "st-cc", "st-bl", "st-bm", "st-bn", "st-bo", "st-az", "st-b4", "st-bp", "st-bq", "st-br", "st-bs", "st-bt", "st-bu", "st-bv", "st-bw", "st-bx", "st-by", "st-b2", "st-bz"]]]], ["div", [["class", ["st-cd", "st-bl", "st-bm", "st-bn", "st-bo", "st-ce", "st-b2", "st-bz", "st-cf"]]]], ["input", [["class", ["st-b0", "st-an", "st-c3", "st-as", "st-c4", "st-at", "st-c5", "st-c6", "st-c7", "st-c8", "st-bh", "st-c9"]], ["name", ""], ["tabindex", "-1"], ["type", "radio"], ["value", "1"]]], ["div", [["class", ["st-bw", "st-ca", "st-cb", "st-ae", "st-af", "st-ag", "st-ah", "st-ai", "st-aj"]]]], ["label", [["class", ["st-bf", "st-b4", "st-bg", "st-bd", "st-as", "st-at", "st-bh", "st-bi", "st-bj", "st-av", "st-aw", "st-ay", "st-ax"]], ["data-baseweb", "radio"]]], ["div", [["class", ["st-bg", "st-cc", "st-bl", "st-bm", "st-bn", "st-bo", "st-az", "st-b4", "st-bp", "st-bq", "st-br", "st-bs", "st-bt", "st-bu", "st-bv", "st-bw", "st-bx", "st-by", "st-b2", "st-bz"]]]], ["div", [["class", ["st-cd", "st-bl", "st-bm", "st-bn", "st-bo", "st-ce", "st-b2", "st-bz", "st-cf"]]]], ["input", [["class", ["st-b0", "st-an", "st-c3", "st-as", "st-c4", "st-at", "st-c5", "st-c6", "st-c7", "st-c8", "st-bh", "st-c9"]], ["name", ""], ["tabindex", "-1"], ["type", "radio"], ["value", "2"]]], ["div", [["class", ["st-bw", "st-ca", "st-cb", "st-ae", "st-af", "st-ag", "st-ah", "st-ai", "st-aj"]]]], ["div", [["class", ["element-container", "css-1e5imcs", "e1tzin5v1"]], ["data-stale", "false"], ["style", "width: 704px;"]]], ["iframe", [["allow", "accelerometer; ambient-light-sensor; autoplay; battery; camera; document-domain; encrypted-media; fullscreen; geolocation; gyroscope; layout-animations; legacy-image-formats; magnetometer; microphone; midi; oversized-images; payment; picture-in-picture; publickey-credentials-get; sync-xhr; usb; vr ; wake-lock; xr-spatial-tracking"], ["height", "510"], ["sandbox", ["allow-forms", "allow-modals", "allow-popups", "allow-popups-to-escape-sandbox", "allow-same-origin", "allow-scripts", "allow-downloads"]], ["scrolling", "no"], ["srcdoc", "\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n
\n \n\n"], ["style", "overflow: hidden;"], ["title", "st.iframe"], ["width", "700"]]], ["div", [["class", ["resize-triggers"]]]], ["div", [["class", ["expand-trigger"]]]], ["div", [["style", "width: 737px; height: 1843px;"]]], ["div", [["class", ["contract-trigger"]]]], ["footer", [["class", ["css-12gp8ed", "eknhn3m4"]]]], ["a", [["class", ["css-1vbd788", "eknhn3m3"]], ["href", "//streamlit.io"]]], ["div", [["class", []]]], ["script", []], ["script", [["src", "./static/js/5.c75abbe2.chunk.js"]]], ["script", [["src", "./static/js/main.455afa6b.chunk.js"]]]] \ No newline at end of file