guidepost 0.2.6__tar.gz → 0.2.8__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: guidepost
3
- Version: 0.2.6
3
+ Version: 0.2.8
4
4
  Summary: Guidepost. An overview visualization for understanding supercomputer queue data.
5
5
  Home-page: https://github.com/cscully-allison/guidepost
6
6
  Author: Connor Scully-Allison
@@ -72,10 +72,10 @@ jobs_data = pd.read_parquet("data/jobs_data.parquet")
72
72
  ### 3. Configure Visualization
73
73
 
74
74
  ```python
75
- gp.vis_data = jobs_data
75
+ gp.vis_data = jobs_data.dropna().to_dict()
76
76
  gp.vis_configs = {
77
- 'x': 'queue_wait',
78
- 'y': 'start_time',
77
+ 'x': 'start_time',
78
+ 'y': 'queue_wait',
79
79
  'color': 'nodes_req',
80
80
  'color_agg': 'avg',
81
81
  'categorical': 'user',
@@ -44,10 +44,10 @@ jobs_data = pd.read_parquet("data/jobs_data.parquet")
44
44
  ### 3. Configure Visualization
45
45
 
46
46
  ```python
47
- gp.vis_data = jobs_data
47
+ gp.vis_data = jobs_data.dropna().to_dict()
48
48
  gp.vis_configs = {
49
- 'x': 'queue_wait',
50
- 'y': 'start_time',
49
+ 'x': 'start_time',
50
+ 'y': 'queue_wait',
51
51
  'color': 'nodes_req',
52
52
  'color_agg': 'avg',
53
53
  'categorical': 'user',
@@ -1879,8 +1879,17 @@ class Validator{
1879
1879
  * @returns {boolean} - True if the string is a valid date, false otherwise.
1880
1880
  */
1881
1881
  isValidDate(dateString) {
1882
- const date = new Date(dateString);
1883
- return !isNaN(date.getTime());
1882
+ const date_time = new Date(dateString);
1883
+ console.log("AAAAA", date_time.getTime());
1884
+ return !isNaN(date_time.getTime());
1885
+ }
1886
+
1887
+ validate_data_loaded(){
1888
+ if(Object.keys(this.data).length == 0){
1889
+ return [{key:'data', value:'data', message:"No data detected. Please load data into <objectname>.vis_data"}];
1890
+ }
1891
+
1892
+ return [];
1884
1893
  }
1885
1894
 
1886
1895
 
@@ -1912,10 +1921,13 @@ class Validator{
1912
1921
 
1913
1922
  validate(){
1914
1923
  let errors = [];
1915
-
1916
- errors = this.validate_config_fields();
1924
+
1925
+ errors = this.validate_data_loaded();
1926
+ errors = errors.concat(this.validate_config_fields());
1917
1927
  errors = errors.concat(this.validate_var_specs());
1918
1928
 
1929
+ //CONDITION WHERE ALL OTHER PARTS OF DATA ARE VALID
1930
+ // SO THERE WILL NOT BE OBJECT/KEY ACCESS ERRORS
1919
1931
  if(errors.length <= 0){
1920
1932
  errors = this.validate_variable_semantics();
1921
1933
  }
@@ -1980,12 +1992,13 @@ class Validator{
1980
1992
  let test_val = this.data[this.var_specs[key]][Object.keys(this.data[this.var_specs[key]])[0]];
1981
1993
  if (typeof test_val !== 'number'){
1982
1994
  if(typeof test_val == 'string'){
1983
- if(!isValidDate(test_val)){
1984
- incorrect.push({ key: key, value: this.var_specs[key], message: 'The x-axis only supports floats, integers and dates. Please specify a different variable or verify that the datetime is properly formatted.' });
1995
+ if(!this.isValidDate(test_val)){
1996
+ incorrect.push({ key: key, value: this.var_specs[key], message: 'The x-axis aaaaa only supports floats, integers and dates. Please specify a different variable or verify that the datetime is properly formatted.' });
1985
1997
  }
1986
1998
  }
1987
-
1988
- incorrect.push({ key: key, value: this.var_specs[key], message: 'The x-axis only supports floats, integers and dates. Please specify a different variable or verify that the datetime is properly formatted.' });
1999
+ else {
2000
+ incorrect.push({ key: key, value: this.var_specs[key], message: 'The x-axis bbbbbb only supports floats, integers and dates. Please specify a different variable or verify that the datetime is properly formatted.' });
2001
+ }
1989
2002
  }
1990
2003
  }
1991
2004
  else if (key === 'y') {
@@ -2065,13 +2078,9 @@ function render({model, el}){
2065
2078
  let validator = new Validator(svg, data, var_specs);
2066
2079
  let is_valid = validator.validate();
2067
2080
 
2068
- if(Object.keys(data).length == 0){
2069
- first_text = svg.append('text').text('No data detected. Please load data into <objectname>.vis_data').attr('x', 15).attr('y', 15);
2070
- } else{
2071
- if(is_valid){
2072
- let jsmodel = new JSModel(data, var_specs, model);
2073
- create_views(jsmodel, svg);
2074
- }
2081
+ if(is_valid){
2082
+ let jsmodel = new JSModel(data, var_specs, model);
2083
+ create_views(jsmodel, svg);
2075
2084
  }
2076
2085
 
2077
2086
  model.on("change:vis_configs", ()=>{
@@ -0,0 +1,2 @@
1
+ __version_info__ = ("0", "2", "8")
2
+ __version__ = ".".join(__version_info__)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: guidepost
3
- Version: 0.2.6
3
+ Version: 0.2.8
4
4
  Summary: Guidepost. An overview visualization for understanding supercomputer queue data.
5
5
  Home-page: https://github.com/cscully-allison/guidepost
6
6
  Author: Connor Scully-Allison
@@ -72,10 +72,10 @@ jobs_data = pd.read_parquet("data/jobs_data.parquet")
72
72
  ### 3. Configure Visualization
73
73
 
74
74
  ```python
75
- gp.vis_data = jobs_data
75
+ gp.vis_data = jobs_data.dropna().to_dict()
76
76
  gp.vis_configs = {
77
- 'x': 'queue_wait',
78
- 'y': 'start_time',
77
+ 'x': 'start_time',
78
+ 'y': 'queue_wait',
79
79
  'color': 'nodes_req',
80
80
  'color_agg': 'avg',
81
81
  'categorical': 'user',
@@ -1,2 +0,0 @@
1
- __version_info__ = ("0", "2", "6")
2
- __version__ = ".".join(__version_info__)
File without changes
File without changes
File without changes
File without changes