cognite-neat 0.127.20__py3-none-any.whl → 0.127.21__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.
@@ -1,12 +1,13 @@
1
1
  let currentFilter = 'all';
2
2
  let currentSearch = '';
3
- let isDarkMode = localStorage.getItem('neat-issues-theme') === 'dark';
3
+ const storageKey = 'neat-issues-theme-' + uniqueId;
4
+ let isDarkMode = localStorage.getItem(storageKey) === 'dark';
4
5
  let expandedGroups = new Set();
5
6
 
6
- const container = document.getElementById('issuesContainer');
7
- const themeToggle = document.getElementById('themeToggle');
8
- const themeIcon = document.getElementById('themeIcon');
9
- const themeText = document.getElementById('themeText');
7
+ const container = document.getElementById('issuesContainer-' + uniqueId);
8
+ const themeToggle = document.getElementById('themeToggle-' + uniqueId);
9
+ const themeIcon = document.getElementById('themeIcon-' + uniqueId);
10
+ const themeText = document.getElementById('themeText-' + uniqueId);
10
11
 
11
12
  // Initialize theme
12
13
  function updateTheme() {
@@ -26,7 +27,7 @@ updateTheme();
26
27
  // Theme toggle
27
28
  themeToggle.addEventListener('click', function() {
28
29
  isDarkMode = !isDarkMode;
29
- localStorage.setItem('neat-issues-theme', isDarkMode ? 'dark' : 'light');
30
+ localStorage.setItem(storageKey, isDarkMode ? 'dark' : 'light');
30
31
  updateTheme();
31
32
  });
32
33
 
@@ -46,7 +47,7 @@ function groupIssues(issuesList) {
46
47
  }
47
48
 
48
49
  function renderIssues() {
49
- const listContainer = document.getElementById('issuesList');
50
+ const listContainer = document.getElementById('issuesList-' + uniqueId);
50
51
  const filtered = issues.filter(issue => {
51
52
  const matchesFilter = currentFilter === 'all' || issue.type === currentFilter;
52
53
  const matchesSearch = !currentSearch ||
@@ -93,7 +94,7 @@ function renderIssues() {
93
94
  // Grouped issues
94
95
  html.push(`
95
96
  <div class="issue-group ${isExpanded ? 'expanded' : ''}">
96
- <div class="issue-group-header" onclick="toggleGroup('${key}')">
97
+ <div class="issue-group-header" onclick="toggleGroup_${uniqueId}('${key}')">
97
98
  <div class="issue-group-info">
98
99
  <span class="expand-icon">${isExpanded ? '▼' : '▶'}</span>
99
100
  <span class="issue-badge badge-${firstIssue.type}">${firstIssue.type}</span>
@@ -123,7 +124,7 @@ function renderIssues() {
123
124
  listContainer.innerHTML = html.join('');
124
125
  }
125
126
 
126
- window.toggleGroup = function(key) {
127
+ window['toggleGroup_' + uniqueId] = function(key) {
127
128
  if (expandedGroups.has(key)) {
128
129
  expandedGroups.delete(key);
129
130
  } else {
@@ -133,9 +134,9 @@ window.toggleGroup = function(key) {
133
134
  };
134
135
 
135
136
  // Stat item filters
136
- document.querySelectorAll('.stat-item').forEach(item => {
137
+ document.querySelectorAll('#issuesContainer-' + uniqueId + ' .stat-item').forEach(item => {
137
138
  item.addEventListener('click', function() {
138
- document.querySelectorAll('.stat-item').forEach(i => i.classList.remove('active'));
139
+ document.querySelectorAll('#issuesContainer-' + uniqueId + ' .stat-item').forEach(i => i.classList.remove('active'));
139
140
  this.classList.add('active');
140
141
  currentFilter = this.dataset.filter;
141
142
  renderIssues();
@@ -143,13 +144,13 @@ document.querySelectorAll('.stat-item').forEach(item => {
143
144
  });
144
145
 
145
146
  // Search
146
- document.getElementById('searchInput').addEventListener('input', function(e) {
147
+ document.getElementById('searchInput-' + uniqueId).addEventListener('input', function(e) {
147
148
  currentSearch = e.target.value;
148
149
  renderIssues();
149
150
  });
150
151
 
151
152
  // Export function
152
- window.exportIssues = function() {
153
+ window['exportIssues_' + uniqueId] = function() {
153
154
  const csv = [
154
155
  ['Type', 'Code', 'Message', 'Fix'],
155
156
  ...issues.map(i => [i.type, i.code || '', i.message, i.fix || ''])
@@ -3,11 +3,11 @@
3
3
  {{SPECIFIC_CSS}}
4
4
  </style>
5
5
 
6
- <div class="issues-container" id="issuesContainer">
6
+ <div class="issues-container" id="issuesContainer-{{unique_id}}">
7
7
  <div class="issues-header">
8
- <button class="theme-toggle" id="themeToggle">
9
- <span id="themeIcon">🌙</span>
10
- <span id="themeText">Dark</span>
8
+ <button class="theme-toggle" id="themeToggle-{{unique_id}}">
9
+ <span id="themeIcon-{{unique_id}}">🌙</span>
10
+ <span id="themeText-{{unique_id}}">Dark</span>
11
11
  </button>
12
12
  <h2 class="issues-title">Session Issues</h2>
13
13
  <div class="issues-stats">
@@ -23,22 +23,23 @@
23
23
  <div class="stat-item" data-filter="Recommendation">
24
24
  <span class="stat-number">{{recommendations}}</span> Recommendations
25
25
  </div>
26
- <button class="export-btn" onclick="exportIssues()">Export CSV</button>
26
+ <button class="export-btn" onclick="exportIssues_{{unique_id}}()">Export CSV</button>
27
27
  </div>
28
28
  </div>
29
29
 
30
30
  <div class="issues-controls">
31
31
  <div class="control-group">
32
- <input type="text" class="search-input" placeholder="🔍 Search messages, codes, fixes..." id="searchInput">
32
+ <input type="text" class="search-input" placeholder="🔍 Search messages, codes, fixes..." id="searchInput-{{unique_id}}">
33
33
  </div>
34
34
  </div>
35
35
 
36
- <div class="issues-list" id="issuesList"></div>
36
+ <div class="issues-list" id="issuesList-{{unique_id}}"></div>
37
37
  </div>
38
38
 
39
39
  <script>
40
40
  (function() {
41
41
  const issues = {{JSON}};
42
+ const uniqueId = '{{unique_id}}';
42
43
  {{SCRIPTS}}
43
44
  })();
44
45
  </script>
@@ -1,4 +1,5 @@
1
1
  import json
2
+ import uuid
2
3
  from collections import defaultdict
3
4
  from typing import Any
4
5
 
@@ -65,12 +66,16 @@ class Issues:
65
66
  return "<b>No issues found.</b>"
66
67
  stats = self._stats
67
68
 
69
+ # Generate unique ID for this render to avoid conflicts in Jupyter
70
+ unique_id = uuid.uuid4().hex[:8]
71
+
68
72
  template_vars = {
69
73
  "JSON": json.dumps(self._serialized_issues),
70
74
  "total": stats["total"],
71
75
  "syntax_errors": stats["by_type"].get("ModelSyntaxError", 0),
72
76
  "consistency_errors": stats["by_type"].get("ConsistencyError", 0),
73
77
  "recommendations": stats["by_type"].get("Recommendation", 0),
78
+ "unique_id": unique_id,
74
79
  }
75
80
 
76
81
  return render("issues", template_vars)
cognite/neat/_version.py CHANGED
@@ -1,2 +1,2 @@
1
- __version__ = "0.127.20"
1
+ __version__ = "0.127.21"
2
2
  __engine__ = "^2.0.4"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cognite-neat
3
- Version: 0.127.20
3
+ Version: 0.127.21
4
4
  Summary: Knowledge graph transformation
5
5
  Project-URL: Documentation, https://cognite-neat.readthedocs-hosted.com/
6
6
  Project-URL: Homepage, https://cognite-neat.readthedocs-hosted.com/
@@ -1,7 +1,7 @@
1
1
  cognite/neat/__init__.py,sha256=Lo4DbjDOwnhCYUoAgPp5RG1fDdF7OlnomalTe7n1ydw,211
2
2
  cognite/neat/_exceptions.py,sha256=ox-5hXpee4UJlPE7HpuEHV2C96aLbLKo-BhPDoOAzhA,1650
3
3
  cognite/neat/_issues.py,sha256=wH1mnkrpBsHUkQMGUHFLUIQWQlfJ_qMfdF7q0d9wNhY,1871
4
- cognite/neat/_version.py,sha256=x1it8CkOgLQbQkRRhDB46FfLXgM0aI8us2ZRTHFumD4,47
4
+ cognite/neat/_version.py,sha256=6TSmw-RWqsWG5I8-dNbvOb-gEQhv4rs3V4jd6qB5P8s,47
5
5
  cognite/neat/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
6
  cognite/neat/v1.py,sha256=owqW5Mml2DSZx1AvPvwNRTBngfhBNrQ6EH-7CKL7Jp0,61
7
7
  cognite/neat/_client/__init__.py,sha256=75Bh7eGhaN4sOt3ZcRzHl7pXaheu1z27kmTHeaI05vo,114
@@ -83,7 +83,7 @@ cognite/neat/_data_model/validation/dms/_limits.py,sha256=LVxF1qmeEdUVVAPmywCgxW
83
83
  cognite/neat/_data_model/validation/dms/_orchestrator.py,sha256=FChXB7zflQtnR46BRUFkDCwosLu9YeFLeydEoyFtpVI,10176
84
84
  cognite/neat/_data_model/validation/dms/_views.py,sha256=3bHEEbFKTR_QH_tiJYHppQsZ9ruApv-kdyfehEjIlCU,4198
85
85
  cognite/neat/_session/__init__.py,sha256=owqW5Mml2DSZx1AvPvwNRTBngfhBNrQ6EH-7CKL7Jp0,61
86
- cognite/neat/_session/_issues.py,sha256=M_tYwYiHvvYToaVHCqeSIn4oAO0RZuVtxzd5W52Tn8s,2558
86
+ cognite/neat/_session/_issues.py,sha256=E8UQeSJURg2dm4MF1pfD9dp-heSRT7pgQZgKlD1-FGs,2723
87
87
  cognite/neat/_session/_opt.py,sha256=QcVK08JMmVzJpD0GKHelbljMOQi6CMD1w-maQOlbyZQ,1350
88
88
  cognite/neat/_session/_physical.py,sha256=VyMvvPyN9khR_26rMS0kVuZg23k5c8Hfs7XDeMrkF_w,10526
89
89
  cognite/neat/_session/_result.py,sha256=P_7d92OSSJAusjKMTTdsc67CKnPDGUSitlGxSk0KB_A,7714
@@ -95,11 +95,11 @@ cognite/neat/_session/_html/static/__init__.py,sha256=ZLQFJMITBgbiyTRaVbFAm1l-Dh
95
95
  cognite/neat/_session/_html/static/deployment.css,sha256=wRv2G0NKIxSq4kyOqd3ajZY60KeT4D6-D3lG-TmzURY,4894
96
96
  cognite/neat/_session/_html/static/deployment.js,sha256=3pcQYaW9NAGfeMotZIUIvA6PsWCyrMkJkz3ykNB5lh4,5490
97
97
  cognite/neat/_session/_html/static/issues.css,sha256=Egvqo2cnY8FKTtZp_v3rTWcIgb1vTJvToNCJJovWm70,3824
98
- cognite/neat/_session/_html/static/issues.js,sha256=vSV6FX_SlMxK9jHo18GrHumTbnVepS7IUqV81vtjHCY,6132
98
+ cognite/neat/_session/_html/static/issues.js,sha256=NHx_iAsZTvpZjOoFsxFU_sxqjF4-F4EdHRmoc2DjpIE,6348
99
99
  cognite/neat/_session/_html/static/shared.css,sha256=uUm5fqK1zrMBWCuAWdUoBRaAj9AO611hUxuGvxMzbzc,4190
100
100
  cognite/neat/_session/_html/templates/__init__.py,sha256=hgufJuBxUZ2nLCMTCxGixmk5ztZF38HzPcvtBkWJwxw,128
101
101
  cognite/neat/_session/_html/templates/deployment.html,sha256=COETMP0EEA46xzPlY-RTHo5TdtonV-dscZr15GAY0fs,3309
102
- cognite/neat/_session/_html/templates/issues.html,sha256=v7NkKqVnuXyA0oNlW5iswNLPTiVAJ87412z7VxZeDks,1523
102
+ cognite/neat/_session/_html/templates/issues.html,sha256=k9Ml3LLeWGhpMfqSoCl6QuNRRy__E6Sa5S_I1Kc33NU,1659
103
103
  cognite/neat/_session/_usage_analytics/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
104
104
  cognite/neat/_session/_usage_analytics/_collector.py,sha256=XRyeIW7Att3pIgLpNxQ2joGdIDijfgrPfX7G13OKz-o,4786
105
105
  cognite/neat/_session/_usage_analytics/_constants.py,sha256=-tVdYrCTMKfuMlbO7AlzC29Nug41ug6uuX9DFuihpJg,561
@@ -312,7 +312,7 @@ cognite/neat/v0/session/engine/__init__.py,sha256=D3MxUorEs6-NtgoICqtZ8PISQrjrr4
312
312
  cognite/neat/v0/session/engine/_import.py,sha256=1QxA2_EK613lXYAHKQbZyw2yjo5P9XuiX4Z6_6-WMNQ,169
313
313
  cognite/neat/v0/session/engine/_interface.py,sha256=3W-cYr493c_mW3P5O6MKN1xEQg3cA7NHR_ev3zdF9Vk,533
314
314
  cognite/neat/v0/session/engine/_load.py,sha256=u0x7vuQCRoNcPt25KJBJRn8sJabonYK4vtSZpiTdP4k,5201
315
- cognite_neat-0.127.20.dist-info/METADATA,sha256=947oG_DqzFdW87-nrRmFBMEpnHVuNcFj0VcHLYd9PAk,9150
316
- cognite_neat-0.127.20.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
317
- cognite_neat-0.127.20.dist-info/licenses/LICENSE,sha256=W8VmvFia4WHa3Gqxq1Ygrq85McUNqIGDVgtdvzT-XqA,11351
318
- cognite_neat-0.127.20.dist-info/RECORD,,
315
+ cognite_neat-0.127.21.dist-info/METADATA,sha256=B9N21gWYbuIj-g0hT8DstCeNKA-QQ838OHJ-c1Ws1FM,9150
316
+ cognite_neat-0.127.21.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
317
+ cognite_neat-0.127.21.dist-info/licenses/LICENSE,sha256=W8VmvFia4WHa3Gqxq1Ygrq85McUNqIGDVgtdvzT-XqA,11351
318
+ cognite_neat-0.127.21.dist-info/RECORD,,