Skip to content

Commit

Permalink
1.2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
erdogant committed May 30, 2022
1 parent a9157c4 commit 9ac5140
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion undouble/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

__author__ = 'Erdogan Tasksen'
__email__ = 'erdogant@gmail.com'
__version__ = '1.2.4'
__version__ = '1.2.5'

# module level doc-string
__doc__ = """
Expand Down
2 changes: 1 addition & 1 deletion undouble/examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
# Plot hash
# model.plot_hash([4])

model.clean_files()
model.clean_files(clean_tempdir=True)

# %%
# Import library
Expand Down
7 changes: 6 additions & 1 deletion undouble/undouble.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ def clean_init(self, params=True, results=True):
# Store results
# self.results = {'img':None, 'feat':None, 'xycoord':None, 'pathnames':None, 'labels': None}

def clean_files(self):
def clean_files(self, clean_tempdir=False):
"""Remove the entire temp directory with all its contents."""
# Cleaning temp directory

Expand All @@ -360,6 +360,11 @@ def clean_files(self):
os.remove(self.results['pathnames'][i])
self.results['filenames'][i]=None
self.results['pathnames'][i]=None
if clean_tempdir:
logger.info('Removing the entire temp directory %s', self.clustimage.params['tempdir'])
shutil.rmtree(self.clustimage.params['tempdir'])
self.results['filenames'] = None
self.results['pathnames'] = None

def import_example(self, data='flowers', url=None):
"""Import example dataset from github source.
Expand Down

0 comments on commit 9ac5140

Please sign in to comment.