README and CONTRIBUTING update
This commit is contained in:
parent
5c44d51d6c
commit
f359449715
69
CONTRIBUTING.md
Normal file
69
CONTRIBUTING.md
Normal file
@ -0,0 +1,69 @@
|
||||
# Contributing to PyQtGraph
|
||||
|
||||
Contributions to pyqtgraph are welcome!
|
||||
|
||||
Please use the following guidelines when preparing changes:
|
||||
|
||||
## Submitting Code Changes
|
||||
|
||||
* The preferred method for submitting changes is by github pull request against the "develop" branch.
|
||||
* Pull requests should include only a focused and related set of changes. Mixed features and unrelated changes may be rejected.
|
||||
* For major changes, it is recommended to discuss your plans on the mailing list or in a github issue before putting in too much effort.
|
||||
* Along these lines, please note that `pyqtgraph.opengl` will be deprecated soon and replaced with VisPy.
|
||||
|
||||
## Documentation
|
||||
|
||||
* Writing proper documentation and unit tests is highly encouraged. PyQtGraph uses nose / pytest style testing, so tests should usually be included in a tests/ directory adjacent to the relevant code.
|
||||
* Documentation is generated with sphinx; please check that docstring changes compile correctly
|
||||
|
||||
## Style guidelines
|
||||
|
||||
* PyQtGraph prefers PEP8 for most style issues, but this is not enforced rigorously as long as the code is clean and readable.
|
||||
* Use `python setup.py style` to see whether your code follows the mandatory style guidelines checked by flake8.
|
||||
* Exception 1: All variable names should use camelCase rather than underscore_separation. This is done for consistency with Qt
|
||||
* Exception 2: Function docstrings use ReStructuredText tables for describing arguments:
|
||||
|
||||
```text
|
||||
============== ========================================================
|
||||
**Arguments:**
|
||||
argName1 (type) Description of argument
|
||||
argName2 (type) Description of argument. Longer descriptions must
|
||||
be wrapped within the column guidelines defined by the
|
||||
"====" header and footer.
|
||||
============== ========================================================
|
||||
```
|
||||
|
||||
QObject subclasses that implement new signals should also describe
|
||||
these in a similar table.
|
||||
|
||||
## Testing Setting up a test environment
|
||||
|
||||
### Dependencies
|
||||
|
||||
* tox
|
||||
* tox-conda
|
||||
* pytest
|
||||
* pytest-cov
|
||||
* pytest-xdist
|
||||
* pytest-faulthandler
|
||||
* Optional: pytest-xvfb
|
||||
|
||||
### Tox
|
||||
|
||||
As PyQtGraph supports a wide array of Qt-bindings, and python versions, we make use of `tox` to test against most of the configurations in our test matrix. As some of the qt-bindings are only installable via `conda`, `conda` needs to be in your `PATH`, and we utilize the `tox-conda` plugin.
|
||||
|
||||
* Tests for a module should ideally cover all code in that module, i.e., statement coverage should be at 100%.
|
||||
* To measure the test coverage, un `pytest --cov -n 4` to run the test suite with coverage on 4 cores.
|
||||
|
||||
### Continous Integration
|
||||
|
||||
For our Continuous Integration, we utilize Azure Pipelines. On each OS, we test the following 6 configurations
|
||||
|
||||
* Python2.7 with PyQt4
|
||||
* Python2.7 with PySide
|
||||
* Python3.6 with PyQt5-5.9
|
||||
* Python3.6 with PySide2-5.9
|
||||
* Python3.7 with PyQt5-5.12
|
||||
* Python3.7 with PySide2-5.12
|
||||
|
||||
More information on coverage and test failures can be found on the respective tabs of the [build results page](https://dev.azure.com/pyqtgraph/pyqtgraph/_build?definitionId=1)
|
@ -1,58 +0,0 @@
|
||||
Contributions to pyqtgraph are welcome!
|
||||
|
||||
Please use the following guidelines when preparing changes:
|
||||
|
||||
* The preferred method for submitting changes is by github pull request
|
||||
against the "develop" branch.
|
||||
|
||||
* Pull requests should include only a focused and related set of changes.
|
||||
Mixed features and unrelated changes may be rejected.
|
||||
|
||||
* For major changes, it is recommended to discuss your plans on the mailing
|
||||
list or in a github issue before putting in too much effort.
|
||||
|
||||
* Along these lines, please note that pyqtgraph.opengl will be deprecated
|
||||
soon and replaced with VisPy.
|
||||
|
||||
* Writing proper documentation and unit tests is highly encouraged. PyQtGraph
|
||||
uses nose / py.test style testing, so tests should usually be included in a
|
||||
tests/ directory adjacent to the relevant code.
|
||||
|
||||
* Documentation is generated with sphinx; please check that docstring changes
|
||||
compile correctly.
|
||||
|
||||
* Style guidelines:
|
||||
|
||||
* PyQtGraph prefers PEP8 for most style issues, but this is not enforced
|
||||
rigorously as long as the code is clean and readable.
|
||||
|
||||
* Use `python setup.py style` to see whether your code follows
|
||||
the mandatory style guidelines checked by flake8.
|
||||
|
||||
* Exception 1: All variable names should use camelCase rather than
|
||||
underscore_separation. This is done for consistency with Qt
|
||||
|
||||
* Exception 2: Function docstrings use ReStructuredText tables for
|
||||
describing arguments:
|
||||
|
||||
```
|
||||
============== ========================================================
|
||||
**Arguments:**
|
||||
argName1 (type) Description of argument
|
||||
argName2 (type) Description of argument. Longer descriptions must
|
||||
be wrapped within the column guidelines defined by the
|
||||
"====" header and footer.
|
||||
============== ========================================================
|
||||
```
|
||||
|
||||
QObject subclasses that implement new signals should also describe
|
||||
these in a similar table.
|
||||
|
||||
* Setting up a test environment.
|
||||
|
||||
Tests for a module should ideally cover all code in that module,
|
||||
i.e., statement coverage should be at 100%.
|
||||
|
||||
To measure the test coverage, install py.test, pytest-cov and pytest-xdist.
|
||||
Then run 'py.test --cov -n 4' to run the test suite with coverage on 4 cores.
|
||||
|
53
README.md
53
README.md
@ -1,12 +1,13 @@
|
||||
[![Build Status](https://travis-ci.org/pyqtgraph/pyqtgraph.svg?branch=develop)](https://travis-ci.org/pyqtgraph/pyqtgraph)
|
||||
[![codecov.io](http://codecov.io/github/pyqtgraph/pyqtgraph/coverage.svg?branch=develop)](http://codecov.io/github/pyqtgraph/pyqtgraph?branch=develop)
|
||||
|
||||
[![Build Status](https://pyqtgraph.visualstudio.com/pyqtgraph/_apis/build/status/pyqtgraph.pyqtgraph?branchName=develop)](https://pyqtgraph.visualstudio.com/pyqtgraph/_build/latest?definitionId=17&branchName=develop)
|
||||
|
||||
|
||||
PyQtGraph
|
||||
=========
|
||||
|
||||
A pure-Python graphics library for PyQt/PySide
|
||||
A pure-Python graphics library for PyQt/PySide/PyQt5/PySide2
|
||||
|
||||
Copyright 2017 Luke Campagnola, University of North Carolina at Chapel Hill
|
||||
Copyright 2019 Luke Campagnola, University of North Carolina at Chapel Hill
|
||||
|
||||
<http://www.pyqtgraph.org>
|
||||
|
||||
@ -15,15 +16,32 @@ Despite being written entirely in python, the library is fast due to its
|
||||
heavy leverage of numpy for number crunching, Qt's GraphicsView framework for
|
||||
2D display, and OpenGL for 3D display.
|
||||
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
||||
* PyQt 4.7+, PySide, PyQt5, or PySide2
|
||||
* PyQt 4.8+, PySide, PyQt5, or PySide2
|
||||
* python 2.7, or 3.x
|
||||
* NumPy
|
||||
* For 3D graphics: pyopengl and qt-opengl
|
||||
* Known to run on Windows, Linux, and Mac.
|
||||
* Required
|
||||
* `numpy`, `scipy`
|
||||
* Optional
|
||||
* `pyopengl` for 3D graphics
|
||||
* `pyqtgraph.opengl` will be depreciated in a future version and replaced with `VisPy`
|
||||
* `hdf5` for large hdf5 binary format support
|
||||
* Known to run on Windows, Linux, and macOS.
|
||||
|
||||
Qt Bindings Test Matrix
|
||||
-----------------------
|
||||
|
||||
Below is a table of the configurations we test and have confidence pyqtgraph will work with. All current operating major operating systems (Windows, macOS, Linux) are tested against this configuration. We recommend using the Qt 5.12 or 5.9 (either PyQt5 or PySide2) bindings.
|
||||
|
||||
| Python Version | PyQt4 | PySide | PyQt5-5.6 | PySide2-5.6 | PyQt5-5.9 | PySide2-5.9 | PyQt5-5.12 | PySide2 5.12 |
|
||||
| :-------------- | :----------------: | :----------------: | :----------------: | :----------------: | :----------------: | :----------------: | :----------------: | :----------------: |
|
||||
| 2.7 | :white_check_mark: | :white_check_mark: | :x: | :x: | :white_check_mark: | :white_check_mark: | :x: | :white_check_mark: |
|
||||
| 3.5 | :x: | :x: | :white_check_mark: | :x: | :x: | :x: | :white_check_mark: | :white_check_mark: |
|
||||
| 3.6 | :x: | :x: | :x: | :x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|
||||
| 3.7 | :x: | :x: | :x: | :x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|
||||
|
||||
* pyqtgraph has had some incompatabilities with PySide2-5.6, and we recommend you avoid those bindings if possible.
|
||||
|
||||
Support
|
||||
-------
|
||||
@ -36,7 +54,9 @@ Installation Methods
|
||||
|
||||
* From PyPI:
|
||||
* Last released version: `pip install pyqtgraph`
|
||||
* Latest development version: `pip install git+https://github.com/pyqtgraph/pyqtgraph`
|
||||
* Latest development version: `pip install git+https://github.com/pyqtgraph/pyqtgraph@develop`
|
||||
* From conda
|
||||
* Last released version: `conda install pyqtgraph`
|
||||
* To install system-wide from source distribution: `python setup.py install`
|
||||
* Many linux package repositories have release versions.
|
||||
* To use with a specific project, simply copy the pyqtgraph subdirectory
|
||||
@ -49,16 +69,3 @@ Documentation
|
||||
The easiest way to learn pyqtgraph is to browse through the examples; run `python -m pyqtgraph.examples` for a menu.
|
||||
|
||||
The official documentation lives at http://pyqtgraph.org/documentation
|
||||
|
||||
Testing
|
||||
-------
|
||||
|
||||
To test the pyqtgraph library, clone the repository, and run `pytest pyqtgraph`. For more thurough testing, you can use `tox`, however the [tox-conda](https://github.com/tox-dev/tox-conda) plugin is required. Running `tox` on its own will run `pytest pyqtgraph -vv` on it's own, however if you want to run a specific test, you can run `tox -- pyqtgraph/exporters/tests/test_svg::test_plotscene` for example.
|
||||
|
||||
Dependencies include:
|
||||
|
||||
* pytest
|
||||
* pytest-cov
|
||||
* pytest-xdist
|
||||
* tox
|
||||
* tox-conda
|
Loading…
Reference in New Issue
Block a user