Skip to content

Commit

Permalink
Merge pull request #4434 from jenshnielsen/pip_constraints
Browse files Browse the repository at this point in the history
Replace pip requirements with constraints
  • Loading branch information
jenshnielsen authored Jul 29, 2022
2 parents 46c6889 + 6c31226 commit aea5c1a
Show file tree
Hide file tree
Showing 8 changed files with 140 additions and 220 deletions.
11 changes: 2 additions & 9 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,11 @@ jobs:
uses: actions/[email protected]
with:
path: ${{ steps.prepare-cache-pip.outputs.cache-dir }}
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('**/requirements.txt') }}-${{ hashFiles('**/docs_requirements.txt') }}-${{ hashFiles('**/setup.cfg') }}
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('**/requirements.txt') }}-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-${{ matrix.python-version }}-pip-
- name: install requirements.txt
run: |
pip install -r requirements.txt
- name: install docs_requirements.txt
run: |
pip install -r docs_requirements.txt
- name: install qcodes
run: pip install .
run: pip install -c requirements.txt .[docs]
- name: Build docs on linux
run: |
cd docs
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/pytest-min-versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
uses: actions/[email protected]
with:
path: ${{ steps.prepare-cache-pip.outputs.cache-dir }}
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('**/min-requirements.txt') }}-${{ hashFiles('**/setup.cfg') }}
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('**/requirements.txt') }}-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-${{ matrix.python-version }}-pip-
- name: generate min_requirements.txt
Expand All @@ -51,12 +51,10 @@ jobs:
pip install git+https://github.com/jenshnielsen/requirements-builder.git
pip install versioningit
requirements-builder -l min -e test setup.py -o min_requirements.txt
- name: install min_requirements.txt
run: |
pip install -r min_requirements.txt
- name: install qcodes
run: |
pip install .
pip install -r min_requirements.txt
pip install .[test]
- name: Run tests
run: |
pytest --hypothesis-profile ci qcodes
10 changes: 2 additions & 8 deletions .github/workflows/pytest-non-local.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,12 @@ jobs:
uses: actions/[email protected]
with:
path: ${{ steps.prepare-cache-pip.outputs.cache-dir }}
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('**/requirements.txt') }}-${{ hashFiles('**/test_requirements.txt') }}-${{ hashFiles('**/setup.cfg') }}
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('**/requirements.txt') }}-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-${{ matrix.python-version }}-pip-
- name: install requirements.txt
run: |
pip install -r requirements.txt
- name: install test_requirements.txt
run: |
pip install -r test_requirements.txt
- name: install qcodes
run: |
pip install .
pip install .[test] -c requirements.txt
- name: Test with pytest
run: |
cd ..
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,12 @@ jobs:
uses: actions/[email protected]
with:
path: ${{ steps.prepare-cache-pip.outputs.cache-dir }}
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('**/requirements.txt') }}-${{ hashFiles('**/test_requirements.txt') }}-${{ hashFiles('**/setup.cfg') }}
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('**/requirements.txt') }}-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-${{ matrix.python-version }}-pip-
- name: install requirements.txt
run: |
pip install -r requirements.txt
- name: install test_requirements.txt
run: |
pip install -r test_requirements.txt
- name: install qcodes
run: |
pip install .
pip install .[test] -c requirements.txt
- name: Run Mypy
run: mypy qcodes
- name: Run parallel tests
Expand Down
97 changes: 0 additions & 97 deletions docs_requirements.txt

This file was deleted.

66 changes: 43 additions & 23 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,30 +24,30 @@ classifiers = [
license = {text = "MIT"}
requires-python = ">=3.7"
dependencies = [
"numpy>=1.17.0",
"pyvisa>=1.11.0, <1.12.0",
"broadbean>=0.9.1",
"h5netcdf>=0.10.0,!=0.14.0",
# see https://github.com/h5netcdf/h5netcdf/issues/154
"h5py>=3.0.0",
"websockets>=7.0",
"importlib-metadata>=4.4,<5.0.0; python_version < '3.10'",
"importlib-resources>=2.0.0; python_version < '3.9'",
"ipywidgets>=7.5.0,<8.0.0",
"jsonschema>=3.0.0",
"ruamel.yaml>=0.16.0,!=0.16.6",
"wrapt>=1.10.4",
"pandas>=1.0.0",
"xarray>=0.18.0",
"tabulate>=0.8.0",
"tqdm>=4.32.2",
"matplotlib>=3.3.0",
"numpy>=1.17.0",
"opencensus>=0.7.10",
"opencensus-ext-azure>=1.0.4, <2.0.0",
"matplotlib>=3.3.0",
"importlib-metadata>=3.6.0,<5.0.0; python_version < '3.10'",
"importlib-resources>=2.0.0; python_version < '3.9'",
"typing_extensions>=3.10.0",
"packaging>=20.0",
"ipywidgets>=7.5.0,<8.0.0",
"broadbean>=0.9.1",
"pandas>=1.0.0",
"pyvisa>=1.11.0, <1.12.0",
"ruamel.yaml>=0.16.0,!=0.16.6",
"tabulate>=0.8.0",
"typing_extensions>=3.10.0",
"tqdm>=4.32.2",
"uncertainties>=3.1.4",
"h5netcdf>=0.10.0,!=0.14.0",
# see https://github.com/h5netcdf/h5netcdf/issues/154
"versioningit>=1.1.0",
"websockets>=7.0",
"wrapt>=1.10.4",
"xarray>=0.18.0",
# transitive dependencies. We list these explicitly to",
# ensure that we always use versions that do not have",
# known security vulnerabilities",
Expand All @@ -74,18 +74,38 @@ qtplot = ["pyqtgraph>=0.11.0"]
slack = ["slack-sdk>=3.4.2"]
zurichinstruments = ["zhinst-qcodes>=0.3"]
test = [
"pytest>=6.0.0",
"PyVisa-sim>=0.4.0",
"hypothesis>=5.49.0",
"pytest-xdist>=2.0.0",
"coverage[toml]>=6.0.0",
"deepdiff>=5.0.2",
"hypothesis>=5.49.0",
"lxml>=4.3.0",
"mypy>=0.971",
"pytest>=6.0.0",
"pytest-cov>=3.0.0",
"pytest-mock>=3.0.0",
"pytest-rerunfailures>=5.0.0",
"lxml>=4.3.0",
"pytest-xdist>=2.0.0",
"pyqtgraph>=0.11.0", # pyqtgraph tests
"PyQt5>=5.15.0", # pyqtgraph tests
"PyVisa-sim>=0.4.0",
"sphinx>=4.5.0", # sphinx extension tests
"types_requests>=0.1.8",
"types-setuptools>=57.0.0",
"types-tabulate>=0.1.0",
"Sphinx>=4.1.2",
]
docs = [
"autodocsumm>=0.2.8",
"nbsphinx>=0.8.9",
"PyQt5>=5.15.0", # pyqtgraph examples
"pyqtgraph>=0.11.0", # pyqtgraph examples
"PyVisa-sim>=0.4.0",
"sphinx>=4.5.0",
"sphinx-favicon>=0.2",
"sphinx-issues>=3.0.1",
"sphinx-jsonschema>=1.19.1",
"sphinx-rtd-theme>=1.0.0",
"sphinxcontrib-towncrier>=0.2.1a0",
"scipy>=1.7.0", # examples using scipy
"slack-sdk>=3.4.2", # slack example notebook
]

[project.scripts]
Expand Down
Loading

0 comments on commit aea5c1a

Please sign in to comment.