<commit_before>from django.db import connections
from django.db.models.query import sql

from django_chem.db.models.fields import ChemField
from django_chem.db.models.sql.where import ChemWhereNode

ALL_TERMS = dict([(x, None) for x in (
            'contained', 'contains', 'matches',
            # ? 'equals', 'exact',
            'mw_gt', 'mw_gte', 'mw_lt', 'mw_lte',
            )])
ALL_TERMS.update(sql.constants.QUERY_TERMS)

class ChemQuery(sql.Query):
    """
    A single chemical SQL query.
    """
    # Overridding the valid query terms.
    query_terms = ALL_TERMS

    # compiler = 'ChemSQLCompiler' ? maybe we don't need a specialized compiler. not yet.<commit_msg>minor cleanup<commit_after>from django.db import connections
from django.db.models.query import sql

from django_chem.db.models.fields import ChemField
from django_chem.db.models.sql.where import ChemWhereNode

# Extend the valid query terms with chem specific ones.
ALL_TERMS = dict([(x, None) for x in (
            'contained', 'matches',
            )])
ALL_TERMS.update(sql.constants.QUERY_TERMS)

class ChemQuery(sql.Query):
    """
    A single chemical SQL query.
    """
    # Overridding the valid query terms.
    query_terms = ALL_TERMS

    # compiler = 'ChemSQLCompiler' ? maybe we don't need a specialized compiler. not yet.
{'fraction_non_alphanumeric': 0.10538286580742987, 'fraction_numerical': 0.0, 'mean_word_length': 3.3137254901960786, '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': '3203469', 'n_tokens_mistral': 412, 'n_tokens_neox': 398, 'n_words': 116}