Skip to content

Conversation

bigcat88
Copy link
Member

@bigcat88 bigcat88 commented Dec 13, 2023

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]>
Signed-off-by: Alexander Piskun <[email protected]>
Copy link

codecov bot commented Dec 13, 2023

Codecov Report

Merging #181 (2fe5d10) into main (52b48f1) will increase coverage by 0.08%.
The diff coverage is 99.81%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #181      +/-   ##
==========================================
+ Coverage   99.84%   99.93%   +0.08%     
==========================================
  Files          36       37       +1     
  Lines        3260     4497    +1237     
==========================================
+ Hits         3255     4494    +1239     
+ Misses          5        3       -2     
Files Coverage Δ
nc_py_api/__init__.py 100.00% <100.00%> (ø)
nc_py_api/_preferences.py 100.00% <100.00%> (ø)
nc_py_api/_preferences_ex.py 100.00% <100.00%> (ø)
nc_py_api/_session.py 100.00% <100.00%> (+0.86%) ⬆️
nc_py_api/_talk_api.py 100.00% <100.00%> (ø)
nc_py_api/activity.py 100.00% <100.00%> (ø)
nc_py_api/apps.py 100.00% <100.00%> (ø)
nc_py_api/ex_app/__init__.py 100.00% <100.00%> (ø)
nc_py_api/ex_app/integration_fastapi.py 100.00% <100.00%> (ø)
nc_py_api/ex_app/ui/files_actions.py 100.00% <100.00%> (ø)
... and 14 more

Signed-off-by: Alexander Piskun <[email protected]>
Signed-off-by: Alexander Piskun <[email protected]>
Signed-off-by: Alexander Piskun <[email protected]>
Signed-off-by: Alexander Piskun <[email protected]>
Signed-off-by: Alexander Piskun <[email protected]>
Signed-off-by: Alexander Piskun <[email protected]>
Signed-off-by: Alexander Piskun <[email protected]>
Signed-off-by: Alexander Piskun <[email protected]>
Signed-off-by: Alexander Piskun <[email protected]>
Signed-off-by: Alexander Piskun <[email protected]>
Signed-off-by: Alexander Piskun <[email protected]>
Signed-off-by: Alexander Piskun <[email protected]>
Signed-off-by: Alexander Piskun <[email protected]>
Signed-off-by: Alexander Piskun <[email protected]>
Signed-off-by: Alexander Piskun <[email protected]>
@bigcat88 bigcat88 marked this pull request as ready for review December 15, 2023 14:26
Signed-off-by: Alexander Piskun <[email protected]>
@bigcat88 bigcat88 merged commit 16f44f8 into main Dec 15, 2023
@bigcat88 bigcat88 deleted the async-support branch December 15, 2023 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant