* Update cognify and the networkx client to prepare for running in Neo4j * Fix for openai model * Add the fix to the infra so that the models can be passed to the library. Enable llm_provider to be passed. * Auto graph generation now works with neo4j * Added fixes for both neo4j and networkx * Explicitly name semantic node connections * Added updated docs, readme, chunkers and updates to cognify * Make docs build trigger only when changes on it happen * Update docs, test git actions * Separate cognify logic into tasks * Introduce dspy knowledge graph extraction --------- Co-authored-by: Boris Arzentar <borisarzentar@gmail.com>
165 lines
No EOL
5.1 KiB
YAML
165 lines
No EOL
5.1 KiB
YAML
name: common | common
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
- devel
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
env:
|
|
RUNTIME__LOG_LEVEL: ERROR
|
|
|
|
jobs:
|
|
get_docs_changes:
|
|
name: docs changes
|
|
uses: ./.github/workflows/get_docs_changes.yml
|
|
|
|
run_common:
|
|
name: test
|
|
needs: get_docs_changes
|
|
if: needs.get_docs_changes.outputs.changes_outside_docs == 'true'
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
|
|
python-version: ["3.11.x"]
|
|
# Test all python versions on ubuntu only
|
|
include:
|
|
- python-version: "3.10.x"
|
|
os: "ubuntu-latest"
|
|
- python-version: "3.12.x"
|
|
os: "ubuntu-latest"
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
- name: Check out
|
|
uses: actions/checkout@master
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- name: Install tzdata on windows
|
|
run: |
|
|
cd %USERPROFILE%
|
|
curl https://data.iana.org/time-zones/releases/tzdata2021e.tar.gz --output tzdata.tar.gz
|
|
mkdir tzdata
|
|
tar --extract --file tzdata.tar.gz --directory tzdata
|
|
mkdir %USERPROFILE%\Downloads\tzdata
|
|
copy tzdata %USERPROFILE%\Downloads\tzdata
|
|
curl https://raw.githubusercontent.com/unicode-org/cldr/master/common/supplemental/windowsZones.xml --output %USERPROFILE%\Downloads\tzdata\windowsZones.xml
|
|
if: runner.os == 'Windows'
|
|
shell: cmd
|
|
|
|
- name: Install Poetry
|
|
# https://github.com/snok/install-poetry#running-on-windows
|
|
uses: snok/install-poetry@v1.3.2
|
|
with:
|
|
virtualenvs-create: true
|
|
virtualenvs-in-project: true
|
|
installer-parallel: true
|
|
|
|
- name: Install dependencies
|
|
env:
|
|
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
|
QDRANT_API_KEY: ${{ secrets.QDRANT_API_KEY }}
|
|
QDRANT_API_URL: ${{ secrets.QDRANT_API_URL }}
|
|
run: poetry install --no-interaction
|
|
- name: Build with Poetry
|
|
run: poetry build
|
|
- name: Install Package
|
|
run: |
|
|
cd dist
|
|
pip install *.whl
|
|
|
|
- name: Download NLTK Punkt Tokenizer Models
|
|
run: |
|
|
python -m nltk.downloader punkt
|
|
python -m nltk.downloader stopwords
|
|
python -m nltk.downloader wordnet
|
|
python -m nltk.downloader averaged_perceptron_tagger
|
|
- name: Run test script
|
|
env:
|
|
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
|
QDRANT_API_KEY: ${{ secrets.QDRANT_API_KEY }}
|
|
QDRANT_API_URL: ${{ secrets.QDRANT_API_URL }}
|
|
run: poetry run python ./cognee/tests/test_library.py
|
|
- run: |
|
|
poetry run
|
|
if: runner.os != 'Windows'
|
|
name: Run common tests with minimum dependencies Linux/MAC
|
|
env:
|
|
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
|
QDRANT_API_KEY: ${{ secrets.QDRANT_API_KEY }}
|
|
QDRANT_API_URL: ${{ secrets.QDRANT_API_URL }}
|
|
- run: |
|
|
poetry run python ./cognee/tests/test_library.py
|
|
if: runner.os == 'Windows'
|
|
name: Run common tests with minimum dependencies Windows
|
|
env:
|
|
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
|
QDRANT_API_KEY: ${{ secrets.QDRANT_API_KEY }}
|
|
QDRANT_API_URL: ${{ secrets.QDRANT_API_URL }}
|
|
shell: cmd
|
|
|
|
- name: Install dependencies
|
|
run: poetry install --no-interaction
|
|
|
|
- name: Build with Poetry
|
|
run: poetry build
|
|
|
|
- name: Install Package
|
|
run: |
|
|
cd dist
|
|
pip install *.whl
|
|
|
|
- name: Download NLTK Punkt Tokenizer Models
|
|
run: |
|
|
python -m nltk.downloader punkt
|
|
- run: |
|
|
poetry run python ./cognee/tests/test_library.py
|
|
if: runner.os != 'Windows'
|
|
name: Run pipeline smoke tests with minimum deps Linux/MAC
|
|
env:
|
|
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
|
QDRANT_API_KEY: ${{ secrets.QDRANT_API_KEY }}
|
|
QDRANT_API_URL: ${{ secrets.QDRANT_API_URL }}
|
|
|
|
- name: Download NLTK Punkt Tokenizer Models
|
|
run: |
|
|
python -m nltk.downloader punkt
|
|
- run: |
|
|
poetry run python ./cognee/tests/test_library.py
|
|
if: runner.os == 'Windows'
|
|
name: Run smoke tests with minimum deps Windows
|
|
env:
|
|
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
|
QDRANT_API_KEY: ${{ secrets.QDRANT_API_KEY }}
|
|
QDRANT_API_URL: ${{ secrets.QDRANT_API_URL }}
|
|
shell: cmd
|
|
|
|
|
|
|
|
|
|
|
|
|
|
matrix_job_required_check:
|
|
name: common | common tests
|
|
needs: run_common
|
|
runs-on: ubuntu-latest
|
|
if: always()
|
|
steps:
|
|
- name: Check matrix job results
|
|
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
|
|
run: |
|
|
echo "One or more matrix job tests failed or were cancelled. You may need to re-run them." && exit 1 |