Open
Conversation
- add requirements.txt - add unittest
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello,
I'm new to SPICE, and I'm learning how to use it by playing with codes on github, and I found your repository helpful.
I noticed that you are using
wgetto download NAIF data. It surely can do the work, but I noticed it doing wield things, including treatingName,Last modifiedas downloadable files, downloading multiple version ofrobots.txt(and afterwards renaming it torobots.txt.1,robots.txt.2too). And as #1 mentioned, the dependence onwgetmaybe problematic for Windows users. I also noticed the commented outurllibsection, I'd assume you plan to at least add an alternative towgetwith more native ways.So I ended up doing with my own way, using
requeststo first get page html, get all<a>tags, and with all filenames that match the pattern, we try to request the server.force-updateis achieved with aIf-Modified-Sinceheader, and if the server returns 304 then our file is newer than the server, so no redownload would trigger.tqdmis used to render the progress bar in console, and a null context is used whenshow_progress=False.Besides I also add a
requirements.txtand a unittest module (by which I can confirm the new code is working as expected). I usedloggingmodule to print debug infos, but they would be silenced unless explicitly setting the log level to INFO.I'm currently using this version now, and I'm happy to contribute. Feel free to merge / not merge this PR, and feel free to let me know if further changes are needed.