From 270335f3b524ab232523323df235c7775955f7a1 Mon Sep 17 00:00:00 2001 From: Josh Barback Date: Wed, 4 Nov 2020 02:17:52 -0500 Subject: [PATCH] initialize empty package --- LICENSE.md | 29 ++++ forest/poplar/classes/__init__.py | 0 forest/poplar/constants/__init__.py | 0 forest/poplar/functions/__init__.py | 0 forest/poplar/legacy/__init__.py | 0 forest/poplar/raw/__init__.py | 0 forest/poplar/raw/noncode/data_streams.csv | 18 +++ forest/poplar/raw/noncode/headers.json | 126 ++++++++++++++++++ forest/poplar/raw/noncode/power_events.csv | 17 +++ .../raw/noncode/question_type_names.json | 23 ++++ setup.py | 30 +++++ 11 files changed, 243 insertions(+) create mode 100644 LICENSE.md create mode 100644 forest/poplar/classes/__init__.py create mode 100644 forest/poplar/constants/__init__.py create mode 100644 forest/poplar/functions/__init__.py create mode 100644 forest/poplar/legacy/__init__.py create mode 100644 forest/poplar/raw/__init__.py create mode 100644 forest/poplar/raw/noncode/data_streams.csv create mode 100644 forest/poplar/raw/noncode/headers.json create mode 100644 forest/poplar/raw/noncode/power_events.csv create mode 100644 forest/poplar/raw/noncode/question_type_names.json create mode 100644 setup.py diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 00000000..1ba02c76 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2020, onnela-lab +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/forest/poplar/classes/__init__.py b/forest/poplar/classes/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/forest/poplar/constants/__init__.py b/forest/poplar/constants/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/forest/poplar/functions/__init__.py b/forest/poplar/functions/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/forest/poplar/legacy/__init__.py b/forest/poplar/legacy/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/forest/poplar/raw/__init__.py b/forest/poplar/raw/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/forest/poplar/raw/noncode/data_streams.csv b/forest/poplar/raw/noncode/data_streams.csv new file mode 100644 index 00000000..64336a77 --- /dev/null +++ b/forest/poplar/raw/noncode/data_streams.csv @@ -0,0 +1,18 @@ +data_stream,stream_type,Android,iOS +accelerometer,passive,True,True +app_log,passive,True,False +bluetooth,passive,True,True +calls,passive,True,False +devicemotion,passive,False,True +gps,passive,True,True +gyro,passive,True,True +identifiers,passive,True,True +magnetometer,passive,False,True +power_state,passive,True,True +proximity,passive,False,True +reachability,passive,False,True +texts,passive,True,False +wifi,passive,True,False +audio_recordings,survey,True,True +survey_answers,survey,True,True +survey_timings,survey,True,True diff --git a/forest/poplar/raw/noncode/headers.json b/forest/poplar/raw/noncode/headers.json new file mode 100644 index 00000000..39635729 --- /dev/null +++ b/forest/poplar/raw/noncode/headers.json @@ -0,0 +1,126 @@ +{ + "accelerometer": { + "iOS": [ + "timestamp", + "UTC time", + "accuracy", + "x", + "y", + "z" + ], + "Android": [ + "timestamp", + "UTC time", + "accuracy", + "x", + "y", + "z" + ] + }, + "app_log": { + "iOS": null, + "Android": "To do" + }, + "bluetooth": { + "iOS": "To do", + "Android": "To do" + }, + "calls": { + "iOS": null, + "Android": "To do" + }, + "devicemotion": { + "iOS": "To do", + "Android": null + }, + "gps": { + "iOS": [ + "timestamp", + "UTC time", + "latitude", + "longitude", + "altitude", + "accuracy" + ], + "Android": [ + "timestamp", + "UTC time", + "latitude", + "longitude", + "altitude", + "accuracy" + ] + }, + "gyro": { + "iOS": "To do", + "Android": "To do" + }, + "identifiers": { + "iOS": "To do", + "Android": "To do" + }, + "magnetometer": { + "iOS": "To do", + "Android": null + }, + "power_state": { + "iOS": [ + "timestamp", + "UTC time", + "event", + "level" + ], + "Android": [ + "timestamp", + "UTC time", + "event" + ] + }, + "proximity": { + "iOS": "To do", + "Android": null + }, + "reachability": { + "iOS": "To do", + "Android": null + }, + "texts": { + "iOS": null, + "Android": "To do" + }, + "wifi": { + "iOS": null, + "Android": "To do" + }, + "audio_recordings": { + "iOS": "To do", + "Android": "To do" + }, + "survey_answers": { + "iOS": "To do", + "Android": "To do" + }, + "survey_timings": { + "iOS": [ + "timestamp", + "UTC time", + "question id", + "survey id", + "question type", + "question text", + "question answer options", + "answer", + "event" + ], + "Android": [ + "timestamp", + "UTC time", + "question id", + "survey id", + "question type", + "question text", + "question answer options", + "answer" + ] + } +} \ No newline at end of file diff --git a/forest/poplar/raw/noncode/power_events.csv b/forest/poplar/raw/noncode/power_events.csv new file mode 100644 index 00000000..7248600f --- /dev/null +++ b/forest/poplar/raw/noncode/power_events.csv @@ -0,0 +1,17 @@ +event,device_os,variable,code +Screen turned on,Android,interactive,1 +Screen turned off,Android,interactive,0 +Power connected,Android,power_connected,1 +Power disconnected,Android,power_connected,0 +Device shut down signal received,Android,power_off,1 +Device reboot signal received,Android,power_off,2 +Power Save Mode state change signal received; device in power save state.,Android,power_save,1 +Power Save Mode change signal received; device not in power save state.,Android,power_save,0 +Device Idle (Doze) state change signal received; device in idle state.,Android,doze,1 +Device Idle (Doze) state change signal received; device not in idle state.,Android,doze,0 +Unlocked,iOS,protected_data_available,1 +Locked,iOS,protected_data_available,0 +Unknown,iOS,external_power,1 +Unplugged,iOS,external_power,2 +Charging,iOS,external_power,3 +Full,iOS,external_power,4 diff --git a/forest/poplar/raw/noncode/question_type_names.json b/forest/poplar/raw/noncode/question_type_names.json new file mode 100644 index 00000000..e78849b3 --- /dev/null +++ b/forest/poplar/raw/noncode/question_type_names.json @@ -0,0 +1,23 @@ +{ + "info_text_box": { + "iOS": "info_text_box", + "Android": "Info Text Box" + }, + "checkbox": { + "iOS": "checkbox", + "Android": "Checkbox Question" + }, + "radio_button": { + "iOS": "radio_button", + "Android": "Radio Button Question" + }, + "slider": { + "iOS": "slider", + "Android": "Slider Question" + }, + "free_response": { + "iOS": "free_response", + "Android": "Open Response Question" + } +} + diff --git a/setup.py b/setup.py new file mode 100644 index 00000000..4cb271a5 --- /dev/null +++ b/setup.py @@ -0,0 +1,30 @@ +from setuptools import setup, find_namespace_packages + +requires = ['numpy', + 'pandas', + 'scipy', + 'holidays', # poplar + 'pytz', # jasmine, poplar + 'timezonefinder', # poplar + ] + +package_data = {'': ['*.csv', '*.json']} + +with open('README.md') as f: + readme = f.read() + +with open('LICENSE.md') as f: + license = f.read() + +setup( + name = 'forest', + version = '0.1', + description = '--add description here--', + long_description = readme, + author = 'Onnela Lab', + author_email = 'onnela.lab@gmail.com', + license = license, + packages = find_namespace_packages(include = ['forest.*']), + package_data = package_data, + install_requires = requires +)