#14184: Fix # optional tags
----------------------------------+-----------------------------------------
       Reporter:  jdemeyer        |         Owner:  mvngu   
           Type:  defect          |        Status:  new     
       Priority:  major           |     Milestone:  sage-5.8
      Component:  doctest         |    Resolution:          
       Keywords:                  |   Work issues:          
Report Upstream:  N/A             |     Reviewers:          
        Authors:  Jeroen Demeyer  |     Merged in:          
   Dependencies:                  |      Stopgaps:          
----------------------------------+-----------------------------------------
Description changed by jdemeyer:

Old description:

> Execute
> {{{
> for file in `find devel/sage/sage -name '*.py*'`; do
> sed -i -f /dev/stdin $file <<'EOF'
>
> /sage: .*#/ {
> s/\(#.*\) needs optional/\1 optional -/i;
> s/\(#.*\) requires optional/\1 optional -/i;
> s/\(#.*\) and optional/\1; optional/i;
> s/\(#.*\) \(random\) optional/\1 \2; optional/i;
> s/\(#.*\) \(long time\) optional/\1 \2; optional/i;
>
> s/\([#;,]\) *optional and /\1 optional; /i;
>
> s/\([#;,]\) *optional[-:, ]* needs /\1 optional - /i;
> s/\([#;,]\) *optional[-:, ]* requires /\1 optional - /i;
> s/\([#;,]\) *optional[-:, ]* the /\1 optional - /i;
> s/\([#;,]\) *optional[-:, ]* package/\1 optional -/i;
> s/\([#;,]\) *optional[-: ]* GAP package \([A-Za-z0-9']*\)/\1 optional -
> gap_packages (\2 package)/i;
> s/\([#;,]\) *optional[-: ]* GAP optional database[s]*/\1 optional -
> database_gap/i;
> s/\([#;,]\) *optional[-: ]* \([A-Za-z0-9]*\) command/\1 optional - \2/i;
> s/\([#;,]\) *optional[-: ]* \([A-Za-z0-9]*\) package/\1 optional - \2/i;
> s/\([#;,]\) *optional[-: ]* \([A-Za-z0-9]*\) installed/\1 optional -
> \2/i;
> s/\([#;,]\) *optional[-: ]* \([A-Za-z0-9]*\) and /\1 optional - \2 /i;
> s/\([#;,]\) *optional[-: ]* \([A-Za-z0-9]*\) \(not tested\)/\1 optional -
> \2; \3/i;
>
> s/\([#;,]\) *optional[-: ]* internet connection/\1 optional - internet/i;
>
> s/\([#;,]\) *optional[-: ]* \(.*\)'\(.*\)'/\1 optional - \2\3/i;
>
> s/\([#;,]\) *\(optional - .*[^# ]\)[# ] *$/\1 \2/i;
> s/\([#;,]\) *optional[-: ][-: ]*$/\1 optional/i;
> }
>
> EOF
> done
> }}}

New description:

 Execute
 {{{
 for file in `find devel/sage/sage -name '*.py*'`; do
 sed -i -f /dev/stdin $file <<'EOF'

 /sage: .*#/ {
 s/\(#.*\) needs optional/\1 optional -/i;
 s/\(#.*\) requires optional/\1 optional -/i;
 s/\(#.*\) and optional/\1; optional/i;
 s/\(#.*\) \(random\) optional/\1 \2; optional/i;
 s/\(#.*\) \(long time\) optional/\1 \2; optional/i;

 s/\([#;,]\) *optional and /\1 optional; /i;

 s/\([#;,]\) *optional[-:, ]* needs /\1 optional - /i;
 s/\([#;,]\) *optional[-:, ]* requires /\1 optional - /i;
 s/\([#;,]\) *optional[-: ]* the /\1 optional - /i;
 s/\([#;,]\) *optional[-: ]* GAP packages/\1 optional - gap_packages/i;
 s/\([#;,]\) *optional[-: ]* GAP package \([A-Za-z0-9']*\)/\1 optional -
 gap_packages (\2 package)/i;
 s/\([#;,]\) *optional[-: ]* GAP optional database[s]*/\1 optional -
 database_gap/i;
 s/\([#;,]\) *optional[-: ]* package/\1 optional -/i;
 s/\([#;,]\) *optional[-: ]* \([A-Za-z0-9]*\) command/\1 optional - \2/i;
 s/\([#;,]\) *optional[-: ]* \([A-Za-z0-9]*\) package/\1 optional - \2/i;
 s/\([#;,]\) *optional[-: ]* \([A-Za-z0-9]*\) installed/\1 optional - \2/i;
 s/\([#;,]\) *optional[-: ]* \([A-Za-z0-9]*\) and /\1 optional - \2 /i;
 s/\([#;,]\) *optional[-: ]* \([A-Za-z0-9]*\) \(not tested\)/\1 optional -
 \2; \3/i;
 s/\([#;,]\) *optional[-: ]* internet connection/\1 optional - internet/i;

 s/\([#;,]\) *optional[-: ]* \(.*\)'\(.*\)'/\1 optional - \2\3/i;

 T;

 s/\([#;,] *optional - .*[^# ]\)[# ] *$/\1/i;
 s/\([#;,] *optional\)[-: ][-: ]*$/\1/i;
 }

 EOF
 done
 }}}

--

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14184#comment:4>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to