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

Allow an associated publication to be added on the management page for published projects #2045

Merged
merged 3 commits into from
Oct 5, 2023

Conversation

tompollard
Copy link
Member

Background

On the landing page for published projects, we display three suggested citations:

  1. The citation for the data/software/etc publication itself. This is required to meet the FAIR criteria. People should be able to directly cite the published object.
  2. [Optional] A citation to an associated paper, such as a data paper in NPJ Scientific Data. This is partly to support the legacy of proxy papers being needed to gain credit for data sharing.
  3. A citation to a PhysioNet paper.

Problem

After publication of a dataset, it is fairly common for us to receive a request to add a citation for point 2. Right now, adding the paper involves either (a) creating a new version of the dataset (burdensome) (b) or manually adding the paper via the shell (risky).

I think option (a) is still desirable, because it is best if the paper is also added as a formal reference. It is burdensome to release new versions though, and so we often end up doing (b).

What is the change introduced in this pull request?

This pull request adds a section to the project management form at http://localhost:8000/console/published-projects/SLUG/VERSION/ (e.g. http://localhost:8000/console/published-projects/demowave/1.0.0/). The new section allows a citation to a paper to be added (but not edited for now).

Example of a project with an associated publication:

Screenshot 2023-07-14 at 5 32 06 PM

Example of a project without an associated publication:

Screenshot 2023-07-14 at 5 31 25 PM

@tompollard tompollard requested a review from briangow July 17, 2023 15:14
@bemoody
Copy link
Collaborator

bemoody commented Jul 18, 2023

Not your fault, but PublishedPublication is rather messy - we only allow people to set a single publication per project, but this isn't enforced by the model.

The Django-ish way to allow editing "zero or more" objects is to use a formset; you can see how PublicationFormSet works in project.views.project_discovery and console.views.copyedit_submission. It's messy and hard to follow, but it might be possible to use more-or-less the same code for PublishedPublication.

Alternatively, you could add a clean method to prevent adding multiple publications. TBH, though, I'd much prefer that if we add a form here, it should be easy to undo if you make a mistake.

class PublishedProjectAddPublication(forms.ModelForm):

If you create a form class, please include "Form" in the name, e.g. AddPublishedPublicationForm.

the PublishedPublication model allows multiple publications to be added to a single project, but by policy we only allow a single publication to be added.
@tompollard
Copy link
Member Author

@bemoody I have updated the form name as suggested (now AddPublishedPublicationForm) and added a clean method to prevent multiple publications. Are you okay for this to be merged?

I haven't added the ability to edit publications mainly because it's extra work to implement this, but also partly because I'm not sure it is desirable to be able to edit the publications willy nilly.

Right now, I just want something that means we don't have to go into the shell so often to add publications. We should think more about what level of editing is actually desirable.

@bemoody
Copy link
Collaborator

bemoody commented Oct 4, 2023

Not tested but looks fine to me.

@tompollard
Copy link
Member Author

Not tested but looks fine to me.

I hereby promise that it works.

@tompollard tompollard merged commit 6c3d475 into dev Oct 5, 2023
8 checks passed
@tompollard tompollard deleted the tp/add_associated_paper branch October 5, 2023 17:09
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.

2 participants