-
Notifications
You must be signed in to change notification settings - Fork 347
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: add login
command
#3600
feat: add login
command
#3600
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
src/argilla/tasks/login/__main__.py
Outdated
app = typer.Typer(invoke_without_command=True) | ||
|
||
|
||
@app.callback(help="Login to an Argilla server") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@app.callback(help="Login to an Argilla server") | |
@app.callback(help="Login into an Argilla Server") |
src/argilla/tasks/login/__main__.py
Outdated
api_url: str = typer.Option(..., help="The URL of the Argilla server to login"), | ||
api_key: str = typer.Option(..., help="The API key to use to login to the Argilla server", prompt="API Key"), | ||
workspace: Optional[str] = typer.Option( | ||
None, help="The default workspace over which the operations will be performed" | ||
), | ||
extra_headers: Optional[str] = typer.Option( | ||
None, help="A JSON string with extra headers to be sent in the requests to the Argilla server" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
api_url: str = typer.Option(..., help="The URL of the Argilla server to login"), | |
api_key: str = typer.Option(..., help="The API key to use to login to the Argilla server", prompt="API Key"), | |
workspace: Optional[str] = typer.Option( | |
None, help="The default workspace over which the operations will be performed" | |
), | |
extra_headers: Optional[str] = typer.Option( | |
None, help="A JSON string with extra headers to be sent in the requests to the Argilla server" | |
api_url: str = typer.Option(..., help="The URL of the Argilla Server to login into"), | |
api_key: str = typer.Option(..., help="The API key to use to login into the Argilla Server", prompt="API Key"), | |
workspace: Optional[str] = typer.Option( | |
None, help="The default workspace over which the operations will be performed" | |
), | |
extra_headers: Optional[str] = typer.Option( | |
None, help="A JSON string with extra headers to be sent in the requests to the Argilla Server" |
The URL of the deployed environment for this PR is https://argilla-quickstart-pr-3600-ki24f765kq-no.a.run.app |
Co-authored-by: alvarobartt <alvaro@argilla.io>
# Description This PR adds the `login` command that will allow to login in an Argilla server and store the credentials locally so they can be used later when calling `rg.init` or other CLI commands. In addition, a `init_callback` function has been added to be reused as callback function for the groups of commands that needs to "login" before getting executed. Closes argilla-io#3584 **Type of change** - [x] New feature (non-breaking change which adds functionality) **How Has This Been Tested** Tested manually in a local development environment and added tests to cover the additions and changes. **Checklist** - [ ] I added relevant documentation - [x] I followed the style guidelines of this project - [x] I did a self-review of my code - [ ] I made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have added tests that prove my fix is effective or that my feature works - [ ] I filled out [the contributor form](https://tally.so/r/n9XrxK) (see text above) - [x] I have added relevant notes to the `CHANGELOG.md` file (See https://keepachangelog.com/) --------- Co-authored-by: alvarobartt <alvaro@argilla.io>
Description
This PR adds the
login
command that will allow to login in an Argilla server and store the credentials locally so they can be used later when callingrg.init
or other CLI commands.In addition, a
init_callback
function has been added to be reused as callback function for the groups of commands that needs to "login" before getting executed.Closes #3584
Type of change
How Has This Been Tested
Tested manually in a local development environment and added tests to cover the additions and changes.
Checklist
CHANGELOG.md
file (See https://keepachangelog.com/)