Opened 6 years ago

Last modified 5 years ago

#1059 reopened defect

Remove camel case from unified_power_Rg

Reported by: smk78 Owned by: butler
Priority: minor Milestone: SasView 4.3.0
Component: SasView Keywords:
Cc: Work Package: SasView Bug Fixing

Description

@llimeht points out in SasView PR 137 that unified_power_Rg contains capitalisation (in contravention of the agreed coding rules) meaning links to the corresponding help documentation are not working.

Though the PR removes case dependency, the expedient approach is also to enforce the coding standard. Thus the model should be renamed and links to the doc pages checked.

Change History (9)

comment:1 Changed 6 years ago by pkienzle

The Rg in this case is not camel case since it is naturally capitalized and is preceded by an underscore. Much like we ignore the PEP 8 rules for case for variable names when matching the math symbols used in a paper, we could claim that this is a legitimate use of an upper case name for a model.

comment:2 Changed 6 years ago by butler

  • Owner set to butler
  • Status changed from new to assigned

comment:3 Changed 6 years ago by butler

True but the rule was "no capitalization" not "no camel case". The later is a result of the first. Relevant section reads:

Please follow these new naming rules:

* No capitalization and thus no CamelCase. If necessary use underscore to separate (i.e. barbell not BarBell or broad_peak not BroadPeak)
* Remove “model” from the name (i.e. barbell not BarBellModel)

comment:4 Changed 6 years ago by butler

  • Priority changed from blocker to major

comment:5 Changed 6 years ago by butler

  • Priority changed from major to minor

comment:6 Changed 6 years ago by butler

  • Milestone changed from SasView 4.2.0 to SasView 4.3.0

Probably cannot be done for this release so moving to 4.3

comment:7 Changed 5 years ago by smk78

  • Resolution set to fixed
  • Status changed from assigned to closed

In fa8e6dcf3e461c78e01fc9879eb87ba90aa8db08/sasmodels:

Changed unified_power_Rg into unified_power_rg. Closes #1059

comment:8 Changed 5 years ago by pkienzle

  • Resolution fixed deleted
  • Status changed from closed to reopened

Test whether a unified_power_Rg model saved from 4.0, 4.1 and 4.2 can be loaded into 4.3. Glancing at the conversion code I suspect the answer is no, but I haven't tested.

comment:9 Changed 5 years ago by smk78

I have reverted the capitalisation changes in the Ticket 822 v5 unit tests branch (and not by reverting the original commit in master) so that the implications for old projects can be explored separately.

Note: See TracTickets for help on using tickets.