-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add type checks #64
Add type checks #64
Conversation
22a2d2d
to
fda27f2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added a few comments, some of the code seems to be outdated, e.g., the use of prefixes or abstract classes. can you specify where exactly problems occur? for example, what makes the circular import necessary?
27a8d82
to
2ea20e1
Compare
Thank you for your comments, I fixed most of them, the most important point and obstacle towards getting |
thanks for the update! let's discuss the remaining issues per video. |
436ba5c
to
b1ff4cf
Compare
After getting a reply in the mypy-issue, I now fixed all the imports to be relative instead of absolute. To run cd gp
cd ..
mypy gp I am currently getting these errors:
There are three main problems that need to be resolved:
|
One more point: and in the |
how about supporting the
I find it less pretty than the current implementation that does not introduce an additional variable, but if mypy is unhappy otherwise, feel free to change it. i guess a comment would help there.
we can use -3 for unused genes in the |
unfortunately i don't remember why we need the note that |
140da25
to
100e445
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome, thanks for the hard work! 🎉 🎉 i've reviewed until genome.py
, will continue there later, here are already a few comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getting better every time! ✨ added a few comments that should be addressed before merging.
I addressed all your comments, @jakobj . Please take another look. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
appreciate the hard work 🙇 only some superficial comments left
ab87a01
to
88dc4a0
Compare
…by annotation process Remove initialization of class attributes Implement List constructor for primitives and adapt clone function of Genome Add sympy_available and torch_available variables Introduce global constants for special genes Clarify if/else branch in parameter_update function of CartesianGraph Add mypy to travis CI Add mypy badge to README Add mypy config file Add mypy to extra-requirements file
88dc4a0
to
f07f926
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome work! 🎉 ✨ 🎉 so 👍 conditional on travis passing
This PR adds type checks to the library and implements changes requested by the static type checker
mypy
. Eventually, it will also addmypy
to the CI.Note: This is a draft PR and was created now to raise awareness of this. To run
mypy
, execute:This will currently raise a bunch of errors that need to be addressed before this PR can get merged. Also, the current state of the code introduces a circular import which will make importing the library fail.