<commit_before>"""
Created on 17 Jun 2021

@author: <NAME> (<EMAIL>)

Alert example:
{"id": 123, "topic": "my/topic", "field": "my.field", "lower-threshold": 10.0, "upper-threshold": 100.0,
"alert-on-none": true, "aggregation-period": "00-01:00:00", "test-interval": "00-00:05:00",
"creator-email-address": "<EMAIL>", "cc-list": ["<EMAIL>"], "suspended": false}

AlertStatus example:
{"id": 123, "rec": "2021-06-17T15:58:23Z", "cause": ">U", "value": 101.5}

https://martinstapel.com/how-to-autoincrement-in-dynamo-db-if-you-really-need-to/
https://stackoverflow.com/questions/37072341/how-to-use-auto-increment-for-primary-key-id-in-dynamodb
"""

from collections import OrderedDict

from scs_core.data.recurring_period import RecurringPeriod
from scs_core.data.datetime import LocalizedDatetime
from scs_core.data.datum import Datum
from scs_core.data.json import JSONable<commit_msg>Upgraded alert.py<commit_after>"""
Created on 17 Jun 2021

@author: <NAME> (<EMAIL>)

Alert example:
{"id": 77, "topic": "south-coast-science-dev/development/loc/1/gases", "field": "val.CO.cnc", "lower-threshold": null,
"upper-threshold": 1000.0, "alert-on-none": true, "aggregation-period": {"interval": 1, "units": "M"},
"test-interval": null, "creator-email-address": "<EMAIL>",
"to": "<EMAIL>", "cc-list": [], "suspended": false}

AlertStatus example:
{"id": 77, "rec": "2021-09-07T11:40:00Z", "cause": null, "val": 589.6}

https://martinstapel.com/how-to-autoincrement-in-dynamo-db-if-you-really-need-to/
https://stackoverflow.com/questions/37072341/how-to-use-auto-increment-for-primary-key-id-in-dynamodb
"""

from collections import OrderedDict

from scs_core.data.recurring_period import RecurringPeriod
from scs_core.data.datetime import LocalizedDatetime
from scs_core.data.datum import Datum
from scs_core.data.json import JSONable
{'fraction_non_alphanumeric': 0.18972115910333515, 'fraction_numerical': 0.056861673045379986, 'mean_word_length': 5.8283582089552235, 'pattern_counts': {'":': 33, '<': 11, '<?xml version=': 0, '>': 12, 'https://': 4, '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': '1185557', 'n_tokens_mistral': 762, 'n_tokens_neox': 681, 'n_words': 134}