<commit_before>import os
import subprocess
from pluginDir import pluginDir
from girder.api import access
from girder.api.describe import Description, describeRoute
from girder.api.rest import Resource, RestException, loadmodel


class Versioning(Resource):
    @access.public
    @describeRoute(
        Description('Get Resonant Lab\'s current version number.')
        .notes(' Note that, for now, this actually will return the current branch name. ' +
               'In the future, this will return a number if the branch is "master", ' +
               '"release", or there is no git branch information (see issue #255)')
        .errorResponse()
    )
    def versionNumber(self, params):
        # TODO: instead of "master", return (and use) actual version numbers
        try:
            # Try to figure out what git branch we're on... TODO: if this fails
            # for whatever reason, return the actual version number instead
            statusText = subprocess.check_output(['git', 'status'], cwd=pluginDir())<commit_msg>chore(resonantlab): Disable versioning logic to prevent orange warnings in deployments<commit_after>import subprocess
from pluginDir import pluginDir
from girder.api import access
from girder.api.describe import Description, describeRoute
from girder.api.rest import Resource


class Versioning(Resource):
    @access.public
    @describeRoute(
        Description('Get Resonant Lab\'s current version number.')
        .notes(' Note that, for now, this actually will return the current branch name. ' +
               'In the future, this will return a number if the branch is "master", ' +
               '"release", or there is no git branch information (see issue #255)')
        .errorResponse()
    )
    def versionNumber(self, params):
        return 'master'

        # TODO: instead of "master", return (and use) actual version numbers
        #
        # TODO: remove this logic altogether. A semver/semantic-release kind of
        # automated release cycle should eliminate most of the need for this
        # versioning scheme.
        try:
            # Try to figure out what git branch we're on... TODO: if this fails
            # for whatever reason, return the actual version number instead
            statusText = subprocess.check_output(['git', 'status'], cwd=pluginDir())
{'fraction_non_alphanumeric': 0.08061749571183534, 'fraction_numerical': 0.002572898799313894, 'mean_word_length': 2.9210084033613444, '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': '5791114', 'n_tokens_mistral': 578, 'n_tokens_neox': 561, 'n_words': 250}