99 branches :
1010 - main
1111 - dev
12- - " 0.3.0"
1312
1413 # Allows you to run this workflow manually from the Actions tab
1514 workflow_dispatch :
@@ -21,17 +20,17 @@ jobs:
2120 matrix :
2221 python-version : ["3.8", "3.9", "3.10", "3.11"]
2322 steps :
24- - uses : actions/checkout@v2
23+ - uses : actions/checkout@v4
2524 - name : Set up Python ${{ matrix.python-version }}
26- uses : actions/setup-python@v2
25+ uses : actions/setup-python@v5
2726 with :
2827 python-version : ${{ matrix.python-version }}
2928
30- - name : Poetry cache
31- uses : actions/cache@v3
32- with :
33- path : ~/.cache/pypoetry
34- key : poetry-cache-${{ runner.os }}-${{ steps.setup_python.outputs .python-version }}-${{ env.POETRY_VERSION }}
29+ # - name: Poetry cache
30+ # uses: actions/cache@v3
31+ # with:
32+ # path: ~/.cache/pypoetry
33+ # key: poetry-cache-${{ runner.os }}-${{ matrix .python-version }}-${{ env.POETRY_VERSION }}
3534
3635 - name : Install Poetry
3736 uses : snok/install-poetry@v1
@@ -53,17 +52,17 @@ jobs:
5352 pydantic-version : ["1.10.9", "2.4.2"]
5453 openai-version : ["0.28.1", "1.2.4"]
5554 steps :
56- - uses : actions/checkout@v2
55+ - uses : actions/checkout@v4
5756 - name : Set up Python ${{ matrix.python-version }}
58- uses : actions/setup-python@v2
57+ uses : actions/setup-python@v5
5958 with :
6059 python-version : ${{ matrix.python-version }}
6160
62- - name : Poetry cache
63- uses : actions/cache@v3
64- with :
65- path : ~/.cache/pypoetry
66- key : poetry-cache-${{ runner.os }}-${{ steps.setup_python.outputs .python-version }}-${{ env.POETRY_VERSION }}-${{ matrix.pydantic-version }}
61+ # - name: Poetry cache
62+ # uses: actions/cache@v3
63+ # with:
64+ # path: ~/.cache/pypoetry
65+ # key: poetry-cache-${{ runner.os }}-${{ matrix .python-version }}-${{ env.POETRY_VERSION }}-${{ matrix.pydantic-version }}
6766
6867 - name : Install Poetry
6968 uses : snok/install-poetry@v1
@@ -75,28 +74,12 @@ jobs:
7574 poetry run pip install pydantic==${{ matrix.pydantic-version }}
7675 poetry run pip install openai==${{ matrix.openai-version }}
7776
78- - if : matrix.pydantic-version == '2.4.2' && matrix.openai-version == '0.28.1'
79- name : Static analysis with pyright (ignoring pydantic v1 and openai v1)
80- run : |
81- make type-pydantic-v2-openai-v0
82-
83- - if : matrix.pydantic-version == '1.10.9' && matrix.openai-version == '0.28.1'
84- name : Static analysis with mypy (ignoring pydantic v2 and openai v1)
85- run : |
86- make type-pydantic-v1-openai-v0
87-
88- - if : matrix.pydantic-version == '2.4.2' && matrix.openai-version == '1.2.4'
89- name : Static analysis with pyright (ignoring pydantic v1 and openai v0)
90- run : |
91- make type-pydantic-v2-openai-v1
92-
93- - if : matrix.pydantic-version == '1.10.9' && matrix.openai-version == '1.2.4'
94- name : Static analysis with mypy (ignoring pydantic v2 and openai v0)
77+ - name : Static analysis with pyright
9578 run : |
96- make type-pydantic-v1-openai-v1
79+ make type
9780
9881 Pytests :
99- runs-on : ubuntu-latest
82+ runs-on : LargeBois
10083 strategy :
10184 matrix :
10285 python-version : ["3.8", "3.9", "3.10", "3.11"]
@@ -106,17 +89,17 @@ jobs:
10689 pydantic-version : ["1.10.9", "2.4.2"]
10790 openai-version : ["0.28.1", "1.2.4"]
10891 steps :
109- - uses : actions/checkout@v2
92+ - uses : actions/checkout@v4
11093 - name : Set up Python ${{ matrix.python-version }}
111- uses : actions/setup-python@v2
94+ uses : actions/setup-python@v5
11295 with :
11396 python-version : ${{ matrix.python-version }}
11497
115- - name : Poetry cache
116- uses : actions/cache@v3
117- with :
118- path : ~/.cache/pypoetry
119- key : poetry-cache-${{ runner.os }}-${{ steps.setup_python.outputs .python-version }}-${{ env.POETRY_VERSION }}-${{ matrix.pydantic-version }}-${{ matrix.openai-version }}
98+ # - name: Poetry cache
99+ # uses: actions/cache@v3
100+ # with:
101+ # path: ~/.cache/pypoetry
102+ # key: poetry-cache-${{ runner.os }}-${{ matrix .python-version }}-${{ env.POETRY_VERSION }}-${{ matrix.pydantic-version }}-${{ matrix.openai-version }}
120103
121104 - name : Install Poetry
122105 uses : snok/install-poetry@v1
@@ -138,51 +121,4 @@ jobs:
138121 file : ./coverage.xml
139122 flags : unittests
140123 name : codecov-umbrella
141- fail_ci_if_error : true
142-
143- Notebooks :
144- runs-on : ubuntu-latest
145- needs : [Linting, Typing, Pytests]
146- strategy :
147- matrix :
148- # this line is automatically generated by the script in .github/workflows/scripts/update_notebook_matrix.sh
149- notebook : ["bug_free_python_code.ipynb","check_for_pii.ipynb","competitors_check.ipynb","extracting_entities.ipynb","generate_structured_data.ipynb","generate_structured_data_cohere.ipynb","guardrails_with_chat_models.ipynb","input_validation.ipynb","llamaindex-output-parsing.ipynb","no_secrets_in_generated_text.ipynb","provenance.ipynb","recipe_generation.ipynb","regex_validation.ipynb","response_is_on_topic.ipynb","secrets_detection.ipynb","select_choice_based_on_action.ipynb","streaming.ipynb","syntax_error_free_sql.ipynb","text_summarization_quality.ipynb","toxic_language.ipynb","translation_to_specific_language.ipynb","translation_with_quality_check.ipynb","valid_chess_moves.ipynb","value_within_distribution.ipynb"]
150- env :
151- COHERE_API_KEY : ${{ secrets.COHERE_API_KEY }}
152- OPENAI_API_KEY : ${{ secrets.OPENAI_API_KEY }}
153- HUGGINGFACE_API_KEY : ${{ secrets.HUGGINGFACE_API_KEY }}
154- NLTK_DATA : /tmp/nltk_data
155- steps :
156- - name : Checkout repository
157- uses : actions/checkout@v2
158- - name : Set up Python
159- uses : actions/setup-python@v4
160- with :
161- python-version : 3.11.x
162- - name : Install Poetry
163- uses : snok/install-poetry@v1
164- with :
165- virtualenvs-create : true
166- virtualenvs-in-project : true
167- installer-parallel : true
168- - name : Load cached venv
169- uses : actions/cache@v3
170- with :
171- path : .venv
172- key : venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
173- - name : Install dependencies
174- run : |
175- make full;
176- poetry add "openai>=1.2.4" jupyter nbconvert cohere;
177- - name : Check for pypdfium2
178- run : poetry run pip show pypdfium2
179- - name : Huggingface Hub Login
180- run : poetry run huggingface-cli login --token $HUGGINGFACE_API_KEY
181- - name : download nltk data
182- run : |
183- mkdir /tmp/nltk_data;
184- poetry run python -m nltk.downloader -d /tmp/nltk_data punkt;
185- - name : Use venv
186- run : source .venv/bin/activate
187- - name : Execute notebooks and check for errors
188- run : bash ./.github/workflows/scripts/run_notebooks.sh ${{ matrix.notebook }}
124+ fail_ci_if_error : true
0 commit comments