-
Notifications
You must be signed in to change notification settings - Fork 5
Feature: ipv4 and missing service #221
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
Open
1yam
wants to merge
19
commits into
main
Choose a base branch
from
1yam-ipv4-and-missing-service
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.
Open
Conversation
This file contains hidden or 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
…VERSION` `SCHEDULER_URL`
…egister_service` to add any service on top
…new method `register_authenticated_service` to add any service on top
Failed to retrieve llama text: POST 400: {"error":{"code":400,"message":"the request exceeds the available context size. try increasing the context size or enable context shift","type":"invalid_request_error"}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR add missing services inside the SDK
crn
scheduler
dns
port_forwarder
andutils
to simplify usage for instancesRelated ClickUp, GitHub or Jira tickets : ALEPH-XXX
Self proofreading checklist
Changes
This pull request introduces significant enhancements to the Aleph SDK client, primarily focusing on service modularization, authenticated service registration, and improved API interactions. Key changes include the addition of several service classes, the ability to register services dynamically, and updates to existing methods to use new models and validation techniques.
Service Modularization and API Enhancements:
Added new service classes: Introduced modular service classes such as
CrnService
,DNSService
,PortForwarder
,AuthenticatedPortForwarder
, andSchedulerService
to encapsulate specific API interactions. These classes streamline operations like fetching CRN lists, managing DNS records, configuring port forwarding, and interacting with the scheduler API. (src/aleph/sdk/client/service/crn/http_crn.py
- [1]src/aleph/sdk/client/service/dns/http_dns.py
- [2]src/aleph/sdk/client/service/port_forwarder/http_port_forwarder.py
- [3]src/aleph/sdk/client/service/port_forwarder/authenticated_port_forwarder.py
- [4]src/aleph/sdk/client/service/scheduler/http_scheduler.py
- [5]Introduced
BaseService
andAggregateConfig
: Added a generic base classBaseService
and a container modelAggregateConfig
to handle aggregate data and simplify service implementations. (src/aleph/sdk/client/service/base.py
- src/aleph/sdk/client/service/base.pyR1-R47)Service Registration and Initialization:
Dynamic service registration: Added methods
register_service
andregister_authenticated_service
to dynamically register services for both authenticated and non-authenticated clients. This allows for flexible service instantiation during client initialization. (src/aleph/sdk/client/authenticated_http.py
- [1]src/aleph/sdk/client/http.py
- [2]Service initialization in
__aenter__
: Enhanced the__aenter__
method inAlephHttpClient
andAuthenticatedAlephHttpClient
to initialize default and registered services when the client is entered. (src/aleph/sdk/client/authenticated_http.py
- [1]src/aleph/sdk/client/http.py
- [2]Code Improvements:
parse_obj
withmodel_validate
for improved validation in methods likecreate_store
. (src/aleph/sdk/client/authenticated_http.py
- src/aleph/sdk/client/authenticated_http.pyL395-R425)These changes collectively enhance the SDK's flexibility, maintainability, and ease of use for developers interacting with the Aleph network.