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

3156 system api #3165

Closed
wants to merge 2 commits into from
Closed

Conversation

jacksonokuhn
Copy link

@jacksonokuhn jacksonokuhn commented Jun 9, 2016

RFI Checklist

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

1. Related Issues

#3156 Expose Customized Publish Popup Message through API-Publish


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

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.0007%) to 5.131% when pulling 929a233 on jacksonokuhn:3156-systemAPI into 2935cde on IQSS:develop.

@pdurbin
Copy link
Member

pdurbin commented Jun 10, 2016

@jacksonokuhn this is fantastic progress!

As I mentioned at #3156 (comment) please add a "System" section to the Native API page. Here's a handy link for you:

https://github.com/jacksonokuhn/dataverse/blob/3156-systemAPI/doc/sphinx-guides/source/api/native-api.rst

I forgot to mention that you should also update https://github.com/jacksonokuhn/dataverse/blob/3156-systemAPI/doc/sphinx-guides/source/installation/config.rst#database-settings to list the setting you added. This will reveal a bug in your code (or at least a miscommunication on requirements). Your setting should start with a colon to be like the others. I dug up an old email from @michbarsinai about why the colon is in there and on 2104-11-19 he wrote, "It was just a way to manage namespace. Since anyone can put an assignment name, things could get hairy. Especially since the pluggable auth plug-ins are allowed to use it. So I added the enums (also good for preventing type errors) and added the ':' prefix to ensure they are unique." This was before Dataverse 4 was deployed in production so at this point we should just live with the colons. Please make use of SettingsServiceBean.Key.DatasetPublishPopupCustomText rather than hard-coding a string that may change.

I believe that's all you'll need to check the "Documentation completed" box for a pull request. It's better to have all boxes ready to check before making your pull request.

I can't see the output of the endpoint of API endpoint you added from the SysIT.java. Locally, I ended up rewriting your method like this so I could add a prettyPrint() line:

   Response getDatasetPopupCustomText = given().urlEncodingEnabled(false)
            .get("/api/system/settings/:DatasetPublishPopupCustomText");
    getDatasetPopupCustomText.prettyPrint();
    getDatasetPopupCustomText.then().assertThat().statusCode(200)
            .body("data.DatasetPublishPopupCustomText", equalTo("Hello world!"));

Maybe there's another way. I'm really not sure.

Please remove lib/unknown/binary/javax.ws.rs-api-2.0/SNAPSHOT/javax.ws.rs-api-2.0-SNAPSHOT.jar . That binary is small but it's in your branch's git history at this point so it would be cleaner to make a new branch and a new pull request.

No wildcard "*" imports, please. In Netbeans, please run code you've added or change through Source -> Format.

That's everything I can think of right now. Please let me know if anything is unclear.

jacksonokuhn added a commit to jacksonokuhn/dataverse that referenced this pull request Jun 10, 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.

3 participants