Ticket #3877 (closed: fixed)
LoadEventNexus has properties with inconsistent naming styles
Reported by: | Martyn Gigg | Owned by: | Martyn Gigg |
---|---|---|---|
Priority: | major | Milestone: | Release 2.0 |
Component: | Mantid | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Tester: | Nick Draper |
Description
Some property names, FilterByTof_Min for example, contain underscores. Our policy is for PascalCase property names.
Change History
comment:1 Changed 9 years ago by Martyn Gigg
- Status changed from new to verify
- Resolution set to fixed
comment:2 Changed 9 years ago by Nick Draper
- Status changed from verify to verifying
- Tester set to Nick Draper
comment:3 Changed 9 years ago by Nick Draper
- Status changed from verifying to closed
tested using this script
import re def RemoveVersion(algName): m = re.search('\w+', algName) return m.group(0) def FirstCapital(algName): m = re.search('^[A-Z].*', algName) if m is None: return "The first letter must be a capital.\n" else: return "" def IllegalCaracters(algName): m = re.search('[\-\_\(\)\[\]]', algName) if m is None: return "" else: return "Contains illegal characters.\n" with open('c:/mantid/algnames.txt', 'r') as f: algNames = f.readlines() f.closed for algName in algNames: errorMessage="" algName = RemoveVersion(algName) errorMessage+=FirstCapital(algName) errorMessage+=IllegalCaracters(algName) alg=mtd.createAlgorithm(algName) if errorMessage <>"": print algName, errorMessage for prop in alg.getProperties(): propError = "" propError+=FirstCapital(algName) propError+=IllegalCaracters(algName) if propError <>"": print algName, prop.name, propError
Note: See
TracTickets for help on using
tickets.
In [14965]: