d3py icon indicating copy to clipboard operation
d3py copied to clipboard

_clanup() - what is it purpose?

Open kern3020 opened this issue 11 years ago • 3 comments

Hello,

There is a method stub called _clanup() in the Figure class which simply raises NotImplementedError. What is the purpose of it?

-jk

kern3020 avatar Mar 22 '13 21:03 kern3020

Cleanup is a function that is called on __exit__ or __del__ for any cleanup necessary. This could be to delete files if we are using the local FS for temporary storage, to clean up any threads we had going or anything else you could want. For example, in the default figure it shuts down the HTTP server and cleans up the threads so that the port is no longer in use: https://github.com/mikedewar/d3py/blob/master/d3py/figure.py#L259

mynameisfiber avatar Mar 31 '13 01:03 mynameisfiber

Hello Micha,

Yes, I see how exit and del call _cleanup but notice it isn't a typo in the title of this bug report. Consider the _clanup() method on line 85 ttps://github.com/mikedewar/d3py/blob/master/d3py/figure.py#L85 I do not believe it is called. Did I miss something?

-jk

kern3020 avatar Mar 31 '13 01:03 kern3020

Took the liberty of removing this method in my next pull request.

kern3020 avatar Apr 11 '13 03:04 kern3020