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

Classes

class  IngestArgumentParser
 
class  IngestConfig
 
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 557 of file ingest.py.

557 def assertCanCopy(fromPath, toPath):
558  """Can I copy a file? Raise an exception is space constraints not met.
559 
560  @param fromPath Path from which the file is being copied
561  @param toPath Path to which the file is being copied
562  """
563  req = os.stat(fromPath).st_size
564  st = os.statvfs(os.path.dirname(toPath))
565  avail = st.f_bavail * st.f_frsize
566  if avail < req:
567  raise RuntimeError("Insufficient space: %d vs %d" % (req, avail))
568 
def assertCanCopy(fromPath, toPath)
Definition: ingest.py:557

◆ 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 271 of file ingest.py.

271 def fakeContext():
272  """A context manager that doesn't provide any context
273 
274  Useful for dry runs where we don't want to actually do anything real.
275  """
276  yield
277 
278