-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
meta-documentation (docs for docs & doc generators)
- Loading branch information
Showing
14 changed files
with
194 additions
and
21 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
bin/ | ||
bin/*.js | ||
src/ | ||
web/ | ||
|
||
|
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,7 @@ | ||
# data model tools | ||
|
||
This repository includes two command-line tools: a document template generator and a sample datum generator. The first tool is only relevant and useful internal to Tidepool: it is only for those of us adding or editing new data model docs. The sample datum generator, on the other hand, may also be useful for third parties who are learning about Tidepool's data model(s). The sample generator can generate single example datums for any type in Tidepool's documented data model(s) in both the format necessary for `ingestion` of data (useful for third parties wishing to build apps that upload data directly into the Tidepool cloud) and in the format that `client` applications will see after requesting data from the Tidepool cloud. (In addition, it is possible to generate a sample datum in `storage` format, but that is again mostly only of interest to Tidepool's own engineering team(s).) | ||
|
||
For more information about each of these tools, see the following pages: | ||
- [the doc template generator](./docTemplateGenerator.md) | ||
- [the sample datum generator](./sampleDatumGenerator.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,34 @@ | ||
# the doc template generator | ||
|
||
This command-line tool generates or regenerates Markdown files for types or sub-types in the Tidepool data model(s). At present, it is designed to be run from within the `bin/` directory, although it is on @jebeck's list of things to do to make it more flexible. As with any (good...) command-line tool, you can pass it the argument `--help` to get information about the arguments it takes and their syntax. The tool itself is a node script, but it is executable, so it can be run just like any bash script: | ||
|
||
```bash | ||
$ ./docTemplateGenerator.js --help | ||
``` | ||
|
||
The present usage (although always use `--help` in case this meta-doc hasn't been updated!) is: | ||
``` | ||
Usage: docTemplateGenerator [options] <type> | ||
Options: | ||
-h, --help output usage information | ||
-p, --path <value> path to docs directory | ||
--subtype, --subType <value> subType for this datum | ||
``` | ||
|
||
The bash script `regenerate-all-docs.sh` employs the doc template generator to regenerate all the Markdown files for all data types. Tidepool developers are encouraged to use this script and discard any unnecessary changes to ensure that *everything* that should be updated gets updated. See the section on [regenerating documents](../README.md#regenerating-documents) in the introduction for more details. | ||
|
||
## examples | ||
|
||
To regenerate the Markdown file for the `wizard` data type: | ||
|
||
```bash | ||
$ ./docTemplateGenerator.js wizard | ||
``` | ||
|
||
To regenerate just the Markdown file documenting a `basal` with a `deliveryType` of `temp`: | ||
|
||
```bash | ||
$ ./docTemplateGenerator.js --subtype temp basal | ||
``` |
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,63 @@ | ||
# the sample datum generator | ||
|
||
This command-line tool generates sample JSON datums in all the types of the Tidepool data model(s) in a variety of formats, at the user's choice. As with any (good...) command-line tool, you can pass it the argument `--help` to get information about the arguments it takes and their syntax. The tool itself is a node script, but it is executable, so it can be run just like any bash script: | ||
|
||
```bash | ||
$ ./sampleDatumGenerator.js --help | ||
``` | ||
|
||
The present usage (although always use `--help` in case this meta-doc hasn't been updated!) is: | ||
``` | ||
Usage: sampleDatumGenerator [options] <type> | ||
Options: | ||
-h, --help output usage information | ||
-c, --clipboard copy resulting sample JSON to clipboard | ||
-d, --datetime <value> ISO-formatted datetime for datum | ||
-f, --format <value> data format of client, ingestion, storage | ||
--subtype, --subType <value> subType for this datum | ||
``` | ||
|
||
Or, less concisely... | ||
|
||
The only required argument is the `type` of the Tidepool data type, from those listed on the [index page for diabetes data types](../device-data/types/README.md). | ||
|
||
Along with this mandatory argument, any of the following optional arguments or flags may appear in any order: | ||
|
||
- `-c` or `--clipboard` without an argument to copy the requested sample JSON to the system clipboard | ||
- `-d` or `--datetime` plus an [ISO-formatted](https://en.wikipedia.org/wiki/ISO_8601 'Wikipedia: ISO 8601') datetime to produce the sample datum at the given datetime | ||
- `-f` or `--format` plus one of `client`, `ingestion`, or `storage` to specify a format other than the default `client` format | ||
- `--subtype` or `--subType` plus an appropriate `subType`, `deliveryType` or manufacturer (from `animas`, `insulet`, `medtronic`, or `tandem`), depending on the data type of the sample datum under request | ||
|
||
## examples | ||
|
||
To generate a sample `smbg` datum (defaults to `client` format): | ||
|
||
```bash | ||
$ ./sampleDatumGenerator.js smbg | ||
``` | ||
|
||
To generate a sample `smbg` datum at noon, April Fool's Day, 2016, UTC time: | ||
|
||
``` | ||
$ ./sampleDatumGenerator.js smbg -d 2016-04-01T12:00:00+00:00 | ||
``` | ||
|
||
To do the same *and* copy the result to your operating system's clipboard: | ||
|
||
``` | ||
$ ./sampleDatumGenerator.js smbg -d 2016-04-01T12:00:00+00:00 -c | ||
``` | ||
|
||
To generate an extended ("square") `bolus`: | ||
|
||
``` | ||
./sampleDatumGenerator.js bolus --subType square | ||
``` | ||
|
||
To generate `pumpSettings` in the `tandem` format: | ||
|
||
``` | ||
./sampleDatumGenerator.js --subtype tandem pumpSettings | ||
``` |
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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
<!-- non-generated document! all areas editable --> | ||
|
||
Coming soon! | ||
|
||
<!-- TODO: document on out-of-range values, relevant especially to cbg, smbg, and bloodKetone records --> |
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 |
---|---|---|
@@ -1,12 +1,14 @@ | ||
<!-- non-generated document! all areas editable --> | ||
|
||
## Diabetes Data Types | ||
|
||
- [basal insulin](./basal/README.md) | ||
- [blood ketones](./bloodKetone.md) | ||
- [bolus insulin](./bolus/README.md) | ||
- [(bolus) calculator/"wizard" records](./wizard.md) | ||
- [continuous blood glucose (cbg)](./cbg.md) | ||
- [CGM settings](./cgmSettings.md) | ||
- [device events](./deviceEvent/README.md) | ||
- [insulin pump settings](./pumpSettings.md) | ||
- [self-monitored blood glucose (smbg)](./smbg.md) | ||
- [upload metadata](./upload.md) | ||
- [`basal` for basal insulin](./basal/README.md) | ||
- [`bloodKetone` for blood ketones](./bloodKetone.md) | ||
- [`bolus` for bolus insulin](./bolus/README.md) | ||
- [`wizard` for (bolus) calculator/"wizard" records](./wizard.md) | ||
- [`cbg` for continuous blood glucose (cbg)](./cbg.md) | ||
- [`cgmSettings` for CGM settings](./cgmSettings.md) | ||
- [`deviceEvent` for miscellaneous other device events](./deviceEvent/README.md) | ||
- [`pumpSettings` for insulin pump settings](./pumpSettings.md) | ||
- [`smbg` for self-monitored blood glucose (smbg)](./smbg.md) | ||
- [`upload` for upload metadata](./upload.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
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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
<!-- non-generated document! all areas editable --> | ||
|
||
Coming soon! | ||
|
||
<!-- TODO: document how `suppressed` works when a `temp` or `suspend` basal crosses > 1 segment of a basal schedule --> |
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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
<!-- non-generated document! all areas editable --> | ||
|
||
Coming soon! | ||
|
||
<!-- TODO: document status.previous! --> |
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