Skip to content

Commit

Permalink
Merge branch 'dev.major' into feature/intidx-64-compilation-option
Browse files Browse the repository at this point in the history
  • Loading branch information
hodgestar committed Apr 20, 2022
2 parents 4404d65 + dadeee1 commit 1884c3b
Show file tree
Hide file tree
Showing 399 changed files with 29,262 additions and 14,021 deletions.
10 changes: 10 additions & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
version: "2"
exclude_patterns:
- "doc/"
- "dist/"
- "**/tests/"
checks:
argument-count:
config:
Expand Down Expand Up @@ -34,3 +38,9 @@ plugins:
enabled: true
pep8:
enabled: true
duplication:
enabled: true
config:
languages:
python:
python_version: 3
35 changes: 0 additions & 35 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

53 changes: 53 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: 🐛 Bug Report
description: Spotted a bug? Report it to us!
labels: ["bug"]
body:
- type: textarea
id: bug-description
attributes:
label: Bug Description
description: Tell us what went wrong (including what triggered the bug)
placeholder: "A clear and concise description of what the bug is, and the steps to reproduce it"
validations:
required: true
- type: textarea
id: code-to-reproduce
attributes:
label: Code to Reproduce the Bug
description: Please provide a minimal working example. Paste your code directly (It will be automatically formatted, so there's no need for backticks)
placeholder: "from qutip import identity\nprint(identity(2))"
render: shell
- type: textarea
id: bug-output
attributes:
label: Code Output
description: Please paste the relevant output here (automatically formatted)
placeholder: "Quantum object: dims = [[2], [2]], shape = (2, 2), type = oper, isherm = True\nQobj data =\n[[1. 0.]\n[0. 1.]]"
render: shell
- type: textarea
id: expected-behaviour
attributes:
label: Expected Behaviour
description: What should have happened instead?
placeholder: "A clear and concise description of what you expected to happen"
validations:
required: true
- type: textarea
id: your-environment
attributes:
label: Your Environment
description: Please use `qutip.about()` to get the information about your environment and paste it here (automatically formatted)
placeholder: "QuTiP Version: ***\nNumpy Version: ***\nScipy Version: ***\nCython Version: ***\nMatplotlib Version: ***\nPython Version: ***\nNumber of CPUs: ***\nBLAS Info: ***\nOPENMP Installed: ***\nINTEL MKL Ext: ***\nPlatform Info: ***"
render: shell
validations:
required: true
- type: textarea
id: additional-context
attributes:
label: Additional Context
description: Add anything else you want to tell us. You can include images, plots, etc.
placeholder: "Additional information, images, graphs, plots, etc."
- type: markdown
id: thank-you
attributes:
value: Thanks for taking the time to fill out this bug report!
20 changes: 0 additions & 20 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

36 changes: 36 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: 🚀 Feature Request
description: Suggest an idea for this project!
labels: ["ENH"]
body:
- type: textarea
id: problem-description
attributes:
label: Problem Description
description: Give us a clear and concise description of what the problem is!
placeholder: "Example - It would be better if [...]"
validations:
required: true
- type: textarea
id: proposed-solution
attributes:
label: Proposed Solution
description: Give us a description of your proposed solution
placeholder: "A clear and concise description of what you want to happen"
validations:
required: true
- type: textarea
id: alternate-solutions
attributes:
label: Alternate Solutions
description: Are there other ways of implementing this feature?
placeholder: "A clear and concise description of any alternative solutions or features you've considered"
- type: textarea
id: additional-context
attributes:
label: Additional Context
description: You can tell us more about your idea, add code snippets or images, etc.
placeholder: "Give us more context or screenshots about the feature request here"
- type: markdown
id: thank-you
attributes:
value: Thanks for taking the time to fill out this feature request!
26 changes: 0 additions & 26 deletions .github/ISSUE_TEMPLATE/others.md

This file was deleted.

15 changes: 15 additions & 0 deletions .github/ISSUE_TEMPLATE/others.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: 🤔 Others
description: Tell us about issues that aren't exactly bugs or features
body:
- type: textarea
id: issue-description
attributes:
label: Describe the Issue!
description: Tell us about your issue. You can include screenshots, code snippets, etc.
placeholder: "Please describe the issue here"
validations:
required: true
- type: markdown
id: thank-you
attributes:
value: Thanks for taking the time to fill out this issue!
4 changes: 2 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
**Checklist**
Thank you for contributing to QuTiP! Please make sure you have finished the following tasks before opening the PR.

- [ ] Please read [Contributing to QuTiP Development](https://github.com/qutip/qutip-doc/blob/master/CONTRIBUTING.md)
- [ ] Please read [Contributing to QuTiP Development](http://qutip.org/docs/latest/development/contributing.html)
- [ ] Contributions to qutip should follow the [pep8 style](https://www.python.org/dev/peps/pep-0008/).
You can use [pycodestyle](http://pycodestyle.pycqa.org/en/latest/index.html) to check your code automatically
- [ ] Please add tests to cover your changes if applicable.
- [ ] If the behavior of the code has changed or new feature has been added, please also update the [documentation](https://github.com/qutip/qutip-doc) and the [notebook](https://github.com/qutip/qutip-notebooks). Feel free to ask if you are not sure.
- [ ] If the behavior of the code has changed or new feature has been added, please also update the documentation in the `doc` folder, and the [notebook](https://github.com/qutip/qutip-notebooks). Feel free to ask if you are not sure.

Delete this checklist after you have completed all the tasks. If you have not finished them all, you can also open a [Draft Pull Request](https://github.blog/2019-02-14-introducing-draft-pull-requests/) to let the others know this on-going work and keep this checklist in the PR description.

Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,11 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
env:
# Set up wheels matrix. This is CPython 3.6--3.9 for all OS targets.
CIBW_BUILD: "cp3[6-9]-*"
# Set up wheels matrix. This is CPython 3.6--3.10 for all OS targets.
CIBW_BUILD: "cp3{6,7,8,9,10}-*"
# Numpy and SciPy do not supply wheels for i686 for Python 3.10, so we
# skip those too:
CIBW_SKIP: "*-musllinux* cp310-manylinux_i686 cp310-win32"
OVERRIDE_VERSION: ${{ github.event.inputs.override_version }}

steps:
Expand All @@ -120,8 +123,8 @@ jobs:
- name: Install cibuildwheel
run: |
# cibuildwheel does the heavy lifting for us. Originally tested on
# 1.8.0, but should be fine at least up to any major new release.
python -m pip install 'cibuildwheel<2.0'
# 2.3.0, but should be fine at least up to any minor new release.
python -m pip install 'cibuildwheel==2.3.*'
- name: Build wheels
shell: bash
Expand Down Expand Up @@ -164,7 +167,7 @@ jobs:
- name: Verify this is not a dev version
shell: bash
run: |
python -m pip install wheels/*-cp37-cp37m-manylinux2010_x86_64.whl
python -m pip install wheels/*-cp37-cp37m-*.manylinux2010_x86_64.whl
python -c 'import qutip; print(qutip.__version__); assert "dev" not in qutip.__version__; assert "+" not in qutip.__version__'
# We built the zipfile for convenience distributing to Windows users on
Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/build_documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Build HTML documentation

on:
[push, pull_request]

jobs:
build:
name: Build documentation
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

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

- name: Install documentation dependencies
run: |
python -mpip install -r doc/requirements.txt
- name: Install QuTiP from GitHub
run: |
# Build without build isolation so that we use the build
# dependencies already installed from doc/requirements.txt.
python -m pip install -e .[full] --no-build-isolation
# Install in editable mode so it doesn't matter if we import from
# inside the installation directory, otherwise we can get some errors
# because we're importing from the wrong location.
python -c 'import qutip; qutip.about()'
- name: Build documentation
working-directory: doc
run: |
make html SPHINXOPTS="--keep-going -T"
# Above flags are:
# -W : turn warnings into errors
# --keep-going : do not stop after the first error
# -T : display a full traceback if a Python exception occurs
- name: Upload built files
uses: actions/upload-artifact@v2
with:
name: qutip_html_docs
path: doc/_build/html/*
if-no-files-found: error
23 changes: 20 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,23 @@ jobs:
# Ignore ImportWarning because pyximport registered an importer
# PyxImporter that does not have a find_spec method and this raises
# a warning on Python 3.10
# Ignore DeprecationWarnings raised by cvxpy importing scipy.sparse.X
# under SciPy 1.8.0+.
- case-name: Python 3.10
os: ubuntu-latest
python-version: "3.10"
condaforge: 1
pytest-extra-options: "-W ignore::ImportWarning"
pytest-extra-options: "-W ignore::ImportWarning -W ignore::DeprecationWarning:cvxpy.interface.scipy_wrapper"

# Windows. Once all tests pass without special options needed, this
# can be moved to the main os list in the test matrix. All the tests
# that fail currently seem to do so because mcsolve uses
# multiprocessing under the hood. Windows does not support fork()
# well, which makes transfering objects to the child processes
# error prone. See, e.g., https://github.com/qutip/qutip/issues/1202
- case-name: Windows Latest
os: windows-latest
pytest-extra-options: "-k 'not (test_correlation or test_interpolate or test_mcsolve)'"

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -108,12 +120,13 @@ jobs:
fi
python -m pip install -e .[$QUTIP_TARGET]
python -m pip install coverage==6.2
python -m pip install pytest-cov coveralls
python -m pip install pytest-cov coveralls pytest-fail-slow
- name: Package information
run: |
conda list
python -c "import qutip; qutip.about()"
python -c "import qutip; print(qutip.settings.install)"
- name: Environment information
run: |
Expand All @@ -136,13 +149,17 @@ jobs:
# truly being executed.
export QUTIP_NUM_PROCESSES=2
fi
pytest --strict-config --strict-markers --durations=0 --durations-min=1.0 --verbosity=1 --cov=qutip --cov-report= --color=yes ${{ matrix.pytest-extra-options }} qutip/tests
pytest --strict-config --strict-markers --fail-slow=300 --durations=0 --durations-min=1.0 --verbosity=1 --cov=qutip --cov-report= --color=yes ${{ matrix.pytest-extra-options }} qutip/tests
# Above flags are:
# -Werror
# treat warnings as errors
# --strict-config
# error out if the configuration file is not parseable
# --strict-markers
# error out if a marker is used but not defined in the
# configuration file
# --timeout=300
# error any individual test that goes longer than the given time
# --durations=0 --durations-min=1.0
# at the end, show a list of all the tests that took longer than a
# second to run
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
.DS_Store
.f2py_f2cmap
.idea/
.vscode/

# Packages
*.egg
Expand Down Expand Up @@ -41,3 +42,4 @@ qutip/solver/ode/*.c
benchmark/benchmark_data.js
*-tasks.txt
*compiled_coeff*
result_images/
Loading

0 comments on commit 1884c3b

Please sign in to comment.