Skip to content
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 info command #3707

Merged
merged 5 commits into from
Sep 4, 2023
Merged

feat: add info command #3707

merged 5 commits into from
Sep 4, 2023

Conversation

gabrielmbmb
Copy link
Member

Description

This PR adds a new command python -m argilla info that prints basic information about the Argilla client and connected server.

In addition, this PR adds a new method to argilla.client.apis.status.Status class to call the GET /api/_status endpoint of the server to get info about the server version and the elasticsearch instance used.

Closes #3704

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested

(Please describe the tests that you ran to verify your changes. And ideally, reference tests)

  • Test A
  • Test B

Checklist

  • I added relevant documentation
  • I followed the style guidelines of this project
  • I did a self-review of my code
  • I made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I filled out the contributor form (see text above)
  • I have added relevant notes to the CHANGELOG.md file (See https://keepachangelog.com/)

@gabrielmbmb gabrielmbmb added type: enhancement Indicates new feature requests area: cli Indicates that an issue or pull request is related to the Command Line Interface (CLI) labels Sep 4, 2023
@gabrielmbmb gabrielmbmb added this to the v1.16.0 milestone Sep 4, 2023
@gabrielmbmb gabrielmbmb self-assigned this Sep 4, 2023
Copy link
Member

@alvarobartt alvarobartt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Does this depend on an Argilla Server specific version? If so, shouldn't we check the server version before calling the api/_info endpoint? Also I'd suggest you to add this to the ISSUE_TEMPLATE files when applicable to point users to python -m argilla info when fulfilling the details of the Argilla version they are using (mentioning that's obviously just supported from 1.16.0 onwards)

@gabrielmbmb
Copy link
Member Author

@alvarobartt the server version shouldn't affect because GET /api/_status endpoint has been there for a long time. Good idea! I'll update the ISSUE template :)

@codecov
Copy link

codecov bot commented Sep 4, 2023

Codecov Report

Patch coverage is 95.74% of modified lines.

Files Changed Coverage
src/argilla/client/apis/status.py 92.85%
src/argilla/__main__.py 100.00%
src/argilla/tasks/__init__.py 100.00%
src/argilla/tasks/info/__init__.py 100.00%
src/argilla/tasks/info/__main__.py 100.00%

📢 Thoughts on this report? Let us know!.

@github-actions
Copy link

github-actions bot commented Sep 4, 2023

The URL of the deployed environment for this PR is https://argilla-quickstart-pr-3707-ki24f765kq-no.a.run.app

@gabrielmbmb gabrielmbmb merged commit f2e8249 into develop Sep 4, 2023
@gabrielmbmb gabrielmbmb deleted the feature/cli-info-command branch September 4, 2023 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: cli Indicates that an issue or pull request is related to the Command Line Interface (CLI) type: enhancement Indicates new feature requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Add python -m argilla info command
2 participants