-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: update python api client #193
Open
domire8
wants to merge
16
commits into
main
Choose a base branch
from
feat/update-client
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+260
−91
Open
Changes from 8 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
9c1a0d3
feat: update python api client
domire8 3a76b0b
feat: update check
domire8 1b830e1
fix: change language around version
domire8 39eac60
fix: deprecate call_service
domire8 e3eaa7a
fix: typo
domire8 919a11b
refactor: rename function
domire8 44beb78
release: version 3.0.0
domire8 120f839
fix: endpoint
domire8 0470e58
feat: update client and documentation
eeberhard 507e0a7
fix: change default port and address
domire8 15445a9
feat: more forgiving core version requirement decorator
eeberhard ca07a47
docs: changelog
eeberhard 43d55d4
feat: check core version validity
eeberhard 83b6cc9
fix: format core version as string before semver check
eeberhard 6987654
fix: typo
eeberhard bb85380
feat: add log level
domire8 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,6 +1,6 @@ | ||||||
# Python AICA API Client | ||||||
|
||||||
The AICA API client module provides simple functions for interacting with the AICA API. | ||||||
The AICA API client module provides simple functions for interacting with the API of the AICA Core. | ||||||
|
||||||
```shell | ||||||
pip install aica-api | ||||||
|
@@ -22,7 +22,7 @@ aica.unload_component('my_component') | |||||
aica.stop_application() | ||||||
``` | ||||||
|
||||||
To check the status of component predicates and conditions, the following blocking methods can be employed: | ||||||
To check the status of predicates and conditions, the following blocking methods can be employed: | ||||||
|
||||||
```python | ||||||
from aica_api.client import AICA | ||||||
|
@@ -34,28 +34,29 @@ if aica.wait_for_condition('timer_1_active', timeout=10.0): | |||||
else: | ||||||
print('Timed out before condition was true') | ||||||
|
||||||
if aica.wait_for_predicate('timer_1', 'is_timed_out', timeout=10.0): | ||||||
if aica.wait_for_component_predicate('timer_1', 'is_timed_out', timeout=10.0): | ||||||
print('Predicate is true!') | ||||||
else: | ||||||
print('Timed out before predicate was true') | ||||||
``` | ||||||
|
||||||
## Compatability table | ||||||
|
||||||
The latest version of the AICA API client will generally support the latest API server version in the AICA framework. | ||||||
The latest version of the AICA API client will generally support the API server in the AICA Core version. | ||||||
Major changes to the API client or server versions indicate breaking changes and are not backwards compatible. To | ||||||
interact with older versions of the AICA framework, it may be necessary to install older versions of the client. | ||||||
interact with older versions of the AICA Core, it may be necessary to install older versions of the client. | ||||||
Use the following compatability table to determine which client version to use. | ||||||
|
||||||
| API server version | Matching Python client version | | ||||||
| AICA Core version | Matching Python client version | | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|--------------------|---------------------------------| | ||||||
| `4.x` | `>= 3.0.0` | | ||||||
| `3.x` | `>= 2.0.0` | | ||||||
| `2.x` | `1.2.0` | | ||||||
| `<= 1.x` | Unsupported | | ||||||
|
||||||
Between major version changes, minor updates to the API server version and Python client versions may introduce new | ||||||
endpoints and functions respectively. If a function requires a feature that the detected API server version does not yet | ||||||
support (as is the case when the Python client version is more up-to-date than the targeted API server), then calling | ||||||
Between major version changes, minor updates to the AICA Core version and Python client versions may introduce new | ||||||
endpoints and functions respectively. If a function requires a feature that the detected AICA Core version does not yet | ||||||
support (as is the case when the Python client version is more up-to-date than the targeted AICA Core), then calling | ||||||
that function will return None with a warning. | ||||||
|
||||||
Recent client versions also support the following functions to check the client version and API compatability. | ||||||
|
@@ -66,7 +67,7 @@ from aica_api.client import AICA | |||||
aica = AICA() | ||||||
|
||||||
# get the current API server version | ||||||
print(aica.api_version()) | ||||||
print(aica.core_version()) | ||||||
# get the current client version | ||||||
print(aica.client_version()) | ||||||
|
||||||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build" | |
|
||
[project] | ||
name = "aica_api" | ||
version = "2.1.0" | ||
version = "3.0.0" | ||
authors = [ | ||
{ name="Enrico Eberhard", email="[email protected]" }, | ||
] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.