Skip to content

Commit

Permalink
Release 3.0
Browse files Browse the repository at this point in the history
Release 3.0

**New features**:

1. New Bolus View:
* Display predictions (graph) and a summary of meal entries. Added setting to hide this chart.
* Always display the Eventual Glucose prediction.
* Alert if a remote bolus was just delivered, to avoid double boluses (both remote parent/caregiver and user). 
* New alternate bolus calculator (we now have two, select which one you want to use in the new settings). Thank you @ionas. 
This bolus calculator uses a simpler and more traditional bolus wizard, with an added optional adjustment for fatty meals (reduced bolus) and an individual adjustment factor (a multiple).
The toggle for fatty meal (if enabled in settings) will decrease the recommended bolus amount.
 Important to understand is that the Oref0/2 predictions are not used for these recommendations (in contrast to the default calculator).  
This means recommendations will sometimes be given **even** when some predictions(s) are below your target glucose and/or threshold glucose value.  Because if this I added the display of predictions also for this calculator, for some extra info and safety when making decision about confirming or changing bolus amount when using this alternate bolus calculator.
* New Warning and inactivation if entering above maxBolus.
* New big blue ”Enact” button.
* **Edit Meal entries**. You can now go back to the Meal View from the Bolus View to edit or delete entries.

2. New Meal View: 
* In Meal View you can now edit previous entered meal entries (if coming from the bolus view, see above).
* Several UI/UX changes to make this view cleaner. 
* The summary when combining different presets (the ”presets” now called ”Saved Food”) is cleaner and more readable. Font colour will be adjusted  automatically for you to be able to easier separate the different items comprising the full meal.
* Adjustment of time is now easier and safer. Tap in the + or - button to add or subtract 15 minutes. To avoid accidental change of Time you now need to tap the ”Now” once before you can change the time of meal entries.
* Added ”Note” for you to add any additional info (see screenshot above).
* New big blue ”Continue” button.

3. **New Settings**
* Settings now organised differently. 
* UX/UI, App Icons, Bolus Calculator, Fat and Protein and ISF are some of all the new features added to the original FreeAPS X. These will now have their own section in settings. 
* The UX/UI have several new settings and you can now access these directly from the Home View (via the new Time Interval Button). 
* The Dynamic ISF settings have new pop-ups, allowing for more readable descriptions with new graphics. Using font size adjusted for dynamic font sizes (accessibility setting). 
* Threshold value can now be entered in a user-configurable glucose unit. New descriptions and graphics for the threshold setting.

3. Live Activities. 
* Live activities added, displaying latest glucose reading in the dynamic island and/or the Lock Screen. Thank you @ionas.

4. **Home View**
	Lots of UX/UI changes meant to reduce the clutter and improve the user experience.  I can’t list them all here. Listed below are some of the
	changes.
* Make iASP work better with the accessibility settings. 
	Now iAPS will display nicely with all of the different iOS accessibility font sizes. One exception are the views from the Loop dependencies, these 	are not presenting well in bigger/biggest font sizes. These will need code change also in Loop. 
	You can both increase and decrease the font sizes in the iOS accessibility settings. Tip is to make iAPS-specific settings in iOS. 

* Display active profile override in chart, similar to the demo targets. Duration and target are illustrated in purple. When active also the override button is highlighted.
* Disable an active TT or Override with a tap on the highlighted button. A new cleaner confirmation alert is present  before activation. 
* To edit or see more details about current active override (or TT) longpress the override (or TT) button.
* Highlight the Temp Target button when active. Disable and change as with the overrides described above.
The Temp Target button is hidden by default, but for those who really need to combine overrides and temp targets there now  is a new setting in UX/UI settings to display thus button.
* Add a grey history button to the left. Tap this when you want to see the pump or glucose history.
* Added scroll view. To see more (than you had before) info you can scroll down in Home View. Currently we only have a preview of statistics here (Sort of a test). Later more info/charts will be added here (insulin, carbs, steps, heart rate etc.). This is Info you only need/want to see sometimes, and which you only see when scrolling down. Tap the statistics preview to see all stats. This current preview display the Time in Range for the current day (hours since start of day).
* Increase the current Glucose in Header. There is now a setting to always Color-code the glucose, or only when below/over notification limits (for a cleaner look). 
* Present IOB and COB in frosted glass test tubes. (To reduce the boring clutter of strings in header view):


* Illustrate the pump with image.
Duration will b presented in red when getting close to expiration. Tap pump to see more info.

* Present MDT battery image dynamically. Battery will be filled according to current percentage . Tap to see more info.

* Loop symbol is now more discrete. As looping is happening reliably you shouldn’t always need to focus on a big loop symbol. However when not working this symbol will be presented in red (or orange) clearly for everyone. Looping symbol is now presented centred, under the glucose (centred), as these two parameters ere the two most important. Tapping the loop symbol will display a bigger loop pop-up than before, in bigger default font size at the bottom for you to see all info at once (header, info panel, part of chart and the big pop-up with all of the relevant oref2 info. 
* Display the Eventual Glucose in info panel (before som users didn’t know what this tiny string meant) and in bigger default font size. Added unit to distinguish it from the current glucose value.  
* Added info in the loop pop-up. You will now always see when SMBs are disabled and when a middleware function is active (exactly what info is presented depends on the middleware code). When Middleware is active you will see this info in red. When SMB-ratio is changed from default (0.5) you’ll see this in orange (see above). When SMBs are disabled (either by settings or by a profile override or a demo target override you’ll see this presented at the button.
* Remove the big colourful legend. Only display the chart legend whiten tapping the chart. Tapping again will hide it. The legend will now always be displayed under the predictions. Less clutter. 
* Simplify the chart time interval settings (less clutter). Tapping this button will now also present you with a shortcut directly to the Ui/UX settings, for you to change the appearance of the Home View, whenever you’d like. 
* When Max IOB = 0 an orange string is presented prominently in the info panel, now being a bit more descriptive. 
The font size depends on your iOS settings…
* Profile panel has been removed and this space has now been added to the header instead. Instead of the panel we now have a profile button. 

5. Remote Commands, including Remote Profile Overrides. 

* From Nightscout you can now announce carbs, fat, protein remotely. You need to always enter all arguments. 
	Example 1: Announce 10 g carbs, 5g fat and 8g protein:
	”meal: 10, 5, 8”
* You can now also activate an override and cancel an active profile override remotely. 
	Example 2: cancel an override:
	”Override: cancel”

	Example 3: Start an override (you need to enter the name of an existing override preset):
	”override: 🎾 🎾”
* The remote commands will now be presented in iAPS Home View chart with an owl symbol with an overlayed symbol of action. As mentioned before any remote bolus will trigger an alert, to prevent double bolus, when trying to bolus shortly after a remote bolus. Still please be super careful with remote boluses. I never do these (other than testing). 


6. Silcenced Omnipod and other features, by @joemoran
* You can now finally have the pod completely silenced!
* New dev features in the new Pod Diagnostic Omnipod views.  

**Bug Fixes**
* Some of @joe Morans previous Omnipod PR:s to dev weren’t merged to main, due to merge conflicts, but now all of the dev commits he PR:ed to dev is in main.
* You can now always deactivate and delete Omnipod pump in iAPS simulator, thanks to a bug fix by @joremoran, 
* Threshold limit fix by @MikePlante
* Other bug fixes and typos, some of which were specific to dev and some which weren’t. Thanks you @daniel S for the fetching of carbs from NS bug fix. 

**Localizations**
* Lots of translations (thank you all translators!). 
* New languages (Vietnamese and Hungarian).
* New code and missing strings added. 

**Miscellaneous**
* Fastlane updates, by @Bjoern-Ole and @dnzxy. New auto-sync and auto-build options. Sync time with Windows time server. 
* Add option for confirming boluses on the Apple Watch quicker (less crown rotation needed), by @MikePlante

And several other commits. I will update Release notes when needed upon request. For screenshots and more info, see Discord.
  • Loading branch information
Jon-b-m authored Feb 9, 2024
1 parent f404fc4 commit 7d6614c
Show file tree
Hide file tree
Showing 333 changed files with 11,503 additions and 2,752 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/add_identifiers.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
name: 2. Add Identifiers
run-name: Add Identifiers
run-name: Add Identifiers (${{ github.ref_name }})
on:
workflow_dispatch:

jobs:
secrets:
validate:
name: Validate
uses: ./.github/workflows/validate_secrets.yml
secrets: inherit

identifiers:
needs: secrets
needs: validate
runs-on: macos-13
steps:
# Uncomment to manually select Xcode version if needed
#- name: Select Xcode version
# run: "sudo xcode-select --switch /Applications/Xcode_14.1.app/Contents/Developer"
- name: Select Xcode version
run: "sudo xcode-select --switch /Applications/Xcode_15.0.1.app/Contents/Developer"

# Checks-out the repo
- name: Checkout Repo
Expand All @@ -24,13 +25,17 @@ jobs:
- name: Patch Match Tables
run: find /usr/local/lib/ruby/gems -name table_printer.rb | xargs sed -i "" "/puts(Terminal::Table.new(params))/d"

# Install project dependencies
- name: Install Project Dependencies
run: bundle install

# Sync the GitHub runner clock with the Windows time server (workaround as suggested in https://github.com/actions/runner/issues/2996)
- name: Sync clock
run: sudo sntp -sS time.windows.com

# Create or update identifiers for app
- name: Fastlane Provision
run: fastlane identifiers
run: bundle exec fastlane identifiers
env:
TEAMID: ${{ secrets.TEAMID }}
GH_PAT: ${{ secrets.GH_PAT }}
Expand Down
217 changes: 206 additions & 11 deletions .github/workflows/build_iAPS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,41 +6,236 @@ on:
## Remove the "#" sign from the beginning of the line below to get automated builds on push (code changes in your repository)
#push:

## Remove the "#" sign from the beginning of the two lines below to get automated builds every two months
#schedule:
#- cron: '0 17 1 */2 *' # Runs at 17:00 UTC on the 1st in Jan, Mar, May, Jul, Sep and Nov.
schedule:
#- cron: '30 04 1 * *' # Runs at 04:30 UTC on the 1st every month
- cron: '0 8 * * 3' # Checks for updates at 08:00 UTC every Wednesday
- cron: '0 6 1 * *' # Builds the app on the 1st of every month at 06:00 UTC

env:
UPSTREAM_REPO: Artificial-Pancreas/iAPS
UPSTREAM_BRANCH: ${{ github.ref_name }} # branch on upstream repository to sync from (replace with specific branch name if needed)
TARGET_BRANCH: ${{ github.ref_name }} # target branch on fork to be kept in sync, and target branch on upstream to be kept alive (replace with specific branch name if needed)
ALIVE_BRANCH: alive

jobs:
secrets:
validate:
name: Validate
uses: ./.github/workflows/validate_secrets.yml
secrets: inherit

# Checks if GH_PAT holds workflow permissions
# Checks for existence of alive branch; if non-existent creates it
check_alive_and_permissions:
needs: validate
runs-on: ubuntu-latest
name: Check alive branch and permissions
permissions:
contents: write
outputs:
WORKFLOW_PERMISSION: ${{ steps.workflow-permission.outputs.has_permission }}

steps:
- name: Check for workflow permissions
id: workflow-permission
env:
TOKEN_TO_CHECK: ${{ secrets.GH_PAT }}
run: |
PERMISSIONS=$(curl -sS -f -I -H "Authorization: token ${{ env.TOKEN_TO_CHECK }}" https://api.github.com | grep ^x-oauth-scopes: | cut -d' ' -f2-);
if [[ $PERMISSIONS =~ "workflow" || $PERMISSIONS == "" ]]; then
echo "GH_PAT holds workflow permissions or is fine-grained PAT."
echo "has_permission=true" >> $GITHUB_OUTPUT # Set WORKFLOW_PERMISSION to false.
else
echo "GH_PAT lacks workflow permissions."
echo "Automated build features will be skipped!"
echo "has_permission=false" >> $GITHUB_OUTPUT # Set WORKFLOW_PERMISSION to false.
fi
- name: Check for alive branch
if: steps.workflow-permission.outputs.has_permission == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if [[ "$(gh api -H "Accept: application/vnd.github+json" /repos/${{ github.repository_owner }}/iAPS/branches | jq --raw-output 'any(.name=="alive")')" == "true" ]]; then
echo "Branch 'alive' exists."
echo "ALIVE_BRANCH_EXISTS=true" >> $GITHUB_ENV # Set ALIVE_BRANCH_EXISTS to true
else
echo "Branch 'alive' does not exist."
echo "ALIVE_BRANCH_EXISTS=false" >> $GITHUB_ENV # Set ALIVE_BRANCH_EXISTS to false
fi
- name: Create alive branch
if: env.ALIVE_BRANCH_EXISTS == 'false'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Get ref for Artificial-Pancreas/iAPS:dev
SHA=$(curl -sS https://api.github.com/repos/${{ env.UPSTREAM_REPO }}/git/refs \
| jq '.[] | select(.ref == "refs/heads/dev" ) | .object.sha' \
| tr -d '"'
);
# Create alive branch based on Artificial-Pancreas/iAPS:dev
gh api \
--method POST \
-H "Authorization: token $GITHUB_TOKEN" \
-H "Accept: application/vnd.github.v3+json" \
/repos/${{ github.repository_owner }}/iAPS/git/refs \
-f ref='refs/heads/alive' \
-f sha=$SHA
# Checks for changes in upstream repository; if changes exist prompts sync for build
# Performs keepalive to avoid stale fork
check_latest_from_upstream:
needs: [validate, check_alive_and_permissions]
runs-on: ubuntu-latest
name: Check upstream and keep alive
outputs:
NEW_COMMITS: ${{ steps.sync.outputs.has_new_commits }}

steps:
- name: Checkout target repo
if: |
needs.check_alive_and_permissions.outputs.WORKFLOW_PERMISSION == 'true' &&
(vars.SCHEDULED_BUILD != 'false' || vars.SCHEDULED_SYNC != 'false')
uses: actions/checkout@v3
with:
token: ${{ secrets.GH_PAT }}
ref: alive

- name: Sync upstream changes
if: | # do not run the upstream sync action on the upstream repository
needs.check_alive_and_permissions.outputs.WORKFLOW_PERMISSION == 'true' &&
vars.SCHEDULED_SYNC != 'false' && github.repository_owner != 'Artificial-Pancreas'
id: sync
uses: aormsby/[email protected]
with:
target_sync_branch: ${{ env.ALIVE_BRANCH }}
shallow_since: 6 months ago
target_repo_token: ${{ secrets.GH_PAT }}
upstream_sync_branch: ${{ env.UPSTREAM_BRANCH }}
upstream_sync_repo: ${{ env.UPSTREAM_REPO }}

# Display a sample message based on the sync output var 'has_new_commits'
- name: New commits found
if: |
needs.check_alive_and_permissions.outputs.WORKFLOW_PERMISSION == 'true' &&
vars.SCHEDULED_SYNC != 'false' && steps.sync.outputs.has_new_commits == 'true'
run: echo "New commits were found to sync."

- name: No new commits
if: |
needs.check_alive_and_permissions.outputs.WORKFLOW_PERMISSION == 'true' &&
vars.SCHEDULED_SYNC != 'false' && steps.sync.outputs.has_new_commits == 'false'
run: echo "There were no new commits."

- name: Show value of 'has_new_commits'
if: needs.check_alive_and_permissions.outputs.WORKFLOW_PERMISSION == 'true' && vars.SCHEDULED_SYNC != 'false'
run: |
echo ${{ steps.sync.outputs.has_new_commits }}
echo "NEW_COMMITS=${{ steps.sync.outputs.has_new_commits }}" >> $GITHUB_OUTPUT
# Keep repository "alive": add empty commits to ALIVE_BRANCH after "time_elapsed" days of inactivity to avoid inactivation of scheduled workflows
- name: Keep alive
if: |
needs.check_alive_and_permissions.outputs.WORKFLOW_PERMISSION == 'true' &&
(vars.SCHEDULED_BUILD != 'false' || vars.SCHEDULED_SYNC != 'false')
uses: gautamkrishnar/keepalive-workflow@v1 # using the workflow with default settings
with:
time_elapsed: 20 # Time elapsed from the previous commit to trigger a new automated commit (in days)

- name: Show scheduled build configuration message
if: needs.check_alive_and_permissions.outputs.WORKFLOW_PERMISSION != 'true'
run: |
echo "### :calendar: Scheduled Sync and Build Disabled :mobile_phone_off:" >> $GITHUB_STEP_SUMMARY
echo "You have not yet configured the scheduled sync and build for iAPS's browser build." >> $GITHUB_STEP_SUMMARY
echo "Synchronizing your fork of <code>iAPS</code> with the upstream repository <code>Artificial-Pancreas/iAPS</code> will be skipped." >> $GITHUB_STEP_SUMMARY
echo "If you want to enable automatic builds and updates for your iAPS, please follow the instructions \
under the following path <code>iAPS/fastlane/testflight.md</code>." >> $GITHUB_STEP_SUMMARY

# Builds iAPS
build:
needs: secrets
name: Build
needs: [validate, check_alive_and_permissions, check_latest_from_upstream]
runs-on: macos-13
permissions:
contents: write
if: | # runs if started manually, or if sync schedule is set and enabled and scheduled on the first Saturday each month, or if sync schedule is set and enabled and new commits were found
github.event_name == 'workflow_dispatch' ||
(needs.check_alive_and_permissions.outputs.WORKFLOW_PERMISSION == 'true' &&
(vars.SCHEDULED_BUILD != 'false' && github.event.schedule == '0 6 1 * *') ||
(vars.SCHEDULED_SYNC == 'true' && needs.check_latest_from_upstream.outputs.NEW_COMMITS == 'true' )
)
steps:
# Uncomment to manually select Xcode version if needed
- name: Select Xcode version
run: "sudo xcode-select --switch /Applications/Xcode_15.0.1.app/Contents/Developer"

- name: Checkout Repo for syncing
if: |
needs.check_alive_and_permissions.outputs.WORKFLOW_PERMISSION == 'true' &&
vars.SCHEDULED_SYNC == 'true'
uses: actions/checkout@v3
with:
token: ${{ secrets.GH_PAT }}
ref: ${{ env.TARGET_BRANCH }}

- name: Sync upstream changes
if: | # do not run the upstream sync action on the upstream repository
needs.check_alive_and_permissions.outputs.WORKFLOW_PERMISSION == 'true' &&
vars.SCHEDULED_SYNC == 'true' && github.repository_owner != 'Artificial-Pancreas'
id: sync
uses: aormsby/[email protected]
with:
target_sync_branch: ${{ env.TARGET_BRANCH }}
shallow_since: 6 months ago
target_repo_token: ${{ secrets.GH_PAT }}
upstream_sync_branch: ${{ env.UPSTREAM_BRANCH }}
upstream_sync_repo: ${{ env.UPSTREAM_REPO }}

# Display a sample message based on the sync output var 'has_new_commits'
- name: New commits found
if: |
needs.check_alive_and_permissions.outputs.WORKFLOW_PERMISSION == 'true' &&
vars.SCHEDULED_SYNC == 'true' && steps.sync.outputs.has_new_commits == 'true'
run: echo "New commits were found to sync."

- name: No new commits
if: |
needs.check_alive_and_permissions.outputs.WORKFLOW_PERMISSION == 'true' &&
vars.SCHEDULED_SYNC == 'true' && steps.sync.outputs.has_new_commits == 'false'
run: echo "There were no new commits."

- name: Show value of 'has_new_commits'
if: |
needs.check_alive_and_permissions.outputs.WORKFLOW_PERMISSION == 'true'
&& vars.SCHEDULED_SYNC == 'true'
run: |
echo ${{ steps.sync.outputs.has_new_commits }}
echo "NEW_COMMITS=${{ steps.sync.outputs.has_new_commits }}" >> $GITHUB_OUTPUT
# Checks-out the repo
- name: Checkout Repo
- name: Checkout Repo for building
uses: actions/checkout@v3
with:
token: ${{ secrets.GH_PAT }}
submodules: recursive

ref: ${{ env.TARGET_BRANCH }}

# Patch Fastlane Match to not print tables
- name: Patch Match Tables
run: find /usr/local/lib/ruby/gems -name table_printer.rb | xargs sed -i "" "/puts(Terminal::Table.new(params))/d"

# Install project dependencies
- name: Install project dependencies
run: bundle install

# Sync the GitHub runner clock with the Windows time server (workaround as suggested in https://github.com/actions/runner/issues/2996)
- name: Sync clock
run: sudo sntp -sS time.windows.com

# Build signed iAPS IPA file
- name: Fastlane Build & Archive
run: fastlane build_iAPS
run: bundle exec fastlane build_iAPS
env:
TEAMID: ${{ secrets.TEAMID }}
GH_PAT: ${{ secrets.GH_PAT }}
Expand All @@ -51,7 +246,7 @@ jobs:

# Upload to TestFlight
- name: Fastlane upload to TestFlight
run: fastlane release
run: bundle exec fastlane release
env:
TEAMID: ${{ secrets.TEAMID }}
GH_PAT: ${{ secrets.GH_PAT }}
Expand Down
20 changes: 13 additions & 7 deletions .github/workflows/create_certs.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
name: 3. Create Certificates
run-name: Create Certificates
run-name: Create Certificates (${{ github.ref_name }})
on:
workflow_dispatch:

jobs:
secrets:
validate:
name: Validate
uses: ./.github/workflows/validate_secrets.yml
secrets: inherit

certificates:
needs: secrets
name: Create Certificates
needs: validate
runs-on: macos-13
steps:
# Uncomment to manually select Xcode version if needed
#- name: Select Xcode version
# run: "sudo xcode-select --switch /Applications/Xcode_14.1.app/Contents/Developer"
- name: Select Xcode version
run: "sudo xcode-select --switch /Applications/Xcode_15.0.1.app/Contents/Developer"

# Checks-out the repo
- name: Checkout Repo
Expand All @@ -24,13 +26,17 @@ jobs:
- name: Patch Match Tables
run: find /usr/local/lib/ruby/gems -name table_printer.rb | xargs sed -i "" "/puts(Terminal::Table.new(params))/d"

# Install project dependencies
- name: Install Project Dependencies
run: bundle install

# Sync the GitHub runner clock with the Windows time server (workaround as suggested in https://github.com/actions/runner/issues/2996)
- name: Sync clock
run: sudo sntp -sS time.windows.com

# Create or update certificates for app
- name: Create Certificates
run: fastlane certs
run: bundle exec fastlane certs
env:
TEAMID: ${{ secrets.TEAMID }}
GH_PAT: ${{ secrets.GH_PAT }}
Expand Down
Loading

0 comments on commit 7d6614c

Please sign in to comment.