Skip to content

Commit

Permalink
Merge pull request #122 from qucontrol/update-python
Browse files Browse the repository at this point in the history
Update Python versions
  • Loading branch information
goerz authored Jun 4, 2024
2 parents 894f7e8 + 261361a commit 5815977
Show file tree
Hide file tree
Showing 18 changed files with 1,215 additions and 1,372 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@ jobs:

build_docs:
name: Build Sphinx docs
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:

- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: actions/setup-python@v2
name: Install Python 3.8
- uses: actions/setup-python@v5
name: Install Python 3.12
with:
python-version: 3.8
python-version: 3.12

- name: Install zip-files
run: pip install zip-files

- name: Install apt packages
run: sudo apt-get install graphviz imagemagick pandoc pandoc-citeproc
run: sudo apt-get install graphviz imagemagick pandoc

- name: Install Hatch
uses: pypa/hatch@install
Expand All @@ -47,7 +47,7 @@ jobs:
- name: Zip the HTML documentation
run: zip-folder --debug --auto-root --outfile "krotov-docs-${{ steps.get_version.outputs.VERSION }}.zip" docs/_build/html

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
name: Upload documentation artifacts
with:
name: krotov-docs
Expand All @@ -60,14 +60,14 @@ jobs:
deploy_gh_pages:
name: Deploy documentation to gh-pages
if: always() && needs.build_docs.result == 'success' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/'))
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
needs: [build_docs]
steps:

- uses: actions/setup-python@v2
name: Install Python 3.8
- uses: actions/setup-python@v5
name: Install Python 3.12
with:
python-version: 3.8
python-version: 3.12

- name: Install deploy requirements
run: pip install docs-versions-menu
Expand All @@ -79,7 +79,7 @@ jobs:
echo "BRANCH_NAME=$(echo ${GITHUB_REF##*/} | tr / -)" >> $GITHUB_ENV
cat $GITHUB_ENV
- uses: actions/checkout@v2
- uses: actions/checkout@v4
name: Check out gh-pages branch (full history)
with:
ref: gh-pages
Expand Down
56 changes: 28 additions & 28 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,84 +25,84 @@ jobs:
matrix:
include:
- title: Codestyle and Main Tests
os: ubuntu-22.04
python: 3.8
os: ubuntu-24.04
python: "3.12"
commands: |
hatch run lint:black-check
hatch run lint:isort-check
hatch run cov -- $default_tests
coverage: true
- title: Oldest supported Python
os: ubuntu-22.04
python: 3.7
commands: hatch -e py37 run test -- $default_tests
os: ubuntu-24.04
python: "3.10"
commands: hatch -e py310 run test -- $default_tests
coverage: false
- title: Windows
os: windows-latest
python: 3.8
python: "3.12"
commands: hatch run test -- src tests docs\notebooks\01_example_simple_state_to_state.ipynb docs\notebooks\05_example_transmon_xgate.ipynb
coverage: false
- title: MacOS
os: macos-latest
python: 3.8
python: "3.12"
commands: hatch run cov -- $default_tests docs/notebooks/01_example_simple_state_to_state.ipynb
coverage: true
- title: Notebook 1 (State-to-State)
os: ubuntu-22.04
python: 3.8
os: ubuntu-24.04
python: "3.12"
commands: hatch run cov -- docs/notebooks/01_example_simple_state_to_state.ipynb
coverage: true
- title: Notebook 2 (RWA)
os: ubuntu-22.04
python: 3.8
os: ubuntu-24.04
python: "3.12"
commands: hatch run cov -- docs/notebooks/02_example_lambda_system_rwa_complex_pulse.ipynb
coverage: true
- title: Notebook 3 (Non-Hermitian)
os: ubuntu-22.04
python: 3.8
os: ubuntu-24.04
python: "3.12"
commands: hatch run cov -- docs/notebooks/03_example_lambda_system_rwa_non_hermitian.ipynb
coverage: true
- title: Notebook 4 (Density Matrix)
os: ubuntu-22.04
python: 3.8
os: ubuntu-24.04
python: "3.12"
commands: hatch run cov -- docs/notebooks/04_example_dissipative_qubit_reset.ipynb
coverage: true
- title: Notebook 5 (Quantum Gate)
os: ubuntu-22.04
python: 3.8
os: ubuntu-24.04
python: "3.12"
commands: hatch run cov -- docs/notebooks/05_example_transmon_xgate.ipynb
coverage: true
- title: Notebook 6 (3 States)
os: ubuntu-22.04
python: 3.8
os: ubuntu-24.04
python: "3.12"
commands: hatch run cov -- docs/notebooks/06_example_3states.ipynb
coverage: true
- title: Notebook 7 (Perfect Entanglers)
os: ubuntu-22.04
python: 3.8
os: ubuntu-24.04
python: "3.12"
commands: hatch run cov -- docs/notebooks/07_example_PE.ipynb
coverage: true
- title: Notebook 8 (Ensemble Optimization)
os: ubuntu-22.04
python: 3.8
os: ubuntu-24.04
python: "3.12"
commands: hatch run cov -- docs/notebooks/08_example_ensemble.ipynb
coverage: true
- title: Notebook 9 (NumPy)
os: ubuntu-22.04
python: 3.8
os: ubuntu-24.04
python: "3.12"
commands: hatch run cov -- docs/notebooks/09_example_numpy.ipynb
coverage: true
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: actions/setup-python@v2
- uses: actions/setup-python@v5
name: Install Python ${{ matrix.python }}
with:
python-version: ${{ matrix.python }}

- name: Install required apt packages
if: runner.os == 'Linux'
run: sudo apt-get install pandoc pandoc-citeproc liblapack-dev libblas-dev gfortran
run: sudo apt-get install pandoc liblapack-dev libblas-dev gfortran

- name: Install Hatch
uses: pypa/hatch@install
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ If you are a member of the `qucontrol organization`_, there is no need to fork
Development Prerequisites
-------------------------

Contributing to the package's developments requires that you have Python 3.8
Contributing to the package's developments requires that you have Python 3.12
and hatch_ installed (tested with Hatch 1.11). It is strongly recommended that
you also have installations of all other supported Python versions. The
recommended way to install multiple versions of Python at the same time is
Expand Down
6 changes: 6 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ History
=======


2.0.0-dev (unreleased)
----------------------

* Changed: minimum supported Python version is Python 3.10 (drop support for Python 3.7-3.9)


1.3.0 (2024-06-03)
------------------

Expand Down
13 changes: 0 additions & 13 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@
import pybtex.style.formatting.unsrt
import pybtex.style.template
from pybtex.plugin import register_plugin as pybtex_register_plugin
from sphinx.ext.autodoc import (
ClassLevelDocumenter,
InstanceAttributeDocumenter,
)


DOCS = Path(__file__).parent
Expand Down Expand Up @@ -396,15 +392,6 @@ def get_incollection_template(self, e):
pybtex_register_plugin("pybtex.style.formatting", "apsstyle", ApsStyle)


# -- Monkeypatch for instance attribs (sphinx bug #2044) -----------------------


def iad_add_directive_header(self, sig):
ClassLevelDocumenter.add_directive_header(self, sig)


InstanceAttributeDocumenter.add_directive_header = iad_add_directive_header

# -- Options for HTML output ---------------------------------------------------

# on_rtd is whether we are on readthedocs.org, this line of code grabbed from
Expand Down
Loading

0 comments on commit 5815977

Please sign in to comment.