halib 0.2.34__py3-none-any.whl → 0.2.35__py3-none-any.whl

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.
halib/utils/plotly_op.py CHANGED
@@ -109,25 +109,13 @@ class PlotlyUtils:
109
109
  # 5. Prepare Table Display
110
110
  # Clean up columns: Move exp_id to front, drop internal numeric_id
111
111
  cols = ["exp_id"] + [c for c in df.columns if c not in ["exp_id", "numeric_id"]]
112
+ cols = [col for col in cols if col not in exclude_dims]
113
+
112
114
  df_display = df[cols].copy()
113
115
  df_display.insert(0, "Selection", '<button class="select-btn">Select</button>')
114
116
 
115
117
  chart_html = fig.to_html(full_html=False, include_plotlyjs="cdn")
116
118
 
117
- # Create a display copy with a 'Select' button column
118
- df_display = df.copy()
119
- df_display_cols = df_display.columns.tolist()
120
- # move 'exp_id' to the front for better visibility
121
- if "exp_id" in df_display_cols:
122
- df_display_cols.insert(
123
- 0, df_display_cols.pop(df_display_cols.index("exp_id"))
124
- )
125
- df_display = df_display[df_display_cols]
126
- # remove 'numeric_id' from display
127
- if "numeric_id" in df_display.columns:
128
- df_display = df_display.drop(columns=["numeric_id"])
129
- df_display.insert(0, "Selection", '<button class="select-btn">Select</button>')
130
-
131
119
  table_html = df_display.to_html(
132
120
  classes="display nowrap", table_id="exp_table", index=False, escape=False
133
121
  )
@@ -141,16 +129,42 @@ class PlotlyUtils:
141
129
  <script type="text/javascript" charset="utf8" src="https://code.jquery.com/jquery-3.5.1.js"></script>
142
130
  <script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.11.5/js/jquery.dataTables.js"></script>
143
131
  <style>
144
- body {{ font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; margin: 20px; background-color: #f0f2f5; }}
145
- .container {{ background: white; padding: 30px; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.08); }}
132
+ body {{
133
+ font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
134
+ margin: 20px;
135
+ background-color: #f0f2f5;
136
+ }}
137
+ .container {{
138
+ background: white;
139
+ padding: 30px;
140
+ border-radius: 12px;
141
+ box-shadow: 0 4px 20px rgba(0,0,0,0.08);
142
+ }}
143
+
144
+ /* --- TABLE FONT SIZE FIX --- */
145
+ table.dataTable {{
146
+ font-size: 11px; /* Smaller overall text */
147
+ }}
148
+ table.dataTable thead th {{
149
+ background-color: #333;
150
+ color: white;
151
+ padding: 8px !important;
152
+ font-size: 12px;
153
+ }}
154
+ table.dataTable tbody td {{
155
+ padding: 4px 8px !important; /* Compact rows */
156
+ }}
157
+
146
158
  #exp_table tbody tr:nth-child(even), #selected_table tbody tr:nth-child(even) {{ background-color: #f2f2f2; }}
147
159
  #exp_table tbody tr:nth-child(odd), #selected_table tbody tr:nth-child(odd) {{ background-color: #ffffff; }}
148
160
  #exp_table tbody tr:hover, #selected_table tbody tr:hover {{ background-color: #e0e0e0; }}
149
- table.dataTable thead th {{ background-color: #333; color: white; padding: 12px; }}
161
+
150
162
  h2 {{ color: #2c3e50; border-bottom: 2px solid #eee; padding-bottom: 10px; margin-top: 40px; }}
151
- .select-btn {{ background-color: #28a745; color: white; border: none; padding: 5px 10px; cursor: pointer; border-radius: 4px; }}
152
- .remove-btn {{ background-color: #dc3545; color: white; border: none; padding: 5px 10px; cursor: pointer; border-radius: 4px; }}
153
- .clear-btn {{ background-color: #6c757d; color: white; border: none; padding: 10px 15px; cursor: pointer; border-radius: 4px; margin-bottom: 10px; }}
163
+
164
+ /* Smaller buttons */
165
+ .select-btn {{ background-color: #28a745; color: white; border: none; padding: 3px 7px; cursor: pointer; border-radius: 4px; font-size: 10px; }}
166
+ .remove-btn {{ background-color: #dc3545; color: white; border: none; padding: 3px 7px; cursor: pointer; border-radius: 4px; font-size: 10px; }}
167
+ .clear-btn {{ background-color: #6c757d; color: white; border: none; padding: 8px 12px; cursor: pointer; border-radius: 4px; margin-bottom: 10px; font-size: 12px; }}
154
168
  </style>
155
169
  </head>
156
170
  <body>
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: halib
3
- Version: 0.2.34
3
+ Version: 0.2.35
4
4
  Summary: Small library for common tasks
5
5
  Author: Hoang Van Ha
6
6
  Author-email: hoangvanhauit@gmail.com
@@ -57,7 +57,7 @@ Dynamic: summary
57
57
 
58
58
  ## v0.2.x (Experiment & Core Updates)
59
59
 
60
- ### **v0.2.34**
60
+ ### **v0.2.35**
61
61
 
62
62
  - ✨ **New Feature:**: introduce `utils.PlotlyUtils` with parallel coordinates plot and data table support
63
63
 
@@ -100,14 +100,14 @@ halib/utils/dict_op.py,sha256=wYE6Iw-_CnCWdMg9tpJ2Y2-e2ESkW9FxmdBkZkbUh80,299
100
100
  halib/utils/gpu_mon.py,sha256=vD41_ZnmPLKguuq9X44SB_vwd9JrblO4BDzHLXZhhFY,2233
101
101
  halib/utils/list.py,sha256=bbey9_0IaMXnHx1pudv3C3_WU9uFQEQ5qHPklSN-7o0,498
102
102
  halib/utils/listop.py,sha256=Vpa8_2fI0wySpB2-8sfTBkyi_A4FhoFVVvFiuvW8N64,339
103
- halib/utils/plotly_op.py,sha256=RzN7dHzNzJUfSgzKh6Yh60xR709YQUw0IXEvui5EBvw,9799
103
+ halib/utils/plotly_op.py,sha256=wcyMPFavTOv8gbcx82H-_T5EzpUDCqGRH-sQO9NAk4M,9883
104
104
  halib/utils/slack.py,sha256=2ugWE_eJ0s479ObACJbx7iEu3kjMPD4Rt2hEwuMpuNQ,3099
105
105
  halib/utils/slack_op.py,sha256=2ugWE_eJ0s479ObACJbx7iEu3kjMPD4Rt2hEwuMpuNQ,3099
106
106
  halib/utils/tele_noti.py,sha256=-4WXZelCA4W9BroapkRyIdUu9cUVrcJJhegnMs_WpGU,5928
107
107
  halib/utils/video.py,sha256=zLoj5EHk4SmP9OnoHjO8mLbzPdtq6gQPzTQisOEDdO8,3261
108
108
  halib/utils/wandb_op.py,sha256=qqDdTMW4J07bzuJTTg2HoLAPs21nVEbwt2-Aa5ZKiVk,4336
109
- halib-0.2.34.dist-info/licenses/LICENSE.txt,sha256=qZssdna4aETiR8znYsShUjidu-U4jUT9Q-EWNlZ9yBQ,1100
110
- halib-0.2.34.dist-info/METADATA,sha256=C5Pu5me0s-Giwn_xdybYhRxCoMu0rR6cFzkIOdfuejw,8379
111
- halib-0.2.34.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
112
- halib-0.2.34.dist-info/top_level.txt,sha256=7AD6PLaQTreE0Fn44mdZsoHBe_Zdd7GUmjsWPyQ7I-k,6
113
- halib-0.2.34.dist-info/RECORD,,
109
+ halib-0.2.35.dist-info/licenses/LICENSE.txt,sha256=qZssdna4aETiR8znYsShUjidu-U4jUT9Q-EWNlZ9yBQ,1100
110
+ halib-0.2.35.dist-info/METADATA,sha256=nG6m8r1FkN3qxFpBz_FBMM8JTUmCgAeYvBxVOYHFer4,8379
111
+ halib-0.2.35.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
112
+ halib-0.2.35.dist-info/top_level.txt,sha256=7AD6PLaQTreE0Fn44mdZsoHBe_Zdd7GUmjsWPyQ7I-k,6
113
+ halib-0.2.35.dist-info/RECORD,,
File without changes