<commit_before>#!/usr/bin/env python
# encoding: utf-8
"""

"""
from __future__ import absolute_import
import sys
import os

import ursgal.uparams

# this is for unorthodox queries of the params.
# please use the unode functions or UParamsMapper
# to access params since they are translated,
# grouped and so on ...

base_dir = os.path.dirname(__file__)
from .umapmaster import UParamMapper

# from .umapmaster import UPeptideMapper

from .unode import Meta_UNode
from .unode import UNode

from .ucontroller import UController
from .ucore import COLORS

from .chemical_composition import ChemicalComposition as ChemicalComposition
from . import chemical_composition_kb
from .unimod_mapper import UnimodMapper

import ursgal.ucore
from .profiles import PROFILES

import ursgal.ukb

GlobalUnimodMapper = UnimodMapper()


# We store our version number in a simple text file:
version_path = os.path.join(os.path.dirname(__file__), "version.txt")
with open(version_path, "r") as version_file:
    ursgal_version = version_file.read().strip()

__version__ = ursgal_version
version_info = tuple(map(int, ursgal_version.split(".")))

if not hasattr(sys, "version_info") or sys.version_info < (3, 4):
    raise RuntimeError("Ursgal requires Python 3.4 or later.")<commit_msg>Use `packaging.version.parser` for version parsing<commit_after>#!/usr/bin/env python
# encoding: utf-8
"""

"""
from __future__ import absolute_import
import sys
import os
from packaging.version import parse as parse_version

import ursgal.uparams

# this is for unorthodox queries of the params.
# please use the unode functions or UParamsMapper
# to access params since they are translated,
# grouped and so on ...

base_dir = os.path.dirname(__file__)
from .umapmaster import UParamMapper

# from .umapmaster import UPeptideMapper

from .unode import Meta_UNode
from .unode import UNode

from .ucontroller import UController
from .ucore import COLORS

from .chemical_composition import ChemicalComposition as ChemicalComposition
from . import chemical_composition_kb
from .unimod_mapper import UnimodMapper

import ursgal.ucore
from .profiles import PROFILES

import ursgal.ukb

GlobalUnimodMapper = UnimodMapper()


# We store our version number in a simple text file:
version_path = os.path.join(os.path.dirname(__file__), "version.txt")
with open(version_path, "r") as version_file:
    ursgal_version = version_file.read().strip()

__version__ = ursgal_version
version_info = parse_version(ursgal_version)

if not hasattr(sys, "version_info") or sys.version_info < (3, 4):
    raise RuntimeError("Ursgal requires Python 3.4 or later.")
{'fraction_non_alphanumeric': 0.07972403219624377, 'fraction_numerical': 0.0038328861632809506, 'mean_word_length': 5.229116945107399, 'pattern_counts': {'":': 0, '<': 5, '<?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': '764486', 'n_tokens_mistral': 825, 'n_tokens_neox': 791, 'n_words': 266}