| [19:00:08] | * jonasbits has joined #farmos |
| [22:54:17] | * farmBOT has joined #farmos |
| [05:11:27] | * RogerioMbuli[m] has joined #farmos |
| [05:11:28] | <RogerioMbuli[m]> | curl: (35) schannel: next InitializeSecurityContext failed: Unknown error (0x80092012) - The revocation function was unable to check revocation for the certificate. |
| [05:37:47] | * jonasbits_ has joined #farmos |
| [05:41:02] | * jonasbits has quit (*.net *.split) |
| [05:41:03] | * cosine has quit (*.net *.split) |
| [05:46:12] | * cosine has joined #farmos |
| [08:01:13] | <ludwa6[m]> | g'day, Sports Fans: exciting developments afoot on the API front-end front: https://www.youtube.com/watch?v=87jqCTMwsXk |
| [08:06:36] | <ludwa6[m]> | JupyterLite and farmOS : looks like a powerful combo to me! Would it be possible, mstenta , to configure my v2.x Farmier instance to allow API calls from JupyterLite running on my desktop? |
| [09:04:18] | <mstenta[m]> | ludwa6: i know! isn't that coool?? @donblair blew my mind yet again |
| [09:07:05] | <mstenta[m]> | i am taking care of a sick kiddo today - might not have a chance to play with it more... i was hoping to show it on today's dev call! but not sure i'll be there |
| [09:07:42] | <ludwa6[m]> | mstenta[m]: like always! can't wait to try this proof-of-concept on mine |
| [09:08:19] | <mstenta[m]> | re: your instance... i only need to "bless" the CORS config on your instance if you are connecting to it through a browser... you said you're running JupyterLite on your desktop? do you mean you are running a downloaded copy in your browser? i'm not sure that it's possible to configure CORS for that to work because it's not a public domain you're running on |
| [09:08:34] | <mstenta[m]> | Don's example was running on his GitHub Pages URL |
| [09:08:40] | <ludwa6[m]> | mstenta[m]: ooh, good luck w/ thaet. |
| [09:09:23] | <mstenta[m]> | (she's sleeping currently - wish i could too... been up with her since 2:30 am) :-( |
| [09:09:47] | <ludwa6[m]> | to your Q: i've got the full Jupyter Notebooks / Jupyter Labs stack on my machine... But i want this in cloud, for my farmer to access from anywhere. |
| [09:10:11] | <mstenta[m]> | oh ok - so i don't think i need to do anything on your 2.x instance for Jupyter to work |
| [09:10:18] | <mstenta[m]> | only JupyterLite |
| [09:10:18] | <ludwa6[m]> | Could be on github, that would be fine. |
| [09:10:18] | <mstenta[m]> | (when in a browser) |
| [09:10:43] | <mstenta[m]> | (but i'm not super familiar with Jupyter, so maybe i'm wrong... or maybe there are other considerations there) |
| [09:10:54] | <mstenta[m]> | worth a try as-is perhaps |
| [09:11:44] | <mstenta[m]> | you can just use Don's instance - did he share it with you? |
| [09:11:45] | <mstenta[m]> | to play around with in the meantime |
| [09:11:58] | <ludwa6[m]> | mstenta[m]: OK no worries, MS: will be chatting w/ Don about this later today i guess... And also paul121 , as it happens, about my data migration |
| [09:12:50] | <ludwa6[m]> | mstenta[m]: I have his JupyterLite instance loaded in my browser; will ask if he can give me a test account on his farmOS instance. |
| [09:13:11] | <mstenta[m]> | oh i can add his domain to your 2.x instance! |
| [09:13:16] | <mstenta[m]> | then it will work |
| [09:13:27] | <mstenta[m]> | doing that now... |
| [09:13:36] | <ludwa6[m]> | ah: nice! |
| [09:14:21] | <mstenta[m]> | yesterday i was hacking around trying to wrap jupyterlite in a module - so you could just do [myfarmOSurl]/jupyterlite :-D |
| [09:14:38] | <mstenta[m]> | still some kinks to iron out... but that would allow it to work without requiring cross-domain config |
| [09:15:03] | <mstenta[m]> | (and could enable some really neat ideas!!) |
| [09:15:32] | <mstenta[m]> | if this could be an alternative to building CSV importers in Drupal.... wow! |
| [09:15:46] | <mstenta[m]> | although it is still kind of "advanced" to use... so we'll have to see what shakes out |
| [09:16:04] | <ludwa6[m]> | mstenta[m]: that would be coool |
| [09:16:16] | <mstenta[m]> | (imagine people being able to share/import CSV importer scripts for specific use-cases!!) |
| [09:16:33] | <ludwa6[m]> | mstenta[m]: yes! let's make this work. |
| [09:16:50] | <mstenta[m]> | i was hoping to comment on the CSV importer forum topic with some of these ideas but life has redirected me - if you or Paul or Don want to please do! |
| [09:17:20] | <mstenta[m]> | i'm sure Farmer Ed and Pat would be interested too - another nice alternative to compliment node-red perhaps |
| [09:18:11] | <mstenta[m]> | ok i think your 2.x instance is all set... should be able to connect now |
| [09:18:11] | <ludwa6[m]> | mstenta[m]: count on it! |
| [09:22:49] | <ludwa6[m]> | mstenta[m]: so: i just need to change URL and cred codes in the 1st code block to my own, for this to work? and if so: are the credentials kept secure? |
| [09:23:38] | <mstenta[m]> | yes and yes - they are stored in your browser's local "indexed db database" - never sent anywhere else |
| [09:23:50] | <mstenta[m]> | (if someone stole your computer they would be able to see them, however) |
| [09:50:19] | <ludwa6[m]> | <mstenta[m]> "yes and yes - they are stored in..." <- hm: tried, but it threw an error on running that first block. can share if you care to see |
| [09:51:53] | <mstenta[m]> | please do |
| [09:52:08] | <mstenta[m]> | (make sure it doesn't include your pw) |
| [09:54:06] | <ludwa6[m]> | the traceback does not, it seems. What, do i just copy/ paste here in Eleements? |
| [09:54:44] | <mstenta[m]> | sure, unless it's ginormous |
| [09:55:01] | <ludwa6[m]> | ---------------------------------------------------------------------------... (full message at https://libera.ems.host/_matrix/media/r0/download/libera.chat/673d89e40e...) |
| [09:55:42] | <mstenta[m]> | ok well i don't think it's a cross-domain issue - must be something else - probably need Don's help to debug |
| [09:56:21] | <ludwa6[m]> | mstenta[m]: ok, will pass it on to him. |
| [10:14:32] | <symbioquine[m]> | <mstenta[m]> "re: your instance... i only need..." <- I think it should work even with non-public/fake domains as long as the browser trusts them. e.g. you could add a domain to your router's static DNS entries or computer's hosts file and generate a self-signed certificate for it. Then as long as your browser finds that domain (disable DNS over HTTPS) and trusts it (add the certificate to your system/browser trust store) the CORS stuff |
| [10:14:32] | <symbioquine[m]> | should work. |
| [10:16:20] | <mstenta[m]> | makes sense! i was wondering if ludwa6 had downloaded the jupyterlite files and just opened index.html in the browser... in which case there wouldn't be any domain at all (right?) - not serving through apache / `localhost` |
| [10:16:26] | <mstenta[m]> | in that case i'm not sure if/how it would work |
| [10:20:05] | <ludwa6[m]> | mstenta[m]: A: i just loaded up the farmos.ipynb file at https://edgecollective.io/jupyterlite/lab/index.html , changed the URL and id/pwd codes to my own in that 1st code block and ran it. failed as per above traceback |
| [10:20:19] | <ludwa6[m]> | of course i have no idea how this can possibly work... Was just following the directions given |
| [10:21:43] | <mstenta[m]> | yup yup! symbioquine was commenting on the cors stuff... not your error |
| [10:26:13] | <symbioquine[m]> | <mstenta[m]> "makes sense! i was wondering..." <- Oh, yeah. Agreed that it does need to be served over https by something. Forgot that bit. |
| [10:26:47] | <mstenta[m]> | ah and yea i forgot https is required too! |
| [10:27:33] | <mstenta[m]> | > yesterday i was hacking around trying to wrap jupyterlite in a module - so you could just do [myfarmOSurl]/jupyterlite :-D |
| [10:27:33] | <mstenta[m]> | symbioquine fyi this is what i was working on when i asked you about SPAs :-) |
| [10:27:52] | <symbioquine[m]> | Cool! |
| [10:27:52] | <mstenta[m]> | it is not as easy as i was hoping |
| [10:28:41] | <symbioquine[m]> | I'm not familiar with jupyterlite, but I'm guessing it's one of those Math/Sci notebook engines like Sage or Mathematica? |
| [10:28:45] | <mstenta[m]> | yea check out the vid above if you have a chance! |
| [10:28:54] | <mstenta[m]> | > g'day, Sports Fans: exciting developments afoot on the API front-end front: https://www.youtube.com/watch?v=87jqCTMwsXk |
| [10:32:53] | <symbioquine[m]> | <mstenta[m]> "it is not as easy as i was..." <- What challenges did you run into? |
| [10:34:19] | <ludwa6[m]> | <symbioquine[m]> "I'm not familiar with jupyterlit..." <- "Project Jupyter's operating philosophy is to support interactive data science and scientific computing across all programming languages via the development of open-source software" sayth wikipedia... And it's really become the way to share DataScience projects, in the interest of Replicable Research. |
| [10:35:44] | <mstenta[m]> | > What challenges did you run into? |
| [10:35:45] | <mstenta[m]> | Mainly just getting all the files to be in a place where JupyterLite can find them, while still keeping them in the Drupal filestructure and using a Drupal route |
| [10:36:07] | <symbioquine[m]> | ah |
| [10:36:25] | <mstenta[m]> | I think I just need to dig into the JupyterLite docs a bit to understand how to configure a non-default setup |
| [10:41:53] | <symbioquine[m]> | Looks like there's a `jupyter-config-data.baseUrl` that maybe needs to be set... |
| [10:42:00] | <mstenta[m]> | ah! |
| [10:42:25] | <symbioquine[m]> | ACTION sent a json code block: https://libera.ems.host/_matrix/media/r0/download/libera.chat/eaa6e63322... |
| [10:42:30] | <symbioquine[m]> | https://jupyterlite.readthedocs.io/en/latest/deploying.html |
| [10:42:40] | <mstenta[m]> | wow thanks symbioquine |
| [10:42:43] | <symbioquine[m]> | Not sure what `appUrl` does either |
| [10:42:49] | <mstenta[m]> | i'll try that out when i have a chance |
| [11:00:32] | <symbioquine[m]> | I think it's working just with the code I shared before; |
| [11:00:34] | <symbioquine[m]> | ACTION uploaded an image: (194KiB) < https://libera.ems.host/_matrix/media/r0/download/matrix.org/sEMvupphyIV... > |
| [11:00:53] | <mstenta[m]> | wow! |
| [11:01:28] | <mstenta[m]> | i have a module started, do you want to add a commit to get the commit credit? :-D |
| [11:01:42] | <symbioquine[m]> | I just replaced the contents of my SPA web artifacts with the contents of the `_output` directory obtained by doing `poetry run jupyter lite init` |
| [11:01:53] | <symbioquine[m]> | mstenta[m]: Sure |
| [11:02:28] | <symbioquine[m]> | I only tested as far as getting the OAuth token, so there could be other stuff broken of course :) |
| [11:02:59] | <mstenta[m]> | https://github.com/mstenta/jupyterlite |
| [11:04:04] | <mstenta[m]> | beyond that, on my local, i basically downloaded the contents of Don's gh-pages branch into a `jupyterlite` subdirectory within that |
| [11:04:18] | <mstenta[m]> | https://github.com/edgecollective/jupyterlite/tree/gh-pages |
| [11:04:19] | <mstenta[m]> | just as a proof of concept |
| [11:04:29] | <mstenta[m]> | still need to figure out a better way to build it |
| [11:04:34] | <mstenta[m]> | and ideally without the demo content |
| [11:04:38] | <symbioquine[m]> | Cool |
| [11:04:48] | <symbioquine[m]> | yeah |
| [11:05:10] | <mstenta[m]> | i'd be fine just committing directly to the repo as a start |
| [11:05:21] | <symbioquine[m]> | Also, I don't think we should even need OAuth at the point it's hosted on the same server. |
| [11:05:46] | <mstenta[m]> | true! |
| [11:06:25] | <mstenta[m]> | the one thing i thought of: it's still possible to go directly to `/sites/all/modules/jupyterlite/jupyterlite` in the browser - which bypasses the access permission |
| [11:06:55] | <mstenta[m]> | so i was thinking we may want to omit the `index.html` and serve it via the route instead |
| [11:06:56] | <symbioquine[m]> | Hmmm |
| [11:07:01] | <symbioquine[m]> | or add .htaccess file |
| [11:07:09] | <mstenta[m]> | oh yea or that |
| [11:07:17] | <mstenta[m]> | by the way, this worked in my controller: |
| [11:07:45] | <mstenta[m]> | ACTION sent a code block: https://libera.ems.host/_matrix/media/r0/download/libera.chat/6e16190390... |
| [11:07:59] | <mstenta[m]> | (+ `use Symfony\Component\HttpFoundation\Response;`) |
| [11:08:26] | <mstenta[m]> | (learned that if you just return a `Response`, it bypasses Drupal's rendering pipeline entirely, so you can take over the whole response) |
| [11:08:41] | <symbioquine[m]> | Interesting |
| [11:09:28] | <mstenta[m]> | but... that created an infinite loop in my browser/docker because JupyterLite kept trying to find files that weren't there :-) |
| [11:09:31] | <mstenta[m]> | so consider that a warning ;-) |
| [11:10:02] | <symbioquine[m]> | Yeah, my inclination would be to go the direction I shared before where the controller is basically doing dumb static hosting. |
| [11:10:10] | <symbioquine[m]> | (maybe with some access control) |
| [11:10:44] | <symbioquine[m]> | That's nice because it should be pretty version (or even application) agnostic with regards to what's being hosted. |
| [11:10:57] | <mstenta[m]> | yea i think you're probably right... because it's more than just a SPA - it wants to load other files and stuff too |
| [11:11:06] | <symbioquine[m]> | Yeah |
| [11:12:46] | <mstenta[m]> | fyi i was thinking we can push this to a new drupal.org project! |
| [11:13:03] | <symbioquine[m]> | makes sense |
| [11:13:04] | <mstenta[m]> | there's an existing one, but it's dead, and for jupyter, not jupyterlite (different enough i think) |
| [11:13:23] | <mstenta[m]> | use Symfony\Component\HttpFoundation\Response; |
| [11:13:35] | <mstenta[m]> | * https://www.drupal.org/project/jupyter |
| [11:21:26] | <symbioquine[m]> | My inclination would be to initially check in the built jupyterlite dist just to get things working/installable as quick as possible |
| [11:21:39] | <symbioquine[m]> | ... but it's 65 MB |
| [11:21:54] | <symbioquine[m]> | What do you think? |
| [11:25:26] | <mstenta[m]> | phew! |
| [11:25:27] | <mstenta[m]> | that's big haha |
| [11:27:37] | <mstenta[m]> | how about we make a new branch (`1.x-dist`) that includes it... but maybe we can find a better way |
| [11:27:46] | <symbioquine[m]> | Sounds good |
| [11:28:09] | <mstenta[m]> | (gave you access to push to the repo fyi) |
| [11:38:16] | <symbioquine[m]> | https://github.com/symbioquine/jupyterlite/tree/1.x-dist |
| [11:38:32] | <symbioquine[m]> | Seems to be installable/working for me |
| [11:39:53] | <mstenta[m]> | amazing! |
| [11:40:50] | * donblair[m] has joined #farmos |
| [11:41:18] | <donblair[m]> | OMG symbioquine amazing work!! |
| [11:42:50] | <symbioquine[m]> | We can do a development/release branch for the build similar to what I demonstrate in https://github.com/symbioquine/farmOS_vue_page_demo |
| [11:43:09] | <mstenta[m]> | awesome! i was thinking about suggesting that too! |
| [11:43:36] | <symbioquine[m]> | https://github.com/symbioquine/farmOS_vue_page_demo/blob/aa96ba6767404eb... |
| [11:52:44] | <paul121[m]> | <mstenta[m]> "(learned that if you just return..." <- ohhh interesting! |
| [11:53:48] | <symbioquine[m]> | e.g. https://github.com/symbioquine/jupyterlite/blob/75ee4bab7d09b688e399a280... |
| [11:55:44] | <paul121[m]> | so that `/jupyterlite` path is kinda acting like a file server? for all the assets it needs? |
| [11:56:20] | <symbioquine[m]> | Yep |
| [11:56:21] | <paul121[m]> | loading more than just the `index.html` I see |
| [11:57:17] | <mstenta[m]> | symbioquine: maybe we could use a similar approach to downloading the jupyterlite library files that we did for `farmOS-map` |
| [11:57:36] | <mstenta[m]> | (hmm although still need to be "built" somewhere) |
| [11:57:58] | <mstenta[m]> | https://github.com/farmOS/farmOS/blob/2.x/composer.libraries.json |
| [12:01:47] | <symbioquine[m]> | Dev call now at https://meet.jit.si/farmos-dev if folks are interested... |
| [12:01:54] | <symbioquine[m]> | * Dev call is on now at |
| [12:02:18] | <mstenta[m]> | i won't make it :-( |
| [12:02:23] | <mstenta[m]> | got a sick kiddo here... |
| [12:02:33] | <symbioquine[m]> | Bummer |
| [12:02:38] | <symbioquine[m]> | Hope they feel better soon! |
| [12:03:45] | <mstenta[m]> | haven't slept - manically doing little drupal/farmOS things in between pukes 😅😂😭 |
| [12:03:51] | <donblair[m]> | Sorry to hear that Mike! And would love to make call too -- but gonna be driving my mom to a doctor's appt ... |
| [12:03:56] | <mstenta[m]> | excited to see this stuff moving!!! |
| [12:03:56] | <donblair[m]> | mstenta[m]: Oh goodness |
| [12:04:14] | <mstenta[m]> | sorry tmi |
| [12:08:56] | <donblair[m]> | Sorry again, Mike! |
| [12:08:56] | <donblair[m]> | (And paul121 -- amazing work, too!!) |
| [12:09:21] | <donblair[m]> | Y'all move so fast doing awesome things it's inspiring |
| [12:09:53] | <mstenta[m]> | we're just packaging up what YOU did donblair !! 🙌 |
| [12:10:20] | <mstenta[m]> | super exciting! |
| [12:10:31] | <donblair[m]> | 'just packaging up' --> i.e. 'actually making it work without chewing gum and popsicle sticks' :) |
| [12:11:53] | <donblair[m]> | btw one last popsicle (sp?) stick -- I think y'all have this figured out already? but just in case -- there seems to be some weirdness in j-lite when reading local / remote files, so there's some contributor who came up with a nice workaround -- i've got some example code here: https://github.com/edgecollective/jupyterlite/blob/main/content/csv_load... |
| [12:12:25] | <donblair[m]> | you may have already surpassed that workaround with a better approach, just wanted to ping, in case -- |
| [12:12:54] | <symbioquine[m]> | donblair: Are you available to hop on the dev call? |
| [12:13:26] | <donblair[m]> | i think i can chat for a few minutes! will hop on now hold on |
| [14:13:00] | <EvanKelley[m]> | Hi again guys I'm sorry to hear that Mike isn't feeling well I hope he gets better soon. I came back again with another hopefully easy FarmOS question. We are currently working through our custom assets form and were wondering if there was a data type for a Date that didn't have the "hour:minutes:seconds" field so that our user only had to enter the month day and year they started the project? any suggestions would be greatly |
| [14:13:00] | <EvanKelley[m]> | appreciated. |
| [14:17:31] | <mstenta[m]> | Hi Evan Kelley :-) |
| [14:17:35] | <mstenta[m]> | It's my 3-yo daughter who's sick, not me |
| [14:17:56] | <mstenta[m]> | Good question! I've actually wanted the same thing myself for a while... basically to make the time optional |
| [14:18:00] | <EvanKelley[m]> | Oh well either way hope whoever's sick gets better |
| [14:18:02] | <mstenta[m]> | This is discussed a bit in this forum topic: https://farmos.discourse.group/t/reduce-date-time-entry-to-date-only-ent... |
| [14:19:05] | <mstenta[m]> | Ultimately the Log timestamp fields (I assume you're talking about logs?) are stored as a unix timestamp in the database... so time is always stored. Mostly what we have been discussing is making the data entry widget easier to use. |
| [14:19:50] | <mstenta[m]> | eg: Don't show the time fields by default, default them to "midnight" (as a convention to indicate "no time"), and add an optional little link to the field that says "Add time" or something |
| [14:20:56] | <mstenta[m]> | per that forum topic, my comment: |
| [14:20:56] | <mstenta[m]> | > My thought was: have a bit of JavaScript that automatically hides the “time” fields, and sets them all to zero, with a little link like “Specify time” which shows them and lets you set a specific time if you want to. |
| [14:21:09] | <mstenta[m]> | if you end up needing something similar, we'd welcome that contribution!! |
| [14:22:23] | <mstenta[m]> | this could be implemented in one of your custom modules at first, and if it seems like a nice general solution, we could consider pulling it "upstream" into the farmOS core codebase |
| [14:25:06] | <EvanKelley[m]> | Alrighty gotcha, we just didn't want to reinvent the wheel if it already existed. |
| [14:25:57] | <mstenta[m]> | nope go for it! it's a highly desired improvement! :-) |
| [16:59:23] | <mstenta[m]> | paul121: meant to ask... you said you got farmOS.py working in jupyterlite... did you have to "compile it in" to a custom jupyterlite build? or did it work to use `piplite install` or something? |
| [17:07:12] | <paul121[m]> | nope, no compile! |
| [17:07:27] | <paul121[m]> | import micropip |
| [17:07:27] | <paul121[m]> | micropip.install(['farmos==1.0.0b3']) |
| [17:07:57] | <paul121[m]> | even though it depends on `requests` and what not it will import without errors |
| [17:09:01] | <paul121[m]> | but in order to use farmOS.py practically, I had to swap in a custom session that makes requests using the js api, like `from js import fetch` |
| [17:09:11] | <paul121[m]> | https://gist.github.com/paul121/cd64a1e8ef2d609c2f6abd6419420562 |
| [17:23:05] | <mstenta[m]> | wow! |
| [17:23:06] | <mstenta[m]> | ok |