diff --git a/.github/workflows/codespell.yml b/.github/workflows/_codespell.yml similarity index 67% rename from .github/workflows/codespell.yml rename to .github/workflows/_codespell.yml index a5a63b99..fc81ef7a 100644 --- a/.github/workflows/codespell.yml +++ b/.github/workflows/_codespell.yml @@ -1,11 +1,13 @@ --- -name: CI / cd . / make spell_check +name: make spell_check on: - push: - branches: [master] - pull_request: - branches: [master] + workflow_call: + inputs: + working-directory: + required: true + type: string + description: "From which folder this pipeline executes" permissions: contents: read @@ -24,9 +26,10 @@ jobs: pip install toml - name: Extract Ignore Words List + working-directory: ${{ inputs.working-directory }} run: | # Use a Python script to extract the ignore words list from pyproject.toml - python .github/workflows/extract_ignored_words_list.py + python ../../.github/workflows/extract_ignored_words_list.py id: extract_ignore_words - name: Codespell diff --git a/.github/workflows/_release.yml b/.github/workflows/_release.yml index e9f7421b..089de755 100644 --- a/.github/workflows/_release.yml +++ b/.github/workflows/_release.yml @@ -20,8 +20,7 @@ env: jobs: build: - if: github.ref == 'refs/heads/master' - environment: Scheduled testing + if: github.ref == 'refs/heads/main' runs-on: ubuntu-latest outputs: @@ -268,4 +267,4 @@ jobs: draft: false generateReleaseNotes: true tag: ${{ inputs.working-directory }}/v${{ needs.build.outputs.version }} - commit: master + commit: main diff --git a/.github/workflows/_test_release.yml b/.github/workflows/_test_release.yml index 035158bf..f49e5051 100644 --- a/.github/workflows/_test_release.yml +++ b/.github/workflows/_test_release.yml @@ -14,7 +14,7 @@ env: jobs: build: - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' runs-on: ubuntu-latest outputs: diff --git a/.github/workflows/check_diffs.yml b/.github/workflows/check_diffs.yml index 9a2e11dd..049b993a 100644 --- a/.github/workflows/check_diffs.yml +++ b/.github/workflows/check_diffs.yml @@ -3,7 +3,7 @@ name: CI on: push: - branches: [master] + branches: [main] pull_request: # If another push to the same PR or branch happens while this workflow is still running, @@ -31,6 +31,16 @@ jobs: python .github/scripts/check_diff.py ${{ steps.files.outputs.all }} >> $GITHUB_OUTPUT outputs: dirs-to-run: ${{ steps.set-matrix.outputs.dirs-to-run }} + codespell: + name: cd ${{ matrix.working-directory }} + needs: [build] + strategy: + matrix: + working-directory: ${{ fromJson(needs.build.outputs.dirs-to-run) }} + uses: ./.github/workflows/_codespell.yml + with: + working-directory: ${{ matrix.working-directory }} + ci: name: cd ${{ matrix.working-directory }} needs: [ build ] @@ -40,5 +50,3 @@ jobs: uses: ./.github/workflows/_all_ci.yml with: working-directory: ${{ matrix.working-directory }} - - diff --git a/libs/genai/Makefile b/libs/genai/Makefile index 132eb9eb..f11f5204 100644 --- a/libs/genai/Makefile +++ b/libs/genai/Makefile @@ -26,7 +26,7 @@ integration_tests: PYTHON_FILES=. MYPY_CACHE=.mypy_cache lint format: PYTHON_FILES=. -lint_diff format_diff: PYTHON_FILES=$(shell git diff --name-only --diff-filter=d master | grep -E '\.py$$|\.ipynb$$') +lint_diff format_diff: PYTHON_FILES=$(shell git diff --name-only --diff-filter=d main | grep -E '\.py$$|\.ipynb$$') lint_package: PYTHON_FILES=langchain_google_genai lint_tests: PYTHON_FILES=tests lint_tests: MYPY_CACHE=.mypy_cache_test diff --git a/libs/vertexai/Makefile b/libs/vertexai/Makefile index 29214d4b..70fd5125 100644 --- a/libs/vertexai/Makefile +++ b/libs/vertexai/Makefile @@ -23,7 +23,7 @@ tests: PYTHON_FILES=. MYPY_CACHE=.mypy_cache lint format: PYTHON_FILES=. -lint_diff format_diff: PYTHON_FILES=$(shell git diff --relative=libs/partners/google-vertexai --name-only --diff-filter=d master | grep -E '\.py$$|\.ipynb$$') +lint_diff format_diff: PYTHON_FILES=$(shell git diff --relative=libs/partners/google-vertexai --name-only --diff-filter=d main | grep -E '\.py$$|\.ipynb$$') lint_package: PYTHON_FILES=langchain_google_vertexai lint_tests: PYTHON_FILES=tests lint_tests: MYPY_CACHE=.mypy_cache_test diff --git a/libs/vertexai/tests/integration_tests/test_chat_models.py b/libs/vertexai/tests/integration_tests/test_chat_models.py index 33853310..53c391fe 100644 --- a/libs/vertexai/tests/integration_tests/test_chat_models.py +++ b/libs/vertexai/tests/integration_tests/test_chat_models.py @@ -91,7 +91,7 @@ def test_vertexai_stream(model_name: str) -> None: def test_vertexai_single_call_with_context() -> None: model = ChatVertexAI() raw_context = ( - "My name is Ned. You are my personal assistant. My favorite movies " + "My name is Peter. You are my personal assistant. My favorite movies " "are Lord of the Rings and Hobbit." ) question = ( @@ -154,7 +154,7 @@ def test_multimodal_history() -> None: def test_vertexai_single_call_with_examples() -> None: model = ChatVertexAI() - raw_context = "My name is Ned. You are my personal assistant." + raw_context = "My name is Peter. You are my personal assistant." question = "2+2" text_question, text_answer = "4+4", "8" inp = HumanMessage(content=text_question) diff --git a/libs/vertexai/tests/unit_tests/test_chat_models.py b/libs/vertexai/tests/unit_tests/test_chat_models.py index f24f418b..7e22af52 100644 --- a/libs/vertexai/tests/unit_tests/test_chat_models.py +++ b/libs/vertexai/tests/unit_tests/test_chat_models.py @@ -111,7 +111,7 @@ def test_vertexai_args_passed(stop: Optional[str]) -> None: def test_parse_chat_history_correct() -> None: text_context = ( - "My name is Ned. You are my personal assistant. My " + "My name is Peter. You are my personal assistant. My " "favorite movies are Lord of the Rings and Hobbit." ) context = SystemMessage(content=text_context)