rosetta icon indicating copy to clipboard operation
rosetta copied to clipboard

fixing util file names

Open NooraAz opened this issue 1 year ago • 2 comments

The argument passed to --class_name will be used as the prefix of util files.

NooraAz avatar Apr 25 '24 15:04 NooraAz

This would change the current default behavior for the util files, right? (What happens if you run the script for util without --class_name specified?)

I'm wondering if there's a way you can keep the current behavior with the command lines which currently work, but add in support for the additional behavior if you add in additional options.

roccomoretti avatar Apr 25 '24 16:04 roccomoretti

I'm wondering if there's a way you can keep the current behavior with the command lines which currently work, but add in support for the additional behavior if you add in additional options.

Since the old behaviour was counter-intuitive (the class name attribute was used to set the file name in all cases except making utility files, and this resulted in util.hh and util.cc being overwritten), I think replacing this with the new behaviour is fine -- especially since this isn't something that came up frequently, and a developer using this functionality is bound to run the generate_templates.py script with --help first. Noora has added a clear description to the --help output about what the new behaviour is. This looks pretty good to me.

vmullig avatar Apr 28 '24 21:04 vmullig

I'll note this PR broke the code_template_tests_src integration test, specifically for the issue mentioned above (the test runs without --class_name: https://b3.graylab.jhu.edu/test/829260)

roccomoretti avatar Aug 14 '24 16:08 roccomoretti

Looks like code_template_tests_src is still broken, - @NooraAz could you please look this up? Thanks,

lyskov avatar Nov 12 '24 17:11 lyskov

Looks like code_template_tests_src is still broken, - @NooraAz could you please look this up? Thanks,

@lyskov as Rocco mentioned, it is because in the test class_name is not passed in utils, while I set it to be required for all file types (including utils). So I think the test should change, but not sure how I can do that. (unless you don't think this is the way to go).

NooraAz avatar Nov 12 '24 20:11 NooraAz

Looping in @jadolfbr who originally wrote this script, - Jared what do you think best path forward here? Thanks,

lyskov avatar Nov 13 '24 00:11 lyskov

Sorry for not catching that, I think it looked like all tests passed.

ajasja avatar Jan 22 '25 11:01 ajasja