Ticket #6709 (closed: fixed)

Opened 8 years ago

Last modified 5 years ago

Custom Usage Wikisection

Reported by: Owen Arnold Owned by: Owen Arnold
Priority: blocker Milestone: Release 2.5
Component: Mantid Keywords:
Cc: nick.draper@… Blocked By: #6147
Blocking: #6690 Tester: Martyn Gigg

Description

Change the wikimaker to handle two types of custom usage section *WIKI_USAGE* and *WIKI_USAGE_NO_SIGNATURE*

The first option will append a wiki usage below the auto-generated usage section on the wiki page. The second option will replace the wiki usage section with the custom section. Either of these two options are only extracted from the source code *.cpp and *.py files.

Also under this ticket, existing algorithms (with a custom usage section) will be updated to use these tags.

Change History

comment:1 Changed 8 years ago by Owen Arnold

  • Status changed from new to accepted
  • Blocking 6690 added

comment:3 Changed 8 years ago by Nick Draper

Re #6709 several algorithms changed to new format

Changeset: 4a061283b265d96b750d9f84aeafa860642e57fb

comment:4 Changed 8 years ago by Nick Draper

Re #6709 load algotithm added as a no sig section

Changeset: d1afc81687f88ecfb46415bbbd794d864d09fc23

comment:5 Changed 8 years ago by Nick Draper

Re #6709 the rest of the algorithms

Changeset: baf143f838d4ddd67185a241b0f405ad7f67b73b

comment:6 Changed 8 years ago by Owen Arnold

refs #6709. Adapt wiki_maker for usages.

Changeset: d1b6e9effe812b4e853a665c002d4c5293d73d49

comment:7 Changed 8 years ago by Owen Arnold

Tester:

try running the wikimaker on these adapted algorithms using the --dry-run option. You should see that the usage section appears right after the automatically generated usage section.

comment:8 Changed 8 years ago by Nick Draper

Re #6709 several algorithms changed to new format

Changeset: 4a061283b265d96b750d9f84aeafa860642e57fb

comment:9 Changed 8 years ago by Nick Draper

Re #6709 load algotithm added as a no sig section

Changeset: d1afc81687f88ecfb46415bbbd794d864d09fc23

comment:10 Changed 8 years ago by Nick Draper

Re #6709 the rest of the algorithms

Changeset: baf143f838d4ddd67185a241b0f405ad7f67b73b

comment:11 Changed 8 years ago by Owen Arnold

refs #6709. Adapt wiki_maker for usages.

Changeset: d1b6e9effe812b4e853a665c002d4c5293d73d49

comment:12 Changed 8 years ago by Owen Arnold

Merge branch refs #6709 'feature/6709_custom_usage' into develop

Conflicts:

Code/Mantid/Framework/Algorithms/src/Rebunch.cpp

Changeset: 5e996f244771c0453b8bb84dd740a6fadb4cb789

comment:13 Changed 8 years ago by Owen Arnold

  • Status changed from accepted to verify
  • Resolution set to fixed

comment:14 Changed 8 years ago by Nick Draper

  • Status changed from verify to verifying
  • Tester set to Nick Draper

comment:15 Changed 8 years ago by Nick Draper

  • Status changed from verifying to reopened
  • Resolution fixed deleted

Wikimaker fails for Plus, Rebin, Rebunch

Plus
Getting algorithm *WIKI_USAGE* section from source.
Traceback (most recent call last):
  File "c:\mantid\Code\Mantid\Build\wiki_maker.py", line 609, in <module>
    do_algorithm(args, algo, int(args.algversion))
  File "c:\mantid\Code\Mantid\Build\wiki_maker.py", line 473, in do_algorithm
    new_contents = make_wiki(algo, version, latest_version)
  File "c:\mantid\Code\Mantid\Build\wiki_maker.py", line 249, in make_wiki
    out += " " + create_function_signature(alg, algo_name) + "\n\n"
  File "c:\mantid\Code\Mantid\Build\wiki_maker.py", line 399, in create_function
_signature
    from mantid.simpleapi import _get_function_spec
ImportError: cannot import name _get_function_spec

comment:16 Changed 8 years ago by Owen Arnold

I've re-tried this algorithm specifically on mountain lion and it seems to work. I'm going to have to try this on windows.

comment:17 Changed 8 years ago by Owen Arnold

  • Status changed from reopened to accepted

comment:18 Changed 8 years ago by Owen Arnold

Ok, There's been a change since this morning that has broken this on Master. The branch was created fresh off master at about 9.00. The wikimaker was working for all algorithms. At 1pm, master had changed sufficiently that merging the branch back onto master has caused the issues outlined by Nick.

comment:19 Changed 8 years ago by Owen Arnold

refs #6709. Merge branch 'master' into feature/6709_custom_usage

Conflicts:

Code/Mantid/Build/wiki_maker.py Code/Mantid/Framework/Algorithms/src/Rebunch.cpp

Changeset: b8031940c3e134e29bb3a979e2d114c2f36c0a93

comment:20 Changed 8 years ago by Owen Arnold

refs #6709. Merge functionality.

Works for both Debug and release builds. The usage section is also what was specified.

Changeset: 2a8a6dec14f0701edf590cb281320f3716e95afc

comment:21 Changed 8 years ago by Nick Draper

Re #6709 several algorithms changed to new format

Changeset: 4a061283b265d96b750d9f84aeafa860642e57fb

comment:22 Changed 8 years ago by Nick Draper

Re #6709 load algotithm added as a no sig section

Changeset: d1afc81687f88ecfb46415bbbd794d864d09fc23

comment:23 Changed 8 years ago by Nick Draper

Re #6709 the rest of the algorithms

Changeset: baf143f838d4ddd67185a241b0f405ad7f67b73b

comment:24 Changed 8 years ago by Owen Arnold

refs #6709. Adapt wiki_maker for usages.

Changeset: d1b6e9effe812b4e853a665c002d4c5293d73d49

comment:25 Changed 8 years ago by Owen Arnold

refs #6709. Merge branch 'master' into feature/6709_custom_usage

Conflicts:

Code/Mantid/Build/wiki_maker.py Code/Mantid/Framework/Algorithms/src/Rebunch.cpp

Changeset: b8031940c3e134e29bb3a979e2d114c2f36c0a93

comment:26 Changed 8 years ago by Owen Arnold

refs #6709. Merge functionality.

Works for both Debug and release builds. The usage section is also what was specified.

Changeset: 2a8a6dec14f0701edf590cb281320f3716e95afc

comment:27 Changed 8 years ago by Owen Arnold

  • Status changed from accepted to verify
  • Resolution set to fixed

comment:28 Changed 8 years ago by Nick Draper

  • Status changed from verify to verifying

comment:29 Changed 8 years ago by Nick Draper

Re #6709 several algorithms changed to new format

Changeset: 4a061283b265d96b750d9f84aeafa860642e57fb

comment:30 Changed 8 years ago by Nick Draper

Re #6709 load algotithm added as a no sig section

Changeset: d1afc81687f88ecfb46415bbbd794d864d09fc23

comment:31 Changed 8 years ago by Nick Draper

Re #6709 the rest of the algorithms

Changeset: baf143f838d4ddd67185a241b0f405ad7f67b73b

comment:32 Changed 8 years ago by Owen Arnold

refs #6709. Adapt wiki_maker for usages.

Changeset: d1b6e9effe812b4e853a665c002d4c5293d73d49

comment:33 Changed 8 years ago by Owen Arnold

refs #6709. Merge branch 'master' into feature/6709_custom_usage

Conflicts:

Code/Mantid/Build/wiki_maker.py Code/Mantid/Framework/Algorithms/src/Rebunch.cpp

Changeset: b8031940c3e134e29bb3a979e2d114c2f36c0a93

comment:34 Changed 8 years ago by Owen Arnold

refs #6709. Merge functionality.

Works for both Debug and release builds. The usage section is also what was specified.

Changeset: 2a8a6dec14f0701edf590cb281320f3716e95afc

comment:35 Changed 8 years ago by Nick Draper

  • Status changed from verifying to closed

comment:36 Changed 8 years ago by Owen Arnold

  • Status changed from closed to reopened
  • Resolution fixed deleted

comment:37 Changed 8 years ago by Owen Arnold

refs #6709. Outstanding problems.

.Firstly if there is no custom usage, the auto generated usage never gets added. Secondly, if there is a deprecated section, then the screenshot gets overwritten.

Changeset: 1252c89896078ba4b3b8e7b7bbf8a6dd67861136

comment:38 Changed 8 years ago by Owen Arnold

  • Status changed from reopened to accepted

comment:39 Changed 8 years ago by Owen Arnold

  • Status changed from accepted to verify
  • Resolution set to fixed

comment:40 Changed 8 years ago by Owen Arnold

refs #6709. Outstanding problems.

.Firstly if there is no custom usage, the auto generated usage never gets added. Secondly, if there is a deprecated section, then the screenshot gets overwritten.

Changeset: 1252c89896078ba4b3b8e7b7bbf8a6dd67861136

comment:41 Changed 8 years ago by Martyn Gigg

  • Status changed from verify to verifying
  • Tester changed from Nick Draper to Martyn Gigg

comment:42 Changed 8 years ago by Owen Arnold

refs #6709. Outstanding problems.

.Firstly if there is no custom usage, the auto generated usage never gets added. Secondly, if there is a deprecated section, then the screenshot gets overwritten.

Changeset: 1252c89896078ba4b3b8e7b7bbf8a6dd67861136

comment:43 Changed 8 years ago by Martyn Gigg

  • Status changed from verifying to closed

comment:44 Changed 8 years ago by Nick Draper

Re #6709 several algorithms changed to new format

Changeset: 4a061283b265d96b750d9f84aeafa860642e57fb

comment:45 Changed 8 years ago by Nick Draper

Re #6709 load algotithm added as a no sig section

Changeset: d1afc81687f88ecfb46415bbbd794d864d09fc23

comment:46 Changed 8 years ago by Nick Draper

Re #6709 the rest of the algorithms

Changeset: baf143f838d4ddd67185a241b0f405ad7f67b73b

comment:47 Changed 8 years ago by Owen Arnold

refs #6709. Adapt wiki_maker for usages.

Changeset: d1b6e9effe812b4e853a665c002d4c5293d73d49

comment:48 Changed 8 years ago by Owen Arnold

refs #6709. Merge branch 'master' into feature/6709_custom_usage

Conflicts:

Code/Mantid/Build/wiki_maker.py Code/Mantid/Framework/Algorithms/src/Rebunch.cpp

Changeset: b8031940c3e134e29bb3a979e2d114c2f36c0a93

comment:49 Changed 8 years ago by Owen Arnold

refs #6709. Merge functionality.

Works for both Debug and release builds. The usage section is also what was specified.

Changeset: 2a8a6dec14f0701edf590cb281320f3716e95afc

comment:50 Changed 8 years ago by Owen Arnold

refs #6709. Outstanding problems.

.Firstly if there is no custom usage, the auto generated usage never gets added. Secondly, if there is a deprecated section, then the screenshot gets overwritten.

Changeset: 1252c89896078ba4b3b8e7b7bbf8a6dd67861136

comment:51 Changed 8 years ago by Nick Draper

Re #6709 several algorithms changed to new format

Changeset: 4a061283b265d96b750d9f84aeafa860642e57fb

comment:52 Changed 8 years ago by Nick Draper

Re #6709 load algotithm added as a no sig section

Changeset: d1afc81687f88ecfb46415bbbd794d864d09fc23

comment:53 Changed 8 years ago by Nick Draper

Re #6709 the rest of the algorithms

Changeset: baf143f838d4ddd67185a241b0f405ad7f67b73b

comment:54 Changed 8 years ago by Owen Arnold

refs #6709. Adapt wiki_maker for usages.

Changeset: d1b6e9effe812b4e853a665c002d4c5293d73d49

comment:55 Changed 8 years ago by Owen Arnold

refs #6709. Merge branch 'master' into feature/6709_custom_usage

Conflicts:

Code/Mantid/Build/wiki_maker.py Code/Mantid/Framework/Algorithms/src/Rebunch.cpp

Changeset: b8031940c3e134e29bb3a979e2d114c2f36c0a93

comment:56 Changed 8 years ago by Owen Arnold

refs #6709. Merge functionality.

Works for both Debug and release builds. The usage section is also what was specified.

Changeset: 2a8a6dec14f0701edf590cb281320f3716e95afc

comment:57 Changed 8 years ago by Owen Arnold

refs #6709. Outstanding problems.

.Firstly if there is no custom usage, the auto generated usage never gets added. Secondly, if there is a deprecated section, then the screenshot gets overwritten.

Changeset: 1252c89896078ba4b3b8e7b7bbf8a6dd67861136

comment:58 Changed 7 years ago by Nick Draper

Re #6709 several algorithms changed to new format

Changeset: 4a061283b265d96b750d9f84aeafa860642e57fb

comment:59 Changed 7 years ago by Nick Draper

Re #6709 load algotithm added as a no sig section

Changeset: d1afc81687f88ecfb46415bbbd794d864d09fc23

comment:60 Changed 7 years ago by Nick Draper

Re #6709 the rest of the algorithms

Changeset: baf143f838d4ddd67185a241b0f405ad7f67b73b

comment:61 Changed 7 years ago by Owen Arnold

refs #6709. Adapt wiki_maker for usages.

Changeset: d1b6e9effe812b4e853a665c002d4c5293d73d49

comment:62 Changed 7 years ago by Owen Arnold

refs #6709. Merge branch 'master' into feature/6709_custom_usage

Conflicts:

Code/Mantid/Build/wiki_maker.py Code/Mantid/Framework/Algorithms/src/Rebunch.cpp

Changeset: b8031940c3e134e29bb3a979e2d114c2f36c0a93

comment:63 Changed 7 years ago by Owen Arnold

refs #6709. Merge functionality.

Works for both Debug and release builds. The usage section is also what was specified.

Changeset: 2a8a6dec14f0701edf590cb281320f3716e95afc

comment:64 Changed 7 years ago by Owen Arnold

refs #6709. Outstanding problems.

.Firstly if there is no custom usage, the auto generated usage never gets added. Secondly, if there is a deprecated section, then the screenshot gets overwritten.

Changeset: 1252c89896078ba4b3b8e7b7bbf8a6dd67861136

comment:65 Changed 7 years ago by Nick Draper

Re #6709 several algorithms changed to new format

Changeset: 4a061283b265d96b750d9f84aeafa860642e57fb

comment:66 Changed 7 years ago by Nick Draper

Re #6709 load algotithm added as a no sig section

Changeset: d1afc81687f88ecfb46415bbbd794d864d09fc23

comment:67 Changed 7 years ago by Nick Draper

Re #6709 the rest of the algorithms

Changeset: baf143f838d4ddd67185a241b0f405ad7f67b73b

comment:68 Changed 7 years ago by Owen Arnold

refs #6709. Adapt wiki_maker for usages.

Changeset: d1b6e9effe812b4e853a665c002d4c5293d73d49

comment:69 Changed 7 years ago by Owen Arnold

refs #6709. Merge branch 'master' into feature/6709_custom_usage

Conflicts:

Code/Mantid/Build/wiki_maker.py Code/Mantid/Framework/Algorithms/src/Rebunch.cpp

Changeset: b8031940c3e134e29bb3a979e2d114c2f36c0a93

comment:70 Changed 7 years ago by Owen Arnold

refs #6709. Merge functionality.

Works for both Debug and release builds. The usage section is also what was specified.

Changeset: 2a8a6dec14f0701edf590cb281320f3716e95afc

comment:71 Changed 7 years ago by Owen Arnold

refs #6709. Outstanding problems.

.Firstly if there is no custom usage, the auto generated usage never gets added. Secondly, if there is a deprecated section, then the screenshot gets overwritten.

Changeset: 1252c89896078ba4b3b8e7b7bbf8a6dd67861136

comment:72 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 7555

Note: See TracTickets for help on using tickets.