Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create an option to clear all cell output #336

Closed
TimothyClemans mannequin opened this issue Mar 27, 2007 · 5 comments
Closed

Create an option to clear all cell output #336

TimothyClemans mannequin opened this issue Mar 27, 2007 · 5 comments

Comments

@TimothyClemans
Copy link
Mannequin

TimothyClemans mannequin commented Mar 27, 2007

I am homeschooled and doing programming in the notebook for credit. I would like to clear all of the output on my worksheets so I can print the code for the worksheet without the computer generated output.

Component: notebook

Issue created by migration from https://trac.sagemath.org/ticket/336

@williamstein
Copy link
Contributor

comment:2

The attached patch does the following:

Fix trac #336 -- "delete all output" for the Sage notebook worksheets.  Also:
   1. Changed "Revisions" to "Undo" in the notebook, since it is clearer.
   2. Added several new functions needed to implement #336 and fully documented
      and doctested all of them.  This meant improving the functions that
      support writing doctests for the notebook, and doctesting those 
      functions too.  Doctesting of the notebook is thus actually *greatly*
      improved by this patch.
   3. Made some fixes to doctests also so that parallel doctesting works.    
      In particular, avoid clashes in temp notebook names. 
   4. Created a cell "evaluated" function to keep track of whether or not
      cells have been evaluated.  I did this in order to non-hackishly 
      implement "delete all output".  It will also be very useful for other
      tickets.   I added a lot of doctesting related to this too. 
   5. Added a worksheet function user_can_edit to double check that the
      given user can edit the worksheet; this is used by the "delete all output" 
      code as a double check that invalid users can't delete all output. 

To test it do the following:

  1. apply the patch and build
  2. Make a worksheet and selected "Action -> Delete all output"
  3. Note that all output is gone. Click refresh to see that the server got the message
  4. Doctest the sage/server/notebook directory. It has a bunch of new doctests.
  5. Read over the patch itself to see how it's all implemented:
    * some javascript to delete the output from the DOM
    * some server-side python code to do the actual deleting
    * some general server-side code to improving doctesting of the notebook.
    * general doc improvements.

@williamstein
Copy link
Contributor

Attachment: sage-336.patch.gz

@TimothyClemans
Copy link
Mannequin Author

TimothyClemans mannequin commented May 11, 2008

comment:3

One doctest failure

File "/home/tclemans/sage-3.0/tmp/notebook.py", line 133:
    sage: os.listdir('notebook-test')
Expected:
    ['backups', 'nb.sobj', 'objects', 'worksheets']
Got:
    ['worksheets', 'objects', 'backups', 'nb.sobj']

@TimothyClemans TimothyClemans mannequin changed the title Create an option to clear all cell output [negative review] Create an option to clear all cell output May 11, 2008
@TimothyClemans
Copy link
Mannequin Author

TimothyClemans mannequin commented May 11, 2008

comment:4

Attachment: 336_doctestfix.patch.gz

Positive review with doctestfix patch. I didn't really do 5 except I did look at the doctest stuff.

@TimothyClemans TimothyClemans mannequin changed the title [negative review] Create an option to clear all cell output Create an option to clear all cell output May 11, 2008
@sagetrac-mabshoff
Copy link
Mannequin

sagetrac-mabshoff mannequin commented May 11, 2008

comment:5

Merged in Sage 3.0.2.alpha0

@sagetrac-mabshoff sagetrac-mabshoff mannequin added this to the sage-3.0.2 milestone May 11, 2008
@sagetrac-mabshoff sagetrac-mabshoff mannequin closed this as completed May 11, 2008
vbraun pushed a commit that referenced this issue Mar 26, 2023
    
Bumps [actions/github-script](https://github.com/actions/github-script)
from 3.1.0 to 6.4.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/actions/github-
script/releases">actions/github-script's releases</a>.</em></p>
<blockquote>
<h2>v6.4.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Bump json5 from 2.1.3 to 2.2.3 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://github-redirect.dependabot.com/actions/github-
script/pull/319">actions/github-script#319</a></li>
<li>Bump minimatch from 3.0.4 to 3.1.2 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://github-redirect.dependabot.com/actions/github-
script/pull/320">actions/github-script#320</a></li>
<li>Add node-fetch by <a
href="https://github.com/danmichaelo"><code>@​danmichaelo</code></a> in
<a href="https://github-redirect.dependabot.com/actions/github-
script/pull/321">actions/github-script#321</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/jongwooo"><code>@​jongwooo</code></a>
made their first contribution in <a href="https://github-
redirect.dependabot.com/actions/github-script/pull/313">actions/github-
script#313</a></li>
<li><a
href="https://github.com/austinvazquez"><code>@​austinvazquez</code></a>
made their first contribution in <a href="https://github-
redirect.dependabot.com/actions/github-script/pull/306">actions/github-
script#306</a></li>
<li><a
href="https://github.com/danmichaelo"><code>@​danmichaelo</code></a>
made their first contribution in <a href="https://github-
redirect.dependabot.com/actions/github-script/pull/321">actions/github-
script#321</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/github-
script/compare/v6.3.3...v6.4.0">https://github.com/actions/github-
script/compare/v6.3.3...v6.4.0</a></p>
<h2>v6.3.3</h2>
<h2>What's Changed</h2>
<ul>
<li>Update <code>@actions/glob</code> to 0.3.0 by <a
href="https://github.com/nineinchnick"><code>@​nineinchnick</code></a>
in <a href="https://github-redirect.dependabot.com/actions/github-
script/pull/279">actions/github-script#279</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/nineinchnick"><code>@​nineinchnick</code></a>
made their first contribution in <a href="https://github-
redirect.dependabot.com/actions/github-script/pull/279">actions/github-
script#279</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/github-
script/compare/v6.3.2...v6.3.3">https://github.com/actions/github-
script/compare/v6.3.2...v6.3.3</a></p>
<h2>v6.3.2</h2>
<h2>What's Changed</h2>
<ul>
<li>Update <code>@​actions/core</code> to 1.10.0 by <a
href="https://github.com/rentziass"><code>@​rentziass</code></a> in <a
href="https://github-redirect.dependabot.com/actions/github-
script/pull/295">actions/github-script#295</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/rentziass"><code>@​rentziass</code></a>
made their first contribution in <a href="https://github-
redirect.dependabot.com/actions/github-script/pull/295">actions/github-
script#295</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/github-
script/compare/v6.3.1...v6.3.2">https://github.com/actions/github-
script/compare/v6.3.1...v6.3.2</a></p>
<h2>v6.3.1</h2>
<h2>What's Changed</h2>
<ul>
<li>Fix overriding request options from <code>@​actions/github</code> by
<a
href="https://github.com/luketomlinson"><code>@​luketomlinson</code></a>
in <a href="https://github-redirect.dependabot.com/actions/github-
script/pull/293">actions/github-script#293</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/github-
script/compare/v6.3.0...v6.3.1">https://github.com/actions/github-
script/compare/v6.3.0...v6.3.1</a></p>
<h2>v6.3.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Add retry plugin and related options  by <a
href="https://github.com/luketomlinson"><code>@​luketomlinson</code></a>
in <a href="https://github-redirect.dependabot.com/actions/github-
script/pull/288">actions/github-script#288</a>, see <a
href="https://github.com/actions/github-
script/tree/v6.3.0#retries">https://github.com/actions/github-
script/tree/v6.3.0#retries</a> for more information.</li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/luketomlinson"><code>@​luketomlinson</code></a>
made their first contribution in <a href="https://github-
redirect.dependabot.com/actions/github-script/pull/288">actions/github-
script#288</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/github-
script/compare/v6.2.0...v6.3.0">https://github.com/actions/github-
script/compare/v6.2.0...v6.3.0</a></p>
<h2>v6.2.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Update <code>@octokit/plugin-rest-endpoint-methods</code> to version
6.x by <a href="https://github.com/desrosj"><code>@​desrosj</code></a>
in <a href="https://github-redirect.dependabot.com/actions/github-
script/pull/283">actions/github-script#283</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="actions/github-script@98814c53be7
9b1d30f795b907e553d8679345975"><code>98814c5</code></a> Merge pull
request <a href="https://github-redirect.dependabot.com/actions/github-
script/issues/339">#339</a> from actions/joshmgross/bump-package-
version</li>
<li><a href="actions/github-script@ba6cf3fe7cf
53f06998ea428adfe8f0da42d62fa"><code>ba6cf3f</code></a> Bump version to
6.4.0</li>
<li><a href="actions/github-script@bcc389184da
6172665613604320b19b409a8c941"><code>bcc3891</code></a> Merge pull
request <a href="https://github-redirect.dependabot.com/actions/github-
script/issues/321">#321</a> from danmichaelo/node-fetch</li>
<li><a href="actions/github-script@da8818015eb
5c3d01f8ad6db6bd8e3a2b460c71c"><code>da88180</code></a> Merge
<code>main</code></li>
<li><a href="actions/github-script@4d93f388900
dddc32a5a278a0ff985a0f06ca5c8"><code>4d93f38</code></a> Update dist and
audit deps</li>
<li><a href="actions/github-script@0550e858012
a6d3a73fbdd735e96b8e4c35e5a9d"><code>0550e85</code></a> Merge pull
request <a href="https://github-redirect.dependabot.com/actions/github-
script/issues/336">#336</a> from actions/joshmgross/minimatch-
license</li>
<li><a href="actions/github-script@5420835fff8
001a224a310d320b6e02eed0713d8"><code>5420835</code></a> Merge branch
'main' into joshmgross/minimatch-license</li>
<li><a href="actions/github-script@03377835c37
17d8126c1d93eaaa72b55287f783d"><code>0337783</code></a> Merge pull
request <a href="https://github-redirect.dependabot.com/actions/github-
script/issues/338">#338</a> from actions/joshmgross/fix-dist</li>
<li><a href="actions/github-script@8c6dda0186c
7ac8a53030e285851d54aabcd3620"><code>8c6dda0</code></a> Regenerate
<code>dist</code></li>
<li><a href="actions/github-script@ee0d992b062
bc63a761e39c472f63aa0865b1e41"><code>ee0d992</code></a> Use Node 16 in
CI and examples</li>
<li>Additional commits viewable in <a
href="https://github.com/actions/github-
script/compare/v3.1.0...v6.4.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-
badges.githubapp.com/badges/compatibility_score?dependency-
name=actions/github-script&package-manager=github_actions&previous-
version=3.1.0&new-
version=6.4.0)](https://docs.github.com/en/github/managing-security-
vulnerabilities/about-dependabot-security-updates#about-compatibility-
scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>
    
URL: #35184
Reported by: dependabot[bot]
Reviewer(s): Tobias Diez
tobiasdiez pushed a commit to tobiasdiez/sage that referenced this issue Feb 22, 2024
mkoeppe added a commit to mkoeppe/sage that referenced this issue Nov 11, 2024
…s_fix

build/bin/sage-spkg-info: Adjust RST titles to fix sphinx warning 'Title overline too short'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants