-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes proposed in this pull request: * **AsyncNextcloud** and **AsyncNextcloudApp** are here! * Reworked `set_handlers` to allow use of async handlers. * set_handlers: **denied** defining _init_handler_ and _models_to_fetch_ at the same time, as `huggingface_hub` does not support async. If you want you can provide your own sync or async `init_handler` callback and do in it what you want. If you need only automatic AI models to download(probably all will use this behaviour), `nc_py_api` will handle on its own. What is currently missing: `caldav` async for AsyncNC classes. If you need to use `CalDAV` use standard synchronous classes. _After this PR there will one more separate PR where `models_to_fetch` and `models_download_params` will be united in a single more flexed parameter._ --------- Signed-off-by: Alexander Piskun <[email protected]>
- Loading branch information
Showing
59 changed files
with
6,226 additions
and
958 deletions.
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="aregister_nc_py_api (27)" type="PythonConfigurationType" factoryName="Python"> | ||
<module name="nc_py_api" /> | ||
<option name="ENV_FILES" value="" /> | ||
<option name="INTERPRETER_OPTIONS" value="" /> | ||
<option name="PARENT_ENVS" value="true" /> | ||
<envs> | ||
<env name="PYTHONUNBUFFERED" value="1" /> | ||
<env name="APP_ID" value="nc_py_api" /> | ||
<env name="APP_PORT" value="9009" /> | ||
<env name="APP_SECRET" value="12345" /> | ||
<env name="APP_VERSION" value="1.0.0" /> | ||
<env name="NEXTCLOUD_URL" value="http://stable27.local/index.php" /> | ||
<env name="APP_HOST" value="0.0.0.0" /> | ||
</envs> | ||
<option name="SDK_HOME" value="" /> | ||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/tests" /> | ||
<option name="IS_MODULE_SDK" value="true" /> | ||
<option name="ADD_CONTENT_ROOTS" value="true" /> | ||
<option name="ADD_SOURCE_ROOTS" value="true" /> | ||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" /> | ||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tests/_install_async.py" /> | ||
<option name="PARAMETERS" value="" /> | ||
<option name="SHOW_COMMAND_LINE" value="false" /> | ||
<option name="EMULATE_TERMINAL" value="false" /> | ||
<option name="MODULE_MODE" value="false" /> | ||
<option name="REDIRECT_INPUT" value="false" /> | ||
<option name="INPUT_FILE" value="" /> | ||
<method v="2" /> | ||
</configuration> | ||
</component> |
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="aregister_nc_py_api (28)" type="PythonConfigurationType" factoryName="Python"> | ||
<module name="nc_py_api" /> | ||
<option name="ENV_FILES" value="" /> | ||
<option name="INTERPRETER_OPTIONS" value="" /> | ||
<option name="PARENT_ENVS" value="true" /> | ||
<envs> | ||
<env name="PYTHONUNBUFFERED" value="1" /> | ||
<env name="APP_ID" value="nc_py_api" /> | ||
<env name="APP_PORT" value="9009" /> | ||
<env name="APP_SECRET" value="12345" /> | ||
<env name="APP_VERSION" value="1.0.0" /> | ||
<env name="NEXTCLOUD_URL" value="http://stable28.local/index.php" /> | ||
<env name="APP_HOST" value="0.0.0.0" /> | ||
</envs> | ||
<option name="SDK_HOME" value="" /> | ||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/tests" /> | ||
<option name="IS_MODULE_SDK" value="true" /> | ||
<option name="ADD_CONTENT_ROOTS" value="true" /> | ||
<option name="ADD_SOURCE_ROOTS" value="true" /> | ||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" /> | ||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tests/_install_async.py" /> | ||
<option name="PARAMETERS" value="" /> | ||
<option name="SHOW_COMMAND_LINE" value="false" /> | ||
<option name="EMULATE_TERMINAL" value="false" /> | ||
<option name="MODULE_MODE" value="false" /> | ||
<option name="REDIRECT_INPUT" value="false" /> | ||
<option name="INPUT_FILE" value="" /> | ||
<method v="2" /> | ||
</configuration> | ||
</component> |
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="aregister_nc_py_api (last)" type="PythonConfigurationType" factoryName="Python"> | ||
<module name="nc_py_api" /> | ||
<option name="ENV_FILES" value="" /> | ||
<option name="INTERPRETER_OPTIONS" value="" /> | ||
<option name="PARENT_ENVS" value="true" /> | ||
<envs> | ||
<env name="PYTHONUNBUFFERED" value="1" /> | ||
<env name="APP_ID" value="nc_py_api" /> | ||
<env name="APP_PORT" value="9009" /> | ||
<env name="APP_SECRET" value="12345" /> | ||
<env name="APP_VERSION" value="1.0.0" /> | ||
<env name="NEXTCLOUD_URL" value="http://nextcloud.local" /> | ||
<env name="APP_HOST" value="0.0.0.0" /> | ||
</envs> | ||
<option name="SDK_HOME" value="" /> | ||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/tests" /> | ||
<option name="IS_MODULE_SDK" value="true" /> | ||
<option name="ADD_CONTENT_ROOTS" value="true" /> | ||
<option name="ADD_SOURCE_ROOTS" value="true" /> | ||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" /> | ||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tests/_install_async.py" /> | ||
<option name="PARAMETERS" value="" /> | ||
<option name="SHOW_COMMAND_LINE" value="false" /> | ||
<option name="EMULATE_TERMINAL" value="false" /> | ||
<option name="MODULE_MODE" value="false" /> | ||
<option name="REDIRECT_INPUT" value="false" /> | ||
<option name="INPUT_FILE" value="" /> | ||
<method v="2" /> | ||
</configuration> | ||
</component> |
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
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
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
Oops, something went wrong.