Analysis Software
Documentation for sPHENIX simulation software
|
Classes | |
class | ClientLoginError |
class | AbstractRpcServer |
class | HttpRpcServer |
elif e.code >= 500 and e.code < 600: Server Error - try again.More... | |
class | VersionControlSystem |
class | SubversionVCS |
class | GitVCS |
class | MercurialVCS |
Functions | |
def | GetEmail |
def | StatusUpdate |
def | ErrorExit |
def | GetRpcServer |
def | EncodeMultipartFormData |
def | GetContentType |
def | RunShellWithReturnCode |
def | RunShell |
def | SplitPatch |
def | UploadSeparatePatches |
def | GuessVCS |
def | RealMain |
def | main |
Variables | |
int | verbosity 1 |
int | MAX_UPLOAD_SIZE 900 |
tuple | parser optparse.OptionParser(usage="%prog [options] [-- diff_options]") |
string | dest "assume_yes" |
string | help "Assume that the answer to yes/no questions is 'yes'." |
tuple | group parser.add_option_group("Logging options") |
string | default "codereview.appspot.com" |
string | metavar "SERVER" |
tuple | use_shell sys.platform.startswith("win") |
def upload.EncodeMultipartFormData | ( | fields, | |
files | |||
) |
Encode form fields for multipart/form-data. Args: fields: A sequence of (name, value) elements for regular form fields. files: A sequence of (name, filename, value) elements for data to be uploaded as files. Returns: (content_type, body) ready for httplib.HTTP instance. Source: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/146306
Definition at line 498 of file upload.py.
View newest version in sPHENIX GitHub at line 498 of file upload.py
References GetContentType().
Referenced by upload.HttpRpcServer._GetOpener(), upload.MercurialVCS.GetBaseFile(), RealMain(), upload.VersionControlSystem.UploadBaseFiles(), and UploadSeparatePatches().
def upload.ErrorExit | ( | msg | ) |
Print an error message to stderr and exit.
Definition at line 109 of file upload.py.
View newest version in sPHENIX GitHub at line 109 of file upload.py
Referenced by upload.SubversionVCS.__init__(), upload.HttpRpcServer._GetOpener(), upload.SubversionVCS._GuessBase(), upload.VersionControlSystem.CheckForUnknownFiles(), upload.SubversionVCS.GenerateDiff(), upload.GitVCS.GenerateDiff(), upload.MercurialVCS.GenerateDiff(), upload.GitVCS.GetBaseFile(), upload.MercurialVCS.GetBaseFile(), upload.SubversionVCS.GetStatus(), GuessVCS(), RealMain(), and RunShell().
def upload.GetContentType | ( | filename | ) |
Helper to guess the content-type from the filename.
Definition at line 533 of file upload.py.
View newest version in sPHENIX GitHub at line 533 of file upload.py
Referenced by upload.HttpRpcServer._GetOpener(), and EncodeMultipartFormData().
def upload.GetEmail | ( | prompt | ) |
Prompts the user for their email address and returns it. The last used email address is saved to a file and offered up as a suggestion to the user. If the user presses enter without typing in anything the last used email address is used. If the user enters a new address, it is saved for next time we prompt.
Definition at line 65 of file upload.py.
View newest version in sPHENIX GitHub at line 65 of file upload.py
References Acts.open.
Referenced by upload.HttpRpcServer._GetOpener(), and GetRpcServer().
def upload.GetRpcServer | ( | options | ) |
Returns an instance of an AbstractRpcServer. Returns: A new AbstractRpcServer, on which RPC calls can be made.
Definition at line 458 of file upload.py.
View newest version in sPHENIX GitHub at line 458 of file upload.py
References GetEmail(), and test_detectors.lower.
Referenced by upload.HttpRpcServer._GetOpener(), upload.MercurialVCS.GetBaseFile(), and RealMain().
def upload.GuessVCS | ( | options | ) |
Helper to guess the version control system. This examines the current directory, guesses which VersionControlSystem we're using, and returns an instance of the appropriate class. Exit with an error if we can't figure it out. Returns: A VersionControlSystem instance. Exits if the VCS can't be guessed.
Definition at line 1209 of file upload.py.
View newest version in sPHENIX GitHub at line 1209 of file upload.py
References ErrorExit(), and RunShellWithReturnCode().
Referenced by upload.MercurialVCS.GetBaseFile(), and RealMain().
def upload.main | ( | void | ) |
Definition at line 1377 of file upload.py.
View newest version in sPHENIX GitHub at line 1377 of file upload.py
References RealMain(), and StatusUpdate().
Referenced by upload.MercurialVCS.GetBaseFile().
def upload.RealMain | ( | argv, | |
data = None |
|||
) |
The real main function. Args: argv: Command line arguments. data: Diff contents. If None (default) the diff is generated by the VersionControlSystem implementation returned by GuessVCS(). Returns: A 2-tuple (issue id, patchset id). The patchset id is None if the base files are not uploaded by this script (applies only to SVN checkouts).
Definition at line 1250 of file upload.py.
View newest version in sPHENIX GitHub at line 1250 of file upload.py
References test_fpe.count, EncodeMultipartFormData(), ErrorExit(), GetRpcServer(), GuessVCS(), Acts.open, StatusUpdate(), str, and UploadSeparatePatches().
Referenced by upload.MercurialVCS.GetBaseFile(), and main().
def upload.RunShell | ( | command, | |
silent_ok = False , |
|||
universal_newlines = True , |
|||
print_output = False |
|||
) |
Definition at line 578 of file upload.py.
View newest version in sPHENIX GitHub at line 578 of file upload.py
References ErrorExit(), and RunShellWithReturnCode().
Referenced by upload.MercurialVCS.__init__(), upload.HttpRpcServer._GetOpener(), upload.SubversionVCS._GuessBase(), upload.SubversionVCS.GenerateDiff(), upload.GitVCS.GenerateDiff(), upload.MercurialVCS.GenerateDiff(), upload.SubversionVCS.GetBaseFile(), upload.MercurialVCS.GetBaseFile(), upload.SubversionVCS.GetStatus(), upload.SubversionVCS.GetUnknownFiles(), upload.GitVCS.GetUnknownFiles(), upload.MercurialVCS.GetUnknownFiles(), and RunShellWithReturnCode().
def upload.RunShellWithReturnCode | ( | command, | |
print_output = False , |
|||
universal_newlines = True |
|||
) |
Executes a command and returns the output from stdout and the return code. Args: command: Command to execute. print_output: If True, the output is printed to stdout. If False, both stdout and stderr are ignored. universal_newlines: Use universal_newlines flag (default: True). Returns: Tuple (output, return code)
Definition at line 542 of file upload.py.
View newest version in sPHENIX GitHub at line 542 of file upload.py
References join(), and RunShell().
Referenced by upload.HttpRpcServer._GetOpener(), upload.SubversionVCS.GetBaseFile(), upload.GitVCS.GetBaseFile(), upload.MercurialVCS.GetBaseFile(), upload.SubversionVCS.GetStatus(), GuessVCS(), and RunShell().
def upload.SplitPatch | ( | data | ) |
Splits a patch into separate pieces for each file. Args: data: A string containing the output of svn diff. Returns: A list of 2-tuple (filename, text) where text is the svn diff output pertaining to filename.
Definition at line 1141 of file upload.py.
View newest version in sPHENIX GitHub at line 1141 of file upload.py
References join().
Referenced by upload.MercurialVCS.GetBaseFile(), and UploadSeparatePatches().
def upload.StatusUpdate | ( | msg | ) |
Print a status message to stdout. If 'verbosity' is greater than 0, print the message. Args: msg: The string to print.
Definition at line 97 of file upload.py.
View newest version in sPHENIX GitHub at line 97 of file upload.py
Referenced by upload.HttpRpcServer._Authenticate(), upload.HttpRpcServer._GetOpener(), upload.SubversionVCS.GetBaseFile(), upload.MercurialVCS.GetBaseFile(), main(), RealMain(), upload.VersionControlSystem.UploadBaseFiles(), and UploadSeparatePatches().
def upload.UploadSeparatePatches | ( | issue, | |
rpc_server, | |||
patchset, | |||
data, | |||
options | |||
) |
Uploads a separate patch for each file in the diff output. Returns a list of [patch_key, filename] for each file.
Definition at line 1181 of file upload.py.
View newest version in sPHENIX GitHub at line 1181 of file upload.py
References EncodeMultipartFormData(), SplitPatch(), and StatusUpdate().
Referenced by upload.MercurialVCS.GetBaseFile(), and RealMain().
string upload.default "codereview.appspot.com" |
string upload.dest "assume_yes" |
Definition at line 394 of file upload.py.
View newest version in sPHENIX GitHub at line 394 of file upload.py
Referenced by compareForthBackJacNoise(), Fun4AllDstPileupMerger.copy_background_event(), Acts::detail_lt::TrackStateProxy< trajectory_t, M, ReadOnly >.copyFrom(), Acts.decorateJson< Acts::ISurfaceMaterial >(), Acts.decorateJson< Acts::IVolumeMaterial >(), Acts.decorateJson< Acts::SurfaceAndMaterialWithContext >(), Acts.decorateJson< Acts::TrackingVolumeAndMaterial >(), genfit::RKTrackRep.extrapolateBy(), genfit::RKTrackRep.extrapolateToCone(), genfit::RKTrackRep.extrapolateToCylinder(), genfit::RKTrackRep.extrapolateToSphere(), dijkstra.fill_edge_list(), dijkstra.fill_node_list(), G__DirectPhotonPythia_Dict_523_0_21(), G__ExampleAnalysisModule_Dict_577_0_11(), G__ExampleAnalysisModule_Dict_578_0_17(), G__ExampleAnalysisModule_Dict_579_0_18(), G__hcalUtilDict_478_0_14(), G__RecoInfoExport_Dict_244_0_14(), Jetscape::LogStreamer.LogStreamer(), Jetscape::LogStreamerThread.LogStreamerThread(), mg_handle_move(), testing::internal::FilePath.Normalize(), dijkstra.shortest_path_edges_begin(), dijkstra.shortest_path_edges_end(), dijkstra.shortest_path_nodes_begin(), and dijkstra.shortest_path_nodes_end().
Definition at line 397 of file upload.py.
View newest version in sPHENIX GitHub at line 397 of file upload.py
Referenced by AlignmentDefs.getInttGlobalLabels(), AlignmentDefs.getMMGlobalLabels(), AlignmentDefs.getMvtxGlobalLabels(), AlignmentDefs.getTpcGlobalLabels(), and main().
string upload.help "Assume that the answer to yes/no questions is 'yes'." |
int upload.MAX_UPLOAD_SIZE 900 |
string upload.metavar "SERVER" |
tuple upload.use_shell sys.platform.startswith("win") |