Closed JossWhittle closed 4 years ago
Commit https://github.com/JossWhittle/Opt-ID/commit/3b588371f3f766bcc087971d5458064a872e07ed on fork fixes the bug and corrects the expected output file used for the test.
To ensure this new expected output file is correct the following procedure was followed:
HT
magnets.HT
type magnets.
HT
magnets the output is correct.HT
type magnets to be included.
.genome.inp.genome
file which we now trust to actually be correct and includes HT
magnet data, is used to replace the original expected output file for the process_genome_test::test_process_create_genome()
test case. The PR that merges this fix from the fork will close the issue.
@eddrial what are HT magnets again, and are they important? Cheers, Mark
Closed by #57
In
process_genome.py
thecreate_genome
flag has the functionality of taking in a human readable genome file and creating a machine readable version of the same data. However, it does not considerHT
(type 5) magnets.https://github.com/DiamondLightSource/Opt-ID/blob/5eae8f15642c98cf762d889715f960801f36258e/IDSort/src/process_genome.py#L194-L233
The human readable input file provided for testing in
process_genome_test::test_process_create_genome()
does containHT
magnets, but the expected output file was originally generated with code that also had this bug and so does not containHT
magnets for comparison.Fixing the bug paradoxically causes the test to fail because it now correctly includes
HT
magnets.In practice during real world usage, the
create_genome
flag is never used as we never end up with human readable.genome.inp
files that we need to convert back into machine readable.genomes
during normal operation.During testing, dedicated files of
.genome.inp
type are converted to.genome.inp.genome
files which erroneously do not contain theHT
data. But these files are fundamentally separate from legitimate.genome
and.genome.inp
files used elsewhere. The bug and erroneous data are therefore isolated to thecreate_genome
flag usage and test case and specifically toprocess_genome_test::test_process_create_genome()
.