Python repository to facilitate using the Tidepool API (forked).
Project description
Tidepool API - Data Science Python Bindings
-- Project Status: Active
-- Project Disclaimer: This work is for Development
Project Objective
The purpose of this project is to
- Expose in an organized way the Tidepool API in Python
- Support data science tasks and projects that use Tidepool data
Project Description
This project is a large refactor of Data Science code integrating with and using the Tidepool API.
Getting Started with this project
Tidepool API
See tidepool_api.py
for class representing the api. Code example of downloading health data for a user:
from data_science_tidepool_api_python.makedata.tidepool_api import TidepoolAPI
tp_api = TidepoolAPI(username, password)
tp_api.login()
user_data = tp_api.get_user_event_data()
tp_api.logout()
Projects using the API:
The Tidepool Big Data Donation Project data science code lives in projects/tbddp
.
The Tidepool Period Project data science code lives in projects/tbddp
Contributing Guide
- All are welcome to contribute to this project.
- Naming convention for notebooks is
[short_description]-[initials]-[date_created]-[version]
, e.g.initial_data_exploration-jqp-2020-04-25-v-0-1-0.ipynb
. A short_
delimited description, the creator's initials, date of creation, and a version number, - Naming convention for data files, figures, and tables is
[PHI (if applicable)]-[short_description]-[date created or downloaded]-[code_version]
, e.g.raw_project_data_from_mnist-2020-04-25-v-0-1-0.csv
, orproject_data_figure-2020-04-25-v-0-1-0.png
.
NOTE: PHI data is never stored in github and the .gitignore file includes this requirement as well.
Tidepool Data Science Team
Name (with github link) | Tidepool Slack |
---|---|
Cameron Summers | @Cameron Summers |
Technologies (Update this list)
- Python (99% of the time)
- Anaconda for our virtual environments
- Pandas for working with data (99% of the time)
- Google Colab for sharing examples
- Pytest for testing
- Travis for continuous integration testing
- Black for code style
- Flake8 for linting
- Sphinx for documentation
- Numpy docstring format
- pre-commit for githooks
Getting Started with the Conda Virtual Environment
- Install Miniconda. CAUTION for python virtual env users: Anaconda will automatically update your .bash_profile
so that conda is launched automatically when you open a terminal. You can deactivate with the command
conda deactivate
or you can edit your bash_profile. - If you are new to Anaconda check out their getting started docs.
- If you want the pre-commit githooks to install automatically, then following these directions.
- Clone this repo (for help see this tutorial).
- In a terminal, navigate to the directory where you cloned this repo.
- Run
conda update -n base -c defaults conda
to update to the latest version of conda - Run
conda env create -f conda-environment.yml --name [input-your-env-name-here]
. This will download all of the package dependencies and install them in a conda (python) virtual environment. (Insert your conda env name in the brackets. Do not include the brackets) - Run
conda env list
to get a list of conda environments and select the environment that was created from the environmental.yml file (hint: environment name is at the top of the file) - Run
conda activate <conda-env-name>
orsource activate <conda-env-name>
to start the environment. - If you did not setup your global git-template to automatically install the pre-commit githooks, then
run
pre-commit install
to enable the githooks. - Run
deactivate
to stop the environment.
Maintaining Compatability with venv and virtualenv
This may seem counterintuitive, but when you are loading new packages into your conda virtual environment,
load them in using pip
, and export your environment using pip-chill > requirements.txt
.
We take this approach to make our code compatible with people that prefer to use venv or virtualenv.
This may also make it easier to convert existing packages into pypi packages. We only install packages directly
in conda using the conda-environment.yml file when packages are not available via pip (e.g., R and plotly-orca).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file tidepool_data_science_project-0.0.3.tar.gz
.
File metadata
- Download URL: tidepool_data_science_project-0.0.3.tar.gz
- Upload date:
- Size: 14.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef9d6d68f0ae105578d46f8fec6a491755c9f0a40b7678b95c45eb5cb2e5dd8b |
|
MD5 | 4083edb71fc5e071ba317e05f18323c5 |
|
BLAKE2b-256 | 94ad366a0e5e7cae82cce4153a6f9ad25e3e3f2405aefaaf4edac50c47238954 |
File details
Details for the file tidepool_data_science_project-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: tidepool_data_science_project-0.0.3-py3-none-any.whl
- Upload date:
- Size: 14.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb2276056924a1b96740430805ba4da1da47b68971faad098f0fed94e915b8d8 |
|
MD5 | 8015c34e31c4a88e650c8f109db2d9d5 |
|
BLAKE2b-256 | b3454c36072b79d15816e6d962178fd36e4161ddf09cd54125c83cd578cb56a7 |