Skip to content

Commit

Permalink
πŸ”₯ strip repo (#35)
Browse files Browse the repository at this point in the history
* πŸ”§ update pre-commit config

* πŸ”₯ remove irrelevant parts of the code base

* 🩹 fix executable

* πŸ”§ tokenless codecov

* πŸ”₯ remove bindings config from CI

* 🚨 fix shadowing warning
  • Loading branch information
burgholzer authored Jun 17, 2024
1 parent 26bbfae commit da73d62
Show file tree
Hide file tree
Showing 4,011 changed files with 20 additions and 1,025,856 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
6 changes: 0 additions & 6 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ updates:
day: "friday"
time: "05:00"
timezone: "Europe/Vienna"
assignees:
- "hillmich"

# Enable version updates for GitHub Actions
- package-ecosystem: "github-actions"
Expand All @@ -23,8 +21,6 @@ updates:
day: "friday"
time: "05:00"
timezone: "Europe/Vienna"
assignees:
- "hillmich"

- package-ecosystem: "pip"
directory: "/"
Expand All @@ -33,5 +29,3 @@ updates:
day: "friday"
time: "05:00"
timezone: "Europe/Vienna"
assignees:
- "hillmich"
53 changes: 0 additions & 53 deletions .github/workflows/bindings.yml

This file was deleted.

11 changes: 6 additions & 5 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Set up mold as linker
uses: rui314/setup-mold@v1
- name: Configure CMake
run: cmake -S "${{github.workspace}}" -B "${{github.workspace}}/build" -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBINDINGS=ON -DBUILD_DDSIM_TESTS=ON -DBUILD_QFR_TESTS=ON -DBUILD_DD_PACKAGE_TESTS=ON
run: cmake -S "${{github.workspace}}" -B "${{github.workspace}}/build" -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_DDSIM_TESTS=ON -DBUILD_QFR_TESTS=ON -DBUILD_DD_PACKAGE_TESTS=ON
- name: Build
run: cmake --build "${{github.workspace}}/build" --config $BUILD_TYPE
- name: Test
Expand Down Expand Up @@ -71,22 +71,23 @@ jobs:
name: Coverage
needs: [build-ubuntu]
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up mold as linker
uses: rui314/setup-mold@v1
- name: Configure CMake
run: cmake -S "${{github.workspace}}" -B "${{github.workspace}}/build" -DCMAKE_BUILD_TYPE=Debug -DENABLE_COVERAGE=1 -DCOVERAGE=ON -DBUILD_DDSIM_TESTS=ON -DBUILD_QFR_TESTS=ON -DBUILD_DD_PACKAGE_TESTS=ON -DBINDINGS=ON
run: cmake -S "${{github.workspace}}" -B "${{github.workspace}}/build" -DCMAKE_BUILD_TYPE=Debug -DENABLE_COVERAGE=1 -DCOVERAGE=ON -DBUILD_DDSIM_TESTS=ON -DBUILD_QFR_TESTS=ON -DBUILD_DD_PACKAGE_TESTS=ON
- name: Build
run: cmake --build "${{github.workspace}}/build" --config Debug
- name: Test
working-directory: ${{github.workspace}}/build/test
run: ctest --build-config Debug --output-on-failure --repeat until-pass:3 --timeout 300 --tests-regex "CircuitSimTest.*|LimTest.*(tiny|simple|randomCliffordCircuit_([3-9]|1[0-5]))"
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
gcov: true
use_oidc: true
2 changes: 1 addition & 1 deletion .github/workflows/cpp-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
echo $CXX
$CC --version
$CXX --version
cmake -S "${{github.workspace}}" -B "${{github.workspace}}/build" -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBINDINGS=ON -DBUILD_DDSIM_TESTS=ON -DBUILD_QFR_TESTS=ON -DBUILD_DD_PACKAGE_TESTS=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
cmake -S "${{github.workspace}}" -B "${{github.workspace}}/build" -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_DDSIM_TESTS=ON -DBUILD_QFR_TESTS=ON -DBUILD_DD_PACKAGE_TESTS=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
- name: Run cpp-linter
uses: cpp-linter/cpp-linter-action@v2
id: linter
Expand Down
33 changes: 4 additions & 29 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ exclude: "cxxopts|taskflow|zx|json|pybind11|pybind11_json|googletest"
repos:
# Standard hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
Expand All @@ -28,15 +28,9 @@ repos:
- id: mixed-line-ending
- id: trailing-whitespace

# Clean jupyter notebooks
- repo: https://github.com/srstevenson/nb-clean
rev: "3.2.0"
hooks:
- id: nb-clean

# Handling unwanted unicode characters
- repo: https://github.com/sirosen/texthooks
rev: 0.6.4
rev: 0.6.6
hooks:
- id: fix-ligatures
- id: fix-smartquotes
Expand All @@ -60,40 +54,21 @@ repos:

# Clang-format the C++ part of the code base automatically
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v17.0.6
rev: v18.1.6
hooks:
- id: clang-format
types_or: [c++, c, cuda]

# Python linting using ruff
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.2.2
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
types_or: [python, pyi, jupyter]
- id: ruff-format
types_or: [python, pyi, jupyter]

# Also run Black on examples in the documentation
- repo: https://github.com/asottile/blacken-docs
rev: 1.16.0
hooks:
- id: blacken-docs
additional_dependencies:
- black==23.*

# Format configuration files with prettier
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v4.0.0-alpha.8"
hooks:
- id: prettier
entry: env PRETTIER_LEGACY_CLI=1 prettier # temporary fix for https://github.com/prettier/prettier/issues/15742
types_or: [yaml, markdown, html, css, scss, javascript, json]

# Check for spelling
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
rev: v2.3.0
hooks:
- id: codespell
args: ["-L", "wille,linz,braket,coo,pres,testss", "--skip", "*.ipynb"]
21 changes: 0 additions & 21 deletions .readthedocs.yaml

This file was deleted.

5 changes: 0 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,3 @@ add_subdirectory(src)
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
add_subdirectory(apps)
endif()

# add Python binding code
if(BINDINGS)
add_subdirectory(mqt/ddsim)
endif()
49 changes: 0 additions & 49 deletions MANIFEST.in

This file was deleted.

8 changes: 0 additions & 8 deletions apps/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,4 @@ macro(add_sim_executable APPNAME) # cmake-lint: disable=C0103

endmacro()

set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads)
link_libraries(Threads::Threads)

add_sim_executable(simple cxxopts::cxxopts)
if(Threads_FOUND)
add_sim_executable(noise_aware cxxopts::cxxopts)
target_link_libraries(${PROJECT_NAME}_noise_aware PUBLIC Threads::Threads)
endif()
Loading

0 comments on commit da73d62

Please sign in to comment.