Skip to content

Commit

Permalink
Merge remote-tracking branch 'spyder-ide/3.x' into Spyder--Fix-to-issue-
Browse files Browse the repository at this point in the history
  • Loading branch information
Ericvulpi committed Jun 28, 2017
2 parents c023bc7 + ee494c7 commit 7665e59
Show file tree
Hide file tree
Showing 116 changed files with 5,379 additions and 2,714 deletions.
29 changes: 16 additions & 13 deletions .travis.yml
Expand Up @@ -6,34 +6,37 @@ sudo: false

matrix:
include:
# This never ends!
#- python: "2.7"
# env: TEST_MODULES=false
# os: linux
- python: "2.7"
env: TEST_MODULES=true
env: USE_PYQT=pyqt4
os: linux
- python: "2.7"
env: USE_PYQT=pyqt5
os: linux
- python: "3.5"
env: TEST_MODULES=false
env: USE_PYQT=pyqt4
os: linux
# This slot runs our tests only with pip packages
- python: "3.5"
env: TEST_MODULES=true
env: USE_PYQT=pyqt5
os: linux
- python: "3.4"
env: TEST_MODULES=false
- python: "3.6"
env: USE_PYQT=pyqt5
os: linux

before_install:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"

install:
- ./continuous_integration/install.sh;
- ./continuous_integration/travis/install.sh;

script:
- |
if [ "$TEST_MODULES" = "true" ]; then
./continuous_integration/travis/modules_test.sh
if [ "$USE_PYQT" = "pyqt5" ]; then
./continuous_integration/travis/test-qt5.sh || ./continuous_integration/travis/test-qt5.sh
else
./continuous_integration/travis/test-qt4.sh
./continuous_integration/travis/test-qt4.sh || ./continuous_integration/travis/test-qt4.sh
fi
after_success:
- export PATH="$HOME/miniconda/bin:$PATH" && source activate test && coveralls
135 changes: 135 additions & 0 deletions CONTRIBUTING.md
@@ -0,0 +1,135 @@
# Contributing to Spyder-IDE

:+1::tada: First off, thanks for taking the time to contribute to Spyder! :tada::+1:

## General Guidelines

This page documents at a very high level how to contribute to Spyder.
Please Check the
[Spyder IDE Contributor Documentation](https://github.com/spyder-ide/spyder/wiki/Contributing-to-Spyder)
for a more detailed guide on how to contribute to the Spyder.


## Setting Up a Development Environment


### Cloning the repo

```bash
$ git clone https://github.com/spyder-ide/spyder.git
```

### Creating a conda environment or virtualenv

If you use Anaconda you can create a conda environment with
these instructions

```bash
$ conda create -n spyder-dev python=3
$ source activate spyder-dev
```

You can also use `virtualenv` on Linux, but `conda` is preferred:

```bash
$ mkvirtualenv spyder-dev
$ workon spyder-dev
```

### Installing dependencies

After you have created your development environment, you need to install
Spyder necessary dependencies. For that you need to go to the directory
where your git clone is placed and run:

```bash
$ conda install --file requirements/requirements.txt
```

or using pip and virtualenv:

```bash
$ pip install -r requirements/requirements.txt
```

*Note*: If you are using pip, you also need to install a Qt binding
package. This can be achieved by running

```bash
$ pip install pyqt5
```

### Running Spyder

To start Spyder directly from your clone, i.e. without installing it to your
environment, you need to run

```bash
$ python bootstrap.py
```

**Important Note**: You need to restart Spyder after any change you do to its
source code. This is the only way to test your new code.

## Spyder Branches

When you start to work on a new pull request (PR), you need to be sure that your
feature branch is a child of the right Spyder branch, and also that you make
your PR on Github against it.

Besides, issues are marked with a milestone that indicates the correct branch
to use, like this:

* Use the `3.1.x` branch for bugfixes only (milestones `v3.1.1`, `v3.1.2`, `v3.1.3`,
etc)

* Use the `3.x` branch to introduce new features that don't require major internal
changes (milestones `v3.1`, `v3.2`, `v3.3`, etc).

* Use `master` to introduce new features that break compatibility with previous
Spyder versions (Milestone `v4.0beta1`, `v4.0beta2`, etc).


You can also submit bugfixes to `3.x` or `master` for errors that are only present in
those branches.

So to start working on a new PR, you need to follow these commands:

```bash
$ git checkout <branch>
$ git pull upstream <branch>
$ git checkout -b name-new-branch
```

### Changing base branch

If you started your work in the wrong branch, or want to backport it, you could
change the base branch using `git rebase --onto`, like this:

```bash
$ git rebase --onto <new_base> <old_base> <branch>
```

For example, backporting `my_branch` from `master` to `3.x`:

```bash
$ git rebase --onto 3.x master my_branch
```

## Running Tests

Install our test dependencies:

```bash
$ conda install --file requirements/test_requirements.txt -c spyder-ide
```

or using pip
```bash
$ pip install -r requirements/test_requirements.txt
```

To run Spyder test suite, please use:
```bash
$ python runtests.py
```
2 changes: 1 addition & 1 deletion MANIFEST.in
@@ -1,4 +1,4 @@
recursive-include spyder *.pot *.po *.svg *.png *.css *.qss *.c, *.cpp, *.html, *.java, *.md, *.R, *.csv, *.ipynb
recursive-include spyder *.pot *.po *.svg *.png *.css *.qss *.c, *.cpp, *.html, *.java, *.md, *.R, *.csv, *.pyx, *.ipynb
recursive-include spyder_breakpoints *.pot *.po *.svg *.png
recursive-include spyder_profiler *.pot *.po *.svg *.png
recursive-include spyder_pylint *.pot *.po *.svg *.png
Expand Down
12 changes: 10 additions & 2 deletions README.md
Expand Up @@ -143,13 +143,13 @@ a Python version greater than 2.7 (Python 3.2 is not supported anymore).
* **Python** 2.7 or 3.3+
* **PyQt5** 5.2+ or **PyQt4** 4.6+: PyQt5 is recommended.
* **qtconsole** 4.2.0+: Enhanced Python interpreter.
* **Rope** and **Jedi**: Editor code completion, calltips
* **Rope** 0.10.5+ and **Jedi** 0.9.0+: Editor code completion, calltips
and go-to-definition.
* **Pyflakes**: Real-time code analysis.
* **Sphinx**: Rich text mode for the Help pane.
* **Pygments** 2.0+: Syntax highlighting for all file types it supports.
* **Pylint**: Static code analysis.
* **Pep8**: Style analysis.
* **Pycodestyle**: Style analysis.
* **Psutil**: CPU and memory usage on the status bar.
* **Nbconvert**: Manipulation of notebooks in the Editor.
* **Qtawesome** 0.4.1+: To have an icon theme based on FontAwesome.
Expand All @@ -167,6 +167,14 @@ a Python version greater than 2.7 (Python 3.2 is not supported anymore).
* **Numpy**: View and edit two or three dimensional arrays in the Variable Explorer.
* **SymPy**: Symbolic mathematics in the IPython console.
* **SciPy**: Import Matlab workspace files in the Variable Explorer.
* **Cython**: Run Cython files in the IPython console.


## Contributing

Everyone is welcome to contribute. Please read our
[contributing instructions](https://github.com/spyder-ide/spyder/blob/master/CONTRIBUTING.md),
then get started!


## More information
Expand Down
6 changes: 4 additions & 2 deletions RELEASE.md
Expand Up @@ -12,9 +12,11 @@ To release a new version of Spyder you need to follow these steps:

* python setup.py sdist upload

* python2 setup.py bdist_wheel upload
* python setup.py bdist_wheel --plat-name manylinux1_x86_64 upload

* python3 setup.py bdist_wheel upload
* python setup.py bdist_wheel --plat-name manylinux1_i686 upload

* python setup.py bdist_wheel upload

* git tag -a vX.X.X -m 'Release X.X.X'

Expand Down
9 changes: 5 additions & 4 deletions appveyor.yml
Expand Up @@ -10,13 +10,14 @@ environment:
PIP_DEPENDENCIES_FLAGS: "-q"
CONDA_DEPENDENCIES_FLAGS: "--quiet"
CONDA_DEPENDENCIES: >
rope pyflakes sphinx pygments pylint pep8 psutil nbconvert
rope pyflakes sphinx pygments pylint pycodestyle psutil nbconvert
qtawesome pickleshare qtpy pyzmq chardet mock pandas pytest
pytest-cov numpydoc scipy pillow qtconsole matplotlib
PIP_DEPENDENCIES: "pytest-qt flaky jedi"
pytest-cov numpydoc scipy pillow qtconsole matplotlib jedi
PIP_DEPENDENCIES: "pytest-qt pytest-timeout flaky"

matrix:
- PYTHON_VERSION: "2.7"
#- PYTHON_VERSION: "3.5"
- PYTHON_VERSION: "3.6"

platform:
Expand All @@ -40,4 +41,4 @@ install:
build: false

test_script:
- "%CMD_IN_ENV% python runtests.py"
- "%CMD_IN_ENV% python runtests.py || %CMD_IN_ENV% python runtests.py || %CMD_IN_ENV% python runtests.py"
12 changes: 5 additions & 7 deletions circle.yml
Expand Up @@ -3,21 +3,19 @@
machine:
environment:
# Python versions to tests (Maximum of 4 different versions)
# The last container is reserved to test with PyQt5 wheels
# because they are more up to date than conda páckages.
PY_VERSIONS: "2.7 3.5 3.6 3.5"
# For Coveralls
COVERALLS_REPO_TOKEN: yt7YToGxRtnAcM6kSULoiCmOPetq10TaU
PY_VERSIONS: "2.7 3.5 3.6"
# Environment variable used by astropy helpers
TRAVIS_OS_NAME: "linux"
# PyQt version to test with
USE_PYQT: pyqt5

dependencies:
pre:
# We need to run a window manager to avoid focus problems when running our tests.
# See https://github.com/TestFX/TestFX/issues/158#issuecomment-62421691
- sudo apt-get install matchbox-window-manager
override:
- ./continuous_integration/install.sh
- ./continuous_integration/circle/install.sh
- DISPLAY=:99 /usr/bin/matchbox-window-manager:
background: true
- sleep 5
Expand All @@ -28,5 +26,5 @@ test:
#- export PATH="$HOME/miniconda/bin:$PATH" && source activate test && ciocheck spyder: # note the colon
# parallel: true
# PyQt5
- ./continuous_integration/circle/test-qt5.sh || ./continuous_integration/circle/test-qt5.sh || ./continuous_integration/circle/test-qt5.sh: # note the colon
- ./continuous_integration/circle/modules_test.sh || ./continuous_integration/circle/modules_test.sh: # note the colon
parallel: true
7 changes: 3 additions & 4 deletions conda.recipe/meta.yaml
Expand Up @@ -18,15 +18,14 @@ requirements:
- python.app # [osx]
- pyqt >=5.6.0 # [osx]
- pyqt # [not osx]
- rope 0.9.* # [py34 or py35]
- rope # [py27]
- rope >=0.10.5
- pyflakes
- jedi
- jedi >=0.9.0
- qtconsole >=4.2.0
- nbconvert
- pygments >=2.0
- sphinx
- pep8
- pycodestyle
- psutil
- pylint
- qtawesome >=0.4.1
Expand Down
3 changes: 0 additions & 3 deletions continuous_integration/appveyor/modules_test.bat
Expand Up @@ -45,9 +45,6 @@ for /r "%SPYDER%" %%f in (*.py) do (
) else if "%%f"=="%SPYDER%\utils\qthelpers.py" (
echo --- NOT testing %%f ---
echo.
) else if "%%f"=="%SPYDER%\widgets\formlayout.py" (
echo --- NOT testing %%f ---
echo.
) else if not "!file:external\=!"=="!file!" (
echo --- NOT testing %%f ---
echo.
Expand Down
21 changes: 21 additions & 0 deletions continuous_integration/circle/install.sh
@@ -0,0 +1,21 @@
#!/bin/bash

export CONDA_DEPENDENCIES_FLAGS="--quiet"
export CONDA_DEPENDENCIES="rope pyflakes sphinx pygments pylint psutil nbconvert \
qtawesome pickleshare qtpy pyzmq chardet mock nomkl pandas \
pytest pytest-cov numpydoc scipy cython pillow"
export PIP_DEPENDENCIES="coveralls pytest-qt pytest-xvfb flaky jedi pycodestyle"

# Download and install miniconda and conda/pip dependencies
# with astropy helpers
export PY_VERSIONS=($PY_VERSIONS)
export TRAVIS_PYTHON_VERSION=${PY_VERSIONS[$CIRCLE_NODE_INDEX]}

echo -e "PYTHON = $TRAVIS_PYTHON_VERSION \n============"
git clone git://github.com/astropy/ci-helpers.git > /dev/null
source ci-helpers/travis/setup_conda_$TRAVIS_OS_NAME.sh
export PATH="$HOME/miniconda/bin:$PATH"
source activate test

# Install ciocheck (not working right now)
#conda install -q ciocheck -c spyder-ide --no-update-deps

0 comments on commit 7665e59

Please sign in to comment.