diff --git a/.github/actions/setup_environment/action.yml b/.github/actions/setup_environment/action.yml index 7c11084286b..a55c6213f8f 100644 --- a/.github/actions/setup_environment/action.yml +++ b/.github/actions/setup_environment/action.yml @@ -66,11 +66,11 @@ runs: id: cache-virtualenv with: requirement_files: pyproject.toml - # The virtualenv cache is invalidated when: - # - manually triggered by means of a custom cache version token - # - on a weekly basis - # - any of the integration requirements change (a hash of the - # __init__.py files is included in the cache key) + # The virtualenv cache is invalidated when: + # - manually triggered by means of a custom cache version token + # - on a weekly basis + # - any of the integration requirements change (a hash of the + # __init__.py files is included in the cache key) custom_cache_key_element: ${{ inputs.cache_version }}-${{steps.date.outputs.week}}-${{inputs.install_integrations}}-${{ hashFiles('src/zenml/integrations/*/__init__.py') }} - uses: tespkg/actions-cache@v1 @@ -99,13 +99,13 @@ runs: details: The custom github runnners cache was missed and failed to restore the cache from minio bucket webhookUrl: ${{ inputs.discord_webhook }} - # Disabled for now because it doesn't work well with multiple parallel jobs - # - uses: syphar/restore-pip-download-cache@v1 - # with: + # Disabled for now because it doesn't work well with multiple parallel jobs + # - uses: syphar/restore-pip-download-cache@v1 + # with: # requirement_files: 'pyproject.toml' # # The pip download cache can be updated on a weekly basis as new packages # # don't appear that often - # custom_cache_key_element: ${{ inputs.cache_version }}-${{ inputs.python-version }}-${{steps.date.outputs.week}} + # custom_cache_key_element: ${{ inputs.cache_version }}-${{ inputs.python-version }}-${{steps.date.outputs.week}} - name: Install Terraform (Windows) if: ${{ inputs.os == 'windows-latest' }} shell: bash @@ -117,16 +117,6 @@ runs: brew tap hashicorp/tap brew install hashicorp/tap/terraform - name: Install ZenML and dependencies - if: steps.cache-virtualenv.outputs.cache-hit != 'true' && steps.custom-cache-pip.outputs.cache-hit - != 'true' - shell: bash - run: | - scripts/install-zenml-dev.sh --integrations ${{ inputs.install_integrations }} - - # if using a cached virtualenv, just refresh the ZenML installation - - name: Refresh ZenML installation - if: steps.cache-virtualenv.outputs.cache-hit == 'true' || steps.custom-cache-pip.outputs.cache-hit - == 'true' shell: bash run: | scripts/install-zenml-dev.sh --integrations ${{ inputs.install_integrations }} diff --git a/scripts/install-zenml-dev.sh b/scripts/install-zenml-dev.sh index ea8c5a6f82e..b224bcee2af 100755 --- a/scripts/install-zenml-dev.sh +++ b/scripts/install-zenml-dev.sh @@ -23,7 +23,12 @@ parse_args () { install_zenml() { # install ZenML in editable mode - pip install -e .[server,templates,terraform,secrets-aws,secrets-gcp,secrets-azure,secrets-hashicorp,s3fs,gcsfs,adlfs,dev,mlstacks] + + touch zenml_requirements.txt + echo "-e .[server,templates,terraform,secrets-aws,secrets-gcp,secrets-azure,secrets-hashicorp,s3fs,gcsfs,adlfs,dev,mlstacks]" >> zenml_requirements.txt + + pip install -r zenml_requirements.txt + rm zenml_requirements.txt } install_integrations() { @@ -52,9 +57,18 @@ install_integrations() { # pin pyyaml>=6.0.1 echo "" >> integration-requirements.txt echo "pyyaml>=6.0.1" >> integration-requirements.txt + echo "pyopenssl" >> integration-requirements.txt + echo "-e .[server,templates,terraform,secrets-aws,secrets-gcp,secrets-azure,secrets-hashicorp,s3fs,gcsfs,adlfs,dev,mlstacks]" >> integration-requirements.txt + cp integration-requirements.txt integration-requirements.in + + pip install uv - pip install -r integration-requirements.txt + uv pip compile integration-requirements.in -o integration-requirements-compiled.txt + + pip install -r integration-requirements-compiled.txt rm integration-requirements.txt + rm integration-requirements.in + rm integration-requirements-compiled.txt # install langchain separately zenml integration install -y langchain @@ -64,15 +78,19 @@ install_integrations() { set -x set -e +export ZENML_DEBUG=1 +export ZENML_ANALYTICS_OPT_IN=false + parse_args "$@" -python -m pip install --upgrade pip +python -m pip install --upgrade pip setuptools wheel install_zenml # install integrations, if requested if [ "$INTEGRATIONS" = yes ]; then install_integrations + # refresh the ZenML installation after installing integrations install_zenml fi diff --git a/scripts/run-ci-checks.sh b/scripts/run-ci-checks.sh index 89f066d240d..9df05f8ecae 100755 --- a/scripts/run-ci-checks.sh +++ b/scripts/run-ci-checks.sh @@ -2,6 +2,9 @@ set -e set -x +export ZENML_DEBUG=1 +export ZENML_ANALYTICS_OPT_IN=false + scripts/lint.sh scripts/check-spelling.sh -scripts/docstring.sh \ No newline at end of file +scripts/docstring.sh