Skip to content

Commit f73b7d9

Browse files
hotfix parsing obj names to URLs
1 parent ffb5c80 commit f73b7d9

File tree

8 files changed

+28
-12
lines changed

8 files changed

+28
-12
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
Log of changes in the versions
44

5+
## v2.3.1
6+
7+
- fixing error in parsing obj name. "/" is safed and will not be converted anymore
8+
9+
510
## v2.3.0
611

712
- hotfix avoiding blank nodes for hdf filter

CITATION.cff

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ authors:
1111
given-names: "Lucas"
1212
orcid: "https://orcid.org/0000-0002-4116-0065"
1313
title: "h5rdmtoolbox - HDF5 Research Data Management Toolbox"
14-
version: 2.3.0
15-
doi: 10.5281/zenodo.16881561
14+
version: 2.3.1
15+
doi: 10.5281/zenodo.17063344
1616
date-released: 2025-09-01
1717
url: "https://github.com/matthiasprobst/h5rdmtoolbox"

codemeta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"license": "https://spdx.org/licenses/MIT",
55
"codeRepository": "git+https://github.com/matthiasprobst/h5RDMtoolbox.git",
66
"name": "h5RDMtoolbox",
7-
"version": "2.3.0",
7+
"version": "2.3.1",
88
"description": "Supporting a FAIR Research Data lifecycle using Python and HDF5.",
99
"applicationCategory": "Engineering",
1010
"programmingLanguage": [

docs/colab/quickstart.ipynb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@
77
"scrolled": true
88
},
99
"outputs": [],
10-
"source": [
11-
"# !pip install h5rdmtoolbox==2.3.0"
12-
]
10+
"source": "# !pip install h5rdmtoolbox==2.3.1"
1311
},
1412
{
1513
"cell_type": "code",
@@ -19,7 +17,7 @@
1917
{
2018
"data": {
2119
"text/plain": [
22-
"'2.3.0'"
20+
"'2.3.1'"
2321
]
2422
},
2523
"execution_count": 2,

h5rdmtoolbox/ld/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010

1111
def _parse_obj_name(obj_name: str):
12-
return urllib.parse.quote(obj_name, safe='')
12+
return urllib.parse.quote(obj_name, safe='/')
1313

1414

1515
def get_attr_dtype_as_XSD(data):

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = h5rdmtoolbox
3-
version = 2.3.0
3+
version = 2.3.1
44
author = Matthias Probst
55
author_email = matth.probst@gmail.com
66
description = Supporting a FAIR Research Data lifecycle using Python and HDF5.

tests/ld/test_utils.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import unittest
2+
3+
from h5rdmtoolbox.ld.utils import _parse_obj_name
4+
5+
6+
class TestUtile(unittest.TestCase):
7+
8+
def test_parsing_obj_names(self):
9+
self.assertEqual(_parse_obj_name("/"), "/")
10+
self.assertEqual(_parse_obj_name(" "), "%20")
11+
self.assertEqual(_parse_obj_name("/My Group/"), "/My%20Group/")
12+
self.assertEqual(_parse_obj_name("/My Group/My Dataset"), "/My%20Group/My%20Dataset")
13+
self.assertEqual(_parse_obj_name("/My !&9]231,.0Group/My Dataset "), "/My%20%21%269%5D231%2C.0Group/My%20Dataset%20")

tests/test_version.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import pathlib
22
import unittest
3-
from datetime import datetime
3+
4+
import yaml
45

56
from h5rdmtoolbox import __version__, get_package_meta
67

@@ -34,14 +35,13 @@ def test_colab_version(self):
3435
found = False
3536
for line in lines:
3637
if 'pip install' in line:
37-
self.assertEqual(line.strip(), f'"# !pip install h5rdmtoolbox=={__version__}"')
38+
self.assertTrue(f'"# !pip install h5rdmtoolbox=={__version__}"' in line.strip())
3839
found = True
3940
break
4041
self.assertTrue(found)
4142

4243
def test_citation_cff(self):
4344
citation_cff = __this_dir__ / "../CITATION.cff"
44-
import yaml
4545
with open(citation_cff, 'r') as f:
4646
cff = yaml.safe_load(f)
4747
self.assertTrue("todo" not in cff["doi"].lower(), "Please replace 'todo' in CITATION.cff")

0 commit comments

Comments
 (0)