Skip to content

Commit

Permalink
Merge pull request #69 from kbaseapps/remake
Browse files Browse the repository at this point in the history
Remake
  • Loading branch information
JamesJeffryes committed Jul 16, 2018
2 parents 3815744 + d2de54b commit ac59f4b
Show file tree
Hide file tree
Showing 7 changed files with 120 additions and 76 deletions.
4 changes: 2 additions & 2 deletions lib/fba_tools/authclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class KBaseAuth(object):
A very basic KBase auth client for the Python server.
'''

_LOGIN_URL = 'https://kbase.us/services/authorization/Sessions/Login'
_LOGIN_URL = 'https://kbase.us/services/auth/api/legacy/KBase/Sessions/Login'

def __init__(self, auth_url=None):
'''
Expand All @@ -84,7 +84,7 @@ def get_user(self, token):
ret.raise_for_status()
raise ValueError('Error connecting to auth service: {} {}\n{}'
.format(ret.status_code, ret.reason,
err['error_msg']))
err['error']['message']))

user = ret.json()['user_id']
self._cache.add_valid_token(token, user)
Expand Down
28 changes: 18 additions & 10 deletions lib/fba_tools/fba_toolsClient.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1623,12 +1623,10 @@ Identifies reactions in the model that are not mass balanced
$params is a fba_tools.PredictAuxotrophyParams
$results is a fba_tools.PredictAuxotrophyResults
PredictAuxotrophyParams is a reference to a hash where the following keys are defined:
genome_id has a value which is a fba_tools.genome_id
media_output_id has a value which is a fba_tools.media_id
genome_ids has a value which is a reference to a list where each element is a fba_tools.genome_id
genome_workspace has a value which is a fba_tools.workspace_name
workspace has a value which is a fba_tools.workspace_name
genome_id is a string
media_id is a string
workspace_name is a string
PredictAuxotrophyResults is a reference to a hash where the following keys are defined:
new_report_ref has a value which is a fba_tools.ws_report_id
Expand All @@ -1643,12 +1641,10 @@ ws_report_id is a string
$params is a fba_tools.PredictAuxotrophyParams
$results is a fba_tools.PredictAuxotrophyResults
PredictAuxotrophyParams is a reference to a hash where the following keys are defined:
genome_id has a value which is a fba_tools.genome_id
media_output_id has a value which is a fba_tools.media_id
genome_ids has a value which is a reference to a list where each element is a fba_tools.genome_id
genome_workspace has a value which is a fba_tools.workspace_name
workspace has a value which is a fba_tools.workspace_name
genome_id is a string
media_id is a string
workspace_name is a string
PredictAuxotrophyResults is a reference to a hash where the following keys are defined:
new_report_ref has a value which is a fba_tools.ws_report_id
Expand Down Expand Up @@ -2426,7 +2422,9 @@ ModelObjectSelectionParams is a reference to a hash where the following keys are
workspace_name has a value which is a string
model_name has a value which is a string
save_to_shock has a value which is a fba_tools.boolean
fulldb has a value which is a fba_tools.bool
boolean is an int
bool is an int
File is a reference to a hash where the following keys are defined:
path has a value which is a string
shock_id has a value which is a string
Expand All @@ -2443,7 +2441,9 @@ ModelObjectSelectionParams is a reference to a hash where the following keys are
workspace_name has a value which is a string
model_name has a value which is a string
save_to_shock has a value which is a fba_tools.boolean
fulldb has a value which is a fba_tools.bool
boolean is an int
bool is an int
File is a reference to a hash where the following keys are defined:
path has a value which is a string
shock_id has a value which is a string
Expand Down Expand Up @@ -2524,7 +2524,9 @@ ModelObjectSelectionParams is a reference to a hash where the following keys are
workspace_name has a value which is a string
model_name has a value which is a string
save_to_shock has a value which is a fba_tools.boolean
fulldb has a value which is a fba_tools.bool
boolean is an int
bool is an int
File is a reference to a hash where the following keys are defined:
path has a value which is a string
shock_id has a value which is a string
Expand All @@ -2541,7 +2543,9 @@ ModelObjectSelectionParams is a reference to a hash where the following keys are
workspace_name has a value which is a string
model_name has a value which is a string
save_to_shock has a value which is a fba_tools.boolean
fulldb has a value which is a fba_tools.bool
boolean is an int
bool is an int
File is a reference to a hash where the following keys are defined:
path has a value which is a string
shock_id has a value which is a string
Expand Down Expand Up @@ -2622,7 +2626,9 @@ ModelObjectSelectionParams is a reference to a hash where the following keys are
workspace_name has a value which is a string
model_name has a value which is a string
save_to_shock has a value which is a fba_tools.boolean
fulldb has a value which is a fba_tools.bool
boolean is an int
bool is an int
ModelTsvFiles is a reference to a hash where the following keys are defined:
compounds_file has a value which is a fba_tools.File
reactions_file has a value which is a fba_tools.File
Expand All @@ -2642,7 +2648,9 @@ ModelObjectSelectionParams is a reference to a hash where the following keys are
workspace_name has a value which is a string
model_name has a value which is a string
save_to_shock has a value which is a fba_tools.boolean
fulldb has a value which is a fba_tools.bool
boolean is an int
bool is an int
ModelTsvFiles is a reference to a hash where the following keys are defined:
compounds_file has a value which is a fba_tools.File
reactions_file has a value which is a fba_tools.File
Expand Down Expand Up @@ -6586,8 +6594,7 @@ new_report_ref has a value which is a fba_tools.ws_report_id
<pre>
a reference to a hash where the following keys are defined:
genome_id has a value which is a fba_tools.genome_id
media_output_id has a value which is a fba_tools.media_id
genome_ids has a value which is a reference to a list where each element is a fba_tools.genome_id
genome_workspace has a value which is a fba_tools.workspace_name
workspace has a value which is a fba_tools.workspace_name
Expand All @@ -6598,8 +6605,7 @@ workspace has a value which is a fba_tools.workspace_name
=begin text
a reference to a hash where the following keys are defined:
genome_id has a value which is a fba_tools.genome_id
media_output_id has a value which is a fba_tools.media_id
genome_ids has a value which is a reference to a list where each element is a fba_tools.genome_id
genome_workspace has a value which is a fba_tools.workspace_name
workspace has a value which is a fba_tools.workspace_name
Expand Down Expand Up @@ -7138,6 +7144,7 @@ a reference to a hash where the following keys are defined:
workspace_name has a value which is a string
model_name has a value which is a string
save_to_shock has a value which is a fba_tools.boolean
fulldb has a value which is a fba_tools.bool
</pre>
Expand All @@ -7149,6 +7156,7 @@ a reference to a hash where the following keys are defined:
workspace_name has a value which is a string
model_name has a value which is a string
save_to_shock has a value which is a fba_tools.boolean
fulldb has a value which is a fba_tools.bool
=end text
Expand Down
20 changes: 11 additions & 9 deletions lib/fba_tools/fba_toolsClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,12 +403,11 @@ def predict_auxotrophy(self, params, context=None):
"""
Identifies reactions in the model that are not mass balanced
:param params: instance of type "PredictAuxotrophyParams" ->
structure: parameter "genome_id" of type "genome_id" (A string
representing a Genome id.), parameter "media_output_id" of type
"media_id" (A string representing a Media id.), parameter
"genome_workspace" of type "workspace_name" (A string representing
a workspace name.), parameter "workspace" of type "workspace_name"
(A string representing a workspace name.)
structure: parameter "genome_ids" of list of type "genome_id" (A
string representing a Genome id.), parameter "genome_workspace" of
type "workspace_name" (A string representing a workspace name.),
parameter "workspace" of type "workspace_name" (A string
representing a workspace name.)
:returns: instance of type "PredictAuxotrophyResults" -> structure:
parameter "new_report_ref" of type "ws_report_id" (The workspace
ID for a Report object @id ws KBaseReport.Report)
Expand Down Expand Up @@ -565,7 +564,8 @@ def model_to_excel_file(self, model, context=None):
:param model: instance of type "ModelObjectSelectionParams" ->
structure: parameter "workspace_name" of String, parameter
"model_name" of String, parameter "save_to_shock" of type
"boolean" (A boolean - 0 for false, 1 for true. @range (0, 1))
"boolean" (A boolean - 0 for false, 1 for true. @range (0, 1)),
parameter "fulldb" of type "bool" (A binary boolean)
:returns: instance of type "File" -> structure: parameter "path" of
String, parameter "shock_id" of String
"""
Expand All @@ -578,7 +578,8 @@ def model_to_sbml_file(self, model, context=None):
:param model: instance of type "ModelObjectSelectionParams" ->
structure: parameter "workspace_name" of String, parameter
"model_name" of String, parameter "save_to_shock" of type
"boolean" (A boolean - 0 for false, 1 for true. @range (0, 1))
"boolean" (A boolean - 0 for false, 1 for true. @range (0, 1)),
parameter "fulldb" of type "bool" (A binary boolean)
:returns: instance of type "File" -> structure: parameter "path" of
String, parameter "shock_id" of String
"""
Expand All @@ -591,7 +592,8 @@ def model_to_tsv_file(self, model, context=None):
:param model: instance of type "ModelObjectSelectionParams" ->
structure: parameter "workspace_name" of String, parameter
"model_name" of String, parameter "save_to_shock" of type
"boolean" (A boolean - 0 for false, 1 for true. @range (0, 1))
"boolean" (A boolean - 0 for false, 1 for true. @range (0, 1)),
parameter "fulldb" of type "bool" (A binary boolean)
:returns: instance of type "ModelTsvFiles" -> structure: parameter
"compounds_file" of type "File" -> structure: parameter "path" of
String, parameter "shock_id" of String, parameter "reactions_file"
Expand Down
28 changes: 18 additions & 10 deletions lib/fba_tools/fba_toolsImpl.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1780,12 +1780,10 @@ sub check_model_mass_balance
$params is a fba_tools.PredictAuxotrophyParams
$results is a fba_tools.PredictAuxotrophyResults
PredictAuxotrophyParams is a reference to a hash where the following keys are defined:
genome_id has a value which is a fba_tools.genome_id
media_output_id has a value which is a fba_tools.media_id
genome_ids has a value which is a reference to a list where each element is a fba_tools.genome_id
genome_workspace has a value which is a fba_tools.workspace_name
workspace has a value which is a fba_tools.workspace_name
genome_id is a string
media_id is a string
workspace_name is a string
PredictAuxotrophyResults is a reference to a hash where the following keys are defined:
new_report_ref has a value which is a fba_tools.ws_report_id
Expand All @@ -1800,12 +1798,10 @@ ws_report_id is a string
$params is a fba_tools.PredictAuxotrophyParams
$results is a fba_tools.PredictAuxotrophyResults
PredictAuxotrophyParams is a reference to a hash where the following keys are defined:
genome_id has a value which is a fba_tools.genome_id
media_output_id has a value which is a fba_tools.media_id
genome_ids has a value which is a reference to a list where each element is a fba_tools.genome_id
genome_workspace has a value which is a fba_tools.workspace_name
workspace has a value which is a fba_tools.workspace_name
genome_id is a string
media_id is a string
workspace_name is a string
PredictAuxotrophyResults is a reference to a hash where the following keys are defined:
new_report_ref has a value which is a fba_tools.ws_report_id
Expand Down Expand Up @@ -2609,7 +2605,9 @@ ModelObjectSelectionParams is a reference to a hash where the following keys are
workspace_name has a value which is a string
model_name has a value which is a string
save_to_shock has a value which is a fba_tools.boolean
fulldb has a value which is a fba_tools.bool
boolean is an int
bool is an int
File is a reference to a hash where the following keys are defined:
path has a value which is a string
shock_id has a value which is a string
Expand All @@ -2626,7 +2624,9 @@ ModelObjectSelectionParams is a reference to a hash where the following keys are
workspace_name has a value which is a string
model_name has a value which is a string
save_to_shock has a value which is a fba_tools.boolean
fulldb has a value which is a fba_tools.bool
boolean is an int
bool is an int
File is a reference to a hash where the following keys are defined:
path has a value which is a string
shock_id has a value which is a string
Expand Down Expand Up @@ -2701,7 +2701,9 @@ ModelObjectSelectionParams is a reference to a hash where the following keys are
workspace_name has a value which is a string
model_name has a value which is a string
save_to_shock has a value which is a fba_tools.boolean
fulldb has a value which is a fba_tools.bool
boolean is an int
bool is an int
File is a reference to a hash where the following keys are defined:
path has a value which is a string
shock_id has a value which is a string
Expand All @@ -2718,7 +2720,9 @@ ModelObjectSelectionParams is a reference to a hash where the following keys are
workspace_name has a value which is a string
model_name has a value which is a string
save_to_shock has a value which is a fba_tools.boolean
fulldb has a value which is a fba_tools.bool
boolean is an int
bool is an int
File is a reference to a hash where the following keys are defined:
path has a value which is a string
shock_id has a value which is a string
Expand Down Expand Up @@ -2789,7 +2793,9 @@ ModelObjectSelectionParams is a reference to a hash where the following keys are
workspace_name has a value which is a string
model_name has a value which is a string
save_to_shock has a value which is a fba_tools.boolean
fulldb has a value which is a fba_tools.bool
boolean is an int
bool is an int
ModelTsvFiles is a reference to a hash where the following keys are defined:
compounds_file has a value which is a fba_tools.File
reactions_file has a value which is a fba_tools.File
Expand All @@ -2809,7 +2815,9 @@ ModelObjectSelectionParams is a reference to a hash where the following keys are
workspace_name has a value which is a string
model_name has a value which is a string
save_to_shock has a value which is a fba_tools.boolean
fulldb has a value which is a fba_tools.bool
boolean is an int
bool is an int
ModelTsvFiles is a reference to a hash where the following keys are defined:
compounds_file has a value which is a fba_tools.File
reactions_file has a value which is a fba_tools.File
Expand Down Expand Up @@ -6540,8 +6548,7 @@ new_report_ref has a value which is a fba_tools.ws_report_id
<pre>
a reference to a hash where the following keys are defined:
genome_id has a value which is a fba_tools.genome_id
media_output_id has a value which is a fba_tools.media_id
genome_ids has a value which is a reference to a list where each element is a fba_tools.genome_id
genome_workspace has a value which is a fba_tools.workspace_name
workspace has a value which is a fba_tools.workspace_name
Expand All @@ -6552,8 +6559,7 @@ workspace has a value which is a fba_tools.workspace_name
=begin text
a reference to a hash where the following keys are defined:
genome_id has a value which is a fba_tools.genome_id
media_output_id has a value which is a fba_tools.media_id
genome_ids has a value which is a reference to a list where each element is a fba_tools.genome_id
genome_workspace has a value which is a fba_tools.workspace_name
workspace has a value which is a fba_tools.workspace_name
Expand Down Expand Up @@ -7092,6 +7098,7 @@ a reference to a hash where the following keys are defined:
workspace_name has a value which is a string
model_name has a value which is a string
save_to_shock has a value which is a fba_tools.boolean
fulldb has a value which is a fba_tools.bool
</pre>
Expand All @@ -7103,6 +7110,7 @@ a reference to a hash where the following keys are defined:
workspace_name has a value which is a string
model_name has a value which is a string
save_to_shock has a value which is a fba_tools.boolean
fulldb has a value which is a fba_tools.bool
=end text
Expand Down
22 changes: 20 additions & 2 deletions lib/src/us/kbase/fbatools/ModelObjectSelectionParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
@JsonPropertyOrder({
"workspace_name",
"model_name",
"save_to_shock"
"save_to_shock",
"fulldb"
})
public class ModelObjectSelectionParams {

Expand All @@ -31,6 +32,8 @@ public class ModelObjectSelectionParams {
private String modelName;
@JsonProperty("save_to_shock")
private Long saveToShock;
@JsonProperty("fulldb")
private Long fulldb;
private Map<String, Object> additionalProperties = new HashMap<String, Object>();

@JsonProperty("workspace_name")
Expand Down Expand Up @@ -78,6 +81,21 @@ public ModelObjectSelectionParams withSaveToShock(Long saveToShock) {
return this;
}

@JsonProperty("fulldb")
public Long getFulldb() {
return fulldb;
}

@JsonProperty("fulldb")
public void setFulldb(Long fulldb) {
this.fulldb = fulldb;
}

public ModelObjectSelectionParams withFulldb(Long fulldb) {
this.fulldb = fulldb;
return this;
}

@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
Expand All @@ -90,7 +108,7 @@ public void setAdditionalProperties(String name, Object value) {

@Override
public String toString() {
return ((((((((("ModelObjectSelectionParams"+" [workspaceName=")+ workspaceName)+", modelName=")+ modelName)+", saveToShock=")+ saveToShock)+", additionalProperties=")+ additionalProperties)+"]");
return ((((((((((("ModelObjectSelectionParams"+" [workspaceName=")+ workspaceName)+", modelName=")+ modelName)+", saveToShock=")+ saveToShock)+", fulldb=")+ fulldb)+", additionalProperties=")+ additionalProperties)+"]");
}

}
Loading

0 comments on commit ac59f4b

Please sign in to comment.