Skip to content

Conversation

@MichalKononenko
Copy link
Owner

No description provided.

scasagrande and others added 30 commits April 19, 2017 09:37
Freeze pylint to version 1.6.5
* Added test:// URI schema.

* Config: Py3 fix and support for setting attrs.

* Added sub/indexing to attrs config.

* Added to docstring.

* Added support for physical quantities to config.

* pylint fixes

* Tests for new setattr_expression

* Added tests for new config, YAML.

* pylint fix for new tests

* Very minor pylint fix

* Added ruamel.yaml as testing dep.

* Reworked awkward sentence.

* Updated docs for ruamel.yaml dep.

* Remove pyyaml, only use ruamel.yaml

* Disabled info category messages from mylint.

* Added version dump to travis config.

* Trying ot use python -m to work around venv issues.

* Revert "Trying ot use python -m to work around venv issues."

This reverts commit f73a243.

* ruamel.yaml vs ruamel_yaml and fixing pylint false +ve.

* Explicitly use unsafe loader as suggested by ruamel.yaml warnings.

* Marked test as explicitly unsafe as well.
* Started fixing new pylint 1.7 checks.

* More pylint17 fixes.

* Removed flags that are now disabled by default.

* Still more misc pylint17 fixes.

* Updated pylint freeze to 1.7.

* Guess what? Still more misc fixes.

* More fixes.

* pylint17 fixes nearly done

* Should be the last fixes for 1.7.

* pylint 1.7 fix

* Fix parameter names

* Update pylint 1.7->1.7.1

* Cleanup thorlabs_utils.py
* Add Py36 and drop Py33

* Update readme

* Revert adding version constraint to numpy
* Use ruamel.yaml 0.14
* Initial version of named struct class.

* Added tests for new class.

* docs and a pylint fix.

* Py3k fix (filter → list(filter))

* Improvements to string handling.

* Ignored additional carp.

* Provide fixes for build and start using hypothesis

* Locked requirements.txt; see #174.

* Fixed py3k compat issue.

* Fixed negative length checks.

* Fixed bug in StringField.__get__

* Added NamedStruct.__eq__ test.

* Fixing pylint warnings.

* Moved pylint warning comment.

* Changed numpy version in reqs as suggested by @scasagrande
Develop -> Master merge for v0.4.0
Use new version of quantities, fix readme badges
Bump version 0.4.0 -> 0.4.1
* Use mock from the standard lib if available.

* Migrate nose raises to pytest.raises.

This touches a lot of code because pytest.raises
is used in a context manager, so indentation
has to be changed.

Replacement happened with regex from
@raises\((.*)\) to @pytest.mark.xfail(raises=$1)
then from @pytest.mark.xfail\(raises=(.*)\)\ndef(.*)
to def$2\n    with pytest.raises($1):
then manual correction of indentation.

* Replace nose eq_ by assert, remove nottest.

* Move CI from nosetests to pytest, adapt docs.

Pin astroid version, too, to avoid wrong errors on CI.

* Fix some introduced errors flagged by pylint.

* Specify minimum pyserial requirement (see #58).
* Replace deprecated ask method for query in visa session.

* Update gitignore and add test requirements

* Replace visa read with with read_bytes

* Add encode parameter to instrument.read()

- Introduce unpacking of IEEE-754/64 double real numbers.

* Add newest pyvisa package to requirements.txt

- Removed extras_require from setup.py

* Update read mock call with utf-8

* Replace exception NotImplemented with NotImplementedError

* Change read method signature on pm100usb

* Revert change to _extras_require_

* Add pyvisa 1.9.x install requirement

* Fix pyvisa requirement

* Replace NotImplementedError with ValueError on abstract_comm

* Loosen pyvisa versioning requirements

* Use codecs module to determine valid builtin encode types
* Move pyvisa to required in the docs

* Update authorship years (-> 2019)
* Add support for Python 3.7

* Fix PyPI description rendering

* Upgrade travis environment to Ubuntu 16.04 Xenial

* Update ruamel.yaml to 0.15.x

* Match setup.py version reqs to requirements.txt

* Disable Pylint on Py37

Pylint 2.0+ is needed for Py37, which in turn doesn't support Py27.

* Fix bash IF statement

* More pylint travis modifications
* Drop support for Python 3.4 (#200)

* Fix issue #197 (#201)

Where checking if value is in enum will raise value error in Py38

* Improvements to APT (#167)

* Added driver/motor tables for T/KDC001 APT devs.

* Moved TODO comment to avoid pylint error.

* Misc Py3k changes for ThorLabs APT

* motion_timeout for APT motor cmds, fix scale factor

* ThorLabsAPT: Example of new config support.

* More pylint fixes

* Fix for line continuation convention.

* Rearranged imports into standard order.

* Added an APT test. Not working yet.

* Fix linting issues

* New handling in loopback for empty terminator.

* struct.Struct for contents of hw_info packets

* Support for specifying expected apt pkt sizes

* Fixes to APT and APT tests

* Missed a conflict marker.

* Fixed bug due to `if size` falling through on size == 0.

* Removed trailing whitespace.

* Locked requirements.txt; see #174.

* Remove numpy version pinning in requirements.txt

* Add tests to cover additional loopback comm behaviour

* Make pylint happy

* Revert changes to size=0 behaviour in loopback comm

* Fix bug with SCPIFunctionGenerator.function, add tests (#202)

* Fix bug with SCPIFunctionGenerator.function, add tests

* Fix linting

* Fix Agilent 33220a, add tests (#203)

* Function Generator single/multi-channel consistency (#206)

* Function Generator single/multi-channel consistency

* Fix Py27 linting issue

* Fix linting issue

* Add tests for FunctionGenerator abstract instrument

* Adding support for the minghe mhs5200 (#150)

* added mhs5200

* added minghe function generator

* added absolute_import

* fixed scaling on frequency

* switched to abstract instrument class

* fixed a few docstrings

* after testing with device

* Minghe MHS5200 - Add instrument to docs

* isolating changes from cc1 test station:

* Revert "isolating changes from cc1 test station:"

This reverts commit 87b8dec.

* reverting changes and fixing duty cycle

* Update for new FunctionGenerator multichannel consistency update

* Docstring modifications (#207)
scasagrande and others added 28 commits November 16, 2020 23:14
* Use tox in travis

* Remove old `python` block

* Use all available cores for linting

* Use all available cores for pytest
* Tests for SRS DG645 and 830

- Full coverage test suite for SRS instruments
- Removed `# pragma: no cover` statements and tested these lines
- Removed `if not self._testing` to invoke a `time.sleep`, which is now
  simply mocked out in the test using an automatically used fixture.

* Improve readability

Changed repetitive list entries -> list multiplication
* Move numpy to be an optional requirement

* Make numpy optional for Instrument.binblockread

* Make numpy optional for instruments, tests pass with numpy installed

* Tests pass with and without numpy installed

* Fix linting

* Remove numpy from INSTALL_REQUIRES

* Add numpy variants to tox

* Update tox

* Refactor try except blocks for importing numpy

* Add py39-numpy toxenv to travis

* add test for new awg2000 lines

* Update docstrings and return types

* Add and update tests

* Update README.rst
* Switch to using pyproject.toml and setup.cfg

* Add rtd.txt for readthedocs
- All three instruments now with full coverage
- Added tests to SCPI Function Generator
- Added tests to SCPI Multimeter
- Created tests for SCPI Instrument
- Corrected a typo / copy paste error: Contrast error message returned
  description for brightness instead of contrast.
…#300)

- Adjusted the mocker that faked serial ports for appropriate
  initialization.
#301)

Included instruments with full tests now:
- Electrometer
- Function Generator
- Multimeter
- Optical spectrum analyzer
- Oscilloscope
- Power supply

Full test suites using pytest fixtures to patch the metaclasses such
that they become accessible, see PEP 3119.

Fixed `@abc.abstractproperty` decorators in optical spectrum analyzer
and oscilloscope, since this decorator is deprecated since py3.3.
- Full coverage
- Adopt a pytest fixture to directly access abstract classes
- Test properties / methods for existence
* BFs for visa_communicator and tests

- read_raw() now uses read_raw() of pyvisa and not read()
- Not implemented functions now raise NotImplementedError
- Removed testing if pyvisa is present

* Changed description at start of tests to correct title
…309)

* Add tests for full coverage of instrument.py. Remove legacy checks.

- Added tests for `open_usb` and `open_gpibethernet`
- Removed checks for modules `usb` and `pyvisa` not present since they
  are now by default part of IK

* Require pyusb >= 1.0
* Support for Newport Picomotor Controller 8742

Full functionality for this controller in single-controller and
multi-controller mode (main / secondaries via RS-485) is implemented.
Only single-controller mode is tested with hardware at the moment.
Full test suite however includes tests for multi-controller modes.
Routines were documented in docstring and also in Sphinx
documentation.

Note: Control via USB is currently not functional, since
InstrumentKit has some issues with the real USB communications
class. Needs separate PR.

* Added a `read_raw` routine to `instrument.py`

Reading raw data from the instrument is required for the picomotor
control class, however, had so far to be done by directly accessing
a private argument of `instrument.py` (not pretty).

* Replaced extensive hypothesis filtering with parametrized tests

This type of filtering has previously resulted in health check failures
with hypothesis since too many values were filtered out. All these tests
do is ensure that the correct error is raised.

* Remove print statement
The error codes corresponding to errors x00 to x09 are not associated to their corresponding axis due to improper matching of the error dictionary for single digit errors.
Using :02d format we force a two digit string which matches the corresponding error correctly. This does not affect other error codes.

Co-authored-by: Steven Casagrande <stevencasagrande@gmail.com>
* First attempt at github actions

* Testing

* Cleaning

* Update on event list

* Testing

* Rename "finish" to "coverage" (#315)

* Add testing on pull_request

* Update testing workflow trigger

* Add newline at end of deploy (#316)

Co-authored-by: Steven Casagrande <scasagrande@galvant.ca>
Co-authored-by: Reto Trappitsch <reto@galactic-forensics.space>
* Support for Newport Picomotor Controller 8742

Full functionality for this controller in single-controller and
multi-controller mode (main / secondaries via RS-485) is implemented.
Only single-controller mode is tested with hardware at the moment.
Full test suite however includes tests for multi-controller modes.
Routines were documented in docstring and also in Sphinx
documentation.

Note: Control via USB is currently not functional, since
InstrumentKit has some issues with the real USB communications
class. Needs separate PR.

* Added a `read_raw` routine to `instrument.py`

Reading raw data from the instrument is required for the picomotor
control class, however, had so far to be done by directly accessing
a private argument of `instrument.py` (not pretty).

* Fix writing to USB device, change PMC to 1 termination character

Writing works, but has issues with the terminator. need to add it at
least once manually...
The IK way of doing things is currently not the same as the tutorial?
Reading always and only returns 0... might need to switch the control?

* Revert changes to newport_pmc8742 - termination character change

* Rewrote instrument.py and usb communicator to work with Newport PMC8742

Tests are currently failing, but that's okay, these are tests that
simply test for the old / not-working usb communicator initalization.

SRS830 test is failing because USBCommunicator is used to test
some behavior that USBCommunicator is the wrong one. Anyway, probably
better to just mock something here in this failing test.

* Adjust USBCommunicator such that compatible with other instruments

* Fixed failing tests in existing test suite

* Full testing for USBCommunicator, some BFs

* USB Communicator bug fix and test suite...

now for real...

* Use wMaxPacketSize for the size of the package that is read by default
* Add pre-commit

* Update CI static checks

* Remove pylint

* Update doc

* Add six, because pyvisa-sim isn't well-defined

* Update README.rst

Co-authored-by: Steven Casagrande <scasagrande@galvant.ca>
* Cleanup and update files in rootdir

* Update copyright year

* Update pytest and hypothesis versions to ~=

* Update README.rst

* Update on push actions rule

* Update CI status badge to GH Actions
* Fix coveralls submission

* Update path-to-lcov

* Never changes, try with original solution again

* Remove flag-name
* Move channel inside for SRS DG645

* Update docs for SRS

* Newport Agilis: Move Axis into class and fix docs

* Newport ESP301: Inner class consistencty and docs update
- Move Axis class into instrument
- Move HomeSearchMode, Units, MotorType enums into instrument

* Add test for Newport ESP301 - default search mode in axis method

* Tektronix DPO4104 move classes inside and update docs

* Abstract instrument Oscilloscope: Move classes inside and add to docs

* Tektronix TDS5xx: Move Channel, DataSource, Measurement inside class

* Tektronix TedTDS224: Move Channel, DataSource inside

* Cleanup and update docstrings of changed classes

* Abstract Instrument PowerSupply: Move Channel inside class, add to doc

* Abs Inst OpticalSpectrumAnalyzer: Move channel inside class, add to docs

* Add electrometer to docs and sort instruments alphabetically

* Fix copy/paste error in abstract instrument PowerSupply

* Fix commenting in Test for SRS DG645
* Convert project versioning to use setuptools_scm

* Update checkout action to get tag data

* Testing

* Testing

* Add test for version file

* Fix short X.Y version in conf.py

* Get version using pkg_resources

* Re-add setup.py stub

* Switch to .readthedocs.yml

* Update to importlib.metadata
* Move metadata into setup.cfg

* Update package name in setup.cfg

* Update conf.py
* Bump ruamel.yaml>=0.16,<0.17

* Add Py310 to tox and CI

* Add Py310 classifier

* Update README.rst
@scasagrande scasagrande deleted the branch MichalKononenko:master January 28, 2022 04:35
@scasagrande scasagrande deleted the master branch January 28, 2022 04:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants