Check in ephemerides necessary for CI testing

This prevents Travis CI from having to hammer the JPL servers when
testing jplephem against several versions of Python at once.  It
will also stop CI from routinely erroring out one or more versions
of Python when the JPL’s servers happen to drop a request.
This commit is contained in:
Brandon Rhodes 2019-09-19 16:05:24 -04:00
parent 2cca7f11d9
commit aae60da592
8 changed files with 3629 additions and 19 deletions

6
.gitignore vendored
View File

@ -1,7 +1,5 @@
/MANIFEST
/dist/
testpo.*
*.bsp
/dist
*.pyc
*.egg-info
tmp*.py
tmp*.*

View File

@ -14,11 +14,7 @@ install:
- "python setup.py sdist"
- "mv jplephem trash"
- "pip install dist/jplephem-*.tar.gz"
- "wget http://naif.jpl.nasa.gov/pub/naif/generic_kernels/spk/planets/a_old_versions/de405.bsp"
- "wget http://naif.jpl.nasa.gov/pub/naif/generic_kernels/spk/planets/a_old_versions/de421.bsp"
- "wget http://naif.jpl.nasa.gov/pub/naif/generic_kernels/spk/planets/de430.bsp"
- "wget ftp://ssd.jpl.nasa.gov/pub/eph/planets/test-data/430/testpo.430"
script:
- "unit2 jplephem.test"
- "python -m jplephem.jpltest"
- "cd ci && unit2 jplephem.test"
- "cd ci && python -m jplephem.jpltest"

4
ci/README Normal file
View File

@ -0,0 +1,4 @@
The DE430 ephemeris excerpt in this directory was produced with the
command:
python -m jplephem excerpt 1850/01/01 2150/01/02 ci/de430.bsp ci/de430_test_excerpt.bsp

BIN
ci/de405.bsp Normal file

Binary file not shown.

BIN
ci/de421.bsp Normal file

Binary file not shown.

BIN
ci/de430_test_excerpt.bsp Normal file

Binary file not shown.

3609
ci/testpo.430 Normal file

File diff suppressed because it is too large Load Diff

View File

@ -96,15 +96,18 @@ class MissingFile(Exception):
def test_all():
for number in 430,:
spk_path = 'de%d.bsp' % number
testpo_path = 'testpo.%d' % number
try:
spk = SPK.open(spk_path)
testpo_file = open(testpo_path)
except IOError:
raise MissingFile('cannot open: %s' % testpo_path)
run_testpo(spk, testpo_file)
number = 430
spk_path = 'de%d_test_excerpt.bsp' % number
testpo_path = 'testpo.%d' % number
try:
spk = SPK.open(spk_path)
except IOError:
raise MissingFile('cannot open: %s' % spk_path)
try:
testpo_file = open(testpo_path)
except IOError:
raise MissingFile('cannot open: %s' % testpo_path)
run_testpo(spk, testpo_file)
if __name__ == '__main__':