Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Override refactoring and additional functionnalities #178

Closed

Conversation

avouspierre
Copy link
Contributor

The PR includes a large refactoring of the swift part of override/profile functions :

  • Override is stored in override core data, including history
  • Override preset is stored in overridepreset core data
  • Add the display of the override in main graph
  • add the upload of override as a exercice in Nightscout - Fix [feature request] Display profiles/overrides in Nightscout  #145
  • improve the management of indefinate override / stop of indefinate override
  • modify the code to respect the Ivan’s patterns of the app :
  • Use of swiftInject (dependency injection) with the use of protocol class in the code
  • Use of MVP principes, in particular not use of direct coredata in view class
  • Use of a proxy model class between coredata and the app to manage changes of core data
  • Use of the pattern of observe to refresh data/view/uploads
  • add a core data unit tests allowing to add tests for coredata with a in-memory datastore for tests.
  • test for overrideStorage available

This PR do NOT change the logic with oref and the interface of override informations in oref. This PR do NOT require a update of trio-oref code.

TODO : Changes the shortcuts after merging with PR #144 and add watch for overrides.

override display override in NS
Simulator Screenshot - iPhone 15 - 2024-05-07 at 21 43 34 CleanShot 2024-05-07 at 21 44 16

The PR includes a large refactoring of the swift part of override/profile functions :
- Override is stored in override core data, including history
- Override preset is stored in overridepreset core data
- Add the display of the override in main graph
- add the upload of override as a exercice in Nightscout - Fix nightscout#145
- improve the management of indefinate override / stop of indefinate override
- modify the code to respect the Ivan’s patterns of the app :
     - Use of swiftInject (dependency injection) with the use of protocol class in the code
     - Use of MVP principes, in particular not use of direct coredata in view class
     - Use of a proxy model class between coredata and the app to manage changes of core data
     - Use of the pattern of observe to refresh data/view/uploads

- add a core data unit tests allowing to add tests for coredata with a in-memory datastore for tests.
- test for overrideStorage available

This PR do NOT change the logic with oref and the interface of override informations in oref. This PR do NOT require a update of trio-oref code.

TODO : Changes the shortcuts after merging with PR nightscout#144  and add watch for overrides.
The PR includes a large refactoring of the swift part of override/profile functions :
- Override is stored in override core data, including history
- Override preset is stored in overridepreset core data
- Add the display of the override in main graph
- add the upload of override as a exercice in Nightscout - Fix nightscout#145
- improve the management of indefinate override / stop of indefinate override
- modify the code to respect the Ivan’s patterns of the app :
     - Use of swiftInject (dependency injection) with the use of protocol class in the code
     - Use of MVP principes, in particular not use of direct coredata in view class
     - Use of a proxy model class between coredata and the app to manage changes of core data
     - Use of the pattern of observe to refresh data/view/uploads

- add a core data unit tests allowing to add tests for coredata with a in-memory datastore for tests.
- test for overrideStorage available

This PR do NOT change the logic with oref and the interface of override informations in oref. This PR do NOT require a update of trio-oref code.

TODO : Changes the shortcuts after merging with PR nightscout#144  and add watch for overrides.
The PR includes a large refactoring of the swift part of override/profile functions :
- Override is stored in override core data, including history
- Override preset is stored in overridepreset core data
- Add the display of the override in main graph
- add the upload of override as a exercice in Nightscout - Fix nightscout#145
- improve the management of indefinate override / stop of indefinate override
- modify the code to respect the Ivan’s patterns of the app :
     - Use of swiftInject (dependency injection) with the use of protocol class in the code
     - Use of MVP principes, in particular not use of direct coredata in view class
     - Use of a proxy model class between coredata and the app to manage changes of core data
     - Use of the pattern of observe to refresh data/view/uploads

- add a core data unit tests allowing to add tests for coredata with a in-memory datastore for tests.
- test for overrideStorage available

This PR do NOT change the logic with oref and the interface of override informations in oref. This PR do NOT require a update of trio-oref code.

TODO : Changes the shortcuts after merging with PR nightscout#144  and add watch for overrides.
fix when preset has no id
@bjornoleh bjornoleh linked an issue May 14, 2024 that may be closed by this pull request
Copy link

sonarcloud bot commented May 16, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
3 Security Hotspots
7.3% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

@avouspierre
Copy link
Contributor Author

replaced by #219

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant