Skip to content

Commit

Permalink
Script and log output for validation
Browse files Browse the repository at this point in the history
  • Loading branch information
taldcroft committed Feb 11, 2024
1 parent d1b8982 commit 5d0e3d0
Show file tree
Hide file tree
Showing 3 changed files with 334 additions and 0 deletions.
126 changes: 126 additions & 0 deletions validate/pr319/fix-matching-for-obs-cmds.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
building file list ... done
./
cmds2.h5
cmds2.pkl

sent 142252954 bytes received 70 bytes 284506048.00 bytes/sec
total size is 142235385 speedup is 1.00
Running out of branch 'fix-matching-for-obs-cmds'
Using kadi dir: fix-matching-for-obs-cmds
kadi file /Users/aldcroft/git/kadi/kadi/__init__.py
Making kadi dir: fix-matching-for-obs-cmds
Syncing archive to state as of 2024-02-04 (about midnight EST)
Running: rsync -av /Users/aldcroft/ska/data/kadi/cmds-from-2024feb04/ fix-matching-for-obs-cmds/
kadi version: 7.8.2.dev29+gb31e454

********************************************************************************
Last 5 observations as of 2024:035:12:00:00 using scenario='flight'
********************************************************************************
obsid obs_start obs_stop simpos manvr_start npnt_enab
----- --------------------- --------------------- ------ --------------------- ---------
29247 2024:037:09:06:17.311 2024:037:11:57:17.060 75624 2024:037:08:26:51.170 True
29255 2024:037:12:36:53.396 2024:037:15:27:53.145 92904 2024:037:11:57:27.311 True
29248 2024:037:16:07:31.012 2024:037:20:55:10.762 75624 2024:037:15:28:03.396 True
29256 2024:037:21:23:18.513 2024:038:00:27:26.696 75624 2024:037:20:55:21.013 True
43722 2024:038:00:56:28.907 2024:038:01:48:23.442 -99616 2024:038:00:27:36.947 True

Updating commands as of 2024:036:12:00:00
******************************************
Running: /Users/aldcroft/git/kadi/kadi/scripts/update_cmds_v2.py
Version: 7.8.2.dev29+gb31e454
Time: Sun Feb 11 06:36:49 2024
User: root
Machine: saos-MBP.home
Processing args:
{'data_root': 'fix-matching-for-obs-cmds',
'log_level': 50,
'lookback': None,
'scenario': None,
'stop': '2024:036:12:00:00'}
******************************************
********************************************************************************
Last 5 observations as of 2024:036:12:00:00 using scenario='flight'
********************************************************************************
obsid obs_start obs_stop simpos manvr_start npnt_enab
----- --------------------- --------------------- ------ --------------------- ---------
28446 2024:034:23:43:10.567 2024:035:00:31:23.316 75624 2024:034:23:39:10.567 True
27349 2024:035:01:09:52.874 2024:035:03:27:11.000 92904 2024:035:00:31:33.567 True
27349 2024:035:03:49:38.563 2024:036:02:17:50.000 -99616 2024:035:03:27:11.000 False
27349 2024:036:02:46:43.204 2024:036:03:09:52.000 -99616 2024:036:02:18:00.250 False
65522 2024:036:03:09:52.000 2024:036:03:09:52.000 -99616 2024:036:02:18:00.250 False

Updating commands as of 2024:037:04:30:00
******************************************
Running: /Users/aldcroft/git/kadi/kadi/scripts/update_cmds_v2.py
Version: 7.8.2.dev29+gb31e454
Time: Sun Feb 11 06:36:54 2024
User: root
Machine: saos-MBP.home
Processing args:
{'data_root': 'fix-matching-for-obs-cmds',
'log_level': 50,
'lookback': None,
'scenario': None,
'stop': '2024:037:04:30:00'}
******************************************
********************************************************************************
Last 5 observations as of 2024:037:04:30:00 using scenario='flight'
********************************************************************************
obsid obs_start obs_stop simpos manvr_start npnt_enab
----- --------------------- --------------------- ------ --------------------- ---------
27349 2024:035:03:49:38.563 2024:036:02:17:50.000 -99616 2024:035:03:27:11.000 False
27349 2024:036:02:46:43.204 2024:036:03:09:52.000 -99616 2024:036:02:18:00.250 False
65522 2024:036:03:09:52.000 2024:036:20:42:12.000 -99616 2024:036:02:18:00.250 False
62619 2024:036:20:42:12.000 2024:037:03:59:44.000 -99616 2024:036:02:18:00.250 False
62619 2024:037:04:06:42.777 2024:042:06:13:08.510 -99616 2024:037:03:59:54.250 True

Updating commands as of 2024:037:04:50:00
******************************************
Running: /Users/aldcroft/git/kadi/kadi/scripts/update_cmds_v2.py
Version: 7.8.2.dev29+gb31e454
Time: Sun Feb 11 06:36:57 2024
User: root
Machine: saos-MBP.home
Processing args:
{'data_root': 'fix-matching-for-obs-cmds',
'log_level': 50,
'lookback': None,
'scenario': None,
'stop': '2024:037:04:50:00'}
******************************************
********************************************************************************
Last 5 observations as of 2024:037:04:50:00 using scenario='flight'
********************************************************************************
obsid obs_start obs_stop simpos manvr_start npnt_enab
----- --------------------- --------------------- ------ --------------------- ---------
27349 2024:036:02:46:43.204 2024:036:03:09:52.000 -99616 2024:036:02:18:00.250 False
65522 2024:036:03:09:52.000 2024:036:20:42:12.000 -99616 2024:036:02:18:00.250 False
62619 2024:036:20:42:12.000 2024:037:03:59:44.000 -99616 2024:036:02:18:00.250 False
62619 2024:037:04:06:42.777 2024:037:04:36:00.000 -99616 2024:037:03:59:54.250 True
62619 2024:037:04:52:05.911 2024:042:06:13:08.510 -99616 2024:037:04:36:10.250 True

Updating commands as of 2024:038:12:00:00
******************************************
Running: /Users/aldcroft/git/kadi/kadi/scripts/update_cmds_v2.py
Version: 7.8.2.dev29+gb31e454
Time: Sun Feb 11 06:37:00 2024
User: root
Machine: saos-MBP.home
Processing args:
{'data_root': 'fix-matching-for-obs-cmds',
'log_level': 50,
'lookback': None,
'scenario': None,
'stop': '2024:038:12:00:00'}
******************************************
********************************************************************************
Last 5 observations as of 2024:038:12:00:00 using scenario='flight'
********************************************************************************
obsid obs_start obs_stop simpos manvr_start npnt_enab
----- --------------------- --------------------- ------ --------------------- ---------
65522 2024:036:03:09:52.000 2024:036:20:42:12.000 -99616 2024:036:02:18:00.250 False
62619 2024:036:20:42:12.000 2024:037:03:59:44.000 -99616 2024:036:02:18:00.250 False
62619 2024:037:04:06:42.777 2024:037:04:36:00.000 -99616 2024:037:03:59:54.250 True
62619 2024:037:04:52:05.911 2024:038:01:15:00.000 -99616 2024:037:04:36:10.250 True
43729 2024:038:01:20:47.178 2024:038:01:49:18.954 -99616 2024:038:01:15:10.251 True

126 changes: 126 additions & 0 deletions validate/pr319/master.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
building file list ... done
./
cmds2.h5
cmds2.pkl

sent 142252954 bytes received 70 bytes 284506048.00 bytes/sec
total size is 142235385 speedup is 1.00
Running out of branch 'master'
Using kadi dir: master
kadi file /Users/aldcroft/git/kadi/kadi/__init__.py
Making kadi dir: master
Syncing archive to state as of 2024-02-04 (about midnight EST)
Running: rsync -av /Users/aldcroft/ska/data/kadi/cmds-from-2024feb04/ master/
kadi version: 7.8.2.dev27+gd1b8982

********************************************************************************
Last 5 observations as of 2024:035:12:00:00 using scenario='flight'
********************************************************************************
obsid obs_start obs_stop simpos manvr_start npnt_enab
----- --------------------- --------------------- ------ --------------------- ---------
29247 2024:037:09:06:17.311 2024:037:11:57:17.060 75624 2024:037:08:26:51.170 True
29255 2024:037:12:36:53.396 2024:037:15:27:53.145 92904 2024:037:11:57:27.311 True
29248 2024:037:16:07:31.012 2024:037:20:55:10.762 75624 2024:037:15:28:03.396 True
29256 2024:037:21:23:18.513 2024:038:00:27:26.696 75624 2024:037:20:55:21.013 True
43722 2024:038:00:56:28.907 2024:038:01:48:23.442 -99616 2024:038:00:27:36.947 True

Updating commands as of 2024:036:12:00:00
******************************************
Running: /Users/aldcroft/git/kadi/kadi/scripts/update_cmds_v2.py
Version: 7.8.2.dev27+gd1b8982
Time: Sun Feb 11 06:37:53 2024
User: root
Machine: saos-MBP.home
Processing args:
{'data_root': 'master',
'log_level': 50,
'lookback': None,
'scenario': None,
'stop': '2024:036:12:00:00'}
******************************************
********************************************************************************
Last 5 observations as of 2024:036:12:00:00 using scenario='flight'
********************************************************************************
obsid obs_start obs_stop simpos manvr_start npnt_enab
----- --------------------- --------------------- ------ --------------------- ---------
27349 2024:036:02:46:43.204 2024:036:03:09:52.000 -99616 2024:036:02:18:00.250 False
65522 2024:036:03:09:52.000 2024:036:20:42:12.000 -99616 2024:036:02:18:00.250 False
62619 2024:036:20:42:12.000 2024:037:03:59:44.000 -99616 2024:036:02:18:00.250 False
62619 2024:037:04:06:42.777 2024:037:04:36:00.000 -99616 2024:037:03:59:54.250 True
62619 2024:037:04:52:05.911 2024:043:01:42:33.505 -99616 2024:037:04:36:10.250 True

Updating commands as of 2024:037:04:30:00
******************************************
Running: /Users/aldcroft/git/kadi/kadi/scripts/update_cmds_v2.py
Version: 7.8.2.dev27+gd1b8982
Time: Sun Feb 11 06:37:58 2024
User: root
Machine: saos-MBP.home
Processing args:
{'data_root': 'master',
'log_level': 50,
'lookback': None,
'scenario': None,
'stop': '2024:037:04:30:00'}
******************************************
********************************************************************************
Last 5 observations as of 2024:037:04:30:00 using scenario='flight'
********************************************************************************
obsid obs_start obs_stop simpos manvr_start npnt_enab
----- --------------------- --------------------- ------ --------------------- ---------
27349 2024:036:02:46:43.204 2024:036:03:09:52.000 -99616 2024:036:02:18:00.250 False
65522 2024:036:03:09:52.000 2024:036:20:42:12.000 -99616 2024:036:02:18:00.250 False
62619 2024:036:20:42:12.000 2024:037:03:59:44.000 -99616 2024:036:02:18:00.250 False
62619 2024:037:04:06:42.777 2024:037:04:36:00.000 -99616 2024:037:03:59:54.250 True
62619 2024:037:04:52:05.911 2024:043:01:42:33.505 -99616 2024:037:04:36:10.250 True

Updating commands as of 2024:037:04:50:00
******************************************
Running: /Users/aldcroft/git/kadi/kadi/scripts/update_cmds_v2.py
Version: 7.8.2.dev27+gd1b8982
Time: Sun Feb 11 06:38:00 2024
User: root
Machine: saos-MBP.home
Processing args:
{'data_root': 'master',
'log_level': 50,
'lookback': None,
'scenario': None,
'stop': '2024:037:04:50:00'}
******************************************
********************************************************************************
Last 5 observations as of 2024:037:04:50:00 using scenario='flight'
********************************************************************************
obsid obs_start obs_stop simpos manvr_start npnt_enab
----- --------------------- --------------------- ------ --------------------- ---------
27349 2024:036:02:46:43.204 2024:036:03:09:52.000 -99616 2024:036:02:18:00.250 False
65522 2024:036:03:09:52.000 2024:036:20:42:12.000 -99616 2024:036:02:18:00.250 False
62619 2024:036:20:42:12.000 2024:037:03:59:44.000 -99616 2024:036:02:18:00.250 False
62619 2024:037:04:06:42.777 2024:037:04:36:00.000 -99616 2024:037:03:59:54.250 True
62619 2024:037:04:52:05.911 2024:043:01:42:33.505 -99616 2024:037:04:36:10.250 True

Updating commands as of 2024:038:12:00:00
******************************************
Running: /Users/aldcroft/git/kadi/kadi/scripts/update_cmds_v2.py
Version: 7.8.2.dev27+gd1b8982
Time: Sun Feb 11 06:38:03 2024
User: root
Machine: saos-MBP.home
Processing args:
{'data_root': 'master',
'log_level': 50,
'lookback': None,
'scenario': None,
'stop': '2024:038:12:00:00'}
******************************************
********************************************************************************
Last 5 observations as of 2024:038:12:00:00 using scenario='flight'
********************************************************************************
obsid obs_start obs_stop simpos manvr_start npnt_enab
----- --------------------- --------------------- ------ --------------------- ---------
65522 2024:036:03:09:52.000 2024:036:20:42:12.000 -99616 2024:036:02:18:00.250 False
62619 2024:036:20:42:12.000 2024:037:03:59:44.000 -99616 2024:036:02:18:00.250 False
62619 2024:037:04:06:42.777 2024:037:04:36:00.000 -99616 2024:037:03:59:54.250 True
62619 2024:037:04:52:05.911 2024:043:01:42:33.505 -99616 2024:037:04:36:10.250 True
43729 2024:038:01:20:47.178 2024:038:01:49:18.954 -99616 2024:038:01:15:10.251 True

82 changes: 82 additions & 0 deletions validate/pr319/run_updates.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
import os
import subprocess as sp
import sys
from pathlib import Path

sys.path.insert(0, os.path.expanduser("~/git/kadi"))
kadi_dir = sp.check_output("git rev-parse --abbrev-ref HEAD".split()).decode().strip()
print(f"Running out of branch {kadi_dir!r}")
os.environ["KADI"] = kadi_dir

from astropy.table import Table

import kadi
import kadi.commands as kc
import kadi.commands.core as kcc
from kadi.scripts import update_cmds_v2


def print_last_five_obss(stop):
print("*" * 80)
print(f"Last 5 observations as of {stop} using scenario='flight'")
print("*" * 80)
obss = Table(
kc.get_observations(
start="2024:034", stop="2024:038:02:00:00", scenario="flight"
)
)
obss[
"obsid",
"obs_start",
"obs_stop",
"simpos",
"manvr_start",
"npnt_enab",
][-5:].pprint_all()
print()


def update_archive_through_stop(stop, kadi_dir):
os.environ["KADI_COMMANDS_DEFAULT_STOP"] = stop
print(f"Updating commands as of {stop}")
kc.clear_caches()
update_cmds_v2.main(["--stop", stop, "--data-root", kadi_dir, "--log-level", "50"])
kc.clear_caches()


print(f"Using kadi dir: {kadi_dir}")
print(f"kadi file {kadi.__file__}")

SKA = Path(os.environ["SKA"])

print(f"Making kadi dir: {kadi_dir}")
Path(kadi_dir).mkdir(exist_ok=True, parents=True)
kc.conf.commands_dir = kadi_dir

cmds = [
"rsync",
"-av",
str(SKA / "data" / "kadi" / "cmds-from-2024feb04") + "/",
kadi_dir + "/",
]
print("Syncing archive to state as of 2024-02-04 (about midnight EST)")
print(f"Running: {' '.join(cmds)}")
sp.run(
cmds,
check=True,
)

print(f"kadi version: {kadi.__version__}")
print()
os.environ["KADI_COMMANDS_DEFAULT_STOP"] = stop = "2024:035:12:00:00"
print_last_five_obss(stop)

# Now update the commands archive to processing from next day
for stop in (
"2024:036:12:00:00",
"2024:037:04:30:00",
"2024:037:04:50:00",
"2024:038:12:00:00",
):
update_archive_through_stop(stop, kadi_dir)
print_last_five_obss(stop)

0 comments on commit 5d0e3d0

Please sign in to comment.