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

Amend Python test naming guidelines in Developer Guide Following RFC-229

    XMLWordPrintable

Details

    • 1
    • Alert Production S17 - 3, Alert Production S17 - 4, Alert Production S17 - 5
    • Alert Production

    Description

      Amend the Developer Guide to require that test modules be prefixed with test_ to enable automatic pytest discovery:

      tests/test_example.py
      

      See RFC-229.

      Attachments

        Issue Links

          Activity

            tjenness Tim Jenness added a comment -

            I don't think this ticket should be blocked by DM-8467. I think we can change the naming guidelines any time. What's blocked is mass renaming of current test files whilst the pybind11 port is ongoing.

            tjenness Tim Jenness added a comment - I don't think this ticket should be blocked by DM-8467 . I think we can change the naming guidelines any time. What's blocked is mass renaming of current test files whilst the pybind11 port is ongoing.
            tjenness Tim Jenness added a comment -

            This change looks good to me. I have added ktl as reviewer since it involves the style guide.

            tjenness Tim Jenness added a comment - This change looks good to me. I have added ktl as reviewer since it involves the style guide.

            This looks fine.

            I'd be tempted to introduce a new section to the Python Style Guide called "Unit Testing" that collects all guidelines specific to unit testing (see also DM-7450). The Python Unit Testing page https://developer.lsst.io/coding/python_testing.html would continue as an informative guide.

            I don't know if we want to implement that organization now, or if ktl is fine with this implementation.

            jsick Jonathan Sick added a comment - This looks fine. I'd be tempted to introduce a new section to the Python Style Guide called "Unit Testing" that collects all guidelines specific to unit testing (see also DM-7450 ). The Python Unit Testing page https://developer.lsst.io/coding/python_testing.html would continue as an informative guide. I don't know if we want to implement that organization now, or if ktl is fine with this implementation.
            ktl Kian-Tat Lim added a comment -

            The text and changes look fine. When this is announced on Community, the recommended transition plan (presumably "as you go" with a check-off list, as mentioned in RFC-229) should be publicized as well.

            ktl Kian-Tat Lim added a comment - The text and changes look fine. When this is announced on Community, the recommended transition plan (presumably "as you go" with a check-off list, as mentioned in RFC-229 ) should be publicized as well.
            ktl Kian-Tat Lim added a comment -

            Collecting testing-relevant guidelines into a separate section may make sense but can be separate from this.

            ktl Kian-Tat Lim added a comment - Collecting testing-relevant guidelines into a separate section may make sense but can be separate from this.

            jsick, RFC-229 mentions a checklist for migrated packages. Is there something like that already?

            krzys Krzysztof Findeisen added a comment - jsick , RFC-229 mentions a checklist for migrated packages. Is there something like that already?

            Following discussion with jsick, I've merged the developer guide changes. He will set up a check-off list and announce it on Community.

            krzys Krzysztof Findeisen added a comment - Following discussion with jsick , I've merged the developer guide changes. He will set up a check-off list and announce it on Community.

            Confluence page linked from RFC-229 and community.lsst.org. Thanks jsick!

            krzys Krzysztof Findeisen added a comment - Confluence page linked from RFC-229 and community.lsst.org . Thanks jsick !

            People

              krzys Krzysztof Findeisen
              jsick Jonathan Sick
              Jonathan Sick, Kian-Tat Lim
              Jonathan Sick, Kian-Tat Lim, Krzysztof Findeisen, Tim Jenness
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Jenkins

                  No builds found.