sequencescape
sequencescape copied to clipboard
Remove legacy Purpose classes
A large number of the Purpose subclasses are now unused, and are associated with older applications such as Generic Lims, and the ILB application. I am in the process of tagging these with @deprecated flags, and @todo's indicating which purposes can be removed.
I have also added a task: rake report:purposes
which can be run against a production database to indicate which purposes are in direct use, and which have subclasses in use.
In addition there are four file associated with the creation of purposes with these classes: app/models/illumina_b/plate_purposes.rb app/models/illumina_c/plate_purposes.rb app/models/illumina_htp/plate_purposes.rb app/models/pulldown/plate_purposes.rb
These files mainly concern factories which are used to generate the plate_purposes for the corresponding pipelines when seeding, and in the original migrations. These should also be removed, but as a first step it may be easier to just update them to generate purposes using the base PlatePurpose class.
A note on tests Tests will start failing when these classes are removed. Some of them will be just testing the class behaviour, and can probably be removed, but others may be testing otherwise untested behaviour and will need to be updated. Code coverage changes may be useful in helping to detect which tests are still important. (We have simple cov set up for code coverage, https://github.com/colszowka/simplecov)
Just search fo '@todo #2396' to find all purposes I've flagged with respect to this issue.
Picking up a few of these for #3091 to reduce the number of 'transition_to' methods I need to consider.
Surprisingly not done, a couple of bits still hanging around