ga4gh / g2p-team

GitHub Repo for the Genotype to Phenotype Task Team
Apache License 2.0
3 stars 0 forks source link

Duplicated class name:SearchFeaturesRequest,SearchFeaturesResponse #5

Open bwalsh opened 8 years ago

bwalsh commented 8 years ago

Not clear if this is an issue for our team. If inapplicable, please comment.

The G2P schema contains two classes with the same name as classes in SequenceAnnotationMethods

One in the file genotypephenotypemethods.avdl, protocol GenotypePhenotypeMethods

/** This is the response from `POST /genotypephenotype/search` expressed as JSON. */
record SearchFeaturesResponse {
  /**
  The list of matching FeaturePhenotypeAssociation.
  */
  array<org.ga4gh.models.FeaturePhenotypeAssociation> associations = [];
  ...

The second one is found in sequenceAnnotationmethods.avdl

  /** This is the response from `POST /features/search` expressed as JSON. */
  record SearchFeaturesResponse {
    /**
    The list of matching annotations, sorted by start position. Annotations which
    share a start position are returned in a deterministic order.
    */
    array<org.ga4gh.models.Feature> features = [];

    ... 

The avro spec is somewhat imprecise when describing this:

Record, enums and fixed are named types. Each has a fullname that is composed of two parts; a name and a namespace. Equality of names is defined on the fullname.

// then later on ...

... In this case the namespace is taken from the most tightly enclosing schema or protocol. 

It would be simpler to avoid this and name the g2p class something like SearchEvidenceResponse.

bwalsh commented 8 years ago

During today's call, we confirmed:

Recommendation: Rename the GenotypePhenotypeMethods [SearchFeaturesRequest,SearchFeaturesResponse] to [SearchGenotypePhenotypeRequest,SearchGenotypePhenotypeResponse]

I've created an issue in the schema repository to track the actual code change. When it is complete, I'll close this issue

bwalsh commented 8 years ago

This pair of PR will resolve this issue

https://github.com/ga4gh/server/pull/607 https://github.com/ga4gh/schemas/pull/432