original_docstring: Copies all code to the code directory of the run.
docstring: Copies all code to the code directory of the run.
docstring_tokens: Copies all code to the code directory of the run .
code: def _copy_code(cls):
          """Copies all code to the code directory of the run."""
  
          src = cls.code_root
          dst = "./" + cls.code
  
          try:
              filtered_dirs = ["__pycache__"]
  
              def ignore(directory, files):
                  filtered = []
                  for f in files:
                      full_path = os.path.join(directory, f)
                      is_cool = False
                      if f[-3:] == ".py":
                          is_cool = True
                      elif f[-5:] == ".yaml":
                          is_cool = True
                      elif os.path.isdir(full_path):
                          if not (f.startswith(".") or f in filtered_dirs):
                              is_cool = True
  
                      if not is_cool:
                          filtered += [f]
  
                  return filtered
  
              shutil.copytree(src, dst, symlinks=False, ignore=ignore)
  
          except shutil.Error as err:
              cls.logger.warning(err)
code_tokens: def _copy_code ( cls ) : src = cls . code_root dst = "./" + cls . code try : filtered_dirs = [ "__pycache__" ] def ignore ( directory , files ) : filtered = [ ] for f in files : full_path = os . path . join ( directory , f ) is_cool = False if f [ - 3 : ] == ".py" : is_cool = True elif f [ - 5 : ] == ".yaml" : is_cool = True elif os . path . isdir ( full_path ) : if not ( f . startswith ( "." ) or f in filtered_dirs ) : is_cool = True if not is_cool : filtered += [ f ] return filtered shutil . copytree ( src , dst , symlinks = False , ignore = ignore ) except shutil . Error as err : cls . logger . warning ( err )
short_docstring: Copies all code to the code directory of the run.
short_docstring_tokens: Copies all code to the code directory of the run .
comment: """Copies all code to the code directory of the run."""