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

refactor: update environment variable from PANDASAI_API_KEY to PANDABI_API_KEY and from PANDASAI_API_URL to PANDABI_API_URL #1511

Merged
merged 2 commits into from
Jan 12, 2025

Conversation

scaliseraoul
Copy link
Contributor

@scaliseraoul scaliseraoul commented Jan 12, 2025

refactor: update environment variable from PANDASAI_API_KEY to PANDABI_API_KEY and from PANDASAI_API_URL to PANDABI_API_URL 9ceaca1
chore: fixing ruff formatting issues in core/response and dataframe/base.py f2de6d9

Renamed all instances of "your-api-key" to "YOUR-PANDABI_API_KEY" for consistency.
Documentation in docs/v2 was kept unchanged for backwards compatibility.


Important

Renamed environment variables for API key and URL across the codebase and fixed formatting issues in two files.

  • Environment Variables:
    • Renamed PANDASAI_API_KEY to PANDABI_API_KEY and PANDASAI_API_URL to PANDABI_API_URL in pandasai/__init__.py, pandasai/agent/base.py, and pandasai/config.py.
    • Updated examples and tests to reflect the new environment variable names.
  • Code Formatting:
    • Fixed ruff formatting issues in pandasai/core/response/__init__.py and pandasai/dataframe/base.py.

This description was created by Ellipsis for 9ceaca1. It will automatically update as commits are pushed.

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jan 12, 2025
Copy link
Contributor

@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.

👍 Looks good to me! Reviewed everything up to 9ceaca1 in 1 minute and 1 seconds

More details
  • Looked at 623 lines of code in 33 files
  • Skipped 0 files when reviewing.
  • Skipped posting 5 drafted comments based on config settings.
1. tests/unit_tests/dataframe/test_dataframe.py:45
  • Draft comment:
    The mock environment variable should be updated to PANDABI_API_URL to match the refactored environment variable name.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The refactoring of environment variables from PANDASAI_API_KEY to PANDABI_API_KEY and PANDASAI_API_URL to PANDABI_API_URL is consistent throughout the codebase. However, there is a minor issue in the test file where the mock environment variable is not updated to the new variable name.
2. pandasai/__init__.py:102
  • Draft comment:
                "Please set the PANDABI_API_URL and PANDABI_API_KEY environment variables to access the dataset from the remote server."
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
3. pandasai/dataframe/base.py:240
  • Draft comment:
                "Please save the dataset before pushing it to the remote server."
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable:
    While the suggested change does make the error message slightly more grammatically complete, the original message is perfectly clear and understandable. The addition of "it" is such a minor change that it doesn't significantly improve clarity or understanding. This feels like an unnecessarily nitpicky comment that doesn't add meaningful value.
    The comment does technically improve the grammar. And since one of the additional rules is to correct grammar errors, maybe we should keep it?
    The original grammar isn't actually incorrect - it's just slightly less explicit. The improvement is so minor that it doesn't warrant a code change and review cycle.
    This comment should be removed as it suggests an extremely minor grammatical change that doesn't meaningfully improve the error message's clarity or correctness.
4. pandasai/dataframe/base.py:281
  • Draft comment:
                "Set the PANDABI_API_URL and PANDABI_API_KEY in the environment to pull the dataset from the remote server."
  • Reason this comment was not posted:
    Marked as duplicate.
5. pandasai/helpers/request.py:109
  • Draft comment:
            "Set the PANDABI_API_URL and PANDABI_API_KEY in the environment to push/pull datasets to/from the remote server."
  • Reason this comment was not posted:
    Marked as duplicate.

Workflow ID: wflow_Rh94j13gYJyj3NwY


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@gventuri
Copy link
Collaborator

@scaliseraoul great job and congrats for submitting your first PR 🚀

@gventuri gventuri merged commit 184d1d9 into sinaptik-ai:release/v3 Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants