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

Make FH fetch_publication_data more stable #171

Closed
wants to merge 3 commits into from

Conversation

rmlarose
Copy link
Contributor

Fixes #165.

As documented there, individual file IDs are not permanent on Dryad. The strategy here is to determine these from the (permanent) DOI.

Could be a cleaner way to do this, comments welcome.


# Determine file IDs. Note these are not permanent on Dryad.
file_ids = {}
for line in urlopen("https://doi.org/10.5061/dryad.crjdfn32v").readlines():
Copy link
Collaborator

Choose a reason for hiding this comment

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

is this parsing the human-readable html website? If so, this seems just as unstable. What if they add a newline between the filename.zip and the id?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes this would break it. It might be that this is more stable than the file IDs - the file IDs changed at least once since fetch_publication_data was added, but I don't think the html has. I think the only way to hermetically seal it is to tell Dryad to give individual files DOIs, or use a different service that does.

@mpharrigan
Copy link
Collaborator

see #352

@mpharrigan mpharrigan closed this Jun 20, 2024
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.

fermi_hubbard publication_test is not hermetic
2 participants