<commit_before>#!/usr/bin/python
# -*- coding: utf-8 -*-

import wdbc

class Environment(dict):
	def __init__(self, path, files, build):
		for f in files:
			self[wdbc.getfilename(f)] = wdbc.fopen(path+f, build=build, environment=self)
<commit_msg>environment: Don't die if the file doesn't exist, just print a warning<commit_after>#!/usr/bin/python
# -*- coding: utf-8 -*-

import wdbc
from ..logger import log

class Environment(dict):
	def __init__(self, path, files, build):
		for f in files:
			try:
				self[wdbc.getfilename(f)] = wdbc.fopen(path+f, build=build, environment=self)
			except IOError:
				log.warning("File %r not found" % (f))

{'fraction_non_alphanumeric': 0.15254237288135594, 'fraction_numerical': 0.0030816640986132513, 'mean_word_length': 4.284552845528455, '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': '76561', 'n_tokens_mistral': 244, 'n_tokens_neox': 225, 'n_words': 63}