Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into merge/1.88.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcphers committed Apr 16, 2024
2 parents 17d78b7 + 0adde7f commit 9fcc197
Show file tree
Hide file tree
Showing 596 changed files with 7,369 additions and 6,333 deletions.
77 changes: 35 additions & 42 deletions .github/workflows/positron-python-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ env:
NODE_VERSION: '18.17.1'
PYTHON_VERSION: '3.10'
PROJECT_DIR: 'extensions/positron-python'
PYTHON_SRC_DIR: 'extensions/positron-python/pythonFiles'
PYTHON_SRC_DIR: 'extensions/positron-python/python_files'
# Force a path with spaces and to test extension works in these scenarios
# Unicode characters are causing 2.7 failures so skip that for now.
special-working-directory: './path with spaces'
Expand Down Expand Up @@ -67,16 +67,11 @@ jobs:
- name: Check TypeScript format
run: yarn format-check

- name: Check Python format
run: |
python -m pip install -U black
python -m black . --check
working-directory: ${{ env.PYTHON_SRC_DIR }}

- name: Run Ruff
- name: Lint and Check Formatting with Ruff
run: |
python -m pip install -U ruff
python -m ruff check .
python -m ruff format --check
working-directory: ${{ env.PYTHON_SRC_DIR }}

check-types:
Expand All @@ -93,16 +88,16 @@ jobs:
cache: 'pip'

- name: Install base Python requirements
run: 'python -m pip install --no-deps --require-hashes --only-binary :all: -t ./pythonFiles/lib/python --no-cache-dir --implementation py -r requirements.txt'
run: 'python -m pip install --no-deps --require-hashes --only-binary :all: -t ./python_files/lib/python --no-cache-dir --implementation py -r requirements.txt'

- name: Install Positron IPyKernel requirements
run: python scripts/vendor.py

- name: Install other Python requirements
run: |
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade --pre debugpy
python -m pip --disable-pip-version-check install -t ./python_files/lib/python --no-cache-dir --implementation py --no-deps --upgrade --pre debugpy
python -m pip install --upgrade -r build/test-requirements.txt
python -m pip install --upgrade -r ./pythonFiles/positron/pinned-test-requirements.txt
python -m pip install --upgrade -r ./python_files/positron/pinned-test-requirements.txt
- name: Run Pyright
uses: jakebailey/pyright-action@v2
Expand Down Expand Up @@ -169,13 +164,13 @@ jobs:
run: python -m pytest --version

- name: Install base Python requirements
run: 'python -m pip install --no-deps --require-hashes --only-binary :all: -t ./pythonFiles/lib/python --no-cache-dir --implementation py -r requirements.txt'
run: 'python -m pip install --no-deps --require-hashes --only-binary :all: -t ./python_files/lib/python --no-cache-dir --implementation py -r requirements.txt'

- name: Install test requirements
run: python -m pip install -r build/test-requirements.txt

- name: Run Python unit tests
run: python pythonFiles/tests/run_all.py
run: python python_files/tests/run_all.py

positron-ipykernel-tests:
name: Test Positron IPyKernel
Expand All @@ -185,31 +180,14 @@ jobs:
include:
- os: 'ubuntu-latest'
python: '3.8'
time-elapsed: ''
- os: 'macos-latest'
python: '3.9'
time-elapsed: ''
- os: 'windows-latest'
python: '3.10'
time-elapsed: ''
- os: 'ubuntu-latest'
python: '3.11'
time-elapsed: ''
- os: 'ubuntu-latest'
python: '3.12'
time-elapsed: ''
# - os: 'ubuntu-latest'
# python: '3.10'
# time-elapsed: '3 months'
# - os: 'ubuntu-latest'
# python: '3.10'
# time-elapsed: '6 months'
# - os: 'ubuntu-latest'
# python: '3.10'
# time-elapsed: '9 months'
# - os: 'ubuntu-latest'
# python: '3.10'
# time-elapsed: '1 year'

steps:
- name: Checkout
Expand All @@ -225,22 +203,37 @@ jobs:
run: python scripts/vendor.py

- name: Install Positron IPyKernel test requirements
run: python -m pip install --prefer-binary --upgrade -r pythonFiles/positron/pinned-test-requirements.txt
run: python -m pip install --prefer-binary --upgrade -r python_files/positron/pinned-test-requirements.txt

- name: Get date for older dependencies
if: ${{ matrix.time-elapsed != '' }}
run: |
echo "SNAPSHOT_DATE=$(date -d '-${{ matrix.time-elapsed }}' --iso-8601)" >> $GITHUB_ENV
- name: Run Positron IPyKernel unit tests
run: pytest python_files/positron

- name: Get older PyPI snapshot
if: ${{ matrix.time-elapsed != '' }}
python-minimum-dependencies:
name: Test Minimum Positron IPyKernel Dependencies
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
# currently only running on oldest supported Python version
- os: 'ubuntu-latest'
python: '3.8'
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Use Python ${{ matrix.python }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
cache: 'pip'

- name: Install testing requirements
run: |
python -m pip config set global.index-url https://packagemanager.posit.co/pypi/${{ env.SNAPSHOT_DATE }}/simple
python -m pip config set global.trusted-host packagemanager.posit.co
python -m pip install --prefer-binary --force-reinstall -r pythonFiles/positron/data-science-requirements.txt
python scripts/vendor.py
python -m pip install nox
- name: Run Positron IPyKernel unit tests
run: pytest pythonFiles/positron
- name: Run tests
run: yarn positron:testMinimumPythonReqs

typescript-tests:
name: Test TypeScript
Expand Down
Loading

0 comments on commit 9fcc197

Please sign in to comment.