Skip to content

Commit a692ae9

Browse files
Stop rebuilding .npz files if arrays don’t change
1 parent 43636c8 commit a692ae9

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

builders/build_arrays.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,21 @@ def main(argv):
1515
parser = argparse.ArgumentParser(description='Save arrays to a file')
1616
parser.parse_args(argv)
1717

18+
# The data in these two binary files does not change from one
19+
# Skyfield version to the next, yet (as of 2026 January) they are
20+
# coming out slightly different when rebuilt. Maybe NumPy has
21+
# changed its zip file formatting, or compression level? Anyway,
22+
# let's stop automatically rebuilding them for now to avoid noise in
23+
# our version control history.
24+
#
25+
# rebuild_nutation_npz()
26+
# rebuild_delta_t_npz()
27+
28+
# But we do rebuild the IERS data, because it's new each time.
29+
30+
rebuild_iers_npz()
31+
32+
def rebuild_nutation_npz():
1833
g = globals()
1934
save('skyfield/data/nutation', {key: g[key] for key in [
2035
'ke0_t',
@@ -29,6 +44,7 @@ def main(argv):
2944
'se0_t_1',
3045
]})
3146

47+
def rebuild_delta_t_npz():
3248
url = 'http://astro.ukho.gov.uk/nao/lvm/Table-S15.2020.txt'
3349
with load.open(url) as f:
3450
names, s15_table = parse_S15_table(f)
@@ -37,6 +53,7 @@ def main(argv):
3753
'Table-S15.2020.txt': s15_table,
3854
})
3955

56+
def rebuild_iers_npz():
4057
url = load.build_url('finals2000A.all')
4158
try:
4259
f = load.open(url)

0 commit comments

Comments
 (0)