Skip to content

Commit 63f063a

Browse files
authored
Latest patch release (#473)
* save daily obsdb in the right place * rename ec2.tf to calcserver.tf * quieten some s3 transfers * rename ec2.tf in my acct to ukmonhelper_ec2.tf to make it clearer what it is * update SSM params to reflect new serverid * bugfix in distributeCandidates - using wrong path * add newline to getCostMetrics * weird bug in statsToMqtt * bugfix in update_wmpl.sh for traj container * Script to create an AMI for the calcengine * exclude test data when syncing from s3 * writing databases and logs to the wrong target * bad test on istest * typo in serveruserid * adding to server migration notes * purge old rawcsvs and fullcsvs older than 180 days * improved housekeeping of old data * make sure we scoop up data for 31/12 * stop creation of an unused set of files * change default locations for container data * put container logs in the right place * update dockerfile syntax * change locations of test container data and output * remove incorrect comments * Add script to clean up deleted/duplicate trajs * simplify the stats gathering and move to python fix bug in getMatchStats * comment out unused files * update reportOfLatestMatches to exclude deleted trajectories * add scp to requirements * add SQL database maintenance to dataMaintenance * incorrect default for datadir * update call to pymysql.connect * ensure consolidateOutput rerunnable for prior years * upgrading WMPL * update gitignore a bit * bugfix to catch data from 31/12 each year * add paramiko to dependencies for matchPickle to support wmpl upgrade * update getpickle to newest WMPL * bugfix in api tests * bugfix - changes to dailydb not saved * improvements to process to cleanup deleted trajs * after merging, check and remove any duplicate trajectories from the sqlite db and disk * Adding version * bump version 2025.11.1 -> 2026.04.0 * update files containing vesion * bump version 2026.04.0 -> 2026.04.1 * unmangling side effets of automerge * correct usage message * decommission old calcserver and add new batchserver * add calcserver IP to ssm variables and use it in scripts * Update my branch with the latest from master (#436) * Update version (#433) * remove disused code * update livestream to accept normal RMS filenames * search dialog - fix bug and set default date range * small change to explain default dates * improvement in live image search * remove redundant file * update deployment scripts * improvements in routine to convert GMN report to pandas * more analysis of gmn data * Update the terraform a little * remove hardcoded reference to ec2-user * add SERVERUSERID env /ssm variable for calcserver user id * update container for new distrib-processing method * use calcserver SERVERUSERID variable * support for test ECS containers * fix paths in deployment scripts * remove unused file * missed some templates * update dev/test env settings * remove disused file * make sure paths are expanded * fixing various config issues * updates to makeConfig * updates to distributed processing to align with newest wmpl * add a comment to explain what the code does * remove json db * update consolidation to handle sqlite dbs * remove unused function * create data for daily report * remove unused file * update to call new version of reportOfLatestMatches * add test variables * mildly improve doco * put test logs in the right CW log group * handle missing log groups better * extra value in TrajQualityParams * bugfixes revealed in testing * fix issues in reportOfLatestMatches * put container dbs in a sensible place * catch logging errors * tidy up file locations * simplify calcserver start up * sorting out errors in container logging * update container logging info * avoid unnecessary error * fix bugs in log capture process * add MAX_STNS so i can experiement with limits * add logging. Add max_stns to constraints and set to 9999 push logs to s3 copy calcserver logs to ukmonhelper * don't pull or push the databases from S3 during distribution but do back them up after consolidation * catch error if trajpickle can't be found * set rundate more safely move some processes into nightlyJob to make testing easier * tidy up backup file names and housekeep backup folder * move some processes from findAllMatches to nightlyJob to make testing easier * support for testing of createExecReplot * pass testmode to createExecReplot * ensure logs are unique and capture container logs * realigning createFireballPage with prod. Updating gitignore * remove verbosity flag from one tar operation * fixup to handle new style log with datestamps * get privip after restarting calcserver * temporarily don't run rerunFailedLambdas in test * update to work in a test env too * add 'period' to the match summary api * add period to match summary api * re-enabling rerunFailedLambdas * quieten an S3 transfer * include the foldername when reporting on container progress * put daily trajdb in a safe place * be more specific when finding the daily log * only tar the current container logs * save daily obsdb in the right place * rename ec2.tf to calcserver.tf * quieten some s3 transfers * rename ec2.tf in my acct to ukmonhelper_ec2.tf to make it clearer what it is * update SSM params to reflect new serverid * bugfix in distributeCandidates - using wrong path * add newline to getCostMetrics * weird bug in statsToMqtt * bugfix in update_wmpl.sh for traj container * Script to create an AMI for the calcengine * exclude test data when syncing from s3 * writing databases and logs to the wrong target * bad test on istest * typo in serveruserid * adding to server migration notes * purge old rawcsvs and fullcsvs older than 180 days * improved housekeeping of old data * make sure we scoop up data for 31/12 * stop creation of an unused set of files * change default locations for container data * put container logs in the right place * update dockerfile syntax * change locations of test container data and output * remove incorrect comments * Add script to clean up deleted/duplicate trajs * simplify the stats gathering and move to python fix bug in getMatchStats * comment out unused files * update reportOfLatestMatches to exclude deleted trajectories * add scp to requirements * add SQL database maintenance to dataMaintenance * incorrect default for datadir * update call to pymysql.connect * ensure consolidateOutput rerunnable for prior years * upgrading WMPL * update gitignore a bit * bugfix to catch data from 31/12 each year * add paramiko to dependencies for matchPickle to support wmpl upgrade * update getpickle to newest WMPL * bugfix in api tests * bugfix - changes to dailydb not saved * improvements to process to cleanup deleted trajs * after merging, check and remove any duplicate trajectories from the sqlite db and disk * Adding version * bump version 2025.11.1 -> 2026.04.0 * update files containing vesion * bump version 2026.04.0 -> 2026.04.1 * unmangling side effets of automerge * correct usage message * adding install script * changes to ansible scripts * remove irrelevant file * Adding SSM variables for the new batchserver in the ukmda account * attempt to add logging to consolidateDistTraj * remove reference to ee account * temporarily add mariadb deets to ssm in mjmm account * bugfixes in dataMaintenance and cleanupDeletedTrajs to avoid deleting disk files when trajs share same folder * updating migration instructions * more work on deduplication for ukmon * remove username-specific stuff * remove the old deployment scripts * update install script * updates to improve server migration process * add bashrc to the installer * slight tweak to installer * add a few installer messages * remove an echo * be less verbose in the rsyncs * oops need -a for one of the rsyncs * rename requirements file for ukmda * remove dependencies on MeteorTools * add utils to ukmon_pylib * more removal of dependencies on MeteorTools * updating how shower data is obtained * corercting location of IMO and gmn shower data * bugfixes * fixes in imoWorkinShowerlist * small error in install_or_update * bugfix when no data found in imo set * retrieve IMO data after each code update * fixing up getShowerDets * improve installer * fix createShowerExtracts * update extractors and showeranalysis * bug in extractor thats existed since 2023 but nobody noticed... * trying to fix matplotlib bug * more working on matplotlib issue * oops overfixed a bug * another incorrect bugfix! * make bars wider * more removal of MeteorTools * bugfix in createannualbarchart * working on bug * more work on lenght bug * remove some debugging * oops forgot to push the fixed version of createReportIndex * segregating function to get list of images that weren't calibrated by RMS * reorganize stuff a bit * add email sending functionality to ukmon_pylib * use send email functionality in code * add database and gmaps keys/passwords as secure variables * update to use secure keys * remove dbpw from environment * remove dbpw from environment * add script to retrieve db passwd * add script to retrieve db passwords * bug in createTables * updates to migration instructions * include pip installs in the script * tweak installer * remove glob.glob1 * move unused scripts - will delete later * fix mariadb connections * typo * tidy up docs * fixing mysql calls * small changes to documentation * suppress pip messages if already installed * tweaks to the installer * add logrotate stuff * bugfixes in installer * tidy up installer * bugfix in key mgmt * move some functionality into new script to tidy up nightly job and simplify rerunning * improve install script * update location of camera count file * move annual bar charts into a more logical location * update test script * add gmaps param to my acct * relocate coverage maps and front page index * tidy up useraudit process * bugfixes in testing * bugfix in createAnnualBarchart * bug in testscript * another small bug in createSummaryTable * still fighting that bug * tidy up lastlog data * remove unused file * update cam status reporting * clear down the old brightness data * simplification of logging and of the nightlyJob script * bugfixes in process to gather consumed image ifo * update getUncal to work for historic data * typo * improvements in getUncalImages * bugfix * add python to get unused images * move script to right place * comment out unnecessary echo * bugfixes in camMetrics while migrating user accts * fix #448 * make sure window title is sensible * bugfix in replot and get unused * bugfix in removeDeletedTraj for search index * remove deprecation warning issue #450 * whoops naive vs tzaware dates * remove warning in cameraStatusReport issue #453 * remove warning issue #454 * widen constraints on analysing pickles to get images * add migration script * add sudo * actually do it * update sftp migration script * more changes to migration script * moving sftp migration script * update messages and docos * slight tweak to migration script * further work on sftp account migration * update ukmon ini files after migration * typo * collect old server login records integration with new * update migration instructions * update cam metrics report to include hostname * bugfix as $USER not available in cron * removing unused files * some tidying up * motre reorg * remove disused template rename file to follow convention * simplifying logging and removing unused aws profile * removing profile from python * adding executable bit * typo * bugfix to work around typo * print message when done * bugfix to get trajectories from s3 before trying to check for missing trajectories... * improve to support running for past dates * errors in bashrc and logrotate config * prevent email being sent for anything other than current days report * bugfix: make sure we use the most recent stats * improvement in reportOfLatestMatches to handle past dates * bugfix * small tweak to support reportOfLatestMatches * tweak getMatchStats to handle historic data better * add mariadb and ping to the sec grp so that the database can be accessed by apis * update the db servername * bugfix in match stats * prevent bogus renaming of matchJob.log * bumping version * bump version 2026.04.1 -> 2026.05.0 * update matchapi to use indexed column * add api readme * tweak to cammetrics to enhance stationlogins report * slight tweak to formatting * minor tweak to avoid unexpectedly changing directory * add support script for during server migrations * skip 1st row * add check for todos * oops strip whitespace * darn whitespace * working on migration tasks * minor tweaks * daft typo * bump version 2026.05.0 -> 2026.05.1 * bump version 2026.05.1 -> 2026.05.2 * update CodeQL to v3 * bump codeQL to v4 * tweak to script supporting server migration * tweak to scripts supporting server migration * add some stats on migration status * tweak * get cursor keys working in python * set via even if no recent login * improved reporting on migration * tweaks to migr scripts * another small tweak * make lists unique * uniq and sort backwards * testing fix for #460 * more work on status reports * bugfix in failed matches report * found the bug * attempt to fix fails report * another tweak * okay, got it * remove debug * fix timing metrics data * small tweak * looks good * add EIP for the batchserver * bugfix to handle bad data in login details * add function to email problem cameras with bespoke message * bump version 2026.05.2 -> 2026.05.3
1 parent 91e6978 commit 63f063a

14 files changed

Lines changed: 132 additions & 182 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# UK Meteor Data Analysis Shared code and libraries
2-
version: 2026.05.2
2+
version: 2026.05.3
33

44
This repository contains the code behind the UK Meteors data archive and data processing pipeline.
55

archive/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Data Processing and Flows
22
==========================
33

4-
version: 2026.05.2
4+
version: 2026.05.3
55

66
This diagram shows the overall flow of data from Cameras to websites and out to the public.
77

archive/analysis/getLogData.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ echo "the entire night was uncalibrated (indicated by the 'skipping' warning).</
6262
echo "<p>To interpret these data, see " >> $logfile
6363
echo "<a href=https://github.com/markmac99/ukmon-pitools/wiki/UKMON-Pi-Toolset-FAQ#Interpreting_the_Uncalibrated_Report>here</a></p>" >> $logfile
6464
echo "<pre>" >> $logfile
65-
grep "Skipping" $lastmtch >> $logfile
65+
grep "Skipping" $lastmtch | egrep -v "directory|pickle" >> $logfile
6666
echo "</pre>" >> $logfile
6767

6868
echo "<h2 id=fails>Failed Match Report</h2>" >> $logfile
@@ -72,6 +72,7 @@ echo "<a href=https://github.com/markmac99/ukmon-pitools/wiki/Trajectory-Solver-
7272
echo "<pre>" >> $logfile
7373
cat $DATADIR/failed/${rundate}_failed.txt >> $logfile
7474
echo "</pre>" >> $logfile
75+
7576
echo "<h2 id=graph>Chart of Batch Element Runtimes</h2>" >> $logfile
7677
echo "<p>This section shows the runtime of the different jobs in the batch</p>" >> $logfile
7778
echo "<p><a href=/reports/batchcharts/$rundate-perfNightly.jpg><img src=/reports/batchcharts/$rundate-perfNightly.jpg width=300\%></a></p>" >> $logfile
@@ -93,4 +94,7 @@ done
9394
cat $TEMPLATES/footer.html >> $DATADIR/lastlogs/index.html
9495
aws s3 cp $DATADIR/lastlogs/index.html $WEBSITEBUCKET/reports/lastlogs/ --quiet
9596

97+
# housekeep the fails reports
98+
find $DATADIR/failed -mtime +90 -exec rm -f {} \;
99+
96100
find $DATADIR/lastlogs -name "lastlog*" -mtime +90 -exec rm -f {} \;

archive/server_setup/.bashrc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,12 @@ fi
5555
unset __conda_setup
5656
# <<< conda initialize <<<
5757

58+
# make the function keys work properly in python
59+
export TERM=putty
60+
5861
# If this is an xterm set the title to user@host:dir
5962
case "$TERM" in
60-
xterm*|rxvt*)
63+
xterm*|rxvt*|putty*)
6164
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
6265
;;
6366
*)

archive/server_setup/acctStatusChecks.sh

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,24 @@ here="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
44

55
cd $here
66

7-
sudo ls -1 /var/sftp > moved.txt
8-
grep batchs /home/ubuntu/prod/data/reports/stationlogins.txt |awk '{print $3}'| sort > switched.txt
9-
grep ukmonh /home/ubuntu/prod/data/reports/stationlogins.txt |awk '{print $3}'| sort > pending.txt
7+
sudo ls -1 /var/sftp | egrep -v "test|logup" > moved.txt
8+
grep batchs /home/ubuntu/prod/data/reports/stationlogins.txt | cut -c 42-61 | sed 's/ //g' | sort | uniq > switched.txt
9+
grep ukmonh /home/ubuntu/prod/data/reports/stationlogins.txt | cut -c 42-61 | sed 's/ //g' | sort | uniq > pending.txt
1010

1111
ssh ukmonhelper2 "~/prod/server_setup/get-nbd.sh" | while read i ; do echo $i | awk -F"/" '{print $4}' ; done > not-being-done.txt
1212
ssh ukmonhelper2 "~/prod/server_setup/get-all.sh" | while read i ; do echo $i | awk -F"/" '{print $4}' ; done > all-accounts.txt
1313

1414
python ~/src/ukmda-dataprocessing/archive/server_setup/checkSftpAccounts.py
1515

16-
echo "Moved: $(wc -l moved.txt | awk '{print $1}')"
17-
echo "Switched: $(wc -l switched.txt | awk '{print $1}')"
18-
echo "Pending: $(wc -l pending.txt | awk '{print $1}')"
19-
echo "Total: $(wc -l still-live.txt | awk '{print $1}')"
20-
echo ""
21-
echo "Not Live: $(wc -l not_live.txt | awk '{print $1}')"
22-
echo "Not Upl: $(wc -l not_uploading.txt | awk '{print $1}')"
23-
echo ""
24-
echo "Dead: $(wc -l not-being-done.txt | awk '{print $1}')"
25-
echo ""
16+
17+
echo "Moved: $(wc -l moved.txt | awk '{print $1}')" > statusreport.txt
18+
echo "Switched: $(wc -l switched.txt | awk '{print $1}')" >> statusreport.txt
19+
echo "Pending: $(wc -l pending.txt | awk '{print $1}')" >> statusreport.txt
20+
echo "Total: $(wc -l still-live.txt | awk '{print $1}')" >> statusreport.txt
21+
echo "" >> statusreport.txt
22+
echo "Not Live: $(wc -l not_live.txt | awk '{print $1}')" >> statusreport.txt
23+
echo "Not Upl: $(wc -l not_uploading.txt | awk '{print $1}')" >> statusreport.txt
24+
echo "" >> statusreport.txt
25+
echo "Dead: $(wc -l not-being-done.txt | awk '{print $1}')" >> statusreport.txt
26+
echo "" >> statusreport.txt
27+
cat statusreport.txt

archive/server_setup/checkSftpAccounts.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,14 @@
6262
for nam in livenames:
6363
if nam.strip() not in donelist:
6464
print('done list is missing', nam)
65-
outf.write(f'{nam}\n')
65+
outf.write(f'{nam}\n')
66+
67+
68+
moved = open('moved.txt').readlines()
69+
pending = open('pending.txt').readlines()
70+
switched = open('switched.txt').readlines()
71+
72+
pendingnotmoved = [x for x in pending if x not in moved]
73+
74+
print('stations marked pending but not moved - check if need done')
75+
print(pendingnotmoved)

archive/terraform/ukmda/batchserver.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,11 @@ resource "aws_network_interface" "batchserver_if" {
4545
"billingtag" = "ukmda"
4646
}
4747
}
48+
49+
resource "aws_eip" "batchserver" {
50+
instance = aws_instance.batchserver.id
51+
tags = {
52+
billingtag = "ukmda"
53+
Name = "ukmonhelper_eip"
54+
}
55+
}

archive/ukmon_pylib/metrics/camMetrics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,5 +216,5 @@ def backPopulate(stationid):
216216
for _,rw in df.iterrows():
217217
lastup = '> 1 month ago' if pd.isnull(rw.lastupload) else rw.lastupload.strftime('%Y-%m-%dT%H:%M:%S')
218218
lastlo = '> 1 month ago' if pd.isnull(rw.lastseen) else rw.lastseen.strftime('%Y-%m-%dT%H:%M:%S')
219-
via = '' if pd.isnull(rw.host) else rw.host
219+
via = 'ukmonhelper2' if pd.isnull(rw.host) else rw.host
220220
outf.write(f'{lastup:19s} {lastlo:19s} {rw.location:20s} {rw.stationid:10s} {via}\n')

archive/ukmon_pylib/metrics/timingMetrics.py

Lines changed: 27 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313

1414
def graphOfData(logf, dtstr):
15+
1516
lis = open(logf,'r').readlines()
1617
dta = [li for li in lis if li[:8]==dtstr]
1718

@@ -55,78 +56,35 @@ def graphOfData(logf, dtstr):
5556

5657

5758
def getLogStats(nightlogf, matchlogf, thisdy):
58-
with open(nightlogf,'r') as inf:
59-
loglines = inf.readlines()
60-
61-
#logf = os.path.basename(nightlogf)
62-
#spls = logf.split('-')
63-
#thisdy= spls[1]
64-
matchstr = 'RUNTIME'
65-
66-
# <13>Nov 1 11:49:55 nightlyJob: RUNTIME 10554 showerReport ALL 202211
67-
startFAM = 0
68-
startRD = 0
69-
dts = []
70-
tss = []
71-
tsks = []
72-
secs = []
73-
msgs = []
74-
for li in loglines:
75-
if matchstr in li:
76-
li = ' '.join(li.split()) # remove double-spaces eg when date is ' 6 Jan' as opposed to '16 Jan'
77-
spls = li.split()
78-
msg = ''
79-
for s in range(6, len(spls)):
80-
msg = msg + ' ' + spls[s]
81-
if 'start findAllMatches' in msg:
82-
startFAM = int(spls[5])
83-
dts.append(thisdy)
84-
tss.append(spls[2])
85-
tsks.append(spls[3].replace(':',''))
86-
secs.append(int(spls[5]))
87-
msgs.append(msg.strip())
88-
89-
with open(matchlogf,'r') as inf:
90-
loglines = inf.readlines()
59+
# logline example
60+
# <13>May 8 06:10:02 nightlyJob: start nightlyJob
61+
outdir = os.path.split(nightlogf)[0]
9162

92-
# scan for findAllMatches data first
93-
for li in loglines:
94-
if matchstr in li:
95-
spls = li.split()
96-
if 'runDistrib' in spls[3]:
97-
continue
98-
msg = ''
99-
for s in range(6, len(spls)):
100-
msg = msg + ' ' + spls[s]
101-
if 'start runDistrib' in msg:
102-
startRD = int(spls[5])
103-
dts.append(thisdy)
104-
tss.append(spls[2])
105-
tsks.append(spls[3].replace(':',''))
106-
secs.append(int(spls[5])+startFAM)
107-
msgs.append(msg.strip())
63+
loglines = open(nightlogf,'r').readlines()
64+
bsfs = [x for x in loglines if 'start'in x or 'finish' in x or 'end' in x]
65+
bsfs = [x for x in bsfs if x[0]=='<']
10866

109-
# rescan for runDistrib data
110-
for li in loglines:
111-
if matchstr in li:
112-
spls = li.split()
113-
if 'runDistrib' not in spls[3]:
114-
continue
115-
msg = ''
116-
for s in range(6, len(spls)):
117-
msg = msg + ' ' + spls[s]
118-
dts.append(thisdy)
119-
tss.append(spls[2])
120-
tsks.append(spls[3].replace(':',''))
121-
secs.append(int(spls[5]) + startFAM + startRD)
122-
msgs.append(msg.strip())
67+
loglines = open(matchlogf,'r').readlines()
68+
msfs = [x for x in loglines if 'start'in x or 'finish' in x or 'end' in x]
69+
msfs = [x for x in msfs if x[0]=='<']
12370

124-
df = pd.DataFrame(zip(dts,tss,secs,tsks,msgs), columns=['dts','tss','secs','tsk','msgs'])
125-
df = df.sort_values(by=['tss'])
126-
#print(df)
127-
outdir = os.path.split(nightlogf)[0]
128-
df.to_csv(os.path.join(outdir, 'perfNightly.csv'), mode='a', header=False, index=False)
129-
71+
alldata = msfs + bsfs
72+
alldata.sort()
73+
starttime = None
74+
yr = datetime.datetime.now().year
75+
with open(os.path.join(outdir, 'perfNightly.csv'), 'a+') as outf:
76+
for rw in alldata:
77+
dtpart = rw[4:19]
78+
evtdt = datetime.datetime.strptime(f'{yr} {dtpart}', '%Y %b %d %H:%M:%S')
79+
if 'start nightlyJob' in rw:
80+
starttime = evtdt
81+
elapsed_secs = (evtdt - starttime).seconds
82+
txtpart = rw[20:]
83+
task = txtpart[:txtpart.find(':')]
84+
msg = txtpart[txtpart.find(':')+1:].replace(',', ' ')
85+
outstr = f'{evtdt.strftime("%Y%m%d,%H:%M:%S")},{elapsed_secs},{task},{msg}'
86+
outf.write(outstr)
87+
13088

13189
if __name__ == '__main__':
13290
dtstr = sys.argv[1]

archive/ukmon_pylib/reports/findFailedMatches.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,27 @@ def saveData(observation, repfile):
1616

1717

1818
def processOneLog(logfile, repfile):
19-
with open(logfile, 'r') as inf:
20-
lis = inf.readlines()
19+
lis = open(logfile, 'r').readlines()
2120

2221
obs = False
2322
observation = []
2423
for li in lis:
25-
if 'Observations:' in li:
24+
if 'Observations ' in li:
2625
obs = True
2726
if obs is True:
2827
observation.append(li)
29-
if 'Shower:' in li:
28+
if 'Saving trajectory:' in li or 'Updating database' in li:
3029
obs = False
3130
observation = []
32-
if '-----------------------' in li:
31+
if 'Updating database' in li or 'added to fails' in li:
3332
if obs is True:
33+
#print('got fail')
34+
observation.append('--------------\n\n')
3435
saveData(observation, repfile)
3536
obs = False
3637
observation = []
38+
if "SOLVING RUN DONE" in li:
39+
break
3740

3841
return
3942

@@ -48,5 +51,6 @@ def processOneLog(logfile, repfile):
4851
logdir = os.path.join(srcdir, 'logs','distrib')
4952
logs = glob.glob(f'{repdt}*.log', root_dir=logdir)
5053
for logf in logs:
54+
#print(logf)
5155
processOneLog(os.path.join(logdir, logf), reportfile)
5256
reportfile.close()

0 commit comments

Comments
 (0)