ACT icon indicating copy to clipboard operation
ACT copied to clipboard

Utility function to handle tar files

Open kenkehoe opened this issue 2 years ago • 3 comments

There are times when the data files are delivered in a TAR file. The DQ Office have some utilities for handling TAR data files, including creation of a temporary directory and clean up after the extracted files are used. Would be good to add these utility functions to ACT for others to utilize.

kenkehoe avatar Oct 18 '22 21:10 kenkehoe

I agree! I know In Py-ART we have functionality for this, let me see if I can dig it up.

zssherman avatar Oct 18 '22 21:10 zssherman

@kenkehoe do you think we would put this in the read functions so that if it's a .tar or .tar.gz file, it would call this utility to untar them into a temp directory, read in and then clean up?

AdamTheisen avatar Oct 19 '22 12:10 AdamTheisen

OK I'll put in read functions. Good idea.

kenkehoe avatar Oct 19 '22 15:10 kenkehoe

In the current PR I have utility functions for creation of TAR and gunzip files, extraction of TAR and gunzip, cleanup of extracted TAR directory and implemented into general reading routine. I assume the functions all exist in Mac, Linux, Windows but we will see with testing.

kenkehoe avatar Nov 03 '22 15:11 kenkehoe

Looks to be an issue with a temporary directory call within a temporary directory call.

kenkehoe avatar Nov 03 '22 18:11 kenkehoe