Skip to content

Commit a20b1f2

Browse files
PXP-7328 Add delete_records and delete_nodes functions (#68)
1 parent 0be25c5 commit a20b1f2

19 files changed

+420
-136
lines changed
3.76 KB
Binary file not shown.
16.7 KB
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

docs/_build/html/_modules/gen3/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,7 @@ <h1>Source code for gen3.index</h1><div class="highlight"><pre>
655655
<span class="n">json</span><span class="p">[</span><span class="s2">&quot;authz&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">authz</span>
656656

657657
<span class="n">response</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">client</span><span class="o">.</span><span class="n">_put</span><span class="p">(</span>
658-
<span class="s2">&quot;index/blank/&quot;</span><span class="p">,</span>
658+
<span class="s2">&quot;index/blank&quot;</span><span class="p">,</span>
659659
<span class="n">guid</span><span class="p">,</span>
660660
<span class="n">headers</span><span class="o">=</span><span class="p">{</span><span class="s2">&quot;content-type&quot;</span><span class="p">:</span> <span class="s2">&quot;application/json&quot;</span><span class="p">},</span>
661661
<span class="n">params</span><span class="o">=</span><span class="n">params</span><span class="p">,</span>

docs/_build/html/_modules/gen3/submission.html

Lines changed: 92 additions & 6 deletions
Large diffs are not rendered by default.

docs/_build/html/genindex.html

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,14 @@ <h2 id="D">D</h2>
149149
</li>
150150
<li><a href="metadata.html#gen3.metadata.Gen3Metadata.delete_index_key_path">delete_index_key_path() (gen3.metadata.Gen3Metadata method)</a>
151151
</li>
152-
<li><a href="submission.html#gen3.submission.Gen3Submission.delete_program">delete_program() (gen3.submission.Gen3Submission method)</a>
152+
<li><a href="submission.html#gen3.submission.Gen3Submission.delete_node">delete_node() (gen3.submission.Gen3Submission method)</a>
153+
</li>
154+
<li><a href="submission.html#gen3.submission.Gen3Submission.delete_nodes">delete_nodes() (gen3.submission.Gen3Submission method)</a>
153155
</li>
154156
</ul></td>
155157
<td style="width: 33%; vertical-align: top;"><ul>
158+
<li><a href="submission.html#gen3.submission.Gen3Submission.delete_program">delete_program() (gen3.submission.Gen3Submission method)</a>
159+
</li>
156160
<li><a href="submission.html#gen3.submission.Gen3Submission.delete_project">delete_project() (gen3.submission.Gen3Submission method)</a>
157161
</li>
158162
<li><a href="indexing.html#gen3.index.Gen3Index.delete_record">delete_record() (gen3.index.Gen3Index method)</a>
@@ -161,6 +165,8 @@ <h2 id="D">D</h2>
161165
<li><a href="submission.html#gen3.submission.Gen3Submission.delete_record">(gen3.submission.Gen3Submission method)</a>
162166
</li>
163167
</ul></li>
168+
<li><a href="submission.html#gen3.submission.Gen3Submission.delete_records">delete_records() (gen3.submission.Gen3Submission method)</a>
169+
</li>
164170
</ul></td>
165171
</tr></table>
166172

docs/_build/html/objects.inv

9 Bytes
Binary file not shown.

docs/_build/html/searchindex.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/_build/html/submission.html

Lines changed: 86 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,54 @@ <h1>Gen3 Submission Class<a class="headerlink" href="#gen3-submission-class" tit
9797
</div>
9898
</dd></dl>
9999

100+
<dl class="method">
101+
<dt id="gen3.submission.Gen3Submission.delete_node">
102+
<code class="descname">delete_node</code><span class="sig-paren">(</span><em>program</em>, <em>project</em>, <em>node_name</em>, <em>verbose=True</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/gen3/submission.html#Gen3Submission.delete_node"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#gen3.submission.Gen3Submission.delete_node" title="Permalink to this definition"></a></dt>
103+
<dd><p>Delete all records for a node from a project.</p>
104+
<table class="docutils field-list" frame="void" rules="none">
105+
<col class="field-name" />
106+
<col class="field-body" />
107+
<tbody valign="top">
108+
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
109+
<li><strong>program</strong> (<em>str</em>) – The program to delete from.</li>
110+
<li><strong>project</strong> (<em>str</em>) – The project to delete from.</li>
111+
<li><strong>node_name</strong> (<em>str</em>) – Name of the node to delete</li>
112+
</ul>
113+
</td>
114+
</tr>
115+
</tbody>
116+
</table>
117+
<p class="rubric">Examples</p>
118+
<p>This deletes a node from the CCLE project in the sandbox commons.</p>
119+
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">Gen3Submission</span><span class="o">.</span><span class="n">delete_record</span><span class="p">(</span><span class="s2">&quot;DCF&quot;</span><span class="p">,</span> <span class="s2">&quot;CCLE&quot;</span><span class="p">,</span> <span class="s2">&quot;demographic&quot;</span><span class="p">)</span>
120+
</pre></div>
121+
</div>
122+
</dd></dl>
123+
124+
<dl class="method">
125+
<dt id="gen3.submission.Gen3Submission.delete_nodes">
126+
<code class="descname">delete_nodes</code><span class="sig-paren">(</span><em>program</em>, <em>project</em>, <em>ordered_node_list</em>, <em>batch_size=100</em>, <em>verbose=True</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/gen3/submission.html#Gen3Submission.delete_nodes"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#gen3.submission.Gen3Submission.delete_nodes" title="Permalink to this definition"></a></dt>
127+
<dd><p>Delete all records for a list of nodes from a project.</p>
128+
<table class="docutils field-list" frame="void" rules="none">
129+
<col class="field-name" />
130+
<col class="field-body" />
131+
<tbody valign="top">
132+
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
133+
<li><strong>program</strong> (<em>str</em>) – The program to delete from.</li>
134+
<li><strong>project</strong> (<em>str</em>) – The project to delete from.</li>
135+
<li><strong>ordered_node_list</strong> (<em>list</em>) – The list of nodes to delete, in reverse graph submission order</li>
136+
</ul>
137+
</td>
138+
</tr>
139+
</tbody>
140+
</table>
141+
<p class="rubric">Examples</p>
142+
<p>This deletes a list of nodes from the CCLE project in the sandbox commons.</p>
143+
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">Gen3Submission</span><span class="o">.</span><span class="n">delete_record</span><span class="p">(</span><span class="s2">&quot;DCF&quot;</span><span class="p">,</span> <span class="s2">&quot;CCLE&quot;</span><span class="p">,</span> <span class="p">[</span><span class="s2">&quot;demographic&quot;</span><span class="p">,</span> <span class="s2">&quot;subject&quot;</span><span class="p">,</span> <span class="s2">&quot;experiment&quot;</span><span class="p">])</span>
144+
</pre></div>
145+
</div>
146+
</dd></dl>
147+
100148
<dl class="method">
101149
<dt id="gen3.submission.Gen3Submission.delete_program">
102150
<code class="descname">delete_program</code><span class="sig-paren">(</span><em>program</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/gen3/submission.html#Gen3Submission.delete_program"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#gen3.submission.Gen3Submission.delete_program" title="Permalink to this definition"></a></dt>
@@ -144,20 +192,51 @@ <h1>Gen3 Submission Class<a class="headerlink" href="#gen3-submission-class" tit
144192
<dl class="method">
145193
<dt id="gen3.submission.Gen3Submission.delete_record">
146194
<code class="descname">delete_record</code><span class="sig-paren">(</span><em>program</em>, <em>project</em>, <em>uuid</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/gen3/submission.html#Gen3Submission.delete_record"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#gen3.submission.Gen3Submission.delete_record" title="Permalink to this definition"></a></dt>
147-
<dd><p>Delete a record from a project.
148-
:param program: The program to delete from.
149-
:type program: str
150-
:param project: The project to delete from.
151-
:type project: str
152-
:param uuid: The uuid of the record to delete
153-
:type uuid: str</p>
195+
<dd><p>Delete a record from a project.</p>
196+
<table class="docutils field-list" frame="void" rules="none">
197+
<col class="field-name" />
198+
<col class="field-body" />
199+
<tbody valign="top">
200+
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
201+
<li><strong>program</strong> (<em>str</em>) – The program to delete from.</li>
202+
<li><strong>project</strong> (<em>str</em>) – The project to delete from.</li>
203+
<li><strong>uuid</strong> (<em>str</em>) – The uuid of the record to delete</li>
204+
</ul>
205+
</td>
206+
</tr>
207+
</tbody>
208+
</table>
154209
<p class="rubric">Examples</p>
155210
<p>This deletes a record from the CCLE project in the sandbox commons.</p>
156211
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">Gen3Submission</span><span class="o">.</span><span class="n">delete_record</span><span class="p">(</span><span class="s2">&quot;DCF&quot;</span><span class="p">,</span> <span class="s2">&quot;CCLE&quot;</span><span class="p">,</span> <span class="n">uuid</span><span class="p">)</span>
157212
</pre></div>
158213
</div>
159214
</dd></dl>
160215

216+
<dl class="method">
217+
<dt id="gen3.submission.Gen3Submission.delete_records">
218+
<code class="descname">delete_records</code><span class="sig-paren">(</span><em>program</em>, <em>project</em>, <em>uuids</em>, <em>batch_size=100</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/gen3/submission.html#Gen3Submission.delete_records"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#gen3.submission.Gen3Submission.delete_records" title="Permalink to this definition"></a></dt>
219+
<dd><p>Delete a list of records from a project.</p>
220+
<table class="docutils field-list" frame="void" rules="none">
221+
<col class="field-name" />
222+
<col class="field-body" />
223+
<tbody valign="top">
224+
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
225+
<li><strong>program</strong> (<em>str</em>) – The program to delete from.</li>
226+
<li><strong>project</strong> (<em>str</em>) – The project to delete from.</li>
227+
<li><strong>uuids</strong> (<em>list</em>) – The list of uuids of the records to delete</li>
228+
</ul>
229+
</td>
230+
</tr>
231+
</tbody>
232+
</table>
233+
<p class="rubric">Examples</p>
234+
<p>This deletes a list of records from the CCLE project in the sandbox commons.</p>
235+
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">Gen3Submission</span><span class="o">.</span><span class="n">delete_record</span><span class="p">(</span><span class="s2">&quot;DCF&quot;</span><span class="p">,</span> <span class="s2">&quot;CCLE&quot;</span><span class="p">,</span> <span class="p">[</span><span class="s2">&quot;uuid1&quot;</span><span class="p">,</span> <span class="s2">&quot;uuid2&quot;</span><span class="p">])</span>
236+
</pre></div>
237+
</div>
238+
</dd></dl>
239+
161240
<dl class="method">
162241
<dt id="gen3.submission.Gen3Submission.export_node">
163242
<code class="descname">export_node</code><span class="sig-paren">(</span><em>program</em>, <em>project</em>, <em>node_type</em>, <em>fileformat</em>, <em>filename=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/gen3/submission.html#Gen3Submission.export_node"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#gen3.submission.Gen3Submission.export_node" title="Permalink to this definition"></a></dt>

0 commit comments

Comments
 (0)