BulkTag via Community APIs #354
No reviewers
Labels
No Label
bug
duplicate
enhancement
help wanted
invalid
question
RDGraph
RSAC
wontfix
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: D-Net/dnet-hadoop#354
Loading…
Reference in New Issue
No description provided.
Delete Branch "bulkTag"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR presents an implementation of the bulk tagging done exploiting the community apis instead of the IS.
The isLookupUrl parameter is no more needed.
One parameter is added:
production
of type boolean to switch between the API in production and in betaI assume the procedure was tested by running the oozie workflow manually and verifying its output, so I'm not going to comment on that part but, although I understand the difficulties in automating the tests, we should try to do better in implementing the unit testing. I left some comments on this regard, so please let me know to what extent they can be addressed.
@ -16,3 +16,3 @@
private final String URL_STRING = "https://sandbox.zenodo.org/api/deposit/depositions";
private final String ACCESS_TOKEN = "";
private final String ACCESS_TOKEN = "OzzOsyucEIHxCEfhlpsMo3myEiwpCza3trCRL7ddfGTAK9xXkIP2MbXd6Vg4";
I'm not sure it is a good idea to hardcode the access token in the project source files.
It is of course not :)
@ -109,0 +113,4 @@
Assertions.assertEquals(201, client.newDeposition());
File file = new File("/Users/miriam.baglioni/Desktop/EOSC_DUMP/publication.tar");
avoid referring to your local filesystem
@ -0,0 +13,4 @@
* @author miriam.baglioni
* @Date 06/10/23
*/
public class QueryCommunityAPI {
Unit tests should not interact with remote endpoints (see point 7 here). To test the new API consider to exploit the annotation
used in the CommunityApiControllerTest.
Thanks for the suggestion. I will implement the testing following that trace
Yes, I have run it on the cluster and verified only that the numbers are "more or less" the same. This is because with the API the configuration can change from a run to another, while what we have done and is on the graph is frozen at a given moment in time
The testing was done in a hurry, just to verify some functionalities. It was not intended to be left like that. I should have removed it before issuing the PR.
I have to remove from common the code related to the Zenodo APIs because I have model it on the dump project (It is used there alone)
I realised now that base URL to the new API implementations available in the beta and prod environments are hardcoded and the
production
parameter allows to select among the two. Please consider to factor it out in a subsequent PR: having the possibility to define the API base URL fits well with the definition of a test case where the API server application is mocked locally.