-
Notifications
You must be signed in to change notification settings - Fork 1
Implementation of Job class #54
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
Conversation
4c3bdab
to
addc486
Compare
docker_constraints: DockerConstraints, | ||
label: str = None): | ||
pass | ||
self._uid: str = None |
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.
How will we generate the uid, i fount this online, but maybe we can just start with 1 and increment for each new job.
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.
"If the job has not been queued yet, it has no UID." aa I see.
@JohannesGaessler I wanted to ask, what IDE are you using? |
I am using PyCharm Community Edition. |
Do you know how to run every test in a dir, I tried also in the terminal using
|
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.
To me everything looks good, all test are ok. I don't have a lot of experience with python so it will be good if other people check it as well.
I usually just do it via |
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.
Neat. It took me awhile to figure out why __eq__
is needed, but it definitely makes sense for unit tests.
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.
Ready for merge, just squash the fixup commits.
Can we merge this pls. |
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.
Good that this wasn't merged, I completely forgot to check.
The unit tests do not pass MyPy checking, and I think our tests should be strongly typed, just as our code is. I'll also add the corresponding checks to my CI pull request.
Do we really need type safety for our unit tests? |
I am using an IDE (rather vim + plugins) where type safety helps me use autocomplete and also catch errors while I am typing. Hence I'd like to use type safe code everywhere. Seeing that the type is wrong can help you realize your mistake faster if the test fails.
Right, we can make an exception for the mixin class.
Final test: you can add |
0ad27fc
to
4df6e06
Compare
4df6e06
to
6a39243
Compare
This PR adds an implementation for the Job class and its sub-classes.
I also laid some groundwork to be used for serialization in general.