pax_global_header 0000666 0000000 0000000 00000000064 15146020043 0014505 g ustar 00root root 0000000 0000000 52 comment=76c2eb88fc078020f3ed7181856bed2edee334c6
taurus_pyqtgraph-0.9.8-76c2eb88fc078020f3ed7181856bed2edee334c6/ 0000775 0000000 0000000 00000000000 15146020043 0022676 5 ustar 00root root 0000000 0000000 taurus_pyqtgraph-0.9.8-76c2eb88fc078020f3ed7181856bed2edee334c6/.editorconfig 0000664 0000000 0000000 00000000444 15146020043 0025355 0 ustar 00root root 0000000 0000000 # http://editorconfig.org
root = true
[*]
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true
charset = utf-8
end_of_line = lf
[*.bat]
indent_style = tab
end_of_line = crlf
[LICENSE]
insert_final_newline = false
[Makefile]
indent_style = tab
taurus_pyqtgraph-0.9.8-76c2eb88fc078020f3ed7181856bed2edee334c6/.gitattributes 0000664 0000000 0000000 00000000014 15146020043 0025564 0 ustar 00root root 0000000 0000000 * text=auto
taurus_pyqtgraph-0.9.8-76c2eb88fc078020f3ed7181856bed2edee334c6/.github/ 0000775 0000000 0000000 00000000000 15146020043 0024236 5 ustar 00root root 0000000 0000000 taurus_pyqtgraph-0.9.8-76c2eb88fc078020f3ed7181856bed2edee334c6/.github/workflows/ 0000775 0000000 0000000 00000000000 15146020043 0026273 5 ustar 00root root 0000000 0000000 taurus_pyqtgraph-0.9.8-76c2eb88fc078020f3ed7181856bed2edee334c6/.github/workflows/publish_conda.yml 0000664 0000000 0000000 00000000647 15146020043 0031637 0 ustar 00root root 0000000 0000000 name: Publish to Anaconda Cloud
on:
release:
types: [published]
workflow_dispatch:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+*'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: publish-to-conda
uses: taurus-org/publish-conda-action@v2
with:
subdir: 'conda'
anacondatoken: ${{ secrets.ANACONDA_TOKEN }}
platforms: 'noarch'
taurus_pyqtgraph-0.9.8-76c2eb88fc078020f3ed7181856bed2edee334c6/.github/workflows/publish_pypi.yml 0000664 0000000 0000000 00000001231 15146020043 0031522 0 ustar 00root root 0000000 0000000 name: Publish to PyPI
on:
release:
types: [published]
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+*'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
taurus_pyqtgraph-0.9.8-76c2eb88fc078020f3ed7181856bed2edee334c6/.github/workflows/test_with_tox.yml 0000664 0000000 0000000 00000001730 15146020043 0031723 0 ustar 00root root 0000000 0000000 name: Test Package
on: [push, pull_request]
jobs:
tox_tests:
runs-on: ubuntu-latest
strategy:
matrix:
python: [3.5, 3.6, 3.7, 3.8]
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Install Tox and any other packages
run: pip install tox
- name: Run Tox
if: ${{ matrix.python != '3.5' }}
# Run tox using the version of Python in `PATH`
run: tox -e py
- name: Run Tox for 3.5
if: ${{ matrix.python == '3.5' }}
# Run tox using the version of Python in `PATH`
run: tox -e py35
flake8_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install flake8
run: pip install flake8
- name: Run flake8
run: flake8 .
taurus_pyqtgraph-0.9.8-76c2eb88fc078020f3ed7181856bed2edee334c6/.gitignore 0000664 0000000 0000000 00000002300 15146020043 0024661 0 ustar 00root root 0000000 0000000 # Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
target/
# Jupyter Notebook
.ipynb_checkpoints
# pyenv
.python-version
# celery beat schedule file
celerybeat-schedule
# SageMath parsed files
*.sage.py
# dotenv
.env
# virtualenv
.venv
venv/
ENV/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/public
# mypy
.mypy_cache/
# Pycharm project files
/.idea/
taurus_pyqtgraph-0.9.8-76c2eb88fc078020f3ed7181856bed2edee334c6/.gitlab-ci.yml 0000664 0000000 0000000 00000003650 15146020043 0025336 0 ustar 00root root 0000000 0000000 stages:
- linter
- test
- deploy
tests:
# run test suite in various environments
parallel:
matrix:
- TAURUS_TAG: ["bullseye"]
QT_API: ["pyqt5", "pyside2"]
- TAURUS_TAG: ["conda-3.6", "conda-3.7-9.3.6", "conda-3.8-9.3.6", "conda-3.9-9.3.6"]
QT_API: ["pyqt5"]
stage: test
variables:
PYTEST_QT_API: $QT_API
image:
name: registry.gitlab.com/taurus-org/taurus-docker:$TAURUS_TAG
before_script:
- pip install -e .
script:
- python3 -m pytest .
flake8:
stage: linter
image:
name: python:3.9-alpine
before_script:
- pip install flake8
script:
- flake8 .
deploy_to_pypi:
stage:
deploy
image:
name: python:3.9-slim-bullseye
before_script:
- pip install twine
variables:
TWINE_USERNAME: $PYPI_USERNAME
TWINE_PASSWORD: $PYPI_PASSWORD
script:
- python setup.py sdist bdist_wheel
- twine upload dist/*
rules:
- if: $CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+.*$/
pages:
stage: deploy
image: python:3.10-slim
before_script:
- apt update && apt install ffmpeg libsm6 libxext6 -y
- pip install --upgrade pip
- pip install -U pytango taurus PyQt5 pyqtgraph sphinx sphinx-rtd-theme sphinx-mdinclude pyyaml lxml
script:
- sphinx-build -b html ./docs/source ./public/$PUBLISH_PATH
- mv ./docs/source/index.html ./public/
- echo "Published at https://taurus-org.gitlab.io/taurus_pyqtgraph/$PUBLISH_PATH"
artifacts:
paths:
- public/
environment:
name: Documentation
url: "https://taurus-org.gitlab.io/taurus_pyqtgraph/$PUBLISH_PATH"
rules:
- if: $CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+.*$/
variables:
PUBLISH_PATH: $CI_COMMIT_TAG
- if: $CI_COMMIT_BRANCH =~ /^(stable|develop)$/
variables:
PUBLISH_PATH: $CI_COMMIT_BRANCH
taurus_pyqtgraph-0.9.8-76c2eb88fc078020f3ed7181856bed2edee334c6/CHANGELOG.md 0000664 0000000 0000000 00000006532 15146020043 0024515 0 ustar 00root root 0000000 0000000 # Change Log
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
This file follows the formats and conventions from [keepachangelog.com]
## [Unreleased]
### Added
### Fixed
## 0.9.8
### Added
- Added documentation with developing examples.
- Added curveAppearanceChooserChanged signal to curvespropertiestool. (!136, #144)
- Added mechanism to disable options at plot configuration dialog. (!137, #145)
- Added compatibility with taurus designer, now Trend and Plot are loaded as plugins in taurus designer. (!130, !110)
- Also in taurus:
- https://gitlab.com/taurus-org/taurus/-/merge_requests/1268
- https://gitlab.com/taurus-org/taurus/-/merge_requests/1265
- https://gitlab.com/taurus-org/taurus/-/issues/1307
- Set maximum version of pyqtgraph to 0.13.7.
### Fixed
- Refactored curvesproperties class to get the signal 'curveAppearanceChooserChanged' from curvespropertiestool.
That way there is no need to forward signals from one signal to another. (!136, #144)
- Refactored plot, trend and test classes to export/use cprop_tool without '_'. (!136, #144)
- Refactored plot configuration dialog to be more user-friendly. (!137, #145)
- Changed TextColorRole to ForegroundRole to be compatible with PyQt6. (!133)
## 0.9.7
### Fixed
- Changed the decimation by default, and simplified the pop ups for the user.
- Set archiving decimation to default.
## 0.9.6
### Fixed
- Bug fix related to archiving with decimation. (!132)
## 0.9.5
### Added
- Added configuration decimation dialog for querying data to pyhdbpp using the decimation features.
### Fixed
- Modified docker images names to get the correct ones.
- Changed query window for archiving integration,
instead of querying from the oldest visible date to the oldest known point it will query
from the oldest visible date to the newer visible date. (!126)
- Commented step of parametrized test that was failing with python3.9 with no apparent reason. (#132)
## 0.9.4
### Added
- Added documentation for the installation and usage of taurus_pyqtgraph. (!124)
### Fixed
- Gitignore file to ignore /public folder on documentation generation.
- Added support for bool, int and float values when rvalue has no magnitude on taurus trend sets.
## 0.9.3
### Added
- Save configuration now saves 3 property configurations to configdict: dynamicRange, leftAxisLogMode and bottomAxisLogMode (#122, !126)
### Fixed
- Handled those attributes that cannot be plotted and the corresponding legend is not added due to the fact that the associated device is down or the attribute doesn't exist. (!123)
## 0.9.2
### Fixed
- General bug fixes
## 0.9.1
### Added
- First release with this changelog being updated.
- Curves names shown at the inspector mode tooltip. (#121, !117)
### Fixed
- Solve bug with statistics dialog. (#125, !118)
- Fix f-string new format to .format style. (!119)
## 0.9.0
### Added
- Added range selector for X Axis view on trends. (#108, !112)
- Added basic "Taurus4 compatible" data file export option. (!113)
- Added new method to taurus trend to set logarithmic mode programmatically. (!115)
- Added pyhdbpp as an optional dependency . (!116)
[keepachangelog.com]: http://keepachangelog.com
[TEP17]: https://github.com/taurus-org/taurus/pull/452
[Unreleased]: https://gitlab.com/taurus-org/taurus_pyqtgraph/-/tree/main
taurus_pyqtgraph-0.9.8-76c2eb88fc078020f3ed7181856bed2edee334c6/CONTRIBUTING.md 0000775 0000000 0000000 00000006322 15146020043 0025135 0 ustar 00root root 0000000 0000000 # Guidelines for Contributing to taurus_pyqtgraph
Contributions are always welcome. You can contribute by sending feedback
(use our [issue tracker][] for that) or by proposing a code change via a
[Pull Request][]
The taurus_pyqtgraph repository uses the [gitflow][] branching
model (i.e. features are developed on individual feature branches
and they are eventually merged into the man branch, which is
considered always "deployable".
- `stable`: used for official releases. **Contributors should
not need to use it or care about it**
- `develop`: reflects the latest integrated changes for the next
release. This is the one that should be used as the base for
developing new features or fixing bugs.
For the contributions, we use the [Fork & Pull Model][]:
1. the contributor first [forks][] the official repository
2. the contributor commits changes to a branch based on the
`develop` branch and pushes it to the forked repository.
3. the contributor creates a [Pull Request][] against the `develop`
branch of the official repository.
4. anybody interested may review and comment on the Pull Request, and
suggest changes to it (even doing Pull Requests against the Pull
Request branch). At this point more changes can be committed on the
requestor's branch until the result is satisfactory.
5. once the proposed code is considered ready by an appointed taurus
integrator, the integrator merges the pull request into `develop`.
## Important considerations:
In general, the contributions to should consider following:
- The code must comply with the [Taurus coding conventions][]
- The contributor must be clearly identified. The commit author
email should be valid and usable for contacting him/her.
- Commit messages should follow the [commit message guidelines][].
Contributions may be rejected if their commit messages are poor.
- The licensing terms for the contributed code must be compatible
with (and preferably the same as) the license chosen for the Taurus
project (at the time of writing this TEP, it is the [LGPL][],
version 3 *or later*).
## Notes:
- If the contributor wants to explicitly bring the attention of some
specific person to the review process, [mentions][] can be used
- If a pull request (or a specific commit) fixes an open issue, the pull
request (or commit) message may contain a `Fixes #N` tag (N being
the number of the issue) which will automatically [close the related
Issue][tag_issue_closing]
[issue tracker]: https://github.com/taurus-org/taurus_pyqtgraph/issues
[gitflow]: http://nvie.com/posts/a-successful-git-branching-model/
[Fork & Pull Model]: https://en.wikipedia.org/wiki/Fork_and_pull_model
[forks]: https://help.github.com/articles/fork-a-repo/
[Pull Request]: https://help.github.com/articles/creating-a-pull-request/
[commit message guidelines]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
[GitHubFlow]: https://guides.github.com/introduction/flow/index.html
[mentions]: https://github.com/blog/821-mention-somebody-they-re-notified
[tag_issue_closing]: https://help.github.com/articles/closing-issues-via-commit-messages/
[Taurus coding conventions]: http://taurus-scada.org/devel/coding_guide.html
[LGPL]: http://www.gnu.org/licenses/lgpl.html
taurus_pyqtgraph-0.9.8-76c2eb88fc078020f3ed7181856bed2edee334c6/LICENSE.txt 0000664 0000000 0000000 00000002713 15146020043 0024524 0 ustar 00root root 0000000 0000000 taurus_pyqtgraph is a plugin for the Taurus project and can be considered
as part of the Taurus project. It is Free Software by the CELLS / ALBA
Synchrotron, Bellaterra, Spain
SECTION 1: GENERAL LICENSE FOR TAURUS_PYQTGRAPH SOURCE CODE
===========================================================
The files in taurus_pyqtgraph, except for the cases described in SECTION 2
are distributed under the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
See
SECTION 2: EXCEPTIONS
=====================
Some files (e.g., those authored by 3rd parties or the documentation
sources) are distributed under Free Software / documentation licenses
that may differ from the the general one defined in SECTION 1.
The following is a list of these exceptions:
2.1: Explicit copyright info in header/metadata:
------------------------------------------------
If a file contains an explicit license or other copyright information in
its header or metadata which differs from the one defined in SECTION 1,
or the following sections, such license/copyright info mentioned in the
header/metadata prevails.
2.2: Documentation:
-------------------
The .py scripts in the doc directory are treated as per SECTION 1,
and the rest of its files are distributed under a Creative Commons
Attribution 3.0 License
See
taurus_pyqtgraph-0.9.8-76c2eb88fc078020f3ed7181856bed2edee334c6/MANIFEST.in 0000664 0000000 0000000 00000000372 15146020043 0024436 0 ustar 00root root 0000000 0000000 graft taurus_pyqtgraph
include LICENSE.txt
include CHANGELOG.md
include CONTRIBUTING.md
recursive-include tests *
recursive-exclude * __pycache__
recursive-exclude * *.py[co]
recursive-include docs *.rst conf.py Makefile make.bat *.jpg *.png *.gif
taurus_pyqtgraph-0.9.8-76c2eb88fc078020f3ed7181856bed2edee334c6/Makefile 0000664 0000000 0000000 00000004351 15146020043 0024341 0 ustar 00root root 0000000 0000000 .PHONY: clean clean-test clean-pyc clean-build docs help
.DEFAULT_GOAL := help
define BROWSER_PYSCRIPT
import os, webbrowser, sys
try:
from urllib import pathname2url
except:
from urllib.request import pathname2url
webbrowser.open("file://" + pathname2url(os.path.abspath(sys.argv[1])))
endef
export BROWSER_PYSCRIPT
define PRINT_HELP_PYSCRIPT
import re, sys
for line in sys.stdin:
match = re.match(r'^([a-zA-Z_-]+):.*?## (.*)$$', line)
if match:
target, help = match.groups()
print("%-20s %s" % (target, help))
endef
export PRINT_HELP_PYSCRIPT
BROWSER := python -c "$$BROWSER_PYSCRIPT"
help:
@python -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST)
clean: clean-build clean-pyc clean-test ## remove all build, test, coverage and Python artifacts
clean-build: ## remove build artifacts
rm -fr build/
rm -fr dist/
rm -fr .eggs/
find . -name '*.egg-info' -exec rm -fr {} +
find . -name '*.egg' -exec rm -f {} +
clean-pyc: ## remove Python file artifacts
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
find . -name '__pycache__' -exec rm -fr {} +
clean-test: ## remove test and coverage artifacts
rm -fr .tox/
rm -f .coverage
rm -fr htmlcov/
rm -fr .pytest_cache
lint: ## check style with flake8
flake8 taurus_pyqtgraph tests
test: ## run tests quickly with the default Python
py.test
test-all: ## run tests on every Python version with tox
tox
coverage: ## check code coverage quickly with the default Python
coverage run --source taurus_pyqtgraph -m pytest
coverage report -m
coverage html
$(BROWSER) htmlcov/index.html
docs: ## generate Sphinx HTML documentation, including API docs
rm -f docs/taurus_pyqtgraph.rst
rm -f docs/modules.rst
sphinx-apidoc -o docs/ taurus_pyqtgraph
$(MAKE) -C docs clean
$(MAKE) -C docs html
$(BROWSER) docs/_build/html/index.html
servedocs: docs ## compile the docs watching for changes
watchmedo shell-command -p '*.rst' -c '$(MAKE) -C docs html' -R -D .
release: dist ## package and upload a release
twine upload dist/*
dist: clean ## builds source and wheel package
python setup.py sdist
python setup.py bdist_wheel
ls -l dist
install: clean ## install the package to the active Python's site-packages
python setup.py install
taurus_pyqtgraph-0.9.8-76c2eb88fc078020f3ed7181856bed2edee334c6/README.md 0000664 0000000 0000000 00000012105 15146020043 0024154 0 ustar 00root root 0000000 0000000 # Introduction
`taurus_pyqtgraph` is an extension package for the [Taurus] package. It
adds the `taurus.qt.qtgui.tpg` submodule which provides [pyqtgraph]-based
widgets.
The rationale behind taurus_pyqtgraph is described in the [TEP17]
## Install
Just install this module e.g.:
For the latest release in PyPI:
`pip install taurus_pyqtgraph`
Or locally:
`pip install .`
If you need Archiving support (HDB++) on trends install it typing:
`pip install taurus_pyqtgraph[Archiving]`
Or locally:
`pip install .[Archiving]`
Alternatively, you can install with conda:
`conda install -c conda-forge -c taurus-org taurus_pyqtgraph`
For development, use a python3 virtual env (or conda, or similar) and:
```
git clone https://github.com/taurus-org/taurus_pyqtgraph.git
cd taurus_pyqtgraph
pip install -r requirements_dev.txt -r requirements.txt
pip install -e .
```
After successful installation, the module will be accessible as `taurus.qt.qtgui.tpg`
and `taurus_tpg`, and `tpg` will be registered as an alternative implementation for
plots and trends in the `taurus` CLI.
## Features implementation checklist
`taurus_pyqtgraph` is still in alpha stage. Its API may be subject to
change before the 1.0.0 release.
This is a list of planned / done features. The tasks which are checked are
those for which there is already an alpha-quality prototype:
### For 1D plots
- [x] 1D plot: plot of multiple 1D models with auto-changing color and
availability of legend
- [x] Date-time support on X axis (display only, see "UI for
setting scale limits *in date/time format*" below)
- [x] Stand-alone widget
- [x] Zooming & panning with "restore original view" option (not the same
as zoom stacking, see below)
- [x] Possibility to use (at least) 2 Y-scales
- [x] UI for adding taurus curves via ModelChooser. See also
"Improved Model Chooser" below
- [x] Store/retreive configuration (save/load settings)
- [x] Support for non-taurus curves in same plot (aka "raw data")
- [x] UI for setting scale limits and lin/log options
- [x] Export data as ascii: without date-time support
- [x] Export plot as image
- [x] UI for moving a curve from one Y-scale to another
- [x] UI for choosing line color, thickness symbol, filling...
- [x] Arbitrary Label scale (aka FixedLabelsScale)
- [x] configurable properties support (setting permanence)
Outside TEP17 scope:
- [x] UI for setting scale limits *in date/time format* (S16)
- [x] Point-picking (aka "inspect mode")
- [ ] Date-time support in "export data as ascii" (S24)
- [ ] Plot freeze (pause) (S8)
- [x] Improved Model Chooser: replacement of the "input data selection"
dialog allowing to choose *both* X and Y models (see curve selection
dialog in extra_guiqwt's tauruscurve)
- [x] Drop support for taurus attributes
- [ ] Zoom stack: possibility of stacking zoom levels and navigating back
one level at a time. (C16)
- [ ] Cursor position info (display X-Y position of cursor in active axis
coords) (C2)
- [ ] 1D ROI selector (C2)
- [ ] Curve statistics calculator (mean, stdev...) as in curve stats
dialog of TaurusPlot/Trend (C8)
- [x] UI for changing curve names
- [ ] Peak locator: Visual label min/max of curves (C12)
- [ ] UI for adding raw data (W8)
### For 1D trends
Most of the features mentioned for 1D plots affect the 1D trends as
well. Apart from those, here is a list of more specific features of
trends:
- [x] "1D trends": plot of scalars vs event number or timestamp
- [x] Fixed-range scale (aka oscilloscope mode)
- [x] UI to switch between fixed and free scale mode
- [x] Stand-alone Widget
- [x] Support for forced-reading of attributes (aka "-r mode")
- [x] UI for forced-reading mode
- [x] configurable properties support (setting permanence)
Outside TEP17 scope:
- [x] "Trend sets": plot of 1D attribute vs time interpreting it as a set
of 1D scalars
- [x] Accessing Archived values. Done via [taurus_tangoarchiving plugin]
- [ ] Accessing Tango Polling buffer (W24)
- [x] Support for limiting curve buffers
- [x] UI for curve buffers
### For 2D plots (images)
Outside TEP17 scope:
- [x] Plot a single image
- [x] UI for Add/remove image
- [ ] Stand-alone Widget (M8)
- [ ] "calibrated" XYImage (assigning values to X and Y scale, as in
guiqwt's XYImageItem) S8
- [ ] Cross sections (slicing) (S4)
- [ ] 2D ROI Selector (S4)
- [x] LUT/contrast control (S0)
- [ ] Drop support for taurus attributes (C4)
- [ ] LogZ scale (C?)
- [ ] Annotation/measure tools (C16)
### For 2D trends (spectrograms)
Most of the features for 2D plots affect also the 2D trends. Apart
from those, here is a list of more specific features of 2D trends:
Outside TEP17 scope:
- [ ] Stand-alone Widget (M8)
- [ ] Absolute date-time scale (display, see same feat in TaurusPlot)
- [ ] Fixed-range scale (aka oscilloscope mode, same as for 1Dtrends) (M8)
- [ ] UI to switch between fixed and free scale mode (S12)
### In general:
- [x] Document all public API
- [x] Make all code pep8-clean
[Taurus]: http://taurus-scada.org
[pyqtgraph]: http://pyqtgraph.org
[TEP17]: https://github.com/taurus-org/taurus/pull/452
[taurus_tangoarchiving plugin]: https://github.com/taurus-org/taurus_tangoarchiving
taurus_pyqtgraph-0.9.8-76c2eb88fc078020f3ed7181856bed2edee334c6/conda/ 0000775 0000000 0000000 00000000000 15146020043 0023762 5 ustar 00root root 0000000 0000000 taurus_pyqtgraph-0.9.8-76c2eb88fc078020f3ed7181856bed2edee334c6/conda/meta.yaml 0000664 0000000 0000000 00000002105 15146020043 0025572 0 ustar 00root root 0000000 0000000 {% set data = load_setup_py_data(setup_file="../setup.py",
from_recipe_dir=True) %}
{% set BUILD_NUMBER = environ.get('GITHUB_RUN_NUMBER','0') %}
{% set GIT_HASHTAG = environ.get('GITHUB_SHA',
os.popen("git log --pretty=format:'%h' -n 1").read().strip()
)[:7] %}
package:
name: {{data.get('name').lower().replace(' ', '_')}}
version: {{ data.get('version').replace('-alpha', 'a0') }}
source:
path: ..
build:
number: {{BUILD_NUMBER}}
string: {{ PKG_BUILDNUM }}_{{GIT_HASHTAG}}
noarch: python
script: '{{PYTHON}} setup.py install --single-version-externally-managed
--record=record.txt'
#entry_points: {{data.get('entry_points', {}).get('console_scripts', [])}}
requirements:
host:
- python {{data.get('python_requires','')}}
- setuptools
run:
- python {{data.get('python_requires','')}}
{% for dep in data.get('install_requires',[]) %}
- {{ dep.lower()}}
{% endfor %}
- pyqt
about:
home: {{ data.get('url')}}
license: {{ data.get('license')}}
summary: {{ data.get('description')}}
author: {{ data.get('author')}}
taurus_pyqtgraph-0.9.8-76c2eb88fc078020f3ed7181856bed2edee334c6/docs/ 0000775 0000000 0000000 00000000000 15146020043 0023626 5 ustar 00root root 0000000 0000000 taurus_pyqtgraph-0.9.8-76c2eb88fc078020f3ed7181856bed2edee334c6/docs/Makefile 0000664 0000000 0000000 00000001151 15146020043 0025264 0 ustar 00root root 0000000 0000000 # Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = python -msphinx
SPHINXPROJ = taurus_pyqtgraph
SOURCEDIR = .
BUILDDIR = _build
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help Makefile
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
taurus_pyqtgraph-0.9.8-76c2eb88fc078020f3ed7181856bed2edee334c6/docs/make.bat 0000664 0000000 0000000 00000001412 15146020043 0025231 0 ustar 00root root 0000000 0000000 @ECHO OFF
pushd %~dp0
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=python -msphinx
)
set SOURCEDIR=.
set BUILDDIR=_build
set SPHINXPROJ=taurus_pyqtgraph
if "%1" == "" goto help
%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The Sphinx module was not found. Make sure you have Sphinx installed,
echo.then set the SPHINXBUILD environment variable to point to the full
echo.path of the 'sphinx-build' executable. Alternatively you may add the
echo.Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
goto end
:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
:end
popd
taurus_pyqtgraph-0.9.8-76c2eb88fc078020f3ed7181856bed2edee334c6/docs/source/ 0000775 0000000 0000000 00000000000 15146020043 0025126 5 ustar 00root root 0000000 0000000 taurus_pyqtgraph-0.9.8-76c2eb88fc078020f3ed7181856bed2edee334c6/docs/source/api.rst 0000664 0000000 0000000 00000004254 15146020043 0026436 0 ustar 00root root 0000000 0000000 API
===================
.. toctree::
:maxdepth: 5
.. automodule:: taurus_pyqtgraph.autopantool
:members:
:special-members:
:show-inheritance:
.. automodule:: taurus_pyqtgraph.buffersizetool
:members:
:show-inheritance:
:special-members:
.. automodule:: taurus_pyqtgraph.cli
:members:
:show-inheritance:
:special-members:
.. automodule:: taurus_pyqtgraph.curveproperties
:members:
:show-inheritance:
:special-members:
.. automodule:: taurus_pyqtgraph.curvesmodel
:members:
:show-inheritance:
:special-members:
.. automodule:: taurus_pyqtgraph.curvespropertiestool
:members:
:show-inheritance:
:special-members:
.. automodule:: taurus_pyqtgraph.datainspectortool
:members:
:show-inheritance:
:special-members:
.. automodule:: taurus_pyqtgraph.dateaxisitem
:members:
:show-inheritance:
:special-members:
.. automodule:: taurus_pyqtgraph.forcedreadtool
:members:
:show-inheritance:
:special-members:
.. automodule:: taurus_pyqtgraph.legendtool
:members:
:show-inheritance:
:special-members:
.. automodule:: taurus_pyqtgraph.plot
:members:
:show-inheritance:
:special-members:
.. automodule:: taurus_pyqtgraph.taurusimageitem
:members:
:show-inheritance:
:special-members:
.. automodule:: taurus_pyqtgraph.taurusmodelchoosertool
:members:
:show-inheritance:
:special-members:
.. automodule:: taurus_pyqtgraph.taurusplotdataitem
:members:
:show-inheritance:
:special-members:
.. automodule:: taurus_pyqtgraph.taurustrendset
:members:
:show-inheritance:
:special-members:
.. automodule:: taurus_pyqtgraph.trend
:members:
:show-inheritance:
:special-members:
.. automodule:: taurus_pyqtgraph.util
:members:
:show-inheritance:
:special-members:
.. automodule:: taurus_pyqtgraph.y2axis
:members:
:show-inheritance:
:special-members:
.. automodule:: taurus_pyqtgraph.exporters
:members:
:show-inheritance:
:special-members:
.. automodule:: taurus_pyqtgraph.statisticstool
:members:
:show-inheritance:
:special-members:
.. automodule:: taurus_pyqtgraph.titlepatterneditor
:members:
:show-inheritance:
:special-members:
taurus_pyqtgraph-0.9.8-76c2eb88fc078020f3ed7181856bed2edee334c6/docs/source/conf.py 0000775 0000000 0000000 00000002756 15146020043 0026442 0 ustar 00root root 0000000 0000000 import os
import sys
sys.path.insert(0, os.path.abspath("../../"))
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
project = 'Taurus Pyqtgraph'
copyright = '2024, ALBA - CELLS'
author = 'ALBA - CELLS'
release = '0.9.8'
version = release
# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
extensions = [
"sphinx_rtd_theme",
"sphinx.ext.autodoc",
"sphinx.ext.doctest",
"sphinx.ext.inheritance_diagram",
"sphinx.ext.intersphinx",
"sphinx.ext.todo",
"sphinx.ext.viewcode",
"sphinx.ext.napoleon",
"sphinx_mdinclude"
]
templates_path = ['_templates']
exclude_patterns = []
pygments_style = "sphinx"
autodoc_default_options = {"members": True, "private-members": True}
autoclass_content = 'both'
html_logo = 'imgs/logo.png'
html_favicon = 'imgs/logo.ico'
# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
html_theme = 'sphinx_rtd_theme'
html_theme_options = {
"sticky_navigation": True,
"collapse_navigation": False
}
taurus_pyqtgraph-0.9.8-76c2eb88fc078020f3ed7181856bed2edee334c6/docs/source/develop_examples.rst 0000664 0000000 0000000 00000011325 15146020043 0031216 0 ustar 00root root 0000000 0000000 ===================
Developing Examples
===================
This section describes different examples of how to develop functionalities and add them to the taurus_pyqtgraph package.
The way of adding follows the same development guidelines as the rest of the taurus packages, so you can check the `Taurus development guidelines`_ for more information.
How to add a new action to the context menu of Plot/Trend
---------------------------------------------------------
We will see here how to add a new action to the context menu of Plot/Trend, this action will be called "Dummy Action" and will just print console message and pop up a dialog when it is clicked.
1 - First of all, you need to create a new file in the `taurus_pyqtgraph` package, for example, `dummy_feature.py`, the correct place to put it is in the `taurus_pyqtgraph` module/directory.
2 - In this file, you will need to import all the necessarry things to create your desired action.
.. code-block:: python
from taurus.external.qt import Qt
3 - Define a new class that will inherit from `QDialog` and implement the desired functionality. For example, you can create a dialog that will show a message when the action is clicked.
.. code-block:: python
class DummyTool(Qt.QAction):
"""
This tool inserts an action in the menu of the :class:`pyqtgraph.PlotItem`.
It pops up a dialog saying "This is a dummy feature. It does nothing."
and it prints the same message to the console.
"""
def __init__(self, parent=None, itemClass=None):
super().__init__("Dummy Action", parent)
self.parent = parent
self.triggered.connect(self._onTriggered)
self.plotItem = None
def attachToPlotItem(self, plot_item, parentWidget=None):
"""
Use this method to add this tool to a plot.
:param plot_item: (PlotItem)
"""
self.plotItem = plot_item
if self.plotItem.legend is not None:
self.legend = self.plotItem.legend
menu = self.plotItem.getViewBox().menu
menu.addAction(self)
self.setParent(parentWidget or menu)
4 - As you can see the _onTriggered methos is not implemented yet, and to implement it now we will encapsulate the logic
of the dialog on a separated class in charge of the view part. To keep it simple we will use a static method to display the dialog.
.. code-block:: python
class DummyToolDlg(Qt.QDialog):
"""
Dialog to display the dummy feature message.
This can be a complete class with more customization, but for the
example it will be used as a static method to display the message.
"""
@staticmethod
def display(parent=None, data_items=None):
dlg = DummyToolDlg(parent)
dlg.setWindowTitle("Dummy Feature")
dlg.setModal(True)
dlg.resize(300, 100)
layout = Qt.QVBoxLayout(dlg)
label = Qt.QLabel("This is a dummy feature. It does nothing.", dlg)
layout.addWidget(label)
button = Qt.QPushButton("OK", dlg)
button.clicked.connect(dlg.accept)
layout.addWidget(button)
dlg.setLayout(layout)
dlg.exec_()
print("This is a dummy feature. It does nothing.")
5 - Now we can implement the _onTriggered method to show the dialog when the action is clicked.
.. code-block:: python
def _onTriggered(self):
"""
This method is called when the action is triggered.
It will show the dialog and print a message to the console.
"""
DummyToolDlg.display(self.parent, self.plotItem)
6 - Finally, you need to register this new action in the `__init__.py` file of the `taurus_pyqtgraph` packages so it can be loaded when the package is imported.
In this case the feature will be registered for the Plot and Trend items, so you will need to modify both files.
.. code-block:: python
from .dummy_feature import DummyTool
def __init__():
....................
# Register the new action
dummy_tool = DummyTool(self)
dummy_tool.attachToPlotItem(self.getPlotItem())
....................
You can see here on the following picture the result of this new action in the context menu of a PlotItem, but for the trend it will be the same.:
.. image:: imgs/dummy_action.png
:alt: Dummy feature action in the context menu of a PlotItem, for the trend it will be the same.
.. _Taurus development guidelines: https://taurus-scada.org/devel/coding_guide.html
taurus_pyqtgraph-0.9.8-76c2eb88fc078020f3ed7181856bed2edee334c6/docs/source/imgs/ 0000775 0000000 0000000 00000000000 15146020043 0026065 5 ustar 00root root 0000000 0000000 taurus_pyqtgraph-0.9.8-76c2eb88fc078020f3ed7181856bed2edee334c6/docs/source/imgs/archiving_trend.gif0000664 0000000 0000000 00002066105 15146020043 0031734 0 ustar 00root root 0000000 0000000 GIF89a1 $ H l $ $$ H$ l$ $ $ $ $ H $H HH lH H H H H l $l Hl ll l l l l $ H l ؐ $ H l ش $ H l $ H l U$ UH Ul U U U U U $U$$UH$Ul$U$U$U$U$U HU$HUHHUlHUHUHUHUHU lU$lUHlUllUlUlUlUlU U$UHUlUUUؐUU U$UHUlUUUشUU U$UHUlUUUUU U$UHUlUUUUU $ H l $$$H$l$$$$$ H$HHHlHHHHH l$lHlllllll $Hlؐ $Hlش ت$تHتlتتتتت $Hl $ H l $$$H$l$$$$$ H$HHHlHHHHH l$lHlllllll $Hlؐ $Hlش $Hl $Hl!NETSCAPE2.0 ! , H*\ȰÇ#JHŋ3jȱǏ CIr!(S\ɲ˗0cʜI#8sɳϟ@^)ѣH*]%ѦPJJՕ'jʵׯFKٳhM˶۷pKݻx3˷߿pLa+^̸1Ď#KLbʘ3k,2ϠC,`I^ͺRծc˞6۸syN8Ɠ+O.|禛CNس+wܿ6.㫗OVI߯~'`"X&F
V%`߆dGP.$Q!nW[ Mck.ҨK6X;)蚏B&G7FPd+GFieO=x9h$\[BIamA&ekOiII$ǥ {9М!yI&m'AV硘$!dĹit)D_
mIl @[ qY&0)FMZ1*ǡ 蟤SDCR4J6r(@ )kM-aО
PdhJ6tj\ila H'rm! -|n(
o}Rpk)| ,2P
Ğd⫝ihh<uoD;rɀҬ!г2qBnA9Ry
0 vb-6,! M`qeB
)~