<commit_before>import os

from girder.utility.webroot import Webroot

from .rest_slicer_cli import(
    genRESTEndPointsForSlicerCLIsInSubDirs,
    genRESTEndPointsForSlicerCLIsInDocker
)

_template = os.path.join(
    os.path.dirname(__file__),
    'webroot.mako'
)


def load(info):
    girderRoot = info['serverRoot']
    histomicsRoot = Webroot(_template)
    histomicsRoot.updateHtmlVars(girderRoot.vars)
    histomicsRoot.updateHtmlVars({'title': 'HistomicsTK'})

    info['serverRoot'].histomicstk = histomicsRoot
    info['serverRoot'].girder = girderRoot

    # cliRootDir = os.path.dirname(__file__)
    # genRESTEndPointsForSlicerCLIsInSubDirs(info, 'HistomicsTK', cliRootDir)

    genRESTEndPointsForSlicerCLIsInDocker(info,
                                          'HistomicsTK',
                                          'dsarchive/histomicstk')<commit_msg>Switch to generating REST end points from docker image<commit_after>import os

from girder.utility.webroot import Webroot

from .rest_slicer_cli import(
    genRESTEndPointsForSlicerCLIsInSubDirs,
    genRESTEndPointsForSlicerCLIsInDocker
)

_template = os.path.join(
    os.path.dirname(__file__),
    'webroot.mako'
)


def load(info):
    girderRoot = info['serverRoot']
    histomicsRoot = Webroot(_template)
    histomicsRoot.updateHtmlVars(girderRoot.vars)
    histomicsRoot.updateHtmlVars({'title': 'HistomicsTK'})

    info['serverRoot'].histomicstk = histomicsRoot
    info['serverRoot'].girder = girderRoot

    # cliRootDir = os.path.dirname(__file__)
    # genRESTEndPointsForSlicerCLIsInSubDirs(info, 'HistomicsTK', cliRootDir)

    _ = genRESTEndPointsForSlicerCLIsInDocker(
        info, 'HistomicsTK', 'dsarchive/histomicstk'
    )
{'fraction_non_alphanumeric': 0.09482257126236183, 'fraction_numerical': 0.0, 'mean_word_length': 3.9002849002849005, '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': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '465387', 'n_tokens_mistral': 608, 'n_tokens_neox': 575, 'n_words': 80}