mathlibtools/lib.py
def mk_cache(self, force: bool = False) -> None:
        """Cache oleans for this project."""
        if not self.rev:
            raise ValueError('This project has no git commit.')
        if not self.repo:
            raise LeanProjectError('This project has no git repository.')
        rev = self.rev
        if self.is_dirty:
            raise LeanProjectError('Unable to make a cache for a dirty '
                'repository. Commit or stash first.')
        tgt_folder = DOT_MATHLIB if self.is_mathlib else self.directory/'_cache'
        tgt_folder.mkdir(exist_ok=True)
        archive = tgt_folder/(str(self.rev) + '.tar.xz')
        if archive.exists() and not force:
            log.info('Cache for revision {} already exists, use --force to replace it.'.format(self.rev))
            return
        pack(self.directory, filter(Path.exists, [self.src_directory, self.directory/'test']),
             archive)
Cache oleans for this project.
Cache oleans for this project.
Cache oleans for this project .
def mk_cache(self, force: bool = False) -> None:
        if not self.rev:
            raise ValueError('This project has no git commit.')
        if not self.repo:
            raise LeanProjectError('This project has no git repository.')
        rev = self.rev
        if self.is_dirty:
            raise LeanProjectError('Unable to make a cache for a dirty '
                'repository. Commit or stash first.')
        tgt_folder = DOT_MATHLIB if self.is_mathlib else self.directory/'_cache'
        tgt_folder.mkdir(exist_ok=True)
        archive = tgt_folder/(str(self.rev) + '.tar.xz')
        if archive.exists() and not force:
            log.info('Cache for revision {} already exists, use --force to replace it.'.format(self.rev))
            return
        pack(self.directory, filter(Path.exists, [self.src_directory, self.directory/'test']),
             archive)
def mk_cache ( self , force : bool = False ) -> None : if not self . rev : raise ValueError ( 'This project has no git commit.' ) if not self . repo : raise LeanProjectError ( 'This project has no git repository.' ) rev = self . rev if self . is_dirty : raise LeanProjectError ( 'Unable to make a cache for a dirty ' 'repository. Commit or stash first.' ) tgt_folder = DOT_MATHLIB if self . is_mathlib else self . directory / '_cache' tgt_folder . mkdir ( exist_ok = True ) archive = tgt_folder / ( str ( self . rev ) + '.tar.xz' ) if archive . exists ( ) and not force : log . info ( 'Cache for revision {} already exists, use --force to replace it.' . format ( self . rev ) ) return pack ( self . directory , filter ( Path . exists , [ self . src_directory , self . directory / 'test' ] ) , archive )
Cache oleans for this project.
Cache oleans for this project .
"""Cache oleans for this project."""
self
force
bool