From 08c45b2c0f2a228a713fb677daa1a24adfef0dcc Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Tue, 26 Sep 2023 16:21:47 +0200 Subject: [PATCH] :plugins:sensitivity cleanup --- .../kotlin/app/aaps/activities/MyPreferenceFragment.kt | 8 ++++---- app/src/main/kotlin/app/aaps/di/PluginsListModule.kt | 6 +++--- plugins/sensitivity/build.gradle | 3 ++- .../plugins}/sensitivity/AbstractSensitivityPlugin.kt | 2 +- .../aaps/plugins}/sensitivity/SensitivityAAPSPlugin.kt | 6 +++--- .../aaps/plugins}/sensitivity/SensitivityOref1Plugin.kt | 6 +++--- .../sensitivity/SensitivityWeightedAveragePlugin.kt | 6 +++--- .../sensitivity/extensions/ProfileSwitchExtensions.kt | 2 +- .../sensitivity/extensions/TherapyEventExtensions.kt | 2 +- .../plugins}/sensitivity/AbstractSensitivityPluginTest.kt | 2 +- 10 files changed, 22 insertions(+), 21 deletions(-) rename plugins/sensitivity/src/main/{java/info/nightscout => kotlin/app/aaps/plugins}/sensitivity/AbstractSensitivityPlugin.kt (98%) rename plugins/sensitivity/src/main/{java/info/nightscout => kotlin/app/aaps/plugins}/sensitivity/SensitivityAAPSPlugin.kt (98%) rename plugins/sensitivity/src/main/{java/info/nightscout => kotlin/app/aaps/plugins}/sensitivity/SensitivityOref1Plugin.kt (98%) rename plugins/sensitivity/src/main/{java/info/nightscout => kotlin/app/aaps/plugins}/sensitivity/SensitivityWeightedAveragePlugin.kt (98%) rename plugins/sensitivity/src/main/{java/info/nightscout => kotlin/app/aaps/plugins}/sensitivity/extensions/ProfileSwitchExtensions.kt (91%) rename plugins/sensitivity/src/main/{java/info/nightscout => kotlin/app/aaps/plugins}/sensitivity/extensions/TherapyEventExtensions.kt (87%) rename plugins/sensitivity/src/test/{java/info/nightscout => kotlin/app/aaps/plugins}/sensitivity/AbstractSensitivityPluginTest.kt (98%) diff --git a/app/src/main/kotlin/app/aaps/activities/MyPreferenceFragment.kt b/app/src/main/kotlin/app/aaps/activities/MyPreferenceFragment.kt index d3f951a28d..f9d602f986 100644 --- a/app/src/main/kotlin/app/aaps/activities/MyPreferenceFragment.kt +++ b/app/src/main/kotlin/app/aaps/activities/MyPreferenceFragment.kt @@ -43,6 +43,9 @@ import app.aaps.plugins.constraints.safety.SafetyPlugin import app.aaps.plugins.insulin.InsulinOrefFreePeakPlugin import app.aaps.plugins.main.general.smsCommunicator.SmsCommunicatorPlugin import app.aaps.plugins.main.general.wear.WearPlugin +import app.aaps.plugins.sensitivity.SensitivityAAPSPlugin +import app.aaps.plugins.sensitivity.SensitivityOref1Plugin +import app.aaps.plugins.sensitivity.SensitivityWeightedAveragePlugin import dagger.android.support.AndroidSupportInjection import info.nightscout.androidaps.R import info.nightscout.androidaps.danaRKorean.DanaRKoreanPlugin @@ -61,9 +64,6 @@ import info.nightscout.pump.combov2.ComboV2Plugin import info.nightscout.pump.diaconn.DiaconnG8Plugin import info.nightscout.pump.medtrum.MedtrumPlugin import info.nightscout.pump.virtual.VirtualPumpPlugin -import info.nightscout.sensitivity.SensitivityAAPSPlugin -import info.nightscout.sensitivity.SensitivityOref1Plugin -import info.nightscout.sensitivity.SensitivityWeightedAveragePlugin import info.nightscout.source.AidexPlugin import info.nightscout.source.DexcomPlugin import info.nightscout.source.EversensePlugin @@ -475,7 +475,7 @@ class MyPreferenceFragment : PreferenceFragmentCompat(), OnSharedPreferenceChang true } // NSClient copy settings - rh.gs(app.aaps.plugins.main.R.string.key_statuslights_copy_ns) -> { + rh.gs(app.aaps.plugins.main.R.string.key_statuslights_copy_ns) -> { nsSettingStatus.copyStatusLightsNsSettings(context) true } diff --git a/app/src/main/kotlin/app/aaps/di/PluginsListModule.kt b/app/src/main/kotlin/app/aaps/di/PluginsListModule.kt index 00d2180f77..1b12a56e97 100644 --- a/app/src/main/kotlin/app/aaps/di/PluginsListModule.kt +++ b/app/src/main/kotlin/app/aaps/di/PluginsListModule.kt @@ -29,6 +29,9 @@ import app.aaps.plugins.main.general.smsCommunicator.SmsCommunicatorPlugin import app.aaps.plugins.main.general.themes.ThemeSwitcherPlugin import app.aaps.plugins.main.general.wear.WearPlugin import app.aaps.plugins.main.profile.ProfilePlugin +import app.aaps.plugins.sensitivity.SensitivityAAPSPlugin +import app.aaps.plugins.sensitivity.SensitivityOref1Plugin +import app.aaps.plugins.sensitivity.SensitivityWeightedAveragePlugin import dagger.Binds import dagger.Module import dagger.multibindings.IntKey @@ -52,9 +55,6 @@ import info.nightscout.pump.combov2.ComboV2Plugin import info.nightscout.pump.diaconn.DiaconnG8Plugin import info.nightscout.pump.medtrum.MedtrumPlugin import info.nightscout.pump.virtual.VirtualPumpPlugin -import info.nightscout.sensitivity.SensitivityAAPSPlugin -import info.nightscout.sensitivity.SensitivityOref1Plugin -import info.nightscout.sensitivity.SensitivityWeightedAveragePlugin import info.nightscout.smoothing.AvgSmoothingPlugin import info.nightscout.smoothing.ExponentialSmoothingPlugin import info.nightscout.smoothing.NoSmoothingPlugin diff --git a/plugins/sensitivity/build.gradle b/plugins/sensitivity/build.gradle index 143418c947..d33ef78ef0 100644 --- a/plugins/sensitivity/build.gradle +++ b/plugins/sensitivity/build.gradle @@ -10,8 +10,9 @@ apply from: "${project.rootDir}/core/main/android_module_dependencies.gradle" apply from: "${project.rootDir}/core/main/allopen_dependencies.gradle" apply from: "${project.rootDir}/core/main/test_dependencies.gradle" apply from: "${project.rootDir}/core/main/jacoco_global.gradle" + android { - namespace 'info.nightscout.sensitivity' + namespace 'app.aaps.plugins.sensitivity' } diff --git a/plugins/sensitivity/src/main/java/info/nightscout/sensitivity/AbstractSensitivityPlugin.kt b/plugins/sensitivity/src/main/kotlin/app/aaps/plugins/sensitivity/AbstractSensitivityPlugin.kt similarity index 98% rename from plugins/sensitivity/src/main/java/info/nightscout/sensitivity/AbstractSensitivityPlugin.kt rename to plugins/sensitivity/src/main/kotlin/app/aaps/plugins/sensitivity/AbstractSensitivityPlugin.kt index ab191d1cac..6afb9962d4 100644 --- a/plugins/sensitivity/src/main/java/info/nightscout/sensitivity/AbstractSensitivityPlugin.kt +++ b/plugins/sensitivity/src/main/kotlin/app/aaps/plugins/sensitivity/AbstractSensitivityPlugin.kt @@ -1,4 +1,4 @@ -package info.nightscout.sensitivity +package app.aaps.plugins.sensitivity import app.aaps.core.interfaces.aps.AutosensDataStore import app.aaps.core.interfaces.aps.AutosensResult diff --git a/plugins/sensitivity/src/main/java/info/nightscout/sensitivity/SensitivityAAPSPlugin.kt b/plugins/sensitivity/src/main/kotlin/app/aaps/plugins/sensitivity/SensitivityAAPSPlugin.kt similarity index 98% rename from plugins/sensitivity/src/main/java/info/nightscout/sensitivity/SensitivityAAPSPlugin.kt rename to plugins/sensitivity/src/main/kotlin/app/aaps/plugins/sensitivity/SensitivityAAPSPlugin.kt index 0dff696855..c7d5da2692 100644 --- a/plugins/sensitivity/src/main/java/info/nightscout/sensitivity/SensitivityAAPSPlugin.kt +++ b/plugins/sensitivity/src/main/kotlin/app/aaps/plugins/sensitivity/SensitivityAAPSPlugin.kt @@ -1,4 +1,4 @@ -package info.nightscout.sensitivity +package app.aaps.plugins.sensitivity import app.aaps.annotations.OpenForTesting import app.aaps.core.interfaces.aps.AutosensDataStore @@ -16,10 +16,10 @@ import app.aaps.core.interfaces.utils.DateUtil import app.aaps.core.utils.MidnightUtils import app.aaps.core.utils.Percentile import app.aaps.database.entities.TherapyEvent +import app.aaps.plugins.sensitivity.extensions.isPSEvent5minBack +import app.aaps.plugins.sensitivity.extensions.isTherapyEventEvent5minBack import dagger.android.HasAndroidInjector import info.nightscout.database.impl.AppRepository -import info.nightscout.sensitivity.extensions.isPSEvent5minBack -import info.nightscout.sensitivity.extensions.isTherapyEventEvent5minBack import org.json.JSONException import org.json.JSONObject import java.util.Arrays diff --git a/plugins/sensitivity/src/main/java/info/nightscout/sensitivity/SensitivityOref1Plugin.kt b/plugins/sensitivity/src/main/kotlin/app/aaps/plugins/sensitivity/SensitivityOref1Plugin.kt similarity index 98% rename from plugins/sensitivity/src/main/java/info/nightscout/sensitivity/SensitivityOref1Plugin.kt rename to plugins/sensitivity/src/main/kotlin/app/aaps/plugins/sensitivity/SensitivityOref1Plugin.kt index 640bc4976e..7b4887808d 100644 --- a/plugins/sensitivity/src/main/java/info/nightscout/sensitivity/SensitivityOref1Plugin.kt +++ b/plugins/sensitivity/src/main/kotlin/app/aaps/plugins/sensitivity/SensitivityOref1Plugin.kt @@ -1,4 +1,4 @@ -package info.nightscout.sensitivity +package app.aaps.plugins.sensitivity import app.aaps.annotations.OpenForTesting import app.aaps.core.interfaces.aps.AutosensDataStore @@ -19,10 +19,10 @@ import app.aaps.core.interfaces.utils.DateUtil import app.aaps.core.utils.MidnightUtils import app.aaps.core.utils.Percentile import app.aaps.database.entities.TherapyEvent +import app.aaps.plugins.sensitivity.extensions.isPSEvent5minBack +import app.aaps.plugins.sensitivity.extensions.isTherapyEventEvent5minBack import dagger.android.HasAndroidInjector import info.nightscout.database.impl.AppRepository -import info.nightscout.sensitivity.extensions.isPSEvent5minBack -import info.nightscout.sensitivity.extensions.isTherapyEventEvent5minBack import org.json.JSONException import org.json.JSONObject import java.util.Arrays diff --git a/plugins/sensitivity/src/main/java/info/nightscout/sensitivity/SensitivityWeightedAveragePlugin.kt b/plugins/sensitivity/src/main/kotlin/app/aaps/plugins/sensitivity/SensitivityWeightedAveragePlugin.kt similarity index 98% rename from plugins/sensitivity/src/main/java/info/nightscout/sensitivity/SensitivityWeightedAveragePlugin.kt rename to plugins/sensitivity/src/main/kotlin/app/aaps/plugins/sensitivity/SensitivityWeightedAveragePlugin.kt index 3f303056f6..c048c1c2fa 100644 --- a/plugins/sensitivity/src/main/java/info/nightscout/sensitivity/SensitivityWeightedAveragePlugin.kt +++ b/plugins/sensitivity/src/main/kotlin/app/aaps/plugins/sensitivity/SensitivityWeightedAveragePlugin.kt @@ -1,4 +1,4 @@ -package info.nightscout.sensitivity +package app.aaps.plugins.sensitivity import androidx.collection.LongSparseArray import app.aaps.annotations.OpenForTesting @@ -16,10 +16,10 @@ import app.aaps.core.interfaces.sharedPreferences.SP import app.aaps.core.interfaces.utils.DateUtil import app.aaps.core.utils.MidnightUtils import app.aaps.database.entities.TherapyEvent +import app.aaps.plugins.sensitivity.extensions.isPSEvent5minBack +import app.aaps.plugins.sensitivity.extensions.isTherapyEventEvent5minBack import dagger.android.HasAndroidInjector import info.nightscout.database.impl.AppRepository -import info.nightscout.sensitivity.extensions.isPSEvent5minBack -import info.nightscout.sensitivity.extensions.isTherapyEventEvent5minBack import org.json.JSONException import org.json.JSONObject import javax.inject.Inject diff --git a/plugins/sensitivity/src/main/java/info/nightscout/sensitivity/extensions/ProfileSwitchExtensions.kt b/plugins/sensitivity/src/main/kotlin/app/aaps/plugins/sensitivity/extensions/ProfileSwitchExtensions.kt similarity index 91% rename from plugins/sensitivity/src/main/java/info/nightscout/sensitivity/extensions/ProfileSwitchExtensions.kt rename to plugins/sensitivity/src/main/kotlin/app/aaps/plugins/sensitivity/extensions/ProfileSwitchExtensions.kt index dddbf7b901..62acb233cc 100644 --- a/plugins/sensitivity/src/main/java/info/nightscout/sensitivity/extensions/ProfileSwitchExtensions.kt +++ b/plugins/sensitivity/src/main/kotlin/app/aaps/plugins/sensitivity/extensions/ProfileSwitchExtensions.kt @@ -1,4 +1,4 @@ -package info.nightscout.sensitivity.extensions +package app.aaps.plugins.sensitivity.extensions import app.aaps.core.interfaces.utils.T import app.aaps.database.entities.ProfileSwitch diff --git a/plugins/sensitivity/src/main/java/info/nightscout/sensitivity/extensions/TherapyEventExtensions.kt b/plugins/sensitivity/src/main/kotlin/app/aaps/plugins/sensitivity/extensions/TherapyEventExtensions.kt similarity index 87% rename from plugins/sensitivity/src/main/java/info/nightscout/sensitivity/extensions/TherapyEventExtensions.kt rename to plugins/sensitivity/src/main/kotlin/app/aaps/plugins/sensitivity/extensions/TherapyEventExtensions.kt index dc2af0a6b4..33aebee2fc 100644 --- a/plugins/sensitivity/src/main/java/info/nightscout/sensitivity/extensions/TherapyEventExtensions.kt +++ b/plugins/sensitivity/src/main/kotlin/app/aaps/plugins/sensitivity/extensions/TherapyEventExtensions.kt @@ -1,4 +1,4 @@ -package info.nightscout.sensitivity.extensions +package app.aaps.plugins.sensitivity.extensions import app.aaps.core.interfaces.utils.T import app.aaps.database.entities.TherapyEvent diff --git a/plugins/sensitivity/src/test/java/info/nightscout/sensitivity/AbstractSensitivityPluginTest.kt b/plugins/sensitivity/src/test/kotlin/app/aaps/plugins/sensitivity/AbstractSensitivityPluginTest.kt similarity index 98% rename from plugins/sensitivity/src/test/java/info/nightscout/sensitivity/AbstractSensitivityPluginTest.kt rename to plugins/sensitivity/src/test/kotlin/app/aaps/plugins/sensitivity/AbstractSensitivityPluginTest.kt index 9ed5f2e319..f514a3751f 100644 --- a/plugins/sensitivity/src/test/java/info/nightscout/sensitivity/AbstractSensitivityPluginTest.kt +++ b/plugins/sensitivity/src/test/kotlin/app/aaps/plugins/sensitivity/AbstractSensitivityPluginTest.kt @@ -1,4 +1,4 @@ -package info.nightscout.sensitivity +package app.aaps.plugins.sensitivity import app.aaps.core.interfaces.aps.AutosensDataStore import app.aaps.core.interfaces.aps.AutosensResult