<commit_before>"""
Views related to build management
"""

import json
import logging
import mimetypes
import os.path
# import re
import select

from flask import (abort,
                   flash,
                   redirect,
                   render_template,
                   request,
                   Response,
                   url_for,
                   )

from dockci.models.build import Build
from dockci.models.job import Job
from dockci.server import APP
from dockci.util import (is_valid_github,
                         DateTimeEncoder,
                         )
from dockci.yaml_model import ValidationError


@APP.route('/jobs/<job_slug>/builds/<build_slug>', methods=('GET',))
def build_view(job_slug, build_slug):
    """
    View to display a build
    """
    job = Job(slug=job_slug)
    build = Build(job=job, slug=build_slug)

    return render_template('build.html', build=build)<commit_msg>Remove unused import<commit_after>"""
Views related to build management
"""

import json
import logging
import mimetypes
import os.path
import select

from flask import (abort,
                   flash,
                   redirect,
                   render_template,
                   request,
                   Response,
                   url_for,
                   )

from dockci.models.build import Build
from dockci.models.job import Job
from dockci.server import APP
from dockci.util import (is_valid_github,
                         DateTimeEncoder,
                         )
from dockci.yaml_model import ValidationError


@APP.route('/jobs/<job_slug>/builds/<build_slug>', methods=('GET',))
def build_view(job_slug, build_slug):
    """
    View to display a build
    """
    job = Job(slug=job_slug)
    build = Build(job=job, slug=build_slug)

    return render_template('build.html', build=build)
{'fraction_non_alphanumeric': 0.0856519367157665, 'fraction_numerical': 0.0, 'mean_word_length': 2.046511627906977, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '771126', 'n_tokens_mistral': 511, 'n_tokens_neox': 495, 'n_words': 133}