jupyter-analysis-tools 1.4.1__tar.gz → 1.4.3__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 (51) hide show
  1. {jupyter_analysis_tools-1.4.1 → jupyter_analysis_tools-1.4.3}/.copier-answers.yml +1 -1
  2. {jupyter_analysis_tools-1.4.1 → jupyter_analysis_tools-1.4.3}/CHANGELOG.md +12 -0
  3. {jupyter_analysis_tools-1.4.1 → jupyter_analysis_tools-1.4.3}/PKG-INFO +15 -3
  4. {jupyter_analysis_tools-1.4.1 → jupyter_analysis_tools-1.4.3}/README.md +2 -2
  5. {jupyter_analysis_tools-1.4.1 → jupyter_analysis_tools-1.4.3}/docs/conf.py +1 -1
  6. {jupyter_analysis_tools-1.4.1 → jupyter_analysis_tools-1.4.3}/src/jupyter_analysis_tools/__init__.py +1 -1
  7. {jupyter_analysis_tools-1.4.1 → jupyter_analysis_tools-1.4.3}/src/jupyter_analysis_tools/utils.py +24 -8
  8. {jupyter_analysis_tools-1.4.1 → jupyter_analysis_tools-1.4.3}/src/jupyter_analysis_tools.egg-info/PKG-INFO +15 -3
  9. {jupyter_analysis_tools-1.4.1 → jupyter_analysis_tools-1.4.3}/tests/utils.py +4 -4
  10. {jupyter_analysis_tools-1.4.1 → jupyter_analysis_tools-1.4.3}/.editorconfig +0 -0
  11. {jupyter_analysis_tools-1.4.1 → jupyter_analysis_tools-1.4.3}/.pre-commit-config.yaml +0 -0
  12. {jupyter_analysis_tools-1.4.1 → jupyter_analysis_tools-1.4.3}/AUTHORS.rst +0 -0
  13. {jupyter_analysis_tools-1.4.1 → jupyter_analysis_tools-1.4.3}/CONTRIBUTING.rst +0 -0
  14. {jupyter_analysis_tools-1.4.1 → jupyter_analysis_tools-1.4.3}/LICENSE +0 -0
  15. {jupyter_analysis_tools-1.4.1 → jupyter_analysis_tools-1.4.3}/MANIFEST.in +0 -0
  16. {jupyter_analysis_tools-1.4.1 → jupyter_analysis_tools-1.4.3}/ci/requirements.txt +0 -0
  17. {jupyter_analysis_tools-1.4.1 → jupyter_analysis_tools-1.4.3}/docs/_templates/class.rst +0 -0
  18. {jupyter_analysis_tools-1.4.1 → jupyter_analysis_tools-1.4.3}/docs/_templates/module.rst +0 -0
  19. {jupyter_analysis_tools-1.4.1 → jupyter_analysis_tools-1.4.3}/docs/authors.rst +0 -0
  20. {jupyter_analysis_tools-1.4.1 → jupyter_analysis_tools-1.4.3}/docs/changelog.rst +0 -0
  21. {jupyter_analysis_tools-1.4.1 → jupyter_analysis_tools-1.4.3}/docs/contributing.rst +0 -0
  22. {jupyter_analysis_tools-1.4.1 → jupyter_analysis_tools-1.4.3}/docs/index.rst +0 -0
  23. {jupyter_analysis_tools-1.4.1 → jupyter_analysis_tools-1.4.3}/docs/installation.rst +0 -0
  24. {jupyter_analysis_tools-1.4.1 → jupyter_analysis_tools-1.4.3}/docs/readme.rst +0 -0
  25. {jupyter_analysis_tools-1.4.1 → jupyter_analysis_tools-1.4.3}/docs/reference/index.rst +0 -0
  26. {jupyter_analysis_tools-1.4.1 → jupyter_analysis_tools-1.4.3}/docs/requirements.txt +0 -0
  27. {jupyter_analysis_tools-1.4.1 → jupyter_analysis_tools-1.4.3}/docs/spelling_wordlist.txt +0 -0
  28. {jupyter_analysis_tools-1.4.1 → jupyter_analysis_tools-1.4.3}/docs/usage.rst +0 -0
  29. {jupyter_analysis_tools-1.4.1 → jupyter_analysis_tools-1.4.3}/pyproject.toml +0 -0
  30. {jupyter_analysis_tools-1.4.1 → jupyter_analysis_tools-1.4.3}/setup.cfg +0 -0
  31. {jupyter_analysis_tools-1.4.1 → jupyter_analysis_tools-1.4.3}/src/jupyter_analysis_tools/analysis.py +0 -0
  32. {jupyter_analysis_tools-1.4.1 → jupyter_analysis_tools-1.4.3}/src/jupyter_analysis_tools/binning.py +0 -0
  33. {jupyter_analysis_tools-1.4.1 → jupyter_analysis_tools-1.4.3}/src/jupyter_analysis_tools/datalocations.py +0 -0
  34. {jupyter_analysis_tools-1.4.1 → jupyter_analysis_tools-1.4.3}/src/jupyter_analysis_tools/distrib.py +0 -0
  35. {jupyter_analysis_tools-1.4.1 → jupyter_analysis_tools-1.4.3}/src/jupyter_analysis_tools/git.py +0 -0
  36. {jupyter_analysis_tools-1.4.1 → jupyter_analysis_tools-1.4.3}/src/jupyter_analysis_tools/plotting.py +0 -0
  37. {jupyter_analysis_tools-1.4.1 → jupyter_analysis_tools-1.4.3}/src/jupyter_analysis_tools/readdata.py +0 -0
  38. {jupyter_analysis_tools-1.4.1 → jupyter_analysis_tools-1.4.3}/src/jupyter_analysis_tools/widgets.py +0 -0
  39. {jupyter_analysis_tools-1.4.1 → jupyter_analysis_tools-1.4.3}/src/jupyter_analysis_tools.egg-info/SOURCES.txt +0 -0
  40. {jupyter_analysis_tools-1.4.1 → jupyter_analysis_tools-1.4.3}/src/jupyter_analysis_tools.egg-info/dependency_links.txt +0 -0
  41. {jupyter_analysis_tools-1.4.1 → jupyter_analysis_tools-1.4.3}/src/jupyter_analysis_tools.egg-info/requires.txt +0 -0
  42. {jupyter_analysis_tools-1.4.1 → jupyter_analysis_tools-1.4.3}/src/jupyter_analysis_tools.egg-info/top_level.txt +0 -0
  43. {jupyter_analysis_tools-1.4.1 → jupyter_analysis_tools-1.4.3}/templates/CHANGELOG.md.j2 +0 -0
  44. {jupyter_analysis_tools-1.4.1 → jupyter_analysis_tools-1.4.3}/testdata/2015-03-20-Silica.ssf.json +0 -0
  45. {jupyter_analysis_tools-1.4.1 → jupyter_analysis_tools-1.4.3}/testdata/2015-03-20-Silica.ssfz +0 -0
  46. {jupyter_analysis_tools-1.4.1 → jupyter_analysis_tools-1.4.3}/testdata/S2842 water.json +0 -0
  47. {jupyter_analysis_tools-1.4.1 → jupyter_analysis_tools-1.4.3}/testdata/S2842 water.pdh +0 -0
  48. {jupyter_analysis_tools-1.4.1 → jupyter_analysis_tools-1.4.3}/testdata/S2843[9].pdh +0 -0
  49. {jupyter_analysis_tools-1.4.1 → jupyter_analysis_tools-1.4.3}/tests/readdata.py +0 -0
  50. {jupyter_analysis_tools-1.4.1 → jupyter_analysis_tools-1.4.3}/tests/requirements.txt +0 -0
  51. {jupyter_analysis_tools-1.4.1 → jupyter_analysis_tools-1.4.3}/tox.ini +0 -0
@@ -22,4 +22,4 @@ repo_main_branch: main
22
22
  repo_name: jupyter-analysis-tools
23
23
  repo_userorg: BAMresearch
24
24
  sphinx_theme: furo
25
- version: 1.4.1
25
+ version: 1.4.3
@@ -1,5 +1,17 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## v1.4.3 (2025-08-01)
4
+
5
+ ### Bug fixes
6
+
7
+ * **utils**: makeNetworkdriveAbsolute() should return input path if no changes needed ([`2ec96d7`](https://github.com/BAMresearch/jupyter-analysis-tools/commit/2ec96d7066a3473c6d27a6e6d01c640f6c142346))
8
+
9
+ ## v1.4.2 (2025-08-01)
10
+
11
+ ### Bug fixes
12
+
13
+ * **utils**: makeNetworkdriveAbsolute() with FQDN resolution ([`f4591fb`](https://github.com/BAMresearch/jupyter-analysis-tools/commit/f4591fb46dcfeafbb1f63c4323efbb8aea302a92))
14
+
3
15
  ## v1.4.1 (2025-08-01)
4
16
 
5
17
  ### Bug fixes
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: jupyter-analysis-tools
3
- Version: 1.4.1
3
+ Version: 1.4.3
4
4
  Summary: Yet another Python library with helpers and utilities for data analysis and processing.
5
5
  Author-email: Ingo Breßler <ingo.bressler@bam.de>, "Brian R. Pauw" <brian.pauw@bam.de>
6
6
  License-Expression: MIT
@@ -35,10 +35,10 @@ Requires-Dist: matplotlib
35
35
  Requires-Dist: ipywidgets
36
36
  Dynamic: license-file
37
37
 
38
- # Jupyter Analysis Tools (v1.4.1)
38
+ # Jupyter Analysis Tools (v1.4.3)
39
39
 
40
40
  [![PyPI Package latest release](https://img.shields.io/pypi/v/jupyter-analysis-tools.svg)](https://pypi.org/project/jupyter-analysis-tools)
41
- [![Commits since latest release](https://img.shields.io/github/commits-since/BAMresearch/jupyter-analysis-tools/v1.4.1.svg)](https://github.com/BAMresearch/jupyter-analysis-tools/compare/v1.4.1...main)
41
+ [![Commits since latest release](https://img.shields.io/github/commits-since/BAMresearch/jupyter-analysis-tools/v1.4.3.svg)](https://github.com/BAMresearch/jupyter-analysis-tools/compare/v1.4.3...main)
42
42
  [![License](https://img.shields.io/pypi/l/jupyter-analysis-tools.svg)](https://en.wikipedia.org/wiki/MIT_license)
43
43
  [![Supported versions](https://img.shields.io/pypi/pyversions/jupyter-analysis-tools.svg)](https://pypi.org/project/jupyter-analysis-tools)
44
44
  [![PyPI Wheel](https://img.shields.io/pypi/wheel/jupyter-analysis-tools.svg)](https://pypi.org/project/jupyter-analysis-tools#files)
@@ -97,6 +97,18 @@ are installed:
97
97
 
98
98
  # CHANGELOG
99
99
 
100
+ ## v1.4.3 (2025-08-01)
101
+
102
+ ### Bug fixes
103
+
104
+ * **utils**: makeNetworkdriveAbsolute() should return input path if no changes needed ([`2ec96d7`](https://github.com/BAMresearch/jupyter-analysis-tools/commit/2ec96d7066a3473c6d27a6e6d01c640f6c142346))
105
+
106
+ ## v1.4.2 (2025-08-01)
107
+
108
+ ### Bug fixes
109
+
110
+ * **utils**: makeNetworkdriveAbsolute() with FQDN resolution ([`f4591fb`](https://github.com/BAMresearch/jupyter-analysis-tools/commit/f4591fb46dcfeafbb1f63c4323efbb8aea302a92))
111
+
100
112
  ## v1.4.1 (2025-08-01)
101
113
 
102
114
  ### Bug fixes
@@ -1,7 +1,7 @@
1
- # Jupyter Analysis Tools (v1.4.1)
1
+ # Jupyter Analysis Tools (v1.4.3)
2
2
 
3
3
  [![PyPI Package latest release](https://img.shields.io/pypi/v/jupyter-analysis-tools.svg)](https://pypi.org/project/jupyter-analysis-tools)
4
- [![Commits since latest release](https://img.shields.io/github/commits-since/BAMresearch/jupyter-analysis-tools/v1.4.1.svg)](https://github.com/BAMresearch/jupyter-analysis-tools/compare/v1.4.1...main)
4
+ [![Commits since latest release](https://img.shields.io/github/commits-since/BAMresearch/jupyter-analysis-tools/v1.4.3.svg)](https://github.com/BAMresearch/jupyter-analysis-tools/compare/v1.4.3...main)
5
5
  [![License](https://img.shields.io/pypi/l/jupyter-analysis-tools.svg)](https://en.wikipedia.org/wiki/MIT_license)
6
6
  [![Supported versions](https://img.shields.io/pypi/pyversions/jupyter-analysis-tools.svg)](https://pypi.org/project/jupyter-analysis-tools)
7
7
  [![PyPI Wheel](https://img.shields.io/pypi/wheel/jupyter-analysis-tools.svg)](https://pypi.org/project/jupyter-analysis-tools#files)
@@ -32,7 +32,7 @@ project = "Jupyter Analysis Tools"
32
32
  year = "2018-2025"
33
33
  author = "Ingo Breßler and Brian R. Pauw"
34
34
  copyright = "{0}, {1}".format(year, author)
35
- version = "1.4.1"
35
+ version = "1.4.3"
36
36
  release = version
37
37
  commit_id = None
38
38
  try:
@@ -1,7 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  # __init__.py
3
3
 
4
- __version__ = "1.4.1"
4
+ __version__ = "1.4.3"
5
5
 
6
6
  from .binning import reBin
7
7
  from .git import checkRepo, isNBstripoutActivated, isNBstripoutInstalled, isRepo
@@ -106,16 +106,32 @@ def addEnvScriptsToPATH():
106
106
  os.environ["PATH"] = sep.join(environPATH)
107
107
 
108
108
 
109
- def networkdriveMapping(cmdOutput: str = None):
109
+ def networkdriveMapping(cmdOutput: str = None, resolveNames: bool = True):
110
110
  """Returns a dict of mapping drive letters to network paths (on Windows)."""
111
111
  if isWindows():
112
112
  if cmdOutput is None:
113
113
  proc = subprocess.run(["net", "use"], capture_output=True, text=True, encoding="cp850")
114
114
  cmdOutput = proc.stdout
115
+
116
+ def resolveFQDN(uncPath):
117
+ if not resolveNames:
118
+ return uncPath
119
+ parts = uncPath.split("\\")
120
+ idx = [i for i, part in enumerate(parts) if len(part)][0]
121
+ proc = subprocess.run(
122
+ ["nslookup", parts[idx]], capture_output=True, text=True, encoding="cp850"
123
+ )
124
+ res = [line.split() for line in proc.stdout.splitlines() if line.startswith("Name:")]
125
+ if len(res) and len(res[0]) == 2:
126
+ parts[idx] = res[0][1]
127
+ return "\\".join(parts)
128
+
115
129
  rows = [line.split() for line in cmdOutput.splitlines() if "Windows Network" in line]
116
- rows = dict(
117
- [row[1:3] for row in rows if row[1].endswith(":") and row[2].startswith("\\\\")]
118
- )
130
+ rows = {
131
+ row[1]: resolveFQDN(row[2])
132
+ for row in rows
133
+ if row[1].endswith(":") and row[2].startswith(r"\\")
134
+ }
119
135
  return rows
120
136
  else: # Linux (tested) or macOS (untested)
121
137
  if cmdOutput is None:
@@ -143,17 +159,17 @@ def networkdriveMapping(cmdOutput: str = None):
143
159
  return {}
144
160
 
145
161
 
146
- def makeNetworkdriveAbsolute(filepath, cmdOutput: str = None):
162
+ def makeNetworkdriveAbsolute(filepath, cmdOutput: str = None, resolveNames: bool = True):
147
163
  """Replaces the drive letter of the given path by the respective network path, if possible."""
148
164
  if filepath.drive.startswith(r"\\"):
149
- return # it's a UNC path already
165
+ return filepath # it's a UNC path already
150
166
  if isWindows():
151
- drivemap = networkdriveMapping(cmdOutput=cmdOutput)
167
+ drivemap = networkdriveMapping(cmdOutput=cmdOutput, resolveNames=resolveNames)
152
168
  prefix = drivemap.get(filepath.drive, None)
153
169
  if prefix is not None:
154
170
  filepath = Path(prefix).joinpath(*filepath.parts[1:])
155
171
  else: # Linux or macOS
156
- drivemap = networkdriveMapping(cmdOutput=cmdOutput)
172
+ drivemap = networkdriveMapping(cmdOutput=cmdOutput, resolveNames=resolveNames)
157
173
  # search for the mountpoint, starting with the longest, most specific, first
158
174
  for mp, target in sorted(drivemap.items(), key=lambda tup: len(tup[0]), reverse=True):
159
175
  if filepath.is_relative_to(mp):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: jupyter-analysis-tools
3
- Version: 1.4.1
3
+ Version: 1.4.3
4
4
  Summary: Yet another Python library with helpers and utilities for data analysis and processing.
5
5
  Author-email: Ingo Breßler <ingo.bressler@bam.de>, "Brian R. Pauw" <brian.pauw@bam.de>
6
6
  License-Expression: MIT
@@ -35,10 +35,10 @@ Requires-Dist: matplotlib
35
35
  Requires-Dist: ipywidgets
36
36
  Dynamic: license-file
37
37
 
38
- # Jupyter Analysis Tools (v1.4.1)
38
+ # Jupyter Analysis Tools (v1.4.3)
39
39
 
40
40
  [![PyPI Package latest release](https://img.shields.io/pypi/v/jupyter-analysis-tools.svg)](https://pypi.org/project/jupyter-analysis-tools)
41
- [![Commits since latest release](https://img.shields.io/github/commits-since/BAMresearch/jupyter-analysis-tools/v1.4.1.svg)](https://github.com/BAMresearch/jupyter-analysis-tools/compare/v1.4.1...main)
41
+ [![Commits since latest release](https://img.shields.io/github/commits-since/BAMresearch/jupyter-analysis-tools/v1.4.3.svg)](https://github.com/BAMresearch/jupyter-analysis-tools/compare/v1.4.3...main)
42
42
  [![License](https://img.shields.io/pypi/l/jupyter-analysis-tools.svg)](https://en.wikipedia.org/wiki/MIT_license)
43
43
  [![Supported versions](https://img.shields.io/pypi/pyversions/jupyter-analysis-tools.svg)](https://pypi.org/project/jupyter-analysis-tools)
44
44
  [![PyPI Wheel](https://img.shields.io/pypi/wheel/jupyter-analysis-tools.svg)](https://pypi.org/project/jupyter-analysis-tools#files)
@@ -97,6 +97,18 @@ are installed:
97
97
 
98
98
  # CHANGELOG
99
99
 
100
+ ## v1.4.3 (2025-08-01)
101
+
102
+ ### Bug fixes
103
+
104
+ * **utils**: makeNetworkdriveAbsolute() should return input path if no changes needed ([`2ec96d7`](https://github.com/BAMresearch/jupyter-analysis-tools/commit/2ec96d7066a3473c6d27a6e6d01c640f6c142346))
105
+
106
+ ## v1.4.2 (2025-08-01)
107
+
108
+ ### Bug fixes
109
+
110
+ * **utils**: makeNetworkdriveAbsolute() with FQDN resolution ([`f4591fb`](https://github.com/BAMresearch/jupyter-analysis-tools/commit/f4591fb46dcfeafbb1f63c4323efbb8aea302a92))
111
+
100
112
  ## v1.4.1 (2025-08-01)
101
113
 
102
114
  ### Bug fixes
@@ -83,7 +83,7 @@ def test_appendToPATH(capsys):
83
83
 
84
84
  def test_networkdriveMapping():
85
85
  if isWindows():
86
- map = networkdriveMapping(cmdOutput=outNetUse)
86
+ map = networkdriveMapping(cmdOutput=outNetUse, resolveNames=False)
87
87
  assert map == {
88
88
  "G:": "\\\\ALPHA\\BETA",
89
89
  "K:": "\\\\GAM\\MMA",
@@ -91,7 +91,7 @@ def test_networkdriveMapping():
91
91
  "T:": "\\\\test\\foldername",
92
92
  }
93
93
  else: # Linux or macOS
94
- map = networkdriveMapping(cmdOutput=outMount)
94
+ map = networkdriveMapping(cmdOutput=outMount, resolveNames=False)
95
95
  assert map == {
96
96
  "/mnt/gh 12": "//xyz04.fgsd.asd.com/G2S/GH31",
97
97
  "/mnt/some (ugly) on type name": "//abc02.def.ault.de/X23/somename",
@@ -101,12 +101,12 @@ def test_networkdriveMapping():
101
101
  def test_makeNetworkdriveAbsolute():
102
102
  if isWindows():
103
103
  filepath = Path(r"M:\some\folders\a file name.ext")
104
- newpath = makeNetworkdriveAbsolute(filepath, cmdOutput=outNetUse)
104
+ newpath = makeNetworkdriveAbsolute(filepath, cmdOutput=outNetUse, resolveNames=False)
105
105
  assert filepath != newpath
106
106
  assert newpath == Path(r"\\user\drive\uname\some\folders\a file name.ext")
107
107
  else: # Linux or macOS
108
108
  filepath = Path("/mnt/some (ugly) on type name/some/folders/a file name.ext")
109
- newpath = makeNetworkdriveAbsolute(filepath, cmdOutput=outMount)
109
+ newpath = makeNetworkdriveAbsolute(filepath, cmdOutput=outMount, resolveNames=False)
110
110
  assert filepath != newpath
111
111
  assert newpath == Path("//abc02.def.ault.de/X23/somename/some/folders/a file name.ext")
112
112