Skip to content

Commit

Permalink
Merge branch 'devel'
Browse files Browse the repository at this point in the history
  • Loading branch information
rhandberg committed Dec 10, 2020
2 parents 2e2e8c6 + b81b722 commit 8f7bd73
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
master-v1.3.1
master-v1.3.2
18 changes: 15 additions & 3 deletions run_package_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from tqdm import tqdm
from dataval import __version__
from dataval.utilities import TqdmLoggingHandler, CounterFilter
from dataval.release import fix_file
from dataval.release import fix_file, regex_fileend

#--------------------------------------------------------------------------------------------------
def main():
Expand Down Expand Up @@ -140,13 +140,25 @@ def main():
input_folder = os.path.dirname(input_file)

# Do a simple check that all the files exists:
logger.info("Checking file existance...")
logger.info("Checking file existence...")
file_check_problem = False
for row in tqdm(files_to_release, **tqdm_settings):
fname = os.path.join(input_folder, row['lightcurve'])
fname_original = regex_fileend.sub('.original.fits.gz', fname)
if not os.path.isfile(fname):
logger.error("File not found: %s", fname)
return 2
file_check_problem = True
elif os.path.getsize(fname) <= 0:
logger.error("File has zero size: %s", fname)
file_check_problem = True
if os.path.exists(fname_original):
logger.error("ORIGINAL file exists: %s", fname_original)
file_check_problem = True

if file_check_problem:
return 2

# Create wrapper function for multiprocessing, with all keywords defined:
fix_file_wrapper = functools.partial(fix_file,
input_folder=input_folder,
check_corrector=corrector[:3], # NOTE: Ensemble is only "ens" in filenames
Expand Down

0 comments on commit 8f7bd73

Please sign in to comment.