Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-31719

Change all camelCase variable names to snake_case

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: None

      Description

      There are many camelCase variables and method arguments that need to be renamed to snake_case. This ticket is for doing that.

        Attachments

          Activity

          Hide
          wvreeven Wouter van Reeven added a comment -

          This was partially done by me in DM-33927 but needs to be revised to see what's remaining.

          Show
          wvreeven Wouter van Reeven added a comment - This was partially done by me in DM-33927 but needs to be revised to see what's remaining.
          Hide
          pkubanek Petr Kubanek added a comment -

          This lists camelCase occurences: grep -r '\<[a-z]\w*[A-Z]\w*\>' *

          Show
          pkubanek Petr Kubanek added a comment - This lists camelCase occurences: grep -r '\< [a-z] \w* [A-Z] \w*\>' *
          Hide
          pkubanek Petr Kubanek added a comment -

          Even LSST style guide allows for deviations if it matches the existing API - for that reason I keep camelCase in my Qt based code, as Qt is camelCase (from C++ API down to Python). I made a few changes, but keep most of the camelCase as those names originate from various camera API. It doesn't make any sense to change this mapping.

          Show
          pkubanek Petr Kubanek added a comment - Even LSST style guide allows for deviations if it matches the existing API - for that reason I keep camelCase in my Qt based code, as Qt is camelCase (from C++ API down to Python). I made a few changes, but keep most of the camelCase as those names originate from various camera API. It doesn't make any sense to change this mapping.
          Hide
          pkubanek Petr Kubanek added a comment -
          Show
          pkubanek Petr Kubanek added a comment - Please see PR: https://github.com/lsst-ts/ts_genericcamera/pull/23
          Hide
          wvreeven Wouter van Reeven added a comment -

          I know the topic title and description only refer to variables but the idea is to also make sure that the method names are snake_case. The tricky part is to leave those that refer to native library variables and methods in place.

          Show
          wvreeven Wouter van Reeven added a comment - I know the topic title and description only refer to variables but the idea is to also make sure that the method names are snake_case. The tricky part is to leave those that refer to native library variables and methods in place.
          Hide
          pkubanek Petr Kubanek added a comment -

          Well we can decorate API methods with e.g. @api decorator (which will not be defined) to distinguish which doesn't need to be snake_case?

          Show
          pkubanek Petr Kubanek added a comment - Well we can decorate API methods with e.g. @api decorator (which will not be defined) to distinguish which doesn't need to be snake_case?
          Hide
          wvreeven Wouter van Reeven added a comment -

          Sounds like a good idea.

          Show
          wvreeven Wouter van Reeven added a comment - Sounds like a good idea.
          Hide
          wvreeven Wouter van Reeven added a comment -

          Reviewed on GitHub. I left a few comments to improve this even more but otherwise you did a very nice job!

          Show
          wvreeven Wouter van Reeven added a comment - Reviewed on GitHub. I left a few comments to improve this even more but otherwise you did a very nice job!

            People

            Assignee:
            pkubanek Petr Kubanek
            Reporter:
            wvreeven Wouter van Reeven
            Reviewers:
            Wouter van Reeven
            Watchers:
            Petr Kubanek, Wouter van Reeven
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Jenkins

                No builds found.