-
Notifications
You must be signed in to change notification settings - Fork 375
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 CLI to use async connection to DB #3450
Merged
Merged
Conversation
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
gabrielmbmb
force-pushed
the
feature/update-cli-async
branch
from
July 25, 2023 09:37
d2e168f
to
0a7e825
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## develop #3450 +/- ##
===========================================
+ Coverage 90.39% 90.52% +0.13%
===========================================
Files 248 248
Lines 13232 13246 +14
===========================================
+ Hits 11961 11991 +30
+ Misses 1271 1255 -16
☔ View full report in Codecov by Sentry. |
gabrielmbmb
force-pushed
the
feature/update-cli-async
branch
from
July 25, 2023 10:01
c2d750f
to
9d1230a
Compare
gabrielmbmb
added
area: api
Indicates that an issue or pull request is related to the Fast API server or REST endpoints
client
labels
Jul 25, 2023
gabrielmbmb
changed the title
Feature/update cli async
feat: update CLI to use async connection to DB
Jul 25, 2023
frascuchon
reviewed
Jul 25, 2023
frascuchon
reviewed
Jul 25, 2023
frascuchon
reviewed
Jul 25, 2023
frascuchon
reviewed
Jul 25, 2023
frascuchon
reviewed
Jul 25, 2023
leiyre
pushed a commit
that referenced
this pull request
Aug 1, 2023
…rgilla into feat/shortcuts-improvements * 'feat/shortcuts-improvements' of github.com:argilla-io/argilla: feat: update CLI to use async connection to DB (#3450) feat: add more value validations for rating questions (#3452) ci: selective `runs-on` value for tests execution (#3455) feat: update `package.yml` triggers (#3422) fix: uncancellable CI jobs (#3458) chore: Fix `ruff` line length (#3459) [pre-commit.ci] pre-commit autoupdate (#3449) improvement: Better efficiency of Weak Labels when vectors exist (#3444) refactor: add `ArgillaDatasetMixin` and re-structure `argilla.feedback.schemas` (#3427) chore: Set release version fix: add missing `suggestion_type_enum` values (#3445) [pre-commit.ci] pre-commit autoupdate (#3380) docs: fix username in HF Spaces docs (#3432)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area: api
Indicates that an issue or pull request is related to the Fast API server or REST endpoints
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.
Description
This PR updates the CLI, so an async connection to the DB is used in the commands instead of a sync one. As the rest of the parts of the application are using the async connection, the code for the sync connection has been removed.
The list of changes of this PR are:
AsyncTyper
class which allows to registerasync
command with its methodasync_command
. It executes then executes the command usingasyncio.run
.run
function that allows to execute anasync
command.database_async_url
property fromSettings
class. From now on,database_url
should have an URL with an async driver (sqlite+aiosqlite://
orpostgres+asyncpg://
).Type of change
How Has This Been Tested
python -m argilla users create ...
andpython -m argilla.tasks.users.create ...
)Checklist