Adversarial-Deep-Learning / code-soup

This is a collection of algorithms and approaches used in the book adversarial deep learning
MIT License
18 stars 18 forks source link

Add static type checking using mypy #86

Closed Devanshu24 closed 3 years ago

Devanshu24 commented 3 years ago

Work in Progress. Starting a PR to get early feedback. Ready for review.

codecov[bot] commented 3 years ago

Codecov Report

Merging #86 (85db14c) into main (0257efa) will not change coverage. The diff coverage is n/a.

@@            Coverage Diff            @@
##              main       #86   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           17        17           
  Lines          704       704           
=========================================
  Hits           704       704           
Devanshu24 commented 3 years ago

Okay, so the setup is done.

The type checks will fail now since we have some places in the code that have incorrect or no type specifications. So we can do one of two things,

  1. Separate the type checking workflow from the pytest workflow (currently both of them run pytest.yml). So the tests will still pass and we can tackle type checking parallelly.
  2. Fix all the inconsistencies and only then merge this PR.

I think 1. is better. However, happy to hear suggestions :)

someshsingh22 commented 3 years ago

@Devanshu24 Merging this, we should follow 1 because as long as the CI is not present we will have to monitor it locally. Once the changes are done we will merge this into the original CI

Devanshu24 commented 3 years ago

@Devanshu24 Merging this, we should follow 1 because as long as the CI is not present we will have to monitor it locally

I don't understand what you mean by "we should follow 1" Sorry didn't realise, you were referring to the options.