Skip to content

Install the chem extra in the jobs that exercise RDKit - #9

Merged
mahdi-shafiei merged 1 commit into
mainfrom
ci/install-the-chem-extra-for-tests
Aug 28, 2026
Merged

Install the chem extra in the jobs that exercise RDKit#9
mahdi-shafiei merged 1 commit into
mainfrom
ci/install-the-chem-extra-for-tests

Conversation

@mahdi-shafiei

Copy link
Copy Markdown
Collaborator

Moving rdkit into the chem extra stopped CI installing it, so the drug-discovery suites now fail on main with ModuleNotFoundError: No module named 'rdkit'.

The extra itself is right: installing the package should not pull a chemistry toolkit. But the tests that cover that code still need it.

Scope

Thirteen test files reference rdkit, spanning tests/operators/, tests/benchmarks/, tests/sources/ and tests/splitters/. Mapping jobs to the tests they execute, only two run any of them:

job target
unit_tests .[dev,test,genomics].[dev,test,genomics,chem]
performance_tests .[dev,test,benchmark].[dev,test,benchmark,chem]

integration_tests runs only tests/integration/, which has no rdkit-dependent test, and e2e_tests selects -m e2e, which none of the thirteen carry.

Collection is safe everywhere: every rdkit import in the test suite is inside a function or fixture, verified by parsing each of the thirteen files rather than by grep, so no job fails at import time.

Moving rdkit into the chem extra stopped CI installing it, so every test in
tests/operators/test_drug_discovery.py and the drug-discovery, molnet and
molecular-splitter suites failed with ModuleNotFoundError.

The extra is right: installing the package should not pull a chemistry toolkit. The
tests that cover that code still need it, so the two jobs that execute them ask for
it explicitly.

Scoped to those jobs rather than added everywhere. No test file imports rdkit at
module level, verified by parsing each one, so collection is unaffected elsewhere;
integration and e2e select no rdkit-dependent tests.
@mahdi-shafiei
mahdi-shafiei merged commit 80fe354 into main Aug 28, 2026
8 of 10 checks passed
@mahdi-shafiei
mahdi-shafiei deleted the ci/install-the-chem-extra-for-tests branch August 28, 2026 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant