Refactor CTA catalogue library code
Problem
The CTA catalogue code is very large, contains several duplicated code segments, as presents some code smells.
For example, the sonarcloud evaluation page for CTA shows:
- 1450+ code smells: https://sonarcloud.io/project/issues?directories=catalogue%2Ccatalogue%2Fdummy%2Ccatalogue%2Finterfaces%2Ccatalogue%2Frdbms%2Ccatalogue%2Frdbms%2Foracle%2Ccatalogue%2Frdbms%2Fpostgres%2Ccatalogue%2Frdbms%2Fsqlite%2Ccatalogue%2Fretrywrappers%2Ccatalogue%2Ftests&resolved=false&types=CODE_SMELL&id=cern-cta_CTA
- Several duplicated lines, up to ~75% depending on the file: https://sonarcloud.io/component_measures?id=cern-cta_CTA&metric=duplicated_lines_density&view=list
Current situation
As a proof of concept, we decided to write the new CTA catalogue Physical Library code with a different format, following a set of best practices and guaranteeing that it does not contain any code smells (evaluated using sonarcloud).
For more info on the CTA Physical Library catalogue, check:
Needs to be done
Using the CTA catalogue Physical Library code as a reference, we will refactor the rest of the CTA catalogue in order to reduce it's complexity and maintainability cost.
Edited by Joao Afonso