diff --git a/.github/workflows/code-embedder-test2.yaml b/.github/workflows/code-embedder-test2.yaml deleted file mode 100644 index 1c363c2..0000000 --- a/.github/workflows/code-embedder-test2.yaml +++ /dev/null @@ -1,41 +0,0 @@ -name: 🪄 Code Embedder Test 2 (example) - -on: push - -permissions: - contents: write - -jobs: - code_embedder: - name: "Code embedder" - runs-on: ubuntu-latest - env: - PYTHON_VERSION: "3.12" - steps: - - name: 🛎️ Checkout - uses: actions/checkout@v4 - # with: - # ref: ${{ github.event.pull_request.head.ref }} - - - name: 🐍 Set up Python ${{ env.PYTHON_VERSION }} - uses: actions/setup-python@v5 - with: - python-version: ${{ env.PYTHON_VERSION }} - - - name: 💾 Setup pip cache - uses: actions/cache@v4 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('uv.lock') }} - - - name: 📥 Install the project - run: | - pip install . - - - name: 🪄 Format comments in code snippets - run: python dev/scripts/format_snippet_prints.py - - - name: Run code embedder - uses: kvankova/code-embedder@v1.1.0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/code-embedder.yaml b/.github/workflows/code-embedder.yaml index 66f69c9..fefd611 100644 --- a/.github/workflows/code-embedder.yaml +++ b/.github/workflows/code-embedder.yaml @@ -1,30 +1,27 @@ name: 🪄 Code Embedder -on: [push, pull_request] +on: + push: + branches: + - main + pull_request: + branches: + - main permissions: contents: write jobs: code_embedder: - name: "Code embedder" runs-on: ubuntu-latest env: PYTHON_VERSION: "3.12" - UV_SYSTEM_PYTHON: 1 - steps: - name: 🛎️ Checkout uses: actions/checkout@v4 # with: # ref: ${{ github.event.pull_request.head.ref }} - - name: 🐍 Install uv with caching - uses: astral-sh/setup-uv@v3 - with: - enable-cache: true - version: "0.5.4" - - name: 🐍 Set up Python ${{ env.PYTHON_VERSION }} uses: actions/setup-python@v5 with: @@ -35,51 +32,14 @@ jobs: with: path: ~/.cache/pip key: ${{ runner.os }}-pip-${{ hashFiles('uv.lock') }} - restore-keys: ${{ runner.os }}-pip- - name: 📥 Install the project run: | - # uv sync --all-extras --dev - # uv pip install . pip install . - # - name: 🏞️ Activate virtual environment - # run: | - # source .venv/bin/activate - # echo PATH=$PATH >> $GITHUB_ENV - - - name: 🪄 Format comments in code snippets + - name: 🪄 Format print comments in code snippets run: python dev/scripts/format_snippet_prints.py - # - name: 🏞️ Deactivate virtual environment - # run: | - # unset -f pydoc > /dev/null 2>&1 || true - # if ! [ -z "${_OLD_VIRTUAL_PATH:+_}" ] - # then - # PATH="$_OLD_VIRTUAL_PATH" - # export PATH - # unset _OLD_VIRTUAL_PATH - # fi - # if ! [ -z "${_OLD_VIRTUAL_PYTHONHOME+_}" ] - # then - # PYTHONHOME="$_OLD_VIRTUAL_PYTHONHOME" - # export PYTHONHOME - # unset _OLD_VIRTUAL_PYTHONHOME - # fi - # hash -r 2> /dev/null - # if ! [ -z "${_OLD_VIRTUAL_PS1+_}" ] - # then - # PS1="$_OLD_VIRTUAL_PS1" - # export PS1 - # unset _OLD_VIRTUAL_PS1 - # fi - # unset VIRTUAL_ENV - # unset VIRTUAL_ENV_PROMPT - # if [ ! "${1-}" = "nondestructive" ] - # then - # unset -f deactivate - # fi - - name: 📝 Run code embedder uses: kvankova/code-embedder@v1.1.0 env: diff --git a/dev/readme_snippets/raw/features_demo.py b/dev/readme_snippets/raw/features_demo.py index 150e8af..b421309 100644 --- a/dev/readme_snippets/raw/features_demo.py +++ b/dev/readme_snippets/raw/features_demo.py @@ -42,3 +42,5 @@ type NestedDict[K, V] = dict[K, NestedDictNode[K, V]] type NestedDictNode[K, V] = V | NestedDict[K, V] # Similar types for Mapping and MutableMapping + +print("This is a new lines!") # hihi