Skip to content

Commit

Permalink
Merge from 5.x: PR #17559
Browse files Browse the repository at this point in the history
Fixes #16504
  • Loading branch information
dalthviz committed Mar 28, 2022
2 parents 860a438 + 52b26b8 commit 83bdf40
Show file tree
Hide file tree
Showing 83 changed files with 15,038 additions and 25 deletions.
24 changes: 15 additions & 9 deletions .github/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,16 @@ if [ "$USE_CONDA" = "true" ]; then
mamba install check-manifest codecov -c conda-forge -q -y

# Remove packages we have subrepos for.
conda remove spyder-kernels --force -q -y
conda remove python-lsp-server --force -q -y
conda remove qdarkstyle --force -q -y
for dep in $(ls external-deps)
do
echo "Removing $dep package"

if [ "$dep" = "qtconsole" ]; then
conda remove qtconsole-base qtconsole --force -q -y
else
conda remove $dep --force -q -y
fi
done
else
# Update pip and setuptools
pip install -U pip setuptools
Expand All @@ -36,19 +43,18 @@ else
# Install qtpy from Github
pip install git+https://github.com/spyder-ide/qtpy.git

# Install qtconsole from Github
pip install git+https://github.com/jupyter/qtconsole.git

# Install QtAwesome from Github
pip install git+https://github.com/spyder-ide/qtawesome.git

# To check our manifest and coverage
pip install -q check-manifest codecov

# Remove packages we have subrepos for
pip uninstall spyder-kernels -q -y
pip uninstall python-lsp-server -q -y
pip uninstall qdarkstyle -q -y
for dep in $(ls external-deps)
do
echo "Removing $dep package"
pip uninstall $dep -q -y
done

# Remove Spyder to properly install it below
pip uninstall spyder -q -y
Expand Down
40 changes: 31 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,38 +206,60 @@ As an example, let's assume that (i) your Github user name is `myuser`; (ii) you
where `<branch>` needs to be `2.x` if your `fix_in_spyder` branch was done against Spyder's `5.x` branch; and `master`, if you did it against our `master` branch here.


## Making contributions that depend on pull requests in python-lsp-server
## Making contributions that depend on pull requests in python-lsp-server or qtconsole

As with spyder-kernels, Spyder is tightly integrated with the [python-lsp-server](https://github.com/python-lsp/python-lsp-server) to provide code completion, linting and folding on its editor.
As with spyder-kernels, Spyder is tightly integrated with the [python-lsp-server](https://github.com/python-lsp/python-lsp-server) to provide code completion, linting and folding on its editor; and [qtconsole](https://github.com/jupyter/qtconsole) for its IPython console.

Due to that, a clone of that project is placed in the `external-deps` directory, which is managed with the `git subrepo` project. If you want to make a pull request in python-lsp-server that affects functionality in Spyder, please read carefully the instructions in the previous section because they are very similar for this case. A summary of those instructions applied to this project is the following:
Due to that, a clone of those projects is placed in the `external-deps` directory, which is managed with the `git subrepo` project. If you want to make a pull request in python-lsp-server or qtconsole that affects functionality in Spyder, please read carefully the instructions in the previous section because they are very similar for those cases. A summary of those instructions applied to these projects is the following:

* First you need to create a pull request in python-lsp-server with the changes you want to make there. Let's assume the branch from which that pull request is created is called `fix_in_pyls`.
* First you need to create a pull request in python-lsp-server or qtconsole with the changes you want to make there. Let's assume the branch from which that pull request is created is called `fix_in_external_dep`.

* Then you need to create a branch in Spyder (let's call it `fix_in_spyder`) with the fixes that require that pull request and update the python-lsp-server subrepo. For that you need to execute the following commands:

```
$ git checkout -b fix_in_spyder
$ git subrepo clone https://github.com/myuser/python-lsp-server.git external-deps/python-lsp-server -b fix_in_pylsp -f
$ git subrepo clone https://github.com/myuser/python-lsp-server.git external-deps/python-lsp-server -b fix_in_external_dep -f
```

and then commit the changes you need to make in Spyder.
in case the fix is in python-lsp-server, or

* If you need to add more commits to `fix_in_pylsp`, you need to update `fix_in_spyder` with these commands:
```
$ git checkout -b fix_in_spyder
$ git subrepo clone https://github.com/myuser/qtconsole.git external-deps/qtconsole -b fix_in_external_dep -f
```

if the fix is in qtconsole. And then commit the changes you need to make in Spyder.

* If you need to add more commits to `fix_in_external_dep`, you need to update `fix_in_spyder` with these commands:

```
$ git checkout fix_in_spyder
$ git subrepo clone https://github.com/myuser/python-lsp-server.git external-deps/python-lsp-server -b fix_in_external_dep -f
$ git push origin fix_in_spyder
```

or

```
$ git checkout fix_in_spyder
$ git subrepo clone https://github.com/myuser/python-lsp-server.git external-deps/python-lsp-server -b fix_in_pylsp -f
$ git subrepo clone https://github.com/myuser/qtconsole.git external-deps/qtconsole -b fix_in_external_dep -f
$ git push origin fix_in_spyder
```

* After `fix_in_pylsp` is merged, you need to update the python-lsp-server subrepo in your `fix_in_spyder` branch with
* After `fix_in_external_dep` is merged, you need to update the python-lsp-server or qtconsole subrepos in your `fix_in_spyder` branch with

```
$ git checkout fix_in_spyder
$ git subrepo clone https://github.com/python-lsp/python-lsp-server.git external-deps/python-lsp-server -b develop -f
```

or

```
$ git checkout fix_in_spyder
$ git subrepo clone https://github.com/jupyter/qtconsole.git external-deps/qtconsole -b master -f
```


## Adding Third-Party Content

Expand Down
7 changes: 6 additions & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,16 @@ To release a new version of Spyder you need to follow these steps:

* Release a new version of `python-lsp-server`, if required.

* Merge PRs on Conda-forge that update the `spyder-kernels` and `python-lsp-server` feedstocks (usually an automatic PR will appear that can be either merged as it is or be use as boilerplate):
* Release a new version of `qtconsole`, if required.

* Merge PRs on Conda-forge that update the `spyder-kernels`, `python-lsp-server` and `qtconsole` feedstocks (usually an automatic PR will appear that can be either merged as it is or be used as boilerplate):

- `spyder-kernels`: https://github.com/conda-forge/spyder-kernels-feedstock

- `python-lsp-server`: https://github.com/conda-forge/python-lsp-server-feedstock

- `qtconsole`: https://github.com/conda-forge/qtconsole-feedstock

**Notes**:

- Review carefully the release notes of those packages to see if it's necessary to add new dependencies or update the constraints on the current ones (e.g. `jedi >=0.17.2`).
Expand All @@ -120,6 +124,7 @@ To release a new version of Spyder you need to follow these steps:

git subrepo pull external-deps/spyder-kernels
git subrepo pull external-deps/python-lsp-server
git subrepo pull external-deps/qtconsole

* Merge this PR following the procedure mentioned on [`MAINTENANCE.md`](MAINTENANCE.md)

Expand Down
2 changes: 1 addition & 1 deletion binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ dependencies:
- qstylizer >=0.1.10
- qtawesome >=1.0.2
- qtconsole >=5.2.1,<5.3.0
- qtpy >=1.5.0
- qtpy >=2.0.1
- rtree >=0.9.7
- setuptools >=49.6.0
- sphinx >=0.6.6
Expand Down
4 changes: 4 additions & 0 deletions external-deps/qtconsole/.coveragerc

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

71 changes: 71 additions & 0 deletions external-deps/qtconsole/.github/workflows/linux-tests.yml

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

43 changes: 43 additions & 0 deletions external-deps/qtconsole/.github/workflows/macos-tests.yml

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

43 changes: 43 additions & 0 deletions external-deps/qtconsole/.github/workflows/windows-tests.yml

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

23 changes: 23 additions & 0 deletions external-deps/qtconsole/.gitignore

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

12 changes: 12 additions & 0 deletions external-deps/qtconsole/.gitrepo

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

Loading

0 comments on commit 83bdf40

Please sign in to comment.