Skip to content

Commit

Permalink
Merge branch 'master' into editor_migration
Browse files Browse the repository at this point in the history
  • Loading branch information
dalthviz committed Sep 19, 2023
2 parents bc818ec + a894eb6 commit d4accf7
Show file tree
Hide file tree
Showing 171 changed files with 4,893 additions and 5,751 deletions.
8 changes: 8 additions & 0 deletions .github/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ if [ "$USE_CONDA" = "true" ]; then
# Remove pylsp before installing its subrepo below
micromamba remove --force python-lsp-server python-lsp-server-base -y

# IPython 8.15 broke the %debug magic, which is used in some of our tests.
# So, pinning it to 8.14 for now.
micromamba install ipython=8.14

else
# Update pip and setuptools
python -m pip install -U pip setuptools wheel build
Expand All @@ -48,6 +52,10 @@ else
pip install pyqt5==5.12.* pyqtwebengine==5.12.*
fi

# IPython 8.15 broke the %debug magic, which is used in some of our tests.
# So, pinning it to 8.14 for now.
pip install ipython==8.14.0

fi

# Install subrepos from source
Expand Down
3 changes: 0 additions & 3 deletions .github/scripts/modules_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,6 @@ for f in spyder/*/*/*/*.py; do
if [[ $f == spyder/plugins/editor/panels/__init__.py ]]; then
continue
fi
if [[ $f == spyder/utils/external/pybloom_pyqt/*.py ]]; then
continue
fi
python "$f"
if [ $? -ne 0 ]; then
exit 1
Expand Down
4 changes: 4 additions & 0 deletions .github/scripts/run_tests.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/bin/bash -ex

# *** DON'T remove this line! ***
# It's necessary to make this script error out in case the pipes below fail.
set -o pipefail

# Add CONDA_EXE to the environment for our conda tests
if [ "$OS" = "win" ]; then
export CONDA_EXE=$CONDA\\Scripts\\conda
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/build-subrepos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ on:
- 'master'
paths:
- '**.gitrepo'
pull_request:
paths:
- '**.gitrepo'
- '.github/workflows/build-subrepos.yml'

workflow_call:

workflow_dispatch:

Expand Down Expand Up @@ -62,7 +62,10 @@ jobs:
uses: mamba-org/setup-micromamba@v1
with:
environment-file: installers-conda/build-environment.yml
create-args: python=${{ matrix.python-version }}
environment-name: spy-inst
create-args: >-
--channel-priority=strict
python=${{ matrix.python-version }}
cache-downloads: true
cache-environment: true

Expand Down
62 changes: 34 additions & 28 deletions .github/workflows/installers-conda.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
on:
schedule:
- cron: '30 6 * * *'

pull_request:
paths:
- 'installers-conda/**'
- '.github/workflows/installers-conda.yml'
- '.github/workflows/build-subrepos.yml'
- 'requirements/*.yml'
- 'MANIFEST.in'
- '**.bat'
- '**.py'
- '**.sh'
- '!**.md'

release:
types:
Expand Down Expand Up @@ -50,13 +48,13 @@ concurrency:
name: Create conda-based installers for Windows, macOS, and Linux

env:
IS_STANDARD_PR: ${{ github.event_name == 'pull_request' || (github.event_name == 'workflow_dispatch' && ! inputs.pre) }}
IS_RELEASE: ${{ github.event_name == 'release' }}
IS_PRE: ${{ github.event_name == 'workflow_dispatch' && inputs.pre }}
ENABLE_SSH: ${{ github.event_name == 'workflow_dispatch' && inputs.ssh }}
BUILD_MAC: ${{ github.event_name != 'workflow_dispatch' || inputs.mac }}
BUILD_LNX: ${{ github.event_name != 'workflow_dispatch' || inputs.linux }}
BUILD_WIN: ${{ github.event_name != 'workflow_dispatch' || inputs.win }}
ENABLE_SSH: ${{ github.event_name == 'workflow_dispatch' && inputs.ssh }}
USE_SUBREPOS: ${{ github.event_name == 'schedule' || github.event_name == 'pull_request' || (github.event_name == 'workflow_dispatch' && ! inputs.pre) }}
NOTARIZE: ${{ github.event_name == 'schedule' || github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && inputs.pre) }}

jobs:
build-matrix:
Expand Down Expand Up @@ -87,11 +85,19 @@ jobs:
echo "target_platform=[$target_platform]" >> $GITHUB_OUTPUT
echo "include=[$include]" >> $GITHUB_OUTPUT
build-subrepos:
name: Build Subrepos
# env.USE_SUBREPOS is not available at job level; must copy-paste here
if: github.event_name == 'schedule' || github.event_name == 'pull_request' || (github.event_name == 'workflow_dispatch' && ! inputs.pre)
uses: ./.github/workflows/build-subrepos.yml

build-installers:
name: Build installer for ${{ matrix.target-platform }} Python-${{ matrix.python-version }}
if: ${{ ! failure() && ! cancelled() }}
runs-on: ${{ matrix.os }}
needs:
- build-matrix
- build-subrepos
strategy:
fail-fast: false
matrix:
Expand All @@ -116,8 +122,15 @@ jobs:
with:
fetch-depth: 0

- name: Setup Remote SSH Connection
if: env.ENABLE_SSH == 'true'
uses: mxschmitt/action-tmate@v3
timeout-minutes: 10
with:
detached: true

- name: Restore python-lsp-server Cache
if: env.IS_STANDARD_PR == 'true'
if: env.USE_SUBREPOS == 'true'
uses: actions/cache/restore@v3
with:
path: installers-conda/build/conda-bld/**/*.tar.bz2
Expand All @@ -126,7 +139,7 @@ jobs:
fail-on-cache-miss: true

- name: Restore qtconsole Cache
if: env.IS_STANDARD_PR == 'true'
if: env.USE_SUBREPOS == 'true'
uses: actions/cache/restore@v3
with:
path: installers-conda/build/conda-bld/**/*.tar.bz2
Expand All @@ -135,7 +148,7 @@ jobs:
fail-on-cache-miss: true

- name: Restore ${{ matrix.spyk-arch }} spyder-kernels Cache
if: env.IS_STANDARD_PR == 'true'
if: env.USE_SUBREPOS == 'true'
uses: actions/cache/restore@v3
with:
path: installers-conda/build/conda-bld/**/*.tar.bz2
Expand All @@ -147,7 +160,10 @@ jobs:
uses: mamba-org/setup-micromamba@v1
with:
environment-file: installers-conda/build-environment.yml
create-args: python=${{ matrix.python-version }}
environment-name: spy-inst
create-args: >-
--channel-priority=strict
python=${{ matrix.python-version }}
cache-downloads: true
cache-environment: true

Expand All @@ -173,19 +189,19 @@ jobs:
mamba search -c local --override-channels || true
- name: Create Keychain
if: 'false'
if: runner.os == 'macOS' && env.NOTARIZE == 'true'
run: |
./certkeychain.sh "${MACOS_CERTIFICATE_PWD}" "${MACOS_CERTIFICATE}" "${MACOS_INSTALLER_CERTIFICATE}"
CNAME=$(security find-identity -p codesigning -v | pcre2grep -o1 "\(([0-9A-Z]+)\)")
echo "CNAME=$CNAME" >> $GITHUB_ENV
_codesign=$(which codesign)
if [[ $_codesign =~ ${CONDA_PREFIX}.* ]]; then
# Find correct codesign
echo "Moving $_codesign..."
mv $_codesign ${_codesign}.bak
fi
./certkeychain.sh "${MACOS_CERTIFICATE_PWD}" "${MACOS_CERTIFICATE}" "${MACOS_INSTALLER_CERTIFICATE}"
CNAME=$(security find-identity -p codesigning -v | pcre2grep -o1 "\(([0-9A-Z]+)\)")
echo "CNAME=$CNAME" >> $GITHUB_ENV
- name: Build Package Installer
run: |
[[ -n $CNAME ]] && args=("--cert-id" "$CNAME") || args=()
Expand Down Expand Up @@ -271,7 +287,7 @@ jobs:
EXIT /B %ERRORLEVEL%
- name: Notarize or Compute Checksum
if: 'false'
if: env.NOTARIZE == 'true'
run: |
if [[ $RUNNER_OS == "macOS" ]]; then
./notarize.sh -p $APPLICATION_PWD $PKG_PATH
Expand All @@ -280,16 +296,6 @@ jobs:
echo $(sha256sum $PKG_NAME) > "${PKG_GLOB}-sha256sum.txt"
fi
- name: Setup Remote SSH Connection
# Notes:
# 1. This only works for conda, probably because it has the necessary
# MSYS2 packages to create the connection.
# 2. Check https://github.com/marketplace/actions/debugging-with-tmate for
# usage.
if: failure() && env.ENABLE_SSH == 'true'
uses: mxschmitt/action-tmate@v3
timeout-minutes: 45

- name: Upload Artifact
if: env.IS_RELEASE == 'false'
uses: actions/upload-artifact@v3
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,10 @@ jobs:
shell: bash -l {0}
run: |
rm -f pytest_log.txt # Must remove any log file from a previous run
bash -l .github/scripts/run_tests.sh || \
bash -l .github/scripts/run_tests.sh || \
bash -l .github/scripts/run_tests.sh || \
bash -l .github/scripts/run_tests.sh
.github/scripts/run_tests.sh || \
.github/scripts/run_tests.sh || \
.github/scripts/run_tests.sh || \
.github/scripts/run_tests.sh
- name: Coverage
uses: codecov/codecov-action@v3
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,10 @@ jobs:
shell: bash -l {0}
run: |
rm -f pytest_log.txt # Must remove any log file from a previous run
bash -l .github/scripts/run_tests.sh || \
bash -l .github/scripts/run_tests.sh || \
bash -l .github/scripts/run_tests.sh || \
bash -l .github/scripts/run_tests.sh
.github/scripts/run_tests.sh || \
.github/scripts/run_tests.sh || \
.github/scripts/run_tests.sh || \
.github/scripts/run_tests.sh
- name: Coverage
uses: codecov/codecov-action@v3
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,10 @@ jobs:
shell: bash -l {0}
run: |
rm -f pytest_log.txt # Must remove any log file from a previous run
bash -l .github/scripts/run_tests.sh || \
bash -l .github/scripts/run_tests.sh || \
bash -l .github/scripts/run_tests.sh || \
bash -l .github/scripts/run_tests.sh
.github/scripts/run_tests.sh || \
.github/scripts/run_tests.sh || \
.github/scripts/run_tests.sh || \
.github/scripts/run_tests.sh
- name: Coverage
uses: codecov/codecov-action@v3
with:
Expand Down
74 changes: 0 additions & 74 deletions NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1479,37 +1479,6 @@ spyder/images/light/file_type_tex.svg
-------------------------------------------------------------------------------


Icons for Kite Completions Plugin
---------------------------------


Copyright (c) 2019 Kite


Author: Kite | https://kite.com
Site: https://kite.com
Source: https://kite.com
License: Creative Commons Attribution 4.0 International
https://creativecommons.org/licenses/by/4.0/


Licensed under the terms of the Creative Commons Attribution International 4.0.


See below for the full text of the Creative Commons Attribution International 4.0 License.


Files covered:

spyder/images/dark/kite.svg
spyder/images/kite/kite_copilot.png
spyder/images/light/kite.svg


===============================================================================



Plugin Assets
=============

Expand Down Expand Up @@ -1550,49 +1519,6 @@ spyder/plugins/help/utils/static/images/up_arrow_disabled.png



pyqt-bloomfilter 3.0.0
-------------------------------------------------------------------------


Copyright (c) 2011 Jay Baird and Bob Ippolito
Copyright (c) 2019 - Spyder Project Contributors (see AUTHORS.txt)


Author: Jay Baird and Bob Ippolito
Source: https://github.com/kiteco/pyqt-bloomfilter
License: MIT (expat)
https://opensource.org/licenses/MIT

No modifications made.


pyqt-bloomfilter is used in Spyder under the terms of the MIT.
See below for the full text of the MIT.

spyder/utils/external/pybloom_pyqt is used in Spyder
to implement fast lookup of the availability of Kite completions.

See below for the full text of the MIT (expat) license.

The current pyqt-bloomfilter license can be viewed at:
https://github.com/kiteco/pyqt-bloomfilter/blob/master/LICENSE.txt

The current version of the original file[s] can be viewed at:
https://github.com/kiteco/pyqt-bloomfilter


Files covered:

spyder/utils/external/pybloom_pyqt/__init__.py
spyder/utils/external/pybloom_pyqt/pybloom.py
spyder/utils/external/pybloom_pyqt/utils.py


-------------------------------------------------------------------------------




Full License Text
=================

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@
[![PyPI status](https://img.shields.io/pypi/status/spyder.svg)](https://github.com/spyder-ide/spyder)

## Build status

[![Win](https://github.com/spyder-ide/spyder/workflows/Win%20tests/badge.svg)](https://github.com/spyder-ide/spyder/actions?query=workflow%3A%22Win+tests%22)
[![Mac](https://github.com/spyder-ide/spyder/workflows/Mac%20tests/badge.svg)](https://github.com/spyder-ide/spyder/actions?query=workflow%3A%22Mac+tests%22)
[![Linux](https://github.com/spyder-ide/spyder/workflows/Linux%20tests/badge.svg)](https://github.com/spyder-ide/spyder/actions?query=workflow%3A%Linux+tests%22)
[![Coverage Status](https://coveralls.io/repos/github/spyder-ide/spyder/badge.svg?branch=master)](https://coveralls.io/github/spyder-ide/spyder?branch=master)
[![codecov](https://codecov.io/gh/spyder-ide/spyder/branch/master/graph/badge.svg)](https://codecov.io/gh/spyder-ide/spyder)
[![Crowdin](https://badges.crowdin.net/spyder/localized.svg)](https://crowdin.com/project/spyder)
[![Nightly Installers](https://github.com/mrclary/spyder/actions/workflows/installers-conda.yml/badge.svg?branch=master&event=schedule)](https://github.com/mrclary/spyder/actions/workflows/installers-conda.yml)

## Try Spyder online

Expand Down
2 changes: 1 addition & 1 deletion binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ dependencies:
- pyqt <5.16
- pyqtwebengine <5.16
- python-lsp-black >=1.2.0,<3.0.0
- python-lsp-server >=1.7.4,<1.8.0
- python-lsp-server >=1.8.0,<1.9.0
- pyuca >=1.2
- pyxdg >=0.26
- pyzmq >=22.1.0
Expand Down
6 changes: 3 additions & 3 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ def pytest_collection_modifyitems(config, items):
]

if os.name == 'nt':
percentage = 0.6
percentage = 0.5
elif sys.platform == 'darwin':
percentage = 0.6
else:
percentage = 0.5
else:
percentage = 0.4

for i, item in enumerate(ipyconsole_items):
if i < len(ipyconsole_items) * percentage:
Expand Down
2 changes: 2 additions & 0 deletions external-deps/python-lsp-server/.git-blame-ignore-revs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d4accf7

Please sign in to comment.