Ticket #9604 (closed: fixed)

Opened 6 years ago

Last modified 5 years ago

class_maker is broken and should write rst files

Reported by: Michael Wedel Owned by: Nick Draper
Priority: critical Milestone: Release 3.2
Component: Tools Keywords:
Cc: Blocked By:
Blocking: Tester: Michael Wedel

Description (last modified by Michael Wedel) (diff)

Running class_maker.py from within Code/Mantid/Build like so:

./class_maker.py Geometry SomeTest

results in the following error:

Traceback (most recent call last):
  File "./class_maker.py", line 403, in <module>
    generate(subproject, classname, overwrite, args)
  File "./class_maker.py", line 308, in generate
    write_source(subproject, classname, sourcefile, args)
  File "./class_maker.py", line 156, in write_source
    """ % (classname, classname, classname, classname, classname, classname, classname)  

The .h file is generated properly, the .cpp file is generated, but empty.

Looking at the source it seems there are 7 arguments given, but only 5 format-specifiers in the string. Deleting two of the arguments results in correct behavior.

Change History

comment:1 Changed 6 years ago by Michael Wedel

  • type changed from enhancement to defect

comment:2 Changed 6 years ago by Michael Wedel

  • Description modified (diff)

comment:3 Changed 6 years ago by Nick Draper

  • Status changed from new to assigned
  • Owner set to Nick Draper

comment:4 Changed 6 years ago by Nick Draper

  • Status changed from assigned to inprogress

re #9604 Fix a bug and make classmaker output rst files for algs

Changeset: be484e0a1a1e0f66c9ca7ea548b595e6ad0b4bb1

comment:5 Changed 6 years ago by Nick Draper

re #9604 Fix a bug and make classmaker output rst files for algs

Changeset: da4eae860769e106262f5b930db93e0e375845ce

comment:6 Changed 6 years ago by Nick Draper

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

To test:

  1. run class_maker.py --help to see arguments. More instructions are here:

http://www.mantidproject.org/Useful_Tools_for_Developers

  1. Create a non algorithm class first so something like ./class_maker.py Geometry SomeTest
  2. Check that the .h, .cpp, test files are sensible and in the right place, and the cmakelists have been updated, there should be no .rst file created.
  3. Create an algorithm ./class_maker.py --alg Geometry SomeAlg
  4. Check that the .h, .cpp, test and .rst files are sensible and in the right place, and the cmakelists have been updated.
  5. The html-doc target will not build successfully until the .h and .cpp files are valid and compiled., but you could always renamve the rst file to an existing alg is you want to see it convwerted to html.
  6. Play around with the --force and --no-rst --no-test --no-header and --no-cpp options

IMPORTANT

Your tests will have created files and modified some of the cmake lists. Ensure that the only file you merge to master is class_maker.py. If in doubt try the following

 #after testing successfully
 git test fail
 git test start 9604
 git test pass

comment:7 Changed 6 years ago by Nick Draper

  • Summary changed from class_maker is broken to class_maker is broken and should write rst files

comment:8 Changed 6 years ago by Michael Wedel

  • Status changed from verify to verifying
  • Tester set to Michael Wedel

comment:9 Changed 6 years ago by Nick Draper

re #9604 fix to allow single bin workspaces in CreateSampleWorkspaces

Changeset: 6ace8fecb98a5b0a3edd434745efb9f0fd313b33

comment:10 Changed 6 years ago by Nick Draper

Last commit is to the wrong branch

comment:11 Changed 6 years ago by Nick Draper

but actually it will not hurt, so I'll leave it in place for now and commit it to the right branch as well.

Last edited 6 years ago by Nick Draper (previous) (diff)

comment:12 Changed 6 years ago by Nick Draper

Revert "re #9604 fix to allow single bin workspaces in CreateSampleWorkspaces"

This reverts commit 6ace8fecb98a5b0a3edd434745efb9f0fd313b33.

Changeset: 70e830162f5085a4e13abe2f9ce59671f58fd49f

comment:13 Changed 6 years ago by Nick Draper

re #9604 remove a file I created during the testing of this.

Changeset: c01aa8bb1e46503caee5ff20f60529e1f5dcf94e

comment:14 Changed 6 years ago by Michael Wedel

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/feature/9604_classmaker_and_rst'

Full changeset: 66009a0ea4d3643d049594e9a969e494a8bdccb3

comment:15 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 10447

Note: See TracTickets for help on using tickets.