<commit_before>import json
import logging

from django.http import HttpResponse, HttpResponseRedirect

from django.views.decorators.csrf import csrf_protect
from time import sleep
from django.utils import timezone
from copy import deepcopy

from atlas.getdatasets.models import TaskProdSys1
from atlas.prodtask.ddm_api import tid_from_container, dataset_events_ddm, DDM
#from atlas.prodtask.googlespd import GSP
from atlas.prodtask.models import RequestStatus, WaitingStep
#from ..prodtask.spdstodb import fill_template
from atlas.prodtask.views import set_request_status, clone_slices
from ..prodtask.helper import form_request_log
from ddm_api import dataset_events
#from ..prodtask.task_actions import do_action
from .views import form_existed_step_list, form_step_in_page, fill_dataset, make_child_update
from django.db.models import Count, Q
from rucio.common.exception import CannotAuthenticate, DataIdentifierNotFound, RucioException


from .models import StepExecution, InputRequestList, TRequest, Ttrfconfig, ProductionTask, ProductionDataset, \
    ParentToChildRequest, TTask

_logger = logging.getLogger('prodtaskwebui')


@csrf_protect
def tag_info(request, tag_name):
    if request.method == 'GET':
        results = {'success':False}
        try:
            trtf = Ttrfconfig.objects.all().filter(tag=tag_name[0], cid=int(tag_name[1:]))
            if trtf:
                results.update({'success':True,'name':tag_name,'output':trtf[0].formats,'transformation':trtf[0].trf,
                                'input':trtf[0].input,'step':trtf[0].step})
        except Exception,e:
            pass
        return HttpResponse(json.dumps(results), content_type='application/json')


def check_waiting_steps():
<commit_msg>fix steps modification<commit_after>import json
import logging

from django.http import HttpResponse, HttpResponseRedirect

from django.views.decorators.csrf import csrf_protect
from time import sleep
from django.utils import timezone
from copy import deepcopy

from atlas.getdatasets.models import TaskProdSys1
from atlas.prodtask.ddm_api import tid_from_container, dataset_events_ddm, DDM
#from atlas.prodtask.googlespd import GSP
from atlas.prodtask.models import RequestStatus, WaitingStep
#from ..prodtask.spdstodb import fill_template
from atlas.prodtask.spdstodb import fill_template
from atlas.prodtask.views import set_request_status, clone_slices
from ..prodtask.helper import form_request_log
from ddm_api import dataset_events
#from ..prodtask.task_actions import do_action
from .views import form_existed_step_list, form_step_in_page, fill_dataset, make_child_update
from django.db.models import Count, Q
from rucio.common.exception import CannotAuthenticate, DataIdentifierNotFound, RucioException


from .models import StepExecution, InputRequestList, TRequest, Ttrfconfig, ProductionTask, ProductionDataset, \
    ParentToChildRequest, TTask

_logger = logging.getLogger('prodtaskwebui')


@csrf_protect
def tag_info(request, tag_name):
    if request.method == 'GET':
        results = {'success':False}
        try:
            trtf = Ttrfconfig.objects.all().filter(tag=tag_name[0], cid=int(tag_name[1:]))
            if trtf:
                results.update({'success':True,'name':tag_name,'output':trtf[0].formats,'transformation':trtf[0].trf,
                                'input':trtf[0].input,'step':trtf[0].step})
        except Exception,e:
            pass
        return HttpResponse(json.dumps(results), content_type='application/json')


def check_waiting_steps():

{'fraction_non_alphanumeric': 0.08717803566374187, 'fraction_numerical': 0.003962637984715539, 'mean_word_length': 4.746341463414634, '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': '1539379', 'n_tokens_mistral': 1065, 'n_tokens_neox': 1064, 'n_words': 248}