monarch-initiative / genophenocorr

Genotype Phenotype Correlation
https://monarch-initiative.github.io/genophenocorr/stable
MIT License
4 stars 1 forks source link

fix bugs that are seen in the GitHub CI #163

Closed pnrobinson closed 1 month ago

pnrobinson commented 1 month ago

@lnrekerle @ielis The following test runs fine locally (also in the debugger), but it crashes on the CI See here https://github.com/monarch-initiative/genophenocorr/actions/runs/9147497554/job/25148995281 It shows this:

ERROR tests/test_preprocessing.py::TestPhenotypeCreator::test_input_curies[WalterWhite-#0 The CURIE WalterWhite has no colon `:` or underscore `_`-Ensure the term ID consists of a prefix (e.g. `HP`) and id (e.g. `0001250`) joined by colon `:` or underscore `_`]

For some reason this is passing locally

========================= 3 passed, 1 warning in 0.03s =========================
Finished running tests!

Should we mark this with "ignore" or something like that? I am not sure how to fix this. Maybe it is some string comparison thing that is not working with the back slashes -- should we adjust the warning to be something like this

The CURIE WalterWhite has no colon (:) or underscore (_) -Ensure the term ID consists of a prefix (e.g. HP) and id (e.g. 0001250) joined by colon or underscore.

We do not really need to explain what a colon or underscore is?

ielis commented 1 month ago

No, there is no issue with Walter white et al. The real issue is located few lines above:

/home/runner/work/genophenocorr/genophenocorr/tests/conftest.py:56
______________ ERROR at setup of TestCohortViewable.test_process _______________
file /home/runner/work/genophenocorr/genophenocorr/tests/view/test_view.py, line 19
      def test_process(
file /home/runner/work/genophenocorr/genophenocorr/tests/conftest.py, line 56
  @pytest.fixture(scope='session')
  def hpo(fpath_test_data_dir: str) -> hpotk.MinimalOntology:
E       fixture 'fpath_test_data_dir' not found
>       available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, cohort_viewable, doctest_namespace, fpath_suox_cohort, fpath_test_data, fpath_toy_hpo, genome_build_hg38, hpo, monkeypatch, protein_test_service, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, suox_cohort, test_diseases, test_phenotypes, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, toy_cohort, toy_hpo, toy_validation_runner
>       use 'pytest --fixtures [testpath]' for help on them.

because the fixture fpath_test_data_dir was deleted in one of the commits by mistake, leading to a cascade of errors.

I fixed this in #168