scikit-hep / pyhf

pure-Python HistFactory implementation with tensors and autodiff
https://pyhf.readthedocs.io/
Apache License 2.0
284 stars 84 forks source link

PyPI and Zenodo have stopped updating #90

Closed matthewfeickert closed 6 years ago

matthewfeickert commented 6 years ago

I'm not sure why, but at the moment we're on version 0.0.7, but PyPI is on v0.0.5 and Zenodo is on v0.0.4.

This isn't urgent, but @lukasheinrich can you look into this?

matthewfeickert commented 6 years ago

@lukasheinrich I now realize that the Zenodo DOI isn't updating (I think?) because it is still pointing towards your personal GitHub, and not the DIANA/HEP GitHub group, like yadage does. I assume this can be fixed by just going into the Zenodo settings and flipping the "Enabled Repositories" tracking switch off and on again, or something like that.

lukasheinrich commented 6 years ago

I think both should be fine now.. the zenodo DOI only updates once I manually create a new release on github (just created a pre-release based off of 0.0.8 to test), so the DOI should not update on each release we push to pypi (unless we automate the release creation). pypi works again, so closing.

matthewfeickert commented 6 years ago

@lukasheinrich Great. The Zeonodo DOI link is pointing to the right place now.

Small nitpicky thing that we can worry about later: The badge in GitHub isn't currently tracking, though the link redirects correctly.

GitHub README Badge Zenodo Badge for latest release (v0.0.8)
DOI DOI

I don't have access to the DIANA/HEP pages in Zenodo, so can you check what the link is for the "Target URL" when you click the DOI badge viewed from the under GitHub Repositories page of Zenodo? The GitHub README is getting its badge from the SVG at https://zenodo.org/badge/latestdoi/118789569 --- I suspect that the ending tag in the URL is different now (maybe?).

I knew that it only tracked the actual version tag in GitHub, but isn't that the same as every version number in PyPI?

lukasheinrich commented 6 years ago

ah ok.. so the link points to the latest DOI, but apparently the badges are fixed to the DOI that was used when you copy the markdown.. so we need to update this manually (which I just did)

lukasheinrich commented 6 years ago

ok actually I just changed the badge to 10.5281/zenodo.1169739 which is the DOI for all versions

matthewfeickert commented 6 years ago

@lukasheinrich What is confusing though is that Yadage's badge is correct:

[![DOI](https://zenodo.org/badge/53543066.svg)](https://zenodo.org/badge/latestdoi/53543066)

creates DOI which shows the correct number on both GitHub and Zenodo. So I don't think we need to set it to a hard coded number.

I was thinking that when we moved the repo from your account to DIANA/HEP that (what I'll stupidly call as I don't know the real name) IDTAG changed

[![DOI](https://zenodo.org/badge/IDTAG.svg)](https://zenodo.org/badge/latestdoi/IDTAG)

When it was under your account it was IDTAG=118789569

[![DOI](https://zenodo.org/badge/118789569.svg)](https://zenodo.org/badge/latestdoi/118789569)

and generates DOI and 1169740 is the correct DOI for release v.0.0.4 --- the last version that Zenodo saw under your account.

What is the IDTAG at the end of "Target URL" when you go here and click the DOI badge for pyhf?

lukasheinrich commented 6 years ago

it's still 118789569 even on diana-hep

matthewfeickert commented 6 years ago

Huh, weird. Well, this isn't really important (now at least) so I'll tag this for followup and close it again for now.

krzysztof commented 6 years ago

Hi, I'm one of the Zenodo developers. The badge URL for a repository can contain two types of URLs:

  1. A DOI badge that's linked with the GitHub repository, e.g., Yadage badge mentioned above. This badge resolves to the underlying "most recent" DOI of lastest Zenodo record that was created for given repository. The code in the badge is the repository ID. This will also change the image of the badge as new releases are being made, e.g.: https://zenodo.org/badge/53543066.svg
  2. A DOI badge with with a "Concept DOI", which points to the same DOI, which is resolved to the latest record of given version chain, see more information on versioning at http://blog.zenodo.org/#versioning

Either can be used, but we recommend to use the latter: https://github.com/zenodo/zenodo/issues/1164

matthewfeickert commented 6 years ago

@krzysztof Thanks for following up given my email.

So if I understand correctly, the recommended "Concept DOI" is the DOI that is listed on a Zenodo page following the "Cite all versions?" text.

So for pyhf that would be 10.5281/zenodo.1169739, and so for a badge that is displaying the Concept DOI we would do

[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1169739.svg)](https://doi.org/10.5281/zenodo.1169739)

DOI

My remaining question though is if we decided that we want the most recent version DOI displayed in the badge (which I understand is not the recommended way), then why does

[![DOI](https://zenodo.org/badge/118789569.svg)](https://zenodo.org/badge/latestdoi/118789569)

produce a badge displaying the DOI for v0.0.4 DOI and not the most recent version (which as of posting is v0.0.8) DOI DOI ? The link (https://zenodo.org/badge/latestdoi/118789569) redirects to the latest version (v0.0.8) properly but the displayed badges are different.

Apologies if I'm missing something very obvious.

krzysztof commented 6 years ago

Ah yes, this is a caching issue we've described here: https://github.com/zenodo/zenodo/issues/912

Indeed, it does render the old badge on GitHub: DOI

But if you go directly to https://zenodo.org/badge/118789569.svg you will see the badge for the most recent DOI. This is a bug with caching as explained above.

matthewfeickert commented 6 years ago

@krzysztof Ah okay great. This is really helpful information as I thought this was an issue on Lukas and my side, not that it was a known bug.

It seems that there isn't much activity on this bug which is over a year old, so I take it we should assume this probably won't be fixed soon, correct?

Regardless, thanks so much for your help!