LSSTApplications  20.0.0
LSSTDataManagementBasePackage
Classes | Functions
lsst.pipe.tasks.ingest Namespace Reference

Classes

class  IngestArgumentParser
 
class  IngestConfig
 
class  IngestError
 
class  IngestTask
 
class  ParseConfig
 
class  ParseTask
 
class  RegisterConfig
 
class  RegisterTask
 
class  RegistryContext
 

Functions

def fakeContext ()
 
def assertCanCopy (fromPath, toPath)
 

Function Documentation

◆ assertCanCopy()

def lsst.pipe.tasks.ingest.assertCanCopy (   fromPath,
  toPath 
)
Can I copy a file?  Raise an exception is space constraints not met.

@param fromPath    Path from which the file is being copied
@param toPath      Path to which the file is being copied

Definition at line 624 of file ingest.py.

624 def assertCanCopy(fromPath, toPath):
625  """Can I copy a file? Raise an exception is space constraints not met.
626 
627  @param fromPath Path from which the file is being copied
628  @param toPath Path to which the file is being copied
629  """
630  req = os.stat(fromPath).st_size
631  st = os.statvfs(os.path.dirname(toPath))
632  avail = st.f_bavail * st.f_frsize
633  if avail < req:
634  raise RuntimeError("Insufficient space: %d vs %d" % (req, avail))

◆ fakeContext()

def lsst.pipe.tasks.ingest.fakeContext ( )
A context manager that doesn't provide any context

Useful for dry runs where we don't want to actually do anything real.

Definition at line 246 of file ingest.py.

246 def fakeContext():
247  """A context manager that doesn't provide any context
248 
249  Useful for dry runs where we don't want to actually do anything real.
250  """
251  yield
252 
253 
lsst.pipe.tasks.ingest.fakeContext
def fakeContext()
Definition: ingest.py:246
lsst.pipe.tasks.ingest.assertCanCopy
def assertCanCopy(fromPath, toPath)
Definition: ingest.py:624