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

Feature/1013 add bibtex support #3020

Merged
merged 5 commits into from
Mar 24, 2016

Conversation

bmckinney
Copy link
Contributor

@bmckinney bmckinney commented Mar 16, 2016

RFI Checklist

Before submitting the pull request, fill out sections (1.) Related Issues and (2.) Pull Request Checklist.

1. Related Issues


2. Pull Request Checklist

  • Functionality completed as described in FRD
  • Dependencies, risks, assumptions in FRD addressed
  • Unit tests completed
  • Deployment requirements identified (e.g., SQL scripts, indexing)
  • Documentation completed
  • All code checkins completed

3. Review Checklist

After the pull request has been submitted, fill out this section.

  • Code review completed or waived
  • Testing requirements completed
  • Usability testing completed or waived
  • Support testing completed or waived
  • Merged with develop branch and resolved conflicts

@@ -143,7 +143,8 @@ public BundleDownloadInstance datafileBundle(@PathParam("fileId") Long fileId, @

downloadInstance.setFileCitationEndNote(datasetService.createCitationXML(datasetVersion, fileMetadata));
downloadInstance.setFileCitationRIS(datasetService.createCitationRIS(datasetVersion, fileMetadata));

downloadInstance.setFileCitationBibtex(datasetService.createCitationBibtex(datasetVersion, fileMetadata));
Copy link
Member

Choose a reason for hiding this comment

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

@bmckinney does this mean that the bibtex citation will be available via API?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@pdurbin I believe this means that it will be included in the zip file produced by datafile/bundle/{fileId}

Copy link
Member

Choose a reason for hiding this comment

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

Oh. What if I want to get the citation in bibtex format via API? Might be nice. And you could write an integration test around it.

@amunozj
Copy link

amunozj commented Mar 22, 2016

Will this feature ever make it to the online version? My community is very latex centric, if this is not available, I will probably have to use a different data repository

@scolapasta
Copy link
Contributor

@amunozj if what you're asking is when will this feature be merged into our develop branch (and therefore be on track to be released on Harvard Dataverse as well as other installations), I can't give a certain answer yet. We're planning a new release (4.4) for April and it possibly will get in for that. Otherwise it should make it to 4.5, the next release, which would be in the May / June time frame.

@amunozj
Copy link

amunozj commented Mar 22, 2016

Thank you @scolapasta! I will keep my eyes peeled. This is certainly a feature that dataverse is sorely missing. Figshare, and Zenodo allow users to easily export the citation in a host of different formats.

return createCitationBibtex(version, null);
}

public String createCitationBibtex(DatasetVersion version, FileMetadata fileMetadata) {
Copy link
Member

Choose a reason for hiding this comment

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

@bmckinney I mentioned a while ago that it would be great to have unit tests for this createCitationBibtex method but it hasn't been until today at http://irclog.iq.harvard.edu/dataverse/2016-03-22#i_33154 that I got around to explaining my suggestion. As we discussed, it boils down to using DatasetVersionDTO and FileMetadataDTO objects rather than the non-DTO "entity" equivalents you're using now. To see some DTO objects in action see https://github.com/IQSS/dataverse/blob/v4.3/src/main/java/edu/harvard/iq/dataverse/export/ddi/DdiExportUtil.java and the unit tests that exercise them at https://github.com/IQSS/dataverse/blob/v4.3/src/test/java/edu/harvard/iq/dataverse/export/ddi/DdiExportUtilTest.java

The advantage of using these DTO objects is that you can run the unit tests without having PostgreSQL running.

@scolapasta just asked @kcondon to take a look at this pull request (#3020) so you may want to ping @scolapasta on if he'd like you to add unit tests.

@kcondon
Copy link
Contributor

kcondon commented Mar 24, 2016

OK to merge.

@scolapasta scolapasta merged commit 0c13184 into IQSS:develop Mar 24, 2016
@scolapasta scolapasta added this to the 4.4 milestone Mar 24, 2016
@pdurbin
Copy link
Member

pdurbin commented Mar 24, 2016

@amunozj if you'd like to check out this feature I just deployed "v. 4.3 build 16-origin/develop-0c13184" to http://phoenix.dataverse.org

@bmckinney from a glance it looks good!

@amunozj
Copy link

amunozj commented Mar 24, 2016

@pdurbin Ah! beautiful!!! That is awesome! Great job guys! I super impressed with how responsive you are!

@scolapasta scolapasta modified the milestones: 4.3.1, 4.4 May 12, 2016
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.

5 participants