populationgenomics / seqr

web-based analysis tool for rare disease genomics
GNU Affero General Public License v3.0
3 stars 1 forks source link

Upstream 2024 01 15 #198

Closed illusional closed 7 months ago

illusional commented 8 months ago

Semi-challenging merge, particular issues with the igv_api.py, will keep looking. There are some failing tests, creating this DRAFT PR as a placeholder to fix these.

I've already:

ERROR: test_update_gencode_command (reference_data.management.tests.update_gencode_tests.UpdateGencodeTest.test_update_gencode_command)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/michael.franklin/.venv/seqr/lib/python3.11/site-packages/responses/__init__.py", line 218, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael.franklin/.venv/seqr/lib/python3.11/site-packages/mock/mock.py", line 1423, in patched
    return func(*newargs, **newkeywargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael.franklin/source/seqr/reference_data/management/tests/update_gencode_tests.py", line 250, in test_update_gencode_command
    call_command('update_gencode_transcripts')
  File "/Users/michael.franklin/.venv/seqr/lib/python3.11/site-packages/django/core/management/__init__.py", line 160, in call_command
    defaults = parser.parse_args(args=parse_args)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael.franklin/.venv/seqr/lib/python3.11/site-packages/django/core/management/base.py", line 61, in parse_args
    return super().parse_args(args, namespace)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael.franklin/.pyenv/versions/3.11.4/lib/python3.11/argparse.py", line 1869, in parse_args
    args, argv = self.parse_known_args(args, namespace)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael.franklin/.pyenv/versions/3.11.4/lib/python3.11/argparse.py", line 1902, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael.franklin/.pyenv/versions/3.11.4/lib/python3.11/argparse.py", line 2142, in _parse_known_args
    self.error(_('the following arguments are required: %s') %
  File "/Users/michael.franklin/.venv/seqr/lib/python3.11/site-packages/django/core/management/base.py", line 67, in error
    raise CommandError("Error: %s" % message)
django.core.management.base.CommandError: Error: the following arguments are required: --gencode-release

======================================================================
ERROR: test_command_with_other_project (seqr.management.tests.check_bam_cram_paths_tests.CheckBamCramPathsTest.test_command_with_other_project)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/michael.franklin/.venv/seqr/lib/python3.11/site-packages/mock/mock.py", line 1423, in patched
    return func(*newargs, **newkeywargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: CheckBamCramPathsTest.test_command_with_other_project() takes 3 positional arguments but 4 were given

======================================================================
ERROR: test_command (seqr.management.tests.check_for_new_samples_from_pipeline_tests.CheckNewSamplesTest.test_command)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/michael.franklin/.venv/seqr/lib/python3.11/site-packages/mock/mock.py", line 1423, in patched
    return func(*newargs, **newkeywargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael.franklin/.venv/seqr/lib/python3.11/site-packages/responses/__init__.py", line 218, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael.franklin/source/seqr/seqr/management/tests/check_for_new_samples_from_pipeline_tests.py", line 77, in test_command
    call_command('check_for_new_samples_from_pipeline', 'GRCh38/SNV_INDEL', 'auto__2023-08-08')
  File "/Users/michael.franklin/.venv/seqr/lib/python3.11/site-packages/django/core/management/__init__.py", line 181, in call_command
    return command.execute(*args, **defaults)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael.franklin/.venv/seqr/lib/python3.11/site-packages/django/core/management/base.py", line 398, in execute
    output = self.handle(*args, **options)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael.franklin/source/seqr/seqr/management/commands/check_for_new_samples_from_pipeline.py", line 39, in handle
    metadata = json.loads(next(line for line in file_iter(gs_path + 'metadata.json')))
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael.franklin/source/seqr/seqr/management/commands/check_for_new_samples_from_pipeline.py", line 39, in <genexpr>
    metadata = json.loads(next(line for line in file_iter(gs_path + 'metadata.json')))
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael.franklin/source/seqr/seqr/utils/file_utils.py", line 81, in file_iter
    bucket = _gcs_client().bucket(path_segments[2], user_project)
             ^^^^^^^^^^^^^
  File "/Users/michael.franklin/source/seqr/seqr/utils/file_utils.py", line 20, in _gcs_client
    gcs_client = google.cloud.storage.Client()
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael.franklin/.venv/seqr/lib/python3.11/site-packages/google/cloud/storage/client.py", line 124, in __init__
    super(Client, self).__init__(
  File "/Users/michael.franklin/.venv/seqr/lib/python3.11/site-packages/google/cloud/client/__init__.py", line 320, in __init__
    _ClientProjectMixin.__init__(self, project=project, credentials=credentials)
  File "/Users/michael.franklin/.venv/seqr/lib/python3.11/site-packages/google/cloud/client/__init__.py", line 268, in __init__
    project = self._determine_default(project)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael.franklin/.venv/seqr/lib/python3.11/site-packages/google/cloud/client/__init__.py", line 287, in _determine_default
    return _determine_default_project(project)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael.franklin/.venv/seqr/lib/python3.11/site-packages/google/cloud/_helpers/__init__.py", line 152, in _determine_default_project
    _, project = google.auth.default()
                 ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael.franklin/.venv/seqr/lib/python3.11/site-packages/google/auth/_default.py", line 615, in default
    credentials, project_id = checker()
                              ^^^^^^^^^
  File "/Users/michael.franklin/.venv/seqr/lib/python3.11/site-packages/google/auth/_default.py", line 609, in <lambda>
    lambda: _get_gcloud_sdk_credentials(quota_project_id=quota_project_id),
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael.franklin/.venv/seqr/lib/python3.11/site-packages/google/auth/_default.py", line 200, in _get_gcloud_sdk_credentials
    project_id = _cloud_sdk.get_project_id()
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael.franklin/.venv/seqr/lib/python3.11/site-packages/google/auth/_cloud_sdk.py", line 108, in get_project_id
    project = _run_subprocess_ignore_stderr(
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael.franklin/.venv/seqr/lib/python3.11/site-packages/google/auth/_cloud_sdk.py", line 90, in _run_subprocess_ignore_stderr
    output = subprocess.check_output(command, stderr=devnull)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael.franklin/.pyenv/versions/3.11.4/lib/python3.11/subprocess.py", line 466, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael.franklin/.pyenv/versions/3.11.4/lib/python3.11/subprocess.py", line 550, in run
    stdout, stderr = process.communicate(input, timeout=timeout)
    ^^^^^^^^^^^^^^
ValueError: not enough values to unpack (expected 2, got 0)

======================================================================
ERROR: seqr.utils.search.elasticsearch.es_utils_tests (unittest.loader._FailedTest.seqr.utils.search.elasticsearch.es_utils_tests)
----------------------------------------------------------------------
ImportError: Failed to import test module: seqr.utils.search.elasticsearch.es_utils_tests
Traceback (most recent call last):
  File "/Users/michael.franklin/.pyenv/versions/3.11.4/lib/python3.11/unittest/loader.py", line 407, in _find_test_path
    module = self._get_module_from_name(name)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael.franklin/.pyenv/versions/3.11.4/lib/python3.11/unittest/loader.py", line 350, in _get_module_from_name
    __import__(name)
  File "/Users/michael.franklin/source/seqr/seqr/utils/search/elasticsearch/es_utils_tests.py", line 1318, in <module>
    class EsUtilsTest(TestCase):
  File "/Users/michael.franklin/source/seqr/seqr/utils/search/elasticsearch/es_utils_tests.py", line 1391, in EsUtilsTest
    @urllib3_responses.activate
     ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael.franklin/.venv/seqr/lib/python3.11/site-packages/urllib3_mock.py", line 135, in activate
    return get_wrapped(func, _wrapper_template, evaldict)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael.franklin/.venv/seqr/lib/python3.11/site-packages/urllib3_mock.py", line 45, in get_wrapped
    args, a, kw, defaults = inspect.getargspec(func)
                            ^^^^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'getargspec'

======================================================================
ERROR: seqr.views.apis.data_manager_api_tests (unittest.loader._FailedTest.seqr.views.apis.data_manager_api_tests)
----------------------------------------------------------------------
ImportError: Failed to import test module: seqr.views.apis.data_manager_api_tests
Traceback (most recent call last):
  File "/Users/michael.franklin/.pyenv/versions/3.11.4/lib/python3.11/unittest/loader.py", line 407, in _find_test_path
    module = self._get_module_from_name(name)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael.franklin/.pyenv/versions/3.11.4/lib/python3.11/unittest/loader.py", line 350, in _get_module_from_name
    __import__(name)
  File "/Users/michael.franklin/source/seqr/seqr/views/apis/data_manager_api_tests.py", line 13, in <module>
    from seqr.utils.search.elasticsearch.es_utils_tests import urllib3_responses
  File "/Users/michael.franklin/source/seqr/seqr/utils/search/elasticsearch/es_utils_tests.py", line 1318, in <module>
    class EsUtilsTest(TestCase):
  File "/Users/michael.franklin/source/seqr/seqr/utils/search/elasticsearch/es_utils_tests.py", line 1391, in EsUtilsTest
    @urllib3_responses.activate
     ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael.franklin/.venv/seqr/lib/python3.11/site-packages/urllib3_mock.py", line 135, in activate
    return get_wrapped(func, _wrapper_template, evaldict)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael.franklin/.venv/seqr/lib/python3.11/site-packages/urllib3_mock.py", line 45, in get_wrapped
    args, a, kw, defaults = inspect.getargspec(func)
                            ^^^^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'getargspec'

======================================================================
ERROR: seqr.views.apis.dataset_api_tests (unittest.loader._FailedTest.seqr.views.apis.dataset_api_tests)
----------------------------------------------------------------------
ImportError: Failed to import test module: seqr.views.apis.dataset_api_tests
Traceback (most recent call last):
  File "/Users/michael.franklin/.pyenv/versions/3.11.4/lib/python3.11/unittest/loader.py", line 407, in _find_test_path
    module = self._get_module_from_name(name)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael.franklin/.pyenv/versions/3.11.4/lib/python3.11/unittest/loader.py", line 350, in _get_module_from_name
    __import__(name)
  File "/Users/michael.franklin/source/seqr/seqr/views/apis/dataset_api_tests.py", line 12, in <module>
    from seqr.utils.search.elasticsearch.es_utils_tests import urllib3_responses
  File "/Users/michael.franklin/source/seqr/seqr/utils/search/elasticsearch/es_utils_tests.py", line 1318, in <module>
    class EsUtilsTest(TestCase):
  File "/Users/michael.franklin/source/seqr/seqr/utils/search/elasticsearch/es_utils_tests.py", line 1391, in EsUtilsTest
    @urllib3_responses.activate
     ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael.franklin/.venv/seqr/lib/python3.11/site-packages/urllib3_mock.py", line 135, in activate
    return get_wrapped(func, _wrapper_template, evaldict)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael.franklin/.venv/seqr/lib/python3.11/site-packages/urllib3_mock.py", line 45, in get_wrapped
    args, a, kw, defaults = inspect.getargspec(func)
                            ^^^^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'getargspec'

======================================================================
ERROR: seqr.views.status_tests (unittest.loader._FailedTest.seqr.views.status_tests)
----------------------------------------------------------------------
ImportError: Failed to import test module: seqr.views.status_tests
Traceback (most recent call last):
  File "/Users/michael.franklin/.pyenv/versions/3.11.4/lib/python3.11/unittest/loader.py", line 407, in _find_test_path
    module = self._get_module_from_name(name)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael.franklin/.pyenv/versions/3.11.4/lib/python3.11/unittest/loader.py", line 350, in _get_module_from_name
    __import__(name)
  File "/Users/michael.franklin/source/seqr/seqr/views/status_tests.py", line 8, in <module>
    from seqr.utils.search.elasticsearch.es_utils_tests import urllib3_responses
  File "/Users/michael.franklin/source/seqr/seqr/utils/search/elasticsearch/es_utils_tests.py", line 1318, in <module>
    class EsUtilsTest(TestCase):
  File "/Users/michael.franklin/source/seqr/seqr/utils/search/elasticsearch/es_utils_tests.py", line 1391, in EsUtilsTest
    @urllib3_responses.activate
     ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael.franklin/.venv/seqr/lib/python3.11/site-packages/urllib3_mock.py", line 135, in activate
    return get_wrapped(func, _wrapper_template, evaldict)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael.franklin/.venv/seqr/lib/python3.11/site-packages/urllib3_mock.py", line 45, in get_wrapped
    args, a, kw, defaults = inspect.getargspec(func)
                            ^^^^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'getargspec'

======================================================================
FAIL: test_command (seqr.management.tests.check_bam_cram_paths_tests.CheckBamCramPathsTest.test_command)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/michael.franklin/.venv/seqr/lib/python3.11/site-packages/mock/mock.py", line 1423, in patched
    return func(*newargs, **newkeywargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael.franklin/source/seqr/seqr/management/tests/check_bam_cram_paths_tests.py", line 34, in test_command
    self._check_results(True, mock_logger, mock_safe_post_to_slack, mock_does_file_exist)
  File "/Users/michael.franklin/source/seqr/seqr/management/tests/check_bam_cram_paths_tests.py", line 46, in _check_results
    self.assertListEqual(sorted(igv_file_paths), expected_remaining_files)
AssertionError: Lists differ: ['/readviz/NA19675.cram'] != ['/readviz/NA19675.cram', 'gs://datasets-gcnv/NA20870.bed.gz']

Second list contains 1 additional elements.
First extra element 1:
'gs://datasets-gcnv/NA20870.bed.gz'

- ['/readviz/NA19675.cram']
+ ['/readviz/NA19675.cram', 'gs://datasets-gcnv/NA20870.bed.gz']

======================================================================
FAIL: test_command_with_project (seqr.management.tests.check_bam_cram_paths_tests.CheckBamCramPathsTest.test_command_with_project)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/michael.franklin/.venv/seqr/lib/python3.11/site-packages/mock/mock.py", line 1423, in patched
    return func(*newargs, **newkeywargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael.franklin/source/seqr/seqr/management/tests/check_bam_cram_paths_tests.py", line 18, in test_command_with_project
    self._check_results(True, mock_logger, mock_safe_post_to_slack, mock_does_file_exist)
  File "/Users/michael.franklin/source/seqr/seqr/management/tests/check_bam_cram_paths_tests.py", line 46, in _check_results
    self.assertListEqual(sorted(igv_file_paths), expected_remaining_files)
AssertionError: Lists differ: ['/readviz/NA19675.cram'] != ['/readviz/NA19675.cram', 'gs://datasets-gcnv/NA20870.bed.gz']

Second list contains 1 additional elements.
First extra element 1:
'gs://datasets-gcnv/NA20870.bed.gz'

- ['/readviz/NA19675.cram']
+ ['/readviz/NA19675.cram', 'gs://datasets-gcnv/NA20870.bed.gz']

======================================================================
FAIL: test_dry_run_arg (seqr.management.tests.check_bam_cram_paths_tests.CheckBamCramPathsTest.test_dry_run_arg)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/michael.franklin/.venv/seqr/lib/python3.11/site-packages/mock/mock.py", line 1423, in patched
    return func(*newargs, **newkeywargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael.franklin/source/seqr/seqr/management/tests/check_bam_cram_paths_tests.py", line 39, in test_dry_run_arg
    self._check_results(True, mock_logger, mock_safe_post_to_slack, mock_does_file_exist)
  File "/Users/michael.franklin/source/seqr/seqr/management/tests/check_bam_cram_paths_tests.py", line 46, in _check_results
    self.assertListEqual(sorted(igv_file_paths), expected_remaining_files)
AssertionError: Lists differ: ['/re[23 chars]s://datasets-gcnv/NA20870.bed.gz', 'gs://readviz/NA20870.cram'] != ['/re[23 chars]s://datasets-gcnv/NA20870.bed.gz']

First list contains 1 additional elements.
First extra element 2:
'gs://readviz/NA20870.cram'

+ ['/readviz/NA19675.cram', 'gs://datasets-gcnv/NA20870.bed.gz']
- ['/readviz/NA19675.cram',
-  'gs://datasets-gcnv/NA20870.bed.gz',
-  'gs://readviz/NA20870.cram']

======================================================================
FAIL: test_get_single_variant (seqr.utils.search.hail_search_utils_tests.HailSearchUtilsTests.test_get_single_variant)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/michael.franklin/.venv/seqr/lib/python3.11/site-packages/mock/mock.py", line 1423, in patched
    return func(*newargs, **newkeywargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael.franklin/.venv/seqr/lib/python3.11/site-packages/responses/__init__.py", line 218, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael.franklin/source/seqr/seqr/utils/search/hail_search_utils_tests.py", line 200, in test_get_single_variant
    self._test_minimal_search_call(
  File "/Users/michael.franklin/source/seqr/seqr/utils/search/hail_search_utils_tests.py", line 34, in _test_minimal_search_call
    self.assertEqual(executed_request.headers.get('From'), 'test_user@broadinstitute.org')
AssertionError: 'seqr+test_user@populationgenomics.org.au' != 'test_user@broadinstitute.org'
- seqr+test_user@populationgenomics.org.au
+ test_user@broadinstitute.org

======================================================================
FAIL: test_get_variant_query_gene_counts (seqr.utils.search.hail_search_utils_tests.HailSearchUtilsTests.test_get_variant_query_gene_counts)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/michael.franklin/.venv/seqr/lib/python3.11/site-packages/mock/mock.py", line 1423, in patched
    return func(*newargs, **newkeywargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael.franklin/.venv/seqr/lib/python3.11/site-packages/responses/__init__.py", line 218, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael.franklin/source/seqr/seqr/utils/search/hail_search_utils_tests.py", line 172, in test_get_variant_query_gene_counts
    self._test_expected_search_call(sort=None)
  File "/Users/michael.franklin/source/seqr/seqr/utils/search/hail_search_utils_tests.py", line 60, in _test_expected_search_call
    self._test_minimal_search_call(**expected_search, **kwargs)
  File "/Users/michael.franklin/source/seqr/seqr/utils/search/hail_search_utils_tests.py", line 34, in _test_minimal_search_call
    self.assertEqual(executed_request.headers.get('From'), 'test_user@broadinstitute.org')
AssertionError: 'seqr+test_user@populationgenomics.org.au' != 'test_user@broadinstitute.org'
- seqr+test_user@populationgenomics.org.au
+ test_user@broadinstitute.org

======================================================================
FAIL: test_get_variants_for_variant_ids (seqr.utils.search.hail_search_utils_tests.HailSearchUtilsTests.test_get_variants_for_variant_ids)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/michael.franklin/.venv/seqr/lib/python3.11/site-packages/mock/mock.py", line 1423, in patched
    return func(*newargs, **newkeywargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael.franklin/.venv/seqr/lib/python3.11/site-packages/responses/__init__.py", line 218, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael.franklin/source/seqr/seqr/utils/search/hail_search_utils_tests.py", line 235, in test_get_variants_for_variant_ids
    self._test_minimal_search_call(
  File "/Users/michael.franklin/source/seqr/seqr/utils/search/hail_search_utils_tests.py", line 34, in _test_minimal_search_call
    self.assertEqual(executed_request.headers.get('From'), 'test_user@broadinstitute.org')
AssertionError: 'seqr+test_user@populationgenomics.org.au' != 'test_user@broadinstitute.org'
- seqr+test_user@populationgenomics.org.au
+ test_user@broadinstitute.org

======================================================================
FAIL: test_query_variants (seqr.utils.search.hail_search_utils_tests.HailSearchUtilsTests.test_query_variants)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/michael.franklin/.venv/seqr/lib/python3.11/site-packages/mock/mock.py", line 1423, in patched
    return func(*newargs, **newkeywargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael.franklin/.venv/seqr/lib/python3.11/site-packages/responses/__init__.py", line 218, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael.franklin/source/seqr/seqr/utils/search/hail_search_utils_tests.py", line 68, in test_query_variants
    self._test_expected_search_call()
  File "/Users/michael.franklin/source/seqr/seqr/utils/search/hail_search_utils_tests.py", line 60, in _test_expected_search_call
    self._test_minimal_search_call(**expected_search, **kwargs)
  File "/Users/michael.franklin/source/seqr/seqr/utils/search/hail_search_utils_tests.py", line 34, in _test_minimal_search_call
    self.assertEqual(executed_request.headers.get('From'), 'test_user@broadinstitute.org')
AssertionError: 'seqr+test_user@populationgenomics.org.au' != 'test_user@broadinstitute.org'
- seqr+test_user@populationgenomics.org.au
+ test_user@broadinstitute.org

======================================================================
FAIL: test_variant_lookup (seqr.utils.search.hail_search_utils_tests.HailSearchUtilsTests.test_variant_lookup)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/michael.franklin/.venv/seqr/lib/python3.11/site-packages/mock/mock.py", line 1423, in patched
    return func(*newargs, **newkeywargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael.franklin/.venv/seqr/lib/python3.11/site-packages/responses/__init__.py", line 218, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael.franklin/source/seqr/seqr/utils/search/hail_search_utils_tests.py", line 179, in test_variant_lookup
    self._test_minimal_search_call(expected_search_body={
  File "/Users/michael.franklin/source/seqr/seqr/utils/search/hail_search_utils_tests.py", line 34, in _test_minimal_search_call
    self.assertEqual(executed_request.headers.get('From'), 'test_user@broadinstitute.org')
AssertionError: 'seqr+test_user@populationgenomics.org.au' != 'test_user@broadinstitute.org'
- seqr+test_user@populationgenomics.org.au
+ test_user@broadinstitute.org

======================================================================
FAIL: test_receive_alignment_table_handler (seqr.views.apis.igv_api_tests.IgvAPITest.test_receive_alignment_table_handler)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/michael.franklin/.venv/seqr/lib/python3.11/site-packages/mock/mock.py", line 1423, in patched
    return func(*newargs, **newkeywargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael.franklin/source/seqr/seqr/views/apis/igv_api_tests.py", line 125, in test_receive_alignment_table_handler
    self.assertEqual(response.status_code, 200)
AssertionError: 400 != 200

======================================================================
FAIL: test_receive_bulk_alignment_table_handler (seqr.views.apis.igv_api_tests.IgvAPITest.test_receive_bulk_alignment_table_handler)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/michael.franklin/.venv/seqr/lib/python3.11/site-packages/mock/mock.py", line 1423, in patched
    return func(*newargs, **newkeywargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael.franklin/source/seqr/seqr/views/apis/igv_api_tests.py", line 179, in test_receive_bulk_alignment_table_handler
    self.assertEqual(response.status_code, 200)
AssertionError: 400 != 200

======================================================================
FAIL: test_individuals_metadata_table_handler (seqr.views.apis.individual_api_tests.LocalIndividualAPITest.test_individuals_metadata_table_handler)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/michael.franklin/.venv/seqr/lib/python3.11/site-packages/mock/mock.py", line 1423, in patched
    return func(*newargs, **newkeywargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael.franklin/source/seqr/seqr/views/apis/individual_api_tests.py", line 932, in test_individuals_metadata_table_handler
    self._is_expected_individuals_metadata_upload(response, expected_families=True, has_non_hpo_update=True)
  File "/Users/michael.franklin/source/seqr/seqr/views/apis/individual_api_tests.py", line 852, in _is_expected_individuals_metadata_upload
    self.assertEqual(response.status_code, 200)
AssertionError: 500 != 200

======================================================================
FAIL: test_anvil_export (seqr.views.apis.report_api_tests.LocalReportAPITest.test_anvil_export)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/michael.franklin/.venv/seqr/lib/python3.11/site-packages/mock/mock.py", line 1423, in patched
    return func(*newargs, **newkeywargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael.franklin/.venv/seqr/lib/python3.11/site-packages/responses/__init__.py", line 218, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael.franklin/source/seqr/seqr/views/apis/report_api_tests.py", line 565, in test_anvil_export
    self.assertEqual(response.status_code, 200)
AssertionError: 403 != 200

======================================================================
FAIL: test_gregor_export (seqr.views.apis.report_api_tests.LocalReportAPITest.test_gregor_export)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/michael.franklin/.venv/seqr/lib/python3.11/site-packages/mock/mock.py", line 1423, in patched
    return func(*newargs, **newkeywargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael.franklin/.venv/seqr/lib/python3.11/site-packages/responses/__init__.py", line 218, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael.franklin/source/seqr/seqr/views/apis/report_api_tests.py", line 692, in test_gregor_export
    self.assertEqual(response.status_code, 400)
AssertionError: 403 != 400

======================================================================
FAIL: test_sample_metadata_export (seqr.views.apis.summary_data_api_tests.LocalSummaryDataAPITest.test_sample_metadata_export)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/michael.franklin/.venv/seqr/lib/python3.11/site-packages/mock/mock.py", line 1423, in patched
    return func(*newargs, **newkeywargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael.franklin/.venv/seqr/lib/python3.11/site-packages/responses/__init__.py", line 218, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael.franklin/source/seqr/seqr/views/apis/summary_data_api_tests.py", line 637, in test_sample_metadata_export
    self.assertEqual(response.status_code, 402)
AssertionError: 403 != 402

----------------------------------------------------------------------
Ran 261 tests in 143.832s
illusional commented 8 months ago

Idk @EddieLF, it's literally that one line that's failing. I don't think we intend to use this bit, and I don't know how to track it down to work out what or why it's happening.

I've commented it out, and tests are "passing", so I'll leave that to you and @cassimons to work out if that's okay to merge into staging.

illusional commented 8 months ago

@EddieLF / @cassimons, tests passing as we discussed today. I've proposed a suggested fix upstream.