python-astrodynamics / astrodynamics

http://www.python-astrodynamics.org
33 stars 6 forks source link

Add SPK download support #10

Closed RazerM closed 7 years ago

RazerM commented 8 years ago

The gist of this pull request is to enable the following:

$ python -m astrodynamics download_spk planets de430
Downloading http://naif.jpl.nasa.gov/pub/naif/generic_kernels/spk/planets/de430.bsp (119.7 MB)
  100% |████████████████████████████████| 119.7 MB 16.9 MB/s 
Kernel downloaded to /Users/frazer/Library/Application Support/astrodynamics/spk/de430.bsp

or the same in Python (also prints the same output):

download_spk('planets', 'de430')

By default, files are downloaded to a platform-specific directory e.g. ~/Library/Application Support/astrodynamics

Excuse the long diff, I did some refactoring.

codecov-io commented 8 years ago

Current coverage is 95.53%

Merging #10 into master will decrease coverage by -3.46% as of 7f8bada

@@            master     #10   diff @@
======================================
  Files           20      27     +7
  Stmts          599     962   +363
  Branches        39      77    +38
  Methods          0       0       
======================================
+ Hit            593     919   +326
- Partial          3      20    +17
- Missed           3      23    +20

Review entire Coverage Diff as of 7f8bada

Powered by Codecov. Updated on successful CI builds.

RazerM commented 8 years ago

I made some changes to the packaging thanks to python-packaging-user-guide, also now using correct numpy wheels for Windows.

RazerM commented 7 years ago

I'm merging this, it's been long enough.