[Feature][runtime env] refactor URI Protocol in runtime env.
See original GitHub issueSearch before asking
- I had searched in the issues and found no similar feature requirement.
Description
Make different protocols become different plugins. In simple terms, I want to implement a SmartURIHandle, somewhat similar to io_path:
class BaseURIHandler:
def __init__(self, uri):
...
async def async_download(self, file_name):
...
async def get_hash_from_uri(self):
...
async def get_hash_from_file(self, local_path):
...
class SmartURIHandler:
@classmethod
def register_handler(cls, handler: BaseURIHandler):
....
async def async_download(self, urI):
...
async def get_hash_from_uri(self):
...
async def get_hash_from_file(self, local_path):
...
# download file
async def download_package(uri, file_name):
return await SmartURIHandler(uri).download(file_name)
This simplifies the implementation of runtime_env.packing.py, and in the future, we have the opportunity to let users define their own protocols outside of ray.
Use case
No response
Related issues
No response
Are you willing to submit a PR?
- Yes I am willing to submit a PR!
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Refactoring Activities into a Sub-Process
You can create a new call sub-process activity and sub-process by extracting existing objects. Procedure. Select the objects that you want to put...
Read more >Allow vscode.env.asExternalUri to return valid results ... - GitHub
Here's how that could look like: On the desktop, the API would return a URI with the ${appScheme} protocol which would open the...
Read more >Unit Testing | Nuxeo Documentation
The Nuxeo Test Framework is based on JUnit4 and provides features such as: Test configuration through annotations,. Embedded Nuxeo Runtime,.
Read more >PyInstaller Documentation - Read the Docs
PyInstaller is distributed under a dual-licensing scheme using both the GPL 2.0 License, ... environment, --runtime-tmpdir might be a workaround.).
Read more >Bundle names used in repository - Eclipse Downloads
Service Location Protocol (RFC 2608) Implementation Source ... SourceForge LPG Java Runtime Source Bundle; net.i2p.crypto.eddsa 0.3.0.v20220506-1020
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
no problem and I will open a PR, we can discuss details in PR’s comment
make
SmartURIHandler
have the ability to handle a specific URI, for example: