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

Zenodo / DOIs #2148

Closed
MysterAitch opened this issue Apr 2, 2019 · 12 comments
Closed

Zenodo / DOIs #2148

MysterAitch opened this issue Apr 2, 2019 · 12 comments
Labels
Improvement Not a bug, but a way that JP can be be enhanced to work better.
Milestone

Comments

@MysterAitch
Copy link
Member

I'm trying to figure out how to reference/cite JavaParser in a research paper and I've just come across Zenodo. It appears to enable releases of software to be assigned a "Digital Object Identifier" (DOI). Zenodo is run by CERN and is referenced from the GitHub docs in its article about citable code.

Linking Zenodo to GitHub repos appears straightforward and seems to require minimal effort/setup - set it up once and the rest happens automatically behind the scenes. I can't vouch for this first-hand though!

From what I can see in the FAQs, one DOI is assigned to the project (resolves to the latest version) and each release is then assigned its own DOI (minting being triggered via GitHub release webhook).

Is this something that would be considered?

@matozoid
Copy link
Contributor

matozoid commented Apr 2, 2019

Hi! We've had this question before (how to reference JP) so it's nice to see that it can be resolved easily. I've made an account and switched on preservation for the main project: https://github.com/javaparser/javaparser . Let's see what happens next Sunday when I release :-)

@matozoid matozoid added the Improvement Not a bug, but a way that JP can be be enhanced to work better. label Apr 2, 2019
@matozoid
Copy link
Contributor

Nothing happened :-( I've googled for issues but haven't found anything I could act on directly. Would you like admin access to the project?

@MysterAitch
Copy link
Member Author

It would be rude to say not to a generous offer like that! ;)

I'm not sure how much farther I'll get with it but I'm happy to have a poke around and see if I can narrow things down at least?

@matozoid
Copy link
Contributor

Okay, I've added you as an admin. Let me know if that worked :-)

Sure, go ahead. Just don't break what's working :-)

@MysterAitch
Copy link
Member Author

Apologies for the delay. I've had a look around but I don't seem to have any additional access to the project (e.g. to look at the commit hooks) and the project doesn't appear when I login to Zenodo.

Assuming that you gave organisation access etc, I'm wondering whether the first upload needs to be done manually and then subsequent ones will be automatic, but that's just a hunch. Alternatively it might be the commit webhooks.

@matozoid
Copy link
Contributor

matozoid commented May 4, 2019

Ah, github says "Awaiting MysterAitch’s response" - so I assume there's an email or so for you.

I did google this, and there are some reports that automatic releases just don't get counted. I don't give a damn about JavaParser's github release list (this one: https://github.com/javaparser/javaparser/releases ) so feel free to mess with it.

@MysterAitch
Copy link
Member Author

Ah, apologies - I should keep a closer eye on my emails!

Looking at the hooks page, at the bottom is the "Recent Deliveries" section - currently is says:

Detailed delivery information will be shown here once the hook has been triggered.

The rest of the settings seem reasonable. Might this mean that the hook wasn't triggered, despite releases being created?

I'm not sure what is meant by automatic releases though? A brief search returns a result about using the GitHub API to trigger a release as opposed to using the web interface - is this what you refer to?

@matozoid
Copy link
Contributor

matozoid commented May 4, 2019

Right now Github adds a release there every time I make a release with Maven. Quite unhelpful since it confuses people, but that's besides the point. That is probably an automatic release. You can also fiddle around in the releases page to make a release. I'm guessing that's manual.

@MysterAitch
Copy link
Member Author

MysterAitch commented May 4, 2019

The manual release seems to have triggered the webhook, and JavaParser is now listed on Zenodo

Project (links resolve to the latest version):

v3.13.10 release:

They took a few minutes for the DOIs to become "live", but seems to resolve fine now

If you're willing to do this each time as part of the release process then that's this resolved, but it does seem a little unfair to add this to your workload given that it's supposed to run automatically in the background on each release.

Maybe we could dig a little deeper into the tooling/process for each release? From what I can tell, maven-release-plugin uses maven-scm-plugin (and JGit - using the options within the <scm> section within pom.xml) behind the scenes to add git tags. Is this done locally, and then manually pushed to GitHub? Or is it perhaps more automatic than this and the push happens as part of the release?

@matozoid
Copy link
Contributor

matozoid commented May 4, 2019

Hey, cool that it works!

Since you seem to be overestimating the amount of time I spend on JavaParser ( ;-) ) I have a counter-suggestion: every time someone wants a DOI, I'll do a manual release. Can you document the exact process in this issue? (I assume it's "click here, type this, click there")

@MysterAitch
Copy link
Member Author

MysterAitch commented May 5, 2019

Possibly, though in reality I suspect I'm showing my naivety as to how things actually get packaged, released, and then uploaded to Maven Central ;)

In terms of creating a release, you're right that it's click a link fill in a form and click submit. It can literally be a 10-30 second thing to do if just doing a tag name and I think an optional title!

For clarity, creating a new record on Zenodo is simply creating a new release via GitHub using the steps as described here:

  1. The "draft a new release" button on the releases page - https://github.com/javaparser/javaparser/releases/new
  2. Either type in a new version tag and select the commit to attach it to, or just select an existing commit/tag
    1. Defaults to the current head of master
    2. Tags are unique within the repo
  3. Optionally provide a title / description
  4. Optionally provide files to include in the release (e.g. packaged jar)
  5. Optionally mark as pre-release
  6. Submit
  7. Zenodo receives the webhook trigger from GitHub and creates a new record (it took a couple minutes to be picked up by doi.org but the Zenodo.org link worked immediately)

Edit: As for the release webhook not being triggered, it turns out that maven-release-plugin creates a git tag not a GitHub release (as it is designed to do). The reason this distinction wasn't noticed sooner is because the GitHub UI is misleading by showing it on the releases page.

It is possible to programmatically trigger the creation of a release via REST API. StackOverflow reveals a question from 2011 with a few different answers in the years since, but I'm struggling to uncover a means of doing this via maven (many search results get buried to quite general search terms).

MysterAitch added a commit to MysterAitch/javaparser that referenced this issue Nov 17, 2019
…) every time a tag is pushed with the specified pattern (currently `javaparser-parent-[0-9].*` as this matches the tags added by the maven release plugin) -- this should then trigger an event, thus triggering actions such as those in javaparser#2148 to recognise a new release.
@matozoid
Copy link
Contributor

I'm assuming this is resolved now, but to be sure I'll leave the closing to @MysterAitch

@matozoid matozoid added this to the next release milestone Nov 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Improvement Not a bug, but a way that JP can be be enhanced to work better.
Projects
None yet
Development

No branches or pull requests

2 participants