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

Remove all test dependencies on obs_test, and remove obs_test from lsst_apps

    XMLWordPrintable

Details

    Description

      There are only a few places left that obs_test is used. These are, as follows:

      • pipe_tasks/tests/test_makeDiscreteSkyMap.py
      • pipe_tasks/tests/test_transform.py
      • pipe_tasks/tests/test_photoCal.py (via the mapper used in the gen2 refobjloader)
      • meas_astrom/tests/test_astrometryTask.py (via the mapper)
      • meas_astrom/tests/test_directMatch.py (via the mapper)
      • meas_astrom/tests/test_joinMatchListWithCatalog.py (via the mapper)
      • meas_algorithms/tests/test_htmIndex.py

      And obs_test is included in the eups table in the lsst_obs and lsst_apps metapackage (which is included by lsst_distrib.

      I have played around with how to update these tests to remove the dependency on obs_test which will allow us to move obs_test to legacy. I've settled on the following, currently on user branches:

      In summary, the changes are:

      • In meas_algorithms:
        • Add a test_refObjLoader.py that tests the gen3 reference object loader (and removing the gen2 tests).
        • Add a new testUtils.MockLoadReferenceObjects which can be used for tests that just need to have a hook to load reference objects from a local file, and don't want to worry about a full butler ingest.
      • In meas_astrom:
        • Update tests to use the new MockLoadReferenceObjects which allows us to remove the obs_test _mapper from the test data directory, and also remove all gen2 usage from the tests.
      • In pipe_tasks:
        • Rewrite test_makeDiscreteSkyMap.py to test the task directly without needing butler infrastructure.
        • Remove the gen2 only tests from test_transform.py.
        • Update test_photoCal.py to use the new MockLoadReferenceObjects.

      Attachments

        Issue Links

          Activity

            erykoff Eli Rykoff added a comment -

            As an addendum... as I was making these changes I was looking at the coverage html outputs and ensuring that the coverage lost was in gen2-only sections (such as runDataRef) and that the new tests covered the non-gen2-only bits that were lost.

            erykoff Eli Rykoff added a comment - As an addendum... as I was making these changes I was looking at the coverage html outputs and ensuring that the coverage lost was in gen2-only sections (such as runDataRef ) and that the new tests covered the non-gen2-only bits that were lost.

            A few more comments on the meas_algorithms PR, but I think after those it should be good. I'm glad we now know we still support version0 in gen3 for now.

            I like your new mock infrastructure better than the previous one: I think this is much more of a mock than a re-implementation of a Loader. I do wonder if the docs for it might be a little thin, though? It's not so clear how it should be used from the docs you have there.

            Parejkoj John Parejko added a comment - A few more comments on the meas_algorithms PR, but I think after those it should be good. I'm glad we now know we still support version0 in gen3 for now. I like your new mock infrastructure better than the previous one: I think this is much more of a mock than a re-implementation of a Loader. I do wonder if the docs for it might be a little thin, though? It's not so clear how it should be used from the docs you have there.

            People

              erykoff Eli Rykoff
              erykoff Eli Rykoff
              John Parejko
              Eli Rykoff, John Parejko, Tim Jenness
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Jenkins

                  No builds found.