From 4605fda6c343cad01a7cad49a05b2cb27f17773c Mon Sep 17 00:00:00 2001 From: "Felt, Nicholas" Date: Tue, 27 Aug 2024 10:27:17 -0700 Subject: [PATCH] test: Skip running certain pre-commit hooks that fail in older Python versions --- README.md | 110 +++++++++++++++++------------------ pyproject.toml | 4 +- scripts/contributor_setup.py | 7 ++- 3 files changed, 62 insertions(+), 59 deletions(-) diff --git a/README.md b/README.md index 8d4c8919..0fb7d296 100644 --- a/README.md +++ b/README.md @@ -81,59 +81,59 @@ _Device Support Levels_ | Type | Series/Model | Command
Type | Basic
Control | Python API
Validation
Status | | ------ | ------------------------ | --------------- | ---------------- | ---------------------------------- | -| AFGs | **AFG3000** | PI | ✅ | | -| | **AFG31xxx** | PI | ✅ | | -| AWGs | **AWG5000** | PI | ✅ | | -| | **AWG5200** | PI | ✅ | | -| | **AWG7000** | PI | ✅ | ✅ | -| | **AWG70000** | PI | ✅ | ✅ | -| Scopes | **2 Series MSO** | PI | ✅ | ✅ | -| | **3 Series MDO** | PI | ✅ | | -| | **4 Series MSO** | PI | ✅ | ✅ | -| | **4 Series B MSO** | PI | ✅ | ✅ | -| | **5 Series MSO** | PI | ✅ | ✅ | -| | **5 Series B MSO** | PI | ✅ | ✅ | -| | **5 Series MSO (LP)** | PI | ✅ | ✅ | -| | **6 Series MSO** | PI | ✅ | ✅ | -| | **6 Series B MSO** | PI | ✅ | ✅ | -| | **6 Series LPD** | PI | ✅ | ✅ | -| | **MSO2000/B** | PI | ✅ | | -| | **DPO2000/B** | PI | ✅ | | -| | **MDO3000** | PI | ✅ | ✅ | -| | **MDO4000/B/C** | PI | ✅ | ✅ | -| | **MSO4000/B** | PI | ✅ | ✅ | -| | **DPO4000/B** | PI | ✅ | ✅ | -| | **MSO5000/B** | PI | ✅ | ✅ | -| | **DPO5000/B** | PI | ✅ | ✅ | -| | **DPO7000/C** | PI | ✅ | ✅ | -| | **DPO70000/C/D/DX/SX** | PI | ✅ | ✅ | -| | **DSA70000/C/D** | PI | ✅ | ✅ | -| | **MSO70000/C/DX** | PI | ✅ | ✅ | -| | **TSOVu** | PI | ✅ | | -| | **TekScope** | PI | ✅ | ✅ | -| PSUs | **2200** | PI | ✅ | | -| | **2220** | PI | ✅ | | -| | **2230** | PI | ✅ | | -| | **2231** | PI | ✅ | | -| | **2280S** | PI | ✅ | | -| | **2281S** | PI | ✅ | | -| SMUs | **24xx Standard** | PI | ✅ | | -| | **24xx Interactive** | TSP | ✅ | ✅ | -| | **26xxB** | TSP | ✅ | 🚧 | -| | **2636B** | TSP | ✅ | ✅ | -| | **Model 2601B-PULSE** | TSP | ✅ | | -| | **Model 2606B** | TSP | ✅ | 🚧 | -| | **2651A** | TSP | ✅ | ✅ | -| | **2657A** | TSP | ✅ | | -| | **6430 (electrometer)** | PI | ✅ | | -| | **6514 (electrometer)** | PI | ✅ | | -| | **6517B (electrometer)** | PI | ✅ | | -| MTs | **TMT4** | API | ✅ | | -| DMMs | **DMM6500** | TSP | ✅ | | -| | **DMM7510** | TSP | ✅ | | -| | **DMM7512** | TSP | ✅ | | -| DAQs | **DAQ6510** | TSP | ✅ | | -| SSs | **3706A** | TSP | ✅ | | +| AFGs | **AFG3000** | PI | ✅ | | +| | **AFG31xxx** | PI | ✅ | | +| AWGs | **AWG5000** | PI | ✅ | | +| | **AWG5200** | PI | ✅ | | +| | **AWG7000** | PI | ✅ | ✅ | +| | **AWG70000** | PI | ✅ | ✅ | +| Scopes | **2 Series MSO** | PI | ✅ | ✅ | +| | **3 Series MDO** | PI | ✅ | | +| | **4 Series MSO** | PI | ✅ | ✅ | +| | **4 Series B MSO** | PI | ✅ | ✅ | +| | **5 Series MSO** | PI | ✅ | ✅ | +| | **5 Series B MSO** | PI | ✅ | ✅ | +| | **5 Series MSO (LP)** | PI | ✅ | ✅ | +| | **6 Series MSO** | PI | ✅ | ✅ | +| | **6 Series B MSO** | PI | ✅ | ✅ | +| | **6 Series LPD** | PI | ✅ | ✅ | +| | **MSO2000/B** | PI | ✅ | | +| | **DPO2000/B** | PI | ✅ | | +| | **MDO3000** | PI | ✅ | ✅ | +| | **MDO4000/B/C** | PI | ✅ | ✅ | +| | **MSO4000/B** | PI | ✅ | ✅ | +| | **DPO4000/B** | PI | ✅ | ✅ | +| | **MSO5000/B** | PI | ✅ | ✅ | +| | **DPO5000/B** | PI | ✅ | ✅ | +| | **DPO7000/C** | PI | ✅ | ✅ | +| | **DPO70000/C/D/DX/SX** | PI | ✅ | ✅ | +| | **DSA70000/C/D** | PI | ✅ | ✅ | +| | **MSO70000/C/DX** | PI | ✅ | ✅ | +| | **TSOVu** | PI | ✅ | | +| | **TekScope** | PI | ✅ | ✅ | +| PSUs | **2200** | PI | ✅ | | +| | **2220** | PI | ✅ | | +| | **2230** | PI | ✅ | | +| | **2231** | PI | ✅ | | +| | **2280S** | PI | ✅ | | +| | **2281S** | PI | ✅ | | +| SMUs | **24xx Standard** | PI | ✅ | | +| | **24xx Interactive** | TSP | ✅ | ✅ | +| | **26xxB** | TSP | ✅ | 🚧 | +| | **2636B** | TSP | ✅ | ✅ | +| | **Model 2601B-PULSE** | TSP | ✅ | | +| | **Model 2606B** | TSP | ✅ | 🚧 | +| | **2651A** | TSP | ✅ | ✅ | +| | **2657A** | TSP | ✅ | | +| | **6430 (electrometer)** | PI | ✅ | | +| | **6514 (electrometer)** | PI | ✅ | | +| | **6517B (electrometer)** | PI | ✅ | | +| MTs | **TMT4** | API | ✅ | | +| DMMs | **DMM6500** | TSP | ✅ | | +| | **DMM7510** | TSP | ✅ | | +| | **DMM7512** | TSP | ✅ | | +| DAQs | **DAQ6510** | TSP | ✅ | | +| SSs | **3706A** | TSP | ✅ | | @@ -147,8 +147,8 @@ _Software Solution Support Levels_ | Software
Solution | Command
Type | Basic
Control | Python API
Validation
Status | | -------------------- | --------------- | ---------------- | ---------------------------------- | -| DPOJET | PI | ✅ | ✅ | -| SourceXpress | PI | ✅ | ✅ | +| DPOJET | PI | ✅ | ✅ | +| SourceXpress | PI | ✅ | ✅ | diff --git a/pyproject.toml b/pyproject.toml index add61fa8..ec1ebba1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -427,8 +427,8 @@ passenv = PYRIGHT_PYTHON_GLOBAL_NODE # If set outside of tox, this will cause python-pyright to use nodeenv to install node rather than use the system node setenv = DOC_PYTHON_VERSION = python3.11 # Keep this in sync with .readthedocs.yml and any CI scripts - # Skip pre-commit checks that are not needed - SKIP = file-contents-sorter + # Skip pre-commit checks that are not needed (yamlfix should be removed from this list once Python 3.8 support is dropped) + SKIP = file-contents-sorter,yamlfix commands_pre = poetry install --no-root --without=main commands = diff --git a/scripts/contributor_setup.py b/scripts/contributor_setup.py index 7e80d174..eb16dbcf 100644 --- a/scripts/contributor_setup.py +++ b/scripts/contributor_setup.py @@ -49,10 +49,13 @@ def main() -> None: try: if RUNNING_IN_VIRTUALENV: raise IndexError - if sys.version_info < (3, 8): # noqa: UP036 + # This requires contributors to use newer versions of Python even + # though the package supports older versions. + if sys.version_info < (3, 9): msg = ( "Unable to set up the environment. " - "Please use a Python version greater than or equal to 3.8." + "Please use a Python version greater than 3.8 for " + "local development on this package." ) raise SystemExit(msg) # Windows systems require the 64 bit python