Skip to content

Conversation

@eteq
Copy link
Member

@eteq eteq commented Nov 16, 2012

This is a few fixes in utils.data spurred by #480. This should now let data.clear_data_cache cache work correctly (although note that it has been renamed data.clear_download_cache).

@pllim, can you confirm that this fixes #480 for you? (although again not that it should now be modified to be clear_download_cache instead of clear_data_cache.

@astrofrog, you might want to look at this, as it deals with some of the changes from #425. Mostly cosmetic, in that it changes "data" to "download" to reflect the broader scope of the cache now. But there was one place where it seemed the cache option was not going through (incorrectly, I believe).

Copy link
Member

Choose a reason for hiding this comment

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

typo: download (no s)

@astrofrog
Copy link
Member

Apart from my comments above, this looks fine to me. However, maybe it would be worth adding --remote-data to travis so that it will really test this now that it should be fixed?

@eteq
Copy link
Member Author

eteq commented Nov 16, 2012

@astrofrog - thanks for mentioning remote-data - I forgot to run the tests with that on, and it revealed some important fixes.

As for --remote-data on travis, that probably makes sense - after all, we can probably trust that travis has access to google. It's possible travis has some access restrictions that limit use of the cache directory used in some of those tests... So I pushed up two commits here that should run on travis - the e59d7b1 should use --remote-data and 8f20d4d should just do the non-remote tests. So we'll see what happens.

Assuming the tests pass, I think this is good to go, now.

@astrofrog
Copy link
Member

Looks good to me! Tests are passing, feel free to merge.

@pllim
Copy link
Member

pllim commented Nov 16, 2012

Hi @eteq , after I replied to #480, I saw this one. Commit 9b99e08 works too. After deletion, data_urlmap.db and an empty download directory remain.

@eteq
Copy link
Member Author

eteq commented Nov 16, 2012

@pllim - yeah, the data_urlmap.db directory is left because the new name for that file is download_urlmap.db. If you just delete data_urlmap.db after this is merged, it should never come back.

@pllim
Copy link
Member

pllim commented Nov 19, 2012

@eteq , thanks for the info. I tried again after deleting ~/.astropy and after I did clear_download_cache this time, only an empty ~/.astropy/cache/download directory remains.

@eteq
Copy link
Member Author

eteq commented Nov 19, 2012

@astrofrog - it appears --remote-data is not working on travis for some reason that is not obvious to me. I'll roll back to the previous commit, merge, and add an issue to investigate how to make this work with travis later.

eteq added a commit that referenced this pull request Nov 19, 2012
@eteq eteq merged commit 51f732c into astropy:master Nov 19, 2012
Copy link
Contributor

Choose a reason for hiding this comment

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

Commenting based on the failing Travis results when turning on --remote-data (#491).

googlepage.read().decode('utf-8').find('oogle</title>') > -1

Travis apparently has a default encoding of ascii, so it can't decode the utf-8-encoded Google homepage.

keflavich pushed a commit to keflavich/astropy that referenced this pull request Oct 9, 2013
@eteq eteq deleted the data/lock-and-dl-fixes branch May 3, 2015 17:17
jeffjennings pushed a commit to jeffjennings/astropy that referenced this pull request Jul 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

clear_data_cache() crashed with RunTimeError

4 participants