Skip to content

Commit

Permalink
v0.10.0 (#10537)
Browse files Browse the repository at this point in the history
  • Loading branch information
nerdai authored Feb 12, 2024
1 parent 4187950 commit 369973f
Show file tree
Hide file tree
Showing 8,424 changed files with 2,275,227 additions and 257,881 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
25 changes: 19 additions & 6 deletions .github/workflows/unit_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,18 @@ env:

jobs:
test:
runs-on: ubuntu-latest
runs-on: ubuntu-latest-unit-tester
strategy:
# You can use PyPy versions in python-version.
# For example, pypy-2.7 and pypy-3.8
matrix:
python-version: ["3.10", "3.9", "3.8"]
python-version: ["3.8", "3.9", "3.10"]
steps:
- name: clear space
env:
CI: true
shell: bash
run: rm -rf /opt/hostedtoolcache/*
- uses: actions/checkout@v3
- name: Set up python ${{ matrix.python-version }}
uses: actions/setup-python@v4
Expand All @@ -27,11 +32,19 @@ jobs:
uses: snok/install-poetry@v1
with:
version: ${{ env.POETRY_VERSION }}
- name: Install deps
shell: bash
run: poetry install --with dev
- uses: pantsbuild/actions/init-pants@v5-scie-pants
with:
# v0 makes it easy to bust the cache if needed
# just increase the integer to start with a fresh cache
gha-cache-key: v0-py${{ matrix.python_version }}
named-caches-hash: ${{ hashFiles('**/pyproject.toml') }}
pants-python-version: ${{ matrix.python-version }}
pants-ci-config: pants.toml
- name: Check BUILD files
run: |
pants tailor --check :: -docs/::
- name: Run testing
env:
CI: true
shell: bash
run: poetry run make test
run: poetry run make -s test
160 changes: 6 additions & 154 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,156 +1,8 @@
llama_index/_static
.DS_Store
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
bin/
build/
develop-eggs/
.pants.d/
dist/
downloads/
eggs/
.eggs/
etc/
include/
lib/
lib64/
parts/
sdist/
share/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
.ruff_cache

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints
notebooks/

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
migration_scripts/
venv/
ENV/
env.bak/
venv.bak/
pyvenv.cfg

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# Jetbrains
.idea
modules/
*.swp

# VsCode
.vscode

# pipenv
Pipfile
Pipfile.lock

# pyright
pyrightconfig.json

# persist dir for chromadb test
/data/
.ipynb_checkpoints
.__pycache__
dev_notebooks/
llamaindex_registry.txt
39 changes: 26 additions & 13 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,30 @@ repos:
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
exclude: llama_index/_static
exclude: llama-index-core/llama_index/core/_static
- id: check-yaml
exclude: llama_index/_static
exclude: llama-index-core/llama_index/core/_static
- id: detect-private-key
- id: end-of-file-fixer
exclude: llama_index/_static
exclude: llama-index-core/llama_index/core/_static
- id: mixed-line-ending
exclude: llama_index/_static
exclude: llama-index-core/llama_index/core/_static
- id: trailing-whitespace
exclude: llama_index/_static
exclude: llama-index-core/llama_index/core/_static
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.1.5

hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
exclude: llama_index/_static
exclude: ".*poetry.lock|.*_static"
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.10.1
hooks:
- id: black-jupyter
name: black-src
alias: black
exclude: ^(docs/|llama_index/_static)
exclude: "^docs|.*poetry.lock|.*_static"
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.0.1
hooks:
Expand All @@ -47,14 +47,17 @@ repos:
"types-PyYAML",
"types-protobuf==4.24.0.4",
]
exclude: ^(docs/|llama_index/_static)
exclude: ^(docs/|llama-index-core/llama_index/core/_static)
args:
[MYPYPATH=llama_index, --namespace-packages, --explicit-package-bases]
entry: bash -c 'cd $GIT_PREFIX'
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.10.1
hooks:
- id: black-jupyter
name: black-docs-py
alias: black
files: docs/
files: ^(docs/|examples/)
# Using PEP 8's line length in docs prevents excess left/right scrolling
args: [--line-length=79]
- repo: https://github.com/adamchainz/blacken-docs
Expand All @@ -71,14 +74,24 @@ repos:
rev: v3.0.3
hooks:
- id: prettier
exclude: llama_index/_static
exclude: llama-index-core/llama_index/core/_static
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
additional_dependencies: [tomli]
exclude: llama_index/_static
args: ["--ignore-words-list", "nin"]
exclude: |
(?x)^(
poetry.lock|
(\/.*?\.[\w:]+)/pyproject.toml|
llama-index-core/llama_index/core/_static
)$
args:
[
"--ignore-words-list",
"astroid,gallary,momento,narl,ot,rouge,nin,gere",
]
entry: bash -c 'cd $GIT_PREFIX'
- repo: https://github.com/srstevenson/nb-clean
rev: 3.1.0
hooks:
Expand All @@ -88,4 +101,4 @@ repos:
rev: v0.23.1
hooks:
- id: toml-sort-fix
exclude: ^(poetry.lock|llama_index/_static)
exclude: ".*poetry.lock|.*_static"
3 changes: 3 additions & 0 deletions BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
poetry_requirements(
name="root",
)
Loading

0 comments on commit 369973f

Please sign in to comment.