-
Notifications
You must be signed in to change notification settings - Fork 6
Finished API implementation and Base for CLI-Tool #52
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
base: main
Are you sure you want to change the base?
Conversation
update deprecated call datetime.utcnow() with datetime.now(UTC) fix test where data was provides as list and not as str.
better error message for SxapiAuthorizationError raise custom errors instead of return an integer != 0 fix failing test from resulting raises
@flowolf updated the changed we talked about
|
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.
thanks for the update. some small changes might be required
src/sxapi/cli/cli.py
Outdated
def run(self): | ||
"""Call sxapi functions based on passed arguments.""" | ||
args = self.parse_args(sys.argv[1:]) | ||
if not args: | ||
return 0 | ||
return |
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.
should this throw an exception?
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.
mhm i assume the Outdated Label means you have reviewed an older commit.
I also cant find this code snipped at this file anymore 🤔
Summary
This PR should be seen as a good base for further development. All Implemented features a working and are fully test (90% test coverage).
This PR introduces a complete redesign of the CLI and a complete implementation of the public API's. (more information below).
For the foreseeable future I will stop working on this project, because of:
API
This PR contains the complete implementation of every public API Endpoint provided via
PublicAPIv2
andIntegrationAPIV2
. Located insxapi/src/<publicV2|integrationV2>
CLI
It also contains a basis for further CLI Tool implementations. Can be found under
sxapi/src/cli
.There already some example Implementations for the CLI -> the animals, abort and token parser.
I did did full rebuild of the CLI design, thats why the approach is completely different from previous one.
The CLI now follows a
kubectl
style design, likesxapi animals get --ids <id1> <id2>
sxapi aborts delete <animal_id> <abort_id>