<commit_before>#!/usr/bin/env python
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
#
# Authors:
# - <NAME>, <EMAIL>, 2017
# - <NAME>, <EMAIL>, 2018

import os

from pilot.common.exception import StageInFailure, StageOutFailure, ErrorCodes
from pilot.util.container import execute

import logging
logger = logging.getLogger(__name__)

require_replicas = False  ## indicate if given copytool requires input replicas to be resolved


def is_valid_for_copy_in(files):
    for f in files:
        if not all(key in f for key in ('name', 'source', 'destination')):
            return False
    return True


def is_valid_for_copy_out(files):
    for f in files:
        if not all(key in f for key in ('name', 'source', 'destination')):
            return False
    return True


def copy_in(files, copy_type="mv", **kwargs):
    """
    Tries to download the given files using mv directly.

    :param files: list of `FileSpec` objects
    :raises PilotException: StageInFailure
    """

    if copy_type not in ["cp", "mv", "symlink"]:
        raise StageInFailure("Incorrect method for copy in")
    exit_code, stdout, stderr = move_all_files(files, copy_type, kwargs=kwargs)
    if exit_code != 0:
        # raise failure
        raise StageInFailure(stdout)


def copy_out(files, copy_type="mv", **kwargs):<commit_msg>skip validation (like other movers)<commit_after>#!/usr/bin/env python
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
#
# Authors:
# - <NAME>, <EMAIL>, 2017
# - <NAME>, <EMAIL>, 2018

import os

from pilot.common.exception import StageInFailure, StageOutFailure, ErrorCodes
from pilot.util.container import execute

import logging
logger = logging.getLogger(__name__)

require_replicas = False  ## indicate if given copytool requires input replicas to be resolved


def is_valid_for_copy_in(files):
    return True  ## FIX ME LATER
    #for f in files:
    #    if not all(key in f for key in ('name', 'source', 'destination')):
    #        return False
    #return True


def is_valid_for_copy_out(files):
    return True ## FIX ME LATER
    #for f in files:
    #    if not all(key in f for key in ('name', 'source', 'destination')):
    #        return False
    #return True


def copy_in(files, copy_type="mv", **kwargs):
    """
    Tries to download the given files using mv directly.

    :param files: list of `FileSpec` objects
    :raises PilotException: StageInFailure
    """

    if copy_type not in ["cp", "mv", "symlink"]:
        raise StageInFailure("Incorrect method for copy in")
    exit_code, stdout, stderr = move_all_files(files, copy_type, kwargs=kwargs)
    if exit_code != 0:
        # raise failure
        raise StageInFailure(stdout)


def copy_out(files, copy_type="mv", **kwargs):
{'fraction_non_alphanumeric': 0.10659733506662333, 'fraction_numerical': 0.008449788755281119, 'mean_word_length': 3.526470588235294, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '727922', 'n_tokens_mistral': 961, 'n_tokens_neox': 923, 'n_words': 337}