Skip to content

Commit b40a94f

Browse files
Merge branch 'master' into master
2 parents 79895a4 + c3919cf commit b40a94f

File tree

7 files changed

+17
-15
lines changed

7 files changed

+17
-15
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
### 0.13.4 -- TBA
44
* Add - Allow reading blobs produced by legacy 32-bit compiled mYm library for matlab. PR #995
5+
* Bugfix - Fix external store key name doesn't allow '-' (#1005) PR #1006
56

67
### 0.13.3 -- Feb 9, 2022
78
* Bugfix - Fix error in listing ancestors, descendants with part tables.

datajoint/autopopulate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ def handler(signum, frame):
193193
# spawn multiple processes
194194
self.connection.close() # disconnect parent process from MySQL server
195195
del self.connection._conn.ctx # SSLContext is not pickleable
196-
with mp.Pool(processes, _initialize_populate, (self, populate_kwargs)) as pool:
196+
with mp.Pool(processes, _initialize_populate, (self, jobs, populate_kwargs)) as pool:
197197
if display_progress:
198198
with tqdm(desc="Processes: ", total=nkeys) as pbar:
199199
for error in pool.imap(_call_populate1, keys, chunksize=1):

datajoint/declare.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@
2323
BOOL=r'bool(ean)?$', # aliased to tinyint(1)
2424
TEMPORAL=r'(date|datetime|time|timestamp|year)(\s*\(.+\))?$',
2525
INTERNAL_BLOB=r'(tiny|small|medium|long|)blob$',
26-
EXTERNAL_BLOB=r'blob@(?P<store>[a-z]\w*)$',
26+
EXTERNAL_BLOB=r'blob@(?P<store>[a-z][\-\w]*)$',
2727
INTERNAL_ATTACH=r'attach$',
28-
EXTERNAL_ATTACH=r'attach@(?P<store>[a-z]\w*)$',
29-
FILEPATH=r'filepath@(?P<store>[a-z]\w*)$',
28+
EXTERNAL_ATTACH=r'attach@(?P<store>[a-z][\-\w]*)$',
29+
FILEPATH=r'filepath@(?P<store>[a-z][\-\w]*)$',
3030
UUID=r'uuid$',
3131
ADAPTED=r'<.+>$'
3232
).items()}

docs-parts/intro/Releases_lang1.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
0.13.4 -- TBA
22
----------------------
33
* Add - Allow reading blobs produced by legacy 32-bit compiled mYm library for matlab. PR #995
4+
* Bugfix - Fix external store key name doesn't allow '-' (#1005) PR #1006
45

56
0.13.3 -- Feb 9, 2022
67
----------------------

tests/schema_adapted.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from . import PREFIX, CONN_INFO, S3_CONN_INFO
99

1010
stores_config = {
11-
'repo_s3': dict(
11+
'repo-s3': dict(
1212
S3_CONN_INFO,
1313
protocol='s3',
1414
location='adapted/repo',
@@ -59,7 +59,7 @@ class LayoutToFilepath(dj.AttributeAdapter):
5959
An adapted data type that saves a graph layout into fixed filepath
6060
"""
6161

62-
attribute_type = 'filepath@repo_s3'
62+
attribute_type = 'filepath@repo-s3'
6363

6464
@staticmethod
6565
def get(path):
@@ -68,7 +68,7 @@ def get(path):
6868

6969
@staticmethod
7070
def put(layout):
71-
path = Path(dj.config['stores']['repo_s3']['stage'], 'layout.json')
71+
path = Path(dj.config['stores']['repo-s3']['stage'], 'layout.json')
7272
with open(str(path), "w") as f:
7373
json.dump(layout, f)
7474
return path

tests/schema_external.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
protocol='file',
2323
location=tempfile.mkdtemp()),
2424

25-
'repo_s3': dict(
25+
'repo-s3': dict(
2626
S3_CONN_INFO,
2727
protocol='s3',
2828
location='dj/repo',
@@ -130,7 +130,7 @@ class FilepathS3(dj.Manual):
130130
# table for file management
131131
fnum : int
132132
---
133-
img : filepath@repo_s3 # managed files
133+
img : filepath@repo-s3 # managed files
134134
"""
135135

136136
dj.errors._switch_filepath_types(False)

tests/test_filepath.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def test_filepath(store="repo"):
9191

9292
def test_filepath_s3():
9393
""" test file management with s3 """
94-
test_filepath(store="repo_s3")
94+
test_filepath(store="repo-s3")
9595

9696

9797
def test_duplicate_upload(store="repo"):
@@ -107,7 +107,7 @@ def test_duplicate_upload(store="repo"):
107107

108108

109109
def test_duplicate_upload_s3():
110-
test_duplicate_upload(store="repo_s3")
110+
test_duplicate_upload(store="repo-s3")
111111

112112

113113
@raises(dj.DataJointError)
@@ -128,7 +128,7 @@ def test_duplicate_error(store="repo"):
128128

129129

130130
def test_duplicate_error_s3():
131-
test_duplicate_error(store="repo_s3")
131+
test_duplicate_error(store="repo-s3")
132132

133133

134134
def test_filepath_class(table=Filepath(), store="repo"):
@@ -176,12 +176,12 @@ def test_filepath_class_again():
176176

177177

178178
def test_filepath_class_s3():
179-
test_filepath_class(FilepathS3(), "repo_s3")
179+
test_filepath_class(FilepathS3(), "repo-s3")
180180

181181

182182
def test_filepath_class_s3_again():
183183
"""test_filepath_class_s3 again to deal with existing remote files"""
184-
test_filepath_class(FilepathS3(), "repo_s3")
184+
test_filepath_class(FilepathS3(), "repo-s3")
185185

186186

187187
def test_filepath_cleanup(table=Filepath(), store="repo"):
@@ -218,7 +218,7 @@ def test_filepath_cleanup(table=Filepath(), store="repo"):
218218

219219
def test_filepath_cleanup_s3():
220220
"""test deletion of filepath entries from external table """
221-
store = "repo_s3"
221+
store = "repo-s3"
222222
test_filepath_cleanup(FilepathS3(), store)
223223

224224

0 commit comments

Comments
 (0)