AstraZeneca / chemicalx

A PyTorch and TorchDrug based deep learning library for drug pair scoring. (KDD 2022)
https://chemicalx.readthedocs.io
Apache License 2.0
708 stars 87 forks source link

Add additional model tests #46

Closed cthoyt closed 2 years ago

cthoyt commented 2 years ago

Summary

This PR adds tests to make sure that all models inherit from the correct base class, that their arguments are kwarg only, and that there are defaults for all arguments.

Changes

Additional remarks

This PR doesn't go as far as to check that all submodules from chemicalx.models are imported somewhere in chemicalx/models/__init__.py. We can leave that for checking manually during review, since all people making PRs for models should have them exposed before the PR can be accepted

codecov-commenter commented 2 years ago

Codecov Report

Merging #46 (fb7fb7d) into main (6ac8eb3) will increase coverage by 0.03%. The diff coverage is 100.00%.

:exclamation: Current head fb7fb7d differs from pull request most recent head 6d2cc97. Consider uploading reports for the commit 6d2cc97 to get more accurate results Impacted file tree graph

@@            Coverage Diff             @@
##             main      #46      +/-   ##
==========================================
+ Coverage   98.64%   98.68%   +0.03%     
==========================================
  Files          27       27              
  Lines         664      682      +18     
==========================================
+ Hits          655      673      +18     
  Misses          9        9              
Impacted Files Coverage Δ
tests/unit/test_models.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 6ac8eb3...6d2cc97. Read the comment docs.