Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
nano713 committed Jul 18, 2024
2 parents 25b09ac + effdc60 commit 66b083f
Show file tree
Hide file tree
Showing 159 changed files with 6,342 additions and 572 deletions.
4 changes: 2 additions & 2 deletions .github/pymeasure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dependencies:
- pyqt=5.15.7
- pyqtgraph=0.12.4
- pyserial=3.4
- pyvisa=1.12.0
- pyvisa=1.13.0
- pyzmq=24.0.1
- qt=5.15.6
# Development dependencies below
Expand All @@ -19,7 +19,7 @@ dependencies:
- pytest-cov=4.1.0
- pyvisa-sim==0.5.1
- flake8=6.0.0
- setuptools_scm # don't pin, to get newest features
- setuptools_scm==8.1.0 # don't pin, to get newest features
- sphinx=5.3.0
- sphinx_rtd_theme=1.2.2
# pip is currently not needed, but the recommended tool when packages that are unavailable on conda are required
Expand Down
26 changes: 26 additions & 0 deletions .github/pymeasure_numpy2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: pymeasure_numpy2
channels:
- conda-forge
dependencies:
- cloudpickle=1.6.0
- numpy=2.0.0
- pandas=2.2.2
- pint=0.24
- pyqt=5.15.7
- pyqtgraph=0.12.4
- pyserial=3.4
- pyvisa=1.12.0
- pyzmq=24.0.1
- qt=5.15.6
# Development dependencies below
- pytest-qt=4.2.0
- pytest-runner=5.2
- pytest=7.2.0
- pytest-cov=4.1.0
- pyvisa-sim==0.5.1
- flake8=6.0.0
- setuptools_scm # don't pin, to get newest features
- sphinx=5.3.0
- sphinx_rtd_theme=1.2.2
# pip is currently not needed, but the recommended tool when packages that are unavailable on conda are required
# - pip # don't pin, to gain newest conda compatibility fixes
26 changes: 26 additions & 0 deletions .github/pymeasure_python312.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: pymeasure_python312
channels:
- conda-forge
dependencies:
- cloudpickle=1.6.0
- numpy=1.26.4
- pandas=2.2.0
- pint=0.18
- pyqt=5.15.9
- pyqtgraph=0.12.4
- pyserial=3.4
- pyvisa=1.14.1
- pyzmq=25.1.2
- qt=5.15.8
# Development dependencies below
- pytest-qt=4.2.0
- pytest-runner=5.2
- pytest=7.2.0
- pytest-cov=4.1.0
- pyvisa-sim==0.5.1
- flake8=6.0.0
- setuptools_scm # don't pin, to get newest features
- sphinx=5.3.0
- sphinx_rtd_theme=1.2.2
# pip is currently not needed, but the recommended tool when packages that are unavailable on conda are required
# - pip # don't pin, to gain newest conda compatibility fixes
38 changes: 34 additions & 4 deletions .github/workflows/pymeasure_CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,9 @@ jobs:
echo "::add-matcher::.github/pytest.json"
xvfb-run -a pytest --cov=pymeasure --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./coverage/reports/
fail_ci_if_error: true
files: ./coverage.xml,!./cache
flags: unittests
Expand All @@ -96,15 +95,16 @@ jobs:
fail-fast: true
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install pymeasure requirements
uses: mamba-org/setup-micromamba@v1
with:
environment-file: .github/pymeasure.yml
# ternary operator: if python-version == 3.12 use pymeasure_python312.yml else use pymeasure.yml
environment-file: ${{ matrix.python-version == '3.12' && '.github/pymeasure_python312.yml' || '.github/pymeasure.yml'}}
create-args: python=${{ matrix.python-version }}
cache-environment-key: py${{ matrix.python-version }}-${{ matrix.os }}-mamba-${{ env.CACHE_NUMBER }}-${{ hashFiles('environment.yml') }}
cache-downloads: false
Expand All @@ -125,3 +125,33 @@ jobs:
run: |
echo "::add-matcher::.github/pytest.json"
pytest
test_numpy2:
name: Python 3.11, ubuntu-latest, numpy>=2
runs-on: "ubuntu-latest"
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install pymeasure requirements
uses: mamba-org/setup-micromamba@v1
with:
environment-file: .github/pymeasure_numpy2.yml
create-args: python=3.11
cache-environment-key: py3.11-ubuntu-latest-mamba-${{ env.CACHE_NUMBER }}-${{ hashFiles('environment.yml') }}
cache-downloads: false
- name: Python version
run: python --version
- name: Install Pymeasure
# If the pytest problem matcher stops working because of bad paths, do an editable install
run: pip install .[tests]
- name: Pymeasure version
run: python -c "import pymeasure;print(pymeasure.__version__)"
- name: Run pytest with xvfb
run: |
echo "::add-matcher::.github/pytest.json"
xvfb-run -a pytest
31 changes: 31 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: Build and Upload Python Package

on:
release:
types: [published]

jobs:
deploy:

runs-on: ubuntu-latest
environment: release
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
13 changes: 13 additions & 0 deletions AUTHORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ Andres Ruz-Nieto
Carlos Martinez
Scott Candey
Tom Verbeure
Juraj Jašík
Max Herbold
Alexander Wichers
Ashok Bruno
Expand All @@ -66,9 +67,21 @@ Sebastien Weber
Sebastian Neusch
Ulrich Sauter
Guus Kuiper
Bernhard Lang
Armindo Pinto
Frank Wu
Heinz-Alexander Fütterer
Per-Olof Svensson
Karl Komierowski
Alec Vercruysse
Matthew Zenaldin
Canyon Clark
Connor Carr
Jannis Kleine-Schönepauck
Douwe den Blanken
Till Zürner
J. A. Wilcox
Nick James Kirkby
Konrad Gralher
David Ziliak
David Sun
101 changes: 93 additions & 8 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,28 +1,113 @@
Upcoming version
================

Added features
- SCPI instruments have :code:`next_error` property giving the next error.

Automation
----------
- Explicitly set encoding to utf8 when writing and reading data to file, allowing the use of special characters.
Previously the encoding was not explicitly set, this could potentially disrupt loading old data-files; if this is required, the encoading can be changed by changing (e.g., monkey-patching) the :code:`pymeasure.experiment.Results.ENCODING` property. (@CasperSchippers, #1123)

Version 0.14.0 (2024-05-22)
===========================
Main items of this new release:

- Add support for numpy 2.0
- Add support for python 3.12
- Improve academic quotability with an up to date Zenodo DOI and with citation information.
- Add default :code:`queue` method and a :code:`FileInputWidget`, allowing to more quickly get started with the PyMeasure user interface (:code:`ManagedWindow`).
- Add a :code:`SCPIMixin` base class for instruments instead of defining :code:`includeSCPI=True`
- Instrument manufacturer modules are no longer imported in the :code:`pymeasure/instruments/__init__.py` file.
Previously, when importing a single instrument into a procedure, all instruments would be imported into memory through the manufacturer modules in :code:`pymeasure/instruments/__init__.py`.
Removing manufacturer modules from that file lowers the memory footprint of pymeasure when importing an instrument.
Instrument classes will need to be imported from the manufacturer module or explicitly from the instrument driver file.
For example, :code:`from pymeasure.instruments import Extreme5000` will need to change to :code:`from pymeasure.instruments.extreme import Extreme5000` or :code:`from pymeasure.instruments.extreme.extreme5000 import Extreme5000`.
- 17 new instruments

Deprecated features
-------------------
- Remove :code:`TelnetAdapter`, as its library is deprecated.
- Remove :code:`TelnetAdapter`, as its library is deprecated (@BenediktBurger, #1045)
- Replaced :code:`directory_input` keyword-argument of :code:`ManagedWindowBase` by :code:`enable_file_input` (@CasperSchippers, #964)
- Make parameter :code:`includeSCPI` obligatory for all instruments, even those which use SCPI (@BenediktBurger, #1007)
- Setting `includeSCPI=True` is deprecated, inherit instead the :code:`SCPIMixin` class if the device supports SCPI commands.
- Replaced :code:`celcius` attribute of :code:`LakeShoreTemperatureChannel` by :code:`celsius` (@afuetterer, #1003)
- Replaced :code:`error` property of Keithley instruments by :code:`next_error`.
- Replaced :code:`measurement_time` property of Pendulum CNT-91 by :code:`gate_time`.
- Replaced :code:`sample_rate` keyword-argument of :code:`buffer_frequency_time_series` of Pendulum CNT-91 by :code:`gate_time`.
- The property :code:`unit` of MKS937B switched to using values defined in :code:`instruments/mksinst/mks937b/Unit`. Old string values are not supported anymore. (@dkriegner, @BenediktBurger #1034)
- Replaced MKS937B :code:`unit` to use :code:`instruments/mksinst/mks937b/Unit` instead of strings (@dkriegner, @BenediktBurger #1034)

Instruments mechanics
---------------------
- Add a SCPI base class :code:`SCPIMixin` as replacement for :code:`includeSCPI=True` (@BenediktBurger, #905, #1007, #1019, #1047)
- Add :code:`next_error` property to SCPI instruments (@BenediktBurger, #1024)
- Make :code:`query_delay=None` the default for :code:`wait_for` (@BenediktBurger, #1077)
- Fix :code:`expected_protocol` using empty dictionary as default value (@BenediktBurger, #1087)
- Remove auto-importing all instruments in :code:`pymeasure/instruments/__init__.py`` (@mcdo0486, #919)
- Add :code:`find_serial_port` to find a serial port by providing USB information (@BenediktBurger, #982)

Instruments
-----------
- Add Agilent4294A (@driftregion, #998)
- Add Agilent 4284A by (@ConnorGCarr #1079)
- Add AimTTI PL series power supplies (@guuskuiper, #942)
- Add HP11713A Switch & Attenuator Driver (@neuschs, #970)
- Add HP437B power meter (@neuschs, #979)
- Add Inficon SQM160 SQM-160 multi-film rate/thickness monitor (@dkriegner, #991)
- Add Keithley 2182 (@ConnorGCarr, #1043)
- Add KeithleyDMM6500 (@fwutw, #963)
- Add Kepco BOP 36-12 Bipolar Power Supply (@JAW90, #1086)
- Add KeysightE3631A (@OptimisticBeliever, #990)
- Add Kuhne Electronic KU SG 2.45 250A microwave generator (@jurajjasik, @BenediktBurger, @1108)
- Add MKS 974B vacuum pressure transducer (@dkriegner, #1034)
- Add Proterial rod4 (@ConnorGCarr, #1044)
- Add Racal-Dana 1992 universal counter (@tomverbeure, #798, #1012)
- Add redpitaya board (@seb5g, #1010, #1035)
- Add Teledyne HDO6xxx (@RobertoRoos, #868)
- Add Yokogawa AQ6370D Optical Spectral Analyzer (@jnnskls, #1059)
- Fix property docstrings of several instruments (@BenediktBurger, #1018)
- Fix checksums of hcp TC038D tests (@BenediktBurger, #987)
- Fix Hp8116a (@BenediktBurger, #1088)
- Fix Hp856x to append amplitude units (@neuschs, #977)
- Fix Keysight E36312A confirmed SCPI functionality (@Konradrundfunk, #1107)
- Fix Stanford Research SR830 output conversion (@dkriegner, #1069)
- Fix SR830 missing get_buffer method (@seb5g, #999)
- Fix set command of SR860 aux output (@wehlgrundspitze, #1048)
- Fix Temptronic test to use ns perf counter (@BenediktBurger, #1109, #1110)
- Fix Toptica Ibeamsmart referencing removed adapter function (@BenediktBurger, #1065)
- Fix typos in docstrings for Keithley instruments (@V0XNIHILI, #1071)
- Link Keysight, Agilent, and HP documentation pages. (@BenediktBurger, #1021)
- Update Agilent33500 Series from :code:`.ch[]` to :code:`.channels[]` (@AlecVercruysse, #945)
- Update AWG401x driver to use 'channels' (@mcdo0486, #944)
- Update HP33120A with new burst modulation parameters (@mzen228, #1056)
- Update HP34401A with new remote control command. (@Rybok, #992)
- Update Keithleys' next_error (@msmttchr, #1030)
- Update pendulum CNT-91 (@bleykauf, #988)

GUI
---
- Add a :code:`FileInputWidget` to choose if and where the experiment data is stored. (@CasperSchippers, #964)
- A default :code:`Queue` method for :code:`ManagedWindowBase` is implemented. (@CasperSchippers, #964)
- Add a default :code:`Queue` method for :code:`ManagedWindowBase` is implemented. (@CasperSchippers, #964)
- Fix :code:`ScientificInput` to be locale compatible (@pyZerrenner, #1074)
- Fix exception if loading result file with an empty parameter (@poje42, #1016)

Miscellaneous
-------------
- Add support for python 3.12 (@BenediktBurger, #1051)
- Add support for numpy 2.0 (@CasperSchippers, #1026)
- Add codecov to CI and to readme (@BenediktBurger, #1037, #1052, #1099)
- Add citation file for PyMeasure repository (@mcdo0486, #1092)
- Add release CI (@BenediktBurger, #1039)
- Update readme with permanent Zenodo DOI (@BenediktBurger, #1095)
- Bump CI dependencies to: pyvisa 1.13.0, checkout@v4 (@mcdo0486, #1097)
- Fix/pandas futurewarning (@CasperSchippers, #1062)
- Change copyright year. (@BenediktBurger, #1032)
- Fix typos (@afuetterer, #1003)

New Contributors
----------------
@guuskuiper, @OptimisticBeliever, @fwutw, @afuetterer, @poje42, @Rybok, @AlecVercruysse, @ConnorGCarr, @mzen228, @jnnskls, @V0XNIHILI, @pyZerrenner, @JAW90, @driftregion, @jurajjasik, @Konradrundfunk

**Full Changelog**: https://github.com/pymeasure/pymeasure/compare/v0.13.1...v0.14.0

Dropped Support
---------------
- Instrument manufacturer modules are no longer imported in the :code:`pymeasure/instruments/__init__.py` file. Previously, when importing a single instrument into a procedure, all instruments would be imported into memory through the manufacturer modules in :code:`pymeasure/instruments/__init__.py`. Removing manufacturer modules from that file lowers the memory footprint of pymeasure when importing an instrument. Instrument classes will need to be imported from the manufacturer module or explicitly from the instrument driver file. For example, :code:`from pymeasure.instruments import Extreme5000` will need to change to :code:`from pymeasure.instruments.extreme import Extreme5000` or :code:`from pymeasure.instruments.extreme.extreme5000 import Extreme5000`.

Version 0.13.1 (2023-10-05)
===========================
Expand Down
10 changes: 10 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- name: PyMeasure Developers
title: "PyMeasure"
version: 0.14.0
doi: 10.5281/zenodo.595633
publisher:
- name: Zenodo
repository-code: https://github.com/pymeasure/pymeasure
10 changes: 6 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@
PyMeasure scientific package
############################

PyMeasure makes scientific measurements easy to set up and run. The package contains a repository of instrument classes and a system for running experiment procedures, which provides graphical interfaces for graphing live data and managing queues of experiments. Both parts of the package are independent, and when combined provide all the necessary requirements for advanced measurements with only limited coding.
PyMeasure makes scientific measurements easy to set up and run.
The package contains a repository of instrument classes and a system for running experiment procedures, which provides graphical interfaces for graphing live data and managing queues of experiments.
Both parts of the package are independent, and when combined provide all the necessary requirements for advanced measurements with only limited coding.

PyMeasure is currently under active development, so please report any issues you experience to our `Issues page`_.

.. _Issues page: https://github.com/pymeasure/pymeasure/issues

PyMeasure runs on Python 3.8-3.11, and is tested with continuous-integration on Linux, macOS, and Windows.
PyMeasure runs on Python 3.8-3.12, and is tested with continuous-integration on Linux, macOS, and Windows.

.. image:: https://github.com/pymeasure/pymeasure/actions/workflows/pymeasure_CI.yml/badge.svg
:target: https://github.com/pymeasure/pymeasure/actions/workflows/pymeasure_CI.yml
Expand All @@ -19,8 +21,8 @@ PyMeasure runs on Python 3.8-3.11, and is tested with continuous-integration on
:target: http://pymeasure.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status

.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.3732545.svg
:target: https://doi.org/10.5281/zenodo.3732545
.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.595633.svg
:target: https://doi.org/10.5281/zenodo.595633

.. image:: https://anaconda.org/conda-forge/pymeasure/badges/version.svg
:target: https://anaconda.org/conda-forge/pymeasure
Expand Down
Loading

0 comments on commit 66b083f

Please sign in to comment.