<commit_before>package org.openforis.sepal.component.processingrecipe.migration

class TimeSeriesMigrations extends AbstractMigrations {
    TimeSeriesMigrations() {
        super('TIME_SERIES')
        addMigration(5, {Map r ->
            r.model.options.cloudDetection = (r.model.options && r.model.options.cloudMasking == 'AGGRESSIVE')
                    ? ['QA', 'CLOUD_MASK']
                    : ['QA']
            return r
        })
    }
}<commit_msg>Protected against null options in time-series recipe migration script.<commit_after>package org.openforis.sepal.component.processingrecipe.migration

class TimeSeriesMigrations extends AbstractMigrations {
    TimeSeriesMigrations() {
        super('TIME_SERIES')
        addMigration(5, {Map r ->
            if (!r.model.options) {
                r.model.options = [:]
            }
            r.model.options.cloudDetection = (r.model.options && r.model.options.cloudMasking == 'AGGRESSIVE')
                    ? ['QA', 'CLOUD_MASK']
                    : ['QA']
            return r
        })
    }
}
{'fraction_non_alphanumeric': 0.11671335200746966, 'fraction_numerical': 0.0018674136321195146, 'mean_word_length': 2.116279069767442, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1572298', 'n_tokens_mistral': 314, 'n_tokens_neox': 308, 'n_words': 51}