jwst icon indicating copy to clipboard operation
jwst copied to clipboard

Duplicate association warnings in regression tests

Open tapastro opened this issue 4 years ago • 2 comments

In running: pytest --bigdata --slow -ra -n 8 jwst/regtest/test_associations_s*

on a newly-downloaded copy of Artifactory, I get duplicate assocation warnings for a fair number of pools, both sdp and standards. Listed below:

jw00626_20190605t025021_pool jw00623_20190607t021101_pool jw00628_20191102t153956_pool pool_011_spec_miri_lv2bkg_lrs pool_009_spec_miri_lv2bkg pool_010_spec_nirspec_lv2bkg pool_016_spec_nirspec_lv2bkg_double pool_018_all_exptypes pool_028_mir_lrsfs_nods pool_030_mir_lrs_nods_bkg pool_031_mir_lrs_nonod_bkg pool_025_nirspec_fss_nod_chop pool_015_spec_nirspec_lv2bkg_reversed

After talking with @stscieisenhamer via Slack, creating an issue to discuss investigating the duplicate warnings.

Edit: speaking of duplicate warnings - though there are 13 pools with duplicate warnings, it seems the current implementation yields two warnings per pool, leading to pytest summarizing the test run with

73 passed, 2 xfailed, 26 warnings in 1234.05s

tapastro avatar Feb 11 '21 23:02 tapastro

We are also seeing the same warning in our unit tests.

jwst/associations/tests/test_level3_product_names.py::test_multiple_optelems
  /Users/jdavies/dev/jwst/jwst/associations/lib/product_utils.py:131: RuntimeWarning: Duplicate associations exist: ['jw99009-a3001_t001_nirspec_f100lp-g140m-s200a2-s200a2', 'jw99009-a3001_{source_id}_nirspec_f100lp-g140m-s200a2-s200a2']
    warnings.warn(f'Duplicate associations exist: {dups}', RuntimeWarning)

jwst/associations/tests/test_level3_product_names.py::test_multiple_optelems
  /Users/jdavies/dev/jwst/jwst/associations/lib/product_utils.py:135: RuntimeWarning: Duplicates will be removed, leaving only one of each.
    warnings.warn('Duplicates will be removed, leaving only one of each.', RuntimeWarning)

jdavies-st avatar Apr 08 '21 16:04 jdavies-st

Still seeing these warning using latest code and association unit tests.

hbushouse avatar Mar 25 '22 15:03 hbushouse