| [21:25:33] | * JustTB has quit (Quit: Leaving.) |
| [23:25:58] | * JustTB has joined #farmos |
| [05:05:43] | * JustTB has quit (Quit: Leaving.) |
| [11:36:09] | * JustTB has joined #farmos |
| [14:51:32] | <mstenta[m]> | jgaehring: if you have some time in the near future, i'd love to talk about farmOS.js, farmOS.php, and farmOS.py a little... and think through how we can make them as similar as possible |
| [14:51:53] | <mstenta[m]> | I'm not sure where to start that discussion, since it is higher level than any of the individual repositories. |
| [14:52:19] | <mstenta[m]> | I suppose we could do it in https://github.com/farmOS/farmOS/issues/ |
| [14:53:03] | <jgaehring[m]> | sure, happy to do a call any time too |
| [14:53:53] | <jgaehring[m]> | i was thinking tomorrow I'd start moving stuff over to the farmOS.js repo, and start documenting the API, as it is now at least |
| [14:54:03] | <mstenta[m]> | ok cool |
| [14:54:10] | <mstenta[m]> | that would be a great start actually |
| [14:54:31] | <mstenta[m]> | i was thinking about breaking farmOS.php out of farm_sync, and setting it up as an official PHP Packagist project |
| [14:55:09] | <mstenta[m]> | maybe your farmOS.js documentation would be the best place to start all of this, actually |
| [14:55:32] | <mstenta[m]> | i can use that (and discussion with you) to try to bring farmOS.php in sync with that |
| [14:55:50] | <mstenta[m]> | and add that to the documentation as well |
| [14:56:10] | <mstenta[m]> | and once we have those two semi-standardized implementations, we can model farmOS.py off of them |
| [14:56:47] | <jgaehring[m]> | yea, i'm sure once I document all the methods and their signatures there will be some things that stand out that we'd like to change, along with stuff to keep, etc |
| [14:57:16] | <mstenta[m]> | cool |
| [14:57:26] | <mstenta[m]> | yea, i'd love to (eventually) have docs similar to Stripe |
| [14:57:27] | <mstenta[m]> | https://stripe.com/docs/libraries |
| [14:57:42] | <mstenta[m]> | which explain the general methods available in all the libraries, and have example code in each |
| [14:58:27] | <mstenta[m]> | keeping all three in sync might be tricky... but maybe we can make a policy of always updating all three if anything needs to change |
| [14:59:47] | <mstenta[m]> | Oops this is the Stripe link I meat to post: https://stripe.com/docs/api |
| [14:59:53] | <mstenta[m]> | meant* |
| [15:01:00] | <jgaehring[m]> | cool, yea, I love the idea of having docs like that, and the parallel API's that make that possible |
| [17:06:49] | <paul121[m]> | Woah.. so, are versions of the farmOS.js and .php already in use in the client and server side? Just trying to standardize and document? |
| [17:07:14] | <paul121[m]> | Having Python available would make things fun :) |
| [17:11:17] | <mstenta[m]> | @paul121:matrix.org: the client has a farmOS.js lib built in that abstracts API communication with the farmOS server |
| [17:11:31] | <mstenta[m]> | So we're talking about breaking that out to a separate repo |
| [17:11:46] | <mstenta[m]> | So that it can become a npm package |
| [17:12:26] | <mstenta[m]> | And I made a similar library recently in a Drupal module, which could also live on its own as a PHP package |
| [17:12:38] | <mstenta[m]> | So we're talking about standardizing those two |
| [17:13:01] | <mstenta[m]> | And then using them as a basis for other libraries like a Python variant |
| [17:13:20] | <mstenta[m]> | Basically to make it easy for other applications to integrate with farmOS |
| [17:14:46] | <mstenta[m]> | So all of them would be client libraries... And meanwhile the server uses the REST module to serve API endpoints that they talk to |
| [17:16:43] | <mstenta[m]> | > Having Python available would make things fun :) |
| [17:16:44] | <mstenta[m]> | Yea! I'm excited about that idea too - so you could pull data from a farmOS site into Python and work with it. |
| [17:17:43] | <paul121[m]> | Awesome. Makes sense! Python especially for some easier data analysis |
| [17:18:42] | <paul121[m]> | I was wondering about the php one, what does the Drupal module provide? Could another Drupal site (not farmOS) include the module to pull info from farmOS? |
| [17:19:06] | <mstenta[m]> | https://github.com/mstenta/farm_sync |
| [17:19:19] | <mstenta[m]> | Yea - so it's a pretty basic module right now. And it's for Drupal 8 (farmOS is D7). |
| [17:19:35] | <mstenta[m]> | The module basically provides two things: |
| [17:19:49] | <mstenta[m]> | 1) A farmOS.php class that abstracts API communication (this is the piece I want to split out). |
| [17:20:16] | <mstenta[m]> | 2) A Drupal form that uses the library to sync areas from a farmOS into the local D8 database. |
| [17:20:44] | <mstenta[m]> | (It provides a simple database table to store the area name, id, and geometry - so you can use those locally if you want) |
| [17:21:26] | <mstenta[m]> | The specific use-case it was built for is to allow a separate CRM system to pull in area data from a farmOS instance. |
| [17:21:39] | <mstenta[m]> | But it's general enough to be used in other contexts as well. |
| [17:22:26] | <mstenta[m]> | Here's the PHP class specifically, as it is now: |
| [17:22:27] | <mstenta[m]> | https://github.com/mstenta/farm_sync/blob/8.x-1.x/src/farmOS.php |
| [17:23:35] | <paul121[m]> | Neat. I'll take a look later, just popping in on my lunch. Will be cool to see the API come together |
| [17:24:03] | <paul121[m]> | Generalize it all! |
| [17:24:10] | <mstenta[m]> | Yes yes! :-D |
| [17:24:17] | <mstenta[m]> | PS I owe you an email... ;-) |
| [17:24:28] | <mstenta[m]> | Hoping to get to that this week. |
| [17:24:45] | <mstenta[m]> | Crazy with new baby and all :-) |
| [17:26:21] | <paul121[m]> | No worries, I can imagine |
| [17:26:54] | <paul121[m]> | I'm busy moving into a new place, have my own *little* adulting to occupy my time |
| [17:27:42] | <mstenta[m]> | Cool cool - moving is a lot of work - and sometime fun |
| [17:27:49] | <mstenta[m]> | Hope it's going well |
| [17:28:36] | <paul121[m]> | It's exciting! Will be good once internet is hooked up! Ha! |
| [17:29:25] | <paul121[m]> | Back to work. Be in touch |
| [17:33:10] | <mstenta[m]> | Haha yea that's always one of the first priorities! |
| [17:33:12] | <mstenta[m]> | Good luck! |
| [17:55:04] | * JustTB has quit (Quit: Leaving.) |
| [18:47:32] | * JustTB has joined #farmos |