How to use the paperwork-backend.paperwork_backend.util.rm_rf function in paperwork-backend

To help you get started, we’ve selected a few paperwork-backend examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github openpaperwork / paperwork / paperwork-backend / paperwork_backend / labels.py View on Github external
def forget(self, label_name):
        """
        Forget training for label 'label_name'
        """
        self._bayes.pop(label_name)
        baye_dir = self._get_baye_dir(label_name)
        logger.info("Deleting label training {} : {}".format(
            label_name, baye_dir
        ))
        rm_rf(baye_dir)
github openpaperwork / paperwork / paperwork-backend / paperwork_backend / index.py View on Github external
def destroy_index(self):
        """
        Destroy the index. Don't use this Index object anymore after this
        call. Index will have to be rebuilt from scratch
        """
        self.close()
        logger.info("Destroying the index ...")
        rm_rf(self.indexdir)
        rm_rf(self.label_guesser_dir)
        logger.info("Done")
github openpaperwork / paperwork / paperwork-backend / paperwork_backend / index.py View on Github external
def destroy_index(self):
        """
        Destroy the index. Don't use this Index object anymore after this
        call. Index will have to be rebuilt from scratch
        """
        self.close()
        logger.info("Destroying the index ...")
        rm_rf(self.indexdir)
        rm_rf(self.label_guesser_dir)
        logger.info("Done")