Skip to content

Commit 7b4c1c9

Browse files
Merge pull request #974 from kabilar/master
Fix documentation
2 parents f39d655 + c1c1d7d commit 7b4c1c9

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

docs-parts/computation/01-autopopulate_lang1.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@
1313
def make(self, key):
1414
img = (test.Image & key).fetch1('image')
1515
key['filtered_image'] = myfilter(img)
16-
self.insert(key)
16+
self.insert1(key)
1717
1818
The ``make`` method receives one argument: the dict ``key`` containing the primary key value of an element of :ref:`key source <keysource>` to be worked on.
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11

2-
To plot the ERD for an entire schema, an ERD object can be initialized with the schema object (which is normally used to decorate table objects)
2+
To plot the Diagram for an entire schema, an Diagram object can be initialized with the schema object (which is normally used to decorate table objects)
33

44
.. code-block:: python
55
66
import datajoint as dj
77
schema = dj.Schema('my_database')
8-
dj.ERD(schema).draw()
8+
dj.Diagram(schema).draw()
99
1010
or alternatively an object that has the schema object as an attribute, such as the module defining a schema:
1111

1212
.. code-block:: python
1313
1414
import datajoint as dj
1515
import seq # import the sequence module defining the seq database
16-
dj.ERD(seq).draw() # draw the ERD
16+
dj.Diagram(seq).draw() # draw the Diagram
1717
1818
Note that calling the ``.draw()`` method is not necessary when working in a Jupyter notebook.
19-
The preferred workflow is to simply let the object display itself, for example by writing ``dj.ERD(seq)``.
20-
The ERD will then render in the notebook using its ``_repr_html_`` method.
21-
An ERD displayed without ``.draw()`` will be rendered as an SVG, and hovering the mouse over a table will reveal a compact version of the output of the ``.describe()`` method.
19+
You can simply let the object display itself, for example by entering ``dj.Diagram(seq)`` in a notebook cell.
20+
The Diagram will automatically render in the notebook by calling its ``_repr_html_`` method.
21+
A Diagram displayed without ``.draw()`` will be rendered as an SVG, and hovering the mouse over a table will reveal a compact version of the output of the ``.describe()`` method.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11

22
.. code-block:: python
33
4-
dj.ERD(seq.Genome).draw()
4+
dj.Diagram(seq.Genome).draw()
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

22
.. code-block:: python
33
4-
# plot the ERD with tables Genome and Species from module seq.
5-
(dj.ERD(seq.Genome) + dj.ERD(seq.Species)).draw()
4+
# plot the Diagram with tables Genome and Species from module seq.
5+
(dj.Diagram(seq.Genome) + dj.Diagram(seq.Species)).draw()

docs-parts/definition/11-ERD_lang4.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
.. code-block:: python
33
44
# Plot all the tables directly downstream from ``seq.Genome``:
5-
(dj.ERD(seq.Genome)+1).draw()
5+
(dj.Diagram(seq.Genome)+1).draw()
66
77
.. code-block:: python
88
99
# Plot all the tables directly upstream from ``seq.Genome``:
10-
(dj.ERD(seq.Genome)-1).draw()
10+
(dj.Diagram(seq.Genome)-1).draw()
1111
1212
.. code-block:: python
1313
1414
# Plot the local neighborhood of ``seq.Genome``
15-
(dj.ERD(seq.Genome)+1-1+1-1).draw()
15+
(dj.Diagram(seq.Genome)+1-1+1-1).draw()

0 commit comments

Comments
 (0)