gismap 0.2.0__tar.gz → 0.2.1__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.
Files changed (63) hide show
  1. {gismap-0.2.0 → gismap-0.2.1}/HISTORY.md +8 -1
  2. {gismap-0.2.0 → gismap-0.2.1}/PKG-INFO +4 -4
  3. {gismap-0.2.0 → gismap-0.2.1}/README.md +3 -3
  4. {gismap-0.2.0 → gismap-0.2.1}/gismap/lab/graph.py +1 -1
  5. {gismap-0.2.0 → gismap-0.2.1}/gismap/lab/vis.py +44 -26
  6. {gismap-0.2.0 → gismap-0.2.1}/pyproject.toml +1 -1
  7. {gismap-0.2.0 → gismap-0.2.1}/uv.lock +1 -1
  8. {gismap-0.2.0 → gismap-0.2.1}/.coveragerc +0 -0
  9. {gismap-0.2.0 → gismap-0.2.1}/.editorconfig +0 -0
  10. {gismap-0.2.0 → gismap-0.2.1}/.gitattributes +0 -0
  11. {gismap-0.2.0 → gismap-0.2.1}/.github/ISSUE_TEMPLATE.md +0 -0
  12. {gismap-0.2.0 → gismap-0.2.1}/.github/workflows/build.yml +0 -0
  13. {gismap-0.2.0 → gismap-0.2.1}/.github/workflows/docs.yml +0 -0
  14. {gismap-0.2.0 → gismap-0.2.1}/.github/workflows/release.yml +0 -0
  15. {gismap-0.2.0 → gismap-0.2.1}/.gitignore +0 -0
  16. {gismap-0.2.0 → gismap-0.2.1}/.run/All tests.run.xml +0 -0
  17. {gismap-0.2.0 → gismap-0.2.1}/.run/Generate docs.run.xml +0 -0
  18. {gismap-0.2.0 → gismap-0.2.1}/AUTHORS.md +0 -0
  19. {gismap-0.2.0 → gismap-0.2.1}/CONTRIBUTING.md +0 -0
  20. {gismap-0.2.0 → gismap-0.2.1}/citation.cff +0 -0
  21. {gismap-0.2.0 → gismap-0.2.1}/docs/conf.py +0 -0
  22. {gismap-0.2.0 → gismap-0.2.1}/docs/favicon.ico +0 -0
  23. {gismap-0.2.0 → gismap-0.2.1}/docs/index.md +0 -0
  24. {gismap-0.2.0 → gismap-0.2.1}/docs/logo.png +0 -0
  25. {gismap-0.2.0 → gismap-0.2.1}/docs/presentation/authors.md +0 -0
  26. {gismap-0.2.0 → gismap-0.2.1}/docs/presentation/contributing.md +0 -0
  27. {gismap-0.2.0 → gismap-0.2.1}/docs/presentation/history.md +0 -0
  28. {gismap-0.2.0 → gismap-0.2.1}/docs/presentation/index.md +0 -0
  29. {gismap-0.2.0 → gismap-0.2.1}/docs/presentation/installation.md +0 -0
  30. {gismap-0.2.0 → gismap-0.2.1}/docs/presentation/readme.md +0 -0
  31. {gismap-0.2.0 → gismap-0.2.1}/docs/reference/database.md +0 -0
  32. {gismap-0.2.0 → gismap-0.2.1}/docs/reference/gismo.md +0 -0
  33. {gismap-0.2.0 → gismap-0.2.1}/docs/reference/index.md +0 -0
  34. {gismap-0.2.0 → gismap-0.2.1}/docs/reference/lab.md +0 -0
  35. {gismap-0.2.0 → gismap-0.2.1}/docs/reference/utils.md +0 -0
  36. {gismap-0.2.0 → gismap-0.2.1}/docs/tutorials/egomap.ipynb +0 -0
  37. {gismap-0.2.0 → gismap-0.2.1}/docs/tutorials/index.md +0 -0
  38. {gismap-0.2.0 → gismap-0.2.1}/docs/tutorials/lab_tutorial.ipynb +0 -0
  39. {gismap-0.2.0 → gismap-0.2.1}/gismap/__init__.py +0 -0
  40. {gismap-0.2.0 → gismap-0.2.1}/gismap/author.py +0 -0
  41. {gismap-0.2.0 → gismap-0.2.1}/gismap/gismap.py +0 -0
  42. {gismap-0.2.0 → gismap-0.2.1}/gismap/gismo.py +0 -0
  43. {gismap-0.2.0 → gismap-0.2.1}/gismap/lab/__init__.py +0 -0
  44. {gismap-0.2.0 → gismap-0.2.1}/gismap/lab/egomap.py +0 -0
  45. {gismap-0.2.0 → gismap-0.2.1}/gismap/lab/expansion.py +0 -0
  46. {gismap-0.2.0 → gismap-0.2.1}/gismap/lab/filters.py +0 -0
  47. {gismap-0.2.0 → gismap-0.2.1}/gismap/lab/lab.py +0 -0
  48. {gismap-0.2.0 → gismap-0.2.1}/gismap/lab/lab_author.py +0 -0
  49. {gismap-0.2.0 → gismap-0.2.1}/gismap/lab/lip6.py +0 -0
  50. {gismap-0.2.0 → gismap-0.2.1}/gismap/lab/toulouse.py +0 -0
  51. {gismap-0.2.0 → gismap-0.2.1}/gismap/search.py +0 -0
  52. {gismap-0.2.0 → gismap-0.2.1}/gismap/sources/__init__.py +0 -0
  53. {gismap-0.2.0 → gismap-0.2.1}/gismap/sources/dblp.py +0 -0
  54. {gismap-0.2.0 → gismap-0.2.1}/gismap/sources/hal.py +0 -0
  55. {gismap-0.2.0 → gismap-0.2.1}/gismap/sources/models.py +0 -0
  56. {gismap-0.2.0 → gismap-0.2.1}/gismap/sources/multi.py +0 -0
  57. {gismap-0.2.0 → gismap-0.2.1}/gismap/utils/__init__.py +0 -0
  58. {gismap-0.2.0 → gismap-0.2.1}/gismap/utils/common.py +0 -0
  59. {gismap-0.2.0 → gismap-0.2.1}/gismap/utils/logger.py +0 -0
  60. {gismap-0.2.0 → gismap-0.2.1}/gismap/utils/requests.py +0 -0
  61. {gismap-0.2.0 → gismap-0.2.1}/gismap/utils/text.py +0 -0
  62. {gismap-0.2.0 → gismap-0.2.1}/tests/__init__.py +0 -0
  63. {gismap-0.2.0 → gismap-0.2.1}/tests/test_gismap.py +0 -0
@@ -7,13 +7,20 @@
7
7
  - Colors and size
8
8
  - Groups
9
9
 
10
+ ## 0.2.1 (2025-09-01): Minor VisJS enhancements
11
+
12
+ - Better handling of dark/light mode (should be compatible with Pydata, Jupyter, and System).
13
+ - Responsive size
14
+
15
+
10
16
  ## 0.2.0 (2025-08-31): EgoMaps!
11
17
 
12
- - New lab structure: EgoMap, an auto-lab that revolves around you!
18
+ - New lab structure: EgoMap shows the people that revolves around you!
13
19
  - New lab method: expansion, which adds *moons* (neighbor reasearchers).
14
20
  - Add filters when building authors and publications.
15
21
  - Physic engine changed fo better visualization.
16
22
  - Multi-source handling fine-tuned.
23
+ - Better display (size and theme).
17
24
 
18
25
 
19
26
  ## 0.1.0 (2025-07-24): First release
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gismap
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: GISMAP leverages DBLP and HAL databases to provide cartography tools for you and your lab.
5
5
  Project-URL: Repository, https://github.com/balouf/gismap
6
6
  Project-URL: Documentation, https://balouf.github.io/gismap
@@ -49,11 +49,11 @@ Use GISMAP to produce a collaboration graph (HTML):
49
49
 
50
50
  ```pycon
51
51
  >>> from gismap.sources.hal import HAL
52
- >>> from gismap.lab import ListLab, lab2graph
53
- >>> lab = ListLab(["Mathilde Labbé", "Anne Reverseau", "David Martens", "Marcela Scibiorska", "Nathalie Grande"], dbs=[HAL])
52
+ >>> from gismap.lab import ListLab
53
+ >>> lab = ListLab(["Fabien Mathieu", "François Baccelli", "Ludovic Noirie", "Céline Comte", "Sébastien Tixeuil"], dbs="hal")
54
54
  >>> lab.update_authors()
55
55
  >>> lab.update_publis()
56
- >>> collabs = lab2graph(lab)
56
+ >>> lab.show_html()
57
57
  ```
58
58
 
59
59
  ## Credits
@@ -32,11 +32,11 @@ Use GISMAP to produce a collaboration graph (HTML):
32
32
 
33
33
  ```pycon
34
34
  >>> from gismap.sources.hal import HAL
35
- >>> from gismap.lab import ListLab, lab2graph
36
- >>> lab = ListLab(["Mathilde Labbé", "Anne Reverseau", "David Martens", "Marcela Scibiorska", "Nathalie Grande"], dbs=[HAL])
35
+ >>> from gismap.lab import ListLab
36
+ >>> lab = ListLab(["Fabien Mathieu", "François Baccelli", "Ludovic Noirie", "Céline Comte", "Sébastien Tixeuil"], dbs="hal")
37
37
  >>> lab.update_authors()
38
38
  >>> lab.update_publis()
39
- >>> collabs = lab2graph(lab)
39
+ >>> lab.show_html()
40
40
  ```
41
41
 
42
42
  ## Credits
@@ -210,7 +210,7 @@ def lab2graph(lab):
210
210
  True
211
211
  >>> html = lab2graph(lab)
212
212
  >>> html[:80] # doctest: +ELLIPSIS
213
- '\\n<div id="mynetwork_..."></div>\\n<div id="modal_..." class="modal">\\n <'
213
+ '\\n<div class="gismap-content">\\n<div id="mynetwork_..."></div>\\n<a\\n href="htt'
214
214
  """
215
215
  node_pubs = {k: [] for k in lab.authors}
216
216
  edges_dict = defaultdict(list)
@@ -4,21 +4,37 @@ import json
4
4
 
5
5
 
6
6
  vis_template = Template("""
7
+ <div class="gismap-content">
7
8
  <div id="${container_id}"></div>
9
+ <a
10
+ href="https://balouf.github.io/gismap/"
11
+ target="_blank"
12
+ id="gismap-brand"
13
+ style="position: absolute; left: 10px; bottom: 10px; text-decoration: none; color: #888; font-size: min(2vw, 10px);
14
+ z-index: 10; pointer-events: auto;"
15
+ >
16
+ &copy; Gismap 2025
17
+ </a>
8
18
  <div id="${modal_id}" class="modal">
9
- <div class="modal-content">
19
+ <div class="modal-content">
10
20
  <span class="close" id="${modal_close_id}">&times;</span>
11
21
  <div id="${modal_body_id}"></div>
12
22
  </div>
13
23
  </div>
24
+ </div>
14
25
  <style>
26
+ .gismap-content {
27
+ position: relative;
28
+ width: 100%;
29
+ height: 80vh !important;
30
+ max-width: 100vw;
31
+ max-height: 100vh !important;
32
+ }
15
33
  /* Styles adaptatifs pour dark/light */
16
34
  /* Default: dark mode styles */
17
35
  #${container_id} {
18
36
  width: 100%;
19
- height: 80vh !important;
20
- max-width: 100vw;
21
- max-height: 100vh !important;
37
+ height: 100%;
22
38
  box-sizing: border-box;
23
39
  border: 1px solid #444;
24
40
  background: #181818;
@@ -111,20 +127,6 @@ body[data-jp-theme-light="true"] .close:hover, body[data-jp-theme-light="true"]
111
127
  }
112
128
  </style>
113
129
  <script type="text/javascript">
114
- if (typeof vis === 'undefined') {
115
- var script = document.createElement('script');
116
- script.src = "https://unpkg.com/vis-network/standalone/umd/vis-network.min.js";
117
- script.type = "text/javascript";
118
- script.onload = function() {
119
- console.log("vis-network loaded dynamically");
120
- // You can trigger your graph init here if needed
121
- };
122
- document.head.appendChild(script);
123
- } else {
124
- console.log("vis-network already loaded");
125
- }
126
- </script>
127
- <script type="text/javascript">
128
130
  (function() {
129
131
  // Détection du thème
130
132
  function getTheme() {
@@ -191,10 +193,6 @@ function getTheme() {
191
193
  };
192
194
  }
193
195
  };
194
- const nodes = new vis.DataSet(${nodes_json});
195
- const edges = new vis.DataSet(${edges_json});
196
- const container = document.getElementById('${container_id}');
197
- let network = null;
198
196
 
199
197
  var physics = {
200
198
  physics: {
@@ -221,6 +219,10 @@ function getTheme() {
221
219
  };
222
220
 
223
221
  function renderNetwork() {
222
+ const nodes = new vis.DataSet(${nodes_json});
223
+ const edges = new vis.DataSet(${edges_json});
224
+ const container = document.getElementById('${container_id}');
225
+ let network = null;
224
226
  const theme = getTheme();
225
227
  const options = getVisOptions(theme);
226
228
  network = new vis.Network(container, { nodes: nodes, edges: edges }, options);
@@ -262,20 +264,36 @@ function getTheme() {
262
264
  if (event.target == modal) { modal.style.display = "none"; }
263
265
  };
264
266
  };
265
- renderNetwork();
267
+
268
+ function loadVisAndRender() {
269
+ if (typeof vis === 'undefined') {
270
+ var script = document.createElement('script');
271
+ script.src = "https://unpkg.com/vis-network/standalone/umd/vis-network.min.js";
272
+ script.type = "text/javascript";
273
+ script.onload = function() {
274
+ console.log("vis-network loaded dynamically");
275
+ renderNetwork(); // Graph init after vis is loaded
276
+ };
277
+ document.head.appendChild(script);
278
+ } else {
279
+ console.log("vis-network already loaded");
280
+ renderNetwork(); // Graph init immediately
281
+ }
282
+ }
283
+ loadVisAndRender();
266
284
 
267
285
  // Adapter dynamiquement si le thème change
268
- window.addEventListener("theme-changed", () => renderNetwork());
286
+ window.addEventListener("theme-changed", () => loadVisAndRender());
269
287
  const observer = new MutationObserver(mutations => {
270
288
  for (const mutation of mutations) {
271
289
  if (mutation.type === "attributes" && mutation.attributeName === "data-jp-theme-name") {
272
- renderNetwork();
290
+ loadVisAndRender();
273
291
  }
274
292
  }
275
293
  });
276
294
  observer.observe(document.body, { attributes: true });
277
295
  if (window.matchMedia) {
278
- window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', () => renderNetwork());
296
+ window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', () => loadVisAndRender());
279
297
  };
280
298
  })();
281
299
  </script>
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "gismap"
7
- version = "0.2.0"
7
+ version = "0.2.1"
8
8
  description = "GISMAP leverages DBLP and HAL databases to provide cartography tools for you and your lab."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -440,7 +440,7 @@ wheels = [
440
440
 
441
441
  [[package]]
442
442
  name = "gismap"
443
- version = "0.2.0"
443
+ version = "0.2.1"
444
444
  source = { editable = "." }
445
445
  dependencies = [
446
446
  { name = "bof" },
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes