<commit_before>from portality.models import Journal


journals = [
    {'title':'Title 1', 'publisher': 'Publisher 1', 'issn': '12345678'},
    {'title':'Title 2', 'publisher': 'Publisher 2', 'issn': '01234567', 'eissn': '76543210', 'license': 'cc-by'},
    {'title':'Title 3', 'publisher': 'Publisher 3', 'apc': False},
    {'title':'Title 4', 'publisher': 'Publisher 3', 'language': 'en', 'content_in_doaj': True},
    {'title':'Title 5', 'publisher': 'Publisher 2', 'issn': '23456789', 'content_in_doaj': False, 'language': 'bg', 'apc':True},
]

for j in journals:
    jm = Journal(**j)
    jm.save()

Journal.refresh()<commit_msg>CSV dummy data script changed to conform to new data model<commit_after>from portality.models import Journal


journals = [
    {'title':'Title 1', 'publisher': 'Publisher 1', 'identifier':[{'type':'pissn', 'id': '12345678'}]},
    {'title':'Title 2', 'publisher': 'Publisher 2', 'identifier':[{'type':'pissn', 'id': '01234567'}, {'type':'eissn', 'id': '76543210'}], 'license': [{'type': 'cc-by','open_access': True, 'url': 'http://opendefinition.org/licenses/cc-by/'}]},
    {'title':'Title 3', 'publisher': 'Publisher 3', 'author_pays': False},
    {'title':'Title 4', 'publisher': 'Publisher 3', 'language': 'en', 'active': True},
    {'title':'Title 5', 'publisher': 'Publisher 2', 'identifier':[{'type':'pissn', 'id': '23456789'}], 'active': False, 'language': 'bg', 'author_pays':True},
]

for j in journals:
    jm = Journal(**{'bibjson':j})

    jm.save()

Journal.refresh()
{'fraction_non_alphanumeric': 0.24604221635883905, 'fraction_numerical': 0.055408970976253295, 'mean_word_length': 5.802690582959642, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2981679', 'n_tokens_mistral': 624, 'n_tokens_neox': 515, 'n_words': 135}