Open nconrad opened 9 years ago
Chris, I don't quite understand the "||" notation either. There is magic in PATRICStore.pm that updates object references from UUIDs to workspace paths (for example https://github.com/ModelSEED/ProbModelSEED/blob/master/lib/Bio/KBase/ObjectAPI/PATRICStore.pm#L133). With the extra "||" the references don't work with the workspace service.
Is there something else going on here that I don't understand?
The �||� is unavoidable. The problem is that the PATRIC workspace has subdirectories. So workspace paths contain an unpredictable number of �/�, with no clear structure like the KBase workspace had. But we use �/� to denote paths within an object as well. I need to separate workspace paths (e.g. /chenry/home/models/MyModel) from paths to navigate within an object to get to a specific sub object (e.g. reactions/id/rxn00001). To do this, I introduced the �||� as a delimiter between workspace path and object path. I don�t know what else to do. The other possibility is to rethink how we handle refs, and I�m open to that� but it�s a major change and requires careful thought.
On Jun 5, 2015, at 10:11 AM, Mike Mundy notifications@github.com wrote:
er
Ok, that makes sense and it would be a lot of work to change. Although I'm still concerned about a consumer of an object handling the references correctly. Maybe just need to document it.
Not too familiar with the design, but I'm concerned about this long term. Seems that they should be separate keys then, i.e., ws_path
and obj_path
Also, does this matter?
I'm guessing that you used a workspace method to create an object with the "||" special token? If so, that would cause all sorts of trouble in the modeling code.
Chris, any thoughts on how big a change it would be to separate the reference to the object from the reference to the subobject inside of it?
It�s alot of work. Any munging with the refs will impact the very core of the system. Also, refs must be strings� at least right now. I�m game to make changes, but not for the current release.
I know trouble will be caused if someone names an object with a �||�, but this is unlikely to happen often if at all. For now, I�d like to leave as is� We will fix this at some point.
On Jun 5, 2015, at 2:27 PM, Mike Mundy notifications@github.com wrote:
I'm guessing that you used a workspace method to create an object with the "||" special token? If so, that would cause all sorts of trouble in the modeling code.
Chris, any thoughts on how big a change it would be to separate the reference to the object from the reference to the subobject inside of it?
� Reply to this email directly or view it on GitHub.
That's completely understandable. We could mark some of these tickets toward milestones after this release.
Here are some notes for the future. The objects in KBase::ObjectAPI are still using UUIDs for the references. For example, https://github.com/ModelSEED/ProbModelSEED/blob/master/lib/Bio/KBase/ObjectAPI/KBaseFBA/DB/FBA.pm#L112.
The KBaseStore and PATRICStore objects each have a get_objects() method that transform the _reference field in an object to the appropriate reference for the underlying object store. Maybe there should be a reference object that manages references and could be swapped based on the underlying object store.
Leaving this here as reminder.
Just pointing out that there are odd
||
's inmedia_ref
and themodelcompound_ref
's for fba data. This doesn't affect my work.I still wonder why this data needs to be returned as a string. We should fix that later on if possible.