Skip to content

Item #6862: provenance loadRun API - #1000

Merged
labkey-kevink merged 13 commits into
developfrom
fb_prov_loadRun_6862
Mar 27, 2020
Merged

Item #6862: provenance loadRun API#1000
labkey-kevink merged 13 commits into
developfrom
fb_prov_loadRun_6862

Conversation

@labkey-kevink

Copy link
Copy Markdown
Contributor
  • 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

@labkey-jeckelslabkey-jeckels left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Smaller suggestions, no further review required.

}

public interface LsidHandler
public interface LsidHandler<O extends Identifiable>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* 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:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
*Thisfunctionwillbecalledwithatheparameters:
*Thisfunctionwillbecalledwiththeparameters:

@labkey-nickalabkey-nicka left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: ExpLineage.java and QueryRowReference.java have unused imports.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@labkey-kevink@labkey-nicka@labkey-jeckels