[DAMD-142] variant and designId0 are not propagated to pfsConfig file Created: 15/Nov/22 Updated: 19/Nov/22 Resolved: 19/Nov/22 |
|
| Status: | Done |
| Project: | Data Model |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Normal |
| Reporter: | arnaud.lefur | Assignee: | arnaud.lefur |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Story Points: | 1 |
| Reviewers: | hassan |
| Description |
|
variant and designId0 are not propagated to pfsConfig file In [5]: config = PfsConfig.read(0x240c7969c1532146, 82045) In [6]: design = PfsDesign.read(0x240c7969c1532146) In [7]: design.variant Out[7]: 8 In [8]: config.variant Out[8]: 0 |
| Comments |
| Comment by hassan [ 19/Nov/22 ] |
|
Changes look fine, but propose adding a simple test to check that the variant information is correctly propagated, eg:
def testPfsConfigVariants(self):
"""Test that pfsConfig can be create from a design with variant """
design0 = self.makePfsDesign()
variant1 = 1
design1 = self.makePfsDesign(variant=variant1, designId0=design0.pfsDesignId)
config1 = PfsConfig.fromPfsDesign(design1, self.visit0, self.pfiCenter)
self.assertEqual((variant1, design0.pfsDesignId), config1.getVariant())
|
| Comment by arnaud.lefur [ 19/Nov/22 ] |
|
Sure, can you push the change on the branch ? |
| Comment by hassan [ 19/Nov/22 ] |
|
Change pushed to ticket branch. |
| Comment by arnaud.lefur [ 19/Nov/22 ] |
|
merged to master. |