<commit_before><commit_msg>Add initial draft script to analyse Maven deps<commit_after>#!/usr/bin/env python

import subprocess as sub
import yaml
import re

distrib_pom_path = '/home/uvsmtid/Works/maritime-singapore.git/clearsea-distribution/pom.xml'

# Resolve (download) all dependencies locally so that next command
# can work offline.
sub.check_call(
    [
        'mvn',
        '-f',
        distrib_pom_path,
        'dependency:resolve',
    ],
)

# Get list of all dependencies. 
p = sub.Popen(
    [
        'mvn',
        '-f',
        distrib_pom_path,
        'dependency:list',
    ],
    stdout = sub.PIPE,
)

# Select lines with dependency items.
artifact_regex = re.compile(')
for line in p.stdout:
     
{'fraction_non_alphanumeric': 0.11080332409972299, 'fraction_numerical': 0.0, 'mean_word_length': 2.7461139896373057, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 1}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7584356', 'n_tokens_mistral': 250, 'n_tokens_neox': 238, 'n_words': 60}