New Upstream Release - spyder-memory-profiler
Ready changes
Summary
Merged new upstream version: 0.2.dev0 (was: 0.2.1).
Resulting package
Built on 2022-03-16T19:16 (took 5m16s)
The resulting binary packages can be installed (if you have the apt repository enabled) by running one of:
apt install -t fresh-releases python3-spyder-memory-profiler
Lintian Result
Diff
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
deleted file mode 100644
index f7beb14..0000000
--- a/.github/FUNDING.yml
+++ /dev/null
@@ -1 +0,0 @@
-open_collective: spyder
diff --git a/.github/workflows/linux-tests.yml b/.github/workflows/linux-tests.yml
deleted file mode 100644
index ac79503..0000000
--- a/.github/workflows/linux-tests.yml
+++ /dev/null
@@ -1,56 +0,0 @@
-name: Linux tests
-
-on:
- push:
- branches:
- - master
- pull_request:
- branches:
- - master
-
-jobs:
- linux:
- name: Linux Py${{ matrix.PYTHON_VERSION }}
- runs-on: ubuntu-latest
- env:
- CI: True
- PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }}
- RUNNER_OS: 'ubuntu'
- strategy:
- fail-fast: false
- matrix:
- PYTHON_VERSION: ['3.6', '3.7', '3.8']
- steps:
- - name: Checkout branch
- uses: actions/checkout@v2
- - name: Install System Packages
- run: |
- sudo apt-get update
- sudo apt-get install libegl1-mesa
- - name: Install Conda
- uses: goanpeca/setup-miniconda@v1
- with:
- activate-environment: test
- auto-update-conda: true
- auto-activate-base: false
- python-version: ${{ matrix.PYTHON_VERSION }}
- - name: Install package dependencies
- shell: bash -l {0}
- run: conda install --file requirements/conda.txt -y -q
- - name: Install test dependencies
- shell: bash -l {0}
- run: |
- conda install nomkl -y -q
- conda install -c spyder-ide --file requirements/tests.txt -y -q
- - name: Install Package
- shell: bash -l {0}
- run: pip install --no-deps -e .
- - name: Show environment information
- shell: bash -l {0}
- run: |
- conda info
- conda list
- - name: Run tests
- shell: bash -l {0}
- run: xvfb-run --auto-servernum pytest spyder_memory_profiler -x -vv
- timeout-minutes: 10
diff --git a/.github/workflows/macos-tests.yml b/.github/workflows/macos-tests.yml
deleted file mode 100644
index e683be0..0000000
--- a/.github/workflows/macos-tests.yml
+++ /dev/null
@@ -1,52 +0,0 @@
-name: Macos tests
-
-on:
- push:
- branches:
- - master
- pull_request:
- branches:
- - master
-
-jobs:
- macos:
- name: Mac Py${{ matrix.PYTHON_VERSION }}
- runs-on: macos-latest
- env:
- CI: True
- PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }}
- RUNNER_OS: 'macos'
- strategy:
- fail-fast: false
- matrix:
- PYTHON_VERSION: ['3.6', '3.7', '3.8']
- steps:
- - name: Checkout branch
- uses: actions/checkout@v2
- - name: Install Conda
- uses: goanpeca/setup-miniconda@v1
- with:
- activate-environment: test
- auto-update-conda: true
- auto-activate-base: false
- python-version: ${{ matrix.PYTHON_VERSION }}
- - name: Install package dependencies
- shell: bash -l {0}
- run: conda install --file requirements/conda.txt -y -q
- - name: Install test dependencies
- shell: bash -l {0}
- run: |
- conda install nomkl -y -q
- conda install -c spyder-ide --file requirements/tests.txt -y -q
- - name: Install Package
- shell: bash -l {0}
- run: pip install --no-deps -e .
- - name: Show environment information
- shell: bash -l {0}
- run: |
- conda info
- conda list
- - name: Run tests
- shell: bash -l {0}
- run: pytest spyder_memory_profiler -x -vv
- timeout-minutes: 10
diff --git a/.github/workflows/windows-tests.yml b/.github/workflows/windows-tests.yml
deleted file mode 100644
index d394808..0000000
--- a/.github/workflows/windows-tests.yml
+++ /dev/null
@@ -1,50 +0,0 @@
-name: Windows tests
-
-on:
- push:
- branches:
- - master
- pull_request:
- branches:
- - master
-
-jobs:
- windows:
- name: Windows Py${{ matrix.PYTHON_VERSION }}
- runs-on: windows-latest
- env:
- CI: True
- PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }}
- RUNNER_OS: 'windows'
- strategy:
- fail-fast: false
- matrix:
- PYTHON_VERSION: ['3.6', '3.7', '3.8']
- steps:
- - name: Checkout branch
- uses: actions/checkout@v2
- - name: Install Conda
- uses: goanpeca/setup-miniconda@v1
- with:
- activate-environment: test
- auto-update-conda: true
- auto-activate-base: false
- python-version: ${{ matrix.PYTHON_VERSION }}
- - name: Install package dependencies
- shell: bash -l {0}
- run: conda install --file requirements/conda.txt -y -q
- - name: Install test dependencies
- shell: bash -l {0}
- run: conda install -c spyder-ide --file requirements/tests.txt -y -q
- - name: Install Package
- shell: bash -l {0}
- run: pip install --no-deps -e .
- - name: Show environment information
- shell: bash -l {0}
- run: |
- conda info
- conda list
- - name: Run tests
- shell: bash -l {0}
- run: pytest spyder_memory_profiler -x -vv
- timeout-minutes: 10
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index ded6067..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,36 +0,0 @@
-*.py[cod]
-
-# C extensions
-*.so
-
-# Packages
-*.egg
-*.egg-info
-dist
-build
-eggs
-parts
-bin
-var
-sdist
-develop-eggs
-.installed.cfg
-lib
-lib64
-__pycache__
-
-# Installer logs
-pip-log.txt
-
-# Unit test / coverage reports
-.coverage
-.tox
-nosetests.xml
-
-# Translations
-*.mo
-
-# Mr Developer
-.mr.developer.cfg
-.project
-.pydevproject
diff --git a/AUTHORS.md b/AUTHORS.md
deleted file mode 100644
index aebb743..0000000
--- a/AUTHORS.md
+++ /dev/null
@@ -1,20 +0,0 @@
-Maintainer
-==========
-
-The [Spyder Development Team](https://github.com/orgs/spyder-ide/teams/core-developers)
-
-Main Authors
-============
-
-Joseph Martinot-Lagarde ([@Nodd](http://github.com/Nodd))
-
-Code Contributors
-=================
-
-Joseph Martinot-Lagarde ([@Nodd](http://github.com/Nodd))
-
-Christer van der Meeren ([@cmeeren](http://github.com/cmeeren))
-
-Gonzalo Peña-Castellanos ([@goanpeca](http://github.com/goanpeca))
-
-Steven Silvester ([@blink1073](http://github.com/blink1073))
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a0573e2..9ff20c4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,27 +1,5 @@
# History of changes
-## Version 0.2.1 (2020/04/18)
-
-This release fixes some compatibility issues with Spyder 4.1 and some other bugs.
-
-### Issues Closed
-
-* [Issue 27](https://github.com/spyder-ide/spyder-memory-profiler/issues/27) - Check TextEditor call ([PR 29](https://github.com/spyder-ide/spyder-memory-profiler/pull/29))
-* [Issue 26](https://github.com/spyder-ide/spyder-memory-profiler/issues/26) - Move README to markdown ([PR 28](https://github.com/spyder-ide/spyder-memory-profiler/pull/28))
-* [Issue 25](https://github.com/spyder-ide/spyder-memory-profiler/issues/25) - Move CI to github actions ([PR 28](https://github.com/spyder-ide/spyder-memory-profiler/pull/28))
-* [Issue 21](https://github.com/spyder-ide/spyder-memory-profiler/issues/21) - start Profile memory usage ([PR 31](https://github.com/spyder-ide/spyder-memory-profiler/pull/31))
-
-### Pull Requests Merged
-
-* [PR 31](https://github.com/spyder-ide/spyder-memory-profiler/pull/31) - PR: Fix Start button ([21](https://github.com/spyder-ide/spyder-memory-profiler/issues/21))
-* [PR 30](https://github.com/spyder-ide/spyder-memory-profiler/pull/30) - PR: Fix opening editor from profiler widget
-* [PR 29](https://github.com/spyder-ide/spyder-memory-profiler/pull/29) - Widget: Fix initialization of TextEditor ([27](https://github.com/spyder-ide/spyder-memory-profiler/issues/27))
-* [PR 28](https://github.com/spyder-ide/spyder-memory-profiler/pull/28) - PR: Transfer CI to GitHub Actions ([26](https://github.com/spyder-ide/spyder-memory-profiler/issues/26), [25](https://github.com/spyder-ide/spyder-memory-profiler/issues/25))
-* [PR 24](https://github.com/spyder-ide/spyder-memory-profiler/pull/24) - PR: Add CONF_DEFAULTS
-
-In this release 4 issues and 5 pull requests were closed.
-
-
## Version 0.2.0 (2019/12/17)
This release updates the plugin to be used with Spyder 4.
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
deleted file mode 100644
index 8d1c8b6..0000000
--- a/CONTRIBUTING.rst
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/MANIFEST.in b/MANIFEST.in
index 116246d..4c871d5 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,2 +1,2 @@
-include CHANGELOG.md LICENSE.txt README.md
+include CHANGELOG.md LICENSE.txt README.rst
recursive-include spyder_memory_profiler *.py *.png
diff --git a/PKG-INFO b/PKG-INFO
new file mode 100644
index 0000000..b8b10d8
--- /dev/null
+++ b/PKG-INFO
@@ -0,0 +1,37 @@
+Metadata-Version: 1.1
+Name: spyder_memory_profiler
+Version: 0.2.dev0
+Summary: Plugin for the Spyder IDE that integrates the Python memory profiler
+Home-page: https://github.com/spyder-ide/spyder-memory-profiler
+Author: Spyder Project Contributors
+Author-email: UNKNOWN
+License: MIT
+Description:
+ This is a plugin for the Spyder IDE that integrates the Python memory profiler.
+ It allows you to see the memory usage in every line.
+
+ Usage
+ -----
+
+ Add a ``@profile`` decorator to the functions that you wish to profile then
+ press Ctrl+Shift+F10 to run the profiler on the current script, or go to
+ ``Run > Profile memory line by line``.
+
+ The results will be shown in a dockwidget, grouped by function. Lines with a
+ stronger color have the largest increments in memory usage.
+
+Keywords: Qt PyQt4 PyQt5 PySide spyder plugins spyplugins profiler
+Platform: UNKNOWN
+Classifier: Development Status :: 4 - Beta
+Classifier: Environment :: X11 Applications :: Qt
+Classifier: Environment :: Win32 (MS Windows)
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: MIT License
+Classifier: Operating System :: OS Independent
+Classifier: Programming Language :: Python :: 2
+Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3.5
+Classifier: Programming Language :: Python :: 3.6
+Classifier: Topic :: Software Development
+Classifier: Topic :: Text Editors :: Integrated Development Environments (IDE)
diff --git a/README.md b/README.md
deleted file mode 100644
index 3bda5ad..0000000
--- a/README.md
+++ /dev/null
@@ -1,65 +0,0 @@
-# Spyder memory profiler plugin
-
-## Project details
-
-![license](https://img.shields.io/pypi/l/spyder-memory-profiler.svg)
-[![conda version](https://img.shields.io/conda/v/spyder-ide/spyder-memory-profiler.svg)](https://www.anaconda.com/download/)
-[![download count](https://img.shields.io/conda/d/spyder-ide/spyder-memory-profiler.svg)](https://www.anaconda.com/download/)
-[![pypi version](https://img.shields.io/pypi/v/spyder-memory-profiler.svg)](https://pypi.python.org/pypi/spyder-memory-profiler)
-[![Join the chat at https://gitter.im/spyder-ide/public](https://badges.gitter.im/spyder-ide/spyder.svg)](https://gitter.im/spyder-ide/public)
-[![OpenCollective Backers](https://opencollective.com/spyder/backers/badge.svg?color=blue)](#backers)
-[![OpenCollective Sponsors](https://opencollective.com/spyder/sponsors/badge.svg?color=blue)](#sponsors)
-
-## Build status
-
-[![Windows status](https://github.com/spyder-ide/spyder-memory-profiler/workflows/Windows%20tests/badge.svg)](https://github.com/spyder-ide/spyder-memory-profiler/actions?query=workflow%3A%22Windows+tests%22)
-[![Linux status](https://github.com/spyder-ide/spyder-memory-profiler/workflows/Linux%20tests/badge.svg)](https://github.com/spyder-ide/spyder-memory-profiler/actions?query=workflow%3A%22Linux+tests%22)
-[![MacOS status](https://github.com/spyder-ide/spyder-memory-profiler/workflows/Macos%20tests/badge.svg)](https://github.com/spyder-ide/spyder-memory-profiler/actions?query=workflow%3A%22Macos+tests%22)
-
-## Description
-
-This is a plugin to run the Python
-[memory_profiler](https://pypi.python.org/pypi/memory_profiler)
-from within the Python IDE [Spyder](https://github.com/spyder-ide/spyder).
-
-The code is an adaptation of the profiler plugin integrated in Spyder.
-
-## Installation
-
-To install this plugin, you can use either ``pip`` or ``conda`` package
-managers, as follows:
-
-Using conda (the recommended way!):
-
-```
-conda install spyder-memory-profiler -c spyder-ide
-```
-
-Using pip:
-
-```
-pip install spyder-memory-profiler
-```
-
-## Usage
-
-Add a `@profile` decorator to the functions that you wish to profile then
-Ctrl+Shift+F10 to run the profiler on the current script, or go to
-`Run > Profile memory line by line`.
-
-The results will be shown in a dockwidget, grouped by function. Lines with a
-stronger color have the largest increments in memory usage (memory profiler).
-
-## Contributing
-
-Everyone is welcome to contribute!
-
-## Sponsors
-
-Spyder and its subprojects are funded thanks to the generous support of
-
-[![Quansight](https://static.wixstatic.com/media/095d2c_2508c560e87d436ea00357abc404cf1d~mv2.png/v1/crop/x_0,y_9,w_915,h_329/fill/w_380,h_128,al_c,usm_0.66_1.00_0.01/095d2c_2508c560e87d436ea00357abc404cf1d~mv2.png)](https://www.quansight.com/)[![Numfocus](https://i2.wp.com/numfocus.org/wp-content/uploads/2017/07/NumFocus_LRG.png?fit=320%2C148&ssl=1)](https://numfocus.org/)
-
-and the donations we have received from our users around the world through [Open Collective](https://opencollective.com/spyder/):
-
-[![Sponsors](https://opencollective.com/spyder/sponsors.svg)](https://opencollective.com/spyder#support)
diff --git a/README.rst b/README.rst
new file mode 100644
index 0000000..987a2a5
--- /dev/null
+++ b/README.rst
@@ -0,0 +1,112 @@
+spyder-memory-profiler
+======================
+
+Project information
+-------------------
+
+.. image:: https://img.shields.io/pypi/l/spyder-memory-profiler.svg
+ :target: https://github.com/spyder-ide/spyder-memory-profiler/blob/master/LICENSE.txt
+
+.. image:: https://img.shields.io/pypi/v/spyder-memory-profiler.svg
+ :target: https://pypi.python.org/pypi/spyder-memory-profiler
+
+.. image:: https://badges.gitter.im/spyder-ide/spyder.svg
+ :target: https://gitter.im/spyder-ide/public
+
+.. image:: https://opencollective.com/spyder/backers/badge.svg?color=blue
+ :target: #backers
+ :alt: OpenCollective Backers
+
+.. image:: https://opencollective.com/spyder/sponsors/badge.svg?color=blue
+ :target: #sponsors
+ :alt: OpenCollective Sponsors
+
+Build information
+-----------------
+
+.. image:: https://travis-ci.org/spyder-ide/spyder-memory-profiler.svg?branch=master
+ :target: https://travis-ci.org/spyder-ide/spyder-memory-profiler
+
+.. image:: https://ci.appveyor.com/api/projects/status/gd88722qallyheoe/branch/master?svg=true
+ :target: https://ci.appveyor.com/project/spyder-ide/spyder-memory-profiler
+
+.. image:: https://circleci.com/gh/spyder-ide/spyder-memory-profiler/tree/master.svg?style=shield
+ :target: https://circleci.com/gh/spyder-ide/spyder-memory-profiler/tree/master
+
+.. image:: https://coveralls.io/repos/github/spyder-ide/spyder-memory-profiler/badge.svg?branch=master
+ :target: https://coveralls.io/github/spyder-ide/spyder-memory-profiler?branch=master
+
+.. image:: https://www.quantifiedcode.com/api/v1/project/4a08fcbf42db40589ec02efd38597e8a/badge.svg
+ :target: https://www.quantifiedcode.com/app/project/4a08fcbf42db40589ec02efd38597e8a
+
+.. image:: https://scrutinizer-ci.com/g/spyder-ide/spyder-memory-profiler/badges/quality-score.png?b=master
+ :target: https://scrutinizer-ci.com/g/spyder-ide/spyder-memory-profiler/?branch=master)
+
+Important Announcement: Spyder is unfunded!
+-------------------------------------------
+
+Since mid November/2017, [Anaconda, Inc](https://www.anaconda.com/) has
+stopped funding Spyder development, after doing it for the past 18
+months. Because of that, development will focus from now on maintaining
+Spyder 3 at a much slower pace than before.
+
+If you want to contribute to maintain Spyder, please consider donating at
+
+https://opencollective.com/spyder
+
+We appreciate all the help you can provide us and can't thank you enough for
+supporting the work of Spyder devs and Spyder development.
+
+If you want to know more about this, please read this
+[page](https://github.com/spyder-ide/spyder/wiki/Anaconda-stopped-funding-Spyder).
+
+Description
+-----------
+
+This is a plugin to run the python `memory_profiler <https://pypi.python.org/pypi/memory_profiler>`_ from within the python IDE `spyder <https://github.com/spyder-ide/spyder>`_.
+
+The code is an adaptation of the profiler plugin integrated in `spyder <https://github.com/spyder-ide/spyder>`_.
+
+Install instructions
+--------------------
+
+The memory-profiler plugin is available in the ``spyder-ide`` channel in
+Anaconda and in PyPI, so it can be installed with the following
+commands:
+
+* Using Anaconda: ``conda install -c spyder-ide spyder-memory-profiler``
+* Using pip: ``pip install spyder-memory-profiler``
+
+All dependencies will be automatically installed. You have to restart
+Spyder before you can use the plugin.
+
+
+Usage
+-----
+
+Add a ``@profile`` decorator to the functions that you wish to profile then Ctrl+Shift+F10 to run the profiler on the current script, or go to ``Run > Profile memory line by line``.
+
+The results will be shown in a dockwidget, grouped by function. Lines with a stronger color have the largest increments in memory usage (memory profiler).
+
+Contributing
+------------
+
+Everyone is welcome to contribute!
+
+Backers
+~~~~~~~
+
+Support us with a monthly donation and help us continue our activities.
+
+.. image:: https://opencollective.com/spyder/backers.svg
+ :target: https://opencollective.com/spyder#support
+ :alt: Backers
+
+Sponsors
+~~~~~~~~
+
+Become a sponsor to get your logo on our README on Github.
+
+.. image:: https://opencollective.com/spyder/sponsors.svg
+ :target: https://opencollective.com/spyder#support
+ :alt: Sponsors
diff --git a/debian/changelog b/debian/changelog
index f502b7b..bb210a3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+spyder-memory-profiler (0.2.dev0-1) UNRELEASED; urgency=low
+
+ * New upstream release.
+
+ -- Debian Janitor <janitor@jelmer.uk> Wed, 16 Mar 2022 19:11:36 -0000
+
spyder-memory-profiler (0.2.1-1) unstable; urgency=medium
* Team upload.
diff --git a/requirements/conda.txt b/requirements/conda.txt
deleted file mode 100644
index b271903..0000000
--- a/requirements/conda.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-memory_profiler
-spyder >=4.0.0b5
diff --git a/requirements/tests.txt b/requirements/tests.txt
deleted file mode 100644
index 37ab768..0000000
--- a/requirements/tests.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-codecov
-pytest
-pytest-cov
-pytest-qt
diff --git a/setup.cfg b/setup.cfg
new file mode 100644
index 0000000..8bfd5a1
--- /dev/null
+++ b/setup.cfg
@@ -0,0 +1,4 @@
+[egg_info]
+tag_build =
+tag_date = 0
+
diff --git a/spyder_memory_profiler.egg-info/PKG-INFO b/spyder_memory_profiler.egg-info/PKG-INFO
new file mode 100644
index 0000000..fd0a6ef
--- /dev/null
+++ b/spyder_memory_profiler.egg-info/PKG-INFO
@@ -0,0 +1,37 @@
+Metadata-Version: 1.1
+Name: spyder-memory-profiler
+Version: 0.2.dev0
+Summary: Plugin for the Spyder IDE that integrates the Python memory profiler
+Home-page: https://github.com/spyder-ide/spyder-memory-profiler
+Author: Spyder Project Contributors
+Author-email: UNKNOWN
+License: MIT
+Description:
+ This is a plugin for the Spyder IDE that integrates the Python memory profiler.
+ It allows you to see the memory usage in every line.
+
+ Usage
+ -----
+
+ Add a ``@profile`` decorator to the functions that you wish to profile then
+ press Ctrl+Shift+F10 to run the profiler on the current script, or go to
+ ``Run > Profile memory line by line``.
+
+ The results will be shown in a dockwidget, grouped by function. Lines with a
+ stronger color have the largest increments in memory usage.
+
+Keywords: Qt PyQt4 PyQt5 PySide spyder plugins spyplugins profiler
+Platform: UNKNOWN
+Classifier: Development Status :: 4 - Beta
+Classifier: Environment :: X11 Applications :: Qt
+Classifier: Environment :: Win32 (MS Windows)
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: MIT License
+Classifier: Operating System :: OS Independent
+Classifier: Programming Language :: Python :: 2
+Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3.5
+Classifier: Programming Language :: Python :: 3.6
+Classifier: Topic :: Software Development
+Classifier: Topic :: Text Editors :: Integrated Development Environments (IDE)
diff --git a/spyder_memory_profiler.egg-info/SOURCES.txt b/spyder_memory_profiler.egg-info/SOURCES.txt
new file mode 100644
index 0000000..a093008
--- /dev/null
+++ b/spyder_memory_profiler.egg-info/SOURCES.txt
@@ -0,0 +1,23 @@
+CHANGELOG.md
+LICENSE.txt
+MANIFEST.in
+README.rst
+setup.py
+spyder_memory_profiler/__init__.py
+spyder_memory_profiler/memoryprofiler.py
+spyder_memory_profiler.egg-info/PKG-INFO
+spyder_memory_profiler.egg-info/SOURCES.txt
+spyder_memory_profiler.egg-info/dependency_links.txt
+spyder_memory_profiler.egg-info/requires.txt
+spyder_memory_profiler.egg-info/top_level.txt
+spyder_memory_profiler/data/__init__.py
+spyder_memory_profiler/data/images/__init__.py
+spyder_memory_profiler/data/images/spyder.memory_profiler.png
+spyder_memory_profiler/example/__init__.py
+spyder_memory_profiler/example/profiling_test_script.py
+spyder_memory_profiler/example/subdir/__init__.py
+spyder_memory_profiler/example/subdir/profiling_test_script2.py
+spyder_memory_profiler/widgets/__init__.py
+spyder_memory_profiler/widgets/memoryprofiler.py
+spyder_memory_profiler/widgets/tests/__init__.py
+spyder_memory_profiler/widgets/tests/test_memoryprofiler.py
\ No newline at end of file
diff --git a/spyder_memory_profiler.egg-info/dependency_links.txt b/spyder_memory_profiler.egg-info/dependency_links.txt
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/spyder_memory_profiler.egg-info/dependency_links.txt
@@ -0,0 +1 @@
+
diff --git a/spyder_memory_profiler.egg-info/requires.txt b/spyder_memory_profiler.egg-info/requires.txt
new file mode 100644
index 0000000..9613ebd
--- /dev/null
+++ b/spyder_memory_profiler.egg-info/requires.txt
@@ -0,0 +1,2 @@
+memory_profiler
+spyder>=4
diff --git a/spyder_memory_profiler.egg-info/top_level.txt b/spyder_memory_profiler.egg-info/top_level.txt
new file mode 100644
index 0000000..8a43071
--- /dev/null
+++ b/spyder_memory_profiler.egg-info/top_level.txt
@@ -0,0 +1 @@
+spyder_memory_profiler
diff --git a/spyder_memory_profiler/__init__.py b/spyder_memory_profiler/__init__.py
index 8d11d97..27983ff 100644
--- a/spyder_memory_profiler/__init__.py
+++ b/spyder_memory_profiler/__init__.py
@@ -4,7 +4,7 @@
# Licensed under the terms of the MIT License
# (see LICENSE.txt for details)
-__version__ = '0.2.1'
+__version__ = '0.2.dev0'
# =============================================================================
# The following statements are required to register this 3rd party plugin:
diff --git a/spyder_memory_profiler/memoryprofiler.py b/spyder_memory_profiler/memoryprofiler.py
index 5d6482a..2f53063 100644
--- a/spyder_memory_profiler/memoryprofiler.py
+++ b/spyder_memory_profiler/memoryprofiler.py
@@ -17,6 +17,7 @@ MAIN_APP = qapplication()
from spyder.api.plugins import SpyderPluginWidget
from spyder.api.preferences import PluginConfigPage
from spyder.config.base import get_translation
+from spyder.preferences import runconfig
from spyder.utils.qthelpers import get_icon, create_action
# Local imports
@@ -70,8 +71,8 @@ class MemoryProfilerConfigPage(PluginConfigPage):
class MemoryProfiler(SpyderPluginWidget):
"""Memory profiler."""
CONF_SECTION = 'memoryprofiler'
- CONF_DEFAULTS = [(CONF_SECTION, {'use_colors': True})]
CONFIGWIDGET_CLASS = MemoryProfilerConfigPage
+ edit_goto = Signal(str, int, str)
def __init__(self, parent=None):
SpyderPluginWidget.__init__(self, parent)
@@ -82,15 +83,6 @@ class MemoryProfiler(SpyderPluginWidget):
layout.addWidget(self.widget)
self.setLayout(layout)
- def update_pythonpath(self):
- """
- Update the PYTHONPATH used when running the line_profiler.
- This function is called whenever the Python path set in Spyder changes.
- It synchronizes the PYTHONPATH in the line_profiler widget with the
- PYTHONPATH in Spyder.
- """
- self.widget.spyder_pythonpath = self.main.get_spyder_pythonpath()
-
# --- SpyderPluginWidget API ----------------------------------------------
def get_plugin_title(self):
"""Return widget title."""
@@ -120,11 +112,7 @@ class MemoryProfiler(SpyderPluginWidget):
"""Register plugin in Spyder's main window."""
super(MemoryProfiler, self).register_plugin()
- # Spyder PYTHONPATH
- self.update_pythonpath()
- self.main.sig_pythonpath_changed.connect(self.update_pythonpath)
-
- self.widget.datatree.edit_goto.connect(self.main.editor.load)
+ self.edit_goto.connect(self.main.editor.load)
self.widget.redirect_stdio.connect(self.main.redirect_internalshell_stdio)
memoryprofiler_act = create_action(self,
@@ -158,5 +146,15 @@ class MemoryProfiler(SpyderPluginWidget):
"""Reimplement analyze method."""
if self.dockwidget:
self.switch_to_plugin()
+ pythonpath = self.main.get_spyder_pythonpath()
+ runconf = runconfig.get_run_configuration(filename)
+ wdir, args = None, None
+ if runconf is not None:
+ if runconf.wdir_enabled:
+ wdir = runconf.wdir
+ if runconf.args_enabled:
+ args = runconf.args
+
self.widget.analyze(
- filename, use_colors=self.get_option('use_colors', True))
+ filename, wdir=wdir, args=args, pythonpath=pythonpath,
+ use_colors=self.get_option('use_colors', True))
diff --git a/spyder_memory_profiler/widgets/memoryprofiler.py b/spyder_memory_profiler/widgets/memoryprofiler.py
index d48539b..fa0ecb4 100644
--- a/spyder_memory_profiler/widgets/memoryprofiler.py
+++ b/spyder_memory_profiler/widgets/memoryprofiler.py
@@ -76,11 +76,6 @@ class MemoryProfilerWidget(QWidget):
def __init__(self, parent):
QWidget.__init__(self, parent)
- # Need running QApplication before importing runconfig
- from spyder.preferences import runconfig
- self.runconfig = runconfig
- self.spyder_pythonpath = None
-
self.setWindowTitle("Memory profiler")
self.output = None
@@ -98,8 +93,7 @@ class MemoryProfilerWidget(QWidget):
self, icon=get_icon('run.png'),
text=_("Profile memory usage"),
tip=_("Run memory profiler"),
- triggered=(lambda checked=False: self.analyze()),
- text_beside_icon=True)
+ triggered=self.start, text_beside_icon=True)
self.stop_button = create_toolbutton(
self,
icon=get_icon('terminate.png'),
@@ -175,42 +169,23 @@ class MemoryProfilerWidget(QWidget):
else:
pass # self.show_data()
- def analyze(self, filename=None, wdir=None, args=None, pythonpath=None,
+ def analyze(self, filename, wdir=None, args=None, pythonpath=None,
use_colors=True):
self.use_colors = use_colors
if not is_memoryprofiler_installed():
return
self.kill_if_running()
- # FIXME: storing data is not implemented yet
- if filename is not None:
- filename = osp.abspath(to_text_string(filename))
- index = self.filecombo.findText(filename)
- if index == -1:
- self.filecombo.addItem(filename)
- self.filecombo.setCurrentIndex(self.filecombo.count()-1)
- else:
- self.filecombo.setCurrentIndex(index)
- self.filecombo.selected()
+ #index, _data = self.get_data(filename)
+ index = None # FIXME: storing data is not implemented yet
+ if index is None:
+ self.filecombo.addItem(filename)
+ self.filecombo.setCurrentIndex(self.filecombo.count()-1)
+ else:
+ self.filecombo.setCurrentIndex(self.filecombo.findText(filename))
+ self.filecombo.selected()
if self.filecombo.is_valid():
- filename = to_text_string(self.filecombo.currentText())
- runconf = self.runconfig.get_run_configuration(filename)
- if runconf is not None:
- if wdir is None:
- if runconf.wdir_enabled:
- wdir = runconf.wdir
- elif runconf.cw_dir:
- wdir = os.getcwd()
- elif runconf.file_dir:
- wdir = osp.dirname(filename)
- elif runconf.fixed_dir:
- wdir = runconf.dir
- if args is None:
- if runconf.args_enabled:
- args = runconf.args
if wdir is None:
wdir = osp.dirname(filename)
- if pythonpath is None:
- pythonpath = self.spyder_pythonpath
self.start(wdir, args, pythonpath)
def select_file(self):
@@ -221,25 +196,15 @@ class MemoryProfilerWidget(QWidget):
self.redirect_stdio.emit(False)
if filename:
self.analyze(filename)
-
def show_log(self):
if self.output:
- editor = TextEditor(self.output, title=_("Memory profiler output"),
- readonly=True)
- # Call .show() to dynamically resize editor;
- # see spyder-ide/spyder#12202
- editor.show()
- editor.exec_()
+ TextEditor(self.output, title=_("Memory profiler output"),
+ readonly=True, size=(700, 500)).exec_()
def show_errorlog(self):
if self.error_output:
- editor = TextEditor(self.error_output,
- title=_("Memory profiler output"),
- readonly=True)
- # Call .show() to dynamically resize editor;
- # see spyder-ide/spyder#12202
- editor.show()
- editor.exec_()
+ TextEditor(self.error_output, title=_("Memory profiler output"),
+ readonly=True, size=(700, 500)).exec_()
def start(self, wdir=None, args=None, pythonpath=None):
filename = to_text_string(self.filecombo.currentText())
@@ -374,8 +339,6 @@ class MemoryProfilerDataTree(QTreeWidget):
Convenience tree widget (with built-in model)
to store and view memory profiler data.
"""
- edit_goto = Signal(str, int, str)
-
def __init__(self, parent=None):
QTreeWidget.__init__(self, parent)
self.header_list = [
@@ -616,7 +579,7 @@ class MemoryProfilerDataTree(QTreeWidget):
def item_activated(self, item):
filename, line_no = item.data(COL_POS, Qt.UserRole)
- self.edit_goto.emit(filename, line_no, '')
+ self.parent().edit_goto.emit(filename, line_no, '')
def test():
Debdiff
[The following lists of changes regard files as different if they have different names, permissions or owners.]
Files in second set of .debs but not in first
-rw-r--r-- root/root /usr/lib/python3/dist-packages/spyder_memory_profiler-0.2.dev0.egg-info/PKG-INFO -rw-r--r-- root/root /usr/lib/python3/dist-packages/spyder_memory_profiler-0.2.dev0.egg-info/dependency_links.txt -rw-r--r-- root/root /usr/lib/python3/dist-packages/spyder_memory_profiler-0.2.dev0.egg-info/requires.txt -rw-r--r-- root/root /usr/lib/python3/dist-packages/spyder_memory_profiler-0.2.dev0.egg-info/top_level.txt
Files in first set of .debs but not in second
-rw-r--r-- root/root /usr/lib/python3/dist-packages/spyder_memory_profiler-0.2.1.egg-info/PKG-INFO -rw-r--r-- root/root /usr/lib/python3/dist-packages/spyder_memory_profiler-0.2.1.egg-info/dependency_links.txt -rw-r--r-- root/root /usr/lib/python3/dist-packages/spyder_memory_profiler-0.2.1.egg-info/requires.txt -rw-r--r-- root/root /usr/lib/python3/dist-packages/spyder_memory_profiler-0.2.1.egg-info/top_level.txt
No differences were encountered in the control files