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

Reformat code and run black+isort in linting mode in middleware packages

    XMLWordPrintable

    Details

      Description

      Run black and isort on all middleware packages, then add a GitHub action such as https://black.readthedocs.io/en/stable/integrations/github_actions.html to ensure formatting is maintained.

       

        Attachments

          Issue Links

            Activity

            No builds found.
            jbosch Jim Bosch created issue -
            jbosch Jim Bosch made changes -
            Field Original Value New Value
            Link This issue is triggered by RFC-809 [ RFC-809 ]
            jbosch Jim Bosch made changes -
            Description Run black on all middleware packages, then add a GitHub action such as [https://black.readthedocs.io/en/stable/integrations/github_actions.html] to ensure formatting is maintained.

             
            Run black and isort on all middleware packages, then add a GitHub action such as [https://black.readthedocs.io/en/stable/integrations/github_actions.html] to ensure formatting is maintained.

             
            jbosch Jim Bosch made changes -
            Summary Reformat code and run black in linting mode in middleware packages Reformat code and run black+isort in linting mode in middleware packages
            tjenness Tim Jenness made changes -
            Component/s utils [ 10723 ]
            Hide
            tjenness Tim Jenness added a comment -

            I've added utils to the list.

            Show
            tjenness Tim Jenness added a comment - I've added utils to the list.
            Hide
            tjenness Tim Jenness added a comment -

            I've done utils since I know there wasn't any pending work associated with it and I already had the resources package to lean on as an example.

            Show
            tjenness Tim Jenness added a comment - I've done utils since I know there wasn't any pending work associated with it and I already had the resources package to lean on as an example.
            jbosch Jim Bosch made changes -
            Status To Do [ 10001 ] In Progress [ 3 ]
            Hide
            jbosch Jim Bosch added a comment -

            I think this is ready for review.  PRs are:

            I don't think it's worthwhile for anybody to look at all of these in detail, and the last two comments on RFC-809 explain all of the non-mechanical, non-configuration changes (as do the commit messages, which are same across packages).  But it'd be good to at least scan those commit messages and spot-check commits other than the big mechanical "run black and isort" ones.

            There are also still complaints about MyPy in utils and daf_butler, due to a new version of that appearing on pypi.  If I can get that version with conda before I merge, I'll fix the problems here; if I can't, I'll pin the mypy version in the GHA.  In any case, I think it's best to consider that distinct from the rest of the ticket, even if it ends up on the same branches.

            Show
            jbosch Jim Bosch added a comment - I think this is ready for review.  PRs are: https://github.com/lsst/utils/pull/110 (mostly done by Tim Jenness , already reviewed by me) https://github.com/lsst/daf_butler/pull/620 https://github.com/lsst/pipe_base/pull/220 https://github.com/lsst/obs_base/pull/402 https://github.com/lsst/ctrl_mpexec/pull/157 I don't think it's worthwhile for anybody to look at all of these in detail, and the last two comments on RFC-809 explain all of the non-mechanical, non-configuration changes (as do the commit messages, which are same across packages).  But it'd be good to at least scan those commit messages and spot-check commits other than the big mechanical "run black and isort" ones. There are also still complaints about MyPy in utils and daf_butler, due to a new version of that appearing on pypi.  If I can get that version with conda before I merge, I'll fix the problems here; if I can't, I'll pin the mypy version in the GHA.  In any case, I think it's best to consider that distinct from the rest of the ticket, even if it ends up on the same branches.
            Hide
            jbosch Jim Bosch added a comment -

            Update: mypy changes were not quite what I expected; the daf_butler GHA had already pinned mypy, and this just needed to be propagated to utils to get that working.  And the problems with mypy in daf_butler were real, and caused by this ticket: black moved around some "type: ignore" annotations.  Both issues now fixed.

            Show
            jbosch Jim Bosch added a comment - Update: mypy changes were not quite what I expected; the daf_butler GHA had already pinned mypy, and this just needed to be propagated to utils to get that working.  And the problems with mypy in daf_butler were real, and caused by this ticket: black moved around some "type: ignore" annotations.  Both issues now fixed.
            tjenness Tim Jenness made changes -
            Reviewers Tim Jenness [ tjenness ]
            Status In Progress [ 3 ] In Review [ 10004 ]
            Hide
            tjenness Tim Jenness added a comment -

            I'm happy with these changes.

            Show
            tjenness Tim Jenness added a comment - I'm happy with these changes.
            tjenness Tim Jenness made changes -
            Status In Review [ 10004 ] Reviewed [ 10101 ]
            jbosch Jim Bosch made changes -
            Resolution Done [ 10000 ]
            Status Reviewed [ 10101 ] Done [ 10002 ]
            tjenness Tim Jenness made changes -
            Link This issue relates to DM-33218 [ DM-33218 ]
            yusra Yusra AlSayyad made changes -
            Epic Link DM-30536 [ 511194 ] DM-30543 [ 511201 ]
            yusra Yusra AlSayyad made changes -
            Story Points 3

              People

              Assignee:
              jbosch Jim Bosch
              Reporter:
              jbosch Jim Bosch
              Reviewers:
              Tim Jenness
              Watchers:
              Jim Bosch, Tim Jenness
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Jenkins

                  No builds found.