Uh oh!
There was an error while loading. Please reload this page.
Item #6862: provenance loadRun API - #1000
Conversation
labkey-kevink
commented
Mar 27, 2020
- refactor linage API to use same serialization as loadRun API
- add serialization options to include properties, run steps, and input/outputs
- include provenance in loadRun and XAR export
- include provenance properties in the loadRun response - share serialization of experiment objects in lineage API and loadRun API - add Identifiable.detailsURL
- add QueryRowReference to Identifiable and include it when in lineage and loadRun response - optionally include run steps in LABKEY.Experiment.loadRun() response - optionally include provenance map in LABKEY.Experiment.loadRun() response
labkey-jeckels
left a comment
There was a problem hiding this comment.
Smaller suggestions, no further review required.
| } | ||
| public interface LsidHandler | ||
| public interface LsidHandler<O extends Identifiable> |
There was a problem hiding this comment.
Consider using something other than "O" - I find that reading the diff it keeps looking like "0" (aka zero) when it stands all alone.
| return json; | ||
| } | ||
| // Serialize only the base properties -- does not include object properties |
There was a problem hiding this comment.
Can you better summarize the difference between "base" and "standard" properties here? Especially muddled because the first comment in this method says "standard properties"
| import static org.labkey.api.util.PageFlowUtil.encode; | ||
| /** | ||
| * Reference a single row within a table by it's query coordinates: container, schemaName, queryName, and a set of pk filters. |
There was a problem hiding this comment.
| * Referenceasinglerowwithinatablebyit's query coordinates: container, schemaName, queryName, and a set of pk filters. | |
| * Referenceasinglerowwithinatablebyitsquerycoordinates: container, schemaName, queryName, andasetofpkfilters. |
| * @param {Boolean} config.includeInputsAndOutputs Include run and step inputs and outputs. | ||
| * @param {Boolean} config.includeRunSteps Include run steps. | ||
| * @param {function} config.success The function to call when the function finishes successfully. | ||
| * This function will be called with a the parameters: |
There was a problem hiding this comment.
| *Thisfunctionwillbecalledwithatheparameters: | |
| *Thisfunctionwillbecalledwiththeparameters: | |
labkey-nicka
left a comment
There was a problem hiding this comment.
Looks really good. Reviewed what is being returned in some of the scenarios I'm looking at for the lineage graph replacement and I didn't find any discrepancies in my spot checks.
A couple of minor nits.
| public static JSONObject serializeStandardProperties(@NotNull ExpObject object, @Nullable List<? extends DomainProperty> properties, @NotNull Settings settings) | ||
| { | ||
| JSONObject jsonObject = serializeStandardProperties(object); | ||
| JSONObject jsonObject; |
There was a problem hiding this comment.
nit: Can hoist serializeBaseProperties(object) out of conditionals.
JSONObjectjsonObject = serializeBaseProperties(object);
if (settings.isIncludeProperties())
{
JSONObjectpropertiesObject = serializeCustomProperties(object, properties, settings);
if (!propertiesObject.isEmpty())
jsonObject.put(PROPERTIES, propertiesObject);
}
returnjsonObject;| import org.labkey.api.exp.Identifiable; | ||
| import org.labkey.api.exp.query.SamplesSchema; | ||
| import org.labkey.api.query.SchemaKey; | ||
| import org.labkey.api.security.User; |
There was a problem hiding this comment.
nit: ExpLineage.java and QueryRowReference.java have unused imports.