Skip to content

Commit

Permalink
🔀 Resolve merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelwa committed Nov 27, 2023
2 parents 7b9e55b + 481331f commit 7193c95
Show file tree
Hide file tree
Showing 85 changed files with 7,004 additions and 5,241 deletions.
28 changes: 28 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
codecov:
require_ci_to_pass: true
comment:
behavior: default
layout: reach,diff,flags,files,footer
require_changes: false
coverage:
precision: 2
range: 70..100
round: down
status:
patch:
default:
base: auto
target: 95%
threshold: 0.5%
project:
default:
base: auto
target: 95%
threshold: 0.5%
parsers:
gcov:
branch_detection:
conditional: true
loop: true
macro: false
method: false
4 changes: 2 additions & 2 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ footer: |
template: |
## 👀 What's Changed
$CHANGES
**Full [CHANGELOG](https://fiction.readthedocs.io/en/latest/changelog.html)**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
large-packages: false
docker-images: false
swap-storage: false

- name: Install libraries and the respective compiler
run: sudo apt-get update && sudo apt-get install -yq libtbb-dev ${{matrix.compiler}}

Expand Down
53 changes: 53 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# To run all pre-commit checks, use:
#
# pre-commit run -a
#
# To install pre-commit hooks that run every time you commit:
#
# pre-commit install
#

ci:
autoupdate_commit_msg: "⬆️ Bump pre-commit hooks"
autofix_commit_msg: "🎨 Incorporated pre-commit fixes"

exclude: "^libs/|^benchmarks/"

repos:
# Standard hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-docstring-first
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace

# Handle unwanted unicode characters
- repo: https://github.com/sirosen/texthooks
rev: 0.6.2
hooks:
- id: fix-ligatures
- id: fix-smartquotes

# Check for common RST mistakes
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: rst-backticks
- id: rst-directive-colons
- id: rst-inline-touching-normal

# clang-format the C++ part of the code base
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v17.0.4
hooks:
- id: clang-format
types_or: [ c++, c ]
args: [ "-style=file" ]
7 changes: 1 addition & 6 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
version: 2

build:
os: ubuntu-22.04
tools:
python: "3.9"

submodules:
include: all
recursive: true

build:
os: ubuntu-20.04
os: ubuntu-22.04
tools:
python: "3.9"
apt_packages:
Expand Down
113 changes: 57 additions & 56 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
# Large parts of this build system are based on Jason Turner's
# C++ Starter Project (https://github.com/lefticus/cpp_starter_project) and
# CMake Template (https://github.com/cpp-best-practices/cmake_template)
# Large parts of this build system are based on Jason Turner's C++ Starter
# Project (https://github.com/lefticus/cpp_starter_project) and CMake Template
# (https://github.com/cpp-best-practices/cmake_template)

cmake_minimum_required(VERSION 3.21)

# Only set the CMAKE_CXX_STANDARD if it is not set by someone else
if (NOT DEFINED CMAKE_CXX_STANDARD)
# Set C++ standard; at least C++17 is required
set(CMAKE_CXX_STANDARD 17)
endif ()
if(NOT DEFINED CMAKE_CXX_STANDARD)
# Set C++ standard; at least C++17 is required
set(CMAKE_CXX_STANDARD 17)
endif()

# strongly encouraged to enable this globally to avoid conflicts between
# -Wpedantic being enabled and -std=c++20 and -std=gnu++20 for example
# when compiling with PCH enabled
# -Wpedantic being enabled and -std=c++20 and -std=gnu++20 for example when
# compiling with PCH enabled
set(CMAKE_CXX_EXTENSIONS OFF)

# Set the project name and version
project(fiction
VERSION 0.5.0
DESCRIPTION "An open-source design automation framework for Field-coupled Nanotechnologies"
HOMEPAGE_URL "https://github.com/cda-tum/fiction"
LANGUAGES CXX C)
project(
fiction
VERSION 0.5.0
DESCRIPTION
"An open-source design automation framework for Field-coupled Nanotechnologies"
HOMEPAGE_URL "https://github.com/cda-tum/fiction"
LANGUAGES CXX C)

include(cmake/PreventInSourceBuilds.cmake)
include(cmake/ProjectOptions.cmake)
Expand All @@ -30,18 +32,13 @@ fiction_setup_options()
fiction_global_options()
fiction_local_options()


# don't know if this should be set globally from here or not...
set(CMAKE_CXX_VISIBILITY_PRESET hidden)

set(GIT_SHA
"Unknown"
CACHE STRING "SHA this build was generated from")
string(
SUBSTRING "${GIT_SHA}"
0
8
GIT_SHORT_SHA)
"Unknown"
CACHE STRING "SHA this build was generated from")
string(SUBSTRING "${GIT_SHA}" 0 8 GIT_SHORT_SHA)

target_compile_features(fiction_options INTERFACE cxx_std_${CMAKE_CXX_STANDARD})

Expand All @@ -57,53 +54,57 @@ add_subdirectory(include)
add_subdirectory(libs)

# Enable progress bars
if (NOT WIN32)
option(FICTION_PROGRESS_BARS "Enable animated progress bars in command line" ON)
if (FICTION_PROGRESS_BARS)
target_compile_definitions(fiction_options INTERFACE PROGRESS_BARS)
endif ()
endif ()
if(NOT WIN32)
option(FICTION_PROGRESS_BARS "Enable animated progress bars in command line"
ON)
if(FICTION_PROGRESS_BARS)
target_compile_definitions(fiction_options INTERFACE PROGRESS_BARS)
endif()
endif()

# CLI
option(FICTION_CLI "Build fiction CLI" ON)
if (FICTION_CLI)
message(STATUS "Building fiction CLI")
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/cli)
endif ()
if(FICTION_CLI)
message(STATUS "Building fiction CLI")
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/cli)
endif()

# Experiments
option(FICTION_EXPERIMENTS "Build fiction experiments" OFF)
if (FICTION_EXPERIMENTS)
message(STATUS "Building fiction experiments")
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/experiments)
endif ()
if(FICTION_EXPERIMENTS)
message(STATUS "Building fiction experiments")
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/experiments)
endif()

# Python Bindings
option(FICTION_PYTHON_BINDINGS "Build fiction Python bindings" OFF)
if (FICTION_PYTHON_BINDINGS)
message(STATUS "Building fiction Python bindings")
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/bindings/)
endif ()
if(FICTION_PYTHON_BINDINGS)
message(STATUS "Building fiction Python bindings")
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/bindings/)
endif()

# Testing
option(FICTION_TEST "Build fiction tests" OFF)
if (FICTION_TEST)
enable_testing()
message(STATUS "Building fiction tests")
add_subdirectory(test)
endif ()

# If MSVC is being used, and ASAN is enabled, we need to set the debugger environment
# so that it behaves well with MSVC's debugger, and we can run the target from visual studio
if (MSVC)
get_all_installable_targets(all_targets)
message("all_targets=${all_targets}")
set_target_properties(${all_targets} PROPERTIES VS_DEBUGGER_ENVIRONMENT "PATH=$(VC_ExecutablePath_x64);%PATH%")
endif ()
if(FICTION_TEST)
enable_testing()
message(STATUS "Building fiction tests")
add_subdirectory(test)
endif()

# If MSVC is being used, and ASAN is enabled, we need to set the debugger
# environment so that it behaves well with MSVC's debugger, and we can run the
# target from visual studio
if(MSVC)
get_all_installable_targets(all_targets)
message("all_targets=${all_targets}")
set_target_properties(
${all_targets} PROPERTIES VS_DEBUGGER_ENVIRONMENT
"PATH=$(VC_ExecutablePath_x64);%PATH%")
endif()

# set the startup project for the "play" button in MSVC
set_property(DIRECTORY PROPERTY VS_STARTUP_PROJECT intro)

if (CMAKE_SKIP_INSTALL_RULES)
return()
endif ()
if(CMAKE_SKIP_INSTALL_RULES)
return()
endif()
3 changes: 2 additions & 1 deletion bindings/pyfiction/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
pybind11_add_module(pyfiction pyfiction.cpp)
target_link_libraries(pyfiction PRIVATE libfiction)
target_include_directories(pyfiction PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include)
target_include_directories(pyfiction
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include)
set_property(TARGET pyfiction PROPERTY POSITION_INDEPENDENT_CODE ON)
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@
#include <fiction/types.hpp>

#include <fmt/format.h>
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>

#include <string>

#include <pybind11/pybind11.h>
#include <pybind11/stl.h>

namespace pyfiction
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@

#include <fiction/algorithms/physical_design/exact.hpp>

#include <sstream>

#include <pybind11/pybind11.h>
#include <pybind11/stl.h>

#include <sstream>

namespace pyfiction
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@

#include <fiction/algorithms/physical_design/orthogonal.hpp>

#include <sstream>

#include <pybind11/pybind11.h>
#include <pybind11/stl.h>

#include <sstream>

namespace pyfiction
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@
#include <fmt/format.h>
#include <kitty/print.hpp>
#include <mockturtle/algorithms/simulation.hpp>
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>

#include <string>
#include <unordered_map>
#include <vector>

#include <pybind11/pybind11.h>
#include <pybind11/stl.h>

namespace pyfiction
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@

#include <fiction/io/read_sqd_layout.hpp>

#include <pybind11/pybind11.h>

#include <string_view>

#include <pybind11/pybind11.h>

namespace pyfiction
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@

#include <fiction/io/write_fqca_layout.hpp>

#include <pybind11/pybind11.h>

#include <string_view>

#include <pybind11/pybind11.h>

namespace pyfiction
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@

#include <fiction/io/write_qca_layout.hpp>

#include <pybind11/pybind11.h>

#include <string_view>

#include <pybind11/pybind11.h>

namespace pyfiction
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@

#include <fiction/io/write_qcc_layout.hpp>

#include <pybind11/pybind11.h>

#include <string_view>

#include <pybind11/pybind11.h>

namespace pyfiction
{

Expand Down
Loading

0 comments on commit 7193c95

Please sign in to comment.