[PIPE2D-485] calculate_pfsVisitHash updates Created: 12/Dec/19  Updated: 05/Jan/21  Resolved: 13/Feb/20

Status: Done
Project: DRP 2-D Pipeline
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Story Priority: Normal
Reporter: price Assignee: price
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to PIPE2D-492 Miscellaneous changes to the 2D DRP p... Done
Story Points: 1
Sprint: 2DDRP-2021 A
Reviewers: rhl

 Description   

calculate_pfsVisitHash is unused. Target.calculateVisitHash is what is used in practice for the data. We need to have some simple function (or a class method) that produces the desired value, given a list of visits, so a user can simply get the hash value.

Target.calculateVisitHash should sort the list of visits, and remove duplicates.



 Comments   
Comment by rhl [ 12/Dec/19 ]

I think this needs to be a free function, and a glance at Target.calculateVisitHash implies that it hashes more than the visits; this isn't what the data model specifies.

Comment by price [ 12/Dec/19 ]

rhl writes:

I don't like the set proposal as nVisit is the number of visits, and should == len(visits). I'd rather have the code throw on duplicates.

Let's also update the nVisit calculation to be the number of unique visits (so blue and red arms count as one).

Comment by price [ 14/Dec/19 ]

This is ready for review.

Comment by price [ 13/Feb/20 ]

Merged to master.

Generated at Sat Feb 10 15:53:57 JST 2024 using Jira 8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b.