community
community copied to clipboard
Upgraded UI, Options, etc.
Added 3 hour graph option. Ability to use any Nightscout server URL. Cleaned up UI
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅
I have read the CLA Document and I hereby sign the CLA
It's not clear what failed the Build and Test check. I'm happy to make updates as needed but need some help figuring out what the issue is.
did you run make lint
while in the community folder? That command basically does formatting stuff.
This app will need access to a valid Nightscout instance. (Nightscout is a service that, among other things, compiles, stores, and reports on blood sugar data). I can provide a valid URL if one is needed. I also have a blind spot when it comes to setting up the config schema so that the options display correctly when the app is served from the Tidbyt server. Help here is welcome and appreciated.
@jer-tav tagging you here so you're aware of this PR
I can’t speak to the whole user base but not all users are on heruko. Many are on DIY instances. Lots are at t1pal.com
I’d argue that you couldn’t point this to any json feed because you’d need fields named svg and date.
There are some gaps in this code though that I think still need to be address and that I’m working on locally, including what to do if there are duplicate entries (like if both loop and Dexcom are feeding Nightscout with entries) and what to do when there are no readings or gaps in readings. I’m still working this out but I’m close.
On Thu, Aug 4, 2022 at 1:02 PM Mark Spicer @.***> wrote:
@.**** requested changes on this pull request.
Hey there! Thanks so much for the changes to this app. The only blockers here is changing the schema field to mean something else and allowing the user to enter an arbitrary URL - which are part of the same change. Is there a large user base of nightscout that is not running on Heroku?
In apps/nightscout/nightscout.star https://github.com/tidbyt/community/pull/536#discussion_r938150659:
@@ -161,8 +383,8 @@ def get_schema():
), schema.Text( id = "nightscout_id",
name = "Nightscout ID",
desc = "Your Nightscout ID (i.e. XXX in https://XXX.herokuapp.com/api/v1/entries.json)",
name = "Nightscout URL",
This field really can't change. It would break anyones installation who has this app currently installed on their Tidbyt.
In apps/nightscout/nightscout.star https://github.com/tidbyt/community/pull/536#discussion_r938155813:
@@ -205,7 +433,11 @@ def get_nightscout_data(nightscout_id):
# If it's not in the cache, construct it from a response. print("Miss - calling Nightscout API")
- nightscout_url = "https://" + nightscout_id + ".herokuapp.com/api/v1/entries.json"
#nightscout_url = "https://" + nightscout_id + "/api/v1/entries.json?count="+str(GRAPH_WIDTH)
nightscout_url = "https://" + nightscout_id + "/api/v1/entries/sgv.json?find[date][$gte]=" + str((OLDEST_READING_TARGET.unix) * 1000) + "&count=" + str(GRAPH_WIDTH)
nightscout_id really can't be a full URL. It would mean someone could use this app to make HTTP requests to any web service on the internet, regardless of whether it's running Nightscout or not 🙀. We had a pretty long conversation internally the first time around with being able to make an HTTP request to any herokuapp and felt the app was important enough to take on the risk. Any reason the current implementation doesn't work?
— Reply to this email directly, view it on GitHub https://github.com/tidbyt/community/pull/536#pullrequestreview-1062452321, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYE3ZK5GXN5HEPZLN6SLQNTVXQHTFANCNFSM5353CZAA . You are receiving this because you authored the thread.Message ID: @.***>
-- — Paul
I've tried pushing some commits but seem to have failed some checks. Also, I need help updating the schema (settings) and wonder if someone would be able to help me make that right.
The build test is failing because it does not like the icon inputNumeric, you typed it in wrong but it looks like that is not a free icon from fontAwesome, you'll have to choose an icon that is free. That should fix the build-test check.
Would you mind taking a stab at the whole settings section. It’s a total blind spot for me as I have no way to visualize it and no experience with what it’s supposed to look like.
On Wed, Aug 17, 2022 at 8:41 AM rs7q5 @.***> wrote:
The build test is failing because it does not like the icon inputNumeric, you typed it in wrong but it looks like that is not a free icon from fontAwesome, you'll have to choose an icon that is free. That should fix the build-test check.
— Reply to this email directly, view it on GitHub https://github.com/tidbyt/community/pull/536#issuecomment-1218103893, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYE3ZK5E76KFP5KM7GXPUELVZT2YJANCNFSM5353CZAA . You are receiving this because you authored the thread.Message ID: @.***>
-- — Paul
What do you mean? You should be able to test it using pixlet serve
. but based on the details of the build-and-test check if you changed the icon to something like "gear" it should pass the checks I think. You can choose pretty much any free icon there.
Like I am not sure what you want me to test that you couldn't using pixlet serve
edit: wording for clarity
What I mean is that pixlet render and pixlet serve don’t call the schema method so there’s no mechanism for seeing how the confit fields actually render or if the field types are correct, etc. And since I’ve never built an app before, it’s not clear to me what’s right and what’s wrong. I can easily change the icon to “gear” as you suggest but that doesn’t help me understand what that section of code is even doing.
On Wed, Aug 17, 2022 at 10:48 AM rs7q5 @.***> wrote:
What do you mean? You should be able to test it using pixlet serve. but based on the details of the build-and-test check if you changed the icon to something like "gear" it should pass the checks I think. You can choose pretty much any free icon there.
Like I am not sure what you want me to test.
— Reply to this email directly, view it on GitHub https://github.com/tidbyt/community/pull/536#issuecomment-1218264987, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYE3ZK7B2ORVBUHLICGMEL3VZUJVBANCNFSM5353CZAA . You are receiving this because you authored the thread.Message ID: @.***>
-- — Paul
I pushed a commit to clean up that settings schema section. I am only guessing at all that since there's no way to render and interact with the settings in a local pixlet serve setup... so if someone wants to look that over and reassure me that it looks good, it would be appreciated.
pixlet serve allows you to interact with some settings in a local host web browser to play with your settings. I think location may be the only one you can't check with it, I can't remember. The issue with your build-and-test is because of that icon thing (I found it by clicking details next to the failed test and it shows a log of what tests it ran, usually just search for Fail or something to find what it is mad about).
Are you just having issues itself with pixlet serve? That could be a separate issue from the script itself.
pixlet serve allows you to interact with some settings in a local host web browser to play with your settings. I think location may be the only one you can't check with it, I can't remember. The issue with your build-and-test is because of that icon thing (I found it by clicking details next to the failed test and it shows a log of what tests it ran, usually just search for Fail or something to find what it is mad about).
Are you just having issues itself with pixlet serve? That could be a separate issue from the script itself.
Really, I'm just new to this. I expect pixlet is running fine but I don't know what I'm doing :) I'll look into it.
pixlet serve may fail because of the icon too btw, so you still need to change that. no big deal, we were all new at one point.
@betterengineering - Any thoughts on my responses above?
We're automatically closing this issue because it hasn't had any activity in 30 days. If that seems like a mistake, please feel free to re-open. Thanks!