new Gcapp(config)
Gcapp exposes Ground Control's high level API
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
config |
Object | configuration
Properties
|
- Source:
Methods
(static) asymdif(a, b) → {Array}
Compute the asymmetric difference between Gcntree A and Gcntree B
Parameters:
Name | Type | Description |
---|---|---|
a |
Gcntree | Gcntree A |
b |
Gcntree | Gcntree B |
- Source:
Returns:
set of node data representing the asymmetric difference
- Type
- Array
(static) checkset_ext(eval_path, std_path) → {Object}
Find which elements of an external evaluation set are resolved for a given external standard
Parameters:
Name | Type | Description |
---|---|---|
eval_path |
string | path to an evaluation set in YML format |
std_path |
string | path to a standard in YML format |
- Source:
Returns:
wrapper for resolved parts and associated metadata, see source code
- Type
- Object
(static) cmp_ext(path1, path2, sch_path) → {Object}
Find the symmetric difference between the sets of nodes in two external standard files, expressed as reciprocal asymmetric differences.
Note that identical standards and permuted standards will return the same result
Parameters:
Name | Type | Description |
---|---|---|
path1 |
string | path to standard A in YML format |
path2 |
string | path to standard B in YML format |
sch_path |
string | path to the standard schema for both standards |
- Source:
Returns:
wraps asymmetric differences, see source code
- Type
- Object
(static) dhash(data) → {string}
Hash a value using the systemwide default hash function
Parameters:
Name | Type | Description |
---|---|---|
data |
any | the value to hash |
- Source:
Returns:
- Type
- string
(static) get_common_vecs(tent_list) → {Array.<string>}
Compute the intersection of sets of vectors over an array of testable entities
Parameters:
Name | Type | Description |
---|---|---|
tent_list |
Array.<module:gctax_tent~Gctax_tent> | the testable entities to compute over |
- Source:
Returns:
an array representing the set of common vectors
- Type
- Array.<string>
(static) get_node_hash(std, n) → {string}
Compute the hash of a node in a standard specified by absolute node number using the default hash function
Parameters:
Name | Type | Description |
---|---|---|
std |
Gcntree | a standard |
n |
number | node number |
- Source:
Returns:
- Type
- string
(static) get_nonscalar_keys(sch) → {Array.<string>}
Return a list of keys corresponding to the nonscalar values in a standard
Parameters:
Name | Type | Description |
---|---|---|
sch |
Object | a standard schema in jsonschema format |
- Source:
Returns:
- Type
- Array.<string>
(static) get_vector_names() → {Array.<string>}
Fetch the systemwide vocabulary of vector names
- Source:
Returns:
- Type
- Array.<string>
(static) load_eval_set_ext(path) → {module:gcstd_eval~Gcstd_eval}
Load an evaluation set from a YML file
Parameters:
Name | Type | Description |
---|---|---|
path |
string | path to an evaluation set in YML format |
- Source:
Returns:
(static) load_group_ext(path) → {module:gctax_group~Gctax_group}
Load a group from a YML file
Parameters:
Name | Type | Description |
---|---|---|
path |
string | path to a group in YML format (assumes relative pathnames) |
- Source:
Returns:
(static) load_schema_ext(path) → {Object}
Load a standard schema (in jsonschema format) from disk
Parameters:
Name | Type | Description |
---|---|---|
path |
string | path to an importable JavaScript module |
- Source:
Returns:
a jsonschema object
- Type
- Object
(static) load_std_ext(std_path, schema_pathopt) → {Gcntree}
Load a standard from a YML file
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
std_path |
string | path to a standard in YML format | |
schema_path |
string |
<optional> |
path to a standard schema for validation (if the schema module exports multiple objects, the 0th is consdered the parent and the following are registered as children) |
- Source:
Returns:
- Type
- Gcntree
(static) load_tent_ext(path) → {module:gctax_tent~Gctax_tent}
Load a testable entity from a YML file
Parameters:
Name | Type | Description |
---|---|---|
path |
string | path to a testable entity in YML format |
- Source:
Returns:
(static) load_vec_map_ext(path) → {module:gctax_vec_map~Gctax_vec_map}
Load a vector map from a YML file
Parameters:
Name | Type | Description |
---|---|---|
path |
string | path to a vector map in YML format |
- Source:
Returns:
(static) make_eval_set(std, nums, nameopt) → {module:gcstd_eval~Gcstd_eval}
Create an evaluation set from a standard
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
std |
Gcntree | the standard to derive evaluations from | |
nums |
Array.<number> | nodes to include, as absolute node numbers | |
name |
string |
<optional> |
name for the evaluation set |
- Source:
Returns:
(static) make_vec_map(std, nums, nameopt) → {module:gctax_vec_map~Gctax_vec_map}
Create a vector map from a standard
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
std |
Gcntree | the standard to derive mappings from | |
nums |
Array.<Array> | a 2D array of absolute node numbers, where the array at nums[i] corresponds to the ith vector name returned by module:gcapp~Gcapp.get_vector_names | |
name |
string |
<optional> |
name for the vector map |
- Source:
Returns:
(static) num_ext(std_path, sch_path, part_id) → {Object}
Compute the absolute node numbers for one part of a standard file (in YML format).
To get part IDs for a standard, see module:gcapp~Gcapp.get_nonscalar_keys
Parameters:
Name | Type | Description |
---|---|---|
std_path |
string | path to a standard in YML format |
sch_path |
string | path to the standard schema for standard std_path |
part_id |
number | part ID |
- Source:
- See:
Returns:
wraps node numbers and associated metadata, see source code
- Type
- Object
(static) testplan_ext(sub_path, std_path, vec_map_path, eval_path) → {Gcapp_tp_res}
Generate a testplan from YML files
Parameters:
Name | Type | Description |
---|---|---|
sub_path |
string | path to a testable entity OR group in YML format |
std_path |
string | path to a standard in YML format |
vec_map_path |
string | path to a vector map in YML format |
eval_path |
string | path to an evaluation set in YML format |
- Source:
Returns:
- Type
- Gcapp_tp_res
(static) text_search_nodes(std, str) → {Array.<Array>}
Search the nodes of a standard for a text string, case sensitive
Parameters:
Name | Type | Description |
---|---|---|
std |
Gcntree | a standard |
str |
string | text string to search for |
- Source:
Returns:
nodes where the string was found, as [node number, node data]
- Type
- Array.<Array>
(static) valid_ext(std_path, sch_path) → {boolean}
Validate an external standard file against a standard schema
Parameters:
Name | Type | Description |
---|---|---|
std_path |
string | path to a standard in YML format |
sch_path |
string | path to the standard schema for standard std_path |
- Source:
Returns:
true if the standard is a valid instance of schema sch_path
- Type
- boolean
(static) write_eval_set_ext(es, notes) → {string}
Write an evaluation set to disk in YML format
Parameters:
Name | Type | Description |
---|---|---|
es |
module:gcstd_eval~Gcstd_eval | the evaluation set to write |
notes |
string | data for the notes field |
- Source:
Returns:
output path
- Type
- string
(static) write_vec_map_ext(vec_map, notes) → {string}
Write a vector map to disk in YML format
Parameters:
Name | Type | Description |
---|---|---|
vec_map |
module:gctax_vec_map~Gctax_vec_map | the vector map to write |
notes |
string | data for the notes field |
- Source:
Returns:
output path
- Type
- string
get_data_modules() → {Array.<Gcstore>}
Return a list of the data modules associated with this instance of Gacpp
- Source:
Returns:
a list of data modules
- Type
- Array.<Gcstore>
init()
Initialize this instance of Gcapp. Must be executed before a new Gcapp object is ready for use
- Source: