Skip to content
Snippets Groups Projects
Commit 5a8487e4 authored by Leah Tacke genannt Unterberg's avatar Leah Tacke genannt Unterberg
Browse files

json header support

parent 934e8e10
No related branches found
No related tags found
No related merge requests found
...@@ -13,7 +13,7 @@ import_type = st.selectbox('Import Type', ['csv', 'hdf']) ...@@ -13,7 +13,7 @@ import_type = st.selectbox('Import Type', ['csv', 'hdf'])
files = {} files = {}
if import_type == 'csv': if import_type == 'csv':
csv_header_upload = st.file_uploader("Upload a header csv file", type='.csv') csv_header_upload = st.file_uploader("Upload a header csv or json file", type=['.csv', '.json'])
csv_data_upload = st.file_uploader("Upload a data csv file", type='.csv') csv_data_upload = st.file_uploader("Upload a data csv file", type='.csv')
files['csv_header_upload'] = csv_header_upload files['csv_header_upload'] = csv_header_upload
files['csv_data_upload'] = csv_data_upload files['csv_data_upload'] = csv_data_upload
...@@ -33,7 +33,11 @@ def import_hdf(f): ...@@ -33,7 +33,11 @@ def import_hdf(f):
# @st.experimental_memo # @st.experimental_memo
def import_csv(hf, df): def import_csv(hf, df):
return read_machine_data(hf, df, validity_checking=False) if 'csv' in hf.type:
header_type = 'csv'
elif 'json' in hf.type:
header_type = 'json'
return read_machine_data(hf, df, validity_checking=False, header_type=header_type)
@st.cache_data @st.cache_data
......
...@@ -1671,23 +1671,21 @@ version = "0.1.0" ...@@ -1671,23 +1671,21 @@ version = "0.1.0"
description = "" description = ""
category = "main" category = "main"
optional = false optional = false
python-versions = "^3.9" python-versions = ">=3.9,<4.0"
files = [] files = [
develop = true {file = "mdata-0.1.0-py3-none-any.whl", hash = "sha256:89a08590331acaeb5a1ba1ec64d2797a00c208afc6b82f483205190b7af23c73"},
{file = "mdata-0.1.0.tar.gz", hash = "sha256:33b18e70b1240a098edba312cb3d0025b7a793295d938b929c7954f4cfbe45f9"},
]
[package.dependencies] [package.dependencies]
bokeh = "^2.4.3" bokeh = ">=2.4.3,<3.0.0"
jupyter = "^1.0" jupyter = ">=1.0,<2.0"
matplotlib = "^3.7.1" matplotlib = ">=3.7.1,<4.0.0"
pandas = {version = "^1.5", extras = ["all", "performance"]} pandas = {version = ">=1.5,<2.0", extras = ["all", "performance"]}
plotly = "^5.14.1" plotly = ">=5.14.1,<6.0.0"
pm4py = "^2.7.3" pm4py = ">=2.7.3,<3.0.0"
tables = "^3.8.0" tables = ">=3.8.0,<4.0.0"
tsdownsample = "^0.1.2" tsdownsample = ">=0.1.2,<0.2.0"
[package.source]
type = "directory"
url = "../mdata"
[[package]] [[package]]
name = "mdurl" name = "mdurl"
...@@ -3644,4 +3642,4 @@ testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more ...@@ -3644,4 +3642,4 @@ testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more
[metadata] [metadata]
lock-version = "2.0" lock-version = "2.0"
python-versions = "^3.9,!=3.9.7" python-versions = "^3.9,!=3.9.7"
content-hash = "ac96a4ac5737561fdeee2f5476848ef21b65a267c2d918bce83f8b01eb81f740" content-hash = "11a05b92a05d57495d3766cddd43974c2971f21424e983eeb40fd1ae1f5a13f9"
...@@ -7,12 +7,14 @@ packages = [{ include = "mdata_app" }] ...@@ -7,12 +7,14 @@ packages = [{ include = "mdata_app" }]
readme = "README.md" readme = "README.md"
license = "MIT" license = "MIT"
[tool.poetry.dependencies] [tool.poetry.dependencies]
python = "^3.9,!=3.9.7" python = "^3.9,!=3.9.7"
# flask = "^2.2.3" # flask = "^2.2.3"
streamlit = "^1.21" streamlit = "^1.21"
mdata = { path = "C:/Users/Leah/PycharmProjects/mdata", develop = true } # mdata = "^0.1.0"
# mdata = { git = "git@git-ce.rwth-aachen.de:leah.tgu/mdata.git", branch = "master" } # mdata = { path = "C:/Users/Leah/PycharmProjects/mdata", develop = true }
mdata = { git = "git@git-ce.rwth-aachen.de:leah.tgu/mdata.git", branch = "master" }
seaborn = "^0.12.2" seaborn = "^0.12.2"
plotly = "^5.14.1" plotly = "^5.14.1"
tsdownsample = "^0.1.2" tsdownsample = "^0.1.2"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment