Skip to content

Commit

Permalink
Merge pull request #1675 from jjgao/master
Browse files Browse the repository at this point in the history
release 1.2.5
  • Loading branch information
jjgao authored Sep 16, 2016
2 parents bb351ae + a2fa34c commit c628bfc
Show file tree
Hide file tree
Showing 67 changed files with 1,235 additions and 591 deletions.
16 changes: 11 additions & 5 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,14 @@ If this is a new visual feature please add a before/after screenshot or gif
here with e.g. [GifGrabber](http://www.gifgrabber.com/).

# Notify reviewers
If your pull request involves changes to an existing file, one or more of the
people that edited before you might be good candidates to review it. Please use
`git blame <filename>` to determine that and notify them here. Otherwise notify
everybody in the core team:
@cBioPortal/core-developers
Read our [Pull request merging
policy](../CONTRIBUTING.md#pull-request-merging-policy). If you are part of the
cBioPortal organization, notify the approprate team (remove inappropriate):

@cBioPortal/frontend
@cBioPortal/backend
@cBioPortal/devops

If you are not part of the cBioPortal organization look at who worked on the
file before you. Please use `git blame <filename>` to determine that
and notify them here:
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,5 @@ nbactions.xml
*/.project
dependency-reduced-pom.xml
/core/nbactions-private.xml
.profile.d/
Procfile
61 changes: 61 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,67 @@ Once you downloaded the images you do the following for each screenshot:
- If the change in the screenshot is **desired**, add the screenshot to the
repo, commit it and push it to your PR's branch.

## Pull Request Merging Policy
Pull Requests (PRs) are reviewed by the
[backend](https://github.com/orgs/cBioPortal/teams/backend),
[frontend](https://github.com/orgs/cBioPortal/teams/frontend) and
[devops](https://github.com/orgs/cBioPortal/teams/devops) teams of cBioPortal.
For each PR the submitter should propose what team(s) is/are appropriate to
review it. This is the current merging policy:

- A documentation change needs one **Approve**
- A simple bugfix to rc or hotfix requires one **Approve**
- A new feature requires two **Approve**. One from someone at MSKCC and one from
another institution.

If these requirements are met, any person with merge rights can merge to rc or
hotfix.

## Pull Request Reviewers Guide
Here we describe the guidelines for the reviewer. Always follow the checks in
general, then follow the other checks that apply:

### General
- Double check all the things in the **Checks** section of the Pull Request.
Remind the submitter if any of them are not fulfilled
- Are the test cases spanning a decent amount of scenarios? It is the
submitters as well as the reviewers responsibility to not let any errors
sneak into the portal.

Bug fixes:

- Should the bug that causes the issue be added as a test case?

New features:

- If this is a new feature make sure the proposed changes are in line with the
current planning of cBioPortal e.g. is the right API used, is this in line
with current refactoring efforts.

### Backend
New features:

- Is the new persistence stack used?

### Frontend
New features:

- What APIs are used to get the data? Is the REST API used?
- Should this be a separate library in a separate repo or should it be part of cBioPortal?
- Are dependencies properly listed? Ideally in a package.json
- How is the package included in cBioPortal?

### Devops
New features:

- Does the configuration style follow the config guidelines? That is compile
(Maven) config goes in the appriopriate `pom.xml` (root, `scripts/`, `portal/`, `core/`).
Runtime (Spring) goes in `portal.properties`. Default values should be in `GlobalProperties.java`.
- Non-stable configuration should be done through war overlays.
- Is the configuration tested as part of Travis CI? It's not a necessity but be
aware that untested configuration will be tough to maintain.
- Is there documentation on the proposed changes?

## Additional Resources

* [cBioPortal Issue Tracker](https://github.com/cBioPortal/cbioportal/issues)
Expand Down
2 changes: 1 addition & 1 deletion business/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>master</artifactId>
<groupId>org.mskcc.cbio</groupId>
<version>1.2.4</version>
<version>1.2.5</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>business</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>master</artifactId>
<groupId>org.mskcc.cbio</groupId>
<version>1.2.4</version>
<version>1.2.5</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,14 @@ public String getOncotatorUniprotName() {
return oncotatorUniprotName;
}

/**
* Set the UniprotKB name (formerly known as ID) of the protein record.
*
* @param oncotatorUniprotName the UniprotKB name
* @deprecated set the accession with
* {@link #setOncotatorUniprotAccession(String)} instead
*/
@Deprecated
public void setOncotatorUniprotName(String oncotatorUniprotName) {
this.oncotatorUniprotName = oncotatorUniprotName;
}
Expand Down Expand Up @@ -835,6 +843,14 @@ public String getOncotatorUniprotName()
return event.getOncotatorUniprotName();
}

/**
* Set the UniprotKB name (formerly known as ID) of the protein record.
*
* @param oncotatorUniprotName the UniprotKB name
* @deprecated set the accession with
* {@link #setOncotatorUniprotAccession(String)} instead
*/
@Deprecated
public void setOncotatorUniprotName(String oncotatorUniprotName)
{
event.setOncotatorUniprotName(oncotatorUniprotName);
Expand Down
61 changes: 58 additions & 3 deletions core/src/main/java/org/mskcc/cbio/portal/model/GeneticProfile.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@

package org.mskcc.cbio.portal.model;

import java.util.Properties;

import org.apache.commons.lang.builder.ToStringBuilder;

/**
Expand All @@ -47,14 +49,15 @@ public class GeneticProfile {
private String profileDescription;
private String targetLine;
private boolean showProfileInAnalysisTab;
private Properties otherMetadataFields;

public GeneticProfile() {
super();
}

public GeneticProfile(String stableId, int cancerStudyId, GeneticAlterationType geneticAlterationType,
String datatype, String profileName, String profileDescription, boolean showProfileInAnalysisTab) {
super();
this();
this.stableId = stableId;
this.cancerStudyId = cancerStudyId;
this.geneticAlterationType = geneticAlterationType;
Expand All @@ -64,6 +67,26 @@ public GeneticProfile(String stableId, int cancerStudyId, GeneticAlterationType
this.showProfileInAnalysisTab = showProfileInAnalysisTab;
}


/**
* Constructs a new genetic profile object with the same attributes as the one given as an argument.
*
* @param template the object to copy
*/
public GeneticProfile(GeneticProfile template) {
this(
template.getStableId(),
template.getCancerStudyId(),
template.getGeneticAlterationType(),
template.getDatatype(),
template.getProfileName(),
template.getProfileDescription(),
template.showProfileInAnalysisTab());
this.setGeneticProfileId(template.geneticProfileId);
this.setTargetLine(template.getTargetLine());
this.setOtherMetadataFields(template.getAllOtherMetadataFields());
}

public int getGeneticProfileId() {
return geneticProfileId;
}
Expand Down Expand Up @@ -135,10 +158,42 @@ public boolean showProfileInAnalysisTab() {
public void setShowProfileInAnalysisTab(boolean showProfileInAnalysisTab) {
this.showProfileInAnalysisTab = showProfileInAnalysisTab;
}


/**
* Stores metadata fields only recognized in particular data file types.
*
* @param fields a properties instance holding the keys and values
*/
public void setOtherMetadataFields(Properties fields) {
this.otherMetadataFields = fields;
}

/**
* Returns all file-specific metadata fields as a Properties object.
*
* @return a properties instance holding the keys and values or null
*/
public Properties getAllOtherMetadataFields() {
return this.otherMetadataFields;
}

/**
* Retrieves metadata fields specific to certain data file types.
*
* @param fieldname the name of the field to retrieve
* @return the value of the field or null
*/
public String getOtherMetaDataField(String fieldname) {
if (otherMetadataFields == null) {
return null;
} else {
return otherMetadataFields.getProperty(fieldname);
}
}

@Override
public String toString() {
return ToStringBuilder.reflectionToString(this);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
*/
public class FetchPfamGraphicsData
{
public static final String URL_PREFIX = "http://pfam.sanger.ac.uk/protein/";
public static final String URL_PREFIX = "http://pfam.xfam.org/protein/";
public static final String URL_SUFFIX = "/graphic";

/**
Expand Down
Loading

0 comments on commit c628bfc

Please sign in to comment.