-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
fix(test_cases): test cases for pandas 3.0 #1506
Changes from 56 commits
e19da71
48664d7
c4478b5
30b2fa7
f32bd0d
719043c
437f949
27cb449
0e4e1d0
b809841
34535a2
68b6557
daf5696
d63f918
63df017
cfeb071
554a638
cf33faa
f17fcea
52b04aa
6afb61d
28bb719
0be115f
58fcff7
b47f79e
ebb83a5
967118a
dd61ab8
07ce3cc
b5e6a58
ffe986c
c2d6081
eb41a18
1afd565
b183fac
eac2c21
4d5f54c
b2ded79
466b079
575f852
0c6e5ce
9a29b78
65cd422
2cd2353
def1433
ee62baf
0958749
bcec071
2da1398
7570c2b
f2f15ce
f8e5f23
59b42ed
7e207eb
3982c45
ecafc64
64e51e3
4d84252
ea9a37d
7c4119b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ jobs: | |
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install Poetry (Unix) | ||
if: matrix.os != 'windows-latest' | ||
run: | | ||
|
@@ -37,90 +38,90 @@ jobs: | |
run: pip wheel --use-pep517 "future==0.18.3" | ||
- name: Install dependencies | ||
run: poetry install --all-extras --with dev --verbose | ||
- name: Install extension dependencies | ||
- name: Lint with ruff | ||
run: make format_diff | ||
- name: Spellcheck | ||
run: make spell_check | ||
- name: Run core tests | ||
run: make test_core | ||
|
||
# Install dependencies, test, and remove for each extension | ||
- name: Install and test LLM extensions (Unix) | ||
if: matrix.os != 'windows-latest' | ||
run: | | ||
# Install LLM extension dependencies | ||
for dir in extensions/llms/*/; do | ||
find extensions/llms -mindepth 1 -type d | while read -r dir; do | ||
if [ -f "$dir/pyproject.toml" ]; then | ||
echo "Installing dependencies for $dir" | ||
cd "$dir" | ||
poetry install --all-extras --with dev | ||
cd - | ||
( | ||
cd "$dir" || exit | ||
poetry install --all-extras | ||
poetry add [email protected] | ||
poetry add [email protected] | ||
poetry add [email protected] | ||
) | ||
echo "Running tests for $dir" | ||
( | ||
cd "$dir" || exit | ||
poetry run pytest tests/ | ||
) | ||
fi | ||
done | ||
|
||
# Install connector extension dependencies | ||
for dir in extensions/connectors/*/; do | ||
- name: Install and test Connector extensions (Unix) | ||
if: matrix.os != 'windows-latest' | ||
run: | | ||
find extensions/connectors -mindepth 1 -type d | while read -r dir; do | ||
if [ -f "$dir/pyproject.toml" ]; then | ||
echo "Installing dependencies for $dir" | ||
cd "$dir" | ||
poetry install --all-extras --with dev | ||
cd - | ||
( | ||
cd "$dir" || exit | ||
poetry install --all-extras | ||
poetry add [email protected] | ||
poetry add [email protected] | ||
poetry add [email protected] | ||
) | ||
echo "Running tests for $dir" | ||
( | ||
cd "$dir" || exit | ||
poetry run pytest tests/ | ||
) | ||
fi | ||
done | ||
|
||
# Install enterprise extension dependencies | ||
for dir in extensions/ee/*/*/; do | ||
- name: Install and test Enterprise extensions (Unix) | ||
if: matrix.os != 'windows-latest' | ||
run: | | ||
find extensions/ee -mindepth 1 -type d | while read -r dir; do | ||
if [ -f "$dir/pyproject.toml" ]; then | ||
echo "Installing dependencies for $dir" | ||
cd "$dir" | ||
poetry install --all-extras --with dev | ||
cd - | ||
( | ||
cd "$dir" || exit | ||
poetry install --all-extras | ||
poetry add [email protected] | ||
poetry add [email protected] | ||
poetry add [email protected] | ||
) | ||
echo "Running tests for $dir" | ||
( | ||
cd "$dir" || exit | ||
poetry run pytest tests/ | ||
) | ||
fi | ||
done | ||
- name: Install extension dependencies (Windows) | ||
if: matrix.os == 'windows-latest' | ||
run: | | ||
# Install LLM extension dependencies | ||
Get-ChildItem -Path extensions/llms -Directory | ForEach-Object { | ||
$projFile = Join-Path $_.FullName "pyproject.toml" | ||
if (Test-Path $projFile) { | ||
Write-Host "Installing dependencies for $_" | ||
Push-Location $_.FullName | ||
poetry install --all-extras --with dev | ||
Pop-Location | ||
} | ||
} | ||
|
||
# Install connector extension dependencies | ||
Get-ChildItem -Path extensions/connectors -Directory | ForEach-Object { | ||
$projFile = Join-Path $_.FullName "pyproject.toml" | ||
if (Test-Path $projFile) { | ||
Write-Host "Installing dependencies for $_" | ||
Push-Location $_.FullName | ||
poetry install --all-extras --with dev | ||
Pop-Location | ||
} | ||
} | ||
|
||
# Install enterprise extension dependencies | ||
Get-ChildItem -Path extensions/ee -Recurse -Directory -Depth 2 | ForEach-Object { | ||
$projFile = Join-Path $_.FullName "pyproject.toml" | ||
if (Test-Path $projFile) { | ||
Write-Host "Installing dependencies for $_" | ||
Push-Location $_.FullName | ||
poetry install --all-extras --with dev | ||
Pop-Location | ||
} | ||
} | ||
- name: Lint with ruff | ||
run: make format_diff | ||
- name: Spellcheck | ||
run: make spell_check | ||
- name: Run core tests | ||
run: make test_core | ||
- name: Run extension tests | ||
if: matrix.os != 'windows-latest' | ||
run: make test_extensions | ||
- name: Run extension tests (Windows) | ||
if: matrix.os == 'windows-latest' | ||
run: | | ||
# Run LLM extension tests | ||
Get-ChildItem -Path extensions/llms -Directory | ForEach-Object { | ||
$testDir = Join-Path $_.FullName "tests" | ||
if (Test-Path $testDir) { | ||
Write-Host "Running tests for $_" | ||
Write-Host "Running tests for $($_.FullName)" | ||
Push-Location $_.FullName | ||
poetry install --all-extras | ||
poetry add [email protected] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The repeated addition of |
||
poetry add [email protected] | ||
poetry add [email protected] | ||
poetry run pytest tests/ | ||
Pop-Location | ||
} | ||
|
@@ -130,8 +131,12 @@ jobs: | |
Get-ChildItem -Path extensions/connectors -Directory | ForEach-Object { | ||
$testDir = Join-Path $_.FullName "tests" | ||
if (Test-Path $testDir) { | ||
Write-Host "Running tests for $_" | ||
Write-Host "Running tests for $($_.FullName)" | ||
Push-Location $_.FullName | ||
poetry install --all-extras | ||
poetry add [email protected] | ||
poetry add [email protected] | ||
poetry add [email protected] | ||
poetry run pytest tests/ | ||
Pop-Location | ||
} | ||
|
@@ -141,8 +146,12 @@ jobs: | |
Get-ChildItem -Path extensions/ee -Recurse -Directory -Depth 2 | ForEach-Object { | ||
$testDir = Join-Path $_.FullName "tests" | ||
if (Test-Path $testDir) { | ||
Write-Host "Running tests for $_" | ||
Write-Host "Running tests for $($_.FullName)" | ||
Push-Location $_.FullName | ||
poetry install --all-extras | ||
poetry add [email protected] | ||
poetry add [email protected] | ||
poetry add [email protected] | ||
poetry run pytest tests/ | ||
Pop-Location | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,9 +9,9 @@ all: help ## default target executed when no arguments are given to make | |
UNIT_TESTS_DIR ?= tests/unit_tests/ | ||
INTEGRATION_TESTS_DIR ?= tests/integration_tests/ | ||
|
||
setup_python: ## ensure we're using Python 3.10 | ||
@echo "Setting up Python 3.10..." | ||
poetry env use python3.10 | ||
# setup_python: ## ensure we're using Python 3.10 | ||
# @echo "Setting up Python 3.10..." | ||
# poetry env use python3.10 | ||
|
||
install_deps: setup_python ## install core dependencies | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
@echo "Installing core dependencies..." | ||
|
@@ -26,23 +26,23 @@ install_extension_deps: setup_python ## install all extension dependencies | |
@for dir in extensions/llms/*/; do \ | ||
if [ -f "$$dir/pyproject.toml" ]; then \ | ||
echo "Installing dependencies for $$dir"; \ | ||
cd "$$dir" && poetry env use python3.10 && poetry install --all-extras --with test && cd - || exit 1; \ | ||
cd "$$dir" && poetry install --all-extras --with test && cd - || exit 1; \ | ||
fi \ | ||
done | ||
|
||
@echo "Installing connector extension dependencies..." | ||
@for dir in extensions/connectors/*/; do \ | ||
if [ -f "$$dir/pyproject.toml" ]; then \ | ||
echo "Installing dependencies for $$dir"; \ | ||
cd "$$dir" && poetry env use python3.10 && poetry install --all-extras --with test && cd - || exit 1; \ | ||
cd "$$dir" && poetry install --all-extras --with test && cd - || exit 1; \ | ||
fi \ | ||
done | ||
|
||
@echo "Installing enterprise extension dependencies..." | ||
@for dir in extensions/ee/*/*/; do \ | ||
if [ -f "$$dir/pyproject.toml" ]; then \ | ||
echo "Installing dependencies for $$dir"; \ | ||
cd "$$dir" && poetry env use python3.10 && poetry install --all-extras --with test && cd - || exit 1; \ | ||
cd "$$dir" && poetry install --all-extras --with test && cd - || exit 1; \ | ||
fi \ | ||
done | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,19 +8,19 @@ | |
[![Downloads](https://static.pepy.tech/badge/pandasai)](https://pepy.tech/project/pandasai) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) | ||
[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1ZnO-njhL7TBOYPZaqvMvGtsjckZKrv2E?usp=sharing) | ||
|
||
PandasAI is a Python platform that makes it easy to ask questions to your data in natural language. It helps non-technical users to interact with their data in a more natural way, and it helps technical users to save time and effort when working with data. | ||
PandasAI is a Python platform that makes it easy to ask questions to your data in natural language. It helps non-technical users to interact with their data in a more natural way, and it helps technical users to save time, and effort when working with data. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ArslanSaleem this new punctuation seems to be incorrect There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes looking at the test extension deps not getting installed in github flow |
||
|
||
# 🚀 Deploying PandasAI | ||
|
||
PandasAI can be used in a variety of ways. You can easily use it in your Jupyter notebooks or streamlit apps, or you can deploy it as a REST API such as with FastAPI or Flask. | ||
PandasAI can be used in a variety of ways. You can easily use it in your Jupyter notebooks or Streamlit apps, or you can deploy it as a REST API such as with FastAPI or Flask. | ||
|
||
If you are interested in the managed PandasAI Cloud or our self-hosted Enterprise Offering, [contact us](https://forms.gle/JEUqkwuTqFZjhP7h8). | ||
|
||
# 🔧 Getting started | ||
|
||
You can find the full documentation for PandasAI [here](https://pandas-ai.readthedocs.io/en/latest/). | ||
|
||
You can either decide to use PandasAI in your Jupyter notebooks, streamlit apps, or use the client and server architecture from the repo. | ||
You can either decide to use PandasAI in your Jupyter notebooks, Streamlit apps, or use the client and server architecture from the repo. | ||
|
||
## ☁️ Using the platform | ||
|
||
|
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.
Consider adding pytest dependencies globally once instead of repeating
poetry add [email protected]
,poetry add [email protected]
, andpoetry add [email protected]
in each loop. This will reduce redundancy and improve maintainability.