IRC logs for #farmOS, 2022-08-20 (GMT)

2022-08-19
2022-08-21
TimeNickMessage
[05:00:16]* thattechguy[m] has quit (Quit: You have been kicked for being idle)
[06:34:46]<FarmerEd[m]>symbioquine: installed asset link this morning on a dev instance. Looks Good but need to have a look through your plugin tutorial later
[09:45:49]<symbioquine[m]>Yeah, it likely won't be super useful without a few more plugins
[09:54:07]<FarmerEd[m]>No, but I get the idea. Lots of potential will have to have a good think about what I'd like it to do first.
[09:56:09]<FarmerEd[m]>Observation logs for breeding are the obvious first choice for me, will see what time I find in the next few days.
[09:57:01]<symbioquine[m]>If you want to hop on a call at some point and play with writing plugins together, that might be pretty helpful for me too...
[09:58:22]<FarmerEd[m]>Yea, we can do that at some stage, would be great.
[10:13:29]<symbioquine[m]><FarmerEd[m]> "Observation logs for breeding..." <- I'm trying to think what we'd need in the data model to support that...
[10:14:06]<symbioquine[m]>My inclination would be to put the "gestation/incubation term" as a field on the animal type
[10:15:50]<FarmerEd[m]>Yes, would be a good idea, it's even variable between breeds of cattle by a few days.
[10:16:26]<symbioquine[m]>I was thinking that the logic we write could be aware of the `animal_type` hierarchy.
[10:17:21]<symbioquine[m]>i.e. if you have an animal type `Cattle` and `Cattle - hefeweizen` it would take the gestation term from the most specific one
[10:19:07]<symbioquine[m]>Where `Cattle` is a parent of `Cattle - hefeweizen` and `Cow: Sally` has her `animal_type` relation set to `Cattle - hefeweizen`, it would take the gestation period from `Cattle - hefeweizen` if specified and otherwise from `Cattle`.
[10:22:38]<symbioquine[m]>mstenta: What do you think about new core fields for the `animal_type` taxonomy; `days_to_breeding_age` and `gestation_days`?
[10:23:00]<symbioquine[m]>`plant_type` has "Days to transplant" and "Days to maturity"
[11:39:26]<FarmerEd[m]>Would be great if it was easier to add fields to taxonomy with custom modules. Paul showed me a way which works fine but not great for redistribution in modules.
[11:39:59]<symbioquine[m]>I think I've been using a reasonable approach for that...
[11:41:13]<symbioquine[m]>Creating gist...
[11:44:13]<FarmerEd[m]>Does it require some tweaking with views UI or work completely with code?
[11:45:54]<symbioquine[m]>https://gist.github.com/symbioquine/8e54e16860fc32e2205966b2c98b114f
[11:46:02]<symbioquine[m]>No tweaking with Views UI
[11:47:18]<symbioquine[m]>symbioquine[m]: The files that are named with the `config_install_` prefix should actually be in the `config/install/` directory.
[11:49:44]<FarmerEd[m]>Cool, away from computer now, but I'll have a good look at that later.
[11:53:51]<FarmerEd[m]>Think I've learned more from a few pointers from a few of you guys than various software modules I've done in college or tried online.
[11:55:58]<FarmerEd[m]>Of course it helps that I'm working on farm software I want/need and not a fictional system for a made up company.
[11:58:17]<symbioquine[m]>FarmerEd[m]: I learned so much more in school (than I would have otherwise) from having parallel extracurricular software projects that I could apply what I was learning and pursue additional avenues of exploration.
[12:00:17]<mstenta[m]>> mstenta: What do you think about new core fields for the `animal_type` taxonomy; `days_to_breeding_age` and `gestation_days`?
[12:00:17]<mstenta[m]>Perhaps! I wonder if it would make sense to start a farm_breeding module that provides those (and uses them)
[12:00:19]<mstenta[m]>In contrib first
[12:01:22]<FarmerEd[m]>Well I suppose we all learn differently. It's not like I didn't take any of it in either, just things click better if I have a goal that interests me.
[12:02:38]<mstenta[m]>> Would be great if it was easier to add fields to taxonomy with custom modules. Paul showed me a way which works fine but not great for redistribution in modules.
[12:02:38]<mstenta[m]>Agreed. This is the pitfall currently
[12:02:39]<mstenta[m]>> `plant_type` has "Days to transplant" and "Days to maturity"
[12:02:39]<mstenta[m]>Yea, although I regret adding those before they were used anywhere (and we had to keep them ever since for BC)
[12:02:39]<mstenta[m]>Although curious to grok symbioquine's workaround! On my phone at the moment
[12:03:08]<symbioquine[m]>> <@mstenta:matrix.org> > mstenta: What do you think about new core fields for the `animal_type` taxonomy; `days_to_breeding_age` and `gestation_days`?
[12:03:08]<symbioquine[m]>>
[12:03:08]<symbioquine[m]>> Perhaps! I wonder if it would make sense to start a farm_breeding module that provides those (and uses them)
[12:03:08]<symbioquine[m]>That could work. I'd probably only put the data model parts (and maybe a quick form) in that module...
[12:03:13]<mstenta[m]>I'm assuming it uses hooks to avoid config?
[12:03:30]<symbioquine[m]>mstenta[m]: I think you helped me figure it out :)
[12:03:36]<mstenta[m]>Lol maybe
[12:04:16]<symbioquine[m]>mstenta[m]: Yeah, it defines the field/storage, then uses `hook_entity_form_display_alter`/`farmos_crop_taxonomic_info_entity_view_display_alter` to display the fields.
[12:04:20]<mstenta[m]>I think I need to upgrade my brain's memory 😅
[12:22:36]<mstenta[m]>Great!
[12:23:16]<mstenta[m]>(Wonder if farmOS core should provide any helper logic for that, so contrib wouldnt have to)
[12:23:42]<symbioquine[m]>Though, it's actually not much code...
[12:24:06]<symbioquine[m]>Might be nice if there was a config-only approach I suppose.
[12:29:33]<FarmerEd[m]><symbioquine[m]> "Though, it's actually not much..." <- Probably not, but definitely useful, I've seen a few use cases for additional fields.