Skip to content

Commit 894a9f1

Browse files
authored
🏗️ Update repository and project setup (#52)
* build: 🏗️ update pyproject.toml with new dependency-groups and update noxfile accordingly * build: 🔒 update uv.lock * ci: 👷 update pre-commit config * chore: 🔥 remove test.txt * chore: ♻️ add license headers * chore: ♻️ rename LICENSE.txt to LICENSE.md * chore: 👷 update pyproject.toml * fix: 🐛 fix cmake settings in pyproject.toml that are no longer allowed * fix: 🐛 add guards for imports on optional dependencies * chore: 📌 pin versions for docs dependencies * refactor: ♻️ add namespace to all cpp files * refactor: 🚨 resolve linter issue * build: ➕ add pybtex dependency for docs * fix: 🐛 fix doxygen path in noxfile * chore: ♻️ update .readthedocs.yaml file to use uv * chore: ➖ remove pybtex dependency for docs again * build: ➕ add hoverxref dependency for docs * docs: 📝 update docs build
1 parent c970b17 commit 894a9f1

File tree

108 files changed

+1941
-485
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+1941
-485
lines changed

.cmake-format.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@ format:
22
line_width: 100
33
keyword_case: "upper"
44
autosort: true
5+
6+
markup:
7+
first_comment_is_literal: true

.license-tools-config.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"author": {
3+
"name": "Chair for Design Automation, TUM\nCopyright (c) 2025 Munich Quantum Software Company GmbH",
4+
"years": [2024, 2025]
5+
},
6+
"force_author": true,
7+
"license": "MIT",
8+
"title": false,
9+
"include": ["**/*"],
10+
"style_override_for_suffix": {
11+
".pyi": "DOCSTRING_STYLE",
12+
".yaml": "POUND_STYLE",
13+
".toml": "POUND_STYLE",
14+
".in": "POUND_STYLE"
15+
},
16+
"exclude": [
17+
"^\\.[^/]+",
18+
"/\\.[^/]+",
19+
".*\\.qasm",
20+
".*\\.md",
21+
".*\\.bib",
22+
".*\\.cff",
23+
".*\\.css",
24+
".*\\.json",
25+
".*\\.html",
26+
".*\\.tfc",
27+
".*\\.qc",
28+
".*\\.real",
29+
".*\\.tex",
30+
".*\\.out",
31+
".*\\.rst",
32+
".*\\.txt",
33+
"uv\\.lock",
34+
"py\\.typed",
35+
".*build.*",
36+
"Doxyfile"
37+
]
38+
}

.pre-commit-config.yaml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,22 +60,24 @@ repos:
6060
repo: https://github.com/adamchainz/blacken-docs
6161
rev: 1.18.0
6262
- hooks:
63-
- additional_dependencies:
64-
- pyyaml
65-
files: (\.cmake|CMakeLists.txt)(.in)?$
66-
id: cmake-format
67-
types:
68-
- file
69-
repo: https://github.com/cheshirekow/cmake-format-precommit
70-
rev: v0.6.13
63+
- id: license-tools
64+
repo: https://github.com/emzeat/mz-lictools
65+
rev: v2.7.0
7166
- hooks:
7267
- id: clang-format
7368
types_or:
7469
- c++
7570
- c
7671
- cuda
7772
repo: https://github.com/pre-commit/mirrors-clang-format
78-
rev: v18.1.8
73+
rev: v20.1.3
74+
- hooks:
75+
- id: cmake-format
76+
additional_dependencies: [pyyaml]
77+
types: [file]
78+
files: (\.cmake|CMakeLists.txt)(.in)?$
79+
repo: https://github.com/cheshirekow/cmake-format-precommit
80+
rev: v0.6.13
7981
- hooks:
8082
- id: prettier
8183
types_or:

.readthedocs.yaml

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,42 @@
11
version: 2
22

3-
submodules:
4-
include: all
5-
recursive: true
3+
formats:
4+
- pdf
5+
- htmlzip
66

77
build:
8-
os: ubuntu-22.04
8+
os: ubuntu-24.04
99
tools:
10-
python: "3.11"
10+
python: "3.12"
11+
apt_packages:
12+
- graphviz
13+
- inkscape
1114
jobs:
1215
post_checkout:
1316
# Skip docs build if the commit message contains "skip ci"
1417
- (git --no-pager log --pretty="tformat:%s -- %b" -1 | grep -viq "skip ci") || exit 183
1518
# Skip docs build if there are no changes related to docs
1619
- |
17-
if [ "$READTHEDOCS_VERSION_TYPE" = "external" ] && git diff --quiet origin/main -- docs/ .readthedocs.yaml src/mqt/ src/python include/python .github/contributing* .github/workflows/support*;
20+
if [ "$READTHEDOCS_VERSION_TYPE" = "external" ] && git diff --quiet origin/main -- docs/ .readthedocs.yaml src/mqt/ src/python include/*/python .github/contributing* .github/support*;
1821
then
1922
exit 183;
2023
fi
21-
22-
sphinx:
23-
configuration: docs/conf.py
24-
25-
python:
26-
install:
27-
- method: pip
28-
path: .
29-
extra_requirements:
30-
- docs
24+
# Unshallow the git clone and fetch tags to get proper version information
25+
- git fetch --unshallow --tags
26+
pre_build:
27+
# Set up uv
28+
- asdf plugin add uv
29+
- asdf install uv latest
30+
- asdf global uv latest
31+
build:
32+
html:
33+
- uv run --frozen --no-dev --group docs -m sphinx -T -b html -d docs/_build/doctrees -D language=en docs $READTHEDOCS_OUTPUT/html
34+
htmlzip:
35+
- uv run --frozen --no-dev --group docs -m sphinx -T -b dirhtml -d docs/_build/doctrees -D language=en docs docs/_build/dirhtml
36+
- mkdir -p $READTHEDOCS_OUTPUT/htmlzip
37+
- zip -r $READTHEDOCS_OUTPUT/htmlzip/html.zip docs/_build/dirhtml/*
38+
pdf:
39+
- uv run --frozen --no-dev --group docs -m sphinx -T -b latex -d docs/_build/doctrees -D language=en docs docs/_build/latex
40+
- cd docs/_build/latex && latexmk -pdf -f -dvi- -ps- -interaction=nonstopmode -jobname=$READTHEDOCS_PROJECT
41+
- mkdir -p $READTHEDOCS_OUTPUT/pdf
42+
- cp docs/_build/latex/$READTHEDOCS_PROJECT.pdf $READTHEDOCS_OUTPUT/pdf/$READTHEDOCS_PROJECT.pdf

CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# Copyright (c) 2024 - 2025 Chair for Design Automation, TUM Copyright (c) 2025 Munich Quantum
2+
# Software Company GmbH All rights reserved.
3+
#
4+
# SPDX-License-Identifier: MIT
5+
#
6+
# Licensed under the MIT License
7+
18
cmake_minimum_required(VERSION 3.26)
29
cmake_policy(SET CMP0069 NEW)
310
set(CMAKE_POLICY_DEFAULT_CMP0069 NEW)
File renamed without changes.

app/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# Copyright (c) 2024 - 2025 Chair for Design Automation, TUM Copyright (c) 2025 Munich Quantum
2+
# Software Company GmbH All rights reserved.
3+
#
4+
# SPDX-License-Identifier: MIT
5+
#
6+
# Licensed under the MIT License
7+
18
add_executable(mqt_debugger_app testDDSimDebugger.cpp)
29

310
# set include directories

app/testDDSimDebugger.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
/*
2+
* Copyright (c) 2024 - 2025 Chair for Design Automation, TUM
3+
* Copyright (c) 2025 Munich Quantum Software Company GmbH
4+
* All rights reserved.
5+
*
6+
* SPDX-License-Identifier: MIT
7+
*
8+
* Licensed under the MIT License
9+
*/
10+
111
/**
212
* @file testDDSimDebugger.cpp
313
* @brief A test application that runs the CLI frontend using the DD backend.
@@ -11,6 +21,8 @@
1121
#include <sstream>
1222
#include <string>
1323

24+
using namespace mqt::debugger;
25+
1426
int main() {
1527
std::ifstream file("program.qasm");
1628
if (!file.is_open()) {

cmake/ExternalDependencies.cmake

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# Copyright (c) 2024 - 2025 Chair for Design Automation, TUM
2+
# Copyright (c) 2025 Munich Quantum Software Company GmbH
3+
# All rights reserved.
4+
#
5+
# SPDX-License-Identifier: MIT
6+
#
7+
# Licensed under the MIT License
8+
19
include(FetchContent)
210
set(FETCH_PACKAGES "")
311

cmake/cmake_uninstall.cmake.in

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# Copyright (c) 2024 - 2025 Chair for Design Automation, TUM
2+
# Copyright (c) 2025 Munich Quantum Software Company GmbH
3+
# All rights reserved.
4+
#
5+
# SPDX-License-Identifier: MIT
6+
#
7+
# Licensed under the MIT License
8+
19
# Source: https://gitlab.kitware.com/cmake/community/-/wikis/FAQ#can-i-do-make-uninstall-with-cmake
210

311
if(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt")

0 commit comments

Comments
 (0)