Skip to content

Commit b175f13

Browse files
authored
Merge pull request #408 from A-Baji/read-32-bit-flag
requested changes
2 parents 7927aa4 + 034d882 commit b175f13

File tree

7 files changed

+16
-18
lines changed

7 files changed

+16
-18
lines changed

+dj/+internal/Settings.m

+4-7
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
'queryPopulate_ancestors', false, ...
2121
'queryBigint_to_double', false, ...
2222
'queryIgnore_extra_insert_fields', false, ... when false, throws an error in `insert(self, tuple)` when tuple has extra fields.
23-
'use32BitDims', false ...
23+
'use_32bit_dims', false ...
2424
)
2525
end
2626
properties
@@ -59,12 +59,9 @@
5959
if nargin == 2
6060
new_state = subsasgn(current_state, subscript, value);
6161
stateAccess('set', new_state);
62-
if ~isempty(subscript(1).subs) && strcmp(subscript(1).subs, 'use32BitDims')
63-
if value
64-
setenv('MYM_USE_32BIT_DIMS', 'true');
65-
else
66-
setenv('MYM_USE_32BIT_DIMS', 'false');
67-
end
62+
if strcmp(subscript(1).subs, 'use_32bit_dims')%~isempty(subscript(1).subs) && strcmp(subscript(1).subs, 'use_32bit_dims')
63+
ternary = @(varargin)varargin{end-varargin{1}};
64+
setenv('MYM_USE_32BIT_DIMS', ternary(value, 'true', 'false'));
6865
end
6966
end
7067
end

README.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,14 @@ For help in utilizing `dj.config` (added in `3.4.0`), you may access the help vi
4242

4343
* Create an `.env` with desired development environment values e.g.
4444
``` sh
45-
MATLAB_USER=raphael
46-
MATLAB_LICENSE="#\ BEGIN----...---------END" # For image usage instructions see https://github.com/guzman-raphael/matlab, https://hub.docker.com/r/raphaelguzman/matlab
47-
MATLAB_VERSION=R2018b
45+
MATLAB_USER=rguzman
46+
MATLAB_LICENSE=IyBCRUd... # For image usage instructions see https://github.com/guzman-raphael/matlab, https://hub.docker.com/r/raphaelguzman/matlab
47+
MATLAB_VERSION=R2019a
4848
MATLAB_HOSTID=XX:XX:XX:XX:XX:XX
4949
MATLAB_UID=1000
5050
MATLAB_GID=1000
5151
MYSQL_TAG=5.7
52+
MINIO_VER=RELEASE.2022-01-03T18-22-58Z
5253
```
5354
* `cp local-docker-compose.yaml docker-compose.yaml`
5455
* `docker-compose up` (Note configured `JUPYTER_PASSWORD`)

docs-parts/intro/Releases_lang1.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
3.5.0 -- TBD
22
--------------------------
3-
* Bugfix: Cascading delete for twice renamed foreign keys (#379) PR #386
3+
* Bugfix: Cascading delete for renamed foreign keys (#379) PR #386
44
* Minor: Add renaming the same attribute multiple times within a single projection PR #386
55
* Minor: Add config for reading values with 32-bit dimensions (datajoint/mym#86) PR #395
66

local-docker-compose.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ services:
121121
"
122122
cd "$${ORIG_DIR}"
123123
# Copy preferences
124-
cp /tmp/matlab.prf /home/muser/.matlab/${MATLAB_VERSION}/matlab.prf
124+
# cp /tmp/matlab.prf /home/muser/.matlab/${MATLAB_VERSION}/matlab.prf
125125
# Interactive Jupyter Notebook environment
126126
jupyter notebook
127127
mac_address: $MATLAB_HOSTID

tests/TestConfig.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -250,9 +250,9 @@ function validateEnvVarConfig(type, values)
250250
function TestConfig_testUse32BitDims(testCase)
251251
st = dbstack;
252252
disp(['---------------' st(1).name '---------------']);
253-
dj.config('use32BitDims', true);
253+
dj.config('use_32bit_dims', true);
254254
testCase.verifyEqual(getenv('MYM_USE_32BIT_DIMS'), 'true');
255-
dj.config('use32BitDims', false);
255+
dj.config('use_32bit_dims', false);
256256
testCase.verifyEqual(getenv('MYM_USE_32BIT_DIMS'), 'false');
257257

258258
dj.config.restore;

tests/TestDelete.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function TestDelete_testRenamedDelete(testCase)
3636
testCase.verifyEqual(...
3737
length(fetch(Company.Machine & struct('employee_id', 'shan'))), 0);
3838
end
39-
function TestDelete_testTwoFKOnePK(testCase)
39+
function TestDelete_testThreeFKOnePK(testCase)
4040
st = dbstack;
4141
disp(['---------------' st(1).name '---------------']);
4242
% https:%github.com/datajoint/datajoint-matlab/issues/379
@@ -63,7 +63,7 @@ function TestDelete_testTwoFKOnePK(testCase)
6363
testCase.verifyEqual(length(fetch(TestLab.User)), 3);
6464
testCase.verifyEqual(length(fetch(TestLab.Duty)), 1);
6565
testCase.verifyEqual(length(fetch(TestLab.User & 'user_id = "user1"')), 0);
66-
testCase.verifyEqual(length(fetch(TestLab.Duty & 'duty_first = "user1" OR duty_second = "user1"')), 0);
66+
testCase.verifyEqual(length(fetch(TestLab.Duty & 'duty_first = "user1" OR duty_second = "user1" OR duty_third = "user1"')), 0);
6767
end
6868
end
6969
end

tests/TestExternalFile.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,9 @@ function TestExternalFile_test32BitRead(testCase)
179179
data.sides = 'llllrrl';
180180
data.hits = [NaN,1,1,0,1,0,NaN];
181181

182-
dj.config('use32BitDims', true);
182+
dj.config('use_32bit_dims', true);
183183
unpacked = mym('deserialize', packed);
184-
dj.config('use32BitDims', false);
184+
dj.config('use_32bit_dims', false);
185185

186186
testCase.verifyEqual(unpacked, data);
187187
end

0 commit comments

Comments
 (0)