Skip to content

Commit

Permalink
Merge main into mem-opt-qcec-tw
Browse files Browse the repository at this point in the history
  • Loading branch information
tyi1025 committed Oct 14, 2023
2 parents f520f6a + 6670228 commit c2eb771
Show file tree
Hide file tree
Showing 77 changed files with 953 additions and 956 deletions.
111 changes: 80 additions & 31 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -1,61 +1,110 @@
build_and_store_wheels: &BUILD_AND_STORE_WHEELS
install_cibuildwheel_script:
- python -m pip install cibuildwheel~=2.14.0
run_cibuildwheel_script:
- cibuildwheel
wheels_artifacts:
path: "wheelhouse/*"

.clone_script: &clone |
if [ -z "$CIRRUS_PR" ]; then
git clone --branch=$CIRRUS_BRANCH https://x-access-token:${CIRRUS_REPO_CLONE_TOKEN}@github.com/${CIRRUS_REPO_FULL_NAME}.git $CIRRUS_WORKING_DIR
git clone --recursive --branch=$CIRRUS_BRANCH https://x-access-token:${CIRRUS_REPO_CLONE_TOKEN}@github.com/${CIRRUS_REPO_FULL_NAME}.git $CIRRUS_WORKING_DIR
git reset --hard $CIRRUS_CHANGE_IN_REPO
else
git clone https://x-access-token:${CIRRUS_REPO_CLONE_TOKEN}@github.com/${CIRRUS_REPO_FULL_NAME}.git $CIRRUS_WORKING_DIR
git fetch origin pull/$CIRRUS_PR/head:pull/$CIRRUS_PR
git checkout $CIRRUS_BASE_BRANCH
git -c user.email="[email protected]" merge --no-commit pull/$CIRRUS_PR
git submodule update --init --recursive
fi
git reset --hard $CIRRUS_CHANGE_IN_REPO
git submodule update --init --recursive

linux_aarch64_task:
name: Build Linux aarch64 wheels.
.statistics_script: &statistics |
ccache -s -v
echo $(python -m pip cache dir)
echo $(python -m pip cache list)

macos_arm64_test_task:
name: 🐍 Test / 🍎 arm64
alias: macos_arm64_test
clone_script: *clone
macos_instance:
image: ghcr.io/cirruslabs/macos-monterey-xcode:latest
ccache_cache:
folder: .ccache
populate_script:
- mkdir -p .ccache
fingerprint_key: ccache-macosx_arm64
pip_cache:
folder: /Users/admin/Library/Caches/pip
prepare_env_script: |
brew install [email protected] ccache pipx ninja nox
ln -s $(which python3.10) python
export PATH=/opt/homebrew/opt/[email protected]/libexec/bin:$PATH
export PATH=/opt/homebrew/opt/ccache/libexec:$PATH
export PATH=/opt/homebrew/opt/pipx/libexec:$PATH
export PATH=/opt/homebrew/opt/ninja/libexec:$PATH
export PATH=/opt/homebrew/opt/nox/libexec:$PATH
echo "PATH=$PATH" >> $CIRRUS_ENV
echo "CCACHE_DIR=$PWD/.ccache" >> $CIRRUS_ENV
run_nox_script:
- nox -s tests-3.10 --verbose
statistics_script: *statistics

build_and_store_wheels: &BUILD_AND_STORE_WHEELS
install_cibuildwheel_script:
- python -m pip install cibuildwheel~=2.15.0
run_cibuildwheel_script:
- cibuildwheel
wheels_artifacts:
path: "wheelhouse/*"

linux_aarch64_wheels_task:
only_if: "$CIRRUS_RELEASE != ''"
name: 🐍 Packaging / 🎡 🐧 arm64
alias: linux_aarch64_wheels
clone_script: *clone
compute_engine_instance:
image_project: cirrus-images
image: family/docker-builder-arm64
architecture: arm64
platform: linux
cpu: 4
env:
CIBW_SKIP: "*-musllinux_*"

install_pre_requirements_script:
- apt install -y python3-venv python-is-python3
cpu: 8
setup_pyhton_script:
- apt-get install -y python3-venv python-is-python3
<<: *BUILD_AND_STORE_WHEELS

macos_arm64_task:
name: Build macOS arm64 wheels.
macos_arm64_wheels_task:
only_if: "$CIRRUS_RELEASE != ''"
name: 🐍 Packaging / 🎡 🍎 arm64
alias: macos_arm64_wheels
clone_script: *clone
macos_instance:
image: ghcr.io/cirruslabs/macos-monterey-xcode:latest

env:
PATH: /opt/homebrew/opt/[email protected]/bin:$PATH
install_pre_requirements_script:
- brew install [email protected]
- ln -s python3 /opt/homebrew/opt/[email protected]/bin/python
ccache_cache:
folder: .ccache
populate_script:
- mkdir -p .ccache
fingerprint_key: ccache-macosx_arm64-wheels
pip_cache:
folder: /Users/admin/Library/Caches/pip
prepare_env_script: |
brew install [email protected] ccache pipx ninja nox
ln -s $(which python3.10) python
export PATH=/opt/homebrew/opt/[email protected]/libexec/bin:$PATH
export PATH=/opt/homebrew/opt/ccache/libexec:$PATH
export PATH=/opt/homebrew/opt/pipx/libexec:$PATH
export PATH=/opt/homebrew/opt/ninja/libexec:$PATH
export PATH=/opt/homebrew/opt/nox/libexec:$PATH
echo "PATH=$PATH" >> $CIRRUS_ENV
echo "CCACHE_DIR=$PWD/.ccache" >> $CIRRUS_ENV
<<: *BUILD_AND_STORE_WHEELS
statistics_script: *statistics

publish_task:
name: Upload to PyPI
name: 🚀 Deploy to PyPI
container: { image: "python:3.10-bullseye" }
depends_on:
- Build Linux aarch64 wheels.
- Build macOS arm64 wheels.
- linux_aarch64_wheels
- macos_arm64_wheels
only_if: "$CIRRUS_RELEASE != ''"
env:
TWINE_REPOSITORY: pypi
TWINE_USERNAME: __token__
TWINE_PASSWORD: ENCRYPTED[963630b0d5f7e9ad0aba1e51f63d69ecc36ea550ccce3a382cee179da6b286ccc644aebd482f97a919f1f6a1810a0d25]
TWINE_PASSWORD: "ENCRYPTED\
[853587a6e1033bef6a80fbf7cf11762676107052030566cf\
1eca86bfaae3452433a1f05c7e6f7690d027b52d22a217c2]"
install_script: pip install twine
publish_script:
- curl -L https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/wheels.zip -o wheels.zip
Expand Down
39 changes: 10 additions & 29 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: 🐛 Bug report
description: Something is not working correctly.
title: "🐛 <title>"
labels: ["bug"]
assignees:
- burgholzer
body:
- type: markdown
attributes:
Expand All @@ -13,35 +10,19 @@ body:
Verify first that your issue is not [already reported on GitHub](https://github.com/cda-tum/qcec/search?q=is%3Aissue&type=issues).
If you are having general questions, please consider [starting a discussion](https://github.com/cda-tum/qcec/discussions).
- type: markdown
attributes:
value: >-
**Environment**
- type: input
attributes:
label: mqt.qcec version
placeholder: For example, mqt.qcec===2.0.0
validations:
required: true
- type: input
If you have general questions, please consider [starting a discussion](https://github.com/cda-tum/qcec/discussions).
- type: textarea
attributes:
label: OS
placeholder: For example, Ubuntu 22.04, macOS Big Sur, Windows etc.
label: Environment information
description: >-
Please provide information about your environment. For example, OS, C++ compiler, mqt.core version etc.
placeholder: |
- OS:
- C++ compiler:
- mqt.core version:
- Additional environment information:
validations:
required: true
- type: input
attributes:
label: Python version
placeholder: For example, Python 3.10
- type: input
attributes:
label: C++ compiler
placeholder: For example, gcc-10
- type: textarea
attributes:
label: Additional environment information
description: Feel free to add more information about your environment here.
- type: textarea
attributes:
label: Description
Expand Down
3 changes: 0 additions & 3 deletions .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: ✨ Feature request
description: Suggest an idea
title: "✨ <title>"
labels: ["enhancement"]
assignees:
- burgholzer
body:
- type: markdown
attributes:
Expand Down
16 changes: 11 additions & 5 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ignore:
- "extern/**/*"
- "mqt/**/*.cpp"
- "**/python"
- "test/**/*"

coverage:
Expand All @@ -12,10 +12,12 @@ coverage:

flag_management:
default_rules:
carryforward: true
statuses:
- type: project
target: auto
threshold: 0.5%
removed_code_behavior: adjust_base
- type: patch
target: 90%
threshold: 1%
Expand All @@ -24,12 +26,15 @@ flag_management:
paths:
- "include"
- "src"
after_n_builds: 1
- name: python
paths:
- "mqt/**/*.py"
- "src/mqt/**/*.py"
after_n_builds: 3
statuses:
- type: project
threshold: 0.5%
removed_code_behavior: adjust_base
- type: patch
target: 95%
threshold: 1%
Expand All @@ -40,6 +45,7 @@ parsers:
conditional: no
loop: no

codecov:
notify:
after_n_builds: 4
comment:
layout: "reach, diff, flags, files"
require_changes: true
show_carryforward_flags: true
4 changes: 0 additions & 4 deletions .github/codeql-config.yml

This file was deleted.

12 changes: 6 additions & 6 deletions .github/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ We value contributions from people with all levels of experience.
In particular if this is your first pull request not everything has to be perfect.
We will guide you through the process.

We use GitHub to `host code <https://github.com/cda-tum/qcec>`_, to `track issues and feature requests <https://github.com/cda-tum/qcec/issues>`_, as well as accept `pull requests <https://github.com/cda-tum/qcec/pulls>`_.
We use GitHub to `host code <https://github.com/cda-tum/mqt-qcec>`_, to `track issues and feature requests <https://github.com/cda-tum/mqt-qcec/issues>`_, as well as accept `pull requests <https://github.com/cda-tum/mqt-qcec/pulls>`_.
See https://docs.github.com/en/get-started/quickstart for a general introduction to working with GitHub and contributing to projects.

Types of Contributions
Expand All @@ -15,19 +15,19 @@ Types of Contributions
You can contribute in several ways:

- 🐛 Report Bugs
Report bugs at https://github.com/cda-tum/qcec/issues using the *🐛 Bug report* issue template. Please make sure to fill out all relevant information in the respective issue form.
Report bugs at https://github.com/cda-tum/mqt-qcec/issues using the *🐛 Bug report* issue template. Please make sure to fill out all relevant information in the respective issue form.

- 🐛 Fix Bugs
Look through the `GitHub Issues <https://github.com/cda-tum/qcec/issues>`_ for bugs. Anything tagged with "bug" is open to whoever wants to try and fix it.
Look through the `GitHub Issues <https://github.com/cda-tum/mqt-qcec/issues>`_ for bugs. Anything tagged with "bug" is open to whoever wants to try and fix it.

- ✨ Propose New Features
Propose new features at https://github.com/cda-tum/qcec/issues using the *✨ Feature request* issue template. Please make sure to fill out all relevant information in the respective issue form.
Propose new features at https://github.com/cda-tum/mqt-qcec/issues using the *✨ Feature request* issue template. Please make sure to fill out all relevant information in the respective issue form.

- ✨ Implement New Features
Look through the `GitHub Issues <https://github.com/cda-tum/qcec/issues>`_ for features. Anything tagged with "feature" is open to whoever wants to implement it. We highly appreciate external contributions to the project.
Look through the `GitHub Issues <https://github.com/cda-tum/mqt-qcec/issues>`_ for features. Anything tagged with "feature" is open to whoever wants to implement it. We highly appreciate external contributions to the project.

- 📝 Write Documentation
QCEC could always use some more `documentation <https://qcec.readthedocs.io/en/latest/>`_, and we appreciate any help with that.
QCEC could always use some more `documentation <https://mqt.readthedocs.io/projects/qcec>`_, and we appreciate any help with that.

🎉 Get Started
##############
Expand Down
13 changes: 12 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,21 @@ version: 2
updates:
- package-ecosystem: "gitsubmodule"
directory: "/"
groups:
submodules:
patterns:
- "*"
schedule:
interval: "monthly"
day: "friday"
time: "06:00"
timezone: "Europe/Vienna"

- package-ecosystem: "github-actions"
directory: "/"
groups:
github-actions:
patterns:
- "*"
schedule:
interval: "weekly"
day: "friday"
Expand All @@ -18,6 +25,10 @@ updates:

- package-ecosystem: "pip"
directory: "/"
groups:
python-dependencies:
patterns:
- "*"
schedule:
interval: "weekly"
day: "friday"
Expand Down
32 changes: 32 additions & 0 deletions .github/matchers/pylint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"problemMatcher": [
{
"severity": "warning",
"pattern": [
{
"regexp": "^([^:]+):(\\d+):(\\d+): ([A-DF-Z]\\d+): \\033\\[[\\d;]+m([^\\033]+).*$",
"file": 1,
"line": 2,
"column": 3,
"code": 4,
"message": 5
}
],
"owner": "pylint-warning"
},
{
"severity": "error",
"pattern": [
{
"regexp": "^([^:]+):(\\d+):(\\d+): (E\\d+): \\033\\[[\\d;]+m([^\\033]+).*$",
"file": 1,
"line": 2,
"column": 3,
"code": 4,
"message": 5
}
],
"owner": "pylint-error"
}
]
}
6 changes: 3 additions & 3 deletions .github/support.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Support
=======

If you are stuck with a problem using QCEC or are having questions, please do get in touch at our `Issues <https://github.com/cda-tum/qcec/issues>`_ or `Discussions <https://github.com/cda-tum/qcec/discussions>`_. We'd love to help.
If you are stuck with a problem using QCEC or are having questions, please do get in touch at our `Issues <https://github.com/cda-tum/mqt-qcec/issues>`_ or `Discussions <https://github.com/cda-tum/mqt-qcec/discussions>`_. We'd love to help.

You can save time by following this procedure when reporting a problem:

- Do try to solve the problem on your own first. Make sure to consult the `Documentation <https://qcec.readthedocs.io/en/latest/>`_.
- Search through past `Issues <https://github.com/cda-tum/qcec/issues>`_ to see if someone else already had the same problem.
- Do try to solve the problem on your own first. Make sure to consult the `Documentation <https://mqt.readthedocs.io/projects/qcec>`_.
- Search through past `Issues <https://github.com/cda-tum/mqt-qcec/issues>`_ to see if someone else already had the same problem.
- Before filing a bug report, try to create a minimal working example (MWE) that reproduces the problem. It's much easier to identify the cause for the problem if a handful of lines suffice to show that something isn't working.

You can also always reach us at `[email protected] <mailto:[email protected]>`_.
Loading

0 comments on commit c2eb771

Please sign in to comment.