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

Change all camelCase variable names to snake_case

    XMLWordPrintable

Details

    • Story
    • Status: Done
    • Resolution: Done
    • None
    • 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

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

          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.
          pkubanek Petr Kubanek added a comment -

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

          pkubanek Petr Kubanek added a comment - This lists camelCase occurences: grep -r '\< [a-z] \w* [A-Z] \w*\>' *
          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.

          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.
          pkubanek Petr Kubanek added a comment - Please see PR: https://github.com/lsst-ts/ts_genericcamera/pull/23

          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.

          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.
          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?

          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?

          Sounds like a good idea.

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

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

          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

            pkubanek Petr Kubanek
            wvreeven Wouter van Reeven
            Wouter van Reeven
            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.