-
-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #219 from tidepool-org/jebeck/redux
migrate state management to redux
- Loading branch information
Showing
206 changed files
with
9,833 additions
and
3,775 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
stage: 0 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
build/ | ||
config/ | ||
dist/ | ||
fonts/ | ||
images/ | ||
lib/**/*.js | ||
lib/**/*.jsx | ||
lib/carelink/ | ||
lib/components/ | ||
lib/core/ | ||
lib/dexcom/ | ||
lib/insulet/ | ||
lib/redux/ | ||
lib/state/ | ||
lib/tandem/ | ||
node_modules/ | ||
scripts/ | ||
styles/ | ||
test/ | ||
**/*.js | ||
.eslintrc | ||
.travis.yml | ||
description.txt | ||
LICENSE | ||
manifest.json | ||
package.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
// I want to use babel-eslint for parsing! | ||
"parser": "babel-eslint", | ||
"ecmaFeatures": { | ||
"jsx": true, | ||
"classes": true, | ||
"modules": true, | ||
}, | ||
"env": { | ||
// I write for browser | ||
"browser": true, | ||
// in CommonJS | ||
"node": true | ||
}, | ||
"globals": { | ||
"expect": false, | ||
"process": false, | ||
"require": false, | ||
"define": false, | ||
"console": false, | ||
"__MOCK__": false, | ||
"__MOCK_PARAMS__": false, | ||
"__UPLOAD_API__": false, | ||
"__API_HOST__": false, | ||
"__SHOW_ACCEPT_TERMS__": false, | ||
"__PASSWORD_MIN_LENGTH__": false, | ||
"__INVITE_KEY__": false | ||
}, | ||
// To give you an idea how to override rule options: | ||
"rules": { | ||
"quotes": [2, "single"], | ||
"strict": [2, "never"], | ||
"eol-last": 0, | ||
"no-mixed-requires": 0, | ||
"no-underscore-dangle": 0, | ||
"wrap-iife": [2, "inside"], | ||
"no-caller": 2, | ||
"no-undef": 2, | ||
"new-cap": 2, | ||
"semi": 2, | ||
"react/jsx-uses-react": 2, | ||
"react/jsx-uses-vars": 2, | ||
"react/react-in-jsx-scope": 2, | ||
// uploader specific | ||
"camelcase": 0, | ||
"eqeqeq": 0, | ||
"no-bitwise": 0, | ||
// TODO: either try to fix this globally or use an embedded .eslintrc for drivers | ||
"no-use-before-define": 0 | ||
}, | ||
"plugins": [ | ||
"react" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ node_js: | |
- "0.12" | ||
- "stable" | ||
script: | ||
- npm run jshint | ||
- npm run lint | ||
- npm test | ||
|
||
matrix: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Summary | ||
|
||
* [application state](docs/state/README.md) | ||
* [Example state tree](docs/state/ExampleStateTree.md) | ||
* [Glossary of state tree terms](docs/state/StateTreeGlossary.md) | ||
* [Custom middleware](docs/state/CustomMiddleware.md) | ||
|
||
* ["bootstrapping" to UTC (BtUTC)](docs/BootstrappingToUTC.md) | ||
|
||
* [checklist TEMPLATES](docs/checklisttemplates/README.md) | ||
* [BGM Checklist](docs/checklisttemplates/BGMChecklist.md) | ||
* [CGM Checklist](docs/checklisttemplates/CGMChecklist.md) | ||
* [Insulin Pump Checklist](docs/checklisttemplates/PumpChecklist.md) | ||
|
||
* [checklists](lib/drivers/docs/README.md) | ||
* [Abbott FreeStyle](lib/drivers/docs/abbottFreeStyleLite.md) | ||
* [Abbott Precision Xtra](lib/drivers/docs/abbottPrecisionXtra.md) | ||
* [Animas Ping and Vibe Insulin Pumps](lib/drivers/docs/animasPingAndVibe.md) | ||
* [Bayer Contour Next](lib/drivers/docs/bayerContourNext.md) | ||
* [Dexcom CGM](lib/drivers/docs/dexcom.md) | ||
* [CareLink (CGM data)](lib/drivers/docs/carelinkCGM.md) | ||
* [CareLink (insulin pump data)](lib/drivers/docs/carelinkPumpData.md) | ||
* [Insulet OmniPod](lib/drivers/docs/insuletOmniPod.md) | ||
* [Tandem Insulin Pumps](lib/drivers/docs/tandem.md) | ||
|
||
* [miscellaneous](docs/misc/README.md) | ||
* [PWD "simulators"](docs/misc/PWDSimulators.md) | ||
* [challenges of flat basal profiles](docs/misc/FlatRateBasals.md) | ||
* [2015.06 CareLink CSV updates](docs/misc/2015.06.29CareLinkCSVChanges.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
var context = require.context('./test/browser', true, /\.js$|\.jsx$/); // Load files in /test/browser/ with filename matching * .js | ||
context.keys().forEach(context); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export API_URL='http://localhost:8009' | ||
export UPLOAD_URL='http://localhost:9122' | ||
export BLIP_URL='http://localhost:3000' | ||
export DEBUG_ERROR=false | ||
export REDUX_LOG=true | ||
export REDUX_DEV_UI=true |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Templates of checklists for implementations of drivers to read data from diabetes devices. | ||
|
||
- [blood glucose meters (BGMs)](BGMChecklist.md) | ||
- [continuous glucose monitors (CGMs)](CGMChecklist.md) | ||
- [insulin pumps](PumpChecklist.md) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Miscellaneous technical documents. | ||
|
||
- guidance documentation for ["simulator" modules](PWDSimulators.md) accompanying our insulin pump drivers | ||
- technical explanation of the challenges of ["flat" basal profiles (on insulin pumps)](FlatRateBasals.md) | ||
- documentation of [updates to the CareLink CSV export format made late June 2015](2015.06.29CareLinkCSVChanges.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
## Custom Middleware | ||
|
||
One of the great benefits of [redux](http://redux.js.org/) is the easy path it provides for writing middleware to perform various actions in response to some or all of the redux actions that are the source of all changes to the application's state tree. The open-source community provides some great middleware options like the [redux logger](https://github.com/fcomb/redux-logger) that we include behind an environment variable to assist in development. | ||
|
||
In the Tidepool Uploader, we also include two custom middlewares: one for making calls to our metrics API and one for logging application errors. | ||
|
||
The source for the metrics middleware is found in `lib/redux/utils/metrics.js`. It performs a call to the Tidepool metrics API for any redux action that includes a `metric` property inside its `meta` property. | ||
|
||
The source of the error-logging middleware is found in `lib/redux/utils/errors.js`. It performs a call to the Tidepool server-side error logging for any redux action that has the boolean flag `error` as true and a JavaScript `Error` object as its `payload`. | ||
|
||
If the source code of our custom middlewares confuses more than it answers questions, we recommended reading the excellent [intro to middleware](http://redux.js.org/docs/advanced/Middleware.html) included in the redux documentation. |
Oops, something went wrong.