From b305a8ebb5b7a626d948d97d0944c95b0b72ba3d Mon Sep 17 00:00:00 2001 From: David Beniamine <david.beniamine@tetras-libre.fr> Date: Mon, 19 Oct 2020 18:33:24 +0200 Subject: [PATCH] Data example --- data/Readme.md | 10 +++++++--- data/__init__.py | 0 data/example.py | 14 ++++++++++++++ 3 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 data/__init__.py create mode 100644 data/example.py diff --git a/data/Readme.md b/data/Readme.md index ac5dcbe..e38ee78 100644 --- a/data/Readme.md +++ b/data/Readme.md @@ -6,10 +6,14 @@ It works as follow ``` data/ - mydata.py # Python script exposing three methods + __init__.py # make the path importable + mydata.py # Python script exposing the following methods # extractLastData() -> scraps the last data and return the downloaded file path - # Upload(path) -> upload data contained in path - # getDataSample() -> return a sample data for debugging pupose + # upload_data(path) -> upload data contained in path + # get_sample() -> return a sample data for debugging pupose + # get_name() -> return the importer name + # get_desc() -> return the importer description + # get_last_import_info() -> return some information concerning the last import dashboard/ myfirstdashboard.ipynb # Ipynotebook dashboard that will be rendered by voila myfirstdashboard_housekeeping.py # Python script that generates data aggregates for myfirstdashbord diff --git a/data/__init__.py b/data/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/data/example.py b/data/example.py new file mode 100644 index 0000000..298fcec --- /dev/null +++ b/data/example.py @@ -0,0 +1,14 @@ +def get_name(): + return "Example" + + +def get_desc(): + return "Script d'exemple de gestion de données" + + +def get_sample(): + return "Col1,Col2,Col3\naaa,bbb,ccc" + + +def upload_data(path): + print(path) -- GitLab