Arts-of-coding commited on
Commit
474bb7d
1 Parent(s): a234381

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +9 -11
main.py CHANGED
@@ -14,7 +14,6 @@ import polars as pl
14
  import os
15
  pl.enable_string_cache(False)
16
 
17
- # Set custom resolution for plots:
18
  config_fig = {
19
  'toImageButtonOptions': {
20
  'format': 'svg',
@@ -24,19 +23,11 @@ config_fig = {
24
  'scale': 1,
25
  }
26
  }
27
-
28
  from adlfs import AzureBlobFileSystem
29
  mountpount=os.environ['AZURE_MOUNT_POINT'],
30
  AZURE_STORAGE_ACCESS_KEY=os.getenv('AZURE_STORAGE_ACCESS_KEY')
31
  AZURE_STORAGE_ACCOUNT=os.getenv('AZURE_STORAGE_ACCOUNT')
32
 
33
- filepath = 'az://dataliu/sc_liu_umap_clusres_ctrl_03102023.parquet'
34
-
35
- storage_options={'account_name': AZURE_STORAGE_ACCOUNT, 'account_key': AZURE_STORAGE_ACCESS_KEY,'anon': False}
36
- #azfs = AzureBlobFileSystem(**storage_options )
37
-
38
- df = pl.read_parquet(filepath,storage_options=storage_options)
39
-
40
  # Load in config file
41
  config_path = "./data/config.yaml"
42
 
@@ -47,12 +38,19 @@ def read_config(filename):
47
  return config
48
 
49
  config = read_config(config_path)
50
- #path_parquet = config.get("path_parquet")
51
  conditions = config.get("conditions")
52
  col_features = config.get("col_features")
53
  col_counts = config.get("col_counts")
54
  col_mt = config.get("col_mt")
55
- #df = df.rename({"__index_level_0__": "Unnamed: 0"})
 
 
 
 
 
 
 
56
 
57
  # Setup the app
58
  external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css']
 
14
  import os
15
  pl.enable_string_cache(False)
16
 
 
17
  config_fig = {
18
  'toImageButtonOptions': {
19
  'format': 'svg',
 
23
  'scale': 1,
24
  }
25
  }
 
26
  from adlfs import AzureBlobFileSystem
27
  mountpount=os.environ['AZURE_MOUNT_POINT'],
28
  AZURE_STORAGE_ACCESS_KEY=os.getenv('AZURE_STORAGE_ACCESS_KEY')
29
  AZURE_STORAGE_ACCOUNT=os.getenv('AZURE_STORAGE_ACCOUNT')
30
 
 
 
 
 
 
 
 
31
  # Load in config file
32
  config_path = "./data/config.yaml"
33
 
 
38
  return config
39
 
40
  config = read_config(config_path)
41
+ path_parquet = config.get("path_parquet")
42
  conditions = config.get("conditions")
43
  col_features = config.get("col_features")
44
  col_counts = config.get("col_counts")
45
  col_mt = config.get("col_mt")
46
+
47
+ filepath = f"az://{path_parquet}"
48
+
49
+ storage_options={'account_name': AZURE_STORAGE_ACCOUNT, 'account_key': AZURE_STORAGE_ACCESS_KEY,'anon': False}
50
+ #azfs = AzureBlobFileSystem(**storage_options )
51
+
52
+ df = pl.read_parquet(filepath,storage_options=storage_options)
53
+ #abfs = AzureBlobFileSystem(account_name=accountname,account_key=accountkey)
54
 
55
  # Setup the app
56
  external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css']