Opened 12 years ago

Closed 12 years ago

#5360 closed defect (duplicate)

Re-reading of #4927 convert sage.server.* docstrings to Sphinx

Reported by: hivert Owned by: tba
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: documentation Keywords:
Cc: mhansen Merged in:
Authors: Reviewers:
Report Upstream: Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

File: sage/server/introspect.py

  • Some pairs of single quote are transformed to double quote
    - sage: nb.add_user('Mark','password','',force=True) 
    + sage: nb.add_user('Mark','password',",force=True)
    
    - sage: C = sage.server.notebook.cell.Cell(0, 'plot(sin(x),0,5)', '', W) 
    + sage: C = sage.server.notebook.cell.Cell(0, 'plot(sin(x),0,5)', ", W) 
    

It looks like a bad Idea...

I probably miss some so that a systematic replace ,", by ,'', should solve the problem.

  • Also in edit_text. the transformation
    Returns a plain-text version of the worksheet with \{\{\{\}\}\} wiki-formatting,
    

into

Returns a plain-text version of the worksheet with {{{}}} 

looks suspicious to me.

  • function edit_save: lost {{{ }}}:
    ignore_ids -- bool (default: False); if True ignore all the 
                  id's in the {{{}}} code block. 
    

is now:

-  ``ignore_ids`` - bool (default: False); if True 
   ignore all the id's in the code block. 

Attachments (2)

trac_5360-sage_server_docstrings.patch (5.4 KB) - added by mpatel 12 years ago.
trac_5360-sage_server_docstrings_v2.patch (109.9 KB) - added by mpatel 12 years ago.
New version. Apply only this patch.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 12 years ago by hivert

  • Summary changed from Redeading of #4927 convert sage.server.* docstrings to Sphinx to Re-reading of #4927 convert sage.server.* docstrings to Sphinx

comment:2 Changed 12 years ago by mabshoff

  • Cc mhansen added

Is anybody working on a patch here?

Cheers,

Michael

comment:3 Changed 12 years ago by mpatel

After the merge of #5653, it seems that {{{, }}}, and {{{}}} render properly in the notebook. Try, e.g.,

sage.server.notebook.worksheet.Worksheet.edit_save?
sage.server.notebook.worksheet.Worksheet.edit_text?
sage.server.notebook.notebook.Notebook.import_worksheet?

Changed 12 years ago by mpatel

comment:4 Changed 12 years ago by mpatel

  • Summary changed from Re-reading of #4927 convert sage.server.* docstrings to Sphinx to [with patch, needs review] Re-reading of #4927 convert sage.server.* docstrings to Sphinx

The attached patch

  • Converts , ", to , '', for in sage.server.* dosctrings.
  • Fixes the ignore_ids omission mentioned above. I don't know if there are other instances of this problem.

Are there other problems? Actually, yes. See the next patch, which

  • Adds a few modules to notebook.rst.
  • Cleans up interact.py's docstrings so they display nicely in the reference manual and notebook.
  • Cleans up, e.g., EXAMPLES:, in a few other modules.
  • Edits some modules' title strings.

Feel free to make further changes.

Changed 12 years ago by mpatel

New version. Apply only this patch.

comment:5 Changed 12 years ago by mpatel

  • Keywords sphinx transform. removed
  • Priority changed from critical to major

comment:6 Changed 12 years ago by mpatel

Ticket #6840 also affects notebook.py and has a similar goal. Most of the changes here are in other files, so I could move part of v2 there.

comment:7 Changed 12 years ago by mpatel

  • Summary changed from [with patch, needs review] Re-reading of #4927 convert sage.server.* docstrings to Sphinx to [with patch, duplicate of #6840] Re-reading of #4927 convert sage.server.* docstrings to Sphinx

Tim Dumol has kindly merged v2 with #6840's v1. Please close this ticket when #6840 merges.

comment:8 Changed 12 years ago by mvngu

  • Milestone changed from sage-4.1.2 to sage-duplicate/invalid/wontfix
  • Resolution set to duplicate
  • Status changed from new to closed
  • Summary changed from [with patch, duplicate of #6840] Re-reading of #4927 convert sage.server.* docstrings to Sphinx to Re-reading of #4927 convert sage.server.* docstrings to Sphinx

Closing this ticket as a duplicate of #6840.

Note: See TracTickets for help on using tickets.