-
Notifications
You must be signed in to change notification settings - Fork 21
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
Identifierv2 #118
Identifierv2 #118
Conversation
@Autowired | ||
private VariantWithSamplesAndAnnotationsService service; | ||
|
||
@GetMapping(value = "/{identifierId}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would leave this as "identifier". Id is a shorthand of identifier anyway
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed :)
new ParameterizedTypeReference<List<Variant>>() { | ||
}); | ||
assertEquals(HttpStatus.OK, response.getStatusCode()); | ||
assertTrue(response.getBody().size() > 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
checking at least the important fields like chromosome and position and alleles would be nice. just in case we are returning an object will all fields as null.
Applies to the other test class too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed 😃
new ParameterizedTypeReference<List<Variant>>() { | ||
}); | ||
assertEquals(HttpStatus.OK, response.getStatusCode()); | ||
assertEquals("20", response.getBody().get(0).getChromosome()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you could assign response.getBody().get(0)
to a variable, to make the next statements more meaningful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed :)
eva-server/src/test/java/uk/ac/ebi/eva/server/ws/IdentifierWSServerV2IntegrationTest.java
Outdated
Show resolved
Hide resolved
eva-server/src/test/java/uk/ac/ebi/eva/server/ws/IdentifierWSServerV2Test.java
Show resolved
Hide resolved
eva-server/src/test/java/uk/ac/ebi/eva/server/ws/IdentifierWSServerV2Test.java
Show resolved
Hide resolved
Co-Authored-By: Cristina Yenyxe Gonzalez Garcia <cyenyxe@ebi.ac.uk>
I tried deploying this locally, and it looks fine. My only comment would be to improve the description of the parameters, like adding an example, explaining that the species and assembly can be looked up in |
assertEquals("A", variantList.get(0).getReference()); | ||
assertEquals(60100L, variantList.get(0).getStart()); | ||
assertEquals(60100L, variantList.get(0).getEnd()); | ||
assertTrue(variantList.size() > 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This assert should be executed before trying to access the first element in the list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed :)
assertEquals("1", variantList.get(0).getChromosome()); | ||
assertEquals("T", variantList.get(0).getAlternate()); | ||
assertEquals("A", variantList.get(0).getReference()); | ||
assertTrue(variantList.size() > 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This assert should be executed before trying to access the first element in the list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed 👍
public ResponseEntity getVariants( | ||
@ApiParam(value = "RS or SS identifier of a variant, e.g.: rs55880202", required = true) @PathVariable | ||
String identifier, | ||
@ApiParam(value = "Allowed values can be looked up in /v1/meta/species/list/ in the field named " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First letter of the genus, followed by the full species name, e.g. hsapiens. Allowed values can be looked up in /v1/meta/species/list/ in the field named 'taxonomyCode'.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed :)
String identifier, | ||
@ApiParam(value = "Allowed values can be looked up in /v1/meta/species/list/ in the field named " | ||
+ "taxonomyCode, e.g.: hsapiens", required = true) @RequestParam String species, | ||
@ApiParam(value = "Allowed values can be looked up in /v1/meta/species/list/ in the field named " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Encoded assembly name, e.g. grch37. Allowed values can be looked up in /v1/meta/species/list/ in the field named 'assemblyCode'.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed :)
No description provided.