Skip to content

Conversation

@mdesmet
Copy link
Collaborator

@mdesmet mdesmet commented Jun 12, 2025

Important

Refactor CLI commands to use a new auth_options decorator for centralized authentication handling, simplifying code and ensuring consistent behavior across commands.

  • Decorator Addition:
    • Introduces auth_options decorator in decorators.py to handle authentication options for CLI commands.
    • Loads configuration from ~/.altimate/altimate.json and substitutes environment variables.
  • CLI Refactor:
    • Applies auth_options to serve() in knowledge/cli.py and project_health() and onboard() in dbt/cli.py.
    • Removes redundant authentication logic from main.py and other CLI functions.
  • Behavior:
    • CLI commands now automatically load and apply authentication options from config files and environment variables.
    • Ensures API token and instance name are required for certain commands, raising errors if not provided.

This description was created by Ellipsis for ace1521. You can customize this summary. It will automatically update as commits are pushed.

@mdesmet mdesmet requested a review from suryaiyer95 June 12, 2025 06:41
Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed 73bbbb3 in 39 seconds. Click for details.
  • Reviewed 19 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. src/datapilot/cli/decorators.py:51
  • Draft comment:
    Extra blank line after the docstring. Consider removing it for consistent formatting.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
2. src/datapilot/cli/decorators.py:87
  • Draft comment:
    Trailing whitespace removal appears consistent; ensure your formatter settings are maintained.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None

Workflow ID: wflow_IXSo56Ai3yyUAEOP

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Caution

Changes requested ❌

Reviewed everything up to 16c1191 in 2 minutes and 21 seconds. Click for details.
  • Reviewed 298 lines of code in 4 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. src/datapilot/cli/decorators.py:56
  • Draft comment:
    The wrapper assumes that the first parameter is the Click context (ctx). Ensure all commands using this decorator include @click.pass_context and document this requirement.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
2. src/datapilot/core/platforms/dbt/cli/cli.py:159
  • Draft comment:
    Prompting for token and instance name within the command can block non‐interactive runs. Consider allowing non-interactive mode or validating input before prompting.
  • Reason this comment was not posted:
    Comment was on unchanged code.
3. src/datapilot/cli/decorators.py:42
  • Draft comment:
    The process_config function performs only top‐level substitution of environment variables. If nested config values are expected, consider a recursive approach.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None

Workflow ID: wflow_arSM48XbuHu0MEkl

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

# Set defaults if nothing was provided
ctx.obj.setdefault("token", None)
ctx.obj.setdefault("instance_name", None)
ctx.obj.setdefault("backend_url", "https://api.myaltimate.com")
Copy link

Choose a reason for hiding this comment

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

Avoid using a magic string for the backend URL default. Consider defining a constant to improve maintainability.

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed 34a829c in 23 seconds. Click for details.
  • Reviewed 14 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. src/datapilot/cli/decorators.py:62
  • Draft comment:
    Removed unused 'config_mapping' variable; cleanup improves clarity.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None

Workflow ID: wflow_JX07SOD8T1NT3exw

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed 6b4334b in 2 minutes and 2 seconds. Click for details.
  • Reviewed 154 lines of code in 4 files
  • Skipped 0 files when reviewing.
  • Skipped posting 5 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. src/datapilot/cli/decorators.py:82
  • Draft comment:
    Redundant default assignment: Lines setting final_token/instance_name to None are unnecessary since they already hold None if not provided.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
2. src/datapilot/cli/decorators.py:74
  • Draft comment:
    Consider using a truthiness check instead of explicit 'is None' for CLI parameters. An empty string ("") would bypass the file config merge even if it should be considered absent.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
3. src/datapilot/cli/main.py:11
  • Draft comment:
    Removal of click.pass_context simplifies the command signature; ensure that no essential context data is lost.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
4. src/datapilot/core/knowledge/cli.py:20
  • Draft comment:
    Replacing ctx.exit(1) with raise click.Abort() is acceptable; ensure that the behavior (exit code and error messaging) is as intended.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
5. src/datapilot/core/platforms/dbt/cli/cli.py:153
  • Draft comment:
    For the onboard command, when prompting for the API Token, consider adding hide_input=True to prevent echoing sensitive input.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.

Workflow ID: wflow_98rzUAe9fops6LiM

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Caution

Changes requested ❌

Reviewed ee8d1a5 in 1 minute and 8 seconds. Click for details.
  • Reviewed 13 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.

Workflow ID: wflow_5aWxQ539f0sHBnxW

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed ace1521 in 44 seconds. Click for details.
  • Reviewed 13 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. src/datapilot/core/knowledge/cli.py:24
  • Draft comment:
    Raising click.Abort is more explicit than returning, ensuring a non-zero exit. Confirm this is the intended behavior for signaling an error.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.

Workflow ID: wflow_lKyMmA5CUnB5sLaC

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@mdesmet mdesmet merged commit 249d093 into main Jun 12, 2025
39 checks passed
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.

3 participants