Skip to content

Commit

Permalink
Merge pull request #196 from openaps/dev
Browse files Browse the repository at this point in the history
Dev to master
  • Loading branch information
scottleibrand committed May 30, 2016
2 parents c8b0701 + 33b6a14 commit 05fc7c2
Show file tree
Hide file tree
Showing 21 changed files with 118 additions and 41 deletions.
41 changes: 19 additions & 22 deletions docs/docs/Resources/my-first-pr.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,35 @@
### Making your first PR (pull request)

At some point it will be suggested to you that you make a PR. PR is short for pull request.
At some point it will be suggested to you that you make a PR. PR is short for pull request.
It's actually not too hard to do one and it is a great way to contribute. This documentation is here because people like you made PRs.

* The general idea is to make edits and improvements to code or document by making a copy of the repository you'd like to change.
* Double checking that they your edits look good to you on your copy.
* Make a few notes for what you did so people can understand why you made the change.
* Then do a pull request, which is to ask the administrataors of the repository to pull your changes
back into the dev (not master) branch of the main repository.
* At which time they will do a quick review and merge your changes in.
* The general idea is to make edits and improvements to code or document by making a copy of the repository you'd like to change.
* Double checking that they your edits look good to you on your copy.
* Make a few notes for what you did so people can understand why you made the change.
* Then do a pull request, which is to ask the administrators of the repository to pull your changes back into the appropriate branch of the main repository.
* They will do a quick review and merge your changes in, or comment if there are errors that need fixing first, or if it's a large enough change that it needs to go to another branch like dev for further work before being merged to master.

OK, let's get started. For our example we are going to make an edit to the openaps docs repository.

1. Go to https://github.com/openaps/docs and hit Fork in the upper right to make your own copy of the repository.
2. Github will automatically take you to your copy (notice in the address bar you are now in your own personal github directory)
3. In the branch drop down on the upper left of the page we are going to select the dev branch instead of master, since that is the one we want to edit.
4. Now we need to find the file we want to edit. Click through the directory structure until you find and are looking at the content of the file you want to change.
5. Next, press the pencil icon in the upper right next to the trash can icon.
6. Make edits to the file as necessary.
7. Next we want to commit our changes. But first we should note what we changed and why. Be sure to put a one liner explaining the why of making the changes you did.
8. Commit the changes.
9. Now look and make sure everyting you changed looks like you meant it to (no typos, etc). If any problems, go back and edit again and save again.
3. Now we need to find the file we want to edit. Click through the directory structure until you find and are looking at the content of the file you want to change.
4. Next, press the pencil icon in the upper right next to the trash can icon.
5. Make edits to the file as necessary.
6. Next we want to commit our changes. But first we should note what we changed and why. Be sure to put a one liner explaining the why of making the changes you did.
7. Commit the changes.
8. Now look and make sure everyting you changed looks like you meant it to (no typos, etc). If any problems, go back and edit again and save again.

We now have an improved file that we want to be pulled back into the dev branch of the openaps/docs repository at https://github.com/openaps/docs
We now have an improved file that we want to be pulled back into the openaps/docs repository at https://github.com/openaps/docs

1. Go to https://github.com/[YOUR_GITHUB_USERNAME]/docs
* Or you can go to https://github.com and then click on "docs" in the "Your repositories" section in the lower right. Both methods will get you to the right place.
2. Select "dev" (not "master") from the branch drop down on the upper left (since that’s where we’d like the changes to go to)
3. Click the green "New pull request" button
4. Under the Compare Changes heading, click "compare across forks"
5. Set up the the branches you are targeting. The easiest way of thinking about the branch range is this: the base branch is where you think changes should be applied, the head branch is what you would like to be applied.
6. So, choose the base fork as openaps/docs and then the base as dev (not master). The head fork is going to be <i>youraccount</i>/docs and the base as dev (not master).
2. Click the green "New pull request" button
3. Under the Compare Changes heading, click "compare across forks"
4. Set up the the branches you are targeting. The easiest way of thinking about the branch range is this: the base branch is where you think changes should be applied, the head branch is what you would like to be applied.
5. So, choose the base fork as openaps/docs and then the base as master (or whichever branch you edited). The head fork is going to be <i>youraccount</i>/docs and the base as master (unless this is a large change that needs to go to dev first).
![Pull Request](../Images/Pull_Request.png)
7. It should show the list of changes you made. If not, you did something wrong so stop here and ask for help. If the list looks like your changes then put a note in there to what the overarching reason for the changes are (in your case you only made one, but you could have made a bunch). Create the PR.
6. It should show the list of changes you made. If not, you did something wrong so stop here and ask for help. If the list looks like your changes then put a note in there to what the overarching reason for the changes are (in your case you only made one, but you could have made a bunch). Create the PR.

It will now be in a list of PR's that the team will review and potentially give feedback on before committing to the main documentation for openaps!

Expand Down
3 changes: 1 addition & 2 deletions docs/docs/walkthrough/phase-0/loops-in-progress.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ To get you comfortable with submitting a "PR" (stands for pull request), test it

New to Github, and PRs? [Check out how to submit your first PR](../../../../docs/docs/Resources/my-first-pr.md).

When you submit the PR, be sure to target the *dev* branch of openaps/docs, not the master branch. If you target master, we'll need to ask you to re-submit, or it will likely cause a merge conflict with edits from people who correctly targeted dev.

List of people who are working on closed loops:

- Dana Lewis
Expand All @@ -27,4 +25,5 @@ List of people who are working on closed loops:
- Andy Pabari
- Rob Kresha - (Papillion, NE, USA)
- Christian Robinson (London, UK)
- Gary Kidd
- Nathan Morse
2 changes: 2 additions & 0 deletions docs/docs/walkthrough/phase-0/rpi.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@ Run

Here you can expand filesystem to maximize memory, change user password and set timezone (in internationalization options). This will take effect on the next reboot, so go ahead and reboot if prompted, or run `sudo reboot` when you're ready.

Confirm that your keyboard settings are correct. Click on Menu (upper left corner of the screen, with raspberry icon). Mouse down to Preferences, and over to Mouse and Keyboard Settings. Click on Mouse and Keyboard Settings, then click on the Keyboard tab. Click on Keyboard Layout and be sure your country and variant are correct. For the US, it should be United States and English (US).

## Setting up an SSH key for Password-less Login [optional]

You can setup a public/private key identity, and configure your local computer and the Raspberry Pi to automatically use it. This will allow SSH access to the Pi without requiring a password. Some people find this feature very convenient.
Expand Down
4 changes: 4 additions & 0 deletions docs/docs/walkthrough/phase-4/create-schedule.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@
You should use [cron](http://bit.ly/1QpJFk1) to create a schedule for your loop.

There is not more instructions around this at this time, due to the need for you to be very certain you want to automate your loop. That being said, there are some examples and many discussions around this step in the Gitter channel. Look in the web interface and use the search function to see some discussions on this topic, and ask additional questions as needed as you learn about this step.

That being said, we do recommend making sure your OpenAPS git environment is healthy prior to running you loop, and we have a tool for that: `oref0-reset-git`. We recommend running it fairly frequently, so your cron entry should look something like this:

`* * * * * cd [YOUR OPENAPS DIRECTORY] && oref0-reset-git`
8 changes: 8 additions & 0 deletions docs/reference/openaps/openaps-device-cgm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#### `cgm.ini`
This is the device file for your Dexcom CGM. It will generally not have anything in it, as the communications are handled by core OpenAPS code.
##### Setup code
`openaps device add cgm dexcom`
##### Sample contents
`[device "cgm"]`
##### Dependencies
None
15 changes: 15 additions & 0 deletions docs/reference/openaps/openaps-device-pump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#### `pump.ini`
This device contains the information requied to connect to your pump, such as your pump's serial number. This example assumes you are using a TI stick.
##### Setup code
`openaps device add pump mmeowlink subg_rfspy /dev/mmeowlink [YOUR PUMP SERIAL]`
##### Sample contents
`
[device "pump"]
serial = [YOUR PUMP SERIAL]
port = /dev/mmeowlink
radio_type = subg_rfspy
model = [YOUR PUMP MODEL]
expires = 2016-05-23T23:02:36.168762
'
##### Dependencies
None
8 changes: 8 additions & 0 deletions docs/reference/openaps/openaps-report-max_iob.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#### `max_iob.json`
This is less of a report, and more of a file created during setup.
##### Setup code
None
##### Sample contents
`{ "max_iob": 0 }`
##### Dependencies
None
8 changes: 8 additions & 0 deletions docs/reference/openaps/openaps-report-monitor-clock-zoned.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#### `monitor/clock-zoned.json`
This report contains the date and time that is set on your pump, but modified to include your timezone information.
##### Setup code
`openaps use tz clock --timezone "[YOUR TIMEZONE]" --adjust "missing" --date "None" --astimezone monitor/clock.json`
##### Sample contents
`"2016-05-23T22:40:14-04:00"`
##### Dependencies
* [`monitor/clock.json`](openaps-report-monitor-clock.md)
2 changes: 1 addition & 1 deletion docs/reference/openaps/openaps-report-monitor-clock.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ This report contains the date and time that is set on your pump, but does **NOT*
##### Sample contents
`"2016-05-22T00:18:41"`
##### Dependencies
None
* [`pump.ini`](openaps-device-pump.md)
2 changes: 1 addition & 1 deletion docs/reference/openaps/openaps-report-monitor-glucose.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ This report contains multiple glucose entries from either your CGM or Nightscout
},
]`
##### Dependencies
* [`cgm.ini`](openaps/openaps-device-cgm.md)
* [`cgm.ini`](openaps-device-cgm.md)
6 changes: 3 additions & 3 deletions docs/reference/openaps/openaps-report-monitor-iob.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ This report contains several entries detailing the levels of IOB (Insulin On Boa
},
]`
##### Dependencies
* [`monitor/pumphistory-zoned.json`](openaps/openaps-report-monitor-pumphistory-zoned.md)
* [`settings/profile.json`](openaps/openaps-report-settings-profile.md)
* [`monitor/clock-zoned.json`](openaps/openaps-report-monitor-clock-zoned.md)
* [`monitor/pumphistory-zoned.json`](openaps-report-monitor-pumphistory-zoned.md)
* [`settings/profile.json`](openaps-report-settings-profile.md)
* [`monitor/clock-zoned.json`](openaps-report-monitor-clock-zoned.md)
18 changes: 18 additions & 0 deletions docs/reference/openaps/openaps-report-monitor-pumphistory-zoned.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#### `monitor/pumphistory-zoned.json`
This report is the same as your `pumphistory.json` report, but adjusted for your timezone.
##### Setup code
`openaps use tz rezone --timezone "[YOUR TIMEZONE]" --adjust "missing" --date "timestamp dateString start_at end_at created_at" --astimezone monitor/pumphistory.json`
##### Sample contents
`[
{
"_type": "TempBasalDuration",.
"_description": "TempBasalDuration 2016-05-23T22:15:28 head[2], body[0] op[0x16]",.
"timestamp": "2016-05-23T22:15:28-04:00",.
"_body": "",.
"_head": "1601",.
"duration (min)": 30,.
"_date": "5c4f165710"
},
]`
##### Dependencies
* [`monitor/pumphistory.json`](openaps-report-monitor-pumphistory.md)
18 changes: 18 additions & 0 deletions docs/reference/openaps/openaps-report-monitor-pumphistory.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#### `monitor/pumphistory.json`
This report gathers the last 5 hours of history directly from your pump.
##### Setup code
`openaps report add monitor/pumphistory.json JSON pump iter_pump_hours 5`
##### Sample contents
`[
{
"_type": "TempBasalDuration",.
"duration (min)": 30,.
"_description": "TempBasalDuration 2016-05-23T22:15:28 head[2], body[0] op[0x16]",.
"timestamp": "2016-05-23T22:15:28",.
"_body": "",.
"_head": "1601",.
"_date": "5c4f165710"
},
]`
##### Dependencies
* [`pump.ini`](openaps-device-pump.md)
10 changes: 5 additions & 5 deletions docs/reference/openaps/openaps-report-settings-auto-sens.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ This report contains an automatically determined, temporary modification to your
##### Sample contents
`{"ratio":0.78}`
##### Dependencies
* [`monitor/glucose.json`](openaps/openaps-report-monitor-glucose.md)
* [`settings/pumphistory-24h-zoned.json`](openaps/openaps-report-settings-pumphistory-24h-zoned.md)
* [`settings/insulin_sensitivities.json`](openaps/openaps-report-settings-insulin_sensitivities.md)
* [`settings/basal_profile.json`](openaps/openaps-report-settings-basal_profile.md)
* [`settings/profile.json`](openaps/openaps-report-settings-profile.md)
* [`monitor/glucose.json`](openaps-report-monitor-glucose.md)
* [`settings/pumphistory-24h-zoned.json`](openaps-report-settings-pumphistory-24h-zoned.md)
* [`settings/insulin_sensitivities.json`](openaps-report-settings-insulin_sensitivities.md)
* [`settings/basal_profile.json`](openaps-report-settings-basal_profile.md)
* [`settings/profile.json`](openaps-report-settings-profile.md)
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ This report contains the basal rates that are set up in your pump.
}
]`
##### Dependencies
None
* [`pump.ini`](openaps-device-pump.md)
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ This report contains the high/low glucose targets set up in your pump.
"first": 1
}`
##### Dependencies
None
* [`pump.ini`](openaps-device-pump.md)
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ This report contains your carb ratios.
]
}`
##### Dependencies
None
* [`pump.ini`](openaps-device-pump.md)
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ This report contains the insulin sensitivity levels stored in your pump.
"first": 1
}`
##### Dependencies
None
* [`pump.ini`](openaps-device-pump.md)
2 changes: 1 addition & 1 deletion docs/reference/openaps/openaps-report-settings-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ This report contains the model number of your pump.
##### Sample contents
`"722"`
##### Dependencies
None
* [`pump.ini`](openaps-device-pump.md)
2 changes: 1 addition & 1 deletion docs/reference/openaps/openaps-report-settings-profile.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ This report contains a general profile of the information in your pump such as c
##### Setup code
`openaps report add settings/profile.json text get-profile shell settings/settings.json settings/bg_targets.json settings/insulin_sensitivities.json settings/basal_profile.json max_iob.json`
##### Sample contents
`{"max_iob":5,"type":"current","dia":4,"current_basal":1.8,"max_daily_basal":2.2,"max_basal":6,"min_bg":100,"max_bg":120,"sens":20,"carb_ratio":5}`
`{"max_iob":0,"type":"current","dia":4,"current_basal":1.8,"max_daily_basal":2.2,"max_basal":6,"min_bg":100,"max_bg":120,"sens":20,"carb_ratio":5}`
##### Dependencies
* [`settings/settings.json`](openaps-report-settings-settings.md)
* [`settings/bg_targets.json`](openaps-report-settings-bg_targets.md)
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/openaps/openaps-report-settings-settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ This report contains various settings specific to your pump.
"paradigm_enabled": 1
}`
##### Dependencies
None
* [`pump.ini`](openaps-device-pump.md)

0 comments on commit 05fc7c2

Please sign in to comment.