-
Notifications
You must be signed in to change notification settings - Fork 75
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 missing parameters, do not pass None #144
Conversation
Codecov Report
@@ Coverage Diff @@
## master #144 +/- ##
==========================================
- Coverage 90.67% 90.58% -0.10%
==========================================
Files 31 31
Lines 1287 1285 -2
==========================================
- Hits 1167 1164 -3
- Misses 120 121 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
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.
@Kamilcuk Thanks for your contribution! I only left a small comment.
nomad/api/jobs.py
Outdated
self, | ||
prefix: Optional[str] = None, | ||
namespace: Optional[str] = None, | ||
filter: Optional[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.
My suggestion is: Let's use _filter
here instead of builtin value.
I think it's better to be slightly different from the official API than shadow keywords.
…ith builtin filter function
I am under the influence of sqlalchemy which uses |
@Kamilcuk Yep, it seems you are right:
LGTM |
Add missing parameters to allocations.get_allocations and jobs.get_jobs.
Do not pass prefix if it's none (or any other param). This simplifies the code handling with optional parameters. If prefix is passed "", then allocations are sorted alphabetically, otherwise chronologically.