Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a script to download TLEs and store them to a database #56

Merged
merged 28 commits into from
Feb 3, 2020

Conversation

pnuu
Copy link
Member

@pnuu pnuu commented Jan 29, 2020

This PR adds a script that can be used to download TLE data from various sources, and store them in a database. The latest TLEs can also stored to a text file.

Testing for Python 2.7 is removed!

  • Tests added
  • Tests passed
  • Passes flake8 pyorbital for the affected parts
  • Fully documented

@coveralls
Copy link

coveralls commented Jan 29, 2020

Coverage Status

Coverage increased (+3.07%) to 86.807% when pulling 9854128 on pnuu:feature-tle-download-db into 6d9a842 on pytroll:master.

@pnuu pnuu marked this pull request as ready for review January 30, 2020 08:54
@djhoese
Copy link
Member

djhoese commented Jan 30, 2020

This makes me think of the <prefix>/share/proj/proj.db database that the PROJ C library installs. However, PROJ doesn't write to the database once it is installed as far as I know but I don't use the C library very much so there may be an API for that.

Maybe this database should be stored in a location like the PROJ database, but the TLE files are stored in a more temporary or cache-y location? Just some ideas.

@pnuu
Copy link
Member Author

pnuu commented Jan 31, 2020

I think it's best to let the user decide where the database is stored. All the software we have (pyorbital, AAPP, PPS, pytroll schedule) read the TLE data from text files and either use TLES environment variable or their own directory structure and expect the files to be there, without a possibility to configure it.

I'll sill adjust the text file saving so that multiple output directories/patterns are possible.

@djhoese
Copy link
Member

djhoese commented Jan 31, 2020

or their own directory structure and expect the files to be there

Could there be an API in pyorbital or other package that given parameters (platform, time, etc) gives back the TLE file or the information from the TLE file?

Copy link
Member

@mraspaud mraspaud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

As discussed on slack, I would like to be able to handle the data on a purely text file basis (switch off SQLite), and send messages about the new TLEs, but this will be another PR.

@mraspaud mraspaud merged commit cd2c43f into pytroll:master Feb 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants