Skip to content

fix importance bug

Timm Fitschen requested to merge f-importance into dev

Summary

Fix for #146 (closed)

The place where the configuration is being set moved from the back-end (where it has been since the Middle Bronze Age) to the server (conf/core/rules.csv).

Also the Job implementing the check had some serious gaps (even not-too-cornerish cases) and TODOs which were closed/implemented. Effectively, this MR is a major refactoring of the CheckParOblPropPresent job.

Focus

  • The RuleLoader and all related transaction classes have been removed. Instead the JobConfig class loads the rules for jobs from a csv file which contains the columns that have been stored to the "rules" table in the back-end previously.

  • The Job class was extended by several convenient method I stole from the f-filesystem branch (most prominently resolve and isSubType.

  • The Mode enum has been renamed to JobFailureSeverity because that is actually a much more speaking name. Also the values (remainders of the Early Bronze Age) have been changed to more speaking ones (and never-used values have been removed).

  • On the go, I also used the new resolve function in some other places and also removed some occurrences where Jobs started other jobs explicitly. I noticed that this was not necessary and it only was there because the CheckParentValid and CheckPropertyValid jobs have been moved to the PRE_CHECK stage in earlier commits, but the then unnecessary explicit calls have never been removed - they did no harm, but they are not necessary.

Test Environment

Tests in caosdb-pyinttest!9 (merged)

Check List for the Author

Please, prepare your MR for a review. Be sure to write a summary and a focus and create gitlab comments for the reviewer. They should guide the reviewer through the changes, explain your changes and also point out open questions. For further good practices have a look at our review guidelines

  • All automated tests pass
  • Reference related Issues
  • Up-to-date CHANGELOG.md
  • Annotations in code (Gitlab comments)
    • Intent of new code
    • Problems with old code
    • Why this implementation?

Check List for the Reviewer

  • I understand the intent of this MR
  • All automated tests pass
  • Up-to-date CHANGELOG.md
  • The test environment setup works and the intended behavior is reproducible in the test environment
  • In-code documentation and comments are up-to-date.
  • Check: Are there spezifications? Are they satisfied?

For further good practices have a look at our review guidelines.

Edited by Daniel Hornung

Merge request reports

Loading