Skip to content

Commit ca427b9

Browse files
Merge pull request #142 from austin-hilberg/master
Documentation content additions and revisions for M2
2 parents 7dc34a9 + 4a96542 commit ca427b9

32 files changed

+312
-35
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.. note::
2+
3+
External storage is not yet implemented in MATLAB.
4+
The feature will be added in an upcoming release: https://github.com/datajoint/datajoint-matlab/issues/143
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Use ``dj.set`` for configuration.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.. note::
2+
3+
The cache folder is not yet implemented in MATLAB.
4+
The feature will be added in an upcoming release: https://github.com/datajoint/datajoint-matlab/issues/143
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.. note::
2+
3+
External storage is not yet implemented in MATLAB.
4+
The feature will be added in an upcoming release: https://github.com/datajoint/datajoint-matlab/issues/143
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.. note::
2+
3+
External storage is not yet implemented in MATLAB.
4+
The feature will be added in an upcoming release: https://github.com/datajoint/datajoint-matlab/issues/143
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Behavior of the ``populate`` method depends on the number of output arguments requested in the function call.
2+
When no output arguments are requested, errors will halt population.
3+
With two output arguments (``failedKeys`` and ``errors``), ``populate`` will catch any encountered errors and return them along with the offending keys.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
The function ``parpopulate`` works identically to ``populate`` except that it uses a job reservation mechanism to allow multiple processes to populate the same table in parallel without collision.
2+
When running ``parpopulate`` for the first time, DataJoint will create a job reservation table and its class ``<package>.Jobs`` with the following declaration:
3+
4+
.. code-block:: matlab
5+
6+
{%
7+
# the job reservation table
8+
table_name : varchar(255) # className of the table
9+
key_hash : char(32) # key hash
10+
---
11+
status : enum('reserved','error','ignore')# if tuple is missing, the job is available
12+
key=null : blob # structure containing the key
13+
error_message="" : varchar(1023) # error message returned if failed
14+
error_stack=null : blob # error stack if failed
15+
host="" : varchar(255) # system hostname
16+
pid=0 : int unsigned # system process id
17+
timestamp=CURRENT_TIMESTAMP : timestamp # automatic timestamp
18+
%}
19+
20+
A job is considered to be available when ``<package>.Jobs`` contains no matching entry.
21+
22+
For each ``make`` call, ``parpopulate`` sets the job status to ``reserved``.
23+
When the job is completed, the record is removed.
24+
If the job results in error, the job record is left in place with the status set to ``error`` and the error message and error stacks saved.
25+
Consequently, jobs that ended in error during the last execution will not be attempted again until you delete the corresponding entities from ``<package>.Jobs``.
26+
27+
The primary key of the jobs table comprises the name of the class and a 32-character hash of the job's primary key.
28+
However, the key is saved in a separate field for error debugging purposes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
A custom key source can be configured by setting the ``keySource`` property within a table's ``classdef`` block, using MATLAB's `dependent properties <https://www.mathworks.com/help/matlab/matlab_oop/access-methods-for-dependent-properties.html>`_ syntax.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
.. code-block:: matlab
2+
3+
%{
4+
-> Recording
5+
---
6+
sample_rate : float
7+
eeg_data : longblob
8+
%}
9+
classdef EEG < dj.Imported
10+
11+
methods
12+
function q = get.keySource(self)
13+
q = ephys.Recording & 'recording_type = "EEG"'
14+
end
15+
end
16+
17+
end

docs-parts/computation/04-master-part_lang1.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ The part table must declare the property ``master`` containing an object of the
2626
2727
%{
2828
# Region of interest resulting from segmentation
29-
-> Segmentation
29+
-> test.Segmentation
3030
roi : smallint # roi number
3131
---
3232
roi_pixels : longblob # indices of pixels

0 commit comments

Comments
 (0)