Skip to content

Feature/bi 1189 - 4.0 Exp Preview & Commit: Create Exp Independent Variables#187

Merged
davedrp merged 26 commits intofuture/1.0from
feature/BI-1189
Aug 1, 2022
Merged

Feature/bi 1189 - 4.0 Exp Preview & Commit: Create Exp Independent Variables#187
davedrp merged 26 commits intofuture/1.0from
feature/BI-1189

Conversation

@davedrp
Copy link
Contributor

@davedrp davedrp commented Jun 1, 2022

Description

Story: BI1189

4.0 Exp Preview & Commit: Create Exp Independent Variables

Dependencies

bi-web branch feature/BI-1146

Testing

  • Using the Experiment Import Template, create an import file with
    -- One experiment (every row has the same Exp Title and Exp Description)
    -- several Obsevation Units
  • import and commit
  • verify that the correct data is saved

Checklist:

  • I have performed a self-review of my own code
  • I have tested my code and ensured it meets the acceptance criteria of the story
  • I have tested that my code works with both the brapi-java-server and BreedBase
  • I have create/modified unit tests to cover this change
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to documentation
  • I have run TAF: this TAF run has the same errors as future/1.0 run

@davedrp davedrp requested review from a team, HMS17 and ctucker3 and removed request for a team June 1, 2022 19:11
@davedrp davedrp requested a review from HMS17 June 6, 2022 17:00
@davedrp davedrp requested a review from HMS17 June 7, 2022 15:02
Copy link
Contributor

@ctucker3 ctucker3 left a comment

Choose a reason for hiding this comment

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

Overall looks good! Some change requests but nothing major.

Is there a plan to add tests for this experiment import? If not for this card, we should make it a requirement for the next card.

ImportObjectState expState = this.trialByNameNoScope.get(experimentTitle).getState();
boolean isExperimentNew = (expState == ImportObjectState.NEW);

if (isExperimentNew) {
Copy link
Contributor

Choose a reason for hiding this comment

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

What about the case that the trial exists and the study exists and you are just trying to add obs units to a study. Seems like you would need two checks.

If trial name is new:

  • Trial data is required
  • Study data is required
  • Obs Unit data is required

If Env is new:

  • Env data is required
  • ObsUnitData is required

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As the story is written, this is out of scope. I will check Tim to see if it should be added.

Copy link
Member

Choose a reason for hiding this comment

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

@shawnyarnes please correct what I may get wrong.

The experiment upload functionality should not allow you to append observation units to an existing environment (aka study). Observation Units can only be added to an environment when the environment is first created.

@davedrp davedrp requested a review from ctucker3 July 6, 2022 18:20
Copy link
Contributor

@ctucker3 ctucker3 left a comment

Choose a reason for hiding this comment

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

Looks like some of my change requests from before were missed and I added a couple of comments on some discussions.

.map(ExperimentObservation::getEnv)
.distinct()
.filter(Objects::nonNull)
.collect(Collectors.toList());
Copy link
Member

Choose a reason for hiding this comment

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

I think this comment still needs to be addressed

@davedrp davedrp requested a review from timparsons July 26, 2022 14:38
Copy link
Member

@timparsons timparsons left a comment

Choose a reason for hiding this comment

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

A couple of very small things

PendingImportObject<BrAPITrial> trialPIO = createTrialPIO(program, commit, importRow, expSeqValue);
this.trialByNameNoScope.put(importRow.getExpTitle(), trialPIO);

//TODO move this above the creation of trialPIO (see BI-1189 tech spec 4.b)?
Copy link
Member

Choose a reason for hiding this comment

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

Does this TODO still apply?

return seasonDbId;
}

private boolean isRefSource(BrAPIExternalReference brAPIExternalReference) {
Copy link
Member

Choose a reason for hiding this comment

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

I'd recommend either renaming this method to isTrialRefSource or add an additional parameter to specify what ExternalReferenceSource to append.

@davedrp davedrp requested a review from timparsons July 29, 2022 15:25
@davedrp davedrp merged commit ed63210 into future/1.0 Aug 1, 2022
@davedrp davedrp deleted the feature/BI-1189 branch August 1, 2022 12:23
timparsons pushed a commit that referenced this pull request Aug 2, 2022
Feature/bi 1189 - 4.0 Exp Preview & Commit: Create Exp Independent Variables
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants