diff --git a/.clang-tidy b/.clang-tidy index da2413e6b..3ff248093 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -42,7 +42,7 @@ CheckOptions: - key: cppcoreguidelines-avoid-do-while.IgnoreMacros value: "true" - key: misc-include-cleaner.IgnoreHeaders - value: ".*/experiments.hpp;.*/fiction_experiments.hpp;.*/fmt/.*" + value: "cmake/try_z3.cpp;.*/experiments.hpp;.*/fiction_experiments.hpp;.*/fmt/.*" - key: readability-identifier-naming.NamespaceCase value: lower_case - key: readability-identifier-naming.ClassCase diff --git a/.github/workflows/clang-tidy-review.yml b/.github/workflows/clang-tidy-review.yml index 9e9ba728c..ce7413041 100644 --- a/.github/workflows/clang-tidy-review.yml +++ b/.github/workflows/clang-tidy-review.yml @@ -7,7 +7,7 @@ on: - '**/*.cpp' - 'libs/**' - '.github/workflows/clang-tidy-review.yml' - - '!bindings/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp' + - '!bindings/mnt/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp' concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 5f73e379d..6031d0cad 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -11,7 +11,7 @@ on: - '**/*.py' - 'libs/**' - '.github/workflows/codeql-analysis.yml' - - '!bindings/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp' + - '!bindings/mnt/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp' pull_request: branches: [ 'main' ] paths: @@ -22,7 +22,7 @@ on: - '**/*.py' - 'libs/**' - '.github/workflows/codeql-analysis.yml' - - '!bindings/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp' + - '!bindings/mnt/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp' merge_group: schedule: - cron: '30 5 * * 6' diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index baae04bd4..5cd5c2ba4 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -10,7 +10,7 @@ on: - '**/CMakeLists.txt' - 'libs/**' - '.github/workflows/coverage.yml' - - '!bindings/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp' + - '!bindings/mnt/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp' pull_request: branches: [ 'main' ] paths: @@ -20,7 +20,7 @@ on: - '**/CMakeLists.txt' - 'libs/**' - '.github/workflows/coverage.yml' - - '!bindings/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp' + - '!bindings/mnt/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp' merge_group: concurrency: diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index de37700cc..2e091ee51 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -12,7 +12,7 @@ on: - '.github/workflows/docker-image.yml' - 'Dockerfile' - '.dockerignore' - - '!bindings/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp' + - '!bindings/mnt/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp' pull_request: branches: [ 'main' ] paths: @@ -24,7 +24,7 @@ on: - '.github/workflows/docker-image.yml' - 'Dockerfile' - '.dockerignore' - - '!bindings/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp' + - '!bindings/mnt/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp' merge_group: workflow_dispatch: release: diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index abc8d209f..9d902ea2a 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -10,7 +10,7 @@ on: - '**/CMakeLists.txt' - 'libs/**' - '.github/workflows/macos.yml' - - '!bindings/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp' + - '!bindings/mnt/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp' pull_request: branches: [ 'main' ] paths: @@ -20,7 +20,7 @@ on: - '**/CMakeLists.txt' - 'libs/**' - '.github/workflows/macos.yml' - - '!bindings/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp' + - '!bindings/mnt/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp' merge_group: concurrency: diff --git a/.github/workflows/pyfiction-docstring-generator.yml b/.github/workflows/pyfiction-docstring-generator.yml index 390aa17a4..3a1a40550 100644 --- a/.github/workflows/pyfiction-docstring-generator.yml +++ b/.github/workflows/pyfiction-docstring-generator.yml @@ -37,20 +37,20 @@ jobs: run: > python3 -m pybind11_mkdoc - -o ${{ github.workspace }}/bindings/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp + -o ${{ github.workspace }}/bindings/mnt/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp -D FICTION_Z3_SOLVER `find ${{ github.workspace }}/include/fiction -name "*.hpp" -print` - name: Upload docstrings as an artifact uses: actions/upload-artifact@v4 with: - path: ${{ github.workspace }}/bindings/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp + path: ${{ github.workspace }}/bindings/mnt/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp overwrite: true - name: Commit docstrings uses: EndBug/add-and-commit@v9 with: - add: 'bindings/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp' + add: 'bindings/mnt/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp' commit: '--signoff' message: ':memo: Update pyfiction docstrings' author_name: GitHub Actions diff --git a/.github/workflows/pyfiction-pypi-deployment.yml b/.github/workflows/pyfiction-pypi-deployment.yml index eda7d578a..d98c45a42 100644 --- a/.github/workflows/pyfiction-pypi-deployment.yml +++ b/.github/workflows/pyfiction-pypi-deployment.yml @@ -45,7 +45,6 @@ concurrency: env: Z3_VERSION: 4.13.0 - ENABLE_Z3: 'ON' jobs: build_wheels: @@ -66,6 +65,9 @@ jobs: submodules: recursive fetch-depth: 0 + - name: Set up MSVC development environment (Windows only) + uses: ilammy/msvc-dev-cmd@v1 + - name: Setup ccache uses: hendrikmuhs/ccache-action@v1.2 with: @@ -84,24 +86,25 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Setup ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: "${{matrix.config.os}}-pyfiction" + save: true + max-size: 10G + - if: runner.os == 'Linux' name: Setup mold uses: rui314/setup-mold@v1 - - if: ${{ matrix.config.arch == 'arm64' }} - name: Set Architecture to arm64 if necessary - run: echo "CIBW_ARCHS_MACOS=arm64" >> $GITHUB_ENV + - name: Install the latest version of uv + uses: astral-sh/setup-uv@v3 + with: + version: "latest" + enable-cache: true - - name: Build wheel - uses: pypa/cibuildwheel@v2.21.3 - env: - CIBW_BEFORE_ALL_LINUX: /opt/python/cp39-cp39/bin/pip install z3-solver==${{ env.Z3_VERSION }} - CIBW_BUILD: ${{ matrix.python }}-* - CIBW_ENVIRONMENT_MACOS: | - MACOSX_DEPLOYMENT_TARGET=11.0 - SYSTEM_VERSION_COMPAT=0 - CIBW_TEST_EXTRAS: test - CIBW_TEST_COMMAND: 'python -m unittest discover --start-directory {project} --verbose' + - name: Build wheels + uses: pypa/cibuildwheel@v2.21 - name: Upload wheel as an artifact uses: actions/upload-artifact@v4 @@ -120,32 +123,17 @@ jobs: submodules: recursive fetch-depth: 0 - - name: Setup ccache - uses: hendrikmuhs/ccache-action@v1.2 - with: - key: 'ubuntu-latest-pyfiction' - variant: ccache - save: true - max-size: 10G - - - name: Setup Python - uses: actions/setup-python@v5 + - name: Install the latest version of uv + uses: astral-sh/setup-uv@v3 with: - python-version: '3.13.x' - cache: 'pip' - - - name: Setup Z3 Solver - uses: cda-tum/setup-z3@v1 - with: - version: ${{ env.Z3_VERSION }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + version: "latest" + enable-cache: true - name: Build sdist - run: pipx run build --sdist + run: uv build --sdist - - name: Test sdist - run: z3=${{env.ENABLE_Z3}} pip install dist/*.tar.gz --verbose + - name: Check metadata + run: uvx twine check dist/* - name: Upload sdist as an artifact uses: actions/upload-artifact@v4 diff --git a/.github/workflows/python-bindings.yml b/.github/workflows/python-bindings.yml index 18b7d08ed..96485a89a 100644 --- a/.github/workflows/python-bindings.yml +++ b/.github/workflows/python-bindings.yml @@ -38,49 +38,29 @@ defaults: env: Z3_VERSION: 4.13.0 - ENABLE_Z3: 'ON' jobs: - build_and_test: + python-tests: + name: 🐍 ${{ matrix.runs-on }} + runs-on: ${{ matrix.runs-on }} strategy: + fail-fast: false matrix: - os: [ ubuntu-22.04, macos-14, windows-2019 ] - python_version: [ '3.8.x', '3.13.x' ] - include: - - os: ubuntu-22.04 - z3_platform: linux - architecture: x64 - toolset: v142 - - os: macos-14 - z3_platform: macOS - architecture: arm64 - - os: windows-2019 - z3_platform: windows - architecture: x64 - - name: 🐍 on ${{matrix.os}} with Python ${{matrix.python_version}} - runs-on: ${{matrix.os}} - + runs-on: [ ubuntu-latest, macos-13, macos-14, windows-latest ] steps: - name: Clone Repository uses: actions/checkout@v4 with: submodules: recursive + fetch-depth: 0 - name: Setup ccache uses: hendrikmuhs/ccache-action@v1.2 with: - key: '${{matrix.os}}-pyfiction' - variant: ccache + key: "${{matrix.runs-on}}-pyfiction" save: true max-size: 10G - - name: Setup Python - uses: actions/setup-python@v5 - with: - python-version: ${{matrix.python_version}} - cache: 'pip' - - if: runner.os == 'Linux' name: Setup mold uses: rui314/setup-mold@v1 @@ -90,15 +70,15 @@ jobs: uses: cda-tum/setup-z3@v1 with: version: ${{env.Z3_VERSION}} - platform: ${{matrix.z3_platform}} - architecture: ${{matrix.architecture}} - env: - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - - name: Build pyfiction - working-directory: ${{github.workspace}} - run: z3=${{env.ENABLE_Z3}} pip install '.[test]' + - name: Install the latest version of uv + uses: astral-sh/setup-uv@v3 + with: + version: "latest" + enable-cache: true + + - name: Setup nox + uses: wntrblm/nox@2024.10.09 - - name: Test - working-directory: ${{github.workspace}} - run: python -m unittest discover --verbose + - name: 🐍 Test + run: nox -s tests --verbose diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 3d5d2acbf..f85666122 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -10,7 +10,7 @@ on: - '**/CMakeLists.txt' - 'libs/**' - '.github/workflows/ubuntu.yml' - - '!bindings/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp' + - '!bindings/mnt/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp' pull_request: branches: [ 'main' ] paths: @@ -20,7 +20,7 @@ on: - '**/CMakeLists.txt' - 'libs/**' - '.github/workflows/ubuntu.yml' - - '!bindings/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp' + - '!bindings/mnt/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp' merge_group: concurrency: diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 695e0940f..389691bba 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -10,7 +10,7 @@ on: - '**/CMakeLists.txt' - 'libs/**' - '.github/workflows/windows.yml' - - '!bindings/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp' + - '!bindings/mnt/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp' pull_request: branches: [ 'main' ] paths: @@ -20,7 +20,7 @@ on: - '**/CMakeLists.txt' - 'libs/**' - '.github/workflows/windows.yml' - - '!bindings/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp' + - '!bindings/mnt/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp' merge_group: concurrency: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 703ca95d8..4f9b65d7a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,7 +11,7 @@ ci: autoupdate_commit_msg: "⬆️ Bump pre-commit hooks" autofix_commit_msg: "🎨 Incorporated pre-commit fixes" -exclude: "^libs/|^benchmarks/|bindings/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp" +exclude: "^libs/|^benchmarks/|bindings/mnt/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp" repos: # Standard hooks diff --git a/CMakeLists.txt b/CMakeLists.txt index 093958460..078b79ec1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ # 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) +cmake_minimum_required(VERSION 3.21...3.29) # Only set the CMAKE_CXX_STANDARD if it is not set by someone else if(NOT DEFINED CMAKE_CXX_STANDARD) diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index fdde20d34..000000000 --- a/MANIFEST.in +++ /dev/null @@ -1,32 +0,0 @@ -prune bib -prune cli - -graft docs/_static/ - -graft libs/ -prune libs/Catch2/** -prune libs/mockturtle/lib/nauty/** - -prune **/.git -prune **/.github -prune **/app -prune **/apps -prune **/doc -prune **/plots -prune **/css -prune **/html -prune **/test -prune **/tests -prune **/benchmark -prune **/benchmarks -prune **/experiment -prune **/experiments -prune **/examples - -prune **cmake-build-** - -exclude **.pdf -exclude **.ans -exclude **.out -exclude **.log -exclude **.xml diff --git a/bindings/CMakeLists.txt b/bindings/CMakeLists.txt index 68c98c3de..dd6fb1ab6 100644 --- a/bindings/CMakeLists.txt +++ b/bindings/CMakeLists.txt @@ -1 +1 @@ -add_subdirectory(pyfiction) +add_subdirectory(mnt) diff --git a/bindings/mnt/CMakeLists.txt b/bindings/mnt/CMakeLists.txt new file mode 100644 index 000000000..68c98c3de --- /dev/null +++ b/bindings/mnt/CMakeLists.txt @@ -0,0 +1 @@ +add_subdirectory(pyfiction) diff --git a/bindings/__init__.py b/bindings/mnt/__init__.py similarity index 76% rename from bindings/__init__.py rename to bindings/mnt/__init__.py index 7f331fea4..047e29abb 100644 --- a/bindings/__init__.py +++ b/bindings/mnt/__init__.py @@ -2,7 +2,7 @@ import sys from pathlib import Path -if sys.platform == "win32" and sys.version_info > (3, 8, 0) and "Z3_ROOT" in os.environ: +if sys.platform == "win32" and "Z3_ROOT" in os.environ: lib_path = Path(os.environ["Z3_ROOT"]) / "lib" if lib_path.exists(): os.add_dll_directory(str(lib_path)) diff --git a/bindings/mnt/pyfiction/CMakeLists.txt b/bindings/mnt/pyfiction/CMakeLists.txt new file mode 100644 index 000000000..2138b463f --- /dev/null +++ b/bindings/mnt/pyfiction/CMakeLists.txt @@ -0,0 +1,26 @@ +if (APPLE) + set(BASEPOINT @loader_path) +else () + set(BASEPOINT $ORIGIN) +endif () +list(APPEND CMAKE_INSTALL_RPATH ${BASEPOINT} ${BASEPOINT}/${CMAKE_INSTALL_LIBDIR}) +set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) +set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) + +pybind11_add_module(pyfiction + # Prefer thin LTO if available + THIN_LTO pyfiction.cpp) +target_link_libraries(pyfiction PRIVATE libfiction) +target_include_directories(pyfiction + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include) +set_property(TARGET pyfiction PROPERTY POSITION_INDEPENDENT_CODE ON) + +if (MSVC) + target_compile_options(pyfiction PRIVATE /utf-8) + add_definitions(-DUNICODE -D_UNICODE) +endif () + +# Install directive for scikit-build-core +install(TARGETS pyfiction + DESTINATION . + COMPONENT fiction_Python) diff --git a/bindings/pyfiction/README.md b/bindings/mnt/pyfiction/README.md similarity index 51% rename from bindings/pyfiction/README.md rename to bindings/mnt/pyfiction/README.md index 16ec9efc4..acdaf1ec6 100644 --- a/bindings/pyfiction/README.md +++ b/bindings/mnt/pyfiction/README.md @@ -1,56 +1,109 @@ # Python bindings for the *fiction* library -This directory contains Python bindings for the *fiction* library generated +This directory contains Python bindings for the *fiction* library built with [pybind11](https://github.com/pybind/pybind11). ## Installation The bindings can either be built and installed automatically with `pip` or built with `CMake` and installed manually. -### Building the bindings with `pip` +### Set up a virtual environment + +In order to set up a virtual environment on UNIX-like systems, you can use the following commands: ```bash -pip install . +python3 -m venv venv +source venv/bin/activate +``` + +If you are using Windows, you can use the following commands instead: + +```batch +python3 -m venv venv +venv\Scripts\activate.bat ``` -If you want to include the functions dependent on the [Z3 Solver](https://github.com/Z3Prover/z3), set `z3=ON` before -running `pip`: +### Set up `nox` + +[`nox`](https://nox.thea.codes/en/stable/index.html) can be used to conveniently run many development tasks like +testing the bindings on multiple Python installations. ```bash -z3=ON pip install . +(venv) $ pipx install nox ``` -See [the documentation](https://fiction.readthedocs.io/en/latest/getting_started.html#enabling-dependent-functions) for -more information on dependent functions. +If you use macOS, then `nox` is in `brew`, use `brew install nox`. -### Building the bindings with CMake +> [!NOTE] +> If you do not have [`pipx`](https://pypa.github.io/pipx/) (pip for applications) installed, you can install it with: +>```bash +> (venv) $ pip install pipx +> (venv) $ pipx ensurepath +>``` + +If you use macOS, then `pipx` is in `brew`, use `brew install pipx`. + +### Install `pre-commit` + +Install [`pre-commit`](https://pre-commit.com/) to automatically run a set of checks before each commit. ```bash -cmake . -B build -DFICTION_PYTHON_BINDINGS=ON -cd build -cmake --build . -j4 +(venv) $ pipx install pre-commit +(venv) $ pre-commit install ``` -### Enabling and running tests +If you use macOS, then `pre-commit` is in `brew`, use `brew install pre-commit`. -To run tests locally, build the binding with its dependencies using `pip`: +You can also run the checks manually: ```bash -pip install '.[test]' +(venv) $ pre-commit run --all-files ``` -Alternatively, install the following dependency before the `cmake` call: +### Install Z3 + +Make sure to have the SMT Solver [`Z3 >= 4.8.0`](https://github.com/Z3Prover/z3) installed. This can be accomplished in +a multitude of ways: + +- Under Ubuntu 20.04 and newer: `sudo apt-get install libz3-dev`. +- Under macOS: `brew install z3`. +- Alternatively: `pip install z3-solver` in the virtual environment. +- Download pre-built binaries from https://github.com/Z3Prover/z3/releases and copy the files to the respective system + directories. +- Build Z3 from source and install it to the system. + +### Building the bindings with `pip` ```bash -pip install python-dotenv==0.21.1 +(venv) $ pip install . ``` -To execute all tests, use the following command inside the package directory: +### Building the bindings with `uv` (faster) ```bash - python -m unittest discover --verbose +(venv) $ pipx install uv +(venv) $ uv pip install . ``` +### Building the bindings with CMake + +```bash +cmake . -B build -DFICTION_PYTHON_BINDINGS=ON +cd build +cmake --build . -j4 +``` + +### Running Python tests + +A `nox` session is provided to conveniently run the Python tests. + +```bash +(venv) $ nox -s tests +``` + +This installs all dependencies for running the tests in an isolated environment, builds the Python package, and then +runs the tests. + ## Usage The bindings are available as a Python module named `pyfiction` in the namespace `mnt`. To use the bindings, simply @@ -74,7 +127,15 @@ functionality might not be available in Python or differ slightly in its syntax Our goal is to expose as much of *fiction*'s library features in some way in `pyfiction` as well. Therefore, whenever a new feature is added to the C++ library, please also add the respective bindings here. To not duplicate -docstrings and run out of sync, we use the `pybind11_mkdoc` tool to generate the documentation from the C++ docstrings. +docstrings and run out of sync, we use the `pybind11_mkdoc` tool to automatically generate the documentation from the +C++ docstrings. + +A few things must be noted when adding new bindings: +- Do not use `""_a` literals in the bindings. Instead, use `py::arg` to specify the argument names. +- Add new symbols to the `__init__.py` file's `import` and `__all__` statements. +- Do not use `from mnt.pyfiction import *` in the Python code. Instead, use explicit imports like + `from mnt.pyfiction import cartesian_layout`. This speeds up the import process and helps narrow down the origin of a + failing test. ### Docstrings diff --git a/bindings/mnt/pyfiction/__init__.py b/bindings/mnt/pyfiction/__init__.py new file mode 100644 index 000000000..a14d0d400 --- /dev/null +++ b/bindings/mnt/pyfiction/__init__.py @@ -0,0 +1,781 @@ +"""MNT fiction framework. + +This file is part of the MNT fiction framework released under the MIT license. +See https://github.com/cda-tum/fiction for more information. +""" + +import os +import sys +from pathlib import Path + +if sys.platform == "win32" and "Z3_ROOT" in os.environ: + lib_path = Path(os.environ["Z3_ROOT"]) / "lib" + if lib_path.exists(): + os.add_dll_directory(str(lib_path)) + bin_path = Path(os.environ["Z3_ROOT"]) / "bin" + if bin_path.exists(): + os.add_dll_directory(str(bin_path)) + +from .pyfiction import ( + # Algorithms + ## iter + input_bdl_configuration, + bdl_input_iterator_params, + bdl_input_iterator_100, + bdl_input_iterator_111, + + ## network_transformation + substitution_strategy, + fanout_substitution_params, + fanout_substitution, + is_fanout_substituted, + + network_balancing_params, + network_balancing, + is_balanced, + + technology_mapping_params, + technology_mapping_stats, + and_or_not, + and_or_not_maj, + all_standard_2_input_functions, + all_standard_3_input_functions, + all_supported_standard_functions, + technology_mapping, + + ## path_finding + a_star_params, + a_star, + a_star_distance, + + manhattan_distance, + euclidean_distance, + squared_euclidean_distance, + twoddwave_distance, + chebyshev_distance, + + enumerate_all_paths_params, + enumerate_all_paths, + + yen_k_shortest_paths_params, + yen_k_shortest_paths, + + ## physical_design + apply_qca_one_library, + apply_topolinano_library, + apply_bestagon_library, + + graph_coloring_engine, + color_routing_params, + color_routing, + + design_sidb_gates_mode, + design_sidb_gates_params, + design_sidb_gates, + + technology_constraints, + exact_params, + exact_stats, + exact_cartesian, + exact_shifted_cartesian, + exact_hexagonal, + + gold_effort_mode, + gold_cost_objective, + graph_oriented_layout_design_params, + graph_oriented_layout_design_stats, + graph_oriented_layout_design, + + hexagonalization, + + orthogonal_params, + orthogonal_stats, + orthogonal, + + post_layout_optimization_params, + post_layout_optimization_stats, + post_layout_optimization, + + wiring_reduction_params, + wiring_reduction_stats, + wiring_reduction, + + ## properties + critical_path_length_and_throughput, + + ## simulation + ### sidb + transition_type, + population_stability_information, + assess_physical_population_stability_params, + assess_physical_population_stability, + + calculate_energy_and_state_type_with_kinks_accepted, + calculate_energy_and_state_type_with_kinks_rejected, + can_positive_charges_occur, + check_simulation_results_for_equivalence, + + compute_operational_ratio_params, + compute_operational_ratio, + + convert_potential_to_distance, + + critical_temperature_stats, + critical_temperature_params, + critical_temperature_gate_based, + critical_temperature_non_gate_based, + + bdl_pair, + detect_bdl_pairs_params, + detect_bdl_pairs, + + bdl_wire_selection, + detect_bdl_wires_params, + bdl_wire_100, + bdl_wire_111, + detect_bdl_wires_100, + detect_bdl_wires_111, + + determine_groundstate_from_simulation_results, + + physically_valid_parameters_domain, + determine_physically_valid_parameters, + + dimer_displacement_policy, + displacement_analysis_mode, + displacement_robustness_domain_params, + displacement_robustness_domain_stats, + displacement_robustness_domain_100, + displacement_robustness_domain_111, + determine_displacement_robustness_domain_100, + determine_displacement_robustness_domain_111, + + energy_distribution, + + exhaustive_ground_state_simulation, + + is_ground_state, + + operational_status, + operational_condition, + is_operational_params, + is_operational, + operational_input_patterns, + is_kink_induced_non_operational, + kink_induced_non_operational_input_patterns, + + # maximum_defect_influence_distance_params, + # maximum_defect_influence_position_and_distance, + + minimum_energy, + + occupation_probability_gate_based, + occupation_probability_non_gate_based, + + parameter_point, + sweep_parameter, + operational_domain, + operational_domain_value_range, + operational_domain_params, + operational_domain_stats, + operational_domain_grid_search, + operational_domain_random_sampling, + operational_domain_flood_fill, + operational_domain_contour_tracing, + + automatic_base_number_detection, + quickexact_params, + quickexact, + + quicksim_params, + quicksim, + + positive_charges, + generate_random_sidb_layout_params, + generate_random_sidb_layout, + generate_multiple_random_sidb_layouts, + + sidb_simulation_engine, + exact_sidb_simulation_engine, + + sidb_simulation_parameters, + + sidb_simulation_result_100, + sidb_simulation_result_111, + + time_to_solution_params, + time_to_solution_stats, + time_to_solution, + time_to_solution_for_given_simulation_results, + + ### logic + simulate, + + ## verfication + gate_level_drv_params, + gate_level_drvs, + + eq_type, + equivalence_checking_stats, + equivalence_checking, + + # Inout + fgl_parsing_error, + read_cartesian_fgl_layout, + read_shifted_cartesian_fgl_layout, + read_hexagonal_fgl_layout, + + unsupported_character_exception, + undefined_cell_label_exception, + unrecognized_cell_definition_exception, + read_fqca_layout, + + sqd_parsing_error, + read_sqd_layout_100, + read_sqd_layout_111, + + write_dot_network, + write_dot_layout, + + write_fgl_layout, + + out_of_cell_names_exception, + write_fqca_layout_params, + write_fqca_layout, + + # write_location_and_ground_state, + + sample_writing_mode, + write_operational_domain_params, + write_operational_domain, + + write_qca_layout_params, + write_qca_layout, + + write_qcc_layout, + + write_qll_layout, + + write_sqd_layout, + + write_sqd_sim_result, + + write_qca_layout_svg_params, + write_qca_layout_svg, + color_mode, + sidb_lattice_mode, + write_sidb_layout_svg_params, + write_sidb_layout_svg, + write_sidb_layout_svg_to_string, + + # Layouts + cartesian_layout, + + qca_technology, + inml_technology, + sidb_technology, + qca_layout, + inml_layout, + sidb_layout, + + clocked_cartesian_layout, + clocked_shifted_cartesian_layout, + clocked_hexagonal_layout, + + offset_coordinate, + cube_coordinate, + siqad_coordinate, + offset_area, + cube_area, + siqad_area, + offset_volume, + cube_volume, + siqad_volume, + to_offset_coord, + to_cube_coord, + to_siqad_coord, + + cartesian_gate_layout, + shifted_cartesian_gate_layout, + hexagonal_gate_layout, + + hexagonal_layout, + + cartesian_obstruction_layout, + shifted_cartesian_obstruction_layout, + hexagonal_obstruction_layout, + + shifted_cartesian_layout, + + # Networks + technology_network, + read_technology_network, + dynamic_truth_table, + + # Technology + area, + + dependent_cell_mode, + energy_calculation, + charge_distribution_mode, + charge_index_mode, + charge_distribution_surface, + charge_distribution_surface_100, + charge_distribution_surface_111, + + sidb_charge_state, + charge_state_to_sign, + sign_to_charge_state, + charge_configuration_to_string, + + sidb_defect_type, + sidb_defect, + is_charged_defect_type, + is_neutral_defect_type, + is_positively_charged_defect, + is_negatively_charged_defect, + is_neutrally_charged_defect, + defect_extent, + + sidb_100_lattice, + sidb_111_lattice, + + sidb_nm_distance_100, + sidb_nm_distance_111, + + sidb_nm_position, + + # Utils + num_adjacent_coordinates, + normalize_layout_coordinates, + convert_layout_to_siqad_coordinates, + random_coordinate, + + get_name, + set_name, + + high_degree_fanin_exception, + has_high_degree_fanin_nodes, + + reserve_input_nodes, + place, + + is_crossable_wire, + route_path, + extract_routing_objectives, + clear_routing, + + create_id_tt, + create_not_tt, + create_and_tt, + create_or_tt, + create_nand_tt, + create_nor_tt, + create_xor_tt, + create_xnor_tt, + create_lt_tt, + create_gt_tt, + create_le_tt, + create_ge_tt, + create_and3_tt, + create_xor_and_tt, + create_or_and_tt, + create_onehot_tt, + create_maj_tt, + create_gamble_tt, + create_dot_tt, + create_ite_tt, + create_and_xor_tt, + create_xor3_tt, + create_double_wire_tt, + create_crossing_wire_tt, + create_fan_out_tt, + create_half_adder_tt, + + __version__, + __repo__, + __compiled_date__, + __compiled_time__ +) + +__all__ = [ + # Algorithms + ## iter + "input_bdl_configuration", + "bdl_input_iterator_params", + "bdl_input_iterator_100", + "bdl_input_iterator_111", + + ## network_transformation + "substitution_strategy", + "fanout_substitution_params", + "fanout_substitution", + "is_fanout_substituted", + + "network_balancing_params", + "network_balancing", + "is_balanced", + + "technology_mapping_params", + "technology_mapping_stats", + "and_or_not", + "and_or_not_maj", + "all_standard_2_input_functions", + "all_standard_3_input_functions", + "all_supported_standard_functions", + "technology_mapping", + + ## path_finding + "a_star_params", + "a_star", + "a_star_distance", + + "manhattan_distance", + "euclidean_distance", + "squared_euclidean_distance", + "twoddwave_distance", + "chebyshev_distance", + + "enumerate_all_paths_params", + "enumerate_all_paths", + + "yen_k_shortest_paths_params", + "yen_k_shortest_paths", + + ## physical_design + "apply_qca_one_library", + "apply_topolinano_library", + "apply_bestagon_library", + + "graph_coloring_engine", + "color_routing_params", + "color_routing", + + "design_sidb_gates_mode", + "design_sidb_gates_params", + "design_sidb_gates", + + "technology_constraints", + "exact_params", + "exact_stats", + "exact_cartesian", + "exact_shifted_cartesian", + "exact_hexagonal", + + "gold_effort_mode", + "gold_cost_objective", + "graph_oriented_layout_design_params", + "graph_oriented_layout_design_stats", + "graph_oriented_layout_design", + + "hexagonalization", + + "orthogonal_params", + "orthogonal_stats", + "orthogonal", + + "post_layout_optimization_params", + "post_layout_optimization_stats", + "post_layout_optimization", + + "wiring_reduction_params", + "wiring_reduction_stats", + "wiring_reduction", + + ## properties + "critical_path_length_and_throughput", + + ## simulation + ### sidb + "transition_type", + "population_stability_information", + "assess_physical_population_stability_params", + "assess_physical_population_stability", + + "calculate_energy_and_state_type_with_kinks_accepted", + "calculate_energy_and_state_type_with_kinks_rejected", + "can_positive_charges_occur", + "check_simulation_results_for_equivalence", + + "compute_operational_ratio_params", + "compute_operational_ratio", + + "convert_potential_to_distance", + + "critical_temperature_stats", + "critical_temperature_params", + "critical_temperature_gate_based", + "critical_temperature_non_gate_based", + + "bdl_pair", + "detect_bdl_pairs_params", + "detect_bdl_pairs", + + "bdl_wire_selection", + "detect_bdl_wires_params", + "bdl_wire_100", + "bdl_wire_111", + "detect_bdl_wires_100", + "detect_bdl_wires_111", + + "determine_groundstate_from_simulation_results", + + "physically_valid_parameters_domain", + "determine_physically_valid_parameters", + + "dimer_displacement_policy", + "displacement_analysis_mode", + "displacement_robustness_domain_params", + "displacement_robustness_domain_stats", + "displacement_robustness_domain_100", + "displacement_robustness_domain_111", + "determine_displacement_robustness_domain_100", + "determine_displacement_robustness_domain_111", + + "energy_distribution", + + "exhaustive_ground_state_simulation", + + "is_ground_state", + + "operational_status", + "operational_condition", + "is_operational_params", + "is_operational", + "operational_input_patterns", + "is_kink_induced_non_operational", + "kink_induced_non_operational_input_patterns", + + # "maximum_defect_influence_distance_params", + # "maximum_defect_influence_position_and_distance", + + "minimum_energy", + + "occupation_probability_gate_based", + "occupation_probability_non_gate_based", + + "parameter_point", + "sweep_parameter", + "operational_domain", + "operational_domain_value_range", + "operational_domain_params", + "operational_domain_stats", + "operational_domain_grid_search", + "operational_domain_random_sampling", + "operational_domain_flood_fill", + "operational_domain_contour_tracing", + + "automatic_base_number_detection", + "quickexact_params", + "quickexact", + + "quicksim_params", + "quicksim", + + "positive_charges", + "generate_random_sidb_layout_params", + "generate_random_sidb_layout", + "generate_multiple_random_sidb_layouts", + + "sidb_simulation_engine", + "exact_sidb_simulation_engine", + + "sidb_simulation_parameters", + + "sidb_simulation_result_100", + "sidb_simulation_result_111", + + "time_to_solution_params", + "time_to_solution_stats", + "time_to_solution", + "time_to_solution_for_given_simulation_results", + + ### logic + "simulate", + + ## verfication + "gate_level_drv_params", + "gate_level_drvs", + + "eq_type", + "equivalence_checking_stats", + "equivalence_checking", + + # Inout + "fgl_parsing_error", + "read_cartesian_fgl_layout", + "read_shifted_cartesian_fgl_layout", + "read_hexagonal_fgl_layout", + + "unsupported_character_exception", + "undefined_cell_label_exception", + "unrecognized_cell_definition_exception", + "read_fqca_layout", + + "sqd_parsing_error", + "read_sqd_layout_100", + "read_sqd_layout_111", + + "write_dot_network", + "write_dot_layout", + + "write_fgl_layout", + + "out_of_cell_names_exception", + "write_fqca_layout_params", + "write_fqca_layout", + + # "write_location_and_ground_state", + + "sample_writing_mode", + "write_operational_domain_params", + "write_operational_domain", + + "write_qca_layout_params", + "write_qca_layout", + + "write_qcc_layout", + + "write_qll_layout", + + "write_sqd_layout", + + "write_sqd_sim_result", + + "write_qca_layout_svg_params", + "write_qca_layout_svg", + "color_mode", + "sidb_lattice_mode", + "write_sidb_layout_svg_params", + "write_sidb_layout_svg", + "write_sidb_layout_svg_to_string", + + # Layouts + "cartesian_layout", + + "qca_technology", + "inml_technology", + "sidb_technology", + "qca_layout", + "inml_layout", + "sidb_layout", + + "clocked_cartesian_layout", + "clocked_shifted_cartesian_layout", + "clocked_hexagonal_layout", + + "offset_coordinate", + "cube_coordinate", + "siqad_coordinate", + "offset_area", + "cube_area", + "siqad_area", + "offset_volume", + "cube_volume", + "siqad_volume", + "to_offset_coord", + "to_cube_coord", + "to_siqad_coord", + + "cartesian_gate_layout", + "shifted_cartesian_gate_layout", + "hexagonal_gate_layout", + + "hexagonal_layout", + + "cartesian_obstruction_layout", + "shifted_cartesian_obstruction_layout", + "hexagonal_obstruction_layout", + + "shifted_cartesian_layout", + + # Networks + "technology_network", + "read_technology_network", + "dynamic_truth_table", + + # Technology + "area", + + "dependent_cell_mode", + "energy_calculation", + "charge_distribution_mode", + "charge_index_mode", + "charge_distribution_surface", + "charge_distribution_surface_100", + "charge_distribution_surface_111", + + "sidb_charge_state", + "charge_state_to_sign", + "sign_to_charge_state", + "charge_configuration_to_string", + + "sidb_defect_type", + "sidb_defect", + "is_charged_defect_type", + "is_neutral_defect_type", + "is_positively_charged_defect", + "is_negatively_charged_defect", + "is_neutrally_charged_defect", + "defect_extent", + + "sidb_100_lattice", + "sidb_111_lattice", + + "sidb_nm_distance_100", + "sidb_nm_distance_111", + + "sidb_nm_position", + + # Utils + "num_adjacent_coordinates", + "normalize_layout_coordinates", + "convert_layout_to_siqad_coordinates", + "random_coordinate", + + "get_name", + "set_name", + + "high_degree_fanin_exception", + "has_high_degree_fanin_nodes", + + "reserve_input_nodes", + "place", + + "is_crossable_wire", + "route_path", + "extract_routing_objectives", + "clear_routing", + + "create_id_tt", + "create_not_tt", + "create_and_tt", + "create_or_tt", + "create_nand_tt", + "create_nor_tt", + "create_xor_tt", + "create_xnor_tt", + "create_lt_tt", + "create_gt_tt", + "create_le_tt", + "create_ge_tt", + "create_and3_tt", + "create_xor_and_tt", + "create_or_and_tt", + "create_onehot_tt", + "create_maj_tt", + "create_gamble_tt", + "create_dot_tt", + "create_ite_tt", + "create_and_xor_tt", + "create_xor3_tt", + "create_double_wire_tt", + "create_crossing_wire_tt", + "create_fan_out_tt", + "create_half_adder_tt", + + "__version__", + "__repo__", + "__compiled_date__", + "__compiled_time__", +] diff --git a/bindings/pyfiction/include/pyfiction/algorithms/iter/bdl_input_iterator.hpp b/bindings/mnt/pyfiction/include/pyfiction/algorithms/iter/bdl_input_iterator.hpp similarity index 82% rename from bindings/pyfiction/include/pyfiction/algorithms/iter/bdl_input_iterator.hpp rename to bindings/mnt/pyfiction/include/pyfiction/algorithms/iter/bdl_input_iterator.hpp index 6eb1cebb8..f6793eb22 100644 --- a/bindings/pyfiction/include/pyfiction/algorithms/iter/bdl_input_iterator.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/algorithms/iter/bdl_input_iterator.hpp @@ -27,12 +27,12 @@ template void bdl_input_iterator(pybind11::module& m, const std::string& lattice) { namespace py = pybind11; - using namespace py::literals; py::class_>(m, fmt::format("bdl_input_iterator_{}", lattice).c_str(), DOC(fiction_bdl_input_iterator)) - .def(py::init(), "lyt"_a, - "params"_a = fiction::bdl_input_iterator_params{}, DOC(fiction_bdl_input_iterator_bdl_input_iterator)) + .def(py::init(), py::arg("lyt"), + py::arg("params") = fiction::bdl_input_iterator_params{}, + DOC(fiction_bdl_input_iterator_bdl_input_iterator)) .def( "__next__", [](fiction::bdl_input_iterator& self) -> Lyt @@ -49,25 +49,25 @@ void bdl_input_iterator(pybind11::module& m, const std::string& lattice) DOC(fiction_bdl_input_iterator_operator_mul)) .def( "__eq__", [](const fiction::bdl_input_iterator& self, const uint64_t n) -> bool { return self == n; }, - "m"_a, DOC(fiction_bdl_input_iterator_operator_eq)) + py::arg("m"), DOC(fiction_bdl_input_iterator_operator_eq)) .def( "__ne__", [](const fiction::bdl_input_iterator& self, const uint64_t n) -> bool { return self != n; }, - "m"_a, DOC(fiction_bdl_input_iterator_operator_ne)) + py::arg("m"), DOC(fiction_bdl_input_iterator_operator_ne)) .def( "__lt__", [](const fiction::bdl_input_iterator& self, const uint64_t n) -> bool { return self < n; }, - "m"_a, DOC(fiction_bdl_input_iterator_operator_lt)) + py::arg("m"), DOC(fiction_bdl_input_iterator_operator_lt)) .def( "__le__", [](const fiction::bdl_input_iterator& self, const uint64_t n) -> bool { return self <= n; }, - "m"_a, DOC(fiction_bdl_input_iterator_operator_le)) + py::arg("m"), DOC(fiction_bdl_input_iterator_operator_le)) .def( "__gt__", [](const fiction::bdl_input_iterator& self, const uint64_t n) -> bool { return self > n; }, - "m"_a, DOC(fiction_bdl_input_iterator_operator_gt)) + py::arg("m"), DOC(fiction_bdl_input_iterator_operator_gt)) .def( "__ge__", [](const fiction::bdl_input_iterator& self, const uint64_t n) -> bool { return self >= n; }, - "m"_a, DOC(fiction_bdl_input_iterator_operator_ge)) + py::arg("m"), DOC(fiction_bdl_input_iterator_operator_ge)) .def( "__add__", [](const fiction::bdl_input_iterator& self, const int n) -> fiction::bdl_input_iterator - { return self + n; }, "m"_a, DOC(fiction_bdl_input_iterator_operator_add)) + { return self + n; }, py::arg("m"), DOC(fiction_bdl_input_iterator_operator_add)) .def( "__iadd__", [](fiction::bdl_input_iterator& self, const int n) -> fiction::bdl_input_iterator& @@ -75,9 +75,9 @@ void bdl_input_iterator(pybind11::module& m, const std::string& lattice) self += n; return self; }, - "m"_a, DOC(fiction_bdl_input_iterator_operator_iadd)) + py::arg("m"), DOC(fiction_bdl_input_iterator_operator_iadd)) .def( - "__sub__", [](const fiction::bdl_input_iterator& self, const int n) { return self - n; }, "m"_a, + "__sub__", [](const fiction::bdl_input_iterator& self, const int n) { return self - n; }, py::arg("m"), DOC(fiction_bdl_input_iterator_operator_sub)) .def( "__isub__", @@ -86,10 +86,10 @@ void bdl_input_iterator(pybind11::module& m, const std::string& lattice) self -= n; return self; }, - "m"_a, DOC(fiction_bdl_input_iterator_operator_isub)) + py::arg("m"), DOC(fiction_bdl_input_iterator_operator_isub)) .def( "__getitem__", [](const fiction::bdl_input_iterator& self, int n) -> fiction::bdl_input_iterator - { return self[n]; }, "m"_a, DOC(fiction_bdl_input_iterator_operator_array)) + { return self[n]; }, py::arg("m"), DOC(fiction_bdl_input_iterator_operator_array)) .def("num_input_pairs", &fiction::bdl_input_iterator::num_input_pairs) .def("get_layout", [](const fiction::bdl_input_iterator& self) -> const Lyt& { return *self; }) @@ -102,7 +102,6 @@ void bdl_input_iterator(pybind11::module& m, const std::string& lattice) inline void bdl_input_iterator(pybind11::module& m) { namespace py = pybind11; - using namespace py::literals; /** * Input BDL configuration diff --git a/bindings/pyfiction/include/pyfiction/algorithms/network_transformation/fanout_substitution.hpp b/bindings/mnt/pyfiction/include/pyfiction/algorithms/network_transformation/fanout_substitution.hpp similarity index 86% rename from bindings/pyfiction/include/pyfiction/algorithms/network_transformation/fanout_substitution.hpp rename to bindings/mnt/pyfiction/include/pyfiction/algorithms/network_transformation/fanout_substitution.hpp index 5f6eb5bf4..04253fe53 100644 --- a/bindings/pyfiction/include/pyfiction/algorithms/network_transformation/fanout_substitution.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/algorithms/network_transformation/fanout_substitution.hpp @@ -22,13 +22,13 @@ namespace detail template void fanout_substitution(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; - m.def("fanout_substitution", &fiction::fanout_substitution, "network"_a, - "params"_a = fiction::fanout_substitution_params{}, DOC(fiction_fanout_substitution)); + m.def("fanout_substitution", &fiction::fanout_substitution, py::arg("network"), + py::arg("params") = fiction::fanout_substitution_params{}, DOC(fiction_fanout_substitution)); - m.def("is_fanout_substituted", &fiction::is_fanout_substituted, "network"_a, - "params"_a = fiction::fanout_substitution_params{}, DOC(fiction_is_fanout_substituted)); + m.def("is_fanout_substituted", &fiction::is_fanout_substituted, py::arg("network"), + py::arg("params") = fiction::fanout_substitution_params{}, DOC(fiction_is_fanout_substituted)); } } // namespace detail diff --git a/bindings/pyfiction/include/pyfiction/algorithms/network_transformation/network_balancing.hpp b/bindings/mnt/pyfiction/include/pyfiction/algorithms/network_transformation/network_balancing.hpp similarity index 75% rename from bindings/pyfiction/include/pyfiction/algorithms/network_transformation/network_balancing.hpp rename to bindings/mnt/pyfiction/include/pyfiction/algorithms/network_transformation/network_balancing.hpp index 35810bc5b..4ff50c945 100644 --- a/bindings/pyfiction/include/pyfiction/algorithms/network_transformation/network_balancing.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/algorithms/network_transformation/network_balancing.hpp @@ -21,13 +21,13 @@ namespace detail template void network_balancing(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; - m.def("network_balancing", &fiction::network_balancing, "network"_a, - "params"_a = fiction::network_balancing_params{}, DOC(fiction_network_balancing)); + m.def("network_balancing", &fiction::network_balancing, py::arg("network"), + py::arg("params") = fiction::network_balancing_params{}, DOC(fiction_network_balancing)); - m.def("is_balanced", &fiction::is_balanced, "network"_a, "params"_a = fiction::network_balancing_params{}, - DOC(fiction_is_balanced)); + m.def("is_balanced", &fiction::is_balanced, py::arg("network"), + py::arg("params") = fiction::network_balancing_params{}, DOC(fiction_is_balanced)); } } // namespace detail diff --git a/bindings/pyfiction/include/pyfiction/algorithms/network_transformation/technology_mapping.hpp b/bindings/mnt/pyfiction/include/pyfiction/algorithms/network_transformation/technology_mapping.hpp similarity index 95% rename from bindings/pyfiction/include/pyfiction/algorithms/network_transformation/technology_mapping.hpp rename to bindings/mnt/pyfiction/include/pyfiction/algorithms/network_transformation/technology_mapping.hpp index 2826944d2..f5a78d634 100644 --- a/bindings/pyfiction/include/pyfiction/algorithms/network_transformation/technology_mapping.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/algorithms/network_transformation/technology_mapping.hpp @@ -22,10 +22,11 @@ namespace detail template void technology_mapping(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; - m.def("technology_mapping", &fiction::technology_mapping, "network"_a, - "params"_a = fiction::technology_mapping_params{}, "stats"_a = nullptr, DOC(fiction_technology_mapping)); + m.def("technology_mapping", &fiction::technology_mapping, py::arg("network"), + py::arg("params") = fiction::technology_mapping_params{}, py::arg("stats") = nullptr, + DOC(fiction_technology_mapping)); } } // namespace detail diff --git a/bindings/pyfiction/include/pyfiction/algorithms/path_finding/a_star.hpp b/bindings/mnt/pyfiction/include/pyfiction/algorithms/path_finding/a_star.hpp similarity index 89% rename from bindings/pyfiction/include/pyfiction/algorithms/path_finding/a_star.hpp rename to bindings/mnt/pyfiction/include/pyfiction/algorithms/path_finding/a_star.hpp index f60f01632..a48fc98ef 100644 --- a/bindings/pyfiction/include/pyfiction/algorithms/path_finding/a_star.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/algorithms/path_finding/a_star.hpp @@ -24,7 +24,7 @@ namespace detail template void a_star(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; m.def( "a_star", @@ -36,10 +36,11 @@ void a_star(pybind11::module& m) fiction::manhattan_distance_functor(), fiction::unit_cost_functor(), params)); }, - "layout"_a, "source"_a, "target"_a, "params"_a = fiction::a_star_params{}, DOC(fiction_a_star)); + py::arg("layout"), py::arg("source"), py::arg("target"), py::arg("params") = fiction::a_star_params{}, + DOC(fiction_a_star)); - m.def("a_star_distance", &fiction::a_star_distance, "layout"_a, "source"_a, "target"_a, - DOC(fiction_a_star_distance)); + m.def("a_star_distance", &fiction::a_star_distance, py::arg("layout"), py::arg("source"), + py::arg("target"), DOC(fiction_a_star_distance)); } } // namespace detail diff --git a/bindings/pyfiction/include/pyfiction/algorithms/path_finding/distance.hpp b/bindings/mnt/pyfiction/include/pyfiction/algorithms/path_finding/distance.hpp similarity index 62% rename from bindings/pyfiction/include/pyfiction/algorithms/path_finding/distance.hpp rename to bindings/mnt/pyfiction/include/pyfiction/algorithms/path_finding/distance.hpp index 3eb9bc36f..3c0bf283b 100644 --- a/bindings/pyfiction/include/pyfiction/algorithms/path_finding/distance.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/algorithms/path_finding/distance.hpp @@ -21,18 +21,18 @@ namespace detail template void distance(pybind11::module& m) { - using namespace pybind11::literals; - - m.def("manhattan_distance", &fiction::manhattan_distance, "layout"_a, "source"_a, "target"_a, - DOC(fiction_manhattan_distance)); - m.def("euclidean_distance", &fiction::euclidean_distance, "layout"_a, "source"_a, "target"_a, - DOC(fiction_euclidean_distance)); - m.def("squared_euclidean_distance", &fiction::squared_euclidean_distance, "layout"_a, "source"_a, "target"_a, - DOC(fiction_squared_euclidean_distance)); - m.def("twoddwave_distance", &fiction::twoddwave_distance, "layout"_a, "source"_a, "target"_a, - DOC(fiction_twoddwave_distance)); - m.def("chebyshev_distance", &fiction::chebyshev_distance, "layout"_a, "source"_a, "target"_a, - DOC(fiction_chebyshev_distance)); + namespace py = pybind11; + + m.def("manhattan_distance", &fiction::manhattan_distance, py::arg("layout"), py::arg("source"), + py::arg("target"), DOC(fiction_manhattan_distance)); + m.def("euclidean_distance", &fiction::euclidean_distance, py::arg("layout"), py::arg("source"), + py::arg("target"), DOC(fiction_euclidean_distance)); + m.def("squared_euclidean_distance", &fiction::squared_euclidean_distance, py::arg("layout"), py::arg("source"), + py::arg("target"), DOC(fiction_squared_euclidean_distance)); + m.def("twoddwave_distance", &fiction::twoddwave_distance, py::arg("layout"), py::arg("source"), + py::arg("target"), DOC(fiction_twoddwave_distance)); + m.def("chebyshev_distance", &fiction::chebyshev_distance, py::arg("layout"), py::arg("source"), + py::arg("target"), DOC(fiction_chebyshev_distance)); } } // namespace detail diff --git a/bindings/pyfiction/include/pyfiction/algorithms/path_finding/enumerate_all_paths.hpp b/bindings/mnt/pyfiction/include/pyfiction/algorithms/path_finding/enumerate_all_paths.hpp similarity index 93% rename from bindings/pyfiction/include/pyfiction/algorithms/path_finding/enumerate_all_paths.hpp rename to bindings/mnt/pyfiction/include/pyfiction/algorithms/path_finding/enumerate_all_paths.hpp index 9c44f74ee..417cf54f2 100644 --- a/bindings/pyfiction/include/pyfiction/algorithms/path_finding/enumerate_all_paths.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/algorithms/path_finding/enumerate_all_paths.hpp @@ -26,7 +26,7 @@ namespace detail template void enumerate_all_paths(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; m.def( "enumerate_all_paths", @@ -46,8 +46,8 @@ void enumerate_all_paths(pybind11::module& m) return paths; }, - "layout"_a, "source"_a, "target"_a, "params"_a = fiction::enumerate_all_paths_params{}, - DOC(fiction_enumerate_all_paths)); + py::arg("layout"), py::arg("source"), py::arg("target"), + py::arg("params") = fiction::enumerate_all_paths_params{}, DOC(fiction_enumerate_all_paths)); } } // namespace detail diff --git a/bindings/pyfiction/include/pyfiction/algorithms/path_finding/k_shortest_paths.hpp b/bindings/mnt/pyfiction/include/pyfiction/algorithms/path_finding/k_shortest_paths.hpp similarity index 92% rename from bindings/pyfiction/include/pyfiction/algorithms/path_finding/k_shortest_paths.hpp rename to bindings/mnt/pyfiction/include/pyfiction/algorithms/path_finding/k_shortest_paths.hpp index dd936d764..1e574bbfa 100644 --- a/bindings/pyfiction/include/pyfiction/algorithms/path_finding/k_shortest_paths.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/algorithms/path_finding/k_shortest_paths.hpp @@ -27,7 +27,7 @@ namespace detail template void yen_k_shortest_paths(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; m.def( "yen_k_shortest_paths", @@ -47,8 +47,8 @@ void yen_k_shortest_paths(pybind11::module& m) return paths; }, - "layout"_a, "source"_a, "target"_a, "k"_a, "params"_a = fiction::yen_k_shortest_paths_params{}, - DOC(fiction_yen_k_shortest_paths)); + py::arg("layout"), py::arg("source"), py::arg("target"), py::arg("k"), + py::arg("params") = fiction::yen_k_shortest_paths_params{}, DOC(fiction_yen_k_shortest_paths)); } } // namespace detail diff --git a/bindings/pyfiction/include/pyfiction/algorithms/physical_design/apply_gate_library.hpp b/bindings/mnt/pyfiction/include/pyfiction/algorithms/physical_design/apply_gate_library.hpp similarity index 94% rename from bindings/pyfiction/include/pyfiction/algorithms/physical_design/apply_gate_library.hpp rename to bindings/mnt/pyfiction/include/pyfiction/algorithms/physical_design/apply_gate_library.hpp index 4d666bf9a..ffb1a7f41 100644 --- a/bindings/pyfiction/include/pyfiction/algorithms/physical_design/apply_gate_library.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/algorithms/physical_design/apply_gate_library.hpp @@ -30,12 +30,12 @@ namespace detail template void apply_fcn_gate_library(pybind11::module& m, const std::string& lib_name) { - using namespace pybind11::literals; + namespace py = pybind11; using py_cartesian_technology_cell_layout = py_cartesian_cell_layout>; m.def(fmt::format("apply_{}_library", lib_name).c_str(), - &fiction::apply_gate_library, "layout"_a, + &fiction::apply_gate_library, py::arg("layout"), DOC(fiction_apply_gate_library)); } diff --git a/bindings/pyfiction/include/pyfiction/algorithms/physical_design/color_routing.hpp b/bindings/mnt/pyfiction/include/pyfiction/algorithms/physical_design/color_routing.hpp similarity index 95% rename from bindings/pyfiction/include/pyfiction/algorithms/physical_design/color_routing.hpp rename to bindings/mnt/pyfiction/include/pyfiction/algorithms/physical_design/color_routing.hpp index b8088cee1..7eed9aad8 100644 --- a/bindings/pyfiction/include/pyfiction/algorithms/physical_design/color_routing.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/algorithms/physical_design/color_routing.hpp @@ -24,7 +24,7 @@ namespace detail template void color_routing(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; m.def( "color_routing", @@ -41,7 +41,8 @@ void color_routing(pybind11::module& m) return fiction::color_routing(lyt, objs, params); }, - "layout"_a, "objectives"_a, "params"_a = fiction::color_routing_params{}, DOC(fiction_color_routing)); + py::arg("layout"), py::arg("objectives"), py::arg("params") = fiction::color_routing_params{}, + DOC(fiction_color_routing)); } } // namespace detail diff --git a/bindings/pyfiction/include/pyfiction/algorithms/physical_design/design_sidb_gates.hpp b/bindings/mnt/pyfiction/include/pyfiction/algorithms/physical_design/design_sidb_gates.hpp similarity index 95% rename from bindings/pyfiction/include/pyfiction/algorithms/physical_design/design_sidb_gates.hpp rename to bindings/mnt/pyfiction/include/pyfiction/algorithms/physical_design/design_sidb_gates.hpp index 195a73cf7..3f41dbfa9 100644 --- a/bindings/pyfiction/include/pyfiction/algorithms/physical_design/design_sidb_gates.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/algorithms/physical_design/design_sidb_gates.hpp @@ -22,10 +22,9 @@ template void design_sidb_gates(pybind11::module& m) { namespace py = pybind11; - using namespace py::literals; - m.def("design_sidb_gates", &fiction::design_sidb_gates, "skeleton"_a, "spec"_a, - "params"_a = fiction::design_sidb_gates_params>{}, "stats"_a = nullptr, + m.def("design_sidb_gates", &fiction::design_sidb_gates, py::arg("skeleton"), py::arg("spec"), + py::arg("params") = fiction::design_sidb_gates_params>{}, py::arg("stats") = nullptr, DOC(fiction_design_sidb_gates)); } diff --git a/bindings/pyfiction/include/pyfiction/algorithms/physical_design/exact.hpp b/bindings/mnt/pyfiction/include/pyfiction/algorithms/physical_design/exact.hpp similarity index 90% rename from bindings/pyfiction/include/pyfiction/algorithms/physical_design/exact.hpp rename to bindings/mnt/pyfiction/include/pyfiction/algorithms/physical_design/exact.hpp index 8726dfa5a..28ff8f24d 100644 --- a/bindings/pyfiction/include/pyfiction/algorithms/physical_design/exact.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/algorithms/physical_design/exact.hpp @@ -26,7 +26,7 @@ namespace pyfiction inline void exact(pybind11::module& m) { namespace py = pybind11; - using namespace pybind11::literals; + namespace py = pybind11; py::enum_(m, "technology_constraints", DOC(fiction_technology_constraints)) .value("NONE", fiction::technology_constraints::NONE, DOC(fiction_technology_constraints_NONE)) @@ -93,14 +93,17 @@ inline void exact(pybind11::module& m) ; - m.def("exact_cartesian", &fiction::exact, "network"_a, - "parameters"_a = fiction::exact_physical_design_params{}, "statistics"_a = nullptr, DOC(fiction_exact)); + m.def("exact_cartesian", &fiction::exact, py::arg("network"), + py::arg("parameters") = fiction::exact_physical_design_params{}, py::arg("statistics") = nullptr, + DOC(fiction_exact)); - m.def("exact_shifted_cartesian", &fiction::exact, "network"_a, - "parameters"_a = fiction::exact_physical_design_params{}, "statistics"_a = nullptr); + m.def("exact_shifted_cartesian", &fiction::exact, + py::arg("network"), py::arg("parameters") = fiction::exact_physical_design_params{}, + py::arg("statistics") = nullptr); - m.def("exact_hexagonal", &fiction::exact, "network"_a, - "parameters"_a = fiction::exact_physical_design_params{}, "statistics"_a = nullptr, DOC(fiction_exact)); + m.def("exact_hexagonal", &fiction::exact, py::arg("network"), + py::arg("parameters") = fiction::exact_physical_design_params{}, py::arg("statistics") = nullptr, + DOC(fiction_exact)); } } // namespace pyfiction diff --git a/bindings/pyfiction/include/pyfiction/algorithms/physical_design/graph_oriented_layout_design.hpp b/bindings/mnt/pyfiction/include/pyfiction/algorithms/physical_design/graph_oriented_layout_design.hpp similarity index 95% rename from bindings/pyfiction/include/pyfiction/algorithms/physical_design/graph_oriented_layout_design.hpp rename to bindings/mnt/pyfiction/include/pyfiction/algorithms/physical_design/graph_oriented_layout_design.hpp index 3e4376231..ceca6f703 100644 --- a/bindings/pyfiction/include/pyfiction/algorithms/physical_design/graph_oriented_layout_design.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/algorithms/physical_design/graph_oriented_layout_design.hpp @@ -25,7 +25,7 @@ namespace pyfiction inline void graph_oriented_layout_design(pybind11::module& m) { namespace py = pybind11; - using namespace pybind11::literals; + namespace py = pybind11; py::enum_( m, "gold_effort_mode", DOC(fiction_graph_oriented_layout_design_params_effort_mode)) @@ -97,9 +97,9 @@ inline void graph_oriented_layout_design(pybind11::module& m) DOC(fiction_graph_oriented_layout_design_stats_num_crossings)); m.def("graph_oriented_layout_design", - &fiction::graph_oriented_layout_design, "network"_a, - "parameters"_a = fiction::graph_oriented_layout_design_params{}, "statistics"_a = nullptr, - "custom_cost_objective"_a = nullptr, DOC(fiction_graph_oriented_layout_design)); + &fiction::graph_oriented_layout_design, py::arg("network"), + py::arg("parameters") = fiction::graph_oriented_layout_design_params{}, py::arg("statistics") = nullptr, + py::arg("custom_cost_objective") = nullptr, DOC(fiction_graph_oriented_layout_design)); } } // namespace pyfiction diff --git a/bindings/pyfiction/include/pyfiction/algorithms/physical_design/hexagonalization.hpp b/bindings/mnt/pyfiction/include/pyfiction/algorithms/physical_design/hexagonalization.hpp similarity index 91% rename from bindings/pyfiction/include/pyfiction/algorithms/physical_design/hexagonalization.hpp rename to bindings/mnt/pyfiction/include/pyfiction/algorithms/physical_design/hexagonalization.hpp index 954b4d027..5d7080648 100644 --- a/bindings/pyfiction/include/pyfiction/algorithms/physical_design/hexagonalization.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/algorithms/physical_design/hexagonalization.hpp @@ -21,11 +21,11 @@ namespace detail template void hexagonalization(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; m.def( "hexagonalization", [](const Lyt& lyt) -> py_hexagonal_gate_layout - { return fiction::hexagonalization(lyt); }, "layout"_a, + { return fiction::hexagonalization(lyt); }, py::arg("layout"), DOC(fiction_hexagonalization)); } diff --git a/bindings/pyfiction/include/pyfiction/algorithms/physical_design/orthogonal.hpp b/bindings/mnt/pyfiction/include/pyfiction/algorithms/physical_design/orthogonal.hpp similarity index 92% rename from bindings/pyfiction/include/pyfiction/algorithms/physical_design/orthogonal.hpp rename to bindings/mnt/pyfiction/include/pyfiction/algorithms/physical_design/orthogonal.hpp index 1fa37b81b..4fac19f3c 100644 --- a/bindings/pyfiction/include/pyfiction/algorithms/physical_design/orthogonal.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/algorithms/physical_design/orthogonal.hpp @@ -24,7 +24,7 @@ namespace pyfiction inline void orthogonal(pybind11::module& m) { namespace py = pybind11; - using namespace pybind11::literals; + namespace py = pybind11; py::class_(m, "orthogonal_params", DOC(fiction_orthogonal_physical_design_params)) @@ -59,8 +59,8 @@ inline void orthogonal(pybind11::module& m) ; - m.def("orthogonal", &fiction::orthogonal, "network"_a, - "parameters"_a = fiction::orthogonal_physical_design_params{}, "statistics"_a = nullptr, + m.def("orthogonal", &fiction::orthogonal, py::arg("network"), + py::arg("parameters") = fiction::orthogonal_physical_design_params{}, py::arg("statistics") = nullptr, DOC(fiction_orthogonal)); } diff --git a/bindings/pyfiction/include/pyfiction/algorithms/physical_design/post_layout_optimization.hpp b/bindings/mnt/pyfiction/include/pyfiction/algorithms/physical_design/post_layout_optimization.hpp similarity index 95% rename from bindings/pyfiction/include/pyfiction/algorithms/physical_design/post_layout_optimization.hpp rename to bindings/mnt/pyfiction/include/pyfiction/algorithms/physical_design/post_layout_optimization.hpp index 16571324f..fb892f852 100644 --- a/bindings/pyfiction/include/pyfiction/algorithms/physical_design/post_layout_optimization.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/algorithms/physical_design/post_layout_optimization.hpp @@ -21,7 +21,7 @@ namespace pyfiction inline void post_layout_optimization(pybind11::module& m) { namespace py = pybind11; - using namespace pybind11::literals; + namespace py = pybind11; py::class_(m, "post_layout_optimization_params", DOC(fiction_post_layout_optimization_params)) @@ -70,8 +70,8 @@ inline void post_layout_optimization(pybind11::module& m) ; - m.def("post_layout_optimization", &fiction::post_layout_optimization, "layout"_a, - "parameters"_a = fiction::post_layout_optimization_params{}, "statistics"_a = nullptr, + m.def("post_layout_optimization", &fiction::post_layout_optimization, py::arg("layout"), + py::arg("parameters") = fiction::post_layout_optimization_params{}, py::arg("statistics") = nullptr, DOC(fiction_post_layout_optimization)); } diff --git a/bindings/pyfiction/include/pyfiction/algorithms/physical_design/wiring_reduction.hpp b/bindings/mnt/pyfiction/include/pyfiction/algorithms/physical_design/wiring_reduction.hpp similarity index 93% rename from bindings/pyfiction/include/pyfiction/algorithms/physical_design/wiring_reduction.hpp rename to bindings/mnt/pyfiction/include/pyfiction/algorithms/physical_design/wiring_reduction.hpp index b676e5607..3496a9184 100644 --- a/bindings/pyfiction/include/pyfiction/algorithms/physical_design/wiring_reduction.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/algorithms/physical_design/wiring_reduction.hpp @@ -21,7 +21,7 @@ namespace pyfiction inline void wiring_reduction(pybind11::module& m) { namespace py = pybind11; - using namespace pybind11::literals; + namespace py = pybind11; py::class_(m, "wiring_reduction_params", DOC(fiction_wiring_reduction_params)) .def(py::init<>()) @@ -59,8 +59,9 @@ inline void wiring_reduction(pybind11::module& m) ; - m.def("wiring_reduction", &fiction::wiring_reduction, "layout"_a, - "parameters"_a = fiction::wiring_reduction_params{}, "statistics"_a = nullptr, DOC(fiction_wiring_reduction)); + m.def("wiring_reduction", &fiction::wiring_reduction, py::arg("layout"), + py::arg("parameters") = fiction::wiring_reduction_params{}, py::arg("statistics") = nullptr, + DOC(fiction_wiring_reduction)); } } // namespace pyfiction diff --git a/bindings/pyfiction/include/pyfiction/algorithms/properties/critical_path_length_and_throughput.hpp b/bindings/mnt/pyfiction/include/pyfiction/algorithms/properties/critical_path_length_and_throughput.hpp similarity index 91% rename from bindings/pyfiction/include/pyfiction/algorithms/properties/critical_path_length_and_throughput.hpp rename to bindings/mnt/pyfiction/include/pyfiction/algorithms/properties/critical_path_length_and_throughput.hpp index 986080c2e..7ba50bcf4 100644 --- a/bindings/pyfiction/include/pyfiction/algorithms/properties/critical_path_length_and_throughput.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/algorithms/properties/critical_path_length_and_throughput.hpp @@ -23,7 +23,7 @@ namespace detail template void critical_path_length_and_throughput(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; m.def( "critical_path_length_and_throughput", @@ -33,7 +33,7 @@ void critical_path_length_and_throughput(pybind11::module& m) return {result.critical_path_length, result.throughput}; }, - "layout"_a, DOC(fiction_critical_path_length_and_throughput)); + py::arg("layout"), DOC(fiction_critical_path_length_and_throughput)); } } // namespace detail diff --git a/bindings/pyfiction/include/pyfiction/algorithms/simulation/logic_simulation.hpp b/bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/logic_simulation.hpp similarity index 100% rename from bindings/pyfiction/include/pyfiction/algorithms/simulation/logic_simulation.hpp rename to bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/logic_simulation.hpp diff --git a/bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/assess_physical_population_stability.hpp b/bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/assess_physical_population_stability.hpp similarity index 96% rename from bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/assess_physical_population_stability.hpp rename to bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/assess_physical_population_stability.hpp index 18b5da90b..811a80010 100644 --- a/bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/assess_physical_population_stability.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/assess_physical_population_stability.hpp @@ -23,10 +23,10 @@ template void assess_physical_population_stability(pybind11::module& m) { namespace py = pybind11; - using namespace pybind11::literals; + namespace py = pybind11; - m.def("assess_physical_population_stability", &fiction::assess_physical_population_stability, "lyt"_a, - "params"_a = fiction::assess_physical_population_stability_params{}, + m.def("assess_physical_population_stability", &fiction::assess_physical_population_stability, py::arg("lyt"), + py::arg("params") = fiction::assess_physical_population_stability_params{}, DOC(fiction_assess_physical_population_stability)); } diff --git a/bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/calculate_energy_and_state_type.hpp b/bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/calculate_energy_and_state_type.hpp similarity index 72% rename from bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/calculate_energy_and_state_type.hpp rename to bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/calculate_energy_and_state_type.hpp index 58c1388c0..5b6b9c273 100644 --- a/bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/calculate_energy_and_state_type.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/calculate_energy_and_state_type.hpp @@ -24,17 +24,17 @@ namespace detail template void calculate_energy_and_state_type(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; m.def("calculate_energy_and_state_type_with_kinks_accepted", - &fiction::calculate_energy_and_state_type_with_kinks_accepted, "energy_distribution"_a, - "valid_charge_distributions"_a, "output_bdl_pairs"_a, "spec"_a, "input_index"_a, + &fiction::calculate_energy_and_state_type_with_kinks_accepted, py::arg("energy_distribution"), + py::arg("valid_charge_distributions"), py::arg("output_bdl_pairs"), py::arg("spec"), py::arg("input_index"), DOC(fiction_calculate_energy_and_state_type_with_kinks_accepted)); m.def("calculate_energy_and_state_type_with_kinks_rejected", - &fiction::calculate_energy_and_state_type_with_kinks_rejected, "energy_distribution"_a, - "valid_charge_distributions"_a, "spec"_a, "input_index"_a, "input_bdl_wires"_a, "output_bdl_wires"_a, - DOC(fiction_calculate_energy_and_state_type_with_kinks_rejected)); + &fiction::calculate_energy_and_state_type_with_kinks_rejected, py::arg("energy_distribution"), + py::arg("valid_charge_distributions"), py::arg("spec"), py::arg("input_index"), py::arg("input_bdl_wires"), + py::arg("output_bdl_wires"), DOC(fiction_calculate_energy_and_state_type_with_kinks_rejected)); } } // namespace detail diff --git a/bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/can_positive_charges_occur.hpp b/bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/can_positive_charges_occur.hpp similarity index 87% rename from bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/can_positive_charges_occur.hpp rename to bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/can_positive_charges_occur.hpp index e8337e62d..5980eec07 100644 --- a/bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/can_positive_charges_occur.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/can_positive_charges_occur.hpp @@ -24,10 +24,10 @@ namespace detail template void can_positive_charges_occur(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; - m.def("can_positive_charges_occur", &fiction::can_positive_charges_occur, "lyt"_a, "sim_params"_a, - DOC(fiction_can_positive_charges_occur)); + m.def("can_positive_charges_occur", &fiction::can_positive_charges_occur, py::arg("lyt"), + py::arg("sim_params"), DOC(fiction_can_positive_charges_occur)); } } // namespace detail diff --git a/bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/check_simulation_results_for_equivalence.hpp b/bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/check_simulation_results_for_equivalence.hpp similarity index 86% rename from bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/check_simulation_results_for_equivalence.hpp rename to bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/check_simulation_results_for_equivalence.hpp index 3ed4d3f55..492355d1c 100644 --- a/bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/check_simulation_results_for_equivalence.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/check_simulation_results_for_equivalence.hpp @@ -22,10 +22,11 @@ namespace detail template void check_for_equivalence(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; m.def("check_simulation_results_for_equivalence", &fiction::check_simulation_results_for_equivalence, - "result1"_a = fiction::sidb_simulation_result{}, "result2"_a = fiction::sidb_simulation_result{}, + py::arg("result1") = fiction::sidb_simulation_result{}, + py::arg("result2") = fiction::sidb_simulation_result{}, DOC(fiction_check_simulation_results_for_equivalence)); } diff --git a/bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/compute_operational_ratio.hpp b/bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/compute_operational_ratio.hpp similarity index 85% rename from bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/compute_operational_ratio.hpp rename to bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/compute_operational_ratio.hpp index 97d11ca68..7c32019e5 100644 --- a/bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/compute_operational_ratio.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/compute_operational_ratio.hpp @@ -24,10 +24,11 @@ template void compute_operational_ratio(pybind11::module& m) { namespace py = pybind11; - using namespace pybind11::literals; + namespace py = pybind11; - m.def("compute_operational_ratio", &fiction::compute_operational_ratio, "lyt"_a, "spec"_a, "pp"_a, - "params"_a = fiction::operational_domain_params{}, DOC(fiction_compute_operational_ratio)); + m.def("compute_operational_ratio", &fiction::compute_operational_ratio, py::arg("lyt"), py::arg("spec"), + py::arg("pp"), py::arg("params") = fiction::operational_domain_params{}, + DOC(fiction_compute_operational_ratio)); } } // namespace detail @@ -35,7 +36,7 @@ void compute_operational_ratio(pybind11::module& m) inline void compute_operational_ratio(pybind11::module& m) { namespace py = pybind11; - using namespace pybind11::literals; + namespace py = pybind11; py::class_(m, "compute_operational_ratio_params", DOC(fiction_compute_operational_ratio_params)) diff --git a/bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/convert_potential_to_distance.hpp b/bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/convert_potential_to_distance.hpp similarity index 78% rename from bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/convert_potential_to_distance.hpp rename to bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/convert_potential_to_distance.hpp index fc6ccbd94..bf915889f 100644 --- a/bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/convert_potential_to_distance.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/convert_potential_to_distance.hpp @@ -18,10 +18,10 @@ namespace pyfiction inline void convert_potential_to_distance(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; - m.def("convert_potential_to_distance", &fiction::convert_potential_to_distance, "potential"_a, "params"_a, - "precision"_a, DOC(fiction_convert_potential_to_distance)); + m.def("convert_potential_to_distance", &fiction::convert_potential_to_distance, py::arg("potential"), + py::arg("params"), py::arg("precision"), DOC(fiction_convert_potential_to_distance)); } } // namespace pyfiction diff --git a/bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/critical_temperature.hpp b/bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/critical_temperature.hpp similarity index 90% rename from bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/critical_temperature.hpp rename to bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/critical_temperature.hpp index 0461616e9..a1bbff483 100644 --- a/bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/critical_temperature.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/critical_temperature.hpp @@ -24,14 +24,14 @@ namespace detail template void critical_temperature(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; - m.def("critical_temperature_gate_based", &fiction::critical_temperature_gate_based, "lyt"_a, "spec"_a, - "params"_a = fiction::critical_temperature_params{}, "stats"_a = nullptr, + m.def("critical_temperature_gate_based", &fiction::critical_temperature_gate_based, py::arg("lyt"), + py::arg("spec"), py::arg("params") = fiction::critical_temperature_params{}, py::arg("stats") = nullptr, DOC(fiction_critical_temperature_gate_based)); - m.def("critical_temperature_non_gate_based", &fiction::critical_temperature_non_gate_based, "lyt"_a, - "params"_a = fiction::critical_temperature_params{}, "stats"_a = nullptr, + m.def("critical_temperature_non_gate_based", &fiction::critical_temperature_non_gate_based, py::arg("lyt"), + py::arg("params") = fiction::critical_temperature_params{}, py::arg("stats") = nullptr, DOC(fiction_critical_temperature_non_gate_based)); } diff --git a/bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/detect_bdl_pairs.hpp b/bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/detect_bdl_pairs.hpp similarity index 85% rename from bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/detect_bdl_pairs.hpp rename to bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/detect_bdl_pairs.hpp index 53eb66a84..960cb0cda 100644 --- a/bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/detect_bdl_pairs.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/detect_bdl_pairs.hpp @@ -27,10 +27,10 @@ namespace detail template void detect_bdl_pairs(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; - m.def("detect_bdl_pairs", &fiction::detect_bdl_pairs, "lyt"_a, "type"_a = std::nullopt, - "params"_a = fiction::detect_bdl_pairs_params{}, DOC(fiction_detect_bdl_pairs)); + m.def("detect_bdl_pairs", &fiction::detect_bdl_pairs, py::arg("lyt"), py::arg("type") = std::nullopt, + py::arg("params") = fiction::detect_bdl_pairs_params{}, DOC(fiction_detect_bdl_pairs)); } } // namespace detail @@ -38,12 +38,12 @@ void detect_bdl_pairs(pybind11::module& m) inline void detect_bdl_pairs(pybind11::module& m) { namespace py = pybind11; - using namespace pybind11::literals; + namespace py = pybind11; py::class_>(m, "bdl_pair", DOC(fiction_bdl_pair)) .def(py::init<>(), DOC(fiction_bdl_pair_bdl_pair)) .def(py::init(), - "t"_a, "u"_a, "l"_a, DOC(fiction_bdl_pair_bdl_pair_2)) + py::arg("t"), py::arg("u"), py::arg("l"), DOC(fiction_bdl_pair_bdl_pair_2)) .def_readonly("type", &fiction::bdl_pair::type, DOC(fiction_bdl_pair_type)) .def_readonly("upper", &fiction::bdl_pair::upper, DOC(fiction_bdl_pair_upper)) .def_readonly("lower", &fiction::bdl_pair::lower, DOC(fiction_bdl_pair_lower)); diff --git a/bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/detect_bdl_wires.hpp b/bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/detect_bdl_wires.hpp similarity index 89% rename from bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/detect_bdl_wires.hpp rename to bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/detect_bdl_wires.hpp index 8506deae7..89848091f 100644 --- a/bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/detect_bdl_wires.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/detect_bdl_wires.hpp @@ -23,23 +23,23 @@ namespace detail template void detect_bdl_wires(pybind11::module& m, const std::string& lattice) { - using namespace pybind11::literals; + namespace py = pybind11; namespace py = pybind11; using bdl_wire_t = fiction::bdl_wire; py::class_(m, fmt::format("bdl_wire_{}", lattice).c_str(), DOC(fiction_bdl_wire)) .def(py::init<>(), DOC(fiction_bdl_wire_bdl_wire)) - .def(py::init>>(), "p"_a, + .def(py::init>>(), py::arg("p"), DOC(fiction_bdl_wire_bdl_wire_2)) .def_readwrite("pairs", &bdl_wire_t::pairs, DOC(fiction_bdl_wire_pairs)) .def_readwrite("direction", &bdl_wire_t::port, DOC(fiction_bdl_wire_port)) .def_readwrite("first_bdl_pair", &bdl_wire_t::first_bdl_pair, DOC(fiction_bdl_wire_first_bdl_pair)) .def_readwrite("last_bdl_pair", &bdl_wire_t::last_bdl_pair, DOC(fiction_bdl_wire_last_bdl_pair)); - m.def(fmt::format("detect_bdl_wires_{}", lattice).c_str(), &fiction::detect_bdl_wires, "lyt"_a, - "params"_a = fiction::detect_bdl_wires_params{}, "wire_selection"_a = fiction::bdl_wire_selection::ALL, - DOC(fiction_detect_bdl_wires)); + m.def(fmt::format("detect_bdl_wires_{}", lattice).c_str(), &fiction::detect_bdl_wires, py::arg("lyt"), + py::arg("params") = fiction::detect_bdl_wires_params{}, + py::arg("wire_selection") = fiction::bdl_wire_selection::ALL, DOC(fiction_detect_bdl_wires)); } } // namespace detail @@ -52,7 +52,7 @@ void detect_bdl_wires(pybind11::module& m, const std::string& lattice) inline void detect_bdl_wires(pybind11::module& m) { namespace py = pybind11; - using namespace pybind11::literals; + namespace py = pybind11; // Enum for wire selection options py::enum_(m, "bdl_wire_selection", DOC(fiction_bdl_wire_selection)) diff --git a/bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/determine_groundstate_from_simulation_results.hpp b/bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/determine_groundstate_from_simulation_results.hpp similarity index 89% rename from bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/determine_groundstate_from_simulation_results.hpp rename to bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/determine_groundstate_from_simulation_results.hpp index 45c407312..b33f67649 100644 --- a/bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/determine_groundstate_from_simulation_results.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/determine_groundstate_from_simulation_results.hpp @@ -22,10 +22,10 @@ namespace detail template void determine_groundstate_from_simulation_results(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; m.def("determine_groundstate_from_simulation_results", &fiction::determine_groundstate_from_simulation_results, - "simulation_results"_a, DOC(fiction_determine_groundstate_from_simulation_results)); + py::arg("simulation_results"), DOC(fiction_determine_groundstate_from_simulation_results)); } } // namespace detail diff --git a/bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/determine_physically_valid_parameters.hpp b/bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/determine_physically_valid_parameters.hpp similarity index 90% rename from bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/determine_physically_valid_parameters.hpp rename to bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/determine_physically_valid_parameters.hpp index 0cff96e1c..e06ac9a00 100644 --- a/bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/determine_physically_valid_parameters.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/determine_physically_valid_parameters.hpp @@ -23,10 +23,10 @@ namespace detail template void determine_physically_valid_parameters(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; - m.def("determine_physically_valid_parameters", &fiction::determine_physically_valid_parameters, "cds"_a, - "params"_a = fiction::operational_domain_params{}); + m.def("determine_physically_valid_parameters", &fiction::determine_physically_valid_parameters, py::arg("cds"), + py::arg("params") = fiction::operational_domain_params{}); } } // namespace detail @@ -34,7 +34,7 @@ void determine_physically_valid_parameters(pybind11::module& m) inline void determine_physically_valid_parameters(pybind11::module& m) { namespace py = pybind11; - using namespace pybind11::literals; + namespace py = pybind11; py::class_>(m, "physically_valid_parameters_domain", DOC(fiction_operational_domain)) @@ -56,7 +56,7 @@ inline void determine_physically_valid_parameters(pybind11::module& m) throw py::value_error(e.what()); } }, - "pp"_a); + py::arg("pp")); // NOTE be careful with the order of the following calls! Python will resolve the first matching overload! detail::determine_physically_valid_parameters(m); diff --git a/bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/displacement_robustness_domain.hpp b/bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/displacement_robustness_domain.hpp similarity index 96% rename from bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/displacement_robustness_domain.hpp rename to bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/displacement_robustness_domain.hpp index 3d37b2862..5f220ca78 100644 --- a/bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/displacement_robustness_domain.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/displacement_robustness_domain.hpp @@ -25,7 +25,7 @@ void determine_displacement_robustness_domain(pybind11::module& m, const std::st { namespace py = pybind11; - using namespace pybind11::literals; + namespace py = pybind11; py::class_>( m, fmt::format("displacement_robustness_domain{}", lattice).c_str()) @@ -33,8 +33,8 @@ void determine_displacement_robustness_domain(pybind11::module& m, const std::st .def_readwrite("operational_values", &fiction::displacement_robustness_domain::operational_values); m.def(fmt::format("determine_displacement_robustness_domain{}", lattice).c_str(), - &fiction::determine_displacement_robustness_domain, "layout"_a, "spec"_a, "params"_a, - "stats"_a = nullptr); + &fiction::determine_displacement_robustness_domain, py::arg("layout"), py::arg("spec"), + py::arg("params"), py::arg("stats") = nullptr); } } // namespace detail @@ -42,7 +42,7 @@ void determine_displacement_robustness_domain(pybind11::module& m, const std::st inline void determine_displacement_robustness_domain(pybind11::module& m) { namespace py = pybind11; - using namespace pybind11::literals; + namespace py = pybind11; py::enum_::dimer_displacement_policy>( m, "dimer_displacement_policy") diff --git a/bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/energy_distribution.hpp b/bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/energy_distribution.hpp similarity index 89% rename from bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/energy_distribution.hpp rename to bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/energy_distribution.hpp index a74212724..2750e8a08 100644 --- a/bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/energy_distribution.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/energy_distribution.hpp @@ -22,9 +22,10 @@ namespace detail template void energy_distribution(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; - m.def("energy_distribution", &fiction::energy_distribution, "input_vec"_a, DOC(fiction_energy_distribution)); + m.def("energy_distribution", &fiction::energy_distribution, py::arg("input_vec"), + DOC(fiction_energy_distribution)); } } // namespace detail diff --git a/bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/exhaustive_ground_state_simulation.hpp b/bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/exhaustive_ground_state_simulation.hpp similarity index 83% rename from bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/exhaustive_ground_state_simulation.hpp rename to bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/exhaustive_ground_state_simulation.hpp index efae75d36..74ebca496 100644 --- a/bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/exhaustive_ground_state_simulation.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/exhaustive_ground_state_simulation.hpp @@ -24,10 +24,10 @@ namespace detail template void exhaustive_ground_state_simulation(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; - m.def("exhaustive_ground_state_simulation", &fiction::exhaustive_ground_state_simulation, "lyt"_a, - "params"_a = fiction::sidb_simulation_parameters{}, DOC(fiction_exhaustive_ground_state_simulation)); + m.def("exhaustive_ground_state_simulation", &fiction::exhaustive_ground_state_simulation, py::arg("lyt"), + py::arg("params") = fiction::sidb_simulation_parameters{}, DOC(fiction_exhaustive_ground_state_simulation)); } } // namespace detail diff --git a/bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/is_ground_state.hpp b/bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/is_ground_state.hpp similarity index 80% rename from bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/is_ground_state.hpp rename to bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/is_ground_state.hpp index dea884f74..bc87131a9 100644 --- a/bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/is_ground_state.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/is_ground_state.hpp @@ -22,10 +22,10 @@ namespace detail template void is_ground_state(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; - m.def("is_ground_state", &fiction::is_ground_state, "heuristic_results"_a, "exhaustive_results"_a, - DOC(fiction_is_ground_state)); + m.def("is_ground_state", &fiction::is_ground_state, py::arg("heuristic_results"), + py::arg("exhaustive_results"), DOC(fiction_is_ground_state)); } } // namespace detail diff --git a/bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/is_operational.hpp b/bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/is_operational.hpp similarity index 75% rename from bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/is_operational.hpp rename to bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/is_operational.hpp index 776013fe0..5d2329a78 100644 --- a/bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/is_operational.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/is_operational.hpp @@ -24,22 +24,25 @@ namespace detail template void is_operational(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; - m.def("is_operational", &fiction::is_operational, "lyt"_a, "spec"_a, - "params"_a = fiction::is_operational_params{}, "input_bdl_wire"_a = std::nullopt, - "output_bdl_wire"_a = std::nullopt, DOC(fiction_is_operational)); + m.def("is_operational", &fiction::is_operational, py::arg("lyt"), py::arg("spec"), + py::arg("params") = fiction::is_operational_params{}, py::arg("input_bdl_wire") = std::nullopt, + py::arg("output_bdl_wire") = std::nullopt, DOC(fiction_is_operational)); - m.def("operational_input_patterns", &fiction::operational_input_patterns, "lyt"_a, "spec"_a, - "params"_a = fiction::is_operational_params{}, DOC(fiction_operational_input_patterns)); + m.def("operational_input_patterns", &fiction::operational_input_patterns, py::arg("lyt"), + py::arg("spec"), py::arg("params") = fiction::is_operational_params{}, + DOC(fiction_operational_input_patterns)); - m.def("is_kink_induced_non_operational", &fiction::is_kink_induced_non_operational, "lyt"_a, "spec"_a, - "params"_a = fiction::is_operational_params{}, "input_bdl_wire"_a = std::nullopt, - "output_bdl_wire"_a = std::nullopt, DOC(fiction_is_kink_induced_non_operational)); + m.def("is_kink_induced_non_operational", &fiction::is_kink_induced_non_operational, py::arg("lyt"), + py::arg("spec"), py::arg("params") = fiction::is_operational_params{}, + py::arg("input_bdl_wire") = std::nullopt, py::arg("output_bdl_wire") = std::nullopt, + DOC(fiction_is_kink_induced_non_operational)); m.def("kink_induced_non_operational_input_patterns", - &fiction::kink_induced_non_operational_input_patterns, "lyt"_a, "spec"_a, - "params"_a = fiction::is_operational_params{}, DOC(fiction_kink_induced_non_operational_input_patterns)); + &fiction::kink_induced_non_operational_input_patterns, py::arg("lyt"), py::arg("spec"), + py::arg("params") = fiction::is_operational_params{}, + DOC(fiction_kink_induced_non_operational_input_patterns)); } } // namespace detail diff --git a/bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/maximum_defect_influence_position_and_distance.hpp b/bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/maximum_defect_influence_position_and_distance.hpp similarity index 93% rename from bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/maximum_defect_influence_position_and_distance.hpp rename to bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/maximum_defect_influence_position_and_distance.hpp index 5d195d64c..b9c5de057 100644 --- a/bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/maximum_defect_influence_position_and_distance.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/maximum_defect_influence_position_and_distance.hpp @@ -22,11 +22,11 @@ namespace detail template void maximum_defect_influence_distance(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; m.def("maximum_defect_influence_position_and_distance", - &fiction::maximum_defect_influence_position_and_distance, "lyt"_a, - "params"_a = fiction::maximum_defect_influence_distance_params{}, + &fiction::maximum_defect_influence_position_and_distance, py::arg("lyt"), + py::arg("params") = fiction::maximum_defect_influence_distance_params{}, DOC(fiction_maximum_defect_influence_position_and_distance)); } diff --git a/bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/minimum_energy.hpp b/bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/minimum_energy.hpp similarity index 93% rename from bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/minimum_energy.hpp rename to bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/minimum_energy.hpp index b837bba05..4dd3ae53c 100644 --- a/bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/minimum_energy.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/minimum_energy.hpp @@ -25,11 +25,11 @@ namespace detail template void minimum_energy(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; m.def( "minimum_energy", [](const std::vector& layouts) -> double - { return fiction::minimum_energy(layouts.cbegin(), layouts.cend()); }, "layouts"_a, + { return fiction::minimum_energy(layouts.cbegin(), layouts.cend()); }, py::arg("layouts"), DOC(fiction_minimum_energy)); } diff --git a/bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/occupation_probability_of_excited_states.hpp b/bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/occupation_probability_of_excited_states.hpp similarity index 76% rename from bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/occupation_probability_of_excited_states.hpp rename to bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/occupation_probability_of_excited_states.hpp index adbbe2b8f..26c61bbc9 100644 --- a/bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/occupation_probability_of_excited_states.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/occupation_probability_of_excited_states.hpp @@ -21,14 +21,14 @@ namespace detail void occupation_probability_of_excited_states(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; - m.def("occupation_probability_gate_based", &fiction::occupation_probability_gate_based, "energy_and_state_type"_a, - "temperature"_a, DOC(fiction_occupation_probability_gate_based)); + m.def("occupation_probability_gate_based", &fiction::occupation_probability_gate_based, + py::arg("energy_and_state_type"), py::arg("temperature"), DOC(fiction_occupation_probability_gate_based)); m.def("occupation_probability_non_gate_based", &fiction::occupation_probability_non_gate_based, - "energy_distribution"_a, - "temperature"_a); // TODO DOC(fiction_occupation_probability_non_gate_based) + py::arg("energy_distribution"), + py::arg("temperature")); // TODO DOC(fiction_occupation_probability_non_gate_based) } } // namespace detail diff --git a/bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/operational_domain.hpp b/bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/operational_domain.hpp similarity index 79% rename from bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/operational_domain.hpp rename to bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/operational_domain.hpp index ddee101a2..bcb416d19 100644 --- a/bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/operational_domain.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/operational_domain.hpp @@ -26,23 +26,23 @@ namespace detail template void operational_domain(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; - m.def("operational_domain_grid_search", &fiction::operational_domain_grid_search, "lyt"_a, "spec"_a, - "params"_a = fiction::operational_domain_params{}, "stats"_a = nullptr, + m.def("operational_domain_grid_search", &fiction::operational_domain_grid_search, py::arg("lyt"), + py::arg("spec"), py::arg("params") = fiction::operational_domain_params{}, py::arg("stats") = nullptr, DOC(fiction_operational_domain_grid_search)); - m.def("operational_domain_random_sampling", &fiction::operational_domain_random_sampling, "lyt"_a, - "spec"_a, "samples"_a, "params"_a = fiction::operational_domain_params{}, "stats"_a = nullptr, - DOC(fiction_operational_domain_random_sampling)); + m.def("operational_domain_random_sampling", &fiction::operational_domain_random_sampling, + py::arg("lyt"), py::arg("spec"), py::arg("samples"), py::arg("params") = fiction::operational_domain_params{}, + py::arg("stats") = nullptr, DOC(fiction_operational_domain_random_sampling)); - m.def("operational_domain_flood_fill", &fiction::operational_domain_flood_fill, "lyt"_a, "spec"_a, - "samples"_a, "params"_a = fiction::operational_domain_params{}, "stats"_a = nullptr, - DOC(fiction_operational_domain_flood_fill)); + m.def("operational_domain_flood_fill", &fiction::operational_domain_flood_fill, py::arg("lyt"), + py::arg("spec"), py::arg("samples"), py::arg("params") = fiction::operational_domain_params{}, + py::arg("stats") = nullptr, DOC(fiction_operational_domain_flood_fill)); - m.def("operational_domain_contour_tracing", &fiction::operational_domain_contour_tracing, "lyt"_a, - "spec"_a, "samples"_a, "params"_a = fiction::operational_domain_params{}, "stats"_a = nullptr, - DOC(fiction_operational_domain_contour_tracing)); + m.def("operational_domain_contour_tracing", &fiction::operational_domain_contour_tracing, + py::arg("lyt"), py::arg("spec"), py::arg("samples"), py::arg("params") = fiction::operational_domain_params{}, + py::arg("stats") = nullptr, DOC(fiction_operational_domain_contour_tracing)); } } // namespace detail @@ -50,15 +50,15 @@ void operational_domain(pybind11::module& m) inline void operational_domain(pybind11::module& m) { namespace py = pybind11; - using namespace pybind11::literals; + namespace py = pybind11; py::class_(m, "parameter_point", DOC(fiction_parameter_point)) .def(py::init<>(), DOC(fiction_parameter_point_parameter_point)) - .def(py::init>(), "values"_a, DOC(fiction_parameter_point_parameter_point_2)) + .def(py::init>(), py::arg("values"), DOC(fiction_parameter_point_parameter_point_2)) .def_readwrite("parameters", &fiction::parameter_point::parameters, DOC(fiction_parameter_point)) - .def(py::self == py::self, "other"_a, DOC(fiction_parameter_point_operator_eq)) - .def(py::self != py::self, "other"_a, DOC(fiction_parameter_point_operator_ne)) + .def(py::self == py::self, py::arg("other"), DOC(fiction_parameter_point_operator_eq)) + .def(py::self != py::self, py::arg("other"), DOC(fiction_parameter_point_operator_ne)) .def("__hash__", [](const fiction::parameter_point& self) { return std::hash{}(self); }) @@ -84,15 +84,16 @@ inline void operational_domain(pybind11::module& m) DOC(fiction_operational_domain_operational_values)) .def("get_value", - &fiction::operational_domain::get_value, "point"_a, - DOC(fiction_operational_domain_get_value)) + &fiction::operational_domain::get_value, + py::arg("point"), DOC(fiction_operational_domain_get_value)) ; py::class_(m, "operational_domain_value_range", DOC(fiction_operational_domain_value_range)) - .def(py::init(), "dimension"_a) - .def(py::init(), "dimension"_a, "min"_a, "max"_a, "step"_a) + .def(py::init(), py::arg("dimension")) + .def(py::init(), py::arg("dimension"), py::arg("min"), + py::arg("max"), py::arg("step")) .def_readwrite("dimension", &fiction::operational_domain_value_range::dimension, DOC(fiction_operational_domain_value_range_dimension)) .def_readwrite("min", &fiction::operational_domain_value_range::min, diff --git a/bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/quickexact.hpp b/bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/quickexact.hpp similarity index 91% rename from bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/quickexact.hpp rename to bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/quickexact.hpp index ec5235247..25833c05c 100644 --- a/bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/quickexact.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/quickexact.hpp @@ -23,10 +23,10 @@ namespace detail template void quickexact(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; - m.def("quickexact", &fiction::quickexact, "lyt"_a, - "params"_a = fiction::quickexact_params{}, DOC(fiction_quickexact)); + m.def("quickexact", &fiction::quickexact, py::arg("lyt"), + py::arg("params") = fiction::quickexact_params{}, DOC(fiction_quickexact)); } } // namespace detail @@ -35,7 +35,7 @@ inline void quickexact(pybind11::module& m) { // NOTE be careful with the order of the following calls! Python will resolve the first matching overload! namespace py = pybind11; - using namespace pybind11::literals; + namespace py = pybind11; py::enum_::automatic_base_number_detection>( m, "automatic_base_number_detection", DOC(fiction_quickexact_params_automatic_base_number_detection)) diff --git a/bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/quicksim.hpp b/bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/quicksim.hpp similarity index 89% rename from bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/quicksim.hpp rename to bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/quicksim.hpp index a01c00f27..f685372e0 100644 --- a/bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/quicksim.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/quicksim.hpp @@ -22,9 +22,10 @@ namespace detail template void quicksim(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; - m.def("quicksim", &fiction::quicksim, "lyt"_a, "params"_a = fiction::quicksim_params{}, DOC(fiction_quicksim)); + m.def("quicksim", &fiction::quicksim, py::arg("lyt"), py::arg("params") = fiction::quicksim_params{}, + DOC(fiction_quicksim)); } } // namespace detail diff --git a/bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/random_sidb_layout_generator.hpp b/bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/random_sidb_layout_generator.hpp similarity index 92% rename from bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/random_sidb_layout_generator.hpp rename to bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/random_sidb_layout_generator.hpp index f64aee4d4..1a330627a 100644 --- a/bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/random_sidb_layout_generator.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/random_sidb_layout_generator.hpp @@ -24,14 +24,15 @@ namespace detail template void random_layout_generator(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; - m.def("generate_random_sidb_layout", &fiction::generate_random_sidb_layout, "lyt_skeleton"_a, - "params"_a = fiction::generate_random_sidb_layout_params>{}, + m.def("generate_random_sidb_layout", &fiction::generate_random_sidb_layout, py::arg("lyt_skeleton"), + py::arg("params") = fiction::generate_random_sidb_layout_params>{}, DOC(fiction_generate_random_sidb_layout)); m.def("generate_multiple_random_sidb_layouts", &fiction::generate_multiple_random_sidb_layouts, - "lyt_skeleton"_a, "params"_a = fiction::generate_random_sidb_layout_params>{}, + py::arg("lyt_skeleton"), + py::arg("params") = fiction::generate_random_sidb_layout_params>{}, DOC(fiction_generate_multiple_random_sidb_layouts)); } @@ -40,7 +41,7 @@ void random_layout_generator(pybind11::module& m) inline void random_sidb_layout_generator(pybind11::module& m) { namespace py = pybind11; - using namespace pybind11::literals; + namespace py = pybind11; py::enum_::positive_charges>( m, "positive_charges", DOC(fiction_generate_random_sidb_layout_params_positive_charges)) diff --git a/bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/sidb_simulation_engine.hpp b/bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/sidb_simulation_engine.hpp similarity index 100% rename from bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/sidb_simulation_engine.hpp rename to bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/sidb_simulation_engine.hpp diff --git a/bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/sidb_simulation_parameters.hpp b/bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/sidb_simulation_parameters.hpp similarity index 90% rename from bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/sidb_simulation_parameters.hpp rename to bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/sidb_simulation_parameters.hpp index 85d5baed8..815b579e1 100644 --- a/bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/sidb_simulation_parameters.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/sidb_simulation_parameters.hpp @@ -22,12 +22,12 @@ namespace pyfiction inline void sidb_simulation_parameters(pybind11::module& m) { namespace py = pybind11; - using namespace pybind11::literals; + namespace py = pybind11; py::class_(m, "sidb_simulation_parameters", DOC(fiction_sidb_simulation_parameters)) - .def(py::init(), "base_number"_a = 3, - "mu_minus"_a = -0.32, "relative_permittivity"_a = 5.6, "screening_distance"_a = 5.0, + .def(py::init(), py::arg("base_number") = 3, + py::arg("mu_minus") = -0.32, py::arg("relative_permittivity") = 5.6, py::arg("screening_distance") = 5.0, DOC(fiction_sidb_simulation_parameters_sidb_simulation_parameters)) .def(py::init<>()) .def_readwrite("epsilon_r", &fiction::sidb_simulation_parameters::epsilon_r, diff --git a/bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/sidb_simulation_result.hpp b/bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/sidb_simulation_result.hpp similarity index 98% rename from bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/sidb_simulation_result.hpp rename to bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/sidb_simulation_result.hpp index 1fcfacfc2..b5ed86ec3 100644 --- a/bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/sidb_simulation_result.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/sidb_simulation_result.hpp @@ -26,7 +26,7 @@ template void sidb_simulation_result(pybind11::module& m, const std::string& lattice = "") { namespace py = pybind11; - using namespace pybind11::literals; + namespace py = pybind11; py::class_>(m, fmt::format("sidb_simulation_result{}", lattice).c_str(), DOC(fiction_sidb_simulation_result)) diff --git a/bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/time_to_solution.hpp b/bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/time_to_solution.hpp similarity index 86% rename from bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/time_to_solution.hpp rename to bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/time_to_solution.hpp index 6581bc362..e868dbaa6 100644 --- a/bindings/pyfiction/include/pyfiction/algorithms/simulation/sidb/time_to_solution.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/time_to_solution.hpp @@ -22,13 +22,14 @@ namespace detail template void time_to_solution(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; - m.def("time_to_solution", &fiction::time_to_solution, "lyt"_a, "quickim_params"_a, - "tts_params"_a = fiction::time_to_solution_params{}, "ps"_a = nullptr, DOC(fiction_time_to_solution)); + m.def("time_to_solution", &fiction::time_to_solution, py::arg("lyt"), py::arg("quickim_params"), + py::arg("tts_params") = fiction::time_to_solution_params{}, py::arg("ps") = nullptr, + DOC(fiction_time_to_solution)); m.def("time_to_solution_for_given_simulation_results", &fiction::time_to_solution_for_given_simulation_results, - "results_exact"_a, "results_heuristic"_a, "confidence_level"_a = 0.997, "ps"_a = nullptr, - DOC(fiction_time_to_solution_for_given_simulation_results)); + py::arg("results_exact"), py::arg("results_heuristic"), py::arg("confidence_level") = 0.997, + py::arg("ps") = nullptr, DOC(fiction_time_to_solution_for_given_simulation_results)); } } // namespace detail diff --git a/bindings/pyfiction/include/pyfiction/algorithms/verification/design_rule_violations.hpp b/bindings/mnt/pyfiction/include/pyfiction/algorithms/verification/design_rule_violations.hpp similarity index 95% rename from bindings/pyfiction/include/pyfiction/algorithms/verification/design_rule_violations.hpp rename to bindings/mnt/pyfiction/include/pyfiction/algorithms/verification/design_rule_violations.hpp index 6a42d1292..8c3be4c89 100644 --- a/bindings/pyfiction/include/pyfiction/algorithms/verification/design_rule_violations.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/algorithms/verification/design_rule_violations.hpp @@ -21,7 +21,7 @@ namespace detail template void gate_level_drvs(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; m.def( "gate_level_drvs", @@ -42,7 +42,7 @@ void gate_level_drvs(pybind11::module& m) return {stats.warnings, stats.drvs}; }, - "layout"_a, "params"_a = fiction::gate_level_drv_params{}, "print_report"_a = false, + py::arg("layout"), py::arg("params") = fiction::gate_level_drv_params{}, py::arg("print_report") = false, DOC(fiction_gate_level_drvs)); } diff --git a/bindings/pyfiction/include/pyfiction/algorithms/verification/equivalence_checking.hpp b/bindings/mnt/pyfiction/include/pyfiction/algorithms/verification/equivalence_checking.hpp similarity index 96% rename from bindings/pyfiction/include/pyfiction/algorithms/verification/equivalence_checking.hpp rename to bindings/mnt/pyfiction/include/pyfiction/algorithms/verification/equivalence_checking.hpp index 5e6ecb7c3..ff47b47f1 100644 --- a/bindings/pyfiction/include/pyfiction/algorithms/verification/equivalence_checking.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/algorithms/verification/equivalence_checking.hpp @@ -22,7 +22,7 @@ namespace detail template void equivalence_checking(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; m.def( "equivalence_checking", @@ -38,7 +38,8 @@ void equivalence_checking(pybind11::module& m) return stats.eq; }, - "specification"_a, "implementation"_a, "statistics"_a = nullptr, DOC(fiction_equivalence_checking)); + py::arg("specification"), py::arg("implementation"), py::arg("statistics") = nullptr, + DOC(fiction_equivalence_checking)); } } // namespace detail diff --git a/bindings/pyfiction/include/pyfiction/documentation.hpp b/bindings/mnt/pyfiction/include/pyfiction/documentation.hpp similarity index 100% rename from bindings/pyfiction/include/pyfiction/documentation.hpp rename to bindings/mnt/pyfiction/include/pyfiction/documentation.hpp diff --git a/bindings/pyfiction/include/pyfiction/inout/read_fgl_layout.hpp b/bindings/mnt/pyfiction/include/pyfiction/inout/read_fgl_layout.hpp similarity index 79% rename from bindings/pyfiction/include/pyfiction/inout/read_fgl_layout.hpp rename to bindings/mnt/pyfiction/include/pyfiction/inout/read_fgl_layout.hpp index 2ef0d30aa..65d445cca 100644 --- a/bindings/pyfiction/include/pyfiction/inout/read_fgl_layout.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/inout/read_fgl_layout.hpp @@ -21,7 +21,6 @@ namespace pyfiction inline void read_fgl_layout(pybind11::module& m) { namespace py = pybind11; - using namespace py::literals; py::register_exception(m, "fgl_parsing_error", PyExc_RuntimeError); @@ -32,12 +31,12 @@ inline void read_fgl_layout(pybind11::module& m) py_hexagonal_gate_layout (*read_hexagonal_fgl_layout_function_pointer)( const std::string_view&, const std::string_view&) = &fiction::read_fgl_layout; - m.def("read_cartesian_fgl_layout", read_cartesian_fgl_layout_function_pointer, "filename"_a, "layout_name"_a = "", - DOC(fiction_read_fgl_layout_3)); - m.def("read_shifted_cartesian_fgl_layout", read_shifted_cartesian_fgl_layout_function_pointer, "filename"_a, - "layout_name"_a = "", DOC(fiction_read_fgl_layout_3)); - m.def("read_hexagonal_fgl_layout", read_hexagonal_fgl_layout_function_pointer, "filename"_a, "layout_name"_a = "", - DOC(fiction_read_fgl_layout_3)); + m.def("read_cartesian_fgl_layout", read_cartesian_fgl_layout_function_pointer, py::arg("filename"), + py::arg("layout_name") = "", DOC(fiction_read_fgl_layout_3)); + m.def("read_shifted_cartesian_fgl_layout", read_shifted_cartesian_fgl_layout_function_pointer, py::arg("filename"), + py::arg("layout_name") = "", DOC(fiction_read_fgl_layout_3)); + m.def("read_hexagonal_fgl_layout", read_hexagonal_fgl_layout_function_pointer, py::arg("filename"), + py::arg("layout_name") = "", DOC(fiction_read_fgl_layout_3)); } } // namespace pyfiction diff --git a/bindings/pyfiction/include/pyfiction/inout/read_fqca_layout.hpp b/bindings/mnt/pyfiction/include/pyfiction/inout/read_fqca_layout.hpp similarity index 94% rename from bindings/pyfiction/include/pyfiction/inout/read_fqca_layout.hpp rename to bindings/mnt/pyfiction/include/pyfiction/inout/read_fqca_layout.hpp index 50bd371a7..1ec96a50e 100644 --- a/bindings/pyfiction/include/pyfiction/inout/read_fqca_layout.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/inout/read_fqca_layout.hpp @@ -23,12 +23,12 @@ namespace detail template void read_fqca_layout(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; Lyt (*read_fqca_layout_function_pointer)(const std::string_view&, const std::string_view&) = &fiction::read_fqca_layout; - m.def("read_fqca_layout", read_fqca_layout_function_pointer, "filename"_a, "layout_name"_a = "", + m.def("read_fqca_layout", read_fqca_layout_function_pointer, py::arg("filename"), py::arg("layout_name") = "", DOC(fiction_read_fqca_layout)); } diff --git a/bindings/pyfiction/include/pyfiction/inout/read_sqd_layout.hpp b/bindings/mnt/pyfiction/include/pyfiction/inout/read_sqd_layout.hpp similarity index 91% rename from bindings/pyfiction/include/pyfiction/inout/read_sqd_layout.hpp rename to bindings/mnt/pyfiction/include/pyfiction/inout/read_sqd_layout.hpp index 9da344f9d..ac32a00c4 100644 --- a/bindings/pyfiction/include/pyfiction/inout/read_sqd_layout.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/inout/read_sqd_layout.hpp @@ -24,7 +24,6 @@ template void read_sqd_layout(pybind11::module& m) { namespace py = pybind11; - using namespace py::literals; py::register_exception(m, "sqd_parsing_error", PyExc_RuntimeError); @@ -33,12 +32,12 @@ void read_sqd_layout(pybind11::module& m) if constexpr (fiction::is_sidb_lattice_100_v) { - m.def("read_sqd_layout_100", read_sqd_layout_function_pointer, "filename"_a, "layout_name"_a = "", + m.def("read_sqd_layout_100", read_sqd_layout_function_pointer, py::arg("filename"), py::arg("layout_name") = "", DOC(fiction_read_sqd_layout_3)); } else { - m.def("read_sqd_layout_111", read_sqd_layout_function_pointer, "filename"_a, "layout_name"_a = "", + m.def("read_sqd_layout_111", read_sqd_layout_function_pointer, py::arg("filename"), py::arg("layout_name") = "", DOC(fiction_read_sqd_layout_3)); } } diff --git a/bindings/pyfiction/include/pyfiction/inout/write_dot_layout.hpp b/bindings/mnt/pyfiction/include/pyfiction/inout/write_dot_layout.hpp similarity index 87% rename from bindings/pyfiction/include/pyfiction/inout/write_dot_layout.hpp rename to bindings/mnt/pyfiction/include/pyfiction/inout/write_dot_layout.hpp index 13c1764d9..c64edcab3 100644 --- a/bindings/pyfiction/include/pyfiction/inout/write_dot_layout.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/inout/write_dot_layout.hpp @@ -25,7 +25,7 @@ namespace detail template void write_dot_layout(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; m.def( "write_dot_layout", @@ -40,18 +40,18 @@ void write_dot_layout(pybind11::module& m) fiction::write_dot_layout>(lyt, filename); } }, - "layout"_a, "filename"_a, DOC(fiction_write_dot_layout)); + py::arg("layout"), py::arg("filename"), DOC(fiction_write_dot_layout)); } template void write_dot_network(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; m.def( "write_dot_network", [](const Ntk& ntk, const std::string_view& filename) - { mockturtle::write_dot(ntk, filename.data(), fiction::technology_dot_drawer{}); }, "network"_a, - "filename"_a); + { mockturtle::write_dot(ntk, filename.data(), fiction::technology_dot_drawer{}); }, py::arg("network"), + py::arg("filename")); } } // namespace detail diff --git a/bindings/pyfiction/include/pyfiction/inout/write_fgl_layout.hpp b/bindings/mnt/pyfiction/include/pyfiction/inout/write_fgl_layout.hpp similarity index 75% rename from bindings/pyfiction/include/pyfiction/inout/write_fgl_layout.hpp rename to bindings/mnt/pyfiction/include/pyfiction/inout/write_fgl_layout.hpp index 21b68fafd..4ef815b69 100644 --- a/bindings/pyfiction/include/pyfiction/inout/write_fgl_layout.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/inout/write_fgl_layout.hpp @@ -24,11 +24,12 @@ namespace detail template void write_fgl_layout(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; m.def( - "write_fgl_layout", [](const Lyt& lyt, const std::string_view& filename) - { fiction::write_fgl_layout(lyt, filename); }, "layout"_a, "filename"_a, DOC(fiction_write_fgl_layout_2)); + "write_fgl_layout", + [](const Lyt& lyt, const std::string_view& filename) { fiction::write_fgl_layout(lyt, filename); }, + py::arg("layout"), py::arg("filename"), DOC(fiction_write_fgl_layout_2)); } } // namespace detail diff --git a/bindings/pyfiction/include/pyfiction/inout/write_fqca_layout.hpp b/bindings/mnt/pyfiction/include/pyfiction/inout/write_fqca_layout.hpp similarity index 89% rename from bindings/pyfiction/include/pyfiction/inout/write_fqca_layout.hpp rename to bindings/mnt/pyfiction/include/pyfiction/inout/write_fqca_layout.hpp index be4165296..27c843e29 100644 --- a/bindings/pyfiction/include/pyfiction/inout/write_fqca_layout.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/inout/write_fqca_layout.hpp @@ -23,14 +23,14 @@ namespace detail template void write_fqca_layout(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; void (*write_fqca_layout_function_pointer)(const Lyt&, const std::string_view&, const fiction::write_fqca_layout_params) = &fiction::write_fqca_layout; - m.def("write_fqca_layout", write_fqca_layout_function_pointer, "layout"_a, "filename"_a, - "params"_a = fiction::write_fqca_layout_params{}, DOC(fiction_write_fqca_layout)); + m.def("write_fqca_layout", write_fqca_layout_function_pointer, py::arg("layout"), py::arg("filename"), + py::arg("params") = fiction::write_fqca_layout_params{}, DOC(fiction_write_fqca_layout)); } } // namespace detail diff --git a/bindings/pyfiction/include/pyfiction/inout/write_location_and_ground_state.hpp b/bindings/mnt/pyfiction/include/pyfiction/inout/write_location_and_ground_state.hpp similarity index 92% rename from bindings/pyfiction/include/pyfiction/inout/write_location_and_ground_state.hpp rename to bindings/mnt/pyfiction/include/pyfiction/inout/write_location_and_ground_state.hpp index 1dc4b5ebc..1add03912 100644 --- a/bindings/pyfiction/include/pyfiction/inout/write_location_and_ground_state.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/inout/write_location_and_ground_state.hpp @@ -25,12 +25,12 @@ namespace detail template void write_location_and_ground_state(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; m.def( "write_location_and_ground_state", [](const fiction::sidb_simulation_result& sim_result, const std::string_view& filename) - { fiction::write_location_and_ground_state(sim_result, filename); }, "sim_result"_a, "filename"_a, + { fiction::write_location_and_ground_state(sim_result, filename); }, py::arg("sim_result"), py::arg("filename"), DOC(fiction_write_location_and_ground_state)); } diff --git a/bindings/pyfiction/include/pyfiction/inout/write_operational_domain.hpp b/bindings/mnt/pyfiction/include/pyfiction/inout/write_operational_domain.hpp similarity index 92% rename from bindings/pyfiction/include/pyfiction/inout/write_operational_domain.hpp rename to bindings/mnt/pyfiction/include/pyfiction/inout/write_operational_domain.hpp index 5000afbd4..c3ddd718c 100644 --- a/bindings/pyfiction/include/pyfiction/inout/write_operational_domain.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/inout/write_operational_domain.hpp @@ -18,7 +18,6 @@ namespace pyfiction inline void write_operational_domain(pybind11::module& m) { namespace py = pybind11; - using namespace py::literals; py::enum_( m, "sample_writing_mode", DOC(fiction_write_operational_domain_params_sample_writing_mode)) @@ -45,8 +44,8 @@ inline void write_operational_domain(pybind11::module& m) const fiction::operational_domain&, const std::string_view&, const fiction::write_operational_domain_params&) = &fiction::write_operational_domain; - m.def("write_operational_domain", write_operational_domain_pointer, "opdom"_a, "filename"_a, - "params"_a = fiction::write_operational_domain_params{}, DOC(fiction_write_operational_domain)); + m.def("write_operational_domain", write_operational_domain_pointer, py::arg("opdom"), py::arg("filename"), + py::arg("params") = fiction::write_operational_domain_params{}, DOC(fiction_write_operational_domain)); } } // namespace pyfiction diff --git a/bindings/pyfiction/include/pyfiction/inout/write_qca_layout.hpp b/bindings/mnt/pyfiction/include/pyfiction/inout/write_qca_layout.hpp similarity index 87% rename from bindings/pyfiction/include/pyfiction/inout/write_qca_layout.hpp rename to bindings/mnt/pyfiction/include/pyfiction/inout/write_qca_layout.hpp index e3d486e2a..296a7c84c 100644 --- a/bindings/pyfiction/include/pyfiction/inout/write_qca_layout.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/inout/write_qca_layout.hpp @@ -20,7 +20,7 @@ namespace pyfiction inline void write_qca_layout(pybind11::module& m) { namespace py = pybind11; - using namespace pybind11::literals; + namespace py = pybind11; py::class_(m, "write_qca_layout_params", DOC(fiction_write_qca_layout_params)) .def(py::init<>()) @@ -33,8 +33,8 @@ inline void write_qca_layout(pybind11::module& m) fiction::write_qca_layout_params) = &fiction::write_qca_layout; - m.def("write_qca_layout", write_qca_layout_function_pointer, "layout"_a, "filename"_a, - "params"_a = fiction::write_qca_layout_params{}, DOC(fiction_write_qca_layout)); + m.def("write_qca_layout", write_qca_layout_function_pointer, py::arg("layout"), py::arg("filename"), + py::arg("params") = fiction::write_qca_layout_params{}, DOC(fiction_write_qca_layout)); } } // namespace pyfiction diff --git a/bindings/pyfiction/include/pyfiction/inout/write_qcc_layout.hpp b/bindings/mnt/pyfiction/include/pyfiction/inout/write_qcc_layout.hpp similarity index 63% rename from bindings/pyfiction/include/pyfiction/inout/write_qcc_layout.hpp rename to bindings/mnt/pyfiction/include/pyfiction/inout/write_qcc_layout.hpp index 2fcd3ab71..3d316d72c 100644 --- a/bindings/pyfiction/include/pyfiction/inout/write_qcc_layout.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/inout/write_qcc_layout.hpp @@ -19,11 +19,12 @@ namespace pyfiction inline void write_qcc_layout(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; m.def( - "write_qcc_layout", [](const py_inml_layout& lyt, const std::string_view& filename) - { fiction::write_qcc_layout(lyt, filename); }, "layout"_a, "filename"_a, DOC(fiction_write_qcc_layout)); + "write_qcc_layout", + [](const py_inml_layout& lyt, const std::string_view& filename) { fiction::write_qcc_layout(lyt, filename); }, + py::arg("layout"), py::arg("filename"), DOC(fiction_write_qcc_layout)); } } // namespace pyfiction diff --git a/bindings/pyfiction/include/pyfiction/inout/write_qll_layout.hpp b/bindings/mnt/pyfiction/include/pyfiction/inout/write_qll_layout.hpp similarity index 92% rename from bindings/pyfiction/include/pyfiction/inout/write_qll_layout.hpp rename to bindings/mnt/pyfiction/include/pyfiction/inout/write_qll_layout.hpp index aad7a9ebe..369d95fac 100644 --- a/bindings/pyfiction/include/pyfiction/inout/write_qll_layout.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/inout/write_qll_layout.hpp @@ -23,11 +23,11 @@ namespace detail template void write_qll_layout(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; void (*write_qll_layout_function_pointer)(const Lyt&, const std::string_view&) = &fiction::write_qll_layout; - m.def("write_qll_layout", write_qll_layout_function_pointer, "layout"_a, "filename"_a, + m.def("write_qll_layout", write_qll_layout_function_pointer, py::arg("layout"), py::arg("filename"), DOC(fiction_write_qll_layout)); } diff --git a/bindings/pyfiction/include/pyfiction/inout/write_sqd_layout.hpp b/bindings/mnt/pyfiction/include/pyfiction/inout/write_sqd_layout.hpp similarity index 93% rename from bindings/pyfiction/include/pyfiction/inout/write_sqd_layout.hpp rename to bindings/mnt/pyfiction/include/pyfiction/inout/write_sqd_layout.hpp index de6b1a53b..86fba0bb3 100644 --- a/bindings/pyfiction/include/pyfiction/inout/write_sqd_layout.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/inout/write_sqd_layout.hpp @@ -22,11 +22,11 @@ namespace detail template inline void write_sqd_layout(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; void (*write_sqd_layout_function_pointer)(const Lyt&, const std::string_view&) = &fiction::write_sqd_layout; - m.def("write_sqd_layout", write_sqd_layout_function_pointer, "layout"_a, "filename"_a, + m.def("write_sqd_layout", write_sqd_layout_function_pointer, py::arg("layout"), py::arg("filename"), DOC(fiction_write_sqd_layout)); } } // namespace detail diff --git a/bindings/pyfiction/include/pyfiction/inout/write_sqd_sim_result.hpp b/bindings/mnt/pyfiction/include/pyfiction/inout/write_sqd_sim_result.hpp similarity index 82% rename from bindings/pyfiction/include/pyfiction/inout/write_sqd_sim_result.hpp rename to bindings/mnt/pyfiction/include/pyfiction/inout/write_sqd_sim_result.hpp index 708289ee6..ad284ecf5 100644 --- a/bindings/pyfiction/include/pyfiction/inout/write_sqd_sim_result.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/inout/write_sqd_sim_result.hpp @@ -24,11 +24,12 @@ namespace detail template void write_sqd_sim_result(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; m.def( "write_sqd_sim_result", [](const fiction::sidb_simulation_result& lyt, const std::string_view& filename) - { fiction::write_sqd_sim_result(lyt, filename); }, "layout"_a, "filename"_a, DOC(fiction_write_sqd_sim_result)); + { fiction::write_sqd_sim_result(lyt, filename); }, py::arg("layout"), py::arg("filename"), + DOC(fiction_write_sqd_sim_result)); } } // namespace detail diff --git a/bindings/pyfiction/include/pyfiction/inout/write_svg_layout.hpp b/bindings/mnt/pyfiction/include/pyfiction/inout/write_svg_layout.hpp similarity index 90% rename from bindings/pyfiction/include/pyfiction/inout/write_svg_layout.hpp rename to bindings/mnt/pyfiction/include/pyfiction/inout/write_svg_layout.hpp index caf06b437..6ba7888cc 100644 --- a/bindings/pyfiction/include/pyfiction/inout/write_svg_layout.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/inout/write_svg_layout.hpp @@ -22,7 +22,7 @@ namespace detail template inline void write_sidb_layout_svg_impl(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; // Pointers to the original functions void (*write_sidb_layout_svg_pointer)(const Lyt&, const std::string_view&, @@ -30,8 +30,8 @@ inline void write_sidb_layout_svg_impl(pybind11::module& m) &fiction::write_sidb_layout_svg; // SiDB plot - m.def("write_sidb_layout_svg", write_sidb_layout_svg_pointer, "layout"_a, "filename"_a, - "ps"_a = fiction::write_sidb_layout_svg_params{}, DOC(fiction_write_sidb_layout_svg)); + m.def("write_sidb_layout_svg", write_sidb_layout_svg_pointer, py::arg("layout"), py::arg("filename"), + py::arg("ps") = fiction::write_sidb_layout_svg_params{}, DOC(fiction_write_sidb_layout_svg)); // Register the function to return an SVG as a string m.def( @@ -42,21 +42,21 @@ inline void write_sidb_layout_svg_impl(pybind11::module& m) fiction::write_sidb_layout_svg(layout, oss, params); // Write to the stream return oss.str(); // Return the string content }, - "layout"_a, "ps"_a = fiction::write_sidb_layout_svg_params{}, DOC(fiction_write_sidb_layout_svg)); + py::arg("layout"), py::arg("ps") = fiction::write_sidb_layout_svg_params{}, DOC(fiction_write_sidb_layout_svg)); } template inline void write_qca_layout_svg_impl(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; // QCA plot void (*write_qca_layout_svg_pointer)(const py_qca_layout&, const std::string_view&, const fiction::write_qca_layout_svg_params&) = &fiction::write_qca_layout_svg; - m.def("write_qca_layout_svg", write_qca_layout_svg_pointer, "layout"_a, "filename"_a, - "params"_a = fiction::write_qca_layout_svg_params{}, DOC(fiction_write_qca_layout_svg)); + m.def("write_qca_layout_svg", write_qca_layout_svg_pointer, py::arg("layout"), py::arg("filename"), + py::arg("params") = fiction::write_qca_layout_svg_params{}, DOC(fiction_write_qca_layout_svg)); } } // namespace detail @@ -64,7 +64,7 @@ inline void write_qca_layout_svg_impl(pybind11::module& m) void write_svg_layout(pybind11::module& m) { namespace py = pybind11; - using namespace pybind11::literals; + namespace py = pybind11; py::enum_(m, "color_mode", DOC(fiction_write_sidb_layout_svg_params_color_mode)) diff --git a/bindings/pyfiction/include/pyfiction/layouts/cartesian_layout.hpp b/bindings/mnt/pyfiction/include/pyfiction/layouts/cartesian_layout.hpp similarity index 64% rename from bindings/pyfiction/include/pyfiction/layouts/cartesian_layout.hpp rename to bindings/mnt/pyfiction/include/pyfiction/layouts/cartesian_layout.hpp index ee2a1e25b..0e9b9c1a4 100644 --- a/bindings/pyfiction/include/pyfiction/layouts/cartesian_layout.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/layouts/cartesian_layout.hpp @@ -23,82 +23,87 @@ namespace pyfiction inline void cartesian_layout(pybind11::module& m) { namespace py = pybind11; - using namespace pybind11::literals; + namespace py = pybind11; /** * Cartesian layout. */ py::class_(m, "cartesian_layout", DOC(fiction_cartesian_layout_overridden)) .def(py::init<>()) - .def(py::init&>(), "dimension"_a, + .def(py::init&>(), py::arg("dimension"), DOC(fiction_cartesian_layout_cartesian_layout)) .def( "coord", [](const py_cartesian_layout& layout, const int64_t x, const int64_t y, const int64_t z) - { return layout.coord(x, y, z); }, "x"_a, "y"_a, "z"_a = 0l, DOC(fiction_cartesian_layout_coord)) + { return layout.coord(x, y, z); }, py::arg("x"), py::arg("y"), py::arg("z") = 0l, + DOC(fiction_cartesian_layout_coord)) .def("x", &py_cartesian_layout::x, DOC(fiction_cartesian_layout_x)) .def("y", &py_cartesian_layout::y, DOC(fiction_cartesian_layout_y)) .def("z", &py_cartesian_layout::z, DOC(fiction_cartesian_layout_z)) .def("area", &py_cartesian_layout::area, DOC(fiction_cartesian_layout_area)) - .def("resize", &py_cartesian_layout::resize, "dimension"_a, DOC(fiction_cartesian_layout_resize)) - - .def("north", &py_cartesian_layout::north, "c"_a, DOC(fiction_cartesian_layout_north)) - .def("north_east", &py_cartesian_layout::north_east, "c"_a, DOC(fiction_cartesian_layout_north_east)) - .def("east", &py_cartesian_layout::east, "c"_a, DOC(fiction_cartesian_layout_east)) - .def("south_east", &py_cartesian_layout::south_east, "c"_a, DOC(fiction_cartesian_layout_south_east)) - .def("south", &py_cartesian_layout::south, "c"_a, DOC(fiction_cartesian_layout_south)) - .def("south_west", &py_cartesian_layout::south_west, "c"_a, DOC(fiction_cartesian_layout_south_west)) - .def("west", &py_cartesian_layout::west, "c"_a, DOC(fiction_cartesian_layout_west)) - .def("north_west", &py_cartesian_layout::north_west, "c"_a, DOC(fiction_cartesian_layout_north_west)) - .def("above", &py_cartesian_layout::above, "c"_a, DOC(fiction_cartesian_layout_above)) - .def("below", &py_cartesian_layout::below, "c"_a, DOC(fiction_cartesian_layout_below)) - - .def("is_north_of", &py_cartesian_layout::is_north_of, "c1"_a, "c2"_a, + .def("resize", &py_cartesian_layout::resize, py::arg("dimension"), DOC(fiction_cartesian_layout_resize)) + + .def("north", &py_cartesian_layout::north, py::arg("c"), DOC(fiction_cartesian_layout_north)) + .def("north_east", &py_cartesian_layout::north_east, py::arg("c"), DOC(fiction_cartesian_layout_north_east)) + .def("east", &py_cartesian_layout::east, py::arg("c"), DOC(fiction_cartesian_layout_east)) + .def("south_east", &py_cartesian_layout::south_east, py::arg("c"), DOC(fiction_cartesian_layout_south_east)) + .def("south", &py_cartesian_layout::south, py::arg("c"), DOC(fiction_cartesian_layout_south)) + .def("south_west", &py_cartesian_layout::south_west, py::arg("c"), DOC(fiction_cartesian_layout_south_west)) + .def("west", &py_cartesian_layout::west, py::arg("c"), DOC(fiction_cartesian_layout_west)) + .def("north_west", &py_cartesian_layout::north_west, py::arg("c"), DOC(fiction_cartesian_layout_north_west)) + .def("above", &py_cartesian_layout::above, py::arg("c"), DOC(fiction_cartesian_layout_above)) + .def("below", &py_cartesian_layout::below, py::arg("c"), DOC(fiction_cartesian_layout_below)) + + .def("is_north_of", &py_cartesian_layout::is_north_of, py::arg("c1"), py::arg("c2"), DOC(fiction_cartesian_layout_is_north_of)) - .def("is_east_of", &py_cartesian_layout::is_east_of, "c1"_a, "c2"_a, DOC(fiction_cartesian_layout_is_east_of)) - .def("is_south_of", &py_cartesian_layout::is_south_of, "c1"_a, "c2"_a, + .def("is_east_of", &py_cartesian_layout::is_east_of, py::arg("c1"), py::arg("c2"), + DOC(fiction_cartesian_layout_is_east_of)) + .def("is_south_of", &py_cartesian_layout::is_south_of, py::arg("c1"), py::arg("c2"), DOC(fiction_cartesian_layout_is_south_of)) - .def("is_west_of", &py_cartesian_layout::is_west_of, "c1"_a, "c2"_a, DOC(fiction_cartesian_layout_is_west_of)) - .def("is_adjacent_of", &py_cartesian_layout::is_adjacent_of, "c1"_a, "c2"_a, + .def("is_west_of", &py_cartesian_layout::is_west_of, py::arg("c1"), py::arg("c2"), + DOC(fiction_cartesian_layout_is_west_of)) + .def("is_adjacent_of", &py_cartesian_layout::is_adjacent_of, py::arg("c1"), py::arg("c2"), DOC(fiction_cartesian_layout_is_adjacent_of)) - .def("is_adjacent_elevation_of", &py_cartesian_layout::is_adjacent_elevation_of, "c1"_a, "c2"_a, + .def("is_adjacent_elevation_of", &py_cartesian_layout::is_adjacent_elevation_of, py::arg("c1"), py::arg("c2"), DOC(fiction_cartesian_layout_is_adjacent_elevation_of)) - .def("is_above", &py_cartesian_layout::is_above, "c1"_a, "c2"_a, DOC(fiction_cartesian_layout_is_above)) - .def("is_below", &py_cartesian_layout::is_below, "c1"_a, "c2"_a, DOC(fiction_cartesian_layout_is_below)) - .def("is_northwards_of", &py_cartesian_layout::is_northwards_of, "c1"_a, "c2"_a, + .def("is_above", &py_cartesian_layout::is_above, py::arg("c1"), py::arg("c2"), + DOC(fiction_cartesian_layout_is_above)) + .def("is_below", &py_cartesian_layout::is_below, py::arg("c1"), py::arg("c2"), + DOC(fiction_cartesian_layout_is_below)) + .def("is_northwards_of", &py_cartesian_layout::is_northwards_of, py::arg("c1"), py::arg("c2"), DOC(fiction_cartesian_layout_is_northwards_of)) - .def("is_eastwards_of", &py_cartesian_layout::is_eastwards_of, "c1"_a, "c2"_a, + .def("is_eastwards_of", &py_cartesian_layout::is_eastwards_of, py::arg("c1"), py::arg("c2"), DOC(fiction_cartesian_layout_is_eastwards_of)) - .def("is_southwards_of", &py_cartesian_layout::is_southwards_of, "c1"_a, "c2"_a, + .def("is_southwards_of", &py_cartesian_layout::is_southwards_of, py::arg("c1"), py::arg("c2"), DOC(fiction_cartesian_layout_is_southwards_of)) - .def("is_westwards_of", &py_cartesian_layout::is_westwards_of, "c1"_a, "c2"_a, + .def("is_westwards_of", &py_cartesian_layout::is_westwards_of, py::arg("c1"), py::arg("c2"), DOC(fiction_cartesian_layout_is_westwards_of)) - .def("is_at_northern_border", &py_cartesian_layout::is_at_northern_border, "c"_a, + .def("is_at_northern_border", &py_cartesian_layout::is_at_northern_border, py::arg("c"), DOC(fiction_cartesian_layout_is_at_northern_border)) - .def("is_at_eastern_border", &py_cartesian_layout::is_at_eastern_border, "c"_a, + .def("is_at_eastern_border", &py_cartesian_layout::is_at_eastern_border, py::arg("c"), DOC(fiction_cartesian_layout_is_at_eastern_border)) - .def("is_at_southern_border", &py_cartesian_layout::is_at_southern_border, "c"_a, + .def("is_at_southern_border", &py_cartesian_layout::is_at_southern_border, py::arg("c"), DOC(fiction_cartesian_layout_is_at_southern_border)) - .def("is_at_western_border", &py_cartesian_layout::is_at_western_border, "c"_a, + .def("is_at_western_border", &py_cartesian_layout::is_at_western_border, py::arg("c"), DOC(fiction_cartesian_layout_is_at_western_border)) - .def("is_at_any_border", &py_cartesian_layout::is_at_any_border, "c"_a, + .def("is_at_any_border", &py_cartesian_layout::is_at_any_border, py::arg("c"), DOC(fiction_cartesian_layout_is_at_any_border)) - .def("northern_border_of", &py_cartesian_layout::northern_border_of, "c"_a, + .def("northern_border_of", &py_cartesian_layout::northern_border_of, py::arg("c"), DOC(fiction_cartesian_layout_northern_border_of)) - .def("eastern_border_of", &py_cartesian_layout::eastern_border_of, "c"_a, + .def("eastern_border_of", &py_cartesian_layout::eastern_border_of, py::arg("c"), DOC(fiction_cartesian_layout_eastern_border_of)) - .def("southern_border_of", &py_cartesian_layout::southern_border_of, "c"_a, + .def("southern_border_of", &py_cartesian_layout::southern_border_of, py::arg("c"), DOC(fiction_cartesian_layout_southern_border_of)) - .def("western_border_of", &py_cartesian_layout::western_border_of, "c"_a, + .def("western_border_of", &py_cartesian_layout::western_border_of, py::arg("c"), DOC(fiction_cartesian_layout_western_border_of)) - .def("is_ground_layer", &py_cartesian_layout::is_ground_layer, "c"_a, + .def("is_ground_layer", &py_cartesian_layout::is_ground_layer, py::arg("c"), DOC(fiction_cartesian_layout_is_ground_layer)) - .def("is_crossing_layer", &py_cartesian_layout::is_crossing_layer, "c"_a, + .def("is_crossing_layer", &py_cartesian_layout::is_crossing_layer, py::arg("c"), DOC(fiction_cartesian_layout_is_crossing_layer)) - .def("is_within_bounds", &py_cartesian_layout::is_within_bounds, "c"_a, + .def("is_within_bounds", &py_cartesian_layout::is_within_bounds, py::arg("c"), DOC(fiction_cartesian_layout_is_within_bounds)) .def( @@ -121,9 +126,9 @@ inline void cartesian_layout(pybind11::module& m) return coords; }, DOC(fiction_cartesian_layout_ground_coordinates)) - .def("adjacent_coordinates", &py_cartesian_layout::adjacent_coordinates, "c"_a, + .def("adjacent_coordinates", &py_cartesian_layout::adjacent_coordinates, py::arg("c"), DOC(fiction_cartesian_layout_adjacent_coordinates)) - .def("adjacent_opposite_coordinates", &py_cartesian_layout::adjacent_opposite_coordinates, "c"_a, + .def("adjacent_opposite_coordinates", &py_cartesian_layout::adjacent_opposite_coordinates, py::arg("c"), DOC(fiction_cartesian_layout_adjacent_opposite_coordinates)) .def("__repr__", diff --git a/bindings/pyfiction/include/pyfiction/layouts/cell_level_layout.hpp b/bindings/mnt/pyfiction/include/pyfiction/layouts/cell_level_layout.hpp similarity index 93% rename from bindings/pyfiction/include/pyfiction/layouts/cell_level_layout.hpp rename to bindings/mnt/pyfiction/include/pyfiction/layouts/cell_level_layout.hpp index cc45a80ca..7a3312459 100644 --- a/bindings/pyfiction/include/pyfiction/layouts/cell_level_layout.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/layouts/cell_level_layout.hpp @@ -32,7 +32,7 @@ template void fcn_technology_cell_level_layout(pybind11::module& m) { namespace py = pybind11; - using namespace pybind11::literals; + namespace py = pybind11; // fetch technology name auto tech_name = std::string{fiction::tech_impl_name}; @@ -84,7 +84,7 @@ void fcn_technology_cell_level_layout(pybind11::module& m) fiction::clocked_layout>>>( m, fmt::format("{}_layout", tech_name).c_str(), DOC(fiction_cell_level_layout)) .def(py::init<>()) - .def(py::init&>(), "dimension"_a, + .def(py::init&>(), py::arg("dimension"), DOC(fiction_cell_level_layout_cell_level_layout)) .def(py::init( [](const fiction::aspect_ratio& dimension, @@ -100,20 +100,20 @@ void fcn_technology_cell_level_layout(pybind11::module& m) throw std::runtime_error("Given name does not refer to a supported clocking scheme"); }), - "dimension"_a, "clocking_scheme"_a = "2DDWave", "layout_name"_a = "", + py::arg("dimension"), py::arg("clocking_scheme") = "2DDWave", py::arg("layout_name") = "", DOC(fiction_cell_level_layout_cell_level_layout_2)) - .def("assign_cell_type", &py_cartesian_technology_cell_layout::assign_cell_type, "c"_a, "ct"_a, + .def("assign_cell_type", &py_cartesian_technology_cell_layout::assign_cell_type, py::arg("c"), py::arg("ct"), DOC(fiction_cell_level_layout_assign_cell_type)) - .def("get_cell_type", &py_cartesian_technology_cell_layout::get_cell_type, "c"_a, + .def("get_cell_type", &py_cartesian_technology_cell_layout::get_cell_type, py::arg("c"), DOC(fiction_cell_level_layout_get_cell_type)) - .def("is_empty_cell", &py_cartesian_technology_cell_layout::is_empty_cell, "c"_a, + .def("is_empty_cell", &py_cartesian_technology_cell_layout::is_empty_cell, py::arg("c"), DOC(fiction_cell_level_layout_is_empty_cell)) - .def("assign_cell_name", &py_cartesian_technology_cell_layout::assign_cell_name, "c"_a, "n"_a, + .def("assign_cell_name", &py_cartesian_technology_cell_layout::assign_cell_name, py::arg("c"), py::arg("n"), DOC(fiction_cell_level_layout_assign_cell_name)) - .def("get_cell_name", &py_cartesian_technology_cell_layout::get_cell_name, "c"_a, + .def("get_cell_name", &py_cartesian_technology_cell_layout::get_cell_name, py::arg("c"), DOC(fiction_cell_level_layout_get_cell_name)) - .def("set_layout_name", &py_cartesian_technology_cell_layout::set_layout_name, "name"_a, + .def("set_layout_name", &py_cartesian_technology_cell_layout::set_layout_name, py::arg("name"), DOC(fiction_cell_level_layout_set_layout_name)) .def("get_layout_name", &py_cartesian_technology_cell_layout::get_layout_name, DOC(fiction_cell_level_layout_get_layout_name)) @@ -121,8 +121,8 @@ void fcn_technology_cell_level_layout(pybind11::module& m) .def("is_empty", &py_cartesian_technology_cell_layout::is_empty, DOC(fiction_cell_level_layout_is_empty)) .def("num_pis", &py_cartesian_technology_cell_layout::num_pis, DOC(fiction_cell_level_layout_num_pis)) .def("num_pos", &py_cartesian_technology_cell_layout::num_pos, DOC(fiction_cell_level_layout_num_pos)) - .def("is_pi", &py_cartesian_technology_cell_layout::is_pi, "c"_a, DOC(fiction_cell_level_layout_is_pi)) - .def("is_po", &py_cartesian_technology_cell_layout::is_po, "c"_a, DOC(fiction_cell_level_layout_is_po)) + .def("is_pi", &py_cartesian_technology_cell_layout::is_pi, py::arg("c"), DOC(fiction_cell_level_layout_is_pi)) + .def("is_po", &py_cartesian_technology_cell_layout::is_po, py::arg("c"), DOC(fiction_cell_level_layout_is_po)) .def("cells", [](const py_cartesian_technology_cell_layout& lyt) diff --git a/bindings/pyfiction/include/pyfiction/layouts/clocked_layout.hpp b/bindings/mnt/pyfiction/include/pyfiction/layouts/clocked_layout.hpp similarity index 80% rename from bindings/pyfiction/include/pyfiction/layouts/clocked_layout.hpp rename to bindings/mnt/pyfiction/include/pyfiction/layouts/clocked_layout.hpp index 756be81e3..2486cf9cf 100644 --- a/bindings/pyfiction/include/pyfiction/layouts/clocked_layout.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/layouts/clocked_layout.hpp @@ -28,14 +28,14 @@ template void clocked_layout(pybind11::module& m, const std::string& topology) { namespace py = pybind11; - using namespace pybind11::literals; + namespace py = pybind11; /** * Clocked Cartesian layout. */ py::class_(m, fmt::format("clocked_{}_layout", topology).c_str(), DOC(fiction_clocked_layout)) .def(py::init<>()) - .def(py::init&>(), "dimension"_a, + .def(py::init&>(), py::arg("dimension"), DOC(fiction_clocked_layout_clocked_layout)) .def(py::init( [](const fiction::aspect_ratio& dimension, const std::string& scheme_name) @@ -47,31 +47,32 @@ void clocked_layout(pybind11::module& m, const std::string& topology) throw std::runtime_error("Given name does not refer to a supported clocking scheme"); }), - "dimension"_a, "clocking_scheme"_a = "2DDWave", DOC(fiction_clocked_layout_clocked_layout_2)) + py::arg("dimension"), py::arg("clocking_scheme") = "2DDWave", DOC(fiction_clocked_layout_clocked_layout_2)) - .def("assign_clock_number", &ClockedLyt::assign_clock_number, "cz"_a, "cn"_a, + .def("assign_clock_number", &ClockedLyt::assign_clock_number, py::arg("cz"), py::arg("cn"), DOC(fiction_clocked_layout_assign_clock_number)) - .def("get_clock_number", &ClockedLyt::get_clock_number, "cz"_a, DOC(fiction_clocked_layout_get_clock_number)) + .def("get_clock_number", &ClockedLyt::get_clock_number, py::arg("cz"), + DOC(fiction_clocked_layout_get_clock_number)) .def("num_clocks", &ClockedLyt::num_clocks, DOC(fiction_clocked_layout_num_clocks)) .def("is_regularly_clocked", &ClockedLyt::is_regularly_clocked, DOC(fiction_clocked_layout_is_regularly_clocked)) - .def("is_clocking_scheme", &ClockedLyt::is_clocking_scheme, "name"_a, + .def("is_clocking_scheme", &ClockedLyt::is_clocking_scheme, py::arg("name"), DOC(fiction_clocked_layout_is_clocking_scheme)) - .def("is_incoming_clocked", &ClockedLyt::is_incoming_clocked, "cz1"_a, "cz2"_a, + .def("is_incoming_clocked", &ClockedLyt::is_incoming_clocked, py::arg("cz1"), py::arg("cz2"), DOC(fiction_clocked_layout_is_incoming_clocked)) - .def("is_outgoing_clocked", &ClockedLyt::is_outgoing_clocked, "cz1"_a, "cz2"_a, + .def("is_outgoing_clocked", &ClockedLyt::is_outgoing_clocked, py::arg("cz1"), py::arg("cz2"), DOC(fiction_clocked_layout_is_outgoing_clocked)) - .def("incoming_clocked_zones", &ClockedLyt::incoming_clocked_zones, "cz"_a, + .def("incoming_clocked_zones", &ClockedLyt::incoming_clocked_zones, py::arg("cz"), DOC(fiction_clocked_layout_incoming_clocked_zones)) - .def("outgoing_clocked_zones", &ClockedLyt::outgoing_clocked_zones, "cz"_a, + .def("outgoing_clocked_zones", &ClockedLyt::outgoing_clocked_zones, py::arg("cz"), DOC(fiction_clocked_layout_outgoing_clocked_zones)) - .def("in_degree", &ClockedLyt::in_degree, "cz"_a, DOC(fiction_clocked_layout_in_degree)) - .def("out_degree", &ClockedLyt::out_degree, "cz"_a, DOC(fiction_clocked_layout_out_degree)) - .def("degree", &ClockedLyt::degree, "cz"_a, DOC(fiction_clocked_layout_degree)) + .def("in_degree", &ClockedLyt::in_degree, py::arg("cz"), DOC(fiction_clocked_layout_in_degree)) + .def("out_degree", &ClockedLyt::out_degree, py::arg("cz"), DOC(fiction_clocked_layout_out_degree)) + .def("degree", &ClockedLyt::degree, py::arg("cz"), DOC(fiction_clocked_layout_degree)) .def("__repr__", [](const ClockedLyt& lyt) -> std::string diff --git a/bindings/pyfiction/include/pyfiction/layouts/coordinates.hpp b/bindings/mnt/pyfiction/include/pyfiction/layouts/coordinates.hpp similarity index 70% rename from bindings/pyfiction/include/pyfiction/layouts/coordinates.hpp rename to bindings/mnt/pyfiction/include/pyfiction/layouts/coordinates.hpp index 91d091043..360e9896b 100644 --- a/bindings/pyfiction/include/pyfiction/layouts/coordinates.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/layouts/coordinates.hpp @@ -32,15 +32,15 @@ namespace pyfiction inline void offset_coordinate(pybind11::module& m) { namespace py = pybind11; - using namespace pybind11::literals; + namespace py = pybind11; py::class_(m, "offset_coordinate", DOC(fiction_offset_ucoord_t)) .def(py::init<>(), DOC(fiction_offset_ucoord_t_ucoord_t)) - .def(py::init(), "int_repr"_a, DOC(fiction_offset_ucoord_t_ucoord_t_4)) + .def(py::init(), py::arg("int_repr"), DOC(fiction_offset_ucoord_t_ucoord_t_4)) .def(py::init(), - "x"_a, "y"_a, "z"_a = 0, DOC(fiction_offset_ucoord_t_ucoord_t_2)) - .def(py::init(), "c"_a) + py::arg("x"), py::arg("y"), py::arg("z") = 0, DOC(fiction_offset_ucoord_t_ucoord_t_2)) + .def(py::init(), py::arg("c")) .def(py::init( [](const py::tuple& t) { @@ -57,7 +57,7 @@ inline void offset_coordinate(pybind11::module& m) throw std::runtime_error("Wrong number of dimensions provided for coordinate"); }), - "tuple_repr"_a) + py::arg("tuple_repr")) .def_property( "x", [](py_offset_coordinate& self) -> decltype(self.x) { return self.x; }, @@ -72,12 +72,12 @@ inline void offset_coordinate(pybind11::module& m) [](py_offset_coordinate& self, const decltype(self.z) value) { self.z = value; }, DOC(fiction_offset_ucoord_t_z)) - .def(py::self == py::self, "other"_a, DOC(fiction_offset_ucoord_t_operator_eq)) - .def(py::self != py::self, "other"_a, DOC(fiction_offset_ucoord_t_operator_ne)) - .def(py::self < py::self, "other"_a, DOC(fiction_offset_ucoord_t_operator_lt)) - .def(py::self > py::self, "other"_a, DOC(fiction_offset_ucoord_t_operator_gt)) - .def(py::self <= py::self, "other"_a, DOC(fiction_offset_ucoord_t_operator_le)) - .def(py::self >= py::self, "other"_a, DOC(fiction_offset_ucoord_t_operator_ge)) + .def(py::self == py::self, py::arg("other"), DOC(fiction_offset_ucoord_t_operator_eq)) + .def(py::self != py::self, py::arg("other"), DOC(fiction_offset_ucoord_t_operator_ne)) + .def(py::self < py::self, py::arg("other"), DOC(fiction_offset_ucoord_t_operator_lt)) + .def(py::self > py::self, py::arg("other"), DOC(fiction_offset_ucoord_t_operator_gt)) + .def(py::self <= py::self, py::arg("other"), DOC(fiction_offset_ucoord_t_operator_le)) + .def(py::self >= py::self, py::arg("other"), DOC(fiction_offset_ucoord_t_operator_ge)) .def("__repr__", &py_offset_coordinate::str, DOC(fiction_offset_ucoord_t_str)) .def("__hash__", [](const py_offset_coordinate& self) { return std::hash{}(self); }) @@ -93,14 +93,14 @@ inline void offset_coordinate(pybind11::module& m) inline void cube_coordinate(pybind11::module& m) { namespace py = pybind11; - using namespace pybind11::literals; + namespace py = pybind11; py::class_(m, "cube_coordinate", DOC(fiction_cube_coord_t)) .def(py::init<>(), DOC(fiction_cube_coord_t_coord_t)) .def(py::init(), - "x"_a, "y"_a, "z"_a = 0, DOC(fiction_cube_coord_t_coord_t_2)) - .def(py::init(), "c"_a) + py::arg("x"), py::arg("y"), py::arg("z") = 0, DOC(fiction_cube_coord_t_coord_t_2)) + .def(py::init(), py::arg("c")) .def(py::init( [](const py::tuple& t) { @@ -117,7 +117,7 @@ inline void cube_coordinate(pybind11::module& m) throw std::runtime_error("Wrong number of dimensions provided for coordinate"); }), - "tuple_repr"_a) + py::arg("tuple_repr")) .def_property( "x", [](py_cube_coordinate& self) -> decltype(self.x) { return self.x; }, @@ -129,12 +129,12 @@ inline void cube_coordinate(pybind11::module& m) "z", [](py_cube_coordinate& self) -> decltype(self.z) { return self.z; }, [](py_cube_coordinate& self, const decltype(self.z) value) { self.z = value; }, DOC(fiction_cube_coord_t_z)) - .def(py::self == py::self, "other"_a, DOC(fiction_cube_coord_t_operator_eq)) - .def(py::self != py::self, "other"_a, DOC(fiction_cube_coord_t_operator_ne)) - .def(py::self < py::self, "other"_a, DOC(fiction_cube_coord_t_operator_lt)) - .def(py::self > py::self, "other"_a, DOC(fiction_cube_coord_t_operator_gt)) - .def(py::self <= py::self, "other"_a, DOC(fiction_cube_coord_t_operator_le)) - .def(py::self >= py::self, "other"_a, DOC(fiction_cube_coord_t_operator_ge)) + .def(py::self == py::self, py::arg("other"), DOC(fiction_cube_coord_t_operator_eq)) + .def(py::self != py::self, py::arg("other"), DOC(fiction_cube_coord_t_operator_ne)) + .def(py::self < py::self, py::arg("other"), DOC(fiction_cube_coord_t_operator_lt)) + .def(py::self > py::self, py::arg("other"), DOC(fiction_cube_coord_t_operator_gt)) + .def(py::self <= py::self, py::arg("other"), DOC(fiction_cube_coord_t_operator_le)) + .def(py::self >= py::self, py::arg("other"), DOC(fiction_cube_coord_t_operator_ge)) .def("__repr__", &py_cube_coordinate::str, DOC(fiction_cube_coord_t_str)) .def("__hash__", [](const py_cube_coordinate& self) { return std::hash{}(self); }) @@ -150,14 +150,14 @@ inline void cube_coordinate(pybind11::module& m) inline void siqad_coordinate(pybind11::module& m) { namespace py = pybind11; - using namespace pybind11::literals; + namespace py = pybind11; py::class_(m, "siqad_coordinate", DOC(fiction_siqad_coord_t)) .def(py::init<>(), DOC(fiction_siqad_coord_t_coord_t)) .def(py::init(), - "x"_a, "y"_a, "z"_a = 0, DOC(fiction_siqad_coord_t_coord_t_2)) - .def(py::init(), "c"_a) + py::arg("x"), py::arg("y"), py::arg("z") = 0, DOC(fiction_siqad_coord_t_coord_t_2)) + .def(py::init(), py::arg("c")) .def(py::init( [](const py::tuple& t) { @@ -174,7 +174,7 @@ inline void siqad_coordinate(pybind11::module& m) throw std::runtime_error("Wrong number of dimensions provided for coordinate"); }), - "tuple_repr"_a) + py::arg("tuple_repr")) .def_property( "x", [](py_siqad_coordinate& self) -> decltype(self.x) { return self.x; }, @@ -189,12 +189,12 @@ inline void siqad_coordinate(pybind11::module& m) [](py_siqad_coordinate& self, const decltype(self.z) value) { self.z = value; }, DOC(fiction_siqad_coord_t_z)) - .def(py::self == py::self, "other"_a, DOC(fiction_siqad_coord_t_operator_eq)) - .def(py::self != py::self, "other"_a, DOC(fiction_siqad_coord_t_operator_ne)) - .def(py::self < py::self, "other"_a, DOC(fiction_siqad_coord_t_operator_lt)) - .def(py::self > py::self, "other"_a, DOC(fiction_siqad_coord_t_operator_gt)) - .def(py::self <= py::self, "other"_a, DOC(fiction_siqad_coord_t_operator_le)) - .def(py::self >= py::self, "other"_a, DOC(fiction_siqad_coord_t_operator_ge)) + .def(py::self == py::self, py::arg("other"), DOC(fiction_siqad_coord_t_operator_eq)) + .def(py::self != py::self, py::arg("other"), DOC(fiction_siqad_coord_t_operator_ne)) + .def(py::self < py::self, py::arg("other"), DOC(fiction_siqad_coord_t_operator_lt)) + .def(py::self > py::self, py::arg("other"), DOC(fiction_siqad_coord_t_operator_gt)) + .def(py::self <= py::self, py::arg("other"), DOC(fiction_siqad_coord_t_operator_le)) + .def(py::self >= py::self, py::arg("other"), DOC(fiction_siqad_coord_t_operator_ge)) .def("__repr__", &py_siqad_coordinate::str, DOC(fiction_siqad_coord_t_str)) .def("__hash__", [](const py_siqad_coordinate& self) { return std::hash{}(self); }) @@ -206,24 +206,24 @@ inline void siqad_coordinate(pybind11::module& m) inline void coordinate_utility(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; - m.def("offset_area", &fiction::area, "coord"_a, DOC(fiction_area)); - m.def("cube_area", &fiction::area, "coord"_a, DOC(fiction_area)); - m.def("siqad_area", &fiction::area, "coord"_a, DOC(fiction_area)); + m.def("offset_area", &fiction::area, py::arg("coord"), DOC(fiction_area)); + m.def("cube_area", &fiction::area, py::arg("coord"), DOC(fiction_area)); + m.def("siqad_area", &fiction::area, py::arg("coord"), DOC(fiction_area)); - m.def("offset_volume", &fiction::volume, "coord"_a, DOC(fiction_volume)); - m.def("cube_volume", &fiction::volume, "coord"_a, DOC(fiction_volume)); - m.def("siqad_volume", &fiction::volume, "coord"_a, DOC(fiction_volume)); + m.def("offset_volume", &fiction::volume, py::arg("coord"), DOC(fiction_volume)); + m.def("cube_volume", &fiction::volume, py::arg("coord"), DOC(fiction_volume)); + m.def("siqad_volume", &fiction::volume, py::arg("coord"), DOC(fiction_volume)); - m.def("to_offset_coord", &fiction::siqad::to_fiction_coord, "coord"_a, + m.def("to_offset_coord", &fiction::siqad::to_fiction_coord, py::arg("coord"), DOC(fiction_siqad_to_fiction_coord)); - m.def("to_cube_coord", &fiction::siqad::to_fiction_coord, "coord"_a, + m.def("to_cube_coord", &fiction::siqad::to_fiction_coord, py::arg("coord"), DOC(fiction_siqad_to_fiction_coord)); - m.def("to_siqad_coord", &fiction::siqad::to_siqad_coord, "coord"_a, + m.def("to_siqad_coord", &fiction::siqad::to_siqad_coord, py::arg("coord"), DOC(fiction_siqad_to_siqad_coord)); - m.def("to_siqad_coord", &fiction::siqad::to_siqad_coord, "coord"_a, + m.def("to_siqad_coord", &fiction::siqad::to_siqad_coord, py::arg("coord"), DOC(fiction_siqad_to_siqad_coord)); } diff --git a/bindings/pyfiction/include/pyfiction/layouts/gate_level_layout.hpp b/bindings/mnt/pyfiction/include/pyfiction/layouts/gate_level_layout.hpp similarity index 73% rename from bindings/pyfiction/include/pyfiction/layouts/gate_level_layout.hpp rename to bindings/mnt/pyfiction/include/pyfiction/layouts/gate_level_layout.hpp index 1f463e284..2ee16d208 100644 --- a/bindings/pyfiction/include/pyfiction/layouts/gate_level_layout.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/layouts/gate_level_layout.hpp @@ -29,11 +29,11 @@ template void gate_level_layout(pybind11::module& m, const std::string& topology) { namespace py = pybind11; - using namespace pybind11::literals; + namespace py = pybind11; py::class_(m, fmt::format("{}_gate_layout", topology).c_str(), DOC(fiction_gate_level_layout)) .def(py::init<>()) - .def(py::init&>(), "dimension"_a, + .def(py::init&>(), py::arg("dimension"), DOC(fiction_gate_level_layout_gate_level_layout)) .def(py::init( [](const fiction::aspect_ratio& dimension, const std::string& scheme_name, @@ -46,17 +46,17 @@ void gate_level_layout(pybind11::module& m, const std::string& topology) throw std::runtime_error("Given name does not refer to a supported clocking scheme"); }), - "dimension"_a, "clocking_scheme"_a = "2DDWave", "layout_name"_a = "", + py::arg("dimension"), py::arg("clocking_scheme") = "2DDWave", py::arg("layout_name") = "", DOC(fiction_gate_level_layout_gate_level_layout_2)) - .def("create_pi", &GateLyt::create_pi, "name"_a = std::string{}, "t"_a = fiction::tile{}, + .def("create_pi", &GateLyt::create_pi, py::arg("name") = std::string{}, py::arg("t") = fiction::tile{}, DOC(fiction_gate_level_layout_create_pi)) - .def("create_po", &GateLyt::create_po, "s"_a, "name"_a = std::string{}, "t"_a = fiction::tile{}, - DOC(fiction_gate_level_layout_create_po)) - .def("is_pi", &GateLyt::is_pi, "n"_a, DOC(fiction_gate_level_layout_is_pi)) - .def("is_po", &GateLyt::is_po, "n"_a, DOC(fiction_gate_level_layout_is_po)) - .def("is_pi_tile", &GateLyt::is_pi_tile, "t"_a, DOC(fiction_gate_level_layout_is_pi_tile)) - .def("is_po_tile", &GateLyt::is_po_tile, "t"_a, DOC(fiction_gate_level_layout_is_po_tile)) + .def("create_po", &GateLyt::create_po, py::arg("s"), py::arg("name") = std::string{}, + py::arg("t") = fiction::tile{}, DOC(fiction_gate_level_layout_create_po)) + .def("is_pi", &GateLyt::is_pi, py::arg("n"), DOC(fiction_gate_level_layout_is_pi)) + .def("is_po", &GateLyt::is_po, py::arg("n"), DOC(fiction_gate_level_layout_is_po)) + .def("is_pi_tile", &GateLyt::is_pi_tile, py::arg("t"), DOC(fiction_gate_level_layout_is_pi_tile)) + .def("is_po_tile", &GateLyt::is_po_tile, py::arg("t"), DOC(fiction_gate_level_layout_is_po_tile)) .def("is_inv", &GateLyt::is_inv, DOC(fiction_gate_level_layout_is_inv)) .def("is_and", &GateLyt::is_and, DOC(fiction_gate_level_layout_is_and)) @@ -69,36 +69,39 @@ void gate_level_layout(pybind11::module& m, const std::string& topology) .def("is_fanout", &GateLyt::is_fanout, DOC(fiction_gate_level_layout_is_fanout)) .def("is_wire", &GateLyt::is_wire, DOC(fiction_gate_level_layout_is_wire)) - .def("set_layout_name", &GateLyt::set_layout_name, "name"_a, DOC(fiction_gate_level_layout_set_layout_name)) + .def("set_layout_name", &GateLyt::set_layout_name, py::arg("name"), + DOC(fiction_gate_level_layout_set_layout_name)) .def("get_layout_name", &GateLyt::get_layout_name, DOC(fiction_gate_level_layout_get_layout_name)) - .def("set_input_name", &GateLyt::set_input_name, "index"_a, "name"_a, + .def("set_input_name", &GateLyt::set_input_name, py::arg("index"), py::arg("name"), DOC(fiction_gate_level_layout_set_input_name)) - .def("get_input_name", &GateLyt::get_input_name, "index"_a, DOC(fiction_gate_level_layout_get_input_name)) - .def("set_output_name", &GateLyt::set_output_name, "index"_a, "name"_a, + .def("get_input_name", &GateLyt::get_input_name, py::arg("index"), + DOC(fiction_gate_level_layout_get_input_name)) + .def("set_output_name", &GateLyt::set_output_name, py::arg("index"), py::arg("name"), DOC(fiction_gate_level_layout_set_output_name)) - .def("get_output_name", &GateLyt::get_output_name, "index"_a, DOC(fiction_gate_level_layout_get_output_name)) + .def("get_output_name", &GateLyt::get_output_name, py::arg("index"), + DOC(fiction_gate_level_layout_get_output_name)) .def( "get_name", [](const GateLyt& layout, const typename GateLyt::signal& signal) - { return layout.get_name(signal); }, "s"_a, DOC(fiction_gate_level_layout_get_name)) + { return layout.get_name(signal); }, py::arg("s"), DOC(fiction_gate_level_layout_get_name)) - .def("create_buf", &GateLyt::create_buf, "a"_a, "t"_a = fiction::tile{}, + .def("create_buf", &GateLyt::create_buf, py::arg("a"), py::arg("t") = fiction::tile{}, DOC(fiction_gate_level_layout_create_buf)) - .def("create_not", &GateLyt::create_not, "a"_a, "t"_a = fiction::tile{}, + .def("create_not", &GateLyt::create_not, py::arg("a"), py::arg("t") = fiction::tile{}, DOC(fiction_gate_level_layout_create_not)) - .def("create_and", &GateLyt::create_and, "a"_a, "b"_a, "t"_a = fiction::tile{}, + .def("create_and", &GateLyt::create_and, py::arg("a"), py::arg("b"), py::arg("t") = fiction::tile{}, DOC(fiction_gate_level_layout_create_and)) - .def("create_nand", &GateLyt::create_nand, "a"_a, "b"_a, "t"_a = fiction::tile{}, + .def("create_nand", &GateLyt::create_nand, py::arg("a"), py::arg("b"), py::arg("t") = fiction::tile{}, DOC(fiction_gate_level_layout_create_nand)) - .def("create_or", &GateLyt::create_or, "a"_a, "b"_a, "t"_a = fiction::tile{}, + .def("create_or", &GateLyt::create_or, py::arg("a"), py::arg("b"), py::arg("t") = fiction::tile{}, DOC(fiction_gate_level_layout_create_or)) - .def("create_nor", &GateLyt::create_nor, "a"_a, "b"_a, "t"_a = fiction::tile{}, + .def("create_nor", &GateLyt::create_nor, py::arg("a"), py::arg("b"), py::arg("t") = fiction::tile{}, DOC(fiction_gate_level_layout_create_nor)) - .def("create_xor", &GateLyt::create_xor, "a"_a, "b"_a, "t"_a = fiction::tile{}, + .def("create_xor", &GateLyt::create_xor, py::arg("a"), py::arg("b"), py::arg("t") = fiction::tile{}, DOC(fiction_gate_level_layout_create_xor)) - .def("create_xnor", &GateLyt::create_xnor, "a"_a, "b"_a, "t"_a = fiction::tile{}, + .def("create_xnor", &GateLyt::create_xnor, py::arg("a"), py::arg("b"), py::arg("t") = fiction::tile{}, DOC(fiction_gate_level_layout_create_xnor)) - .def("create_maj", &GateLyt::create_maj, "a"_a, "b"_a, "c"_a, "t"_a = fiction::tile{}, - DOC(fiction_gate_level_layout_create_maj)) + .def("create_maj", &GateLyt::create_maj, py::arg("a"), py::arg("b"), py::arg("c"), + py::arg("t") = fiction::tile{}, DOC(fiction_gate_level_layout_create_maj)) .def("num_pis", &GateLyt::num_pis, DOC(fiction_gate_level_layout_num_pis)) .def("num_pos", &GateLyt::num_pos, DOC(fiction_gate_level_layout_num_pos)) @@ -109,28 +112,28 @@ void gate_level_layout(pybind11::module& m, const std::string& topology) .def( "fanin_size", [](const GateLyt& layout, const uint64_t node) - { return layout.template fanin_size(static_cast(node)); }, "n"_a, + { return layout.template fanin_size(static_cast(node)); }, py::arg("n"), DOC(fiction_gate_level_layout_fanin_size)) .def( "fanout_size", [](const GateLyt& layout, const uint64_t node) - { return layout.template fanout_size(static_cast(node)); }, "n"_a, + { return layout.template fanout_size(static_cast(node)); }, py::arg("n"), DOC(fiction_gate_level_layout_fanout_size)) .def( "get_node", [](const GateLyt& layout, const py_offset_coordinate& coordinate) - { return layout.get_node(coordinate); }, "t"_a, DOC(fiction_gate_level_layout_get_node)) - .def("get_tile", &GateLyt::get_tile, "n"_a, DOC(fiction_gate_level_layout_get_tile)) - .def("make_signal", &GateLyt::make_signal, "n"_a, DOC(fiction_gate_level_layout_make_signal)) + { return layout.get_node(coordinate); }, py::arg("t"), DOC(fiction_gate_level_layout_get_node)) + .def("get_tile", &GateLyt::get_tile, py::arg("n"), DOC(fiction_gate_level_layout_get_tile)) + .def("make_signal", &GateLyt::make_signal, py::arg("n"), DOC(fiction_gate_level_layout_make_signal)) - .def("move_node", &GateLyt::move_node, "n"_a, "t"_a, "new_children"_a = std::vector{}, - DOC(fiction_gate_level_layout_move_node)) + .def("move_node", &GateLyt::move_node, py::arg("n"), py::arg("t"), + py::arg("new_children") = std::vector{}, DOC(fiction_gate_level_layout_move_node)) - .def("clear_tile", &GateLyt::clear_tile, "t"_a, DOC(fiction_gate_level_layout_clear_tile)) + .def("clear_tile", &GateLyt::clear_tile, py::arg("t"), DOC(fiction_gate_level_layout_clear_tile)) - .def("is_gate_tile", &GateLyt::is_gate_tile, "t"_a, DOC(fiction_gate_level_layout_is_gate_tile)) - .def("is_wire_tile", &GateLyt::is_wire_tile, "t"_a, DOC(fiction_gate_level_layout_is_wire_tile)) - .def("is_empty_tile", &GateLyt::is_empty_tile, "t"_a, DOC(fiction_gate_level_layout_is_empty_tile)) + .def("is_gate_tile", &GateLyt::is_gate_tile, py::arg("t"), DOC(fiction_gate_level_layout_is_gate_tile)) + .def("is_wire_tile", &GateLyt::is_wire_tile, py::arg("t"), DOC(fiction_gate_level_layout_is_wire_tile)) + .def("is_empty_tile", &GateLyt::is_empty_tile, py::arg("t"), DOC(fiction_gate_level_layout_is_empty_tile)) .def("pis", [](const GateLyt& lyt) @@ -167,112 +170,112 @@ void gate_level_layout(pybind11::module& m, const std::string& topology) .def( "fanins", [](const GateLyt& layout, const fiction::tile& tile) - { return layout.template incoming_data_flow(tile); }, "t"_a) + { return layout.template incoming_data_flow(tile); }, py::arg("t")) .def( "fanouts", [](const GateLyt& layout, const fiction::tile& tile) - { return layout.template outgoing_data_flow(tile); }, "t"_a) + { return layout.template outgoing_data_flow(tile); }, py::arg("t")) .def( "is_incoming_signal", [](const GateLyt& layout, const fiction::tile& tile, const typename GateLyt::signal& signal) - { return layout.template is_incoming_signal(tile, signal); }, "t"_a, "s"_a, + { return layout.template is_incoming_signal(tile, signal); }, py::arg("t"), py::arg("s"), DOC(fiction_gate_level_layout_is_incoming_signal)) .def( "has_no_incoming_signal", [](const GateLyt& layout, const fiction::tile& tile) - { return layout.template has_no_incoming_signal(tile); }, "t"_a, + { return layout.template has_no_incoming_signal(tile); }, py::arg("t"), DOC(fiction_gate_level_layout_has_no_incoming_signal)) .def( "has_northern_incoming_signal", [](const GateLyt& layout, const fiction::tile& tile) - { return layout.template has_northern_incoming_signal(tile); }, "t"_a, + { return layout.template has_northern_incoming_signal(tile); }, py::arg("t"), DOC(fiction_gate_level_layout_has_northern_incoming_signal)) .def( "has_north_eastern_incoming_signal", [](const GateLyt& layout, const fiction::tile& tile) - { return layout.template has_north_eastern_incoming_signal(tile); }, "t"_a, + { return layout.template has_north_eastern_incoming_signal(tile); }, py::arg("t"), DOC(fiction_gate_level_layout_has_north_eastern_incoming_signal)) .def( "has_eastern_incoming_signal", [](const GateLyt& layout, const fiction::tile& tile) - { return layout.template has_eastern_incoming_signal(tile); }, "t"_a, + { return layout.template has_eastern_incoming_signal(tile); }, py::arg("t"), DOC(fiction_gate_level_layout_has_eastern_incoming_signal)) .def( "has_south_eastern_incoming_signal", [](const GateLyt& layout, const fiction::tile& tile) - { return layout.template has_south_eastern_incoming_signal(tile); }, "t"_a, + { return layout.template has_south_eastern_incoming_signal(tile); }, py::arg("t"), DOC(fiction_gate_level_layout_has_south_eastern_incoming_signal)) .def( "has_southern_incoming_signal", [](const GateLyt& layout, const fiction::tile& tile) - { return layout.template has_southern_incoming_signal(tile); }, "t"_a, + { return layout.template has_southern_incoming_signal(tile); }, py::arg("t"), DOC(fiction_gate_level_layout_has_southern_incoming_signal)) .def( "has_south_western_incoming_signal", [](const GateLyt& layout, const fiction::tile& tile) - { return layout.template has_south_western_incoming_signal(tile); }, "t"_a, + { return layout.template has_south_western_incoming_signal(tile); }, py::arg("t"), DOC(fiction_gate_level_layout_has_south_western_incoming_signal)) .def( "has_western_incoming_signal", [](const GateLyt& layout, const fiction::tile& tile) - { return layout.template has_western_incoming_signal(tile); }, "t"_a, + { return layout.template has_western_incoming_signal(tile); }, py::arg("t"), DOC(fiction_gate_level_layout_has_western_incoming_signal)) .def( "has_north_western_incoming_signal", [](const GateLyt& layout, const fiction::tile& tile) - { return layout.template has_north_western_incoming_signal(tile); }, "t"_a, + { return layout.template has_north_western_incoming_signal(tile); }, py::arg("t"), DOC(fiction_gate_level_layout_has_north_western_incoming_signal)) .def( "is_outgoing_signal", [](const GateLyt& layout, const fiction::tile& tile, const typename GateLyt::signal& signal) - { return layout.template is_outgoing_signal(tile, signal); }, "t"_a, "s"_a, + { return layout.template is_outgoing_signal(tile, signal); }, py::arg("t"), py::arg("s"), DOC(fiction_gate_level_layout_is_outgoing_signal)) .def( "has_no_outgoing_signal", [](const GateLyt& layout, const fiction::tile& tile) - { return layout.template has_no_outgoing_signal(tile); }, "t"_a, + { return layout.template has_no_outgoing_signal(tile); }, py::arg("t"), DOC(fiction_gate_level_layout_has_no_outgoing_signal)) .def( "has_northern_outgoing_signal", [](const GateLyt& layout, const fiction::tile& tile) - { return layout.template has_northern_outgoing_signal(tile); }, "t"_a, + { return layout.template has_northern_outgoing_signal(tile); }, py::arg("t"), DOC(fiction_gate_level_layout_has_northern_outgoing_signal)) .def( "has_north_eastern_outgoing_signal", [](const GateLyt& layout, const fiction::tile& tile) - { return layout.template has_north_eastern_outgoing_signal(tile); }, "t"_a, + { return layout.template has_north_eastern_outgoing_signal(tile); }, py::arg("t"), DOC(fiction_gate_level_layout_has_north_eastern_outgoing_signal)) .def( "has_eastern_outgoing_signal", [](const GateLyt& layout, const fiction::tile& tile) - { return layout.template has_eastern_outgoing_signal(tile); }, "t"_a, + { return layout.template has_eastern_outgoing_signal(tile); }, py::arg("t"), DOC(fiction_gate_level_layout_has_eastern_outgoing_signal)) .def( "has_south_eastern_outgoing_signal", [](const GateLyt& layout, const fiction::tile& tile) - { return layout.template has_south_eastern_outgoing_signal(tile); }, "t"_a, + { return layout.template has_south_eastern_outgoing_signal(tile); }, py::arg("t"), DOC(fiction_gate_level_layout_has_south_eastern_outgoing_signal)) .def( "has_southern_outgoing_signal", [](const GateLyt& layout, const fiction::tile& tile) - { return layout.template has_southern_outgoing_signal(tile); }, "t"_a, + { return layout.template has_southern_outgoing_signal(tile); }, py::arg("t"), DOC(fiction_gate_level_layout_has_southern_outgoing_signal)) .def( "has_south_western_outgoing_signal", [](const GateLyt& layout, const fiction::tile& tile) - { return layout.template has_south_western_outgoing_signal(tile); }, "t"_a, + { return layout.template has_south_western_outgoing_signal(tile); }, py::arg("t"), DOC(fiction_gate_level_layout_has_south_western_outgoing_signal)) .def( "has_western_outgoing_signal", [](const GateLyt& layout, const fiction::tile& tile) - { return layout.template has_western_outgoing_signal(tile); }, "t"_a, + { return layout.template has_western_outgoing_signal(tile); }, py::arg("t"), DOC(fiction_gate_level_layout_has_western_outgoing_signal)) .def( "has_north_western_outgoing_signal", [](const GateLyt& layout, const fiction::tile& tile) - { return layout.template has_north_western_outgoing_signal(tile); }, "t"_a, + { return layout.template has_north_western_outgoing_signal(tile); }, py::arg("t"), DOC(fiction_gate_level_layout_has_north_western_outgoing_signal)) .def( @@ -283,7 +286,7 @@ void gate_level_layout(pybind11::module& m, const std::string& topology) return std::make_pair(bb.get_min(), bb.get_max()); }, DOC(fiction_bounding_box_2d_overridden)) - .def("is_dead", &GateLyt::is_dead, "n"_a, DOC(fiction_gate_level_layout_is_dead)) + .def("is_dead", &GateLyt::is_dead, py::arg("n"), DOC(fiction_gate_level_layout_is_dead)) .def("__repr__", [](const GateLyt& lyt) -> std::string { diff --git a/bindings/pyfiction/include/pyfiction/layouts/hexagonal_layout.hpp b/bindings/mnt/pyfiction/include/pyfiction/layouts/hexagonal_layout.hpp similarity index 65% rename from bindings/pyfiction/include/pyfiction/layouts/hexagonal_layout.hpp rename to bindings/mnt/pyfiction/include/pyfiction/layouts/hexagonal_layout.hpp index cf3f2500a..2ca20d37b 100644 --- a/bindings/pyfiction/include/pyfiction/layouts/hexagonal_layout.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/layouts/hexagonal_layout.hpp @@ -22,82 +22,87 @@ namespace pyfiction inline void hexagonal_layout(pybind11::module& m) { namespace py = pybind11; - using namespace pybind11::literals; + namespace py = pybind11; /** * Hexagonal layout. */ py::class_(m, "hexagonal_layout", DOC(fiction_hexagonal_layout_overridden)) .def(py::init<>()) - .def(py::init&>(), "dimension"_a, + .def(py::init&>(), py::arg("dimension"), DOC(fiction_hexagonal_layout_hexagonal_layout)) .def( "coord", [](const py_hexagonal_layout& layout, const int64_t x, const int64_t y, const int64_t z) - { return layout.coord(x, y, z); }, "x"_a, "y"_a, "z"_a = 0l, DOC(fiction_hexagonal_layout_coord)) + { return layout.coord(x, y, z); }, py::arg("x"), py::arg("y"), py::arg("z") = 0l, + DOC(fiction_hexagonal_layout_coord)) .def("x", &py_hexagonal_layout::x, DOC(fiction_hexagonal_layout_x)) .def("y", &py_hexagonal_layout::y, DOC(fiction_hexagonal_layout_y)) .def("z", &py_hexagonal_layout::z, DOC(fiction_hexagonal_layout_z)) .def("area", &py_hexagonal_layout::area, DOC(fiction_hexagonal_layout_area)) - .def("resize", &py_hexagonal_layout::resize, "dimension"_a, DOC(fiction_hexagonal_layout_resize)) - - .def("north", &py_hexagonal_layout::north, "c"_a, DOC(fiction_hexagonal_layout_north)) - .def("north_east", &py_hexagonal_layout::north_east, "c"_a, DOC(fiction_hexagonal_layout_north_east)) - .def("east", &py_hexagonal_layout::east, "c"_a, DOC(fiction_hexagonal_layout_east)) - .def("south_east", &py_hexagonal_layout::south_east, "c"_a, DOC(fiction_hexagonal_layout_south_east)) - .def("south", &py_hexagonal_layout::south, "c"_a, DOC(fiction_hexagonal_layout_south)) - .def("south_west", &py_hexagonal_layout::south_west, "c"_a, DOC(fiction_hexagonal_layout_south_west)) - .def("west", &py_hexagonal_layout::west, "c"_a, DOC(fiction_hexagonal_layout_west)) - .def("north_west", &py_hexagonal_layout::north_west, "c"_a, DOC(fiction_hexagonal_layout_north_west)) - .def("above", &py_hexagonal_layout::above, "c"_a, DOC(fiction_hexagonal_layout_above)) - .def("below", &py_hexagonal_layout::below, "c"_a, DOC(fiction_hexagonal_layout_below)) - - .def("is_north_of", &py_hexagonal_layout::is_north_of, "c1"_a, "c2"_a, + .def("resize", &py_hexagonal_layout::resize, py::arg("dimension"), DOC(fiction_hexagonal_layout_resize)) + + .def("north", &py_hexagonal_layout::north, py::arg("c"), DOC(fiction_hexagonal_layout_north)) + .def("north_east", &py_hexagonal_layout::north_east, py::arg("c"), DOC(fiction_hexagonal_layout_north_east)) + .def("east", &py_hexagonal_layout::east, py::arg("c"), DOC(fiction_hexagonal_layout_east)) + .def("south_east", &py_hexagonal_layout::south_east, py::arg("c"), DOC(fiction_hexagonal_layout_south_east)) + .def("south", &py_hexagonal_layout::south, py::arg("c"), DOC(fiction_hexagonal_layout_south)) + .def("south_west", &py_hexagonal_layout::south_west, py::arg("c"), DOC(fiction_hexagonal_layout_south_west)) + .def("west", &py_hexagonal_layout::west, py::arg("c"), DOC(fiction_hexagonal_layout_west)) + .def("north_west", &py_hexagonal_layout::north_west, py::arg("c"), DOC(fiction_hexagonal_layout_north_west)) + .def("above", &py_hexagonal_layout::above, py::arg("c"), DOC(fiction_hexagonal_layout_above)) + .def("below", &py_hexagonal_layout::below, py::arg("c"), DOC(fiction_hexagonal_layout_below)) + + .def("is_north_of", &py_hexagonal_layout::is_north_of, py::arg("c1"), py::arg("c2"), DOC(fiction_hexagonal_layout_is_north_of)) - .def("is_east_of", &py_hexagonal_layout::is_east_of, "c1"_a, "c2"_a, DOC(fiction_hexagonal_layout_is_east_of)) - .def("is_south_of", &py_hexagonal_layout::is_south_of, "c1"_a, "c2"_a, + .def("is_east_of", &py_hexagonal_layout::is_east_of, py::arg("c1"), py::arg("c2"), + DOC(fiction_hexagonal_layout_is_east_of)) + .def("is_south_of", &py_hexagonal_layout::is_south_of, py::arg("c1"), py::arg("c2"), DOC(fiction_hexagonal_layout_is_south_of)) - .def("is_west_of", &py_hexagonal_layout::is_west_of, "c1"_a, "c2"_a, DOC(fiction_hexagonal_layout_is_west_of)) - .def("is_adjacent_of", &py_hexagonal_layout::is_adjacent_of, "c1"_a, "c2"_a, + .def("is_west_of", &py_hexagonal_layout::is_west_of, py::arg("c1"), py::arg("c2"), + DOC(fiction_hexagonal_layout_is_west_of)) + .def("is_adjacent_of", &py_hexagonal_layout::is_adjacent_of, py::arg("c1"), py::arg("c2"), DOC(fiction_hexagonal_layout_is_adjacent_of)) - .def("is_adjacent_elevation_of", &py_hexagonal_layout::is_adjacent_elevation_of, "c1"_a, "c2"_a, + .def("is_adjacent_elevation_of", &py_hexagonal_layout::is_adjacent_elevation_of, py::arg("c1"), py::arg("c2"), DOC(fiction_hexagonal_layout_is_adjacent_elevation_of)) - .def("is_above", &py_hexagonal_layout::is_above, "c1"_a, "c2"_a, DOC(fiction_hexagonal_layout_is_above)) - .def("is_below", &py_hexagonal_layout::is_below, "c1"_a, "c2"_a, DOC(fiction_hexagonal_layout_is_below)) - .def("is_northwards_of", &py_hexagonal_layout::is_northwards_of, "c1"_a, "c2"_a, + .def("is_above", &py_hexagonal_layout::is_above, py::arg("c1"), py::arg("c2"), + DOC(fiction_hexagonal_layout_is_above)) + .def("is_below", &py_hexagonal_layout::is_below, py::arg("c1"), py::arg("c2"), + DOC(fiction_hexagonal_layout_is_below)) + .def("is_northwards_of", &py_hexagonal_layout::is_northwards_of, py::arg("c1"), py::arg("c2"), DOC(fiction_hexagonal_layout_is_northwards_of)) - .def("is_eastwards_of", &py_hexagonal_layout::is_eastwards_of, "c1"_a, "c2"_a, + .def("is_eastwards_of", &py_hexagonal_layout::is_eastwards_of, py::arg("c1"), py::arg("c2"), DOC(fiction_hexagonal_layout_is_eastwards_of)) - .def("is_southwards_of", &py_hexagonal_layout::is_southwards_of, "c1"_a, "c2"_a, + .def("is_southwards_of", &py_hexagonal_layout::is_southwards_of, py::arg("c1"), py::arg("c2"), DOC(fiction_hexagonal_layout_is_southwards_of)) - .def("is_westwards_of", &py_hexagonal_layout::is_westwards_of, "c1"_a, "c2"_a, + .def("is_westwards_of", &py_hexagonal_layout::is_westwards_of, py::arg("c1"), py::arg("c2"), DOC(fiction_hexagonal_layout_is_westwards_of)) - .def("is_at_northern_border", &py_hexagonal_layout::is_at_northern_border, "c"_a, + .def("is_at_northern_border", &py_hexagonal_layout::is_at_northern_border, py::arg("c"), DOC(fiction_hexagonal_layout_is_at_northern_border)) - .def("is_at_eastern_border", &py_hexagonal_layout::is_at_eastern_border, "c"_a, + .def("is_at_eastern_border", &py_hexagonal_layout::is_at_eastern_border, py::arg("c"), DOC(fiction_hexagonal_layout_is_at_eastern_border)) - .def("is_at_southern_border", &py_hexagonal_layout::is_at_southern_border, "c"_a, + .def("is_at_southern_border", &py_hexagonal_layout::is_at_southern_border, py::arg("c"), DOC(fiction_hexagonal_layout_is_at_southern_border)) - .def("is_at_western_border", &py_hexagonal_layout::is_at_western_border, "c"_a, + .def("is_at_western_border", &py_hexagonal_layout::is_at_western_border, py::arg("c"), DOC(fiction_hexagonal_layout_is_at_western_border)) - .def("is_at_any_border", &py_hexagonal_layout::is_at_any_border, "c"_a, + .def("is_at_any_border", &py_hexagonal_layout::is_at_any_border, py::arg("c"), DOC(fiction_hexagonal_layout_is_at_any_border)) - .def("northern_border_of", &py_hexagonal_layout::northern_border_of, "c"_a, + .def("northern_border_of", &py_hexagonal_layout::northern_border_of, py::arg("c"), DOC(fiction_hexagonal_layout_northern_border_of)) - .def("eastern_border_of", &py_hexagonal_layout::eastern_border_of, "c"_a, + .def("eastern_border_of", &py_hexagonal_layout::eastern_border_of, py::arg("c"), DOC(fiction_hexagonal_layout_eastern_border_of)) - .def("southern_border_of", &py_hexagonal_layout::southern_border_of, "c"_a, + .def("southern_border_of", &py_hexagonal_layout::southern_border_of, py::arg("c"), DOC(fiction_hexagonal_layout_southern_border_of)) - .def("western_border_of", &py_hexagonal_layout::western_border_of, "c"_a, + .def("western_border_of", &py_hexagonal_layout::western_border_of, py::arg("c"), DOC(fiction_hexagonal_layout_western_border_of)) - .def("is_ground_layer", &py_hexagonal_layout::is_ground_layer, "c"_a, + .def("is_ground_layer", &py_hexagonal_layout::is_ground_layer, py::arg("c"), DOC(fiction_hexagonal_layout_is_ground_layer)) - .def("is_crossing_layer", &py_hexagonal_layout::is_crossing_layer, "c"_a, + .def("is_crossing_layer", &py_hexagonal_layout::is_crossing_layer, py::arg("c"), DOC(fiction_hexagonal_layout_is_crossing_layer)) - .def("is_within_bounds", &py_hexagonal_layout::is_within_bounds, "c"_a, + .def("is_within_bounds", &py_hexagonal_layout::is_within_bounds, py::arg("c"), DOC(fiction_hexagonal_layout_is_within_bounds)) .def( @@ -120,9 +125,9 @@ inline void hexagonal_layout(pybind11::module& m) return coords; }, DOC(fiction_hexagonal_layout_ground_coordinates)) - .def("adjacent_coordinates", &py_hexagonal_layout::adjacent_coordinates, "c"_a, + .def("adjacent_coordinates", &py_hexagonal_layout::adjacent_coordinates, py::arg("c"), DOC(fiction_hexagonal_layout_adjacent_coordinates)) - .def("adjacent_opposite_coordinates", &py_hexagonal_layout::adjacent_opposite_coordinates, "c"_a, + .def("adjacent_opposite_coordinates", &py_hexagonal_layout::adjacent_opposite_coordinates, py::arg("c"), DOC(fiction_hexagonal_layout_adjacent_opposite_coordinates)) .def("__repr__", diff --git a/bindings/pyfiction/include/pyfiction/layouts/obstruction_layout.hpp b/bindings/mnt/pyfiction/include/pyfiction/layouts/obstruction_layout.hpp similarity index 84% rename from bindings/pyfiction/include/pyfiction/layouts/obstruction_layout.hpp rename to bindings/mnt/pyfiction/include/pyfiction/layouts/obstruction_layout.hpp index 8b401e54b..b846f1be6 100644 --- a/bindings/pyfiction/include/pyfiction/layouts/obstruction_layout.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/layouts/obstruction_layout.hpp @@ -22,19 +22,19 @@ template void obstruction_layout(pybind11::module& m, const std::string& topology) { namespace py = pybind11; - using namespace pybind11::literals; + namespace py = pybind11; py::class_(m, fmt::format("{}_obstruction_layout", topology).c_str(), DOC(fiction_obstruction_layout)) .def(py::init<>()) - .def(py::init(), "layout"_a, DOC(fiction_obstruction_layout_obstruction_layout)) + .def(py::init(), py::arg("layout"), DOC(fiction_obstruction_layout_obstruction_layout)) - .def("obstruct_coordinate", &ObstrLyt::obstruct_coordinate, "c"_a) - .def("obstruct_connection", &ObstrLyt::obstruct_connection, "src"_a, "tgt"_a) - .def("is_obstructed_coordinate", &ObstrLyt::is_obstructed_coordinate, "c"_a) - .def("is_obstructed_connection", &ObstrLyt::is_obstructed_connection, "src"_a, "tgt"_a) - .def("clear_obstructed_coordinate", &ObstrLyt::clear_obstructed_coordinate, "c"_a) - .def("clear_obstructed_connection", &ObstrLyt::clear_obstructed_connection, "src"_a, "tgt"_a) + .def("obstruct_coordinate", &ObstrLyt::obstruct_coordinate, py::arg("c")) + .def("obstruct_connection", &ObstrLyt::obstruct_connection, py::arg("src"), py::arg("tgt")) + .def("is_obstructed_coordinate", &ObstrLyt::is_obstructed_coordinate, py::arg("c")) + .def("is_obstructed_connection", &ObstrLyt::is_obstructed_connection, py::arg("src"), py::arg("tgt")) + .def("clear_obstructed_coordinate", &ObstrLyt::clear_obstructed_coordinate, py::arg("c")) + .def("clear_obstructed_connection", &ObstrLyt::clear_obstructed_connection, py::arg("src"), py::arg("tgt")) .def("clear_obstructed_coordinates", &ObstrLyt::clear_obstructed_coordinates) .def("clear_obstructed_connections", &ObstrLyt::clear_obstructed_connections) diff --git a/bindings/pyfiction/include/pyfiction/layouts/shifted_cartesian_layout.hpp b/bindings/mnt/pyfiction/include/pyfiction/layouts/shifted_cartesian_layout.hpp similarity index 65% rename from bindings/pyfiction/include/pyfiction/layouts/shifted_cartesian_layout.hpp rename to bindings/mnt/pyfiction/include/pyfiction/layouts/shifted_cartesian_layout.hpp index 1ca6821ab..e8a19f237 100644 --- a/bindings/pyfiction/include/pyfiction/layouts/shifted_cartesian_layout.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/layouts/shifted_cartesian_layout.hpp @@ -23,7 +23,7 @@ namespace pyfiction inline void shifted_cartesian_layout(pybind11::module& m) { namespace py = pybind11; - using namespace pybind11::literals; + namespace py = pybind11; /** * Shifted Cartesian layout. @@ -34,11 +34,12 @@ inline void shifted_cartesian_layout(pybind11::module& m) py::class_(m, "shifted_cartesian_layout", DOC(fiction_shifted_cartesian_layout_overridden)) .def(py::init<>()) - .def(py::init&>(), "dimension"_a, + .def(py::init&>(), py::arg("dimension"), DOC(fiction_shifted_cartesian_layout_shifted_cartesian_layout)) .def( "coord", [](const py_shifted_cartesian_layout& layout, const int64_t x, const int64_t y, const int64_t z) - { return layout.coord(x, y, z); }, "x"_a, "y"_a, "z"_a = 0l, DOC(fiction_cartesian_layout_coord)) + { return layout.coord(x, y, z); }, py::arg("x"), py::arg("y"), py::arg("z") = 0l, + DOC(fiction_cartesian_layout_coord)) .def( "x", [](const py_shifted_cartesian_layout& lyt) { return lyt.x(); }, DOC(fiction_cartesian_layout_x)) .def( @@ -50,127 +51,134 @@ inline void shifted_cartesian_layout(pybind11::module& m) DOC(fiction_cartesian_layout_area)) .def( "resize", [](py_shifted_cartesian_layout& lyt, const py_offset_coordinate& dimension) - { lyt.resize(dimension); }, "dimension"_a, DOC(fiction_cartesian_layout_resize)) + { lyt.resize(dimension); }, py::arg("dimension"), DOC(fiction_cartesian_layout_resize)) .def( "north", [](const py_shifted_cartesian_layout& lyt, const py_offset_coordinate& c) { return lyt.north(c); }, - "c"_a, DOC(fiction_cartesian_layout_north)) + py::arg("c"), DOC(fiction_cartesian_layout_north)) .def( "north_east", [](const py_shifted_cartesian_layout& lyt, const py_offset_coordinate& c) - { return lyt.north_east(c); }, "c"_a, DOC(fiction_cartesian_layout_north_east)) + { return lyt.north_east(c); }, py::arg("c"), DOC(fiction_cartesian_layout_north_east)) .def( "east", [](const py_shifted_cartesian_layout& lyt, const py_offset_coordinate& c) { return lyt.east(c); }, - "c"_a, DOC(fiction_cartesian_layout_east)) + py::arg("c"), DOC(fiction_cartesian_layout_east)) .def( "south_east", [](const py_shifted_cartesian_layout& lyt, const py_offset_coordinate& c) - { return lyt.south_east(c); }, "c"_a, DOC(fiction_cartesian_layout_south_east)) + { return lyt.south_east(c); }, py::arg("c"), DOC(fiction_cartesian_layout_south_east)) .def( "south", [](const py_shifted_cartesian_layout& lyt, const py_offset_coordinate& c) { return lyt.south(c); }, - "c"_a, DOC(fiction_cartesian_layout_south)) + py::arg("c"), DOC(fiction_cartesian_layout_south)) .def( "south_west", [](const py_shifted_cartesian_layout& lyt, const py_offset_coordinate& c) - { return lyt.south_west(c); }, "c"_a, DOC(fiction_cartesian_layout_south_west)) + { return lyt.south_west(c); }, py::arg("c"), DOC(fiction_cartesian_layout_south_west)) .def( "west", [](const py_shifted_cartesian_layout& lyt, const py_offset_coordinate& c) { return lyt.west(c); }, - "c"_a, DOC(fiction_cartesian_layout_west)) + py::arg("c"), DOC(fiction_cartesian_layout_west)) .def( "north_west", [](const py_shifted_cartesian_layout& lyt, const py_offset_coordinate& c) - { return lyt.north_west(c); }, "c"_a, DOC(fiction_cartesian_layout_north_west)) + { return lyt.north_west(c); }, py::arg("c"), DOC(fiction_cartesian_layout_north_west)) .def( "above", [](const py_shifted_cartesian_layout& lyt, const py_offset_coordinate& c) { return lyt.above(c); }, - "c"_a, DOC(fiction_cartesian_layout_above)) + py::arg("c"), DOC(fiction_cartesian_layout_above)) .def( "below", [](const py_shifted_cartesian_layout& lyt, const py_offset_coordinate& c) { return lyt.below(c); }, - "c"_a, DOC(fiction_cartesian_layout_below)) + py::arg("c"), DOC(fiction_cartesian_layout_below)) .def( "is_north_of", [](const py_shifted_cartesian_layout& lyt, const py_offset_coordinate& c1, const py_offset_coordinate& c2) - { return lyt.is_north_of(c1, c2); }, "c1"_a, "c2"_a, DOC(fiction_cartesian_layout_is_north_of)) + { return lyt.is_north_of(c1, c2); }, py::arg("c1"), py::arg("c2"), + DOC(fiction_cartesian_layout_is_north_of)) .def( "is_east_of", [](const py_shifted_cartesian_layout& lyt, const py_offset_coordinate& c1, const py_offset_coordinate& c2) - { return lyt.is_east_of(c1, c2); }, "c1"_a, "c2"_a, DOC(fiction_cartesian_layout_is_east_of)) + { return lyt.is_east_of(c1, c2); }, py::arg("c1"), py::arg("c2"), DOC(fiction_cartesian_layout_is_east_of)) .def( "is_south_of", [](const py_shifted_cartesian_layout& lyt, const py_offset_coordinate& c1, const py_offset_coordinate& c2) - { return lyt.is_south_of(c1, c2); }, "c1"_a, "c2"_a, DOC(fiction_cartesian_layout_is_south_of)) + { return lyt.is_south_of(c1, c2); }, py::arg("c1"), py::arg("c2"), + DOC(fiction_cartesian_layout_is_south_of)) .def( "is_west_of", [](const py_shifted_cartesian_layout& lyt, const py_offset_coordinate& c1, const py_offset_coordinate& c2) - { return lyt.is_west_of(c1, c2); }, "c1"_a, "c2"_a, DOC(fiction_cartesian_layout_is_west_of)) + { return lyt.is_west_of(c1, c2); }, py::arg("c1"), py::arg("c2"), DOC(fiction_cartesian_layout_is_west_of)) .def( "is_adjacent_of", [](const py_shifted_cartesian_layout& lyt, const py_offset_coordinate& c1, const py_offset_coordinate& c2) - { return lyt.is_adjacent_of(c1, c2); }, "c1"_a, "c2"_a, DOC(fiction_cartesian_layout_is_adjacent_of)) + { return lyt.is_adjacent_of(c1, c2); }, py::arg("c1"), py::arg("c2"), + DOC(fiction_cartesian_layout_is_adjacent_of)) .def( "is_adjacent_elevation_of", [](const py_shifted_cartesian_layout& lyt, const py_offset_coordinate& c1, const py_offset_coordinate& c2) - { return lyt.is_adjacent_elevation_of(c1, c2); }, "c1"_a, "c2"_a, + { return lyt.is_adjacent_elevation_of(c1, c2); }, py::arg("c1"), py::arg("c2"), DOC(fiction_cartesian_layout_is_adjacent_elevation_of)) .def( "is_above", [](const py_shifted_cartesian_layout& lyt, const py_offset_coordinate& c1, const py_offset_coordinate& c2) - { return lyt.is_above(c1, c2); }, "c1"_a, "c2"_a, DOC(fiction_cartesian_layout_is_above)) + { return lyt.is_above(c1, c2); }, py::arg("c1"), py::arg("c2"), DOC(fiction_cartesian_layout_is_above)) .def( "is_below", [](const py_shifted_cartesian_layout& lyt, const py_offset_coordinate& c1, const py_offset_coordinate& c2) - { return lyt.is_below(c1, c2); }, "c1"_a, "c2"_a, DOC(fiction_cartesian_layout_is_below)) + { return lyt.is_below(c1, c2); }, py::arg("c1"), py::arg("c2"), DOC(fiction_cartesian_layout_is_below)) .def( "is_northwards_of", [](const py_shifted_cartesian_layout& lyt, const py_offset_coordinate& c1, const py_offset_coordinate& c2) - { return lyt.is_northwards_of(c1, c2); }, "c1"_a, "c2"_a, DOC(fiction_cartesian_layout_is_northwards_of)) + { return lyt.is_northwards_of(c1, c2); }, py::arg("c1"), py::arg("c2"), + DOC(fiction_cartesian_layout_is_northwards_of)) .def( "is_eastwards_of", [](const py_shifted_cartesian_layout& lyt, const py_offset_coordinate& c1, const py_offset_coordinate& c2) - { return lyt.is_eastwards_of(c1, c2); }, "c1"_a, "c2"_a, DOC(fiction_cartesian_layout_is_eastwards_of)) + { return lyt.is_eastwards_of(c1, c2); }, py::arg("c1"), py::arg("c2"), + DOC(fiction_cartesian_layout_is_eastwards_of)) .def( "is_southwards_of", [](const py_shifted_cartesian_layout& lyt, const py_offset_coordinate& c1, const py_offset_coordinate& c2) - { return lyt.is_southwards_of(c1, c2); }, "c1"_a, "c2"_a, DOC(fiction_cartesian_layout_is_southwards_of)) + { return lyt.is_southwards_of(c1, c2); }, py::arg("c1"), py::arg("c2"), + DOC(fiction_cartesian_layout_is_southwards_of)) .def( "is_westwards_of", [](const py_shifted_cartesian_layout& lyt, const py_offset_coordinate& c1, const py_offset_coordinate& c2) - { return lyt.is_westwards_of(c1, c2); }, "c1"_a, "c2"_a, DOC(fiction_cartesian_layout_is_westwards_of)) + { return lyt.is_westwards_of(c1, c2); }, py::arg("c1"), py::arg("c2"), + DOC(fiction_cartesian_layout_is_westwards_of)) .def( "is_at_northern_border", [](const py_shifted_cartesian_layout& lyt, const py_offset_coordinate& c) - { return lyt.is_at_northern_border(c); }, "c"_a, DOC(fiction_cartesian_layout_is_at_northern_border)) + { return lyt.is_at_northern_border(c); }, py::arg("c"), DOC(fiction_cartesian_layout_is_at_northern_border)) .def( "is_at_eastern_border", [](const py_shifted_cartesian_layout& lyt, const py_offset_coordinate& c) - { return lyt.is_at_eastern_border(c); }, "c"_a, DOC(fiction_cartesian_layout_is_at_eastern_border)) + { return lyt.is_at_eastern_border(c); }, py::arg("c"), DOC(fiction_cartesian_layout_is_at_eastern_border)) .def( "is_at_southern_border", [](const py_shifted_cartesian_layout& lyt, const py_offset_coordinate& c) - { return lyt.is_at_southern_border(c); }, "c"_a, DOC(fiction_cartesian_layout_is_at_southern_border)) + { return lyt.is_at_southern_border(c); }, py::arg("c"), DOC(fiction_cartesian_layout_is_at_southern_border)) .def( "is_at_western_border", [](const py_shifted_cartesian_layout& lyt, const py_offset_coordinate& c) - { return lyt.is_at_western_border(c); }, "c"_a, DOC(fiction_cartesian_layout_is_at_western_border)) + { return lyt.is_at_western_border(c); }, py::arg("c"), DOC(fiction_cartesian_layout_is_at_western_border)) .def( "is_at_any_border", [](const py_shifted_cartesian_layout& lyt, const py_offset_coordinate& c) - { return lyt.is_at_any_border(c); }, "c"_a, DOC(fiction_cartesian_layout_is_at_any_border)) + { return lyt.is_at_any_border(c); }, py::arg("c"), DOC(fiction_cartesian_layout_is_at_any_border)) .def( "northern_border_of", [](const py_shifted_cartesian_layout& lyt, const py_offset_coordinate& c) - { return lyt.northern_border_of(c); }, "c"_a, DOC(fiction_cartesian_layout_northern_border_of)) + { return lyt.northern_border_of(c); }, py::arg("c"), DOC(fiction_cartesian_layout_northern_border_of)) .def( "eastern_border_of", [](const py_shifted_cartesian_layout& lyt, const py_offset_coordinate& c) - { return lyt.eastern_border_of(c); }, "c"_a, DOC(fiction_cartesian_layout_eastern_border_of)) + { return lyt.eastern_border_of(c); }, py::arg("c"), DOC(fiction_cartesian_layout_eastern_border_of)) .def( "southern_border_of", [](const py_shifted_cartesian_layout& lyt, const py_offset_coordinate& c) - { return lyt.southern_border_of(c); }, "c"_a, DOC(fiction_cartesian_layout_southern_border_of)) + { return lyt.southern_border_of(c); }, py::arg("c"), DOC(fiction_cartesian_layout_southern_border_of)) .def( "western_border_of", [](const py_shifted_cartesian_layout& lyt, const py_offset_coordinate& c) - { return lyt.western_border_of(c); }, "c"_a, DOC(fiction_cartesian_layout_western_border_of)) + { return lyt.western_border_of(c); }, py::arg("c"), DOC(fiction_cartesian_layout_western_border_of)) .def( "is_ground_layer", [](const py_shifted_cartesian_layout& lyt, const py_offset_coordinate& c) - { return lyt.is_ground_layer(c); }, "c"_a, DOC(fiction_cartesian_layout_is_ground_layer)) + { return lyt.is_ground_layer(c); }, py::arg("c"), DOC(fiction_cartesian_layout_is_ground_layer)) .def( "is_crossing_layer", [](const py_shifted_cartesian_layout& lyt, const py_offset_coordinate& c) - { return lyt.is_crossing_layer(c); }, "c"_a, DOC(fiction_cartesian_layout_is_crossing_layer)) + { return lyt.is_crossing_layer(c); }, py::arg("c"), DOC(fiction_cartesian_layout_is_crossing_layer)) .def( "is_within_bounds", [](const py_shifted_cartesian_layout& lyt, const py_offset_coordinate& c) - { return lyt.is_within_bounds(c); }, "c"_a, DOC(fiction_cartesian_layout_is_within_bounds)) + { return lyt.is_within_bounds(c); }, py::arg("c"), DOC(fiction_cartesian_layout_is_within_bounds)) .def( "coordinates", @@ -194,10 +202,10 @@ inline void shifted_cartesian_layout(pybind11::module& m) DOC(fiction_cartesian_layout_ground_coordinates)) .def( "adjacent_coordinates", [](const py_shifted_cartesian_layout& lyt, const py_offset_coordinate& c) - { return lyt.adjacent_coordinates(c); }, "c"_a, DOC(fiction_cartesian_layout_adjacent_coordinates)) + { return lyt.adjacent_coordinates(c); }, py::arg("c"), DOC(fiction_cartesian_layout_adjacent_coordinates)) .def( "adjacent_opposite_coordinates", [](const py_shifted_cartesian_layout& lyt, const py_offset_coordinate& c) - { return lyt.adjacent_opposite_coordinates(c); }, "c"_a, + { return lyt.adjacent_opposite_coordinates(c); }, py::arg("c"), DOC(fiction_cartesian_layout_adjacent_opposite_coordinates)) .def("__repr__", diff --git a/bindings/pyfiction/include/pyfiction/networks/logic_networks.hpp b/bindings/mnt/pyfiction/include/pyfiction/networks/logic_networks.hpp similarity index 85% rename from bindings/pyfiction/include/pyfiction/networks/logic_networks.hpp rename to bindings/mnt/pyfiction/include/pyfiction/networks/logic_networks.hpp index 5dfa387e3..65a100012 100644 --- a/bindings/pyfiction/include/pyfiction/networks/logic_networks.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/networks/logic_networks.hpp @@ -34,7 +34,7 @@ template void network(pybind11::module& m, const std::string& network_name) { namespace py = pybind11; - using namespace pybind11::literals; + namespace py = pybind11; /** * Network node. @@ -100,56 +100,56 @@ void network(pybind11::module& m, const std::string& network_name) ntk.foreach_fanin(n, [&fanins](const auto& f) { fanins.push_back(f); }); return fanins; }, - "n"_a) + py::arg("n")) - .def("is_constant", &Ntk::is_constant, "n"_a) - .def("is_pi", &Ntk::is_pi, "n"_a) - .def("is_po", &Ntk::is_po, "n"_a) + .def("is_constant", &Ntk::is_constant, py::arg("n")) + .def("is_pi", &Ntk::is_pi, py::arg("n")) + .def("is_po", &Ntk::is_po, py::arg("n")) // for some reason, the is_* functions need redefinition to match with Ntk .def( - "is_buf", [](const Ntk& ntk, const mockturtle::node& n) { return ntk.is_buf(n); }, "n"_a, + "is_buf", [](const Ntk& ntk, const mockturtle::node& n) { return ntk.is_buf(n); }, py::arg("n"), DOC(fiction_technology_network_is_buf)) .def( - "is_fanout", [](const Ntk& ntk, const mockturtle::node& n) { return ntk.is_fanout(n); }, "n"_a, + "is_fanout", [](const Ntk& ntk, const mockturtle::node& n) { return ntk.is_fanout(n); }, py::arg("n"), DOC(fiction_technology_network_is_fanout)) .def( - "is_inv", [](const Ntk& ntk, const mockturtle::node& n) { return ntk.is_inv(n); }, "n"_a, + "is_inv", [](const Ntk& ntk, const mockturtle::node& n) { return ntk.is_inv(n); }, py::arg("n"), DOC(fiction_technology_network_is_inv)) .def( - "is_and", [](const Ntk& ntk, const mockturtle::node& n) { return ntk.is_and(n); }, "n"_a, + "is_and", [](const Ntk& ntk, const mockturtle::node& n) { return ntk.is_and(n); }, py::arg("n"), DOC(fiction_technology_network_is_and)) .def( - "is_or", [](const Ntk& ntk, const mockturtle::node& n) { return ntk.is_or(n); }, "n"_a, + "is_or", [](const Ntk& ntk, const mockturtle::node& n) { return ntk.is_or(n); }, py::arg("n"), DOC(fiction_technology_network_is_or)) .def( - "is_xor", [](const Ntk& ntk, const mockturtle::node& n) { return ntk.is_xor(n); }, "n"_a, + "is_xor", [](const Ntk& ntk, const mockturtle::node& n) { return ntk.is_xor(n); }, py::arg("n"), DOC(fiction_technology_network_is_xor)) .def( - "is_maj", [](const Ntk& ntk, const mockturtle::node& n) { return ntk.is_maj(n); }, "n"_a, + "is_maj", [](const Ntk& ntk, const mockturtle::node& n) { return ntk.is_maj(n); }, py::arg("n"), DOC(fiction_technology_network_is_maj)) .def( - "is_nand", [](const Ntk& ntk, const mockturtle::node& n) { return ntk.is_nand(n); }, "n"_a, + "is_nand", [](const Ntk& ntk, const mockturtle::node& n) { return ntk.is_nand(n); }, py::arg("n"), DOC(fiction_technology_network_is_nand)) .def( - "is_nor", [](const Ntk& ntk, const mockturtle::node& n) { return ntk.is_nor(n); }, "n"_a, + "is_nor", [](const Ntk& ntk, const mockturtle::node& n) { return ntk.is_nor(n); }, py::arg("n"), DOC(fiction_technology_network_is_nor)) .def( - "is_xnor", [](const Ntk& ntk, const mockturtle::node& n) { return ntk.is_xnor(n); }, "n"_a, + "is_xnor", [](const Ntk& ntk, const mockturtle::node& n) { return ntk.is_xnor(n); }, py::arg("n"), DOC(fiction_technology_network_is_xnor)) .def( - "has_name", [](const Ntk& ntk, const mockturtle::node& n) { return ntk.has_name(n); }, "n"_a) + "has_name", [](const Ntk& ntk, const mockturtle::node& n) { return ntk.has_name(n); }, py::arg("n")) .def( - "get_name", [](const Ntk& ntk, const mockturtle::node& n) { return ntk.get_name(n); }, "n"_a) + "get_name", [](const Ntk& ntk, const mockturtle::node& n) { return ntk.get_name(n); }, py::arg("n")) .def( "has_output_name", [](const Ntk& ntk, const uint32_t index) { return ntk.has_output_name(index); }, - "index"_a) + py::arg("index")) .def( "get_output_name", [](const Ntk& ntk, const uint32_t index) { return ntk.get_output_name(index); }, - "index"_a) + py::arg("index")) .def( - "po_index", [](const Ntk& ntk, const mockturtle::node& n) { return ntk.po_index(n); }, "n"_a) - .def("po_at", [](const Ntk& ntk, const uint32_t index) { return ntk.po_at(index); }, "index"_a); + "po_index", [](const Ntk& ntk, const mockturtle::node& n) { return ntk.po_index(n); }, py::arg("n")) + .def("po_at", [](const Ntk& ntk, const uint32_t index) { return ntk.po_at(index); }, py::arg("index")); /** * Network parsing function. @@ -169,7 +169,7 @@ void network(pybind11::module& m, const std::string& network_name) throw std::runtime_error("Could not parse specification file"); }, - "filename"_a); + py::arg("filename")); } } // namespace detail diff --git a/bindings/pyfiction/include/pyfiction/networks/truth_tables.hpp b/bindings/mnt/pyfiction/include/pyfiction/networks/truth_tables.hpp similarity index 100% rename from bindings/pyfiction/include/pyfiction/networks/truth_tables.hpp rename to bindings/mnt/pyfiction/include/pyfiction/networks/truth_tables.hpp diff --git a/bindings/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp b/bindings/mnt/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp similarity index 100% rename from bindings/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp rename to bindings/mnt/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp diff --git a/bindings/pyfiction/include/pyfiction/technology/area.hpp b/bindings/mnt/pyfiction/include/pyfiction/technology/area.hpp similarity index 82% rename from bindings/pyfiction/include/pyfiction/technology/area.hpp rename to bindings/mnt/pyfiction/include/pyfiction/technology/area.hpp index 0b9d24bd7..5eba508d4 100644 --- a/bindings/pyfiction/include/pyfiction/technology/area.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/technology/area.hpp @@ -22,7 +22,7 @@ namespace detail template void area(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; using tech = fiction::technology; @@ -37,8 +37,8 @@ void area(pybind11::module& m) return stats.area; }, - "layout"_a, "width"_a = tech::CELL_WIDTH, "height"_a = tech::CELL_HEIGHT, "hspace"_a = tech::CELL_HSPACE, - "vspace"_a = tech::CELL_VSPACE, DOC(fiction_area)); + py::arg("layout"), py::arg("width") = tech::CELL_WIDTH, py::arg("height") = tech::CELL_HEIGHT, + py::arg("hspace") = tech::CELL_HSPACE, py::arg("vspace") = tech::CELL_VSPACE, DOC(fiction_area)); } } // namespace detail diff --git a/bindings/pyfiction/include/pyfiction/technology/charge_distribution_surface.hpp b/bindings/mnt/pyfiction/include/pyfiction/technology/charge_distribution_surface.hpp similarity index 78% rename from bindings/pyfiction/include/pyfiction/technology/charge_distribution_surface.hpp rename to bindings/mnt/pyfiction/include/pyfiction/technology/charge_distribution_surface.hpp index b022f7bb7..088efdbfd 100644 --- a/bindings/pyfiction/include/pyfiction/technology/charge_distribution_surface.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/technology/charge_distribution_surface.hpp @@ -32,18 +32,7 @@ template void charge_distribution_surface_layout(pybind11::module& m, const std::string& lattice = "") { namespace py = pybind11; - using namespace pybind11::literals; - - m.def( - "charge_state_to_sign", [](fiction::sidb_charge_state& cs) { return fiction::charge_state_to_sign(cs); }, - "cs"_a, DOC(fiction_charge_state_to_sign)); - m.def( - "sign_to_charge_state", [](int8_t sg) { return fiction::sign_to_charge_state(sg); }, "sg"_a, - DOC(fiction_sign_to_charge_state)); - m.def( - "charge_configuration_to_string", [](std::vector charge_distribution) - { return fiction::charge_configuration_to_string(charge_distribution); }, "charge_distribution"_a, - DOC(fiction_charge_configuration_to_string)); + namespace py = pybind11; using py_cds = py_charge_distribution_surface_layout; @@ -54,94 +43,99 @@ void charge_distribution_surface_layout(pybind11::module& m, const std::string& py::class_(m, fmt::format("charge_distribution_surface{}", lattice).c_str(), DOC(fiction_charge_distribution_surface), py::module_local()) .def(py::init(), - "params"_a = fiction::sidb_simulation_parameters{}, "cs"_a = fiction::sidb_charge_state::NEGATIVE) + py::arg("params") = fiction::sidb_simulation_parameters{}, + py::arg("cs") = fiction::sidb_charge_state::NEGATIVE) .def(py::init(), - "lyt"_a, "params"_a = fiction::sidb_simulation_parameters{}, "cs"_a = fiction::sidb_charge_state::NEGATIVE) + py::arg("lyt"), py::arg("params") = fiction::sidb_simulation_parameters{}, + py::arg("cs") = fiction::sidb_charge_state::NEGATIVE) - .def(py::init(), "lyt"_a) + .def(py::init(), py::arg("lyt")) .def("get_all_sidb_locations_in_nm", [](py_cds& cds) { return cds.get_all_sidb_locations_in_nm(); }) .def( "assign_cell_type", [](py_cds& cds, fiction::cell c, typename py_cds::cell_type ct) - { return cds.assign_cell_type(c, ct); }, "c"_a, "ct"_a) + { return cds.assign_cell_type(c, ct); }, py::arg("c"), py::arg("ct")) .def( "assign_physical_parameters", [](py_cds& cds, fiction::sidb_simulation_parameters params) - { return cds.assign_physical_parameters(params); }, "params"_a) + { return cds.assign_physical_parameters(params); }, py::arg("params")) .def("get_phys_params", [](py_cds& cds) { return cds.get_simulation_params(); }) .def( - "charge_exists", [](py_cds& cds, fiction::sidb_charge_state cs) { return cds.charge_exists(cs); }, "cs"_a) + "charge_exists", [](py_cds& cds, fiction::sidb_charge_state cs) { return cds.charge_exists(cs); }, + py::arg("cs")) .def( - "cell_to_index", [](py_cds& cds, fiction::cell c) { return cds.cell_to_index(c); }, "c"_a) + "cell_to_index", [](py_cds& cds, fiction::cell c) { return cds.cell_to_index(c); }, py::arg("c")) .def( "assign_charge_state", [](py_cds& cds, fiction::cell c, fiction::sidb_charge_state cs, fiction::charge_index_mode index_mode) { return cds.assign_charge_state(c, cs, index_mode); }, - "c"_a, "cs"_a, "index_mode"_a = fiction::charge_index_mode::UPDATE_CHARGE_INDEX) + py::arg("c"), py::arg("cs"), py::arg("index_mode") = fiction::charge_index_mode::UPDATE_CHARGE_INDEX) .def( "assign_charge_by_cell_index", [](py_cds& cds, uint64_t i, fiction::sidb_charge_state cs) - { return cds.assign_charge_by_cell_index(i, cs); }, "i"_a, "cs"_a) + { return cds.assign_charge_by_cell_index(i, cs); }, py::arg("i"), py::arg("cs")) .def( "assign_all_charge_states", - [](py_cds& cds, fiction::sidb_charge_state cs) { return cds.assign_all_charge_states(cs); }, "cs"_a) + [](py_cds& cds, fiction::sidb_charge_state cs) { return cds.assign_all_charge_states(cs); }, py::arg("cs")) .def( "assign_dependent_cell", [](py_cds& cds, fiction::cell dependent_cell) - { return cds.assign_dependent_cell(dependent_cell); }, "dependent_cell"_a) + { return cds.assign_dependent_cell(dependent_cell); }, py::arg("dependent_cell")) .def( - "assign_base_number", [](py_cds& cds, uint8_t base) { return cds.assign_base_number(base); }, "base"_a) + "assign_base_number", [](py_cds& cds, uint8_t base) { return cds.assign_base_number(base); }, + py::arg("base")) .def( "add_sidb_defect_to_potential_landscape", [](py_cds& cds, fiction::cell c, fiction::sidb_defect defect) - { return cds.add_sidb_defect_to_potential_landscape(c, defect); }, "c"_a, "defect"_a) + { return cds.add_sidb_defect_to_potential_landscape(c, defect); }, py::arg("c"), py::arg("defect")) .def( - "erase_defect", [](py_cds& cds, fiction::cell c) { return cds.erase_defect(c); }, "c"_a) + "erase_defect", [](py_cds& cds, fiction::cell c) { return cds.erase_defect(c); }, py::arg("c")) .def( "assign_charge_state_by_cell_index", [](py_cds& cds, uint64_t index, fiction::sidb_charge_state cs, fiction::charge_index_mode index_mode) - { return cds.assign_charge_state_by_cell_index(index, cs, index_mode); }, "index"_a, "cs"_a, - "index_mode"_a = fiction::charge_index_mode::UPDATE_CHARGE_INDEX) + { return cds.assign_charge_state_by_cell_index(index, cs, index_mode); }, py::arg("index"), py::arg("cs"), + py::arg("index_mode") = fiction::charge_index_mode::UPDATE_CHARGE_INDEX) .def( - "get_charge_state", [](py_cds& cds, fiction::cell c) { return cds.get_charge_state(c); }, "c"_a) + "get_charge_state", [](py_cds& cds, fiction::cell c) { return cds.get_charge_state(c); }, + py::arg("c")) .def( "get_charge_state_by_index", - [](py_cds& cds, uint64_t index) { return cds.get_charge_state_by_index(index); }, "index"_a) + [](py_cds& cds, uint64_t index) { return cds.get_charge_state_by_index(index); }, py::arg("index")) .def("get_all_sidb_charges", [](py_cds& cds) { return cds.get_all_sidb_charges(); }) .def("negative_sidb_detection", [](py_cds& cds) { return cds.negative_sidb_detection(); }) .def( "get_nm_distance_between_sidbs", [](py_cds& cds, fiction::cell c1, fiction::cell c2) - { return cds.get_nm_distance_between_sidbs(c1, c2); }, "c1"_a, "c2"_a) + { return cds.get_nm_distance_between_sidbs(c1, c2); }, py::arg("c1"), py::arg("c2")) .def( "get_nm_distance_by_indices", [](py_cds& cds, uint64_t index1, uint64_t index2) - { return cds.get_nm_distance_by_indices(index1, index2); }, "index1"_a, "index2"_a) + { return cds.get_nm_distance_by_indices(index1, index2); }, py::arg("index1"), py::arg("index2")) .def( "calculate_chargeless_potential_between_sidbs_by_index", [](py_cds& cds, uint64_t index1, uint64_t index2) - { return cds.calculate_chargeless_potential_between_sidbs_by_index(index1, index2); }, "index1"_a, - "index2"_a) + { return cds.calculate_chargeless_potential_between_sidbs_by_index(index1, index2); }, py::arg("index1"), + py::arg("index2")) .def( "calculate_chargeless_potential_between_sidbs", [](py_cds& cds, fiction::cell c1, fiction::cell c2) - { return cds.calculate_chargeless_potential_between_sidbs(c1, c2); }, "c1"_a, "c2"_a) + { return cds.calculate_chargeless_potential_between_sidbs(c1, c2); }, py::arg("c1"), py::arg("c2")) .def( "get_chargeless_potential_between_sidbs", [](py_cds& cds, fiction::cell c1, fiction::cell c2) - { return cds.get_chargeless_potential_between_sidbs(c1, c2); }, "c1"_a, "c2"_a) + { return cds.get_chargeless_potential_between_sidbs(c1, c2); }, py::arg("c1"), py::arg("c2")) .def( "get_chargless_potential_by_indices", [](py_cds& cds, uint64_t index1, uint64_t index2) - { return cds.get_chargeless_potential_by_indices(index1, index2); }, "index1"_a, "index2"_a) + { return cds.get_chargeless_potential_by_indices(index1, index2); }, py::arg("index1"), py::arg("index2")) .def( "get_potential_between_sidbs", [](py_cds& cds, fiction::cell c1, fiction::cell c2) - { return cds.get_potential_between_sidbs(c1, c2); }, "c1"_a, "c2"_a) + { return cds.get_potential_between_sidbs(c1, c2); }, py::arg("c1"), py::arg("c2")) .def( "update_local_potential", [](py_cds& cds, fiction::charge_distribution_history history_mode) - { return cds.update_local_potential(history_mode); }, "consider_history"_a) + { return cds.update_local_potential(history_mode); }, py::arg("consider_history")) .def( "get_local_potential", [](py_cds& cds, fiction::cell c) { return cds.get_local_potential(c); }, - "c"_a) + py::arg("c")) .def( "get_local_potential_by_index", - [](py_cds& cds, uint64_t index) { return cds.get_local_potential_by_index(index); }, "index"_a) + [](py_cds& cds, uint64_t index) { return cds.get_local_potential_by_index(index); }, py::arg("index")) .def("assign_system_energy_to_zero", [](py_cds& cds) { return cds.assign_system_energy_to_zero(); }) .def("recompute_system_energy", [](py_cds& cds) { return cds.recompute_system_energy(); }) .def("get_system_energy", [](py_cds& cds) { return cds.get_system_energy(); }) @@ -169,29 +163,30 @@ void charge_distribution_surface_layout(pybind11::module& m, const std::string& return cds.increase_charge_index_by_one(dependent_cell_fixed, recompute_system_energy, consider_history, engine); }, - "dependent_cell_fixed"_a = fiction::dependent_cell_mode::FIXED, - "recompute_system_energy"_a = fiction::energy_calculation::UPDATE_ENERGY, - "consider_history"_a = fiction::charge_distribution_history::NEGLECT, - "engine"_a = fiction::exact_sidb_simulation_engine::EXGS) + py::arg("dependent_cell_fixed") = fiction::dependent_cell_mode::FIXED, + py::arg("recompute_system_energy") = fiction::energy_calculation::UPDATE_ENERGY, + py::arg("consider_history") = fiction::charge_distribution_history::NEGLECT, + py::arg("engine") = fiction::exact_sidb_simulation_engine::EXGS) .def("get_max_charge_index", &py_cds::get_max_charge_index) - .def("assign_charge_index", &py_cds::assign_charge_index, "charge_index"_a, "cdc"_a) - .def("adjacent_search", &py_cds::adjacent_search, "alpha"_a, "negative_indices"_a) - .def("assign_global_external_potential", &py_cds::assign_global_external_potential, "potential_value"_a, - "dependent_cell"_a = fiction::dependent_cell_mode::FIXED) + .def("assign_charge_index", &py_cds::assign_charge_index, py::arg("charge_index"), py::arg("cdc")) + .def("adjacent_search", &py_cds::adjacent_search, py::arg("alpha"), py::arg("negative_indices")) + .def("assign_global_external_potential", &py_cds::assign_global_external_potential, py::arg("potential_value"), + py::arg("dependent_cell") = fiction::dependent_cell_mode::FIXED) .def("is_three_state_simulation_required", &py_cds::is_three_state_simulation_required) .def("get_positive_candidates", &py_cds::get_positive_candidates) - .def("three_state_cell_to_index", &py_cds::three_state_cell_to_index, "c"_a) - .def("two_state_cell_to_index", &py_cds::two_state_cell_to_index, "c"_a) - .def("index_to_cell", &py_cds::index_to_cell, "index"_a) - .def("index_to_three_state_cell", &py_cds::index_to_three_state_cell, "index"_a) - .def("index_to_two_state_cell", &py_cds::index_to_two_state_cell, "index"_a) - - .def("chargeless_potential_at_given_distance", &py_cds::chargeless_potential_at_given_distance, "distance"_a) + .def("three_state_cell_to_index", &py_cds::three_state_cell_to_index, py::arg("c")) + .def("two_state_cell_to_index", &py_cds::two_state_cell_to_index, py::arg("c")) + .def("index_to_cell", &py_cds::index_to_cell, py::arg("index")) + .def("index_to_three_state_cell", &py_cds::index_to_three_state_cell, py::arg("index")) + .def("index_to_two_state_cell", &py_cds::index_to_two_state_cell, py::arg("index")) + + .def("chargeless_potential_at_given_distance", &py_cds::chargeless_potential_at_given_distance, + py::arg("distance")) .def("chargeless_potential_generated_by_defect_at_given_distance", - &py_cds::chargeless_potential_generated_by_defect_at_given_distance, "distance"_a, - "defect"_a = fiction::sidb_defect{}) - .def("assign_local_external_potential", &py_cds::assign_local_external_potential, "external_potential"_a) + &py_cds::chargeless_potential_generated_by_defect_at_given_distance, py::arg("distance"), + py::arg("defect") = fiction::sidb_defect{}) + .def("assign_local_external_potential", &py_cds::assign_local_external_potential, py::arg("external_potential")) .def("get_local_external_potentials", &py_cds::get_local_external_potentials) .def("get_local_defect_potentials", &py_cds::get_local_defect_potentials) .def("get_defects", &py_cds::get_defects) @@ -199,23 +194,24 @@ void charge_distribution_surface_layout(pybind11::module& m, const std::string& .def("update_charge_state_of_dependent_cell", &py_cds::update_charge_state_of_dependent_cell) .def("get_charge_index_of_sub_layout", &py_cds::get_charge_index_of_sub_layout) .def("charge_index_gray_code_to_charge_distribution", &py_cds::charge_index_gray_code_to_charge_distribution, - "new_gray_code"_a, "old_gray_code"_a) + py::arg("new_gray_code"), py::arg("old_gray_code")) .def("increase_charge_index_of_sub_layout_by_one", &py_cds::increase_charge_index_of_sub_layout_by_one, - "dependent_cell_fixed"_a = fiction::dependent_cell_mode::FIXED, - "recompute_system_energy"_a = fiction::energy_calculation::UPDATE_ENERGY, - "consider_history"_a = fiction::charge_distribution_history::NEGLECT, - "engine"_a = fiction::exact_sidb_simulation_engine::EXGS) - .def("assign_charge_index_by_gray_code", &py_cds::assign_charge_index_by_gray_code, "current_gray_code"_a, - "previous_gray_code"_a, "dependent_cell"_a = fiction::dependent_cell_mode::FIXED, - "energy_calc_mode"_a = fiction::energy_calculation::UPDATE_ENERGY, - "history_mode"_a = fiction::charge_distribution_history::NEGLECT) + py::arg("dependent_cell_fixed") = fiction::dependent_cell_mode::FIXED, + py::arg("recompute_system_energy") = fiction::energy_calculation::UPDATE_ENERGY, + py::arg("consider_history") = fiction::charge_distribution_history::NEGLECT, + py::arg("engine") = fiction::exact_sidb_simulation_engine::EXGS) + .def("assign_charge_index_by_gray_code", &py_cds::assign_charge_index_by_gray_code, + py::arg("current_gray_code"), py::arg("previous_gray_code"), + py::arg("dependent_cell") = fiction::dependent_cell_mode::FIXED, + py::arg("energy_calc_mode") = fiction::energy_calculation::UPDATE_ENERGY, + py::arg("history_mode") = fiction::charge_distribution_history::NEGLECT) .def("reset_charge_index_sub_layout", &py_cds::reset_charge_index_sub_layout) .def("get_max_charge_index_sub_layout", &py_cds::get_max_charge_index_sub_layout) - .def("assign_charge_index_by_two_gray_codes", &py_cds::assign_charge_index_by_two_gray_codes, "gray_code"_a, - "gray_code_old"_a) + .def("assign_charge_index_by_two_gray_codes", &py_cds::assign_charge_index_by_two_gray_codes, + py::arg("gray_code"), py::arg("gray_code_old")) .def("get_sidb_order", &py_cds::get_sidb_order) - .def("add_sidb", &py_cds::add_sidb, "cell"_a, "charge"_a) + .def("add_sidb", &py_cds::add_sidb, py::arg("cell"), py::arg("charge")) .def("cells", [](const py_cds& lyt) @@ -244,7 +240,7 @@ void charge_distribution_surface_layout(pybind11::module& m, const std::string& .def( "is_within_bounds", [](const py_cds& lyt, const fiction::coordinate& c) - { return lyt.is_within_bounds(c); }, "c"_a, DOC(fiction_cartesian_layout_is_within_bounds)) + { return lyt.is_within_bounds(c); }, py::arg("c"), DOC(fiction_cartesian_layout_is_within_bounds)) .def( "bounding_box_2d", diff --git a/bindings/pyfiction/include/pyfiction/technology/sidb_charge_state.hpp b/bindings/mnt/pyfiction/include/pyfiction/technology/sidb_charge_state.hpp similarity index 87% rename from bindings/pyfiction/include/pyfiction/technology/sidb_charge_state.hpp rename to bindings/mnt/pyfiction/include/pyfiction/technology/sidb_charge_state.hpp index 5b4903bd9..a5e7c0886 100644 --- a/bindings/pyfiction/include/pyfiction/technology/sidb_charge_state.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/technology/sidb_charge_state.hpp @@ -17,7 +17,7 @@ namespace pyfiction inline void sidb_charge_state(pybind11::module& m) { namespace py = pybind11; - using namespace pybind11::literals; + namespace py = pybind11; py::enum_(m, "sidb_charge_state", DOC(fiction_sidb_charge_state)) .value("NEGATIVE", fiction::sidb_charge_state::NEGATIVE, DOC(fiction_sidb_charge_state_NEGATIVE)) @@ -27,9 +27,9 @@ inline void sidb_charge_state(pybind11::module& m) ; - m.def("charge_state_to_sign", &fiction::charge_state_to_sign, "cs"_a, DOC(fiction_charge_state_to_sign)); - m.def("sign_to_charge_state", &fiction::sign_to_charge_state, "sg"_a, DOC(fiction_sign_to_charge_state)); - m.def("charge_configuration_to_string", &fiction::charge_configuration_to_string, "cc"_a, + m.def("charge_state_to_sign", &fiction::charge_state_to_sign, py::arg("cs"), DOC(fiction_charge_state_to_sign)); + m.def("sign_to_charge_state", &fiction::sign_to_charge_state, py::arg("sg"), DOC(fiction_sign_to_charge_state)); + m.def("charge_configuration_to_string", &fiction::charge_configuration_to_string, py::arg("cc"), DOC(fiction_charge_configuration_to_string)); } diff --git a/bindings/pyfiction/include/pyfiction/technology/sidb_defects.hpp b/bindings/mnt/pyfiction/include/pyfiction/technology/sidb_defects.hpp similarity index 79% rename from bindings/pyfiction/include/pyfiction/technology/sidb_defects.hpp rename to bindings/mnt/pyfiction/include/pyfiction/technology/sidb_defects.hpp index 4f4cd8439..b59e912c3 100644 --- a/bindings/pyfiction/include/pyfiction/technology/sidb_defects.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/technology/sidb_defects.hpp @@ -20,7 +20,6 @@ namespace pyfiction inline void sidb_defects(pybind11::module& m) { namespace py = pybind11; - using namespace py::literals; py::enum_(m, "sidb_defect_type", DOC(fiction_sidb_defect_type)) .value("NONE", fiction::sidb_defect_type::NONE, DOC(fiction_sidb_defect_type_NONE)) @@ -44,31 +43,33 @@ inline void sidb_defects(pybind11::module& m) py::class_(m, "sidb_defect", DOC(fiction_sidb_defect)) .def(py::init(), - "defect_type"_a = fiction::sidb_defect_type::UNKNOWN, "electric_charge"_a = 0.0, - "relative_permittivity"_a = 0.0, "screening_distance"_a = 0.0) + py::arg("defect_type") = fiction::sidb_defect_type::UNKNOWN, py::arg("electric_charge") = 0.0, + py::arg("relative_permittivity") = 0.0, py::arg("screening_distance") = 0.0) .def_readonly("type", &fiction::sidb_defect::type, DOC(fiction_sidb_defect_type)) .def_readonly("charge", &fiction::sidb_defect::charge, DOC(fiction_sidb_defect_charge)) .def_readonly("epsilon_r", &fiction::sidb_defect::epsilon_r, DOC(fiction_sidb_defect_epsilon_r)) .def_readonly("lambda_tf", &fiction::sidb_defect::lambda_tf, DOC(fiction_sidb_defect_lambda_tf)) - .def(py::self == py::self, "rhs"_a, DOC(fiction_sidb_defect_operator_eq)) - .def(py::self != py::self, "rhs"_a, DOC(fiction_sidb_defect_operator_ne)) + .def(py::self == py::self, py::arg("rhs"), DOC(fiction_sidb_defect_operator_eq)) + .def(py::self != py::self, py::arg("rhs"), DOC(fiction_sidb_defect_operator_ne)) ; - m.def("is_charged_defect_type", &fiction::is_charged_defect_type, "defect"_a, DOC(fiction_is_charged_defect_type)); - m.def("is_neutral_defect_type", &fiction::is_neutral_defect_type, "defect"_a, DOC(fiction_is_neutral_defect_type)); + m.def("is_charged_defect_type", &fiction::is_charged_defect_type, py::arg("defect"), + DOC(fiction_is_charged_defect_type)); + m.def("is_neutral_defect_type", &fiction::is_neutral_defect_type, py::arg("defect"), + DOC(fiction_is_neutral_defect_type)); - m.def("is_positively_charged_defect", &fiction::is_positively_charged_defect, "defect"_a, + m.def("is_positively_charged_defect", &fiction::is_positively_charged_defect, py::arg("defect"), DOC(fiction_is_positively_charged_defect)); - m.def("is_negatively_charged_defect", &fiction::is_negatively_charged_defect, "defect"_a, + m.def("is_negatively_charged_defect", &fiction::is_negatively_charged_defect, py::arg("defect"), DOC(fiction_is_negatively_charged_defect)); - m.def("is_neutrally_charged_defect", &fiction::is_neutrally_charged_defect, "defect"_a, + m.def("is_neutrally_charged_defect", &fiction::is_neutrally_charged_defect, py::arg("defect"), DOC(fiction_is_neutrally_charged_defect)); - m.def("defect_extent", &fiction::defect_extent, "defect"_a, "charged_defect_spacing_overwrite"_a, - "neutral_defect_spacing_overwrite"_a, DOC(fiction_defect_extent)); + m.def("defect_extent", &fiction::defect_extent, py::arg("defect"), py::arg("charged_defect_spacing_overwrite"), + py::arg("neutral_defect_spacing_overwrite"), DOC(fiction_defect_extent)); } } // namespace pyfiction diff --git a/bindings/pyfiction/include/pyfiction/technology/sidb_lattice.hpp b/bindings/mnt/pyfiction/include/pyfiction/technology/sidb_lattice.hpp similarity index 91% rename from bindings/pyfiction/include/pyfiction/technology/sidb_lattice.hpp rename to bindings/mnt/pyfiction/include/pyfiction/technology/sidb_lattice.hpp index afe5f36f4..4fc8c310d 100644 --- a/bindings/pyfiction/include/pyfiction/technology/sidb_lattice.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/technology/sidb_lattice.hpp @@ -32,7 +32,7 @@ template void sidb_lattice_cell_level_layout(pybind11::module& m) { namespace py = pybind11; - using namespace pybind11::literals; + namespace py = pybind11; // fetch technology name auto orientation = std::string{fiction::sidb_lattice_name}; @@ -46,8 +46,8 @@ void sidb_lattice_cell_level_layout(pybind11::module& m) py::class_(m, fmt::format("sidb_{}_lattice", orientation).c_str(), DOC(fiction_cell_level_layout), py::module_local()) .def(py::init<>()) - .def(py::init&, const std::string&>(), "dimension"_a, "name"_a = "", - DOC(fiction_sidb_lattice)) + .def(py::init&, const std::string&>(), py::arg("dimension"), + py::arg("name") = "", DOC(fiction_sidb_lattice)) ; } diff --git a/bindings/pyfiction/include/pyfiction/technology/sidb_nm_distance.hpp b/bindings/mnt/pyfiction/include/pyfiction/technology/sidb_nm_distance.hpp similarity index 83% rename from bindings/pyfiction/include/pyfiction/technology/sidb_nm_distance.hpp rename to bindings/mnt/pyfiction/include/pyfiction/technology/sidb_nm_distance.hpp index de5d59614..0d7607832 100644 --- a/bindings/pyfiction/include/pyfiction/technology/sidb_nm_distance.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/technology/sidb_nm_distance.hpp @@ -23,10 +23,10 @@ namespace detail template void nanometer_distance(pybind11::module& m, const std::string& lattice = "") { - using namespace pybind11::literals; + namespace py = pybind11; - m.def(fmt::format("sidb_nm_distance{}", lattice).c_str(), &fiction::sidb_nm_distance, "lyt"_a, "source"_a, - "target"_a, DOC(fiction_sidb_nm_distance)); + m.def(fmt::format("sidb_nm_distance{}", lattice).c_str(), &fiction::sidb_nm_distance, py::arg("lyt"), + py::arg("source"), py::arg("target"), DOC(fiction_sidb_nm_distance)); } } // namespace detail diff --git a/bindings/pyfiction/include/pyfiction/technology/sidb_nm_position.hpp b/bindings/mnt/pyfiction/include/pyfiction/technology/sidb_nm_position.hpp similarity index 83% rename from bindings/pyfiction/include/pyfiction/technology/sidb_nm_position.hpp rename to bindings/mnt/pyfiction/include/pyfiction/technology/sidb_nm_position.hpp index 2e7ba2de6..af79267d6 100644 --- a/bindings/pyfiction/include/pyfiction/technology/sidb_nm_position.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/technology/sidb_nm_position.hpp @@ -22,9 +22,10 @@ namespace detail template void sidb_nm_position(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; - m.def("sidb_nm_position", &fiction::sidb_nm_position, "lyt"_a, "c"_a, DOC(fiction_sidb_nm_position)); + m.def("sidb_nm_position", &fiction::sidb_nm_position, py::arg("lyt"), py::arg("c"), + DOC(fiction_sidb_nm_position)); } } // namespace detail diff --git a/bindings/pyfiction/include/pyfiction/types.hpp b/bindings/mnt/pyfiction/include/pyfiction/types.hpp similarity index 100% rename from bindings/pyfiction/include/pyfiction/types.hpp rename to bindings/mnt/pyfiction/include/pyfiction/types.hpp diff --git a/bindings/pyfiction/include/pyfiction/utils/layout_utils.hpp b/bindings/mnt/pyfiction/include/pyfiction/utils/layout_utils.hpp similarity index 87% rename from bindings/pyfiction/include/pyfiction/utils/layout_utils.hpp rename to bindings/mnt/pyfiction/include/pyfiction/utils/layout_utils.hpp index 2c00b73c1..bf3777f58 100644 --- a/bindings/pyfiction/include/pyfiction/utils/layout_utils.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/utils/layout_utils.hpp @@ -24,37 +24,37 @@ namespace detail template void num_adjacent_coordinates(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; - m.def("num_adjacent_coordinates", &fiction::num_adjacent_coordinates, "lyt"_a, "c"_a, + m.def("num_adjacent_coordinates", &fiction::num_adjacent_coordinates, py::arg("lyt"), py::arg("c"), DOC(fiction_num_adjacent_coordinates)); } template void normalize_layout_coordinates(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; - m.def("normalize_layout_coordinates", &fiction::normalize_layout_coordinates, "lyt"_a, + m.def("normalize_layout_coordinates", &fiction::normalize_layout_coordinates, py::arg("lyt"), DOC(fiction_normalize_layout_coordinates)); } template void convert_to_siqad_coordinates(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; - m.def("convert_layout_to_siqad_coordinates", &fiction::convert_layout_to_siqad_coordinates, "lyt"_a, + m.def("convert_layout_to_siqad_coordinates", &fiction::convert_layout_to_siqad_coordinates, py::arg("lyt"), DOC(fiction_convert_layout_to_siqad_coordinates)); } template void random_coordinate(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; - m.def("random_coordinate", &fiction::random_coordinate>, "coordinate1"_a, "coordinate_2"_a, - DOC(fiction_random_coordinate)); + m.def("random_coordinate", &fiction::random_coordinate>, py::arg("coordinate1"), + py::arg("coordinate_2"), DOC(fiction_random_coordinate)); } } // namespace detail diff --git a/bindings/pyfiction/include/pyfiction/utils/name_utils.hpp b/bindings/mnt/pyfiction/include/pyfiction/utils/name_utils.hpp similarity index 86% rename from bindings/pyfiction/include/pyfiction/utils/name_utils.hpp rename to bindings/mnt/pyfiction/include/pyfiction/utils/name_utils.hpp index 244a967a0..dcddd3f22 100644 --- a/bindings/pyfiction/include/pyfiction/utils/name_utils.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/utils/name_utils.hpp @@ -24,17 +24,17 @@ namespace detail template void get_name(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; - m.def("get_name", &fiction::get_name, "ntk_or_lyt"_a, DOC(fiction_get_name)); + m.def("get_name", &fiction::get_name, py::arg("ntk_or_lyt"), DOC(fiction_get_name)); } template void set_name(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; - m.def("set_name", &fiction::set_name, "ntk_or_lyt"_a, "name"_a, DOC(fiction_set_name)); + m.def("set_name", &fiction::set_name, py::arg("ntk_or_lyt"), py::arg("name"), DOC(fiction_set_name)); } } // namespace detail diff --git a/bindings/pyfiction/include/pyfiction/utils/network_utils.hpp b/bindings/mnt/pyfiction/include/pyfiction/utils/network_utils.hpp similarity index 86% rename from bindings/pyfiction/include/pyfiction/utils/network_utils.hpp rename to bindings/mnt/pyfiction/include/pyfiction/utils/network_utils.hpp index 8388a8cc2..8a37339bf 100644 --- a/bindings/pyfiction/include/pyfiction/utils/network_utils.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/utils/network_utils.hpp @@ -24,10 +24,10 @@ namespace detail template void has_high_degree_fanin_nodes(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; - m.def("has_high_degree_fanin_nodes", &fiction::has_high_degree_fanin_nodes, "ntk"_a, "threshold"_a = 2, - DOC(fiction_has_high_degree_fanin_nodes)); + m.def("has_high_degree_fanin_nodes", &fiction::has_high_degree_fanin_nodes, py::arg("ntk"), + py::arg("threshold") = 2, DOC(fiction_has_high_degree_fanin_nodes)); } } // namespace detail diff --git a/bindings/pyfiction/include/pyfiction/utils/placement_utils.hpp b/bindings/mnt/pyfiction/include/pyfiction/utils/placement_utils.hpp similarity index 83% rename from bindings/pyfiction/include/pyfiction/utils/placement_utils.hpp rename to bindings/mnt/pyfiction/include/pyfiction/utils/placement_utils.hpp index d762936e5..64472b499 100644 --- a/bindings/pyfiction/include/pyfiction/utils/placement_utils.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/utils/placement_utils.hpp @@ -25,39 +25,40 @@ namespace detail template void reserve_input_nodes(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; - m.def("reserve_input_nodes", &fiction::reserve_input_nodes, "lyt"_a, "ntk"_a); + m.def("reserve_input_nodes", &fiction::reserve_input_nodes, py::arg("lyt"), py::arg("ntk")); } template void place(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; m.def( "place", [](Lyt& lyt, const fiction::tile& t, const Ntk& ntk, const mockturtle::node& n) - { return fiction::place(lyt, t, ntk, n); }, "lyt"_a, "t"_a, "ntk"_a, "n"_a); // TODO, DOC(fiction_place)); + { return fiction::place(lyt, t, ntk, n); }, py::arg("lyt"), py::arg("t"), py::arg("ntk"), + py::arg("n")); // TODO, DOC(fiction_place)); m.def( "place", [](Lyt& lyt, const fiction::tile& t, const Ntk& ntk, const mockturtle::node& n, const mockturtle::signal& a) { return fiction::place(lyt, t, ntk, n, a); }, - "lyt"_a, "t"_a, "ntk"_a, "n"_a, "a"_a); + py::arg("lyt"), py::arg("t"), py::arg("ntk"), py::arg("n"), py::arg("a")); m.def( "place", [](Lyt& lyt, const fiction::tile& t, const Ntk& ntk, const mockturtle::node& n, const mockturtle::signal& a, const mockturtle::signal& b, const std::optional& c = std::nullopt) { return fiction::place(lyt, t, ntk, n, a, b, c); }, - "lyt"_a, "t"_a, "ntk"_a, "n"_a, "a"_a, "b"_a, "c"_a); + py::arg("lyt"), py::arg("t"), py::arg("ntk"), py::arg("n"), py::arg("a"), py::arg("b"), py::arg("c")); m.def( "place", [](Lyt& lyt, const fiction::tile& t, const Ntk& ntk, const mockturtle::node& n, const mockturtle::signal& a, const mockturtle::signal& b, const mockturtle::signal& c) { return fiction::place(lyt, t, ntk, n, a, b, c); }, - "lyt"_a, "t"_a, "ntk"_a, "n"_a, "a"_a, "b"_a, "c"_a); + py::arg("lyt"), py::arg("t"), py::arg("ntk"), py::arg("n"), py::arg("a"), py::arg("b"), py::arg("c")); } } // namespace detail diff --git a/bindings/pyfiction/include/pyfiction/utils/routing_utils.hpp b/bindings/mnt/pyfiction/include/pyfiction/utils/routing_utils.hpp similarity index 89% rename from bindings/pyfiction/include/pyfiction/utils/routing_utils.hpp rename to bindings/mnt/pyfiction/include/pyfiction/utils/routing_utils.hpp index 888480848..38a2fc4b4 100644 --- a/bindings/pyfiction/include/pyfiction/utils/routing_utils.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/utils/routing_utils.hpp @@ -26,16 +26,16 @@ namespace detail template void is_crossable_wire(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; - m.def("is_crossable_wire", &fiction::is_crossable_wire, "lyt"_a, "src"_a, "successor"_a, + m.def("is_crossable_wire", &fiction::is_crossable_wire, py::arg("lyt"), py::arg("src"), py::arg("successor"), DOC(fiction_is_crossable_wire)); } template void route_path(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; m.def( "route_path", @@ -47,13 +47,13 @@ void route_path(pybind11::module& m) fiction::route_path(lyt, converted_path); }, - "layout"_a, "path"_a, DOC(fiction_route_path)); + py::arg("layout"), py::arg("path"), DOC(fiction_route_path)); } template void extract_routing_objectives(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; m.def( "extract_routing_objectives", @@ -68,15 +68,15 @@ void extract_routing_objectives(pybind11::module& m) return converted_objectives; }, - "layout"_a, DOC(fiction_extract_routing_objectives)); + py::arg("layout"), DOC(fiction_extract_routing_objectives)); } template void clear_routing(pybind11::module& m) { - using namespace pybind11::literals; + namespace py = pybind11; - m.def("clear_routing", &fiction::clear_routing, "lyt"_a, DOC(fiction_clear_routing)); + m.def("clear_routing", &fiction::clear_routing, py::arg("lyt"), DOC(fiction_clear_routing)); } } // namespace detail diff --git a/bindings/pyfiction/include/pyfiction/utils/truth_table_utils.hpp b/bindings/mnt/pyfiction/include/pyfiction/utils/truth_table_utils.hpp similarity index 100% rename from bindings/pyfiction/include/pyfiction/utils/truth_table_utils.hpp rename to bindings/mnt/pyfiction/include/pyfiction/utils/truth_table_utils.hpp diff --git a/bindings/pyfiction/include/pyfiction/utils/version_info.hpp b/bindings/mnt/pyfiction/include/pyfiction/utils/version_info.hpp similarity index 94% rename from bindings/pyfiction/include/pyfiction/utils/version_info.hpp rename to bindings/mnt/pyfiction/include/pyfiction/utils/version_info.hpp index f0a187c7b..bce6f4c23 100644 --- a/bindings/pyfiction/include/pyfiction/utils/version_info.hpp +++ b/bindings/mnt/pyfiction/include/pyfiction/utils/version_info.hpp @@ -12,7 +12,7 @@ namespace pyfiction { -using namespace pybind11::literals; +namespace py = pybind11; inline void version_info(pybind11::module& m) { diff --git a/bindings/pyfiction/pyfiction.cpp b/bindings/mnt/pyfiction/pyfiction.cpp similarity index 100% rename from bindings/pyfiction/pyfiction.cpp rename to bindings/mnt/pyfiction/pyfiction.cpp diff --git a/bindings/pyfiction/test/__init__.py b/bindings/mnt/pyfiction/test/__init__.py similarity index 100% rename from bindings/pyfiction/test/__init__.py rename to bindings/mnt/pyfiction/test/__init__.py diff --git a/bindings/pyfiction/test/algorithms/__init__.py b/bindings/mnt/pyfiction/test/algorithms/__init__.py similarity index 100% rename from bindings/pyfiction/test/algorithms/__init__.py rename to bindings/mnt/pyfiction/test/algorithms/__init__.py diff --git a/bindings/pyfiction/test/algorithms/physical_design/__init__.py b/bindings/mnt/pyfiction/test/algorithms/iter/__init__.py similarity index 84% rename from bindings/pyfiction/test/algorithms/physical_design/__init__.py rename to bindings/mnt/pyfiction/test/algorithms/iter/__init__.py index 5fde0b8ad..de323d0d7 100644 --- a/bindings/pyfiction/test/algorithms/physical_design/__init__.py +++ b/bindings/mnt/pyfiction/test/algorithms/iter/__init__.py @@ -4,7 +4,7 @@ import sys from pathlib import Path -if sys.platform == "win32" and sys.version_info > (3, 8, 0) and "Z3_ROOT" in os.environ: +if sys.platform == "win32" and "Z3_ROOT" in os.environ: lib_path = Path(os.environ["Z3_ROOT"]) / "lib" if lib_path.exists(): os.add_dll_directory(str(lib_path)) diff --git a/bindings/pyfiction/test/algorithms/iter/bdl_input_iterator.py b/bindings/mnt/pyfiction/test/algorithms/iter/bdl_input_iterator.py similarity index 98% rename from bindings/pyfiction/test/algorithms/iter/bdl_input_iterator.py rename to bindings/mnt/pyfiction/test/algorithms/iter/bdl_input_iterator.py index f0a667b22..def79a95f 100644 --- a/bindings/pyfiction/test/algorithms/iter/bdl_input_iterator.py +++ b/bindings/mnt/pyfiction/test/algorithms/iter/bdl_input_iterator.py @@ -1,4 +1,4 @@ -from mnt.pyfiction import * +from mnt.pyfiction import sidb_100_lattice, bdl_input_iterator_100, sidb_technology import unittest diff --git a/bindings/pyfiction/test/algorithms/simulation/__init__.py b/bindings/mnt/pyfiction/test/algorithms/network_transformation/__init__.py similarity index 84% rename from bindings/pyfiction/test/algorithms/simulation/__init__.py rename to bindings/mnt/pyfiction/test/algorithms/network_transformation/__init__.py index 5fde0b8ad..de323d0d7 100644 --- a/bindings/pyfiction/test/algorithms/simulation/__init__.py +++ b/bindings/mnt/pyfiction/test/algorithms/network_transformation/__init__.py @@ -4,7 +4,7 @@ import sys from pathlib import Path -if sys.platform == "win32" and sys.version_info > (3, 8, 0) and "Z3_ROOT" in os.environ: +if sys.platform == "win32" and "Z3_ROOT" in os.environ: lib_path = Path(os.environ["Z3_ROOT"]) / "lib" if lib_path.exists(): os.add_dll_directory(str(lib_path)) diff --git a/bindings/pyfiction/test/algorithms/network_transformation/test_fanout_substitution.py b/bindings/mnt/pyfiction/test/algorithms/network_transformation/test_fanout_substitution.py similarity index 90% rename from bindings/pyfiction/test/algorithms/network_transformation/test_fanout_substitution.py rename to bindings/mnt/pyfiction/test/algorithms/network_transformation/test_fanout_substitution.py index 4a35c3508..60beeb863 100644 --- a/bindings/pyfiction/test/algorithms/network_transformation/test_fanout_substitution.py +++ b/bindings/mnt/pyfiction/test/algorithms/network_transformation/test_fanout_substitution.py @@ -1,4 +1,5 @@ -from mnt.pyfiction import * +from mnt.pyfiction import (read_technology_network, is_fanout_substituted, fanout_substitution, + fanout_substitution_params, substitution_strategy) import unittest import os diff --git a/bindings/pyfiction/test/algorithms/network_transformation/test_network_balancing.py b/bindings/mnt/pyfiction/test/algorithms/network_transformation/test_network_balancing.py similarity index 88% rename from bindings/pyfiction/test/algorithms/network_transformation/test_network_balancing.py rename to bindings/mnt/pyfiction/test/algorithms/network_transformation/test_network_balancing.py index 6ed976b56..5cf56e51b 100644 --- a/bindings/pyfiction/test/algorithms/network_transformation/test_network_balancing.py +++ b/bindings/mnt/pyfiction/test/algorithms/network_transformation/test_network_balancing.py @@ -1,4 +1,4 @@ -from mnt.pyfiction import * +from mnt.pyfiction import read_technology_network, is_balanced, network_balancing, network_balancing_params import unittest import os diff --git a/bindings/pyfiction/test/algorithms/network_transformation/test_technology_mapping.py b/bindings/mnt/pyfiction/test/algorithms/network_transformation/test_technology_mapping.py similarity index 83% rename from bindings/pyfiction/test/algorithms/network_transformation/test_technology_mapping.py rename to bindings/mnt/pyfiction/test/algorithms/network_transformation/test_technology_mapping.py index 2b90d4eff..78657e857 100644 --- a/bindings/pyfiction/test/algorithms/network_transformation/test_technology_mapping.py +++ b/bindings/mnt/pyfiction/test/algorithms/network_transformation/test_technology_mapping.py @@ -1,4 +1,6 @@ -from mnt.pyfiction import * +from mnt.pyfiction import (read_technology_network, technology_mapping, equivalence_checking, eq_type, and_or_not, + and_or_not_maj, all_standard_2_input_functions, all_standard_3_input_functions, + all_supported_standard_functions, technology_mapping_stats) import unittest import os diff --git a/bindings/pyfiction/test/algorithms/simulation/sidb/__init__.py b/bindings/mnt/pyfiction/test/algorithms/path_finding/__init__.py similarity index 84% rename from bindings/pyfiction/test/algorithms/simulation/sidb/__init__.py rename to bindings/mnt/pyfiction/test/algorithms/path_finding/__init__.py index 5fde0b8ad..de323d0d7 100644 --- a/bindings/pyfiction/test/algorithms/simulation/sidb/__init__.py +++ b/bindings/mnt/pyfiction/test/algorithms/path_finding/__init__.py @@ -4,7 +4,7 @@ import sys from pathlib import Path -if sys.platform == "win32" and sys.version_info > (3, 8, 0) and "Z3_ROOT" in os.environ: +if sys.platform == "win32" and "Z3_ROOT" in os.environ: lib_path = Path(os.environ["Z3_ROOT"]) / "lib" if lib_path.exists(): os.add_dll_directory(str(lib_path)) diff --git a/bindings/pyfiction/test/algorithms/path_finding/test_a_star.py b/bindings/mnt/pyfiction/test/algorithms/path_finding/test_a_star.py similarity index 94% rename from bindings/pyfiction/test/algorithms/path_finding/test_a_star.py rename to bindings/mnt/pyfiction/test/algorithms/path_finding/test_a_star.py index 1cafb9133..57dcae38f 100644 --- a/bindings/pyfiction/test/algorithms/path_finding/test_a_star.py +++ b/bindings/mnt/pyfiction/test/algorithms/path_finding/test_a_star.py @@ -1,6 +1,10 @@ import unittest -from mnt.pyfiction import * +from mnt.pyfiction import (cartesian_layout, shifted_cartesian_layout, hexagonal_layout, a_star, offset_coordinate, + clocked_cartesian_layout, cartesian_gate_layout, shifted_cartesian_gate_layout, + clocked_shifted_cartesian_layout, hexagonal_gate_layout, clocked_hexagonal_layout, + cartesian_obstruction_layout, shifted_cartesian_obstruction_layout, + hexagonal_obstruction_layout, a_star_params, a_star_distance) class TestAStar(unittest.TestCase): diff --git a/bindings/pyfiction/test/algorithms/path_finding/test_distance.py b/bindings/mnt/pyfiction/test/algorithms/path_finding/test_distance.py similarity index 93% rename from bindings/pyfiction/test/algorithms/path_finding/test_distance.py rename to bindings/mnt/pyfiction/test/algorithms/path_finding/test_distance.py index 4990939de..a716a2d56 100644 --- a/bindings/pyfiction/test/algorithms/path_finding/test_distance.py +++ b/bindings/mnt/pyfiction/test/algorithms/path_finding/test_distance.py @@ -1,4 +1,7 @@ -from mnt.pyfiction import * +from mnt.pyfiction import (cartesian_layout, clocked_cartesian_layout, shifted_cartesian_layout, cartesian_gate_layout, + clocked_shifted_cartesian_layout, shifted_cartesian_gate_layout, hexagonal_layout, + clocked_hexagonal_layout, hexagonal_gate_layout, offset_coordinate, manhattan_distance, + euclidean_distance, squared_euclidean_distance, twoddwave_distance, chebyshev_distance) import unittest diff --git a/bindings/pyfiction/test/algorithms/path_finding/test_enumerate_all_paths.py b/bindings/mnt/pyfiction/test/algorithms/path_finding/test_enumerate_all_paths.py similarity index 79% rename from bindings/pyfiction/test/algorithms/path_finding/test_enumerate_all_paths.py rename to bindings/mnt/pyfiction/test/algorithms/path_finding/test_enumerate_all_paths.py index e77bb962b..dfcf9970d 100644 --- a/bindings/pyfiction/test/algorithms/path_finding/test_enumerate_all_paths.py +++ b/bindings/mnt/pyfiction/test/algorithms/path_finding/test_enumerate_all_paths.py @@ -1,4 +1,7 @@ -from mnt.pyfiction import * +from mnt.pyfiction import (cartesian_layout, shifted_cartesian_layout, hexagonal_layout, enumerate_all_paths, + offset_coordinate, clocked_cartesian_layout, cartesian_gate_layout, + clocked_shifted_cartesian_layout, shifted_cartesian_gate_layout, clocked_hexagonal_layout, + hexagonal_gate_layout) import unittest diff --git a/bindings/pyfiction/test/algorithms/path_finding/test_k_shortest_paths.py b/bindings/mnt/pyfiction/test/algorithms/path_finding/test_k_shortest_paths.py similarity index 80% rename from bindings/pyfiction/test/algorithms/path_finding/test_k_shortest_paths.py rename to bindings/mnt/pyfiction/test/algorithms/path_finding/test_k_shortest_paths.py index 7b249f7f0..1433bbf99 100644 --- a/bindings/pyfiction/test/algorithms/path_finding/test_k_shortest_paths.py +++ b/bindings/mnt/pyfiction/test/algorithms/path_finding/test_k_shortest_paths.py @@ -1,4 +1,7 @@ -from mnt.pyfiction import * +from mnt.pyfiction import (cartesian_layout, shifted_cartesian_layout, hexagonal_layout, yen_k_shortest_paths, + offset_coordinate, clocked_cartesian_layout, cartesian_gate_layout, + clocked_shifted_cartesian_layout, shifted_cartesian_gate_layout, clocked_hexagonal_layout, + hexagonal_gate_layout) import unittest diff --git a/bindings/pyfiction/test/algorithms/path_finding/__init__.py b/bindings/mnt/pyfiction/test/algorithms/physical_design/__init__.py similarity index 84% rename from bindings/pyfiction/test/algorithms/path_finding/__init__.py rename to bindings/mnt/pyfiction/test/algorithms/physical_design/__init__.py index 5fde0b8ad..de323d0d7 100644 --- a/bindings/pyfiction/test/algorithms/path_finding/__init__.py +++ b/bindings/mnt/pyfiction/test/algorithms/physical_design/__init__.py @@ -4,7 +4,7 @@ import sys from pathlib import Path -if sys.platform == "win32" and sys.version_info > (3, 8, 0) and "Z3_ROOT" in os.environ: +if sys.platform == "win32" and "Z3_ROOT" in os.environ: lib_path = Path(os.environ["Z3_ROOT"]) / "lib" if lib_path.exists(): os.add_dll_directory(str(lib_path)) diff --git a/bindings/pyfiction/test/algorithms/physical_design/test_apply_gate_library.py b/bindings/mnt/pyfiction/test/algorithms/physical_design/test_apply_gate_library.py similarity index 81% rename from bindings/pyfiction/test/algorithms/physical_design/test_apply_gate_library.py rename to bindings/mnt/pyfiction/test/algorithms/physical_design/test_apply_gate_library.py index 82258e475..df1e4de2e 100644 --- a/bindings/pyfiction/test/algorithms/physical_design/test_apply_gate_library.py +++ b/bindings/mnt/pyfiction/test/algorithms/physical_design/test_apply_gate_library.py @@ -1,11 +1,10 @@ -from mnt.pyfiction import * -from dotenv import load_dotenv +from mnt.pyfiction import (read_technology_network, orthogonal, apply_qca_one_library, exact_params, exact_hexagonal, + apply_bestagon_library, technology_constraints, exact_shifted_cartesian, + apply_topolinano_library) import unittest import os dir_path = os.path.dirname(os.path.realpath(__file__)) -load_dotenv() -z3 = os.environ.get("z3", "OFF") class TestApplyGateLibrary(unittest.TestCase): @@ -16,7 +15,6 @@ def test_apply_qca_one_library(self): cell_layout = apply_qca_one_library(layout) - @unittest.skipIf(z3 == "OFF", "Z3 not enabled") def test_apply_bestagon_library(self): network = read_technology_network(dir_path + "/../../resources/mux21.v") @@ -29,7 +27,6 @@ def test_apply_bestagon_library(self): cell_layout = apply_bestagon_library(layout) - @unittest.skipIf(z3 == "OFF", "Z3 not enabled") def test_apply_topolinano_library(self): network = read_technology_network(dir_path + "/../../resources/mux21.v") diff --git a/bindings/pyfiction/test/algorithms/physical_design/test_color_routing.py b/bindings/mnt/pyfiction/test/algorithms/physical_design/test_color_routing.py similarity index 89% rename from bindings/pyfiction/test/algorithms/physical_design/test_color_routing.py rename to bindings/mnt/pyfiction/test/algorithms/physical_design/test_color_routing.py index 6d489fa0d..c2f98f231 100644 --- a/bindings/pyfiction/test/algorithms/physical_design/test_color_routing.py +++ b/bindings/mnt/pyfiction/test/algorithms/physical_design/test_color_routing.py @@ -1,6 +1,7 @@ import unittest -from mnt.pyfiction import * +from mnt.pyfiction import (cartesian_gate_layout, hexagonal_gate_layout, offset_coordinate, color_routing, + color_routing_params) class TestColorRouting(unittest.TestCase): diff --git a/bindings/pyfiction/test/algorithms/physical_design/test_design_sidb_gates.py b/bindings/mnt/pyfiction/test/algorithms/physical_design/test_design_sidb_gates.py similarity index 95% rename from bindings/pyfiction/test/algorithms/physical_design/test_design_sidb_gates.py rename to bindings/mnt/pyfiction/test/algorithms/physical_design/test_design_sidb_gates.py index a400504ea..7166fdcaf 100644 --- a/bindings/pyfiction/test/algorithms/physical_design/test_design_sidb_gates.py +++ b/bindings/mnt/pyfiction/test/algorithms/physical_design/test_design_sidb_gates.py @@ -1,6 +1,8 @@ import unittest -from mnt.pyfiction import * +from mnt.pyfiction import (sidb_100_lattice, sidb_technology, design_sidb_gates_params, design_sidb_gates_mode, + sidb_simulation_engine, design_sidb_gates, create_and_tt, sidb_111_lattice, + operational_condition, create_nor_tt) class TestDesignSiDBGates(unittest.TestCase): @@ -42,7 +44,6 @@ def test_siqad_and_gate_skeleton_100(self): self.assertEqual(len(designed_gates), 23) - def test_nor_gate_111(self): layout = sidb_111_lattice((30, 30)) @@ -94,7 +95,6 @@ def test_nor_gate_111(self): designed_gates = design_sidb_gates(layout, [create_nor_tt()], params) self.assertEqual(len(designed_gates), 175) - def test_nor_gate_111_quickcell(self): layout = sidb_111_lattice((30, 30)) diff --git a/bindings/pyfiction/test/algorithms/physical_design/test_exact.py b/bindings/mnt/pyfiction/test/algorithms/physical_design/test_exact.py similarity index 83% rename from bindings/pyfiction/test/algorithms/physical_design/test_exact.py rename to bindings/mnt/pyfiction/test/algorithms/physical_design/test_exact.py index 4f2a7f97c..6f59d2cdd 100644 --- a/bindings/pyfiction/test/algorithms/physical_design/test_exact.py +++ b/bindings/mnt/pyfiction/test/algorithms/physical_design/test_exact.py @@ -1,22 +1,18 @@ -from mnt.pyfiction import * -from dotenv import load_dotenv +from mnt.pyfiction import (read_technology_network, exact_cartesian, equivalence_checking, eq_type, exact_params, + exact_stats, exact_hexagonal) import unittest import os dir_path = os.path.dirname(os.path.realpath(__file__)) -load_dotenv() -z3 = os.environ.get("z3", "OFF") class TestExactCartesianPhysicalDesign(unittest.TestCase): - @unittest.skipIf(z3 == "OFF", "Z3 not enabled") def test_exact_default(self): network = read_technology_network(dir_path + "/../../resources/mux21.v") layout = exact_cartesian(network) self.assertEqual(equivalence_checking(network, layout), eq_type.STRONG) - @unittest.skipIf(z3 == "OFF", "Z3 not enabled") def test_exact_with_parameters(self): network = read_technology_network(dir_path + "/../../resources/mux21.v") @@ -29,7 +25,6 @@ def test_exact_with_parameters(self): self.assertEqual(equivalence_checking(network, layout), eq_type.STRONG) - @unittest.skipIf(z3 == "OFF", "Z3 not enabled") def test_exact_with_stats(self): network = read_technology_network(dir_path + "/../../resources/mux21.v") @@ -42,13 +37,11 @@ def test_exact_with_stats(self): class TestExactHexagonalPhysicalDesign(unittest.TestCase): - @unittest.skipIf(z3 == "OFF", "Z3 not enabled") def test_exact_default(self): network = read_technology_network(dir_path + "/../../resources/mux21.v") layout = exact_hexagonal(network) self.assertEqual(equivalence_checking(network, layout), eq_type.STRONG) - @unittest.skipIf(z3 == "OFF", "Z3 not enabled") def test_exact_with_parameters(self): network = read_technology_network(dir_path + "/../../resources/mux21.v") @@ -61,7 +54,6 @@ def test_exact_with_parameters(self): self.assertEqual(equivalence_checking(network, layout), eq_type.STRONG) - @unittest.skipIf(z3 == "OFF", "Z3 not enabled") def test_exact_with_stats(self): network = read_technology_network(dir_path + "/../../resources/mux21.v") diff --git a/bindings/pyfiction/test/algorithms/physical_design/test_graph_oriented_layout_design.py b/bindings/mnt/pyfiction/test/algorithms/physical_design/test_graph_oriented_layout_design.py similarity index 92% rename from bindings/pyfiction/test/algorithms/physical_design/test_graph_oriented_layout_design.py rename to bindings/mnt/pyfiction/test/algorithms/physical_design/test_graph_oriented_layout_design.py index d31669828..a83891f9a 100644 --- a/bindings/pyfiction/test/algorithms/physical_design/test_graph_oriented_layout_design.py +++ b/bindings/mnt/pyfiction/test/algorithms/physical_design/test_graph_oriented_layout_design.py @@ -1,4 +1,6 @@ -from mnt.pyfiction import * +from mnt.pyfiction import (read_technology_network, graph_oriented_layout_design_stats, graph_oriented_layout_design, + graph_oriented_layout_design_params, eq_type, equivalence_checking, gold_cost_objective, + gold_effort_mode) import unittest import os @@ -89,5 +91,6 @@ def test_graph_oriented_layout_design_with_multithreading(self): self.assertNotEqual(equivalence_checking(network, layout), eq_type.NO) + if __name__ == '__main__': unittest.main() diff --git a/bindings/pyfiction/test/algorithms/physical_design/test_hexagonalization.py b/bindings/mnt/pyfiction/test/algorithms/physical_design/test_hexagonalization.py similarity index 85% rename from bindings/pyfiction/test/algorithms/physical_design/test_hexagonalization.py rename to bindings/mnt/pyfiction/test/algorithms/physical_design/test_hexagonalization.py index 8e58e284b..f920b7810 100644 --- a/bindings/pyfiction/test/algorithms/physical_design/test_hexagonalization.py +++ b/bindings/mnt/pyfiction/test/algorithms/physical_design/test_hexagonalization.py @@ -1,4 +1,4 @@ -from mnt.pyfiction import * +from mnt.pyfiction import (read_technology_network, orthogonal, equivalence_checking, hexagonalization, eq_type) import unittest import os diff --git a/bindings/pyfiction/test/algorithms/physical_design/test_orthogonal.py b/bindings/mnt/pyfiction/test/algorithms/physical_design/test_orthogonal.py similarity index 86% rename from bindings/pyfiction/test/algorithms/physical_design/test_orthogonal.py rename to bindings/mnt/pyfiction/test/algorithms/physical_design/test_orthogonal.py index aaf32cc94..0fc6df18c 100644 --- a/bindings/pyfiction/test/algorithms/physical_design/test_orthogonal.py +++ b/bindings/mnt/pyfiction/test/algorithms/physical_design/test_orthogonal.py @@ -1,4 +1,5 @@ -from mnt.pyfiction import * +from mnt.pyfiction import (read_technology_network, orthogonal, equivalence_checking, eq_type, orthogonal_stats, + orthogonal_params) import unittest import os diff --git a/bindings/pyfiction/test/algorithms/physical_design/test_post_layout_optimization.py b/bindings/mnt/pyfiction/test/algorithms/physical_design/test_post_layout_optimization.py similarity index 92% rename from bindings/pyfiction/test/algorithms/physical_design/test_post_layout_optimization.py rename to bindings/mnt/pyfiction/test/algorithms/physical_design/test_post_layout_optimization.py index 797259111..30b595c5a 100644 --- a/bindings/pyfiction/test/algorithms/physical_design/test_post_layout_optimization.py +++ b/bindings/mnt/pyfiction/test/algorithms/physical_design/test_post_layout_optimization.py @@ -1,4 +1,5 @@ -from mnt.pyfiction import * +from mnt.pyfiction import (read_technology_network, orthogonal, equivalence_checking, eq_type, post_layout_optimization, + post_layout_optimization_params, post_layout_optimization_stats) import unittest import os diff --git a/bindings/pyfiction/test/algorithms/physical_design/test_wiring_reduction.py b/bindings/mnt/pyfiction/test/algorithms/physical_design/test_wiring_reduction.py similarity index 93% rename from bindings/pyfiction/test/algorithms/physical_design/test_wiring_reduction.py rename to bindings/mnt/pyfiction/test/algorithms/physical_design/test_wiring_reduction.py index 6438de825..fd6f27702 100644 --- a/bindings/pyfiction/test/algorithms/physical_design/test_wiring_reduction.py +++ b/bindings/mnt/pyfiction/test/algorithms/physical_design/test_wiring_reduction.py @@ -1,4 +1,5 @@ -from mnt.pyfiction import * +from mnt.pyfiction import (read_technology_network, orthogonal, equivalence_checking, eq_type, wiring_reduction, + wiring_reduction_params, wiring_reduction_stats) import unittest import os diff --git a/bindings/mnt/pyfiction/test/algorithms/simulation/__init__.py b/bindings/mnt/pyfiction/test/algorithms/simulation/__init__.py new file mode 100644 index 000000000..de323d0d7 --- /dev/null +++ b/bindings/mnt/pyfiction/test/algorithms/simulation/__init__.py @@ -0,0 +1,16 @@ +from os.path import dirname, basename, isfile, join +import glob +import os +import sys +from pathlib import Path + +if sys.platform == "win32" and "Z3_ROOT" in os.environ: + lib_path = Path(os.environ["Z3_ROOT"]) / "lib" + if lib_path.exists(): + os.add_dll_directory(str(lib_path)) + bin_path = Path(os.environ["Z3_ROOT"]) / "bin" + if bin_path.exists(): + os.add_dll_directory(str(bin_path)) + +modules = glob.glob(join(dirname(__file__), "*.py")) +__all__ = [basename(f)[:-3] for f in modules if isfile(f) and not f.endswith('__init__.py')] diff --git a/bindings/pyfiction/test/algorithms/iter/__init__.py b/bindings/mnt/pyfiction/test/algorithms/simulation/sidb/__init__.py similarity index 100% rename from bindings/pyfiction/test/algorithms/iter/__init__.py rename to bindings/mnt/pyfiction/test/algorithms/simulation/sidb/__init__.py diff --git a/bindings/pyfiction/test/algorithms/simulation/sidb/test_assess_physical_population_stability.py b/bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_assess_physical_population_stability.py similarity index 90% rename from bindings/pyfiction/test/algorithms/simulation/sidb/test_assess_physical_population_stability.py rename to bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_assess_physical_population_stability.py index eb5d9d6be..e9086598d 100644 --- a/bindings/pyfiction/test/algorithms/simulation/sidb/test_assess_physical_population_stability.py +++ b/bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_assess_physical_population_stability.py @@ -1,6 +1,7 @@ import unittest -from mnt.pyfiction import * +from mnt.pyfiction import (sidb_100_lattice, sidb_technology, assess_physical_population_stability_params, + assess_physical_population_stability, sidb_111_lattice) class TestAssessPhysicalPopulationStability(unittest.TestCase): diff --git a/bindings/pyfiction/test/algorithms/simulation/sidb/test_calculate_energy_and_state_type.py b/bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_calculate_energy_and_state_type.py similarity index 92% rename from bindings/pyfiction/test/algorithms/simulation/sidb/test_calculate_energy_and_state_type.py rename to bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_calculate_energy_and_state_type.py index cfa91662c..bf26f7729 100644 --- a/bindings/pyfiction/test/algorithms/simulation/sidb/test_calculate_energy_and_state_type.py +++ b/bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_calculate_energy_and_state_type.py @@ -1,4 +1,5 @@ -from mnt.pyfiction import * +from mnt.pyfiction import (sidb_layout, offset_coordinate, sidb_technology, charge_distribution_surface, + sidb_charge_state) import unittest import os diff --git a/bindings/pyfiction/test/algorithms/simulation/sidb/test_can_positive_charges_occur.py b/bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_can_positive_charges_occur.py similarity index 88% rename from bindings/pyfiction/test/algorithms/simulation/sidb/test_can_positive_charges_occur.py rename to bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_can_positive_charges_occur.py index a467abf7e..76a9faa09 100644 --- a/bindings/pyfiction/test/algorithms/simulation/sidb/test_can_positive_charges_occur.py +++ b/bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_can_positive_charges_occur.py @@ -1,6 +1,7 @@ import unittest -from mnt.pyfiction import * +from mnt.pyfiction import (sidb_100_lattice, sidb_technology, can_positive_charges_occur, sidb_simulation_parameters, + sidb_111_lattice) class TestCanPositiveChargesOccur(unittest.TestCase): diff --git a/bindings/pyfiction/test/algorithms/simulation/sidb/test_check_simulation_results_for_equivalence.py b/bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_check_simulation_results_for_equivalence.py similarity index 84% rename from bindings/pyfiction/test/algorithms/simulation/sidb/test_check_simulation_results_for_equivalence.py rename to bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_check_simulation_results_for_equivalence.py index c7fbceeca..dff8481d1 100644 --- a/bindings/pyfiction/test/algorithms/simulation/sidb/test_check_simulation_results_for_equivalence.py +++ b/bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_check_simulation_results_for_equivalence.py @@ -1,6 +1,7 @@ -from mnt.pyfiction import * +from mnt.pyfiction import (sidb_100_lattice, sidb_111_lattice, sidb_technology, sidb_simulation_result_100, + charge_distribution_surface_100, check_simulation_results_for_equivalence, + sidb_simulation_result_111, charge_distribution_surface_111) import unittest -import os class TestCheckSimulationResultsForEquivalence(unittest.TestCase): diff --git a/bindings/pyfiction/test/algorithms/simulation/sidb/test_compute_operational_ratio.py b/bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_compute_operational_ratio.py similarity index 67% rename from bindings/pyfiction/test/algorithms/simulation/sidb/test_compute_operational_ratio.py rename to bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_compute_operational_ratio.py index 5e57c2c8f..a1386cbed 100644 --- a/bindings/pyfiction/test/algorithms/simulation/sidb/test_compute_operational_ratio.py +++ b/bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_compute_operational_ratio.py @@ -1,10 +1,13 @@ import os import unittest -from mnt.pyfiction import * +from mnt.pyfiction import (read_sqd_layout_100, operational_domain_params, sidb_simulation_engine, + operational_domain_value_range, sweep_parameter, parameter_point, + compute_operational_ratio_params, compute_operational_ratio, create_and_tt) dir_path = os.path.dirname(os.path.realpath(__file__)) + class TestComputeOperationalRatioAtPoint(unittest.TestCase): def test_and_gate_100_lattice(self): lyt = read_sqd_layout_100(dir_path + "/../../../resources/21_hex_inputsdbp_and_v19.sqd") @@ -21,9 +24,11 @@ def test_and_gate_100_lattice(self): self.assertEqual(ratio_params.op_domain_params.operational_params.simulation_parameters.base, 2) - operational_domain_ratio = compute_operational_ratio(lyt, [create_and_tt()], parameter_point([5.6, 5.0]), ratio_params) + operational_domain_ratio = compute_operational_ratio(lyt, [create_and_tt()], parameter_point([5.6, 5.0]), + ratio_params) + + self.assertAlmostEqual(operational_domain_ratio, 23 / 121, delta=10E-6) - self.assertAlmostEqual(operational_domain_ratio, 23/121, delta=10E-6) if __name__ == '__main__': unittest.main() diff --git a/bindings/pyfiction/test/algorithms/simulation/sidb/test_critical_temperature.py b/bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_critical_temperature.py similarity index 89% rename from bindings/pyfiction/test/algorithms/simulation/sidb/test_critical_temperature.py rename to bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_critical_temperature.py index 8b385f237..7d5881c64 100644 --- a/bindings/pyfiction/test/algorithms/simulation/sidb/test_critical_temperature.py +++ b/bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_critical_temperature.py @@ -1,7 +1,10 @@ import os import unittest -from mnt.pyfiction import * +from mnt.pyfiction import (sidb_100_lattice, sidb_technology, critical_temperature_gate_based, + critical_temperature_stats, critical_temperature_params, critical_temperature_non_gate_based, + charge_distribution_surface_100, sidb_simulation_engine, sidb_111_lattice, + charge_distribution_surface_111, read_sqd_layout_100, create_xor_tt, create_not_tt) dir_path = os.path.dirname(os.path.realpath(__file__)) diff --git a/bindings/pyfiction/test/algorithms/simulation/sidb/test_detect_bdl_pairs.py b/bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_detect_bdl_pairs.py similarity index 92% rename from bindings/pyfiction/test/algorithms/simulation/sidb/test_detect_bdl_pairs.py rename to bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_detect_bdl_pairs.py index 687eee2aa..4f95637e4 100644 --- a/bindings/pyfiction/test/algorithms/simulation/sidb/test_detect_bdl_pairs.py +++ b/bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_detect_bdl_pairs.py @@ -1,6 +1,6 @@ -from mnt.pyfiction import * +from mnt.pyfiction import (sidb_100_lattice, sidb_111_lattice, charge_distribution_surface_111, + charge_distribution_surface_100, sidb_technology, detect_bdl_pairs_params, detect_bdl_pairs) import unittest -import os class TestDetectBDLPairs(unittest.TestCase): @@ -57,5 +57,6 @@ def test_detect_bdl_pairs_111_lattice(self): self.assertEqual(len(output_bdl_pairs), 0) self.assertEqual(len(normal_bdl_pairs), 2) + if __name__ == '__main__': unittest.main() diff --git a/bindings/pyfiction/test/algorithms/simulation/sidb/test_detect_bdl_wires.py b/bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_detect_bdl_wires.py similarity index 90% rename from bindings/pyfiction/test/algorithms/simulation/sidb/test_detect_bdl_wires.py rename to bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_detect_bdl_wires.py index 621ae20a7..be441ac5b 100644 --- a/bindings/pyfiction/test/algorithms/simulation/sidb/test_detect_bdl_wires.py +++ b/bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_detect_bdl_wires.py @@ -1,5 +1,7 @@ import unittest -from mnt.pyfiction import * +from mnt.pyfiction import (sidb_100_lattice, charge_distribution_surface_100, sidb_technology, detect_bdl_wires_params, + detect_bdl_wires_100, bdl_wire_selection) + class TestDetectBDLWires(unittest.TestCase): diff --git a/bindings/pyfiction/test/algorithms/simulation/sidb/test_determine_groundstate_from_simulation_results.py b/bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_determine_groundstate_from_simulation_results.py similarity index 87% rename from bindings/pyfiction/test/algorithms/simulation/sidb/test_determine_groundstate_from_simulation_results.py rename to bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_determine_groundstate_from_simulation_results.py index da3ec484d..0861262a6 100644 --- a/bindings/pyfiction/test/algorithms/simulation/sidb/test_determine_groundstate_from_simulation_results.py +++ b/bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_determine_groundstate_from_simulation_results.py @@ -1,6 +1,9 @@ import unittest -from mnt.pyfiction import * +from mnt.pyfiction import (sidb_100_lattice, sidb_technology, charge_distribution_surface_100, + sidb_simulation_parameters, sidb_charge_state, sidb_simulation_result_100, + determine_groundstate_from_simulation_results, sidb_111_lattice, + charge_distribution_surface_111, sidb_simulation_result_111) class TestDetermineGroundstateFromSimulationResults(unittest.TestCase): diff --git a/bindings/pyfiction/test/algorithms/simulation/sidb/test_determine_physically_valid_parameters.py b/bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_determine_physically_valid_parameters.py similarity index 83% rename from bindings/pyfiction/test/algorithms/simulation/sidb/test_determine_physically_valid_parameters.py rename to bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_determine_physically_valid_parameters.py index 327bb86a6..1ea08d3bd 100644 --- a/bindings/pyfiction/test/algorithms/simulation/sidb/test_determine_physically_valid_parameters.py +++ b/bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_determine_physically_valid_parameters.py @@ -1,6 +1,8 @@ import unittest -from mnt.pyfiction import * +from mnt.pyfiction import (sidb_100_lattice, sidb_technology, charge_distribution_surface_100, + determine_physically_valid_parameters, parameter_point, sidb_111_lattice, + charge_distribution_surface_111) class TestDeterminePhysicallyValidParameters(unittest.TestCase): @@ -13,7 +15,7 @@ def test_one_DB_100_lattice(self): valid_parameters = determine_physically_valid_parameters(cds) self.assertEqual(valid_parameters.get_excited_state_number_for_parameter(parameter_point([5, 5])), - 0) + 0) self.assertEqual( valid_parameters.get_excited_state_number_for_parameter(parameter_point([5.1, 5.1])), @@ -23,7 +25,6 @@ def test_one_DB_100_lattice(self): with self.assertRaises(ValueError): valid_parameters.get_excited_state_number_for_parameter(parameter_point([15, 15])) - def test_one_DB_111_lattice(self): layout = sidb_111_lattice((10, 10)) layout.assign_cell_type((0, 0), sidb_technology.cell_type.NORMAL) @@ -32,11 +33,11 @@ def test_one_DB_111_lattice(self): valid_parameters = determine_physically_valid_parameters(cds) self.assertEqual(valid_parameters.get_excited_state_number_for_parameter(parameter_point([5, 5])), - 0) + 0) self.assertEqual( valid_parameters.get_excited_state_number_for_parameter(parameter_point([5.1, 5.1])), - 0) + 0) # Testing for an invalid parameter point that raises an exception with self.assertRaises(ValueError): diff --git a/bindings/pyfiction/test/algorithms/simulation/sidb/test_displacement_robustness_domain.py b/bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_displacement_robustness_domain.py similarity index 86% rename from bindings/pyfiction/test/algorithms/simulation/sidb/test_displacement_robustness_domain.py rename to bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_displacement_robustness_domain.py index 78d640382..641fdfd94 100644 --- a/bindings/pyfiction/test/algorithms/simulation/sidb/test_displacement_robustness_domain.py +++ b/bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_displacement_robustness_domain.py @@ -1,6 +1,9 @@ import unittest -from mnt.pyfiction import * +from mnt.pyfiction import (sidb_100_lattice, sidb_technology, displacement_analysis_mode, + displacement_robustness_domain_params, sidb_simulation_parameters, offset_coordinate, + dimer_displacement_policy, displacement_robustness_domain_stats, create_and_tt, + determine_displacement_robustness_domain_100) class TestDisplacementRobustnessDomain(unittest.TestCase): diff --git a/bindings/pyfiction/test/algorithms/simulation/sidb/test_exhaustive_ground_state_simulation.py b/bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_exhaustive_ground_state_simulation.py similarity index 86% rename from bindings/pyfiction/test/algorithms/simulation/sidb/test_exhaustive_ground_state_simulation.py rename to bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_exhaustive_ground_state_simulation.py index 07847f2b9..1bdd03364 100644 --- a/bindings/pyfiction/test/algorithms/simulation/sidb/test_exhaustive_ground_state_simulation.py +++ b/bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_exhaustive_ground_state_simulation.py @@ -1,6 +1,9 @@ -from mnt.pyfiction import * +from mnt.pyfiction import (sidb_100_lattice, sidb_technology, sidb_simulation_parameters, + charge_distribution_surface_100, exhaustive_ground_state_simulation, sidb_charge_state, + sidb_111_lattice, charge_distribution_surface_111, + determine_groundstate_from_simulation_results) import unittest -import os + class TestExhaustiveGroundStateSimulation(unittest.TestCase): diff --git a/bindings/pyfiction/test/algorithms/simulation/sidb/test_is_ground_state.py b/bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_is_ground_state.py similarity index 89% rename from bindings/pyfiction/test/algorithms/simulation/sidb/test_is_ground_state.py rename to bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_is_ground_state.py index 76b02db2c..92435a5f1 100644 --- a/bindings/pyfiction/test/algorithms/simulation/sidb/test_is_ground_state.py +++ b/bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_is_ground_state.py @@ -1,6 +1,8 @@ import unittest -from mnt.pyfiction import * +from mnt.pyfiction import (sidb_100_lattice, sidb_technology, charge_distribution_surface_100, + sidb_simulation_parameters, sidb_charge_state, sidb_simulation_result_100, is_ground_state, + sidb_111_lattice, charge_distribution_surface_111, sidb_simulation_result_111) class TestIsGroundState(unittest.TestCase): diff --git a/bindings/pyfiction/test/algorithms/simulation/sidb/test_is_operational.py b/bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_is_operational.py similarity index 91% rename from bindings/pyfiction/test/algorithms/simulation/sidb/test_is_operational.py rename to bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_is_operational.py index 8ebcc8347..690878f0b 100644 --- a/bindings/pyfiction/test/algorithms/simulation/sidb/test_is_operational.py +++ b/bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_is_operational.py @@ -1,9 +1,13 @@ -from mnt.pyfiction import * +from mnt.pyfiction import (sidb_100_lattice, sidb_technology, is_operational, is_operational_params, + sidb_simulation_parameters, create_and_tt, operational_status, read_sqd_layout_100, + operational_condition, read_sqd_layout_111, operational_input_patterns, + kink_induced_non_operational_input_patterns, is_kink_induced_non_operational) import unittest import os dir_path = os.path.dirname(os.path.realpath(__file__)) + class TestIsOperational(unittest.TestCase): def test_is_operational(self): lyt = sidb_100_lattice() @@ -39,7 +43,6 @@ def test_is_operational(self): self.assertEqual(op_status, operational_status.NON_OPERATIONAL) def test_and_gate_kinks(self): - lyt = read_sqd_layout_100(dir_path + "/../../../resources/AND_mu_032_kinks.sqd") params = is_operational_params() @@ -55,9 +58,7 @@ def test_and_gate_kinks(self): self.assertEqual(op_status, operational_status.NON_OPERATIONAL) - def test_and_gate_non_operational_due_to_kinks(self): - lyt = read_sqd_layout_100(dir_path + "/../../../resources/AND_mu_032_kinks.sqd") params = is_operational_params() @@ -68,7 +69,6 @@ def test_and_gate_non_operational_due_to_kinks(self): self.assertTrue(result) def test_and_gate_non_operational_input_patterns_due_to_kinks(self): - lyt = read_sqd_layout_100(dir_path + "/../../../resources/AND_mu_032_kinks.sqd") params = is_operational_params() @@ -109,5 +109,6 @@ def test_and_gate_111_lattice_operational_input_pattern(self): self.assertEqual(operational_patterns, {0, 3}) + if __name__ == '__main__': unittest.main() diff --git a/bindings/pyfiction/test/algorithms/simulation/sidb/test_minimum_energy.py b/bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_minimum_energy.py similarity index 89% rename from bindings/pyfiction/test/algorithms/simulation/sidb/test_minimum_energy.py rename to bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_minimum_energy.py index d0de5ffab..a6d7c9cae 100644 --- a/bindings/pyfiction/test/algorithms/simulation/sidb/test_minimum_energy.py +++ b/bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_minimum_energy.py @@ -1,6 +1,8 @@ import unittest -from mnt.pyfiction import * +from mnt.pyfiction import (sidb_100_lattice, sidb_technology, charge_distribution_surface_100, + sidb_simulation_parameters, sidb_charge_state, minimum_energy, sidb_111_lattice, + charge_distribution_surface_111) class TestMinimumEnergy(unittest.TestCase): diff --git a/bindings/pyfiction/test/algorithms/simulation/sidb/test_operational_domain.py b/bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_operational_domain.py similarity index 87% rename from bindings/pyfiction/test/algorithms/simulation/sidb/test_operational_domain.py rename to bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_operational_domain.py index 22ae8227a..cd5ca89bf 100644 --- a/bindings/pyfiction/test/algorithms/simulation/sidb/test_operational_domain.py +++ b/bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_operational_domain.py @@ -1,7 +1,11 @@ import os import unittest -from mnt.pyfiction import * +from mnt.pyfiction import (read_sqd_layout_100, operational_domain_params, sidb_simulation_engine, + operational_domain_value_range, sweep_parameter, operational_domain_stats, + operational_domain_grid_search, create_xor_tt, operational_domain_flood_fill, + operational_domain_random_sampling, operational_domain_contour_tracing, read_sqd_layout_111, + create_and_tt) dir_path = os.path.dirname(os.path.realpath(__file__)) diff --git a/bindings/pyfiction/test/algorithms/simulation/sidb/test_quickexact.py b/bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_quickexact.py similarity index 89% rename from bindings/pyfiction/test/algorithms/simulation/sidb/test_quickexact.py rename to bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_quickexact.py index 706add79c..1c78006f4 100644 --- a/bindings/pyfiction/test/algorithms/simulation/sidb/test_quickexact.py +++ b/bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_quickexact.py @@ -1,6 +1,9 @@ -from mnt.pyfiction import * +from mnt.pyfiction import (sidb_100_lattice, sidb_111_lattice, sidb_technology, quickexact, quickexact_params, + automatic_base_number_detection, charge_distribution_surface_100, + charge_distribution_surface_111, determine_groundstate_from_simulation_results, + sidb_charge_state) import unittest -import os + class TestQuickExact(unittest.TestCase): diff --git a/bindings/pyfiction/test/algorithms/simulation/sidb/test_quicksim.py b/bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_quicksim.py similarity index 90% rename from bindings/pyfiction/test/algorithms/simulation/sidb/test_quicksim.py rename to bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_quicksim.py index 2793cf84c..f085e8ccf 100644 --- a/bindings/pyfiction/test/algorithms/simulation/sidb/test_quicksim.py +++ b/bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_quicksim.py @@ -1,6 +1,7 @@ -from mnt.pyfiction import * +from mnt.pyfiction import (sidb_100_lattice, sidb_technology, quicksim_params, sidb_simulation_parameters, + charge_distribution_surface, quicksim, sidb_charge_state, sidb_111_lattice, + charge_distribution_surface_111, determine_groundstate_from_simulation_results) import unittest -import os class TestQuicksim(unittest.TestCase): diff --git a/bindings/pyfiction/test/algorithms/simulation/sidb/test_random_sidb_layout_generator.py b/bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_random_sidb_layout_generator.py similarity index 82% rename from bindings/pyfiction/test/algorithms/simulation/sidb/test_random_sidb_layout_generator.py rename to bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_random_sidb_layout_generator.py index d9652c13c..75295cebc 100644 --- a/bindings/pyfiction/test/algorithms/simulation/sidb/test_random_sidb_layout_generator.py +++ b/bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_random_sidb_layout_generator.py @@ -1,6 +1,6 @@ -from mnt.pyfiction import * +from mnt.pyfiction import (generate_random_sidb_layout, generate_random_sidb_layout_params, sidb_100_lattice, + sidb_111_lattice) import unittest -import os class TestRandomSiDBLayoutGenerator(unittest.TestCase): @@ -8,7 +8,7 @@ class TestRandomSiDBLayoutGenerator(unittest.TestCase): def test_area_with_one_sidb_100_lattice(self): params = generate_random_sidb_layout_params() params.number_of_sidbs = 1 - params.coordinate_pair = ((10,10), (10,10)) + params.coordinate_pair = ((10, 10), (10, 10)) result_lyt = generate_random_sidb_layout(sidb_100_lattice(), params) self.assertEqual(result_lyt.num_cells(), 1) cell = (result_lyt.cells())[0] @@ -19,7 +19,7 @@ def test_area_with_five_sidb_100_lattice(self): params = generate_random_sidb_layout_params() params.number_of_sidbs = 5 print(params.number_of_sidbs) - params.coordinate_pair = ((0,0), (10,10)) + params.coordinate_pair = ((0, 0), (10, 10)) result_lyt = generate_random_sidb_layout(sidb_100_lattice(), params) self.assertEqual(result_lyt.num_cells(), 5) @@ -33,5 +33,6 @@ def test_area_with_one_coordinate_111_lattice(self): self.assertEqual(cell.x, 10) self.assertEqual(cell.y, 10) + if __name__ == '__main__': unittest.main() diff --git a/bindings/pyfiction/test/algorithms/simulation/sidb/test_sidb_simulation_parameters.py b/bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_sidb_simulation_parameters.py similarity index 93% rename from bindings/pyfiction/test/algorithms/simulation/sidb/test_sidb_simulation_parameters.py rename to bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_sidb_simulation_parameters.py index 4ebdae50c..a3340117a 100644 --- a/bindings/pyfiction/test/algorithms/simulation/sidb/test_sidb_simulation_parameters.py +++ b/bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_sidb_simulation_parameters.py @@ -1,6 +1,5 @@ -from mnt.pyfiction import * +from mnt.pyfiction import (sidb_simulation_parameters) import unittest -import os class TestSiDBSimulationParameters(unittest.TestCase): diff --git a/bindings/pyfiction/test/algorithms/simulation/sidb/test_sidb_simulation_result.py b/bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_sidb_simulation_result.py similarity index 83% rename from bindings/pyfiction/test/algorithms/simulation/sidb/test_sidb_simulation_result.py rename to bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_sidb_simulation_result.py index 5ebe6da27..e0d2008e6 100644 --- a/bindings/pyfiction/test/algorithms/simulation/sidb/test_sidb_simulation_result.py +++ b/bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_sidb_simulation_result.py @@ -1,6 +1,9 @@ import unittest -from mnt.pyfiction import * +from mnt.pyfiction import (sidb_simulation_result_111, sidb_simulation_result_100, sidb_100_lattice, sidb_111_lattice, + sidb_technology, charge_distribution_surface_100, sidb_simulation_parameters, + sidb_charge_state, determine_groundstate_from_simulation_results, + charge_distribution_surface_111) class TestSiDBSimulationResult(unittest.TestCase): diff --git a/bindings/pyfiction/test/algorithms/simulation/sidb/test_time_to_solution.py b/bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_time_to_solution.py similarity index 88% rename from bindings/pyfiction/test/algorithms/simulation/sidb/test_time_to_solution.py rename to bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_time_to_solution.py index 7f83c4d07..620825b45 100644 --- a/bindings/pyfiction/test/algorithms/simulation/sidb/test_time_to_solution.py +++ b/bindings/mnt/pyfiction/test/algorithms/simulation/sidb/test_time_to_solution.py @@ -1,7 +1,12 @@ -from mnt.pyfiction import * +from mnt.pyfiction import (sidb_111_lattice, sidb_100_lattice, sidb_technology, quicksim_params, + sidb_simulation_parameters, time_to_solution_params, time_to_solution, + exact_sidb_simulation_engine, time_to_solution_stats, charge_distribution_surface_100, + charge_distribution_surface_111, quicksim, quickexact_params, + automatic_base_number_detection, quickexact, time_to_solution_for_given_simulation_results) import unittest import math + class TestTimeToSolution(unittest.TestCase): def test_one_sidb_100_lattice(self): @@ -92,5 +97,6 @@ def test_time_to_solution_with_simulation_results(self): math.log(1.0 - st.acc / 100)) self.assertAlmostEqual(st.time_to_solution - tts_calculated, 0.0, delta=1e-6) + if __name__ == '__main__': unittest.main() diff --git a/bindings/pyfiction/test/algorithms/simulation/test_logic_simulation.py b/bindings/mnt/pyfiction/test/algorithms/simulation/test_logic_simulation.py similarity index 87% rename from bindings/pyfiction/test/algorithms/simulation/test_logic_simulation.py rename to bindings/mnt/pyfiction/test/algorithms/simulation/test_logic_simulation.py index 670fcc799..5c9a4207b 100644 --- a/bindings/pyfiction/test/algorithms/simulation/test_logic_simulation.py +++ b/bindings/mnt/pyfiction/test/algorithms/simulation/test_logic_simulation.py @@ -1,14 +1,12 @@ -from mnt.pyfiction import * +from mnt.pyfiction import (read_technology_network, simulate, exact_params, exact_cartesian) import unittest import os dir_path = os.path.dirname(os.path.realpath(__file__)) -z3 = os.environ.get("z3", "OFF") class TestLogicSimulation(unittest.TestCase): - @unittest.skipIf(z3 == "OFF", "Z3 not enabled") def test_logic_simulation(self): xor2_net = read_technology_network(dir_path + "/../../resources/xor2.v") xnor2_net = read_technology_network(dir_path + "/../../resources/xnor2.v") diff --git a/bindings/pyfiction/test/algorithms/network_transformation/__init__.py b/bindings/mnt/pyfiction/test/algorithms/verification/__init__.py similarity index 100% rename from bindings/pyfiction/test/algorithms/network_transformation/__init__.py rename to bindings/mnt/pyfiction/test/algorithms/verification/__init__.py diff --git a/bindings/pyfiction/test/algorithms/verification/test_design_rule_violations.py b/bindings/mnt/pyfiction/test/algorithms/verification/test_design_rule_violations.py similarity index 86% rename from bindings/pyfiction/test/algorithms/verification/test_design_rule_violations.py rename to bindings/mnt/pyfiction/test/algorithms/verification/test_design_rule_violations.py index 5f279aca6..d3616c726 100644 --- a/bindings/pyfiction/test/algorithms/verification/test_design_rule_violations.py +++ b/bindings/mnt/pyfiction/test/algorithms/verification/test_design_rule_violations.py @@ -1,11 +1,11 @@ import unittest -from mnt import pyfiction +from mnt.pyfiction import (cartesian_gate_layout, color_routing, gate_level_drvs) class TestDesignRuleViolations(unittest.TestCase): def test_drvs(self): # Create empty layout - layout = pyfiction.cartesian_gate_layout((2, 5, 0), "2DDWave") + layout = cartesian_gate_layout((2, 5, 0), "2DDWave") # Create 2:1 MUX @@ -46,9 +46,9 @@ def test_drvs(self): layout.move_node(layout.get_node((2, 4)), (2, 5)) - pyfiction.color_routing(layout, [((2, 3), (2, 5))]) + color_routing(layout, [((2, 3), (2, 5))]) - warnings, drvs = pyfiction.gate_level_drvs(layout) + warnings, drvs = gate_level_drvs(layout) self.assertEqual(0, warnings) self.assertEqual(0, drvs) diff --git a/bindings/pyfiction/test/algorithms/verification/test_equivalence_checking.py b/bindings/mnt/pyfiction/test/algorithms/verification/test_equivalence_checking.py similarity index 85% rename from bindings/pyfiction/test/algorithms/verification/test_equivalence_checking.py rename to bindings/mnt/pyfiction/test/algorithms/verification/test_equivalence_checking.py index b8d773e9d..097b2417b 100644 --- a/bindings/pyfiction/test/algorithms/verification/test_equivalence_checking.py +++ b/bindings/mnt/pyfiction/test/algorithms/verification/test_equivalence_checking.py @@ -1,4 +1,4 @@ -from mnt.pyfiction import * +from mnt.pyfiction import (read_technology_network, equivalence_checking_stats, equivalence_checking, eq_type) import unittest import os diff --git a/bindings/mnt/pyfiction/test/inout/__init__.py b/bindings/mnt/pyfiction/test/inout/__init__.py new file mode 100644 index 000000000..de323d0d7 --- /dev/null +++ b/bindings/mnt/pyfiction/test/inout/__init__.py @@ -0,0 +1,16 @@ +from os.path import dirname, basename, isfile, join +import glob +import os +import sys +from pathlib import Path + +if sys.platform == "win32" and "Z3_ROOT" in os.environ: + lib_path = Path(os.environ["Z3_ROOT"]) / "lib" + if lib_path.exists(): + os.add_dll_directory(str(lib_path)) + bin_path = Path(os.environ["Z3_ROOT"]) / "bin" + if bin_path.exists(): + os.add_dll_directory(str(bin_path)) + +modules = glob.glob(join(dirname(__file__), "*.py")) +__all__ = [basename(f)[:-3] for f in modules if isfile(f) and not f.endswith('__init__.py')] diff --git a/bindings/pyfiction/test/inout/test_read_write_fgl_layout.py b/bindings/mnt/pyfiction/test/inout/test_read_write_fgl_layout.py similarity index 82% rename from bindings/pyfiction/test/inout/test_read_write_fgl_layout.py rename to bindings/mnt/pyfiction/test/inout/test_read_write_fgl_layout.py index 94c5a5f84..4efcd8135 100644 --- a/bindings/pyfiction/test/inout/test_read_write_fgl_layout.py +++ b/bindings/mnt/pyfiction/test/inout/test_read_write_fgl_layout.py @@ -1,4 +1,6 @@ -from mnt.pyfiction import * +from mnt.pyfiction import (read_technology_network, orthogonal, write_fgl_layout, read_cartesian_fgl_layout, + equivalence_checking, eq_type, hexagonalization, read_hexagonal_fgl_layout, + shifted_cartesian_gate_layout, read_shifted_cartesian_fgl_layout) import unittest import os diff --git a/bindings/pyfiction/test/inout/test_read_write_sqd_layout.py b/bindings/mnt/pyfiction/test/inout/test_read_write_sqd_layout.py similarity index 87% rename from bindings/pyfiction/test/inout/test_read_write_sqd_layout.py rename to bindings/mnt/pyfiction/test/inout/test_read_write_sqd_layout.py index c587d9320..6286fe24f 100644 --- a/bindings/pyfiction/test/inout/test_read_write_sqd_layout.py +++ b/bindings/mnt/pyfiction/test/inout/test_read_write_sqd_layout.py @@ -1,4 +1,4 @@ -from mnt.pyfiction import * +from mnt.pyfiction import (read_sqd_layout_100) import unittest import os diff --git a/bindings/pyfiction/test/inout/test_write_svg_layout.py b/bindings/mnt/pyfiction/test/inout/test_write_svg_layout.py similarity index 98% rename from bindings/pyfiction/test/inout/test_write_svg_layout.py rename to bindings/mnt/pyfiction/test/inout/test_write_svg_layout.py index 0a8d053ed..b235df573 100644 --- a/bindings/pyfiction/test/inout/test_write_svg_layout.py +++ b/bindings/mnt/pyfiction/test/inout/test_write_svg_layout.py @@ -1,6 +1,8 @@ import unittest import mnt.pyfiction -from mnt.pyfiction import * +from mnt.pyfiction import (sidb_100_lattice, sidb_technology, color_mode, write_sidb_layout_svg_params, + write_sidb_layout_svg_to_string, charge_distribution_surface_100, sidb_charge_state) + def normalize_svg(svg: str) -> str: """ @@ -19,6 +21,7 @@ def normalize_svg(svg: str) -> str: # Remove all whitespace (spaces, tabs, newlines) return ''.join(svg.split()) + cell_level_dark_mode = """ str: """ - cds_light_mode = """ str: """ + class TestWriteSvgLayout(unittest.TestCase): def test_write_sidb_cell_level_layout_to_svg(self): - # Create and configure the SIDB layout sidb_layout = sidb_100_lattice((4, 4)) sidb_layout.assign_cell_type((0, 0), sidb_technology.cell_type.NORMAL) @@ -171,7 +173,7 @@ def test_write_sidb_cell_level_layout_to_svg(self): params.color_background = color_mode.DARK generated_svg_cell_level_dark_mode = write_sidb_layout_svg_to_string(sidb_layout, params) - #print(generated_svg_cell_level_dark_mode) + # print(generated_svg_cell_level_dark_mode) self.assertEqual(normalize_svg(generated_svg_cell_level_dark_mode), normalize_svg(cell_level_dark_mode)) params.color_background = color_mode.LIGHT @@ -180,7 +182,6 @@ def test_write_sidb_cell_level_layout_to_svg(self): self.assertEqual(normalize_svg(generated_svg_cell_level_light_mode), normalize_svg(cell_level_light_mode)) def test_write_sidb_charge_distribution_to_svg(self): - # Create and configure the SIDB layout sidb_layout = sidb_100_lattice((4, 4)) sidb_layout.assign_cell_type((0, 0), sidb_technology.cell_type.NORMAL) @@ -204,5 +205,6 @@ def test_write_sidb_charge_distribution_to_svg(self): generated_svg_cds_light_mode = write_sidb_layout_svg_to_string(cds, params) self.assertEqual(normalize_svg(generated_svg_cds_light_mode), normalize_svg(cds_light_mode)) + if __name__ == '__main__': unittest.main() diff --git a/bindings/mnt/pyfiction/test/layouts/__init__.py b/bindings/mnt/pyfiction/test/layouts/__init__.py new file mode 100644 index 000000000..de323d0d7 --- /dev/null +++ b/bindings/mnt/pyfiction/test/layouts/__init__.py @@ -0,0 +1,16 @@ +from os.path import dirname, basename, isfile, join +import glob +import os +import sys +from pathlib import Path + +if sys.platform == "win32" and "Z3_ROOT" in os.environ: + lib_path = Path(os.environ["Z3_ROOT"]) / "lib" + if lib_path.exists(): + os.add_dll_directory(str(lib_path)) + bin_path = Path(os.environ["Z3_ROOT"]) / "bin" + if bin_path.exists(): + os.add_dll_directory(str(bin_path)) + +modules = glob.glob(join(dirname(__file__), "*.py")) +__all__ = [basename(f)[:-3] for f in modules if isfile(f) and not f.endswith('__init__.py')] diff --git a/bindings/pyfiction/test/layouts/test_bounding_box.py b/bindings/mnt/pyfiction/test/layouts/test_bounding_box.py similarity index 92% rename from bindings/pyfiction/test/layouts/test_bounding_box.py rename to bindings/mnt/pyfiction/test/layouts/test_bounding_box.py index b7af56714..0908140fa 100644 --- a/bindings/pyfiction/test/layouts/test_bounding_box.py +++ b/bindings/mnt/pyfiction/test/layouts/test_bounding_box.py @@ -1,4 +1,7 @@ -from mnt.pyfiction import * +from mnt.pyfiction import (cartesian_gate_layout, shifted_cartesian_gate_layout, + hexagonal_gate_layout, cartesian_obstruction_layout, shifted_cartesian_obstruction_layout, + hexagonal_obstruction_layout, read_technology_network, orthogonal_params, orthogonal, + qca_layout, sidb_layout, inml_layout) import unittest import os diff --git a/bindings/pyfiction/test/layouts/test_cartesian_layout.py b/bindings/mnt/pyfiction/test/layouts/test_cartesian_layout.py similarity index 93% rename from bindings/pyfiction/test/layouts/test_cartesian_layout.py rename to bindings/mnt/pyfiction/test/layouts/test_cartesian_layout.py index 17b676bdd..74c6e9230 100644 --- a/bindings/pyfiction/test/layouts/test_cartesian_layout.py +++ b/bindings/mnt/pyfiction/test/layouts/test_cartesian_layout.py @@ -1,4 +1,4 @@ -from mnt.pyfiction import * +from mnt.pyfiction import (cartesian_layout) import unittest diff --git a/bindings/pyfiction/test/layouts/test_cell_level_layout.py b/bindings/mnt/pyfiction/test/layouts/test_cell_level_layout.py similarity index 98% rename from bindings/pyfiction/test/layouts/test_cell_level_layout.py rename to bindings/mnt/pyfiction/test/layouts/test_cell_level_layout.py index 936f60560..decd9dae2 100644 --- a/bindings/pyfiction/test/layouts/test_cell_level_layout.py +++ b/bindings/mnt/pyfiction/test/layouts/test_cell_level_layout.py @@ -1,4 +1,4 @@ -from mnt.pyfiction import * +from mnt.pyfiction import (qca_technology, inml_technology, sidb_technology, qca_layout) import unittest diff --git a/bindings/pyfiction/test/layouts/test_clocked_layout.py b/bindings/mnt/pyfiction/test/layouts/test_clocked_layout.py similarity index 95% rename from bindings/pyfiction/test/layouts/test_clocked_layout.py rename to bindings/mnt/pyfiction/test/layouts/test_clocked_layout.py index 8b5b17941..2da1dac7f 100644 --- a/bindings/pyfiction/test/layouts/test_clocked_layout.py +++ b/bindings/mnt/pyfiction/test/layouts/test_clocked_layout.py @@ -1,4 +1,4 @@ -from mnt.pyfiction import * +from mnt.pyfiction import (clocked_cartesian_layout, clocked_shifted_cartesian_layout, clocked_hexagonal_layout) import unittest diff --git a/bindings/pyfiction/test/layouts/test_coordinates.py b/bindings/mnt/pyfiction/test/layouts/test_coordinates.py similarity index 97% rename from bindings/pyfiction/test/layouts/test_coordinates.py rename to bindings/mnt/pyfiction/test/layouts/test_coordinates.py index ff72e9afb..cd383e709 100644 --- a/bindings/pyfiction/test/layouts/test_coordinates.py +++ b/bindings/mnt/pyfiction/test/layouts/test_coordinates.py @@ -1,4 +1,4 @@ -from mnt.pyfiction import * +from mnt.pyfiction import (offset_coordinate, cube_coordinate, siqad_coordinate) import unittest diff --git a/bindings/pyfiction/test/layouts/test_gate_level_layout.py b/bindings/mnt/pyfiction/test/layouts/test_gate_level_layout.py similarity index 97% rename from bindings/pyfiction/test/layouts/test_gate_level_layout.py rename to bindings/mnt/pyfiction/test/layouts/test_gate_level_layout.py index c389f8a98..bc1955fea 100644 --- a/bindings/pyfiction/test/layouts/test_gate_level_layout.py +++ b/bindings/mnt/pyfiction/test/layouts/test_gate_level_layout.py @@ -1,4 +1,6 @@ -from mnt.pyfiction import * +from mnt.pyfiction import (cartesian_gate_layout, shifted_cartesian_gate_layout, hexagonal_gate_layout, + offset_coordinate, critical_path_length_and_throughput, gate_level_drv_params, + gate_level_drvs) import unittest diff --git a/bindings/pyfiction/test/layouts/test_hexagonal_layout.py b/bindings/mnt/pyfiction/test/layouts/test_hexagonal_layout.py similarity index 93% rename from bindings/pyfiction/test/layouts/test_hexagonal_layout.py rename to bindings/mnt/pyfiction/test/layouts/test_hexagonal_layout.py index 63b9b291e..9187a1f42 100644 --- a/bindings/pyfiction/test/layouts/test_hexagonal_layout.py +++ b/bindings/mnt/pyfiction/test/layouts/test_hexagonal_layout.py @@ -1,4 +1,4 @@ -from mnt.pyfiction import * +from mnt.pyfiction import (hexagonal_layout) import unittest diff --git a/bindings/pyfiction/test/layouts/test_obstruction_layout.py b/bindings/mnt/pyfiction/test/layouts/test_obstruction_layout.py similarity index 97% rename from bindings/pyfiction/test/layouts/test_obstruction_layout.py rename to bindings/mnt/pyfiction/test/layouts/test_obstruction_layout.py index 9c2413103..d934c6127 100644 --- a/bindings/pyfiction/test/layouts/test_obstruction_layout.py +++ b/bindings/mnt/pyfiction/test/layouts/test_obstruction_layout.py @@ -1,6 +1,10 @@ import unittest -from mnt.pyfiction import * +from mnt.pyfiction import (cartesian_obstruction_layout, cartesian_gate_layout, shifted_cartesian_obstruction_layout, + shifted_cartesian_gate_layout, hexagonal_gate_layout, hexagonal_obstruction_layout, + offset_coordinate, critical_path_length_and_throughput, gate_level_drvs, + gate_level_drv_params) + class TestObstructionLayout(unittest.TestCase): @@ -79,6 +83,7 @@ def test_obstruction_via_gates(self): self.assertTrue(layout.is_obstructed_connection((2, 1), (2, 2))) self.assertTrue(layout.is_obstructed_connection((3, 2), (4, 2))) + class TestCartesianObstructionLayout(unittest.TestCase): def test_cartesian_obstruction_layout_gate_level_inheritance(self): @@ -341,6 +346,5 @@ def test_hexagonal_obstruction_layout_gate_level_inheritance(self): self.assertEqual(gate_level_drvs(layout, drv_params, False), (0, 0)) - if __name__ == '__main__': unittest.main() diff --git a/bindings/pyfiction/test/layouts/test_shifted_cartesian_layout.py b/bindings/mnt/pyfiction/test/layouts/test_shifted_cartesian_layout.py similarity index 92% rename from bindings/pyfiction/test/layouts/test_shifted_cartesian_layout.py rename to bindings/mnt/pyfiction/test/layouts/test_shifted_cartesian_layout.py index 4ef38134c..df4abf16a 100644 --- a/bindings/pyfiction/test/layouts/test_shifted_cartesian_layout.py +++ b/bindings/mnt/pyfiction/test/layouts/test_shifted_cartesian_layout.py @@ -1,4 +1,4 @@ -from mnt.pyfiction import * +from mnt.pyfiction import (shifted_cartesian_layout) import unittest diff --git a/bindings/mnt/pyfiction/test/networks/__init__.py b/bindings/mnt/pyfiction/test/networks/__init__.py new file mode 100644 index 000000000..de323d0d7 --- /dev/null +++ b/bindings/mnt/pyfiction/test/networks/__init__.py @@ -0,0 +1,16 @@ +from os.path import dirname, basename, isfile, join +import glob +import os +import sys +from pathlib import Path + +if sys.platform == "win32" and "Z3_ROOT" in os.environ: + lib_path = Path(os.environ["Z3_ROOT"]) / "lib" + if lib_path.exists(): + os.add_dll_directory(str(lib_path)) + bin_path = Path(os.environ["Z3_ROOT"]) / "bin" + if bin_path.exists(): + os.add_dll_directory(str(bin_path)) + +modules = glob.glob(join(dirname(__file__), "*.py")) +__all__ = [basename(f)[:-3] for f in modules if isfile(f) and not f.endswith('__init__.py')] diff --git a/bindings/pyfiction/test/networks/test_logic_network.py b/bindings/mnt/pyfiction/test/networks/test_logic_network.py similarity index 98% rename from bindings/pyfiction/test/networks/test_logic_network.py rename to bindings/mnt/pyfiction/test/networks/test_logic_network.py index 869621f9c..274d6814a 100644 --- a/bindings/pyfiction/test/networks/test_logic_network.py +++ b/bindings/mnt/pyfiction/test/networks/test_logic_network.py @@ -1,4 +1,4 @@ -from mnt.pyfiction import * +from mnt.pyfiction import (read_technology_network) import unittest import os diff --git a/bindings/pyfiction/test/resources/21_hex_inputsdbp_and_v19.sqd b/bindings/mnt/pyfiction/test/resources/21_hex_inputsdbp_and_v19.sqd similarity index 100% rename from bindings/pyfiction/test/resources/21_hex_inputsdbp_and_v19.sqd rename to bindings/mnt/pyfiction/test/resources/21_hex_inputsdbp_and_v19.sqd diff --git a/bindings/pyfiction/test/resources/AND_mu_032_111_surface.sqd b/bindings/mnt/pyfiction/test/resources/AND_mu_032_111_surface.sqd similarity index 100% rename from bindings/pyfiction/test/resources/AND_mu_032_111_surface.sqd rename to bindings/mnt/pyfiction/test/resources/AND_mu_032_111_surface.sqd diff --git a/bindings/pyfiction/test/resources/AND_mu_032_kinks.sqd b/bindings/mnt/pyfiction/test/resources/AND_mu_032_kinks.sqd similarity index 100% rename from bindings/pyfiction/test/resources/AND_mu_032_kinks.sqd rename to bindings/mnt/pyfiction/test/resources/AND_mu_032_kinks.sqd diff --git a/bindings/pyfiction/test/resources/FA.v b/bindings/mnt/pyfiction/test/resources/FA.v similarity index 100% rename from bindings/pyfiction/test/resources/FA.v rename to bindings/mnt/pyfiction/test/resources/FA.v diff --git a/bindings/pyfiction/test/resources/hex_11_inputsdbp_inv_straight_v0_manual.sqd b/bindings/mnt/pyfiction/test/resources/hex_11_inputsdbp_inv_straight_v0_manual.sqd similarity index 100% rename from bindings/pyfiction/test/resources/hex_11_inputsdbp_inv_straight_v0_manual.sqd rename to bindings/mnt/pyfiction/test/resources/hex_11_inputsdbp_inv_straight_v0_manual.sqd diff --git a/bindings/pyfiction/test/resources/hex_21_inputsdbp_xor_v1.sqd b/bindings/mnt/pyfiction/test/resources/hex_21_inputsdbp_xor_v1.sqd similarity index 100% rename from bindings/pyfiction/test/resources/hex_21_inputsdbp_xor_v1.sqd rename to bindings/mnt/pyfiction/test/resources/hex_21_inputsdbp_xor_v1.sqd diff --git a/bindings/pyfiction/test/resources/mux21.v b/bindings/mnt/pyfiction/test/resources/mux21.v similarity index 100% rename from bindings/pyfiction/test/resources/mux21.v rename to bindings/mnt/pyfiction/test/resources/mux21.v diff --git a/bindings/pyfiction/test/resources/xnor2.v b/bindings/mnt/pyfiction/test/resources/xnor2.v similarity index 100% rename from bindings/pyfiction/test/resources/xnor2.v rename to bindings/mnt/pyfiction/test/resources/xnor2.v diff --git a/bindings/pyfiction/test/resources/xor2.v b/bindings/mnt/pyfiction/test/resources/xor2.v similarity index 100% rename from bindings/pyfiction/test/resources/xor2.v rename to bindings/mnt/pyfiction/test/resources/xor2.v diff --git a/bindings/mnt/pyfiction/test/technology/__init__.py b/bindings/mnt/pyfiction/test/technology/__init__.py new file mode 100644 index 000000000..de323d0d7 --- /dev/null +++ b/bindings/mnt/pyfiction/test/technology/__init__.py @@ -0,0 +1,16 @@ +from os.path import dirname, basename, isfile, join +import glob +import os +import sys +from pathlib import Path + +if sys.platform == "win32" and "Z3_ROOT" in os.environ: + lib_path = Path(os.environ["Z3_ROOT"]) / "lib" + if lib_path.exists(): + os.add_dll_directory(str(lib_path)) + bin_path = Path(os.environ["Z3_ROOT"]) / "bin" + if bin_path.exists(): + os.add_dll_directory(str(bin_path)) + +modules = glob.glob(join(dirname(__file__), "*.py")) +__all__ = [basename(f)[:-3] for f in modules if isfile(f) and not f.endswith('__init__.py')] diff --git a/bindings/pyfiction/test/technology/test_area.py b/bindings/mnt/pyfiction/test/technology/test_area.py similarity index 86% rename from bindings/pyfiction/test/technology/test_area.py rename to bindings/mnt/pyfiction/test/technology/test_area.py index 762c9118b..b2a7db5e0 100644 --- a/bindings/pyfiction/test/technology/test_area.py +++ b/bindings/mnt/pyfiction/test/technology/test_area.py @@ -1,5 +1,5 @@ import unittest -from mnt.pyfiction import * +from mnt.pyfiction import (qca_layout, inml_layout, sidb_layout, area) class TestArea(unittest.TestCase): diff --git a/bindings/pyfiction/test/technology/test_charge_distribution_surface.py b/bindings/mnt/pyfiction/test/technology/test_charge_distribution_surface.py similarity index 94% rename from bindings/pyfiction/test/technology/test_charge_distribution_surface.py rename to bindings/mnt/pyfiction/test/technology/test_charge_distribution_surface.py index 59a84350c..e20b80b76 100644 --- a/bindings/pyfiction/test/technology/test_charge_distribution_surface.py +++ b/bindings/mnt/pyfiction/test/technology/test_charge_distribution_surface.py @@ -1,6 +1,6 @@ -from mnt.pyfiction import * +from mnt.pyfiction import (sidb_layout, sidb_technology, charge_distribution_surface, offset_coordinate, + sidb_charge_state, sidb_111_lattice, charge_distribution_surface_111, charge_index_mode) import unittest -import os class TestChargeDistributionSurface(unittest.TestCase): diff --git a/bindings/pyfiction/test/technology/test_sidb_lattice.py b/bindings/mnt/pyfiction/test/technology/test_sidb_lattice.py similarity index 98% rename from bindings/pyfiction/test/technology/test_sidb_lattice.py rename to bindings/mnt/pyfiction/test/technology/test_sidb_lattice.py index 8cf625cc5..801b71c4b 100644 --- a/bindings/pyfiction/test/technology/test_sidb_lattice.py +++ b/bindings/mnt/pyfiction/test/technology/test_sidb_lattice.py @@ -1,4 +1,4 @@ -from mnt.pyfiction import * +from mnt.pyfiction import (sidb_100_lattice, sidb_technology, sidb_111_lattice) import unittest diff --git a/bindings/pyfiction/test/technology/test_sidb_nm_distance.py b/bindings/mnt/pyfiction/test/technology/test_sidb_nm_distance.py similarity index 89% rename from bindings/pyfiction/test/technology/test_sidb_nm_distance.py rename to bindings/mnt/pyfiction/test/technology/test_sidb_nm_distance.py index 7c789e5d5..4a1999987 100644 --- a/bindings/pyfiction/test/technology/test_sidb_nm_distance.py +++ b/bindings/mnt/pyfiction/test/technology/test_sidb_nm_distance.py @@ -1,4 +1,4 @@ -from mnt.pyfiction import * +from mnt.pyfiction import (sidb_100_lattice, sidb_111_lattice, sidb_nm_distance_100, sidb_nm_distance_111) import unittest import os @@ -16,7 +16,7 @@ def test_sidb_nm_distance_100_lattice(self): self.assertAlmostEqual(sidb_nm_distance_100(layout_one, (0, 0), (2, 0)), 2 * 0.384) self.assertAlmostEqual(sidb_nm_distance_100(layout_one, (0, 0), (0, 1)), 0.225) - def test_sidb_nm_distance_100_lattice(self): + def test_sidb_nm_distance_111_lattice(self): layout_one = sidb_111_lattice((10, 10)) # Replace the placeholders with actual values or function calls diff --git a/bindings/pyfiction/test/technology/test_sidb_nm_position.py b/bindings/mnt/pyfiction/test/technology/test_sidb_nm_position.py similarity index 88% rename from bindings/pyfiction/test/technology/test_sidb_nm_position.py rename to bindings/mnt/pyfiction/test/technology/test_sidb_nm_position.py index 997f9c1fd..0ead8b9dc 100644 --- a/bindings/pyfiction/test/technology/test_sidb_nm_position.py +++ b/bindings/mnt/pyfiction/test/technology/test_sidb_nm_position.py @@ -1,6 +1,5 @@ -from mnt.pyfiction import * +from mnt.pyfiction import (sidb_layout, sidb_nm_position, sidb_100_lattice, sidb_111_lattice) import unittest -import os class TestSiDBNmPosition(unittest.TestCase): diff --git a/bindings/mnt/pyfiction/test/utils/__init__.py b/bindings/mnt/pyfiction/test/utils/__init__.py new file mode 100644 index 000000000..de323d0d7 --- /dev/null +++ b/bindings/mnt/pyfiction/test/utils/__init__.py @@ -0,0 +1,16 @@ +from os.path import dirname, basename, isfile, join +import glob +import os +import sys +from pathlib import Path + +if sys.platform == "win32" and "Z3_ROOT" in os.environ: + lib_path = Path(os.environ["Z3_ROOT"]) / "lib" + if lib_path.exists(): + os.add_dll_directory(str(lib_path)) + bin_path = Path(os.environ["Z3_ROOT"]) / "bin" + if bin_path.exists(): + os.add_dll_directory(str(bin_path)) + +modules = glob.glob(join(dirname(__file__), "*.py")) +__all__ = [basename(f)[:-3] for f in modules if isfile(f) and not f.endswith('__init__.py')] diff --git a/bindings/pyfiction/test/utils/test_routing_utils.py b/bindings/mnt/pyfiction/test/utils/test_routing_utils.py similarity index 92% rename from bindings/pyfiction/test/utils/test_routing_utils.py rename to bindings/mnt/pyfiction/test/utils/test_routing_utils.py index 037493237..47bade014 100644 --- a/bindings/pyfiction/test/utils/test_routing_utils.py +++ b/bindings/mnt/pyfiction/test/utils/test_routing_utils.py @@ -1,5 +1,5 @@ import unittest -from mnt.pyfiction import * +from mnt.pyfiction import (cartesian_gate_layout, route_path, a_star) class TestRoutePath(unittest.TestCase): diff --git a/bindings/pyfiction/CMakeLists.txt b/bindings/pyfiction/CMakeLists.txt deleted file mode 100644 index c875a62d5..000000000 --- a/bindings/pyfiction/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -pybind11_add_module(pyfiction pyfiction.cpp) -target_link_libraries(pyfiction PRIVATE libfiction) -target_include_directories(pyfiction - PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include) -set_property(TARGET pyfiction PROPERTY POSITION_INDEPENDENT_CODE ON) diff --git a/bindings/pyfiction/__init__.py b/bindings/pyfiction/__init__.py deleted file mode 100644 index d78244377..000000000 --- a/bindings/pyfiction/__init__.py +++ /dev/null @@ -1,17 +0,0 @@ -"""MNT fiction framework. - -This file is part of the MNT fiction framework released under the MIT license. -See https://github.com/cda-tum/fiction for more information. -""" - -import os -import sys -from pathlib import Path - -if sys.platform == "win32" and sys.version_info > (3, 8, 0) and "Z3_ROOT" in os.environ: - lib_path = Path(os.environ["Z3_ROOT"]) / "lib" - if lib_path.exists(): - os.add_dll_directory(str(lib_path)) - bin_path = Path(os.environ["Z3_ROOT"]) / "bin" - if bin_path.exists(): - os.add_dll_directory(str(bin_path)) diff --git a/bindings/pyfiction/test/algorithms/verification/__init__.py b/bindings/pyfiction/test/algorithms/verification/__init__.py deleted file mode 100644 index 5fde0b8ad..000000000 --- a/bindings/pyfiction/test/algorithms/verification/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -from os.path import dirname, basename, isfile, join -import glob -import os -import sys -from pathlib import Path - -if sys.platform == "win32" and sys.version_info > (3, 8, 0) and "Z3_ROOT" in os.environ: - lib_path = Path(os.environ["Z3_ROOT"]) / "lib" - if lib_path.exists(): - os.add_dll_directory(str(lib_path)) - bin_path = Path(os.environ["Z3_ROOT"]) / "bin" - if bin_path.exists(): - os.add_dll_directory(str(bin_path)) - -modules = glob.glob(join(dirname(__file__), "*.py")) -__all__ = [basename(f)[:-3] for f in modules if isfile(f) and not f.endswith('__init__.py')] diff --git a/bindings/pyfiction/test/inout/__init__.py b/bindings/pyfiction/test/inout/__init__.py deleted file mode 100644 index 5fde0b8ad..000000000 --- a/bindings/pyfiction/test/inout/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -from os.path import dirname, basename, isfile, join -import glob -import os -import sys -from pathlib import Path - -if sys.platform == "win32" and sys.version_info > (3, 8, 0) and "Z3_ROOT" in os.environ: - lib_path = Path(os.environ["Z3_ROOT"]) / "lib" - if lib_path.exists(): - os.add_dll_directory(str(lib_path)) - bin_path = Path(os.environ["Z3_ROOT"]) / "bin" - if bin_path.exists(): - os.add_dll_directory(str(bin_path)) - -modules = glob.glob(join(dirname(__file__), "*.py")) -__all__ = [basename(f)[:-3] for f in modules if isfile(f) and not f.endswith('__init__.py')] diff --git a/bindings/pyfiction/test/layouts/__init__.py b/bindings/pyfiction/test/layouts/__init__.py deleted file mode 100644 index 5fde0b8ad..000000000 --- a/bindings/pyfiction/test/layouts/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -from os.path import dirname, basename, isfile, join -import glob -import os -import sys -from pathlib import Path - -if sys.platform == "win32" and sys.version_info > (3, 8, 0) and "Z3_ROOT" in os.environ: - lib_path = Path(os.environ["Z3_ROOT"]) / "lib" - if lib_path.exists(): - os.add_dll_directory(str(lib_path)) - bin_path = Path(os.environ["Z3_ROOT"]) / "bin" - if bin_path.exists(): - os.add_dll_directory(str(bin_path)) - -modules = glob.glob(join(dirname(__file__), "*.py")) -__all__ = [basename(f)[:-3] for f in modules if isfile(f) and not f.endswith('__init__.py')] diff --git a/bindings/pyfiction/test/networks/__init__.py b/bindings/pyfiction/test/networks/__init__.py deleted file mode 100644 index 5fde0b8ad..000000000 --- a/bindings/pyfiction/test/networks/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -from os.path import dirname, basename, isfile, join -import glob -import os -import sys -from pathlib import Path - -if sys.platform == "win32" and sys.version_info > (3, 8, 0) and "Z3_ROOT" in os.environ: - lib_path = Path(os.environ["Z3_ROOT"]) / "lib" - if lib_path.exists(): - os.add_dll_directory(str(lib_path)) - bin_path = Path(os.environ["Z3_ROOT"]) / "bin" - if bin_path.exists(): - os.add_dll_directory(str(bin_path)) - -modules = glob.glob(join(dirname(__file__), "*.py")) -__all__ = [basename(f)[:-3] for f in modules if isfile(f) and not f.endswith('__init__.py')] diff --git a/bindings/pyfiction/test/technology/__init__.py b/bindings/pyfiction/test/technology/__init__.py deleted file mode 100644 index 5fde0b8ad..000000000 --- a/bindings/pyfiction/test/technology/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -from os.path import dirname, basename, isfile, join -import glob -import os -import sys -from pathlib import Path - -if sys.platform == "win32" and sys.version_info > (3, 8, 0) and "Z3_ROOT" in os.environ: - lib_path = Path(os.environ["Z3_ROOT"]) / "lib" - if lib_path.exists(): - os.add_dll_directory(str(lib_path)) - bin_path = Path(os.environ["Z3_ROOT"]) / "bin" - if bin_path.exists(): - os.add_dll_directory(str(bin_path)) - -modules = glob.glob(join(dirname(__file__), "*.py")) -__all__ = [basename(f)[:-3] for f in modules if isfile(f) and not f.endswith('__init__.py')] diff --git a/bindings/pyfiction/test/utils/__init__.py b/bindings/pyfiction/test/utils/__init__.py deleted file mode 100644 index 5fde0b8ad..000000000 --- a/bindings/pyfiction/test/utils/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -from os.path import dirname, basename, isfile, join -import glob -import os -import sys -from pathlib import Path - -if sys.platform == "win32" and sys.version_info > (3, 8, 0) and "Z3_ROOT" in os.environ: - lib_path = Path(os.environ["Z3_ROOT"]) / "lib" - if lib_path.exists(): - os.add_dll_directory(str(lib_path)) - bin_path = Path(os.environ["Z3_ROOT"]) / "bin" - if bin_path.exists(): - os.add_dll_directory(str(bin_path)) - -modules = glob.glob(join(dirname(__file__), "*.py")) -__all__ = [basename(f)[:-3] for f in modules if isfile(f) and not f.endswith('__init__.py')] diff --git a/cmake/FindZ3.cmake b/cmake/FindZ3.cmake index 3f2e66561..75f293829 100644 --- a/cmake/FindZ3.cmake +++ b/cmake/FindZ3.cmake @@ -6,177 +6,190 @@ include(FindPackageHandleStandardArgs) # Function to check Z3's version function(check_z3_version z3_include z3_lib) - if(z3_include AND EXISTS "${z3_include}/z3_version.h") - file(STRINGS "${z3_include}/z3_version.h" z3_version_str - REGEX "^#define[\t ]+Z3_MAJOR_VERSION[\t ]+.*") - string(REGEX REPLACE "^.*Z3_MAJOR_VERSION[\t ]+([0-9]*).*$" "\\1" Z3_MAJOR - "${z3_version_str}") - - file(STRINGS "${z3_include}/z3_version.h" z3_version_str - REGEX "^#define[\t ]+Z3_MINOR_VERSION[\t ]+.*") - string(REGEX REPLACE "^.*Z3_MINOR_VERSION[\t ]+([0-9]*).*$" "\\1" Z3_MINOR - "${z3_version_str}") - - file(STRINGS "${z3_include}/z3_version.h" z3_version_str - REGEX "^#define[\t ]+Z3_BUILD_NUMBER[\t ]+.*") - string(REGEX REPLACE "^.*Z3_BUILD_NUMBER[\t ]+([0-9]*).*$" "\\1" Z3_BUILD - "${z3_version_str}") - - set(z3_version_string ${Z3_MAJOR}.${Z3_MINOR}.${Z3_BUILD}) - endif() - - if(NOT z3_version_string) - message(STATUS "Could not determine Z3 version") - return() - endif() - - find_package_check_version(${z3_version_string} suitable_version - RESULT_MESSAGE_VARIABLE reason) - - if(suitable_version) - set(FOUND_SUITABLE_VERSION - TRUE - PARENT_SCOPE) - set(Z3_VERSION_STRING - ${z3_version_string} - PARENT_SCOPE) - else() - message(STATUS "${reason}") - endif() + try_run( + Z3_RUN_RESULT Z3_COMPILE_RESULT ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/try_z3.cpp + CMAKE_FLAGS -DINCLUDE_DIRECTORIES:STRING=${z3_include} LINK_LIBRARIES ${z3_lib} + COMPILE_OUTPUT_VARIABLE COMPILE_OUTPUT RUN_OUTPUT_STDOUT_VARIABLE RUN_OUTPUT + RUN_OUTPUT_STDERR_VARIABLE RUN_OUTPUT_STDERR) + + if (NOT Z3_COMPILE_RESULT OR RUN_OUTPUT_STDERR) + if (NOT Z3_COMPILE_RESULT) + message(STATUS "Could not compile test program for Z3 version check. Compile output: " + ${COMPILE_OUTPUT}) + else () + message(STATUS "Could not run test program for Z3 version check. Run output: " ${RUN_OUTPUT} + " RUN_OUTPUT_STDERR: " ${RUN_OUTPUT_STDERR}) + endif () + if (z3_include AND EXISTS "${z3_include}/z3_version.h") + file(STRINGS "${z3_include}/z3_version.h" z3_version_str + REGEX "^#define[\t ]+Z3_MAJOR_VERSION[\t ]+.*") + string(REGEX REPLACE "^.*Z3_MAJOR_VERSION[\t ]+([0-9]*).*$" "\\1" Z3_MAJOR + "${z3_version_str}") + + file(STRINGS "${z3_include}/z3_version.h" z3_version_str + REGEX "^#define[\t ]+Z3_MINOR_VERSION[\t ]+.*") + string(REGEX REPLACE "^.*Z3_MINOR_VERSION[\t ]+([0-9]*).*$" "\\1" Z3_MINOR + "${z3_version_str}") + + file(STRINGS "${z3_include}/z3_version.h" z3_version_str + REGEX "^#define[\t ]+Z3_BUILD_NUMBER[\t ]+.*") + string(REGEX REPLACE "^.*Z3_BUILD_NUMBER[\t ]+([0-9]*).*$" "\\1" Z3_BUILD "${z3_version_str}") + + set(z3_version_string ${Z3_MAJOR}.${Z3_MINOR}.${Z3_BUILD}) + endif () + + if (NOT z3_version_string) + message(STATUS "Could not determine Z3 version from z3_version.h") + return() + endif () + else () + string(REGEX MATCH "(Z3 )?([0-9]+.[0-9]+.[0-9]+.[0-9]+)" Z3_VERSION_STRING ${RUN_OUTPUT}) + set(z3_version_string ${CMAKE_MATCH_2}) + endif () + + find_package_check_version(${z3_version_string} suitable_version RESULT_MESSAGE_VARIABLE reason) + + if (suitable_version) + set(FOUND_SUITABLE_VERSION + TRUE + PARENT_SCOPE) + set(Z3_VERSION_STRING + ${z3_version_string} + PARENT_SCOPE) + else () + message(STATUS "${reason}") + endif () endfunction(check_z3_version) set(Z3_ROOT - "" - CACHE PATH "Root of Z3 distribution.") -if(DEFINED ENV{Z3_ROOT}) - set(Z3_ROOT $ENV{Z3_ROOT}) - message(STATUS "Z3_ROOT from environment: ${Z3_ROOT}") -endif() + "" + CACHE PATH "Root of Z3 distribution.") +if (DEFINED ENV{Z3_ROOT}) + set(Z3_ROOT $ENV{Z3_ROOT}) + message(STATUS "Z3_ROOT from environment: ${Z3_ROOT}") +endif () # if Z3_ROOT is provided, check there first -if(NOT ${Z3_ROOT} STREQUAL "") - find_path( - Z3_CXX_INCLUDE_DIRS - NAMES z3.h z3++.h - NO_DEFAULT_PATH - PATHS ${Z3_ROOT}/include - PATH_SUFFIXES libz3 z3) - - find_library( - Z3_LIBRARIES - NAMES z3 libz3 - NO_DEFAULT_PATH - PATHS ${Z3_ROOT} - PATH_SUFFIXES lib bin) - - if(Z3_CXX_INCLUDE_DIRS AND Z3_LIBRARIES) - message(STATUS "Z3_ROOT provided and includes and libraries found.") - message(VERBOSE "Z3_CXX_INCLUDE_DIRS: ${Z3_CXX_INCLUDE_DIRS}") - message(VERBOSE "Z3_LIBRARIES: ${Z3_LIBRARIES}") - check_z3_version(${Z3_CXX_INCLUDE_DIRS} ${Z3_LIBRARIES}) - endif() -endif() +if (NOT ${Z3_ROOT} STREQUAL "") + find_path( + Z3_CXX_INCLUDE_DIRS + NAMES z3.h z3++.h + NO_DEFAULT_PATH + PATHS ${Z3_ROOT}/include + PATH_SUFFIXES libz3 z3) + + find_library( + Z3_LIBRARIES + NAMES z3 libz3 + NO_DEFAULT_PATH + PATHS ${Z3_ROOT} + PATH_SUFFIXES lib bin) + + if (Z3_CXX_INCLUDE_DIRS AND Z3_LIBRARIES) + message(STATUS "Z3_ROOT provided and includes and libraries found.") + message(VERBOSE "Z3_CXX_INCLUDE_DIRS: ${Z3_CXX_INCLUDE_DIRS}") + message(VERBOSE "Z3_LIBRARIES: ${Z3_LIBRARIES}") + check_z3_version(${Z3_CXX_INCLUDE_DIRS} ${Z3_LIBRARIES}) + endif () +endif () # see if a config file is available -if(NOT FOUND_SUITABLE_VERSION) - unset(Z3_CXX_INCLUDE_DIRS CACHE) - unset(Z3_LIBRARIES CACHE) - - find_package(Z3 CONFIG QUIET) - if(Z3_FOUND) - message(STATUS "Found Z3 includes and libraries from config file") - message(VERBOSE "Z3_CXX_INCLUDE_DIRS: ${Z3_CXX_INCLUDE_DIRS}") - message(VERBOSE "Z3_LIBRARIES: ${Z3_LIBRARIES}") - check_z3_version(${Z3_CXX_INCLUDE_DIRS} ${Z3_LIBRARIES}) - endif() -endif() +if (NOT FOUND_SUITABLE_VERSION) + unset(Z3_CXX_INCLUDE_DIRS CACHE) + unset(Z3_LIBRARIES CACHE) -# if Z3 has not been found yet, look in the system paths -if(NOT FOUND_SUITABLE_VERSION) - unset(Z3_CXX_INCLUDE_DIRS CACHE) - unset(Z3_LIBRARIES CACHE) - - find_path( - Z3_CXX_INCLUDE_DIRS - NAMES z3.h z3++.h - PATH_SUFFIXES libz3 z3) - find_library( - Z3_LIBRARIES - NAMES z3 libz3 - PATH_SUFFIXES lib bin) - - if(Z3_CXX_INCLUDE_DIRS AND Z3_LIBRARIES) - message(STATUS "Found Z3 includes and libraries in system paths.") - message(VERBOSE "Z3_CXX_INCLUDE_DIRS: ${Z3_CXX_INCLUDE_DIRS}") - message(VERBOSE "Z3_LIBRARIES: ${Z3_LIBRARIES}") - check_z3_version(${Z3_CXX_INCLUDE_DIRS} ${Z3_LIBRARIES}) - endif() -endif() + find_package(Z3 CONFIG QUIET) + if (Z3_FOUND) + message(STATUS "Found Z3 includes and libraries from config file") + message(VERBOSE "Z3_CXX_INCLUDE_DIRS: ${Z3_CXX_INCLUDE_DIRS}") + message(VERBOSE "Z3_LIBRARIES: ${Z3_LIBRARIES}") + set(FOUND_SUITABLE_VERSION TRUE) + set(Z3_VERSION_STRING ${Z3_VERSION}) + endif () +endif () -# if it is still not found, try to find it with Python as a last resort -if(NOT FOUND_SUITABLE_VERSION) - unset(Z3_CXX_INCLUDE_DIRS CACHE) - unset(Z3_LIBRARIES CACHE) - - set(PYTHON_FIND_VIRTUALENV FIRST) - find_package(Python COMPONENTS Interpreter Development.Module) - if(Python_FOUND) - execute_process( - COMMAND ${Python_EXECUTABLE} -c - "import os, z3; print(os.path.dirname(z3.__file__))" - OUTPUT_VARIABLE Z3_PYTHON_ROOT) - string(STRIP ${Z3_PYTHON_ROOT} Z3_PYTHON_ROOT) - message(STATUS "Z3_PYTHON_ROOT: ${Z3_PYTHON_ROOT}") - - if(Z3_PYTHON_ROOT) - find_path( - Z3_CXX_INCLUDE_DIRS - NAMES z3.h z3++.h - NO_DEFAULT_PATH - PATHS ${Z3_PYTHON_ROOT} - PATH_SUFFIXES libz3 z3 include) - - find_library( - Z3_LIBRARIES - NAMES z3 libz3 - NO_DEFAULT_PATH - PATHS ${Z3_PYTHON_ROOT} - PATH_SUFFIXES lib bin) - - if(Z3_CXX_INCLUDE_DIRS AND Z3_LIBRARIES) - message( - STATUS "Found Z3 includes and libraries from Python installation.") +# if Z3 has not been found yet, look in the system paths +if (NOT FOUND_SUITABLE_VERSION) + unset(Z3_CXX_INCLUDE_DIRS CACHE) + unset(Z3_LIBRARIES CACHE) + + find_path( + Z3_CXX_INCLUDE_DIRS + NAMES z3.h z3++.h + PATH_SUFFIXES libz3 z3) + find_library( + Z3_LIBRARIES + NAMES z3 libz3 + PATH_SUFFIXES lib bin) + + if (Z3_CXX_INCLUDE_DIRS AND Z3_LIBRARIES) + message(STATUS "Found Z3 includes and libraries in system paths.") message(VERBOSE "Z3_CXX_INCLUDE_DIRS: ${Z3_CXX_INCLUDE_DIRS}") message(VERBOSE "Z3_LIBRARIES: ${Z3_LIBRARIES}") check_z3_version(${Z3_CXX_INCLUDE_DIRS} ${Z3_LIBRARIES}) - endif() - endif() - endif() -endif() - -if(NOT FOUND_SUITABLE_VERSION) - if(Z3_CXX_INCLUDE_DIRS AND Z3_LIBRARIES) - message( - STATUS - "Found include and library directories but could not find a suitable Z3 version" - ) - endif() - set(Z3_VERSION_STRING "0.0.0") -endif() + endif () +endif () + +# if it is still not found, try to find it with Python as a last resort +if (NOT FOUND_SUITABLE_VERSION) + unset(Z3_CXX_INCLUDE_DIRS CACHE) + unset(Z3_LIBRARIES CACHE) + + set(PYTHON_FIND_VIRTUALENV FIRST) + find_package(Python COMPONENTS Interpreter Development.Module) + if (Python_FOUND) + execute_process( + COMMAND ${Python_EXECUTABLE} -c "import os, z3; print(os.path.dirname(z3.__file__))" + OUTPUT_VARIABLE Z3_PYTHON_ROOT) + string(STRIP "${Z3_PYTHON_ROOT}" Z3_PYTHON_ROOT) + message(STATUS "Z3_PYTHON_ROOT: ${Z3_PYTHON_ROOT}") + + if (Z3_PYTHON_ROOT) + find_path( + Z3_CXX_INCLUDE_DIRS + NAMES z3.h z3++.h + NO_DEFAULT_PATH + PATHS ${Z3_PYTHON_ROOT} + PATH_SUFFIXES libz3 z3 include) + + find_library( + Z3_LIBRARIES + NAMES z3 libz3 + NO_DEFAULT_PATH + PATHS ${Z3_PYTHON_ROOT} + PATH_SUFFIXES lib bin) + + if (Z3_CXX_INCLUDE_DIRS AND Z3_LIBRARIES) + message(STATUS "Found Z3 includes and libraries from Python installation.") + message(VERBOSE "Z3_CXX_INCLUDE_DIRS: ${Z3_CXX_INCLUDE_DIRS}") + message(VERBOSE "Z3_LIBRARIES: ${Z3_LIBRARIES}") + check_z3_version(${Z3_CXX_INCLUDE_DIRS} ${Z3_LIBRARIES}) + endif () + endif () + endif () +endif () + +if (NOT FOUND_SUITABLE_VERSION) + if (Z3_CXX_INCLUDE_DIRS AND Z3_LIBRARIES) + message(STATUS "Found include and library directories but could not find a suitable Z3 version") + endif () + set(Z3_VERSION_STRING "0.0.0") +endif () find_package_handle_standard_args( - Z3 - REQUIRED_VARS Z3_LIBRARIES Z3_CXX_INCLUDE_DIRS - VERSION_VAR Z3_VERSION_STRING) - -if(Z3_FOUND) - if(NOT TARGET z3::z3lib) - add_library(z3::z3lib INTERFACE IMPORTED GLOBAL) - target_include_directories(z3::z3lib INTERFACE ${Z3_CXX_INCLUDE_DIRS}) - target_link_libraries(z3::z3lib INTERFACE ${Z3_LIBRARIES}) - endif() - add_compile_definitions(Z3_FOUND) -endif() + Z3 + REQUIRED_VARS Z3_LIBRARIES Z3_CXX_INCLUDE_DIRS + VERSION_VAR Z3_VERSION_STRING) + +if (Z3_FOUND) + if (NOT TARGET z3::z3lib) + add_library(z3::z3lib INTERFACE IMPORTED GLOBAL) + target_include_directories(z3::z3lib INTERFACE ${Z3_CXX_INCLUDE_DIRS}) + target_link_libraries(z3::z3lib INTERFACE ${Z3_LIBRARIES}) + endif () + add_compile_definitions(Z3_FOUND) +endif () mark_as_advanced(Z3_CXX_INCLUDE_DIRS Z3_LIBRARIES Z3_VERSION_STRING) diff --git a/cmake/try_z3.cpp b/cmake/try_z3.cpp new file mode 100644 index 000000000..5be55ff12 --- /dev/null +++ b/cmake/try_z3.cpp @@ -0,0 +1,9 @@ +#include + +#include + +int main() +{ + std::cout << Z3_get_full_version(); + return 0; +} diff --git a/docs/getting_started.rst b/docs/getting_started.rst index c745b8809..19c89cf88 100644 --- a/docs/getting_started.rst +++ b/docs/getting_started.rst @@ -21,7 +21,8 @@ them automatically. Should the repository have been cloned before, the commands: git submodule update --init --recursive -will fetch the latest version of all external modules used. Additionally, only ``CMake`` and a C++17 compiler are required. +will fetch the latest version of all external modules used. Additionally, only ``CMake`` and a C++17 compiler are +required for the C++ part. If you want to work with the Python bindings, you need a Python 3.8+ installation. At the time of writing, for parallel STL algorithms to work when using GCC, the TBB library (``libtbb-dev`` on Ubuntu) is needed. It is an optional dependency that can be installed for a performance boost in certain scenarios. For your @@ -29,7 +30,7 @@ preferred compiler, see the current implementation state of `P0024R2 `_ where we publish -wheels for every new release:: +wheels for every new release: + +.. code-block:: console + + (venv) $ pip install mnt.pyfiction + +In most practical cases (under 64-bit Linux, macOS incl. Apple Silicon, and Windows), this requires no compilation and +merely downloads and installs a platform-specific pre-built wheel. + +.. note:: + In order to set up a virtual environment on UNIX-like systems, you can use the following commands: - pip install mnt.pyfiction + .. code-block:: console + + $ python3 -m venv venv + $ source venv/bin/activate + + If you are using Windows, you can use the following commands instead: + + .. code-block:: console + + $ python3 -m venv venv + $ venv\Scripts\activate.bat You can then import the bindings in your Python project: @@ -156,9 +183,11 @@ SAT-based ``onepass`` synthesis The :ref:`one-pass synthesis algorithm ` is embedded via the Python3 script `Mugen `_ by Winston Haaswijk using `pybind11 `_. -It has some further Python dependencies that can be installed via ``pip3``:: +It has some further Python dependencies that can be installed via ``pip3``: - pip install -r libs/mugen/requirements.txt +.. code-block:: console + + (venv) $ pip install -r libs/mugen/requirements.txt The Python integration is experimental and may cause issues on some systems. It is currently not available on Windows and some macOS versions due to issues with ``python-sat``. Mugen requires at least Python 3.7! @@ -188,22 +217,26 @@ include the desired header files to get started: } -Each file can be built individually via CMake:: +Each file can be built individually via CMake: + +.. code-block:: console - cmake . -B build -DFICTION_EXPERIMENTS=ON - cd build - cmake --build . -j4 + $ cmake . -B build -DFICTION_EXPERIMENTS=ON + $ cd build + $ cmake --build . -j4 Building tests -------------- -Unit tests can be built with CMake via a respective flag on the command line and executed via ``ctest``:: +Unit tests can be built with CMake via a respective flag on the command line and executed via ``ctest``: - cmake . -B build -DFICTION_TEST=ON - cd build - cmake --build . -j4 - ctest +.. code-block:: console + + $ cmake . -B build -DFICTION_TEST=ON + $ cd build + $ cmake --build . -j4 + $ ctest @@ -213,11 +246,13 @@ Building code benchmarks Using ``Catch2``'s micro-benchmarking feature, you can compile and run code tests that evaluate the performance of certain code constructs. The ``test/benchmark`` folder provides a selection of benchmarks we were running to evaluate the performance of our code during development. Any ``*.cpp`` file that is placed in that folder is automatically -linked against *fiction* and compiled as a stand-alone binary using the following commands:: +linked against *fiction* and compiled as a stand-alone binary using the following commands: + +.. code-block:: console - cmake . -B build -DFICTION_BENCHMARK=ON - cd build - cmake --build . -j4 + $ cmake . -B build -DFICTION_BENCHMARK=ON + $ cd build + $ cmake --build . -j4 Noteworthy CMake options diff --git a/include/fiction/algorithms/simulation/sidb/random_sidb_layout_generator.hpp b/include/fiction/algorithms/simulation/sidb/random_sidb_layout_generator.hpp index 76a01f0f0..4770daa4a 100644 --- a/include/fiction/algorithms/simulation/sidb/random_sidb_layout_generator.hpp +++ b/include/fiction/algorithms/simulation/sidb/random_sidb_layout_generator.hpp @@ -68,7 +68,7 @@ struct generate_random_sidb_layout_params * is small and many SiDBs are to be placed, several tries are required to generate a layout with no positively * charged SiDBs. */ - uint64_t maximal_attempts = 10E6; + uint64_t maximal_attempts = static_cast(10E6); /** * The desired number of unique layouts to be generated. */ diff --git a/libs/Catch2 b/libs/Catch2 index 0321d2fce..506276c59 160000 --- a/libs/Catch2 +++ b/libs/Catch2 @@ -1 +1 @@ -Subproject commit 0321d2fce328b5e2ad106a8230ff20e0d5bf5501 +Subproject commit 506276c59217429c93abd2fe9507c7f45eb81072 diff --git a/libs/json b/libs/json index ee32bfc1c..a97041a98 160000 --- a/libs/json +++ b/libs/json @@ -1 +1 @@ -Subproject commit ee32bfc1c263900d5c31cf8a8c5429048719e42a +Subproject commit a97041a98fc7436cda3b28fb6e353071829d3f02 diff --git a/libs/mockturtle b/libs/mockturtle index 2eeadbeef..7d29e9171 160000 --- a/libs/mockturtle +++ b/libs/mockturtle @@ -1 +1 @@ -Subproject commit 2eeadbeef45142b950d32b0b4c75c6a6cec74ea4 +Subproject commit 7d29e9171b150a958b4d366cbc1458735542fe1c diff --git a/libs/pybind11 b/libs/pybind11 index e7c9b9073..83b92ceb3 160000 --- a/libs/pybind11 +++ b/libs/pybind11 @@ -1 +1 @@ -Subproject commit e7c9b907394ef241da7f5a8f93d3faec6adb2df5 +Subproject commit 83b92ceb3537666fb0188f564e1d53bf8c80b0ba diff --git a/noxfile.py b/noxfile.py new file mode 100644 index 000000000..a25246f6f --- /dev/null +++ b/noxfile.py @@ -0,0 +1,117 @@ +"""Nox sessions.""" + +from __future__ import annotations + +import os +import shutil +import sys +from typing import TYPE_CHECKING + +import nox + +if TYPE_CHECKING: + from collections.abc import Sequence + +nox.needs_version = ">=2024.3.2" +nox.options.default_venv_backend = "uv|virtualenv" + +nox.options.sessions = ["lint", "tests", "minimums"] + +PYTHON_ALL_VERSIONS = ["3.8", "3.9", "3.10", "3.11", "3.12"] + +# The following lists all the build requirements for building the package. +# Note that this includes transitive build dependencies of package dependencies, +# since we use `--no-build-isolation` to install the package in editable mode +# and get better caching performance. This only concerns dependencies that are +# not available via wheels on PyPI (i.e., only as source distributions). +BUILD_REQUIREMENTS = [ + "scikit-build-core>=0.10.1", + "setuptools_scm>=8.1" +] + +if os.environ.get("CI", None): + nox.options.error_on_missing_interpreters = True + + +@nox.session(reuse_venv=True) +def lint(session: nox.Session) -> None: + """Run the linter.""" + if shutil.which("pre-commit") is None: + session.install("pre-commit") + + session.run("pre-commit", "run", "--all-files", *session.posargs, external=True) + + +def _run_tests( + session: nox.Session, + *, + install_args: Sequence[str] = (), + run_args: Sequence[str] = (), + extras: Sequence[str] = (), +) -> None: + posargs = list(session.posargs) + env = {} + if os.environ.get("CI", None) and sys.platform == "win32": + env["SKBUILD_CMAKE_ARGS"] = "-T ClangCL" + + if shutil.which("cmake") is None and shutil.which("cmake3") is None: + session.install("cmake") + if shutil.which("ninja") is None: + session.install("ninja") + + _extras = ["test", *extras] + if "--cov" in posargs: + _extras.append("coverage") + posargs.append("--cov-config=pyproject.toml") + + session.install(*BUILD_REQUIREMENTS, *install_args, env=env) + install_arg = f"-ve.[{','.join(_extras)}]" + session.install("--no-build-isolation", install_arg, *install_args, env=env) + session.run("pytest", *run_args, *posargs, env=env) + + +@nox.session(reuse_venv=True, python=PYTHON_ALL_VERSIONS) +def tests(session: nox.Session) -> None: + """Run the test suite.""" + _run_tests(session) + + +@nox.session(reuse_venv=True, venv_backend="uv", python=PYTHON_ALL_VERSIONS) +def minimums(session: nox.Session) -> None: + """Test the minimum versions of dependencies.""" + _run_tests( + session, + install_args=["--resolution=lowest-direct"], + run_args=["-Wdefault"], + ) + session.run("uv", "pip", "list") + +# @nox.session(reuse_venv=True) +# def docs(session: nox.Session) -> None: +# """Build the docs. Use "--non-interactive" to avoid serving. Pass "-b linkcheck" to check links.""" +# parser = argparse.ArgumentParser() +# parser.add_argument("-b", dest="builder", default="html", help="Build target (default: html)") +# args, posargs = parser.parse_known_args(session.posargs) +# +# serve = args.builder == "html" and session.interactive +# extra_installs = ["sphinx-autobuild"] if serve else [] +# session.install(*BUILD_REQUIREMENTS, *extra_installs) +# session.install("--no-build-isolation", "-ve.[docs]") +# +# if args.builder == "linkcheck": +# session.run("sphinx-build", "-b", "linkcheck", "docs", "docs/_build/linkcheck", *posargs) +# return +# +# shared_args = ( +# "-n", # nitpicky mode +# "-T", # full tracebacks +# f"-b={args.builder}", +# "docs", +# f"docs/_build/{args.builder}", +# *posargs, +# ) +# +# if serve: +# session.run("sphinx-autobuild", *shared_args) +# else: +# session.run("sphinx-build", "--keep-going", *shared_args) diff --git a/pyproject.toml b/pyproject.toml index f2ab00924..e88db138a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,11 +1,9 @@ [build-system] requires = [ - "setuptools>=45", - "setuptools_scm[toml]>=7", - "ninja>=1.10; sys_platform != 'win32'", - "cmake>=3.21", + "scikit-build-core>=0.10.1", + "setuptools-scm>=8.1" ] -build-backend = "setuptools.build_meta" +build-backend = "scikit_build_core.build" [project] name = "mnt.pyfiction" @@ -25,6 +23,13 @@ license = { file = "LICENSE.txt" } classifiers = [ 'Development Status :: 4 - Beta', 'Programming Language :: Python :: 3', + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", 'Programming Language :: C++', 'Environment :: Console', 'License :: OSI Approved :: MIT License', @@ -37,6 +42,21 @@ classifiers = [ ] requires-python = ">=3.8" +dependencies = [ + "z3-solver>=4.8.0" +] + +[project.optional-dependencies] +test = ["pytest>=7.2", "mnt.pyfiction"] +docs = [ + "setuptools-scm>=8.1", + "sphinx==8.1.3; python_version >= '3.10'", + "breathe==4.35.0", + "sphinx-rtd-theme==3.0.2", + "sphinx-tabs==3.4.7", + "z3-solver>=4.8.0", + "mnt.pyfiction" +] [project.urls] Source = 'https://github.com/cda-tum/fiction' @@ -44,33 +64,114 @@ Tracker = 'https://github.com/cda-tum/fiction/issues' Documentation = 'https://fiction.readthedocs.io/en/latest/' Research = 'https://www.cda.cit.tum.de/research/fcn/' -[project.optional-dependencies] -test = [ - "python-dotenv==0.21.1" + +[tool.scikit-build] +# Protect the configuration against future changes in scikit-build-core +minimum-version = "build-system.requires" +# Set the wheel install directory +wheel.install-dir = "mnt/pyfiction" +# Set required Ninja version +ninja.version = ">=1.10" +# Setuptools-style build caching in a local directory +build-dir = "build/{wheel_tag}/{build_type}" +# Explicitly set the package directory +wheel.packages = ["bindings/mnt"] +# Only build the Python bindings target +build.targets = ["pyfiction"] +# Only install the Python package component +install.components = ["fiction_Python"] + +sdist.exclude = [ + "**/.git", + "**/.github", + "**/app", + "**/apps", + "**/bib", + "**/css", + "**/cli", + "**/html", + "**/doc", + "**/docs", + "**/benchmark", + "**/benchmarks", + "**/experiment", + "**/experiments", + "**/examples", + "**/include", + "**/libs", + "**/cmake-build-**", + "**/plots", + "**/test", + "**/tests", + "**/nauty", + "**.cpp", + "**.hpp", + "**.pdf", + "**.ans", + "**.out", + "**.log", + "**.xml", + "**CMakeList.txt", + "**__pycache__" ] -[tool.setuptools.packages.find] -include = ["bindings/pyfiction.*"] +[tool.scikit-build.cmake.define] +MOCKTURTLE_EXAMPLES = "OFF" +FICTION_PROGRESS_BARS = "OFF" +FICTION_CLI = "OFF" +FICTION_TEST = "OFF" +FICTION_EXPERIMENTS = "OFF" +FICTION_ENABLE_IPO = "ON" +FICTION_ENABLE_PCH = "ON" +FICTION_ENABLE_UNITY_BUILD = "ON" +FICTION_Z3 = "ON" +FICTION_PYTHON_BINDINGS = "ON" + +[[tool.scikit-build.overrides]] +if.python-version = ">=3.13" +if.abi-flags = "t" +if.platform-system = "win32" +inherit.cmake.define = "append" +cmake.define.DISABLE_GIL = "1" + + +[tool.pytest.ini_options] +minversion = "7.2" +testpaths = ["bindings/mnt/pyfiction/test/"] +addopts = ["-ra", "--strict-markers", "--strict-config", "--showlocals"] +log_cli_level = "INFO" +xfail_strict = true -[tool.setuptools_scm] [tool.cibuildwheel] build = "cp3*" archs = "auto64" skip = "*-musllinux*" -test-skip = "*-macosx_arm64" -test-command = "python -m unittest discover --start-directory bindings/pyfiction/ --verbose" -environment = { z3 = "ON" } -build-frontend = "pip" +test-command = "python -c \"from mnt import pyfiction\"" +build-frontend = "build[uv]" +free-threaded-support = true manylinux-x86_64-image = "manylinux_2_28" [tool.cibuildwheel.linux] -environment = { Z3_ROOT = "/opt/python/cp39-cp39/lib/python3.9/site-packages/z3", z3 = "ON" } +environment = { Z3_ROOT = "/opt/python/cp311-cp311/lib/python3.11/site-packages/z3" } +before-all = "/opt/python/cp311-cp311/bin/pip install z3-solver>=4.8.0" +repair-wheel-command = [ + "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/python/cp311-cp311/lib/python3.11/site-packages/z3/lib", + "auditwheel repair -w {dest_dir} {wheel}", +] [tool.cibuildwheel.macos] -archs = "x86_64" -environment = { MACOSX_DEPLOYMENT_TARGET = "11.0", z3 = "ON" } +environment = { MACOSX_DEPLOYMENT_TARGET = "11.0" } [tool.cibuildwheel.windows] -before-build = "pip install delvewheel" -repair-wheel-command = "delvewheel repair -v -w {dest_dir} {wheel}" +before-build = "pip install delvewheel>=1.7.3" +repair-wheel-command = "delvewheel repair -v -w {dest_dir} {wheel} --namespace-pkg mnt" +environment = { CMAKE_GENERATOR = "Ninja" } + +[[tool.cibuildwheel.overrides]] +select = "*-macosx_arm64" +environment = { MACOSX_DEPLOYMENT_TARGET = "11.0" } + + +[tool.uv] +reinstall-package = ["mnt.pyfiction"] diff --git a/setup.py b/setup.py deleted file mode 100644 index 74781d91b..000000000 --- a/setup.py +++ /dev/null @@ -1,135 +0,0 @@ -import os -import sys -import platform -import re -import subprocess - -from setuptools import setup, Extension, find_namespace_packages -from setuptools.command.build_ext import build_ext - - -class CMakeExtension(Extension): - def __init__(self, name, sourcedir='', namespace=''): - Extension.__init__(self, name, sources=[]) - self.sourcedir = os.path.abspath(sourcedir) - self.namespace = namespace - - -class CMakeBuild(build_ext): - def build_extension(self, ext): - self.package = ext.namespace - extdir = os.path.abspath(os.path.dirname(self.get_ext_fullpath(ext.name))) - # required for auto-detection of auxiliary "native" libs - if not extdir.endswith(os.path.sep): - extdir += os.path.sep - - # check if Z3 should be used. If no argument is given, pyfiction does not depend on Z3 by default. - z3 = os.environ.get("z3", "OFF") - - # store environment variable - with open(".env", "w") as env_file: - env_file.write(f"z3={z3}") - - cmake_args = ['-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=' + extdir, - '-DPYTHON_EXECUTABLE=' + sys.executable, - '-DMOCKTURTLE_EXAMPLES=OFF', - '-DFICTION_PROGRESS_BARS=OFF', - '-DFICTION_CLI=OFF', - '-DFICTION_TEST=OFF', - '-DFICTION_EXPERIMENTS=OFF', - '-DFICTION_BENCHMARK=OFF', - '-DFICTION_ENABLE_IPO=ON', - '-DFICTION_ENABLE_PCH=ON', - '-DFICTION_ENABLE_UNITY_BUILD=ON', - '-DFICTION_PYTHON_BINDINGS=ON', - f'-DFICTION_Z3={z3}', - ] - - if "Z3_ROOT" in os.environ: - cmake_args += ['-DZ3_ROOT={}'.format(os.environ.get("Z3_ROOT"))] - - if self.compiler.compiler_type != "msvc": - # Using Ninja-build since it a) is available as a wheel and b) - # multithreads automatically. MSVC would require all variables be - # exported for Ninja to pick it up, which is a little tricky to do. - # Users can override the generator with CMAKE_GENERATOR in CMake - # 3.15+. - cmake_generator = os.environ.get("CMAKE_GENERATOR", "") - if not cmake_generator: - cmake_args += ["-GNinja"] - - cfg = 'Debug' if self.debug else 'Release' - cmake_args += ['-DCMAKE_BUILD_TYPE={}'.format(cfg)] - build_args = ['--config', cfg] - - if platform.system() == "Windows": - cmake_args += ['-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_{}={}'.format(cfg.upper(), extdir)] - cmake_args += ['-T', 'ClangCl'] - if sys.maxsize > 2 ** 32: - cmake_args += ['-A', 'x64'] - build_args += ['--', '/m'] - else: - cpus = os.cpu_count() - if cpus is None: - cpus = 2 - build_args += ['--', f'-j{cpus}'] - - # cross-compile support for macOS - respect ARCHFLAGS if set - if sys.platform.startswith("darwin"): - archs = re.findall(r"-arch (\S+)", os.environ.get("ARCHFLAGS", "")) - if archs: - arch_argument = "-DCMAKE_OSX_ARCHITECTURES={}".format(";".join(archs)) - print('macOS building with: ', arch_argument, flush=True) - cmake_args += [arch_argument] - - env = os.environ.copy() - env['CXXFLAGS'] = '{} -DVERSION_INFO=\\"{}\\"'.format(env.get('CXXFLAGS', ''), - self.distribution.get_version()) - if not os.path.exists(self.build_temp): - os.makedirs(self.build_temp) - else: - os.remove(os.path.join(self.build_temp, 'CMakeCache.txt')) - - subprocess.check_call(['cmake', ext.sourcedir] + cmake_args, cwd=self.build_temp, env=env) - subprocess.check_call(['cmake', '--build', '.', '--target', ext.name] + build_args, cwd=self.build_temp) - - -README_PATH = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'README.md') -with open(README_PATH, encoding="utf8") as readme_file: - README = readme_file.read() - -setup( - name='mnt.pyfiction', - version='0.6.5', - author='Marcel Walter', - author_email='marcel.walter@tum.de', - description='Design Automation for Field-coupled Nanotechnologies', - long_description=README, - long_description_content_type='text/markdown', - license='MIT', - url='https://www.cda.cit.tum.de/research/fcn/', - ext_modules=[CMakeExtension('pyfiction', namespace='mnt')], - cmdclass={"build_ext": CMakeBuild}, - zip_safe=False, - python_requires=">=3.8", - classifiers=[ - 'Development Status :: 4 - Beta', - 'Programming Language :: Python :: 3', - 'Programming Language :: C++', - 'Environment :: Console', - 'License :: OSI Approved :: MIT License', - 'Operating System :: Microsoft :: Windows', - 'Operating System :: MacOS', - 'Operating System :: POSIX :: Linux', - 'Intended Audience :: Science/Research', - 'Natural Language :: English', - 'Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)', - ], - keywords='MNT fiction nanotechnology fcn qca nml sidb design automation placement routing clocking simulation', - project_urls={ - 'Source': 'https://github.com/cda-tum/fiction', - 'Tracker': 'https://github.com/cda-tum/fiction/issues', - 'Documentation': 'https://fiction.readthedocs.io/en/latest/', - 'Research': 'https://www.cda.cit.tum.de/research/fcn/', - } -) diff --git a/uv.lock b/uv.lock new file mode 100644 index 000000000..6e62532d2 --- /dev/null +++ b/uv.lock @@ -0,0 +1,686 @@ +version = 1 +requires-python = ">=3.8" +resolution-markers = [ + "python_full_version < '3.10'", + "python_full_version >= '3.10'", +] + +[[package]] +name = "alabaster" +version = "0.7.13" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version < '3.10'", +] +sdist = { url = "https://files.pythonhosted.org/packages/94/71/a8ee96d1fd95ca04a0d2e2d9c4081dac4c2d2b12f7ddb899c8cb9bfd1532/alabaster-0.7.13.tar.gz", hash = "sha256:a27a4a084d5e690e16e01e03ad2b2e552c61a65469419b907243193de1a84ae2", size = 11454 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/64/88/c7083fc61120ab661c5d0b82cb77079fc1429d3f913a456c1c82cf4658f7/alabaster-0.7.13-py3-none-any.whl", hash = "sha256:1ee19aca801bbabb5ba3f5f258e4422dfa86f82f3e9cefb0859b283cdd7f62a3", size = 13857 }, +] + +[[package]] +name = "alabaster" +version = "1.0.0" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version >= '3.10'", +] +sdist = { url = "https://files.pythonhosted.org/packages/a6/f8/d9c74d0daf3f742840fd818d69cfae176fa332022fd44e3469487d5a9420/alabaster-1.0.0.tar.gz", hash = "sha256:c00dca57bca26fa62a6d7d0a9fcce65f3e026e9bfe33e9c538fd3fbb2144fd9e", size = 24210 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/7e/b3/6b4067be973ae96ba0d615946e314c5ae35f9f993eca561b356540bb0c2b/alabaster-1.0.0-py3-none-any.whl", hash = "sha256:fc6786402dc3fcb2de3cabd5fe455a2db534b371124f1f21de8731783dec828b", size = 13929 }, +] + +[[package]] +name = "babel" +version = "2.16.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pytz", marker = "python_full_version < '3.9'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/2a/74/f1bc80f23eeba13393b7222b11d95ca3af2c1e28edca18af487137eefed9/babel-2.16.0.tar.gz", hash = "sha256:d1f3554ca26605fe173f3de0c65f750f5a42f924499bf134de6423582298e316", size = 9348104 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ed/20/bc79bc575ba2e2a7f70e8a1155618bb1301eaa5132a8271373a6903f73f8/babel-2.16.0-py3-none-any.whl", hash = "sha256:368b5b98b37c06b7daf6696391c3240c938b37767d4584413e8438c5c435fa8b", size = 9587599 }, +] + +[[package]] +name = "breathe" +version = "4.35.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "docutils" }, + { name = "sphinx", version = "7.1.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, + { name = "sphinx", version = "8.1.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/a2/9f/0c6f4ae0608d5edbb1df357c2487edfcbda13e75f4e48a898972592e2e48/breathe-4.35.0.tar.gz", hash = "sha256:5165541c3c67b6c7adde8b3ecfe895c6f7844783c4076b6d8d287e4f33d62386", size = 83358 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/eb/61/faddc25913de74e60e175bcfd962ec83532653c5895c0a06a83a6b5bbf3d/breathe-4.35.0-py3-none-any.whl", hash = "sha256:52c581f42ca4310737f9e435e3851c3d1f15446205a85fbc272f1f97ed74f5be", size = 92955 }, +] + +[[package]] +name = "certifi" +version = "2024.8.30" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/b0/ee/9b19140fe824b367c04c5e1b369942dd754c4c5462d5674002f75c4dedc1/certifi-2024.8.30.tar.gz", hash = "sha256:bec941d2aa8195e248a60b31ff9f0558284cf01a52591ceda73ea9afffd69fd9", size = 168507 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/12/90/3c9ff0512038035f59d279fddeb79f5f1eccd8859f06d6163c58798b9487/certifi-2024.8.30-py3-none-any.whl", hash = "sha256:922820b53db7a7257ffbda3f597266d435245903d80737e34f8a45ff3e3230d8", size = 167321 }, +] + +[[package]] +name = "charset-normalizer" +version = "3.4.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/f2/4f/e1808dc01273379acc506d18f1504eb2d299bd4131743b9fc54d7be4df1e/charset_normalizer-3.4.0.tar.gz", hash = "sha256:223217c3d4f82c3ac5e29032b3f1c2eb0fb591b72161f86d93f5719079dae93e", size = 106620 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/69/8b/825cc84cf13a28bfbcba7c416ec22bf85a9584971be15b21dd8300c65b7f/charset_normalizer-3.4.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:4f9fc98dad6c2eaa32fc3af1417d95b5e3d08aff968df0cd320066def971f9a6", size = 196363 }, + { url = "https://files.pythonhosted.org/packages/23/81/d7eef6a99e42c77f444fdd7bc894b0ceca6c3a95c51239e74a722039521c/charset_normalizer-3.4.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0de7b687289d3c1b3e8660d0741874abe7888100efe14bd0f9fd7141bcbda92b", size = 125639 }, + { url = "https://files.pythonhosted.org/packages/21/67/b4564d81f48042f520c948abac7079356e94b30cb8ffb22e747532cf469d/charset_normalizer-3.4.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:5ed2e36c3e9b4f21dd9422f6893dec0abf2cca553af509b10cd630f878d3eb99", size = 120451 }, + { url = "https://files.pythonhosted.org/packages/c2/72/12a7f0943dd71fb5b4e7b55c41327ac0a1663046a868ee4d0d8e9c369b85/charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:40d3ff7fc90b98c637bda91c89d51264a3dcf210cade3a2c6f838c7268d7a4ca", size = 140041 }, + { url = "https://files.pythonhosted.org/packages/67/56/fa28c2c3e31217c4c52158537a2cf5d98a6c1e89d31faf476c89391cd16b/charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1110e22af8ca26b90bd6364fe4c763329b0ebf1ee213ba32b68c73de5752323d", size = 150333 }, + { url = "https://files.pythonhosted.org/packages/f9/d2/466a9be1f32d89eb1554cf84073a5ed9262047acee1ab39cbaefc19635d2/charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:86f4e8cca779080f66ff4f191a685ced73d2f72d50216f7112185dc02b90b9b7", size = 142921 }, + { url = "https://files.pythonhosted.org/packages/f8/01/344ec40cf5d85c1da3c1f57566c59e0c9b56bcc5566c08804a95a6cc8257/charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7f683ddc7eedd742e2889d2bfb96d69573fde1d92fcb811979cdb7165bb9c7d3", size = 144785 }, + { url = "https://files.pythonhosted.org/packages/73/8b/2102692cb6d7e9f03b9a33a710e0164cadfce312872e3efc7cfe22ed26b4/charset_normalizer-3.4.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:27623ba66c183eca01bf9ff833875b459cad267aeeb044477fedac35e19ba907", size = 146631 }, + { url = "https://files.pythonhosted.org/packages/d8/96/cc2c1b5d994119ce9f088a9a0c3ebd489d360a2eb058e2c8049f27092847/charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:f606a1881d2663630ea5b8ce2efe2111740df4b687bd78b34a8131baa007f79b", size = 140867 }, + { url = "https://files.pythonhosted.org/packages/c9/27/cde291783715b8ec30a61c810d0120411844bc4c23b50189b81188b273db/charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:0b309d1747110feb25d7ed6b01afdec269c647d382c857ef4663bbe6ad95a912", size = 149273 }, + { url = "https://files.pythonhosted.org/packages/3a/a4/8633b0fc1a2d1834d5393dafecce4a1cc56727bfd82b4dc18fc92f0d3cc3/charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:136815f06a3ae311fae551c3df1f998a1ebd01ddd424aa5603a4336997629e95", size = 152437 }, + { url = "https://files.pythonhosted.org/packages/64/ea/69af161062166b5975ccbb0961fd2384853190c70786f288684490913bf5/charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:14215b71a762336254351b00ec720a8e85cada43b987da5a042e4ce3e82bd68e", size = 150087 }, + { url = "https://files.pythonhosted.org/packages/3b/fd/e60a9d9fd967f4ad5a92810138192f825d77b4fa2a557990fd575a47695b/charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:79983512b108e4a164b9c8d34de3992f76d48cadc9554c9e60b43f308988aabe", size = 145142 }, + { url = "https://files.pythonhosted.org/packages/6d/02/8cb0988a1e49ac9ce2eed1e07b77ff118f2923e9ebd0ede41ba85f2dcb04/charset_normalizer-3.4.0-cp310-cp310-win32.whl", hash = "sha256:c94057af19bc953643a33581844649a7fdab902624d2eb739738a30e2b3e60fc", size = 94701 }, + { url = "https://files.pythonhosted.org/packages/d6/20/f1d4670a8a723c46be695dff449d86d6092916f9e99c53051954ee33a1bc/charset_normalizer-3.4.0-cp310-cp310-win_amd64.whl", hash = "sha256:55f56e2ebd4e3bc50442fbc0888c9d8c94e4e06a933804e2af3e89e2f9c1c749", size = 102191 }, + { url = "https://files.pythonhosted.org/packages/9c/61/73589dcc7a719582bf56aae309b6103d2762b526bffe189d635a7fcfd998/charset_normalizer-3.4.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:0d99dd8ff461990f12d6e42c7347fd9ab2532fb70e9621ba520f9e8637161d7c", size = 193339 }, + { url = "https://files.pythonhosted.org/packages/77/d5/8c982d58144de49f59571f940e329ad6e8615e1e82ef84584c5eeb5e1d72/charset_normalizer-3.4.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c57516e58fd17d03ebe67e181a4e4e2ccab1168f8c2976c6a334d4f819fe5944", size = 124366 }, + { url = "https://files.pythonhosted.org/packages/bf/19/411a64f01ee971bed3231111b69eb56f9331a769072de479eae7de52296d/charset_normalizer-3.4.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:6dba5d19c4dfab08e58d5b36304b3f92f3bd5d42c1a3fa37b5ba5cdf6dfcbcee", size = 118874 }, + { url = "https://files.pythonhosted.org/packages/4c/92/97509850f0d00e9f14a46bc751daabd0ad7765cff29cdfb66c68b6dad57f/charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bf4475b82be41b07cc5e5ff94810e6a01f276e37c2d55571e3fe175e467a1a1c", size = 138243 }, + { url = "https://files.pythonhosted.org/packages/e2/29/d227805bff72ed6d6cb1ce08eec707f7cfbd9868044893617eb331f16295/charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ce031db0408e487fd2775d745ce30a7cd2923667cf3b69d48d219f1d8f5ddeb6", size = 148676 }, + { url = "https://files.pythonhosted.org/packages/13/bc/87c2c9f2c144bedfa62f894c3007cd4530ba4b5351acb10dc786428a50f0/charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8ff4e7cdfdb1ab5698e675ca622e72d58a6fa2a8aa58195de0c0061288e6e3ea", size = 141289 }, + { url = "https://files.pythonhosted.org/packages/eb/5b/6f10bad0f6461fa272bfbbdf5d0023b5fb9bc6217c92bf068fa5a99820f5/charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3710a9751938947e6327ea9f3ea6332a09bf0ba0c09cae9cb1f250bd1f1549bc", size = 142585 }, + { url = "https://files.pythonhosted.org/packages/3b/a0/a68980ab8a1f45a36d9745d35049c1af57d27255eff8c907e3add84cf68f/charset_normalizer-3.4.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:82357d85de703176b5587dbe6ade8ff67f9f69a41c0733cf2425378b49954de5", size = 144408 }, + { url = "https://files.pythonhosted.org/packages/d7/a1/493919799446464ed0299c8eef3c3fad0daf1c3cd48bff9263c731b0d9e2/charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:47334db71978b23ebcf3c0f9f5ee98b8d65992b65c9c4f2d34c2eaf5bcaf0594", size = 139076 }, + { url = "https://files.pythonhosted.org/packages/fb/9d/9c13753a5a6e0db4a0a6edb1cef7aee39859177b64e1a1e748a6e3ba62c2/charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:8ce7fd6767a1cc5a92a639b391891bf1c268b03ec7e021c7d6d902285259685c", size = 146874 }, + { url = "https://files.pythonhosted.org/packages/75/d2/0ab54463d3410709c09266dfb416d032a08f97fd7d60e94b8c6ef54ae14b/charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:f1a2f519ae173b5b6a2c9d5fa3116ce16e48b3462c8b96dfdded11055e3d6365", size = 150871 }, + { url = "https://files.pythonhosted.org/packages/8d/c9/27e41d481557be53d51e60750b85aa40eaf52b841946b3cdeff363105737/charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:63bc5c4ae26e4bc6be6469943b8253c0fd4e4186c43ad46e713ea61a0ba49129", size = 148546 }, + { url = "https://files.pythonhosted.org/packages/ee/44/4f62042ca8cdc0cabf87c0fc00ae27cd8b53ab68be3605ba6d071f742ad3/charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:bcb4f8ea87d03bc51ad04add8ceaf9b0f085ac045ab4d74e73bbc2dc033f0236", size = 143048 }, + { url = "https://files.pythonhosted.org/packages/01/f8/38842422988b795220eb8038745d27a675ce066e2ada79516c118f291f07/charset_normalizer-3.4.0-cp311-cp311-win32.whl", hash = "sha256:9ae4ef0b3f6b41bad6366fb0ea4fc1d7ed051528e113a60fa2a65a9abb5b1d99", size = 94389 }, + { url = "https://files.pythonhosted.org/packages/0b/6e/b13bd47fa9023b3699e94abf565b5a2f0b0be6e9ddac9812182596ee62e4/charset_normalizer-3.4.0-cp311-cp311-win_amd64.whl", hash = "sha256:cee4373f4d3ad28f1ab6290684d8e2ebdb9e7a1b74fdc39e4c211995f77bec27", size = 101752 }, + { url = "https://files.pythonhosted.org/packages/d3/0b/4b7a70987abf9b8196845806198975b6aab4ce016632f817ad758a5aa056/charset_normalizer-3.4.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:0713f3adb9d03d49d365b70b84775d0a0d18e4ab08d12bc46baa6132ba78aaf6", size = 194445 }, + { url = "https://files.pythonhosted.org/packages/50/89/354cc56cf4dd2449715bc9a0f54f3aef3dc700d2d62d1fa5bbea53b13426/charset_normalizer-3.4.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:de7376c29d95d6719048c194a9cf1a1b0393fbe8488a22008610b0361d834ecf", size = 125275 }, + { url = "https://files.pythonhosted.org/packages/fa/44/b730e2a2580110ced837ac083d8ad222343c96bb6b66e9e4e706e4d0b6df/charset_normalizer-3.4.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:4a51b48f42d9358460b78725283f04bddaf44a9358197b889657deba38f329db", size = 119020 }, + { url = "https://files.pythonhosted.org/packages/9d/e4/9263b8240ed9472a2ae7ddc3e516e71ef46617fe40eaa51221ccd4ad9a27/charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b295729485b06c1a0683af02a9e42d2caa9db04a373dc38a6a58cdd1e8abddf1", size = 139128 }, + { url = "https://files.pythonhosted.org/packages/6b/e3/9f73e779315a54334240353eaea75854a9a690f3f580e4bd85d977cb2204/charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ee803480535c44e7f5ad00788526da7d85525cfefaf8acf8ab9a310000be4b03", size = 149277 }, + { url = "https://files.pythonhosted.org/packages/1a/cf/f1f50c2f295312edb8a548d3fa56a5c923b146cd3f24114d5adb7e7be558/charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3d59d125ffbd6d552765510e3f31ed75ebac2c7470c7274195b9161a32350284", size = 142174 }, + { url = "https://files.pythonhosted.org/packages/16/92/92a76dc2ff3a12e69ba94e7e05168d37d0345fa08c87e1fe24d0c2a42223/charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8cda06946eac330cbe6598f77bb54e690b4ca93f593dee1568ad22b04f347c15", size = 143838 }, + { url = "https://files.pythonhosted.org/packages/a4/01/2117ff2b1dfc61695daf2babe4a874bca328489afa85952440b59819e9d7/charset_normalizer-3.4.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:07afec21bbbbf8a5cc3651aa96b980afe2526e7f048fdfb7f1014d84acc8b6d8", size = 146149 }, + { url = "https://files.pythonhosted.org/packages/f6/9b/93a332b8d25b347f6839ca0a61b7f0287b0930216994e8bf67a75d050255/charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:6b40e8d38afe634559e398cc32b1472f376a4099c75fe6299ae607e404c033b2", size = 140043 }, + { url = "https://files.pythonhosted.org/packages/ab/f6/7ac4a01adcdecbc7a7587767c776d53d369b8b971382b91211489535acf0/charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:b8dcd239c743aa2f9c22ce674a145e0a25cb1566c495928440a181ca1ccf6719", size = 148229 }, + { url = "https://files.pythonhosted.org/packages/9d/be/5708ad18161dee7dc6a0f7e6cf3a88ea6279c3e8484844c0590e50e803ef/charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:84450ba661fb96e9fd67629b93d2941c871ca86fc38d835d19d4225ff946a631", size = 151556 }, + { url = "https://files.pythonhosted.org/packages/5a/bb/3d8bc22bacb9eb89785e83e6723f9888265f3a0de3b9ce724d66bd49884e/charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:44aeb140295a2f0659e113b31cfe92c9061622cadbc9e2a2f7b8ef6b1e29ef4b", size = 149772 }, + { url = "https://files.pythonhosted.org/packages/f7/fa/d3fc622de05a86f30beea5fc4e9ac46aead4731e73fd9055496732bcc0a4/charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:1db4e7fefefd0f548d73e2e2e041f9df5c59e178b4c72fbac4cc6f535cfb1565", size = 144800 }, + { url = "https://files.pythonhosted.org/packages/9a/65/bdb9bc496d7d190d725e96816e20e2ae3a6fa42a5cac99c3c3d6ff884118/charset_normalizer-3.4.0-cp312-cp312-win32.whl", hash = "sha256:5726cf76c982532c1863fb64d8c6dd0e4c90b6ece9feb06c9f202417a31f7dd7", size = 94836 }, + { url = "https://files.pythonhosted.org/packages/3e/67/7b72b69d25b89c0b3cea583ee372c43aa24df15f0e0f8d3982c57804984b/charset_normalizer-3.4.0-cp312-cp312-win_amd64.whl", hash = "sha256:b197e7094f232959f8f20541ead1d9862ac5ebea1d58e9849c1bf979255dfac9", size = 102187 }, + { url = "https://files.pythonhosted.org/packages/f3/89/68a4c86f1a0002810a27f12e9a7b22feb198c59b2f05231349fbce5c06f4/charset_normalizer-3.4.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:dd4eda173a9fcccb5f2e2bd2a9f423d180194b1bf17cf59e3269899235b2a114", size = 194617 }, + { url = "https://files.pythonhosted.org/packages/4f/cd/8947fe425e2ab0aa57aceb7807af13a0e4162cd21eee42ef5b053447edf5/charset_normalizer-3.4.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e9e3c4c9e1ed40ea53acf11e2a386383c3304212c965773704e4603d589343ed", size = 125310 }, + { url = "https://files.pythonhosted.org/packages/5b/f0/b5263e8668a4ee9becc2b451ed909e9c27058337fda5b8c49588183c267a/charset_normalizer-3.4.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:92a7e36b000bf022ef3dbb9c46bfe2d52c047d5e3f3343f43204263c5addc250", size = 119126 }, + { url = "https://files.pythonhosted.org/packages/ff/6e/e445afe4f7fda27a533f3234b627b3e515a1b9429bc981c9a5e2aa5d97b6/charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:54b6a92d009cbe2fb11054ba694bc9e284dad30a26757b1e372a1fdddaf21920", size = 139342 }, + { url = "https://files.pythonhosted.org/packages/a1/b2/4af9993b532d93270538ad4926c8e37dc29f2111c36f9c629840c57cd9b3/charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1ffd9493de4c922f2a38c2bf62b831dcec90ac673ed1ca182fe11b4d8e9f2a64", size = 149383 }, + { url = "https://files.pythonhosted.org/packages/fb/6f/4e78c3b97686b871db9be6f31d64e9264e889f8c9d7ab33c771f847f79b7/charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:35c404d74c2926d0287fbd63ed5d27eb911eb9e4a3bb2c6d294f3cfd4a9e0c23", size = 142214 }, + { url = "https://files.pythonhosted.org/packages/2b/c9/1c8fe3ce05d30c87eff498592c89015b19fade13df42850aafae09e94f35/charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4796efc4faf6b53a18e3d46343535caed491776a22af773f366534056c4e1fbc", size = 144104 }, + { url = "https://files.pythonhosted.org/packages/ee/68/efad5dcb306bf37db7db338338e7bb8ebd8cf38ee5bbd5ceaaaa46f257e6/charset_normalizer-3.4.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e7fdd52961feb4c96507aa649550ec2a0d527c086d284749b2f582f2d40a2e0d", size = 146255 }, + { url = "https://files.pythonhosted.org/packages/0c/75/1ed813c3ffd200b1f3e71121c95da3f79e6d2a96120163443b3ad1057505/charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:92db3c28b5b2a273346bebb24857fda45601aef6ae1c011c0a997106581e8a88", size = 140251 }, + { url = "https://files.pythonhosted.org/packages/7d/0d/6f32255c1979653b448d3c709583557a4d24ff97ac4f3a5be156b2e6a210/charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:ab973df98fc99ab39080bfb0eb3a925181454d7c3ac8a1e695fddfae696d9e90", size = 148474 }, + { url = "https://files.pythonhosted.org/packages/ac/a0/c1b5298de4670d997101fef95b97ac440e8c8d8b4efa5a4d1ef44af82f0d/charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:4b67fdab07fdd3c10bb21edab3cbfe8cf5696f453afce75d815d9d7223fbe88b", size = 151849 }, + { url = "https://files.pythonhosted.org/packages/04/4f/b3961ba0c664989ba63e30595a3ed0875d6790ff26671e2aae2fdc28a399/charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:aa41e526a5d4a9dfcfbab0716c7e8a1b215abd3f3df5a45cf18a12721d31cb5d", size = 149781 }, + { url = "https://files.pythonhosted.org/packages/d8/90/6af4cd042066a4adad58ae25648a12c09c879efa4849c705719ba1b23d8c/charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:ffc519621dce0c767e96b9c53f09c5d215578e10b02c285809f76509a3931482", size = 144970 }, + { url = "https://files.pythonhosted.org/packages/cc/67/e5e7e0cbfefc4ca79025238b43cdf8a2037854195b37d6417f3d0895c4c2/charset_normalizer-3.4.0-cp313-cp313-win32.whl", hash = "sha256:f19c1585933c82098c2a520f8ec1227f20e339e33aca8fa6f956f6691b784e67", size = 94973 }, + { url = "https://files.pythonhosted.org/packages/65/97/fc9bbc54ee13d33dc54a7fcf17b26368b18505500fc01e228c27b5222d80/charset_normalizer-3.4.0-cp313-cp313-win_amd64.whl", hash = "sha256:707b82d19e65c9bd28b81dde95249b07bf9f5b90ebe1ef17d9b57473f8a64b7b", size = 102308 }, + { url = "https://files.pythonhosted.org/packages/86/f4/ccab93e631e7293cca82f9f7ba39783c967f823a0000df2d8dd743cad74f/charset_normalizer-3.4.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:af73657b7a68211996527dbfeffbb0864e043d270580c5aef06dc4b659a4b578", size = 193961 }, + { url = "https://files.pythonhosted.org/packages/94/d4/2b21cb277bac9605026d2d91a4a8872bc82199ed11072d035dc674c27223/charset_normalizer-3.4.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:cab5d0b79d987c67f3b9e9c53f54a61360422a5a0bc075f43cab5621d530c3b6", size = 124507 }, + { url = "https://files.pythonhosted.org/packages/9a/e0/a7c1fcdff20d9c667342e0391cfeb33ab01468d7d276b2c7914b371667cc/charset_normalizer-3.4.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:9289fd5dddcf57bab41d044f1756550f9e7cf0c8e373b8cdf0ce8773dc4bd417", size = 119298 }, + { url = "https://files.pythonhosted.org/packages/70/de/1538bb2f84ac9940f7fa39945a5dd1d22b295a89c98240b262fc4b9fcfe0/charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6b493a043635eb376e50eedf7818f2f322eabbaa974e948bd8bdd29eb7ef2a51", size = 139328 }, + { url = "https://files.pythonhosted.org/packages/e9/ca/288bb1a6bc2b74fb3990bdc515012b47c4bc5925c8304fc915d03f94b027/charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9fa2566ca27d67c86569e8c85297aaf413ffab85a8960500f12ea34ff98e4c41", size = 149368 }, + { url = "https://files.pythonhosted.org/packages/aa/75/58374fdaaf8406f373e508dab3486a31091f760f99f832d3951ee93313e8/charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a8e538f46104c815be19c975572d74afb53f29650ea2025bbfaef359d2de2f7f", size = 141944 }, + { url = "https://files.pythonhosted.org/packages/32/c8/0bc558f7260db6ffca991ed7166494a7da4fda5983ee0b0bfc8ed2ac6ff9/charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6fd30dc99682dc2c603c2b315bded2799019cea829f8bf57dc6b61efde6611c8", size = 143326 }, + { url = "https://files.pythonhosted.org/packages/0e/dd/7f6fec09a1686446cee713f38cf7d5e0669e0bcc8288c8e2924e998cf87d/charset_normalizer-3.4.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2006769bd1640bdf4d5641c69a3d63b71b81445473cac5ded39740a226fa88ab", size = 146171 }, + { url = "https://files.pythonhosted.org/packages/4c/a8/440f1926d6d8740c34d3ca388fbd718191ec97d3d457a0677eb3aa718fce/charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:dc15e99b2d8a656f8e666854404f1ba54765871104e50c8e9813af8a7db07f12", size = 139711 }, + { url = "https://files.pythonhosted.org/packages/e9/7f/4b71e350a3377ddd70b980bea1e2cc0983faf45ba43032b24b2578c14314/charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:ab2e5bef076f5a235c3774b4f4028a680432cded7cad37bba0fd90d64b187d19", size = 148348 }, + { url = "https://files.pythonhosted.org/packages/1e/70/17b1b9202531a33ed7ef41885f0d2575ae42a1e330c67fddda5d99ad1208/charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:4ec9dd88a5b71abfc74e9df5ebe7921c35cbb3b641181a531ca65cdb5e8e4dea", size = 151290 }, + { url = "https://files.pythonhosted.org/packages/44/30/574b5b5933d77ecb015550aafe1c7d14a8cd41e7e6c4dcea5ae9e8d496c3/charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:43193c5cda5d612f247172016c4bb71251c784d7a4d9314677186a838ad34858", size = 149114 }, + { url = "https://files.pythonhosted.org/packages/0b/11/ca7786f7e13708687443082af20d8341c02e01024275a28bc75032c5ce5d/charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:aa693779a8b50cd97570e5a0f343538a8dbd3e496fa5dcb87e29406ad0299654", size = 143856 }, + { url = "https://files.pythonhosted.org/packages/f9/c2/1727c1438256c71ed32753b23ec2e6fe7b6dff66a598f6566cfe8139305e/charset_normalizer-3.4.0-cp38-cp38-win32.whl", hash = "sha256:7706f5850360ac01d80c89bcef1640683cc12ed87f42579dab6c5d3ed6888613", size = 94333 }, + { url = "https://files.pythonhosted.org/packages/09/c8/0e17270496a05839f8b500c1166e3261d1226e39b698a735805ec206967b/charset_normalizer-3.4.0-cp38-cp38-win_amd64.whl", hash = "sha256:c3e446d253bd88f6377260d07c895816ebf33ffffd56c1c792b13bff9c3e1ade", size = 101454 }, + { url = "https://files.pythonhosted.org/packages/54/2f/28659eee7f5d003e0f5a3b572765bf76d6e0fe6601ab1f1b1dd4cba7e4f1/charset_normalizer-3.4.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:980b4f289d1d90ca5efcf07958d3eb38ed9c0b7676bf2831a54d4f66f9c27dfa", size = 196326 }, + { url = "https://files.pythonhosted.org/packages/d1/18/92869d5c0057baa973a3ee2af71573be7b084b3c3d428fe6463ce71167f8/charset_normalizer-3.4.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:f28f891ccd15c514a0981f3b9db9aa23d62fe1a99997512b0491d2ed323d229a", size = 125614 }, + { url = "https://files.pythonhosted.org/packages/d6/27/327904c5a54a7796bb9f36810ec4173d2df5d88b401d2b95ef53111d214e/charset_normalizer-3.4.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a8aacce6e2e1edcb6ac625fb0f8c3a9570ccc7bfba1f63419b3769ccf6a00ed0", size = 120450 }, + { url = "https://files.pythonhosted.org/packages/a4/23/65af317914a0308495133b2d654cf67b11bbd6ca16637c4e8a38f80a5a69/charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bd7af3717683bea4c87acd8c0d3d5b44d56120b26fd3f8a692bdd2d5260c620a", size = 140135 }, + { url = "https://files.pythonhosted.org/packages/f2/41/6190102ad521a8aa888519bb014a74251ac4586cde9b38e790901684f9ab/charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5ff2ed8194587faf56555927b3aa10e6fb69d931e33953943bc4f837dfee2242", size = 150413 }, + { url = "https://files.pythonhosted.org/packages/7b/ab/f47b0159a69eab9bd915591106859f49670c75f9a19082505ff16f50efc0/charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e91f541a85298cf35433bf66f3fab2a4a2cff05c127eeca4af174f6d497f0d4b", size = 142992 }, + { url = "https://files.pythonhosted.org/packages/28/89/60f51ad71f63aaaa7e51a2a2ad37919985a341a1d267070f212cdf6c2d22/charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:309a7de0a0ff3040acaebb35ec45d18db4b28232f21998851cfa709eeff49d62", size = 144871 }, + { url = "https://files.pythonhosted.org/packages/0c/48/0050550275fea585a6e24460b42465020b53375017d8596c96be57bfabca/charset_normalizer-3.4.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:285e96d9d53422efc0d7a17c60e59f37fbf3dfa942073f666db4ac71e8d726d0", size = 146756 }, + { url = "https://files.pythonhosted.org/packages/dc/b5/47f8ee91455946f745e6c9ddbb0f8f50314d2416dd922b213e7d5551ad09/charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:5d447056e2ca60382d460a604b6302d8db69476fd2015c81e7c35417cfabe4cd", size = 141034 }, + { url = "https://files.pythonhosted.org/packages/84/79/5c731059ebab43e80bf61fa51666b9b18167974b82004f18c76378ed31a3/charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:20587d20f557fe189b7947d8e7ec5afa110ccf72a3128d61a2a387c3313f46be", size = 149434 }, + { url = "https://files.pythonhosted.org/packages/ca/f3/0719cd09fc4dc42066f239cb3c48ced17fc3316afca3e2a30a4756fe49ab/charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:130272c698667a982a5d0e626851ceff662565379baf0ff2cc58067b81d4f11d", size = 152443 }, + { url = "https://files.pythonhosted.org/packages/f7/0e/c6357297f1157c8e8227ff337e93fd0a90e498e3d6ab96b2782204ecae48/charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:ab22fbd9765e6954bc0bcff24c25ff71dcbfdb185fcdaca49e81bac68fe724d3", size = 150294 }, + { url = "https://files.pythonhosted.org/packages/54/9a/acfa96dc4ea8c928040b15822b59d0863d6e1757fba8bd7de3dc4f761c13/charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:7782afc9b6b42200f7362858f9e73b1f8316afb276d316336c0ec3bd73312742", size = 145314 }, + { url = "https://files.pythonhosted.org/packages/73/1c/b10a63032eaebb8d7bcb8544f12f063f41f5f463778ac61da15d9985e8b6/charset_normalizer-3.4.0-cp39-cp39-win32.whl", hash = "sha256:2de62e8801ddfff069cd5c504ce3bc9672b23266597d4e4f50eda28846c322f2", size = 94724 }, + { url = "https://files.pythonhosted.org/packages/c5/77/3a78bf28bfaa0863f9cfef278dbeadf55efe064eafff8c7c424ae3c4c1bf/charset_normalizer-3.4.0-cp39-cp39-win_amd64.whl", hash = "sha256:95c3c157765b031331dd4db3c775e58deaee050a3042fcad72cbc4189d7c8dca", size = 102159 }, + { url = "https://files.pythonhosted.org/packages/bf/9b/08c0432272d77b04803958a4598a51e2a4b51c06640af8b8f0f908c18bf2/charset_normalizer-3.4.0-py3-none-any.whl", hash = "sha256:fe9f97feb71aa9896b81973a7bbada8c49501dc73e58a10fcef6663af95e5079", size = 49446 }, +] + +[[package]] +name = "colorama" +version = "0.4.6" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335 }, +] + +[[package]] +name = "docutils" +version = "0.20.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/1f/53/a5da4f2c5739cf66290fac1431ee52aff6851c7c8ffd8264f13affd7bcdd/docutils-0.20.1.tar.gz", hash = "sha256:f08a4e276c3a1583a86dce3e34aba3fe04d02bba2dd51ed16106244e8a923e3b", size = 2058365 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/26/87/f238c0670b94533ac0353a4e2a1a771a0cc73277b88bff23d3ae35a256c1/docutils-0.20.1-py3-none-any.whl", hash = "sha256:96f387a2c5562db4476f09f13bbab2192e764cac08ebbf3a34a95d9b1e4a59d6", size = 572666 }, +] + +[[package]] +name = "idna" +version = "3.10" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz", hash = "sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9", size = 190490 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/76/c6/c88e154df9c4e1a2a66ccf0005a88dfb2650c1dffb6f5ce603dfbd452ce3/idna-3.10-py3-none-any.whl", hash = "sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3", size = 70442 }, +] + +[[package]] +name = "imagesize" +version = "1.4.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/a7/84/62473fb57d61e31fef6e36d64a179c8781605429fd927b5dd608c997be31/imagesize-1.4.1.tar.gz", hash = "sha256:69150444affb9cb0d5cc5a92b3676f0b2fb7cd9ae39e947a5e11a36b4497cd4a", size = 1280026 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ff/62/85c4c919272577931d407be5ba5d71c20f0b616d31a0befe0ae45bb79abd/imagesize-1.4.1-py2.py3-none-any.whl", hash = "sha256:0d8d18d08f840c19d0ee7ca1fd82490fdc3729b7ac93f49870406ddde8ef8d8b", size = 8769 }, +] + +[[package]] +name = "importlib-metadata" +version = "8.5.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "zipp", marker = "python_full_version < '3.10'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/cd/12/33e59336dca5be0c398a7482335911a33aa0e20776128f038019f1a95f1b/importlib_metadata-8.5.0.tar.gz", hash = "sha256:71522656f0abace1d072b9e5481a48f07c138e00f079c38c8f883823f9c26bd7", size = 55304 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a0/d9/a1e041c5e7caa9a05c925f4bdbdfb7f006d1f74996af53467bc394c97be7/importlib_metadata-8.5.0-py3-none-any.whl", hash = "sha256:45e54197d28b7a7f1559e60b95e7c567032b602131fbd588f1497f47880aa68b", size = 26514 }, +] + +[[package]] +name = "importlib-resources" +version = "6.4.5" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "zipp", marker = "python_full_version < '3.10'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/98/be/f3e8c6081b684f176b761e6a2fef02a0be939740ed6f54109a2951d806f3/importlib_resources-6.4.5.tar.gz", hash = "sha256:980862a1d16c9e147a59603677fa2aa5fd82b87f223b6cb870695bcfce830065", size = 43372 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e1/6a/4604f9ae2fa62ef47b9de2fa5ad599589d28c9fd1d335f32759813dfa91e/importlib_resources-6.4.5-py3-none-any.whl", hash = "sha256:ac29d5f956f01d5e4bb63102a5a19957f1b9175e45649977264a1416783bb717", size = 36115 }, +] + +[[package]] +name = "jinja2" +version = "3.1.4" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "markupsafe" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/ed/55/39036716d19cab0747a5020fc7e907f362fbf48c984b14e62127f7e68e5d/jinja2-3.1.4.tar.gz", hash = "sha256:4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369", size = 240245 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/31/80/3a54838c3fb461f6fec263ebf3a3a41771bd05190238de3486aae8540c36/jinja2-3.1.4-py3-none-any.whl", hash = "sha256:bc5dd2abb727a5319567b7a813e6a2e7318c39f4f487cfe6c89c6f9c7d25197d", size = 133271 }, +] + +[[package]] +name = "markupsafe" +version = "2.1.5" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/87/5b/aae44c6655f3801e81aa3eef09dbbf012431987ba564d7231722f68df02d/MarkupSafe-2.1.5.tar.gz", hash = "sha256:d283d37a890ba4c1ae73ffadf8046435c76e7bc2247bbb63c00bd1a709c6544b", size = 19384 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e4/54/ad5eb37bf9d51800010a74e4665425831a9db4e7c4e0fde4352e391e808e/MarkupSafe-2.1.5-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:a17a92de5231666cfbe003f0e4b9b3a7ae3afb1ec2845aadc2bacc93ff85febc", size = 18206 }, + { url = "https://files.pythonhosted.org/packages/6a/4a/a4d49415e600bacae038c67f9fecc1d5433b9d3c71a4de6f33537b89654c/MarkupSafe-2.1.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:72b6be590cc35924b02c78ef34b467da4ba07e4e0f0454a2c5907f473fc50ce5", size = 14079 }, + { url = "https://files.pythonhosted.org/packages/0a/7b/85681ae3c33c385b10ac0f8dd025c30af83c78cec1c37a6aa3b55e67f5ec/MarkupSafe-2.1.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e61659ba32cf2cf1481e575d0462554625196a1f2fc06a1c777d3f48e8865d46", size = 26620 }, + { url = "https://files.pythonhosted.org/packages/7c/52/2b1b570f6b8b803cef5ac28fdf78c0da318916c7d2fe9402a84d591b394c/MarkupSafe-2.1.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2174c595a0d73a3080ca3257b40096db99799265e1c27cc5a610743acd86d62f", size = 25818 }, + { url = "https://files.pythonhosted.org/packages/29/fe/a36ba8c7ca55621620b2d7c585313efd10729e63ef81e4e61f52330da781/MarkupSafe-2.1.5-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ae2ad8ae6ebee9d2d94b17fb62763125f3f374c25618198f40cbb8b525411900", size = 25493 }, + { url = "https://files.pythonhosted.org/packages/60/ae/9c60231cdfda003434e8bd27282b1f4e197ad5a710c14bee8bea8a9ca4f0/MarkupSafe-2.1.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:075202fa5b72c86ad32dc7d0b56024ebdbcf2048c0ba09f1cde31bfdd57bcfff", size = 30630 }, + { url = "https://files.pythonhosted.org/packages/65/dc/1510be4d179869f5dafe071aecb3f1f41b45d37c02329dfba01ff59e5ac5/MarkupSafe-2.1.5-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:598e3276b64aff0e7b3451b72e94fa3c238d452e7ddcd893c3ab324717456bad", size = 29745 }, + { url = "https://files.pythonhosted.org/packages/30/39/8d845dd7d0b0613d86e0ef89549bfb5f61ed781f59af45fc96496e897f3a/MarkupSafe-2.1.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:fce659a462a1be54d2ffcacea5e3ba2d74daa74f30f5f143fe0c58636e355fdd", size = 30021 }, + { url = "https://files.pythonhosted.org/packages/c7/5c/356a6f62e4f3c5fbf2602b4771376af22a3b16efa74eb8716fb4e328e01e/MarkupSafe-2.1.5-cp310-cp310-win32.whl", hash = "sha256:d9fad5155d72433c921b782e58892377c44bd6252b5af2f67f16b194987338a4", size = 16659 }, + { url = "https://files.pythonhosted.org/packages/69/48/acbf292615c65f0604a0c6fc402ce6d8c991276e16c80c46a8f758fbd30c/MarkupSafe-2.1.5-cp310-cp310-win_amd64.whl", hash = "sha256:bf50cd79a75d181c9181df03572cdce0fbb75cc353bc350712073108cba98de5", size = 17213 }, + { url = "https://files.pythonhosted.org/packages/11/e7/291e55127bb2ae67c64d66cef01432b5933859dfb7d6949daa721b89d0b3/MarkupSafe-2.1.5-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:629ddd2ca402ae6dbedfceeba9c46d5f7b2a61d9749597d4307f943ef198fc1f", size = 18219 }, + { url = "https://files.pythonhosted.org/packages/6b/cb/aed7a284c00dfa7c0682d14df85ad4955a350a21d2e3b06d8240497359bf/MarkupSafe-2.1.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:5b7b716f97b52c5a14bffdf688f971b2d5ef4029127f1ad7a513973cfd818df2", size = 14098 }, + { url = "https://files.pythonhosted.org/packages/1c/cf/35fe557e53709e93feb65575c93927942087e9b97213eabc3fe9d5b25a55/MarkupSafe-2.1.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6ec585f69cec0aa07d945b20805be741395e28ac1627333b1c5b0105962ffced", size = 29014 }, + { url = "https://files.pythonhosted.org/packages/97/18/c30da5e7a0e7f4603abfc6780574131221d9148f323752c2755d48abad30/MarkupSafe-2.1.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b91c037585eba9095565a3556f611e3cbfaa42ca1e865f7b8015fe5c7336d5a5", size = 28220 }, + { url = "https://files.pythonhosted.org/packages/0c/40/2e73e7d532d030b1e41180807a80d564eda53babaf04d65e15c1cf897e40/MarkupSafe-2.1.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7502934a33b54030eaf1194c21c692a534196063db72176b0c4028e140f8f32c", size = 27756 }, + { url = "https://files.pythonhosted.org/packages/18/46/5dca760547e8c59c5311b332f70605d24c99d1303dd9a6e1fc3ed0d73561/MarkupSafe-2.1.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:0e397ac966fdf721b2c528cf028494e86172b4feba51d65f81ffd65c63798f3f", size = 33988 }, + { url = "https://files.pythonhosted.org/packages/6d/c5/27febe918ac36397919cd4a67d5579cbbfa8da027fa1238af6285bb368ea/MarkupSafe-2.1.5-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:c061bb86a71b42465156a3ee7bd58c8c2ceacdbeb95d05a99893e08b8467359a", size = 32718 }, + { url = "https://files.pythonhosted.org/packages/f8/81/56e567126a2c2bc2684d6391332e357589a96a76cb9f8e5052d85cb0ead8/MarkupSafe-2.1.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:3a57fdd7ce31c7ff06cdfbf31dafa96cc533c21e443d57f5b1ecc6cdc668ec7f", size = 33317 }, + { url = "https://files.pythonhosted.org/packages/00/0b/23f4b2470accb53285c613a3ab9ec19dc944eaf53592cb6d9e2af8aa24cc/MarkupSafe-2.1.5-cp311-cp311-win32.whl", hash = "sha256:397081c1a0bfb5124355710fe79478cdbeb39626492b15d399526ae53422b906", size = 16670 }, + { url = "https://files.pythonhosted.org/packages/b7/a2/c78a06a9ec6d04b3445a949615c4c7ed86a0b2eb68e44e7541b9d57067cc/MarkupSafe-2.1.5-cp311-cp311-win_amd64.whl", hash = "sha256:2b7c57a4dfc4f16f7142221afe5ba4e093e09e728ca65c51f5620c9aaeb9a617", size = 17224 }, + { url = "https://files.pythonhosted.org/packages/53/bd/583bf3e4c8d6a321938c13f49d44024dbe5ed63e0a7ba127e454a66da974/MarkupSafe-2.1.5-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:8dec4936e9c3100156f8a2dc89c4b88d5c435175ff03413b443469c7c8c5f4d1", size = 18215 }, + { url = "https://files.pythonhosted.org/packages/48/d6/e7cd795fc710292c3af3a06d80868ce4b02bfbbf370b7cee11d282815a2a/MarkupSafe-2.1.5-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:3c6b973f22eb18a789b1460b4b91bf04ae3f0c4234a0a6aa6b0a92f6f7b951d4", size = 14069 }, + { url = "https://files.pythonhosted.org/packages/51/b5/5d8ec796e2a08fc814a2c7d2584b55f889a55cf17dd1a90f2beb70744e5c/MarkupSafe-2.1.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ac07bad82163452a6884fe8fa0963fb98c2346ba78d779ec06bd7a6262132aee", size = 29452 }, + { url = "https://files.pythonhosted.org/packages/0a/0d/2454f072fae3b5a137c119abf15465d1771319dfe9e4acbb31722a0fff91/MarkupSafe-2.1.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f5dfb42c4604dddc8e4305050aa6deb084540643ed5804d7455b5df8fe16f5e5", size = 28462 }, + { url = "https://files.pythonhosted.org/packages/2d/75/fd6cb2e68780f72d47e6671840ca517bda5ef663d30ada7616b0462ad1e3/MarkupSafe-2.1.5-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ea3d8a3d18833cf4304cd2fc9cbb1efe188ca9b5efef2bdac7adc20594a0e46b", size = 27869 }, + { url = "https://files.pythonhosted.org/packages/b0/81/147c477391c2750e8fc7705829f7351cf1cd3be64406edcf900dc633feb2/MarkupSafe-2.1.5-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:d050b3361367a06d752db6ead6e7edeb0009be66bc3bae0ee9d97fb326badc2a", size = 33906 }, + { url = "https://files.pythonhosted.org/packages/8b/ff/9a52b71839d7a256b563e85d11050e307121000dcebc97df120176b3ad93/MarkupSafe-2.1.5-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:bec0a414d016ac1a18862a519e54b2fd0fc8bbfd6890376898a6c0891dd82e9f", size = 32296 }, + { url = "https://files.pythonhosted.org/packages/88/07/2dc76aa51b481eb96a4c3198894f38b480490e834479611a4053fbf08623/MarkupSafe-2.1.5-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:58c98fee265677f63a4385256a6d7683ab1832f3ddd1e66fe948d5880c21a169", size = 33038 }, + { url = "https://files.pythonhosted.org/packages/96/0c/620c1fb3661858c0e37eb3cbffd8c6f732a67cd97296f725789679801b31/MarkupSafe-2.1.5-cp312-cp312-win32.whl", hash = "sha256:8590b4ae07a35970728874632fed7bd57b26b0102df2d2b233b6d9d82f6c62ad", size = 16572 }, + { url = "https://files.pythonhosted.org/packages/3f/14/c3554d512d5f9100a95e737502f4a2323a1959f6d0d01e0d0997b35f7b10/MarkupSafe-2.1.5-cp312-cp312-win_amd64.whl", hash = "sha256:823b65d8706e32ad2df51ed89496147a42a2a6e01c13cfb6ffb8b1e92bc910bb", size = 17127 }, + { url = "https://files.pythonhosted.org/packages/f8/ff/2c942a82c35a49df5de3a630ce0a8456ac2969691b230e530ac12314364c/MarkupSafe-2.1.5-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:656f7526c69fac7f600bd1f400991cc282b417d17539a1b228617081106feb4a", size = 18192 }, + { url = "https://files.pythonhosted.org/packages/4f/14/6f294b9c4f969d0c801a4615e221c1e084722ea6114ab2114189c5b8cbe0/MarkupSafe-2.1.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:97cafb1f3cbcd3fd2b6fbfb99ae11cdb14deea0736fc2b0952ee177f2b813a46", size = 14072 }, + { url = "https://files.pythonhosted.org/packages/81/d4/fd74714ed30a1dedd0b82427c02fa4deec64f173831ec716da11c51a50aa/MarkupSafe-2.1.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1f3fbcb7ef1f16e48246f704ab79d79da8a46891e2da03f8783a5b6fa41a9532", size = 26928 }, + { url = "https://files.pythonhosted.org/packages/c7/bd/50319665ce81bb10e90d1cf76f9e1aa269ea6f7fa30ab4521f14d122a3df/MarkupSafe-2.1.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fa9db3f79de01457b03d4f01b34cf91bc0048eb2c3846ff26f66687c2f6d16ab", size = 26106 }, + { url = "https://files.pythonhosted.org/packages/4c/6f/f2b0f675635b05f6afd5ea03c094557bdb8622fa8e673387444fe8d8e787/MarkupSafe-2.1.5-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ffee1f21e5ef0d712f9033568f8344d5da8cc2869dbd08d87c84656e6a2d2f68", size = 25781 }, + { url = "https://files.pythonhosted.org/packages/51/e0/393467cf899b34a9d3678e78961c2c8cdf49fb902a959ba54ece01273fb1/MarkupSafe-2.1.5-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:5dedb4db619ba5a2787a94d877bc8ffc0566f92a01c0ef214865e54ecc9ee5e0", size = 30518 }, + { url = "https://files.pythonhosted.org/packages/f6/02/5437e2ad33047290dafced9df741d9efc3e716b75583bbd73a9984f1b6f7/MarkupSafe-2.1.5-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:30b600cf0a7ac9234b2638fbc0fb6158ba5bdcdf46aeb631ead21248b9affbc4", size = 29669 }, + { url = "https://files.pythonhosted.org/packages/0e/7d/968284145ffd9d726183ed6237c77938c021abacde4e073020f920e060b2/MarkupSafe-2.1.5-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:8dd717634f5a044f860435c1d8c16a270ddf0ef8588d4887037c5028b859b0c3", size = 29933 }, + { url = "https://files.pythonhosted.org/packages/bf/f3/ecb00fc8ab02b7beae8699f34db9357ae49d9f21d4d3de6f305f34fa949e/MarkupSafe-2.1.5-cp38-cp38-win32.whl", hash = "sha256:daa4ee5a243f0f20d528d939d06670a298dd39b1ad5f8a72a4275124a7819eff", size = 16656 }, + { url = "https://files.pythonhosted.org/packages/92/21/357205f03514a49b293e214ac39de01fadd0970a6e05e4bf1ddd0ffd0881/MarkupSafe-2.1.5-cp38-cp38-win_amd64.whl", hash = "sha256:619bc166c4f2de5caa5a633b8b7326fbe98e0ccbfacabd87268a2b15ff73a029", size = 17206 }, + { url = "https://files.pythonhosted.org/packages/0f/31/780bb297db036ba7b7bbede5e1d7f1e14d704ad4beb3ce53fb495d22bc62/MarkupSafe-2.1.5-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:7a68b554d356a91cce1236aa7682dc01df0edba8d043fd1ce607c49dd3c1edcf", size = 18193 }, + { url = "https://files.pythonhosted.org/packages/6c/77/d77701bbef72892affe060cdacb7a2ed7fd68dae3b477a8642f15ad3b132/MarkupSafe-2.1.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:db0b55e0f3cc0be60c1f19efdde9a637c32740486004f20d1cff53c3c0ece4d2", size = 14073 }, + { url = "https://files.pythonhosted.org/packages/d9/a7/1e558b4f78454c8a3a0199292d96159eb4d091f983bc35ef258314fe7269/MarkupSafe-2.1.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3e53af139f8579a6d5f7b76549125f0d94d7e630761a2111bc431fd820e163b8", size = 26486 }, + { url = "https://files.pythonhosted.org/packages/5f/5a/360da85076688755ea0cceb92472923086993e86b5613bbae9fbc14136b0/MarkupSafe-2.1.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:17b950fccb810b3293638215058e432159d2b71005c74371d784862b7e4683f3", size = 25685 }, + { url = "https://files.pythonhosted.org/packages/6a/18/ae5a258e3401f9b8312f92b028c54d7026a97ec3ab20bfaddbdfa7d8cce8/MarkupSafe-2.1.5-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4c31f53cdae6ecfa91a77820e8b151dba54ab528ba65dfd235c80b086d68a465", size = 25338 }, + { url = "https://files.pythonhosted.org/packages/0b/cc/48206bd61c5b9d0129f4d75243b156929b04c94c09041321456fd06a876d/MarkupSafe-2.1.5-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:bff1b4290a66b490a2f4719358c0cdcd9bafb6b8f061e45c7a2460866bf50c2e", size = 30439 }, + { url = "https://files.pythonhosted.org/packages/d1/06/a41c112ab9ffdeeb5f77bc3e331fdadf97fa65e52e44ba31880f4e7f983c/MarkupSafe-2.1.5-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:bc1667f8b83f48511b94671e0e441401371dfd0f0a795c7daa4a3cd1dde55bea", size = 29531 }, + { url = "https://files.pythonhosted.org/packages/02/8c/ab9a463301a50dab04d5472e998acbd4080597abc048166ded5c7aa768c8/MarkupSafe-2.1.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5049256f536511ee3f7e1b3f87d1d1209d327e818e6ae1365e8653d7e3abb6a6", size = 29823 }, + { url = "https://files.pythonhosted.org/packages/bc/29/9bc18da763496b055d8e98ce476c8e718dcfd78157e17f555ce6dd7d0895/MarkupSafe-2.1.5-cp39-cp39-win32.whl", hash = "sha256:00e046b6dd71aa03a41079792f8473dc494d564611a8f89bbbd7cb93295ebdcf", size = 16658 }, + { url = "https://files.pythonhosted.org/packages/f6/f8/4da07de16f10551ca1f640c92b5f316f9394088b183c6a57183df6de5ae4/MarkupSafe-2.1.5-cp39-cp39-win_amd64.whl", hash = "sha256:fa173ec60341d6bb97a89f5ea19c85c5643c1e7dedebc22f5181eb73573142c5", size = 17211 }, +] + +[[package]] +name = "mnt-pyfiction" +version = "0.6.5" +source = { editable = "." } +dependencies = [ + { name = "z3-solver" }, +] + +[package.optional-dependencies] +docs = [ + { name = "breathe" }, + { name = "setuptools-scm" }, + { name = "sphinx", version = "8.1.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, + { name = "sphinx-rtd-theme" }, + { name = "sphinx-tabs" }, + { name = "z3-solver" }, +] + +[package.metadata] +requires-dist = [ + { name = "breathe", marker = "extra == 'docs'", specifier = "==4.35.0" }, + { name = "mnt-pyfiction", marker = "extra == 'docs'" }, + { name = "setuptools-scm", marker = "extra == 'docs'", specifier = ">=8.1" }, + { name = "sphinx", marker = "python_full_version >= '3.10' and extra == 'docs'", specifier = "==8.1.3" }, + { name = "sphinx-rtd-theme", marker = "extra == 'docs'", specifier = "==3.0.2" }, + { name = "sphinx-tabs", marker = "extra == 'docs'", specifier = "==3.4.7" }, + { name = "z3-solver", specifier = ">=4.8.0" }, + { name = "z3-solver", marker = "extra == 'docs'", specifier = ">=4.8.0" }, +] + +[[package]] +name = "packaging" +version = "24.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz", hash = "sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f", size = 163950 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/88/ef/eb23f262cca3c0c4eb7ab1933c3b1f03d021f2c48f54763065b6f0e321be/packaging-24.2-py3-none-any.whl", hash = "sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759", size = 65451 }, +] + +[[package]] +name = "pygments" +version = "2.18.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/8e/62/8336eff65bcbc8e4cb5d05b55faf041285951b6e80f33e2bff2024788f31/pygments-2.18.0.tar.gz", hash = "sha256:786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199", size = 4891905 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f7/3f/01c8b82017c199075f8f788d0d906b9ffbbc5a47dc9918a945e13d5a2bda/pygments-2.18.0-py3-none-any.whl", hash = "sha256:b8e6aca0523f3ab76fee51799c488e38782ac06eafcf95e7ba832985c8e7b13a", size = 1205513 }, +] + +[[package]] +name = "pytz" +version = "2024.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/3a/31/3c70bf7603cc2dca0f19bdc53b4537a797747a58875b552c8c413d963a3f/pytz-2024.2.tar.gz", hash = "sha256:2aa355083c50a0f93fa581709deac0c9ad65cca8a9e9beac660adcbd493c798a", size = 319692 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/11/c3/005fcca25ce078d2cc29fd559379817424e94885510568bc1bc53d7d5846/pytz-2024.2-py2.py3-none-any.whl", hash = "sha256:31c7c1817eb7fae7ca4b8c7ee50c72f93aa2dd863de768e1ef4245d426aa0725", size = 508002 }, +] + +[[package]] +name = "requests" +version = "2.32.3" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "certifi" }, + { name = "charset-normalizer" }, + { name = "idna" }, + { name = "urllib3" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz", hash = "sha256:55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760", size = 131218 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f9/9b/335f9764261e915ed497fcdeb11df5dfd6f7bf257d4a6a2a686d80da4d54/requests-2.32.3-py3-none-any.whl", hash = "sha256:70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6", size = 64928 }, +] + +[[package]] +name = "setuptools" +version = "75.3.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/ed/22/a438e0caa4576f8c383fa4d35f1cc01655a46c75be358960d815bfbb12bd/setuptools-75.3.0.tar.gz", hash = "sha256:fba5dd4d766e97be1b1681d98712680ae8f2f26d7881245f2ce9e40714f1a686", size = 1351577 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/90/12/282ee9bce8b58130cb762fbc9beabd531549952cac11fc56add11dcb7ea0/setuptools-75.3.0-py3-none-any.whl", hash = "sha256:f2504966861356aa38616760c0f66568e535562374995367b4e69c7143cf6bcd", size = 1251070 }, +] + +[[package]] +name = "setuptools-scm" +version = "8.1.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "packaging" }, + { name = "setuptools" }, + { name = "tomli", marker = "python_full_version < '3.11'" }, + { name = "typing-extensions", marker = "python_full_version < '3.10'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/4f/a4/00a9ac1b555294710d4a68d2ce8dfdf39d72aa4d769a7395d05218d88a42/setuptools_scm-8.1.0.tar.gz", hash = "sha256:42dea1b65771cba93b7a515d65a65d8246e560768a66b9106a592c8e7f26c8a7", size = 76465 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a0/b9/1906bfeb30f2fc13bb39bf7ddb8749784c05faadbd18a21cf141ba37bff2/setuptools_scm-8.1.0-py3-none-any.whl", hash = "sha256:897a3226a6fd4a6eb2f068745e49733261a21f70b1bb28fce0339feb978d9af3", size = 43666 }, +] + +[[package]] +name = "snowballstemmer" +version = "2.2.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/44/7b/af302bebf22c749c56c9c3e8ae13190b5b5db37a33d9068652e8f73b7089/snowballstemmer-2.2.0.tar.gz", hash = "sha256:09b16deb8547d3412ad7b590689584cd0fe25ec8db3be37788be3810cbf19cb1", size = 86699 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ed/dc/c02e01294f7265e63a7315fe086dd1df7dacb9f840a804da846b96d01b96/snowballstemmer-2.2.0-py2.py3-none-any.whl", hash = "sha256:c8e1716e83cc398ae16824e5572ae04e0d9fc2c6b985fb0f900f5f0c96ecba1a", size = 93002 }, +] + +[[package]] +name = "sphinx" +version = "7.1.2" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version < '3.10'", +] +dependencies = [ + { name = "alabaster", version = "0.7.13", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, + { name = "babel", marker = "python_full_version < '3.10'" }, + { name = "colorama", marker = "python_full_version < '3.10' and sys_platform == 'win32'" }, + { name = "docutils", marker = "python_full_version < '3.10'" }, + { name = "imagesize", marker = "python_full_version < '3.10'" }, + { name = "importlib-metadata", marker = "python_full_version < '3.10'" }, + { name = "jinja2", marker = "python_full_version < '3.10'" }, + { name = "packaging", marker = "python_full_version < '3.10'" }, + { name = "pygments", marker = "python_full_version < '3.10'" }, + { name = "requests", marker = "python_full_version < '3.10'" }, + { name = "snowballstemmer", marker = "python_full_version < '3.10'" }, + { name = "sphinxcontrib-applehelp", version = "1.0.4", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, + { name = "sphinxcontrib-devhelp", version = "1.0.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, + { name = "sphinxcontrib-htmlhelp", version = "2.0.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, + { name = "sphinxcontrib-jsmath", marker = "python_full_version < '3.10'" }, + { name = "sphinxcontrib-qthelp", version = "1.0.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, + { name = "sphinxcontrib-serializinghtml", version = "1.1.5", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/dc/01/688bdf9282241dca09fe6e3a1110eda399fa9b10d0672db609e37c2e7a39/sphinx-7.1.2.tar.gz", hash = "sha256:780f4d32f1d7d1126576e0e5ecc19dc32ab76cd24e950228dcf7b1f6d3d9e22f", size = 6828258 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/48/17/325cf6a257d84751a48ae90752b3d8fe0be8f9535b6253add61c49d0d9bc/sphinx-7.1.2-py3-none-any.whl", hash = "sha256:d170a81825b2fcacb6dfd5a0d7f578a053e45d3f2b153fecc948c37344eb4cbe", size = 3169543 }, +] + +[[package]] +name = "sphinx" +version = "8.1.3" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version >= '3.10'", +] +dependencies = [ + { name = "alabaster", version = "1.0.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, + { name = "babel", marker = "python_full_version >= '3.10'" }, + { name = "colorama", marker = "python_full_version >= '3.10' and sys_platform == 'win32'" }, + { name = "docutils", marker = "python_full_version >= '3.10'" }, + { name = "imagesize", marker = "python_full_version >= '3.10'" }, + { name = "jinja2", marker = "python_full_version >= '3.10'" }, + { name = "packaging", marker = "python_full_version >= '3.10'" }, + { name = "pygments", marker = "python_full_version >= '3.10'" }, + { name = "requests", marker = "python_full_version >= '3.10'" }, + { name = "snowballstemmer", marker = "python_full_version >= '3.10'" }, + { name = "sphinxcontrib-applehelp", version = "2.0.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, + { name = "sphinxcontrib-devhelp", version = "2.0.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, + { name = "sphinxcontrib-htmlhelp", version = "2.1.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, + { name = "sphinxcontrib-jsmath", marker = "python_full_version >= '3.10'" }, + { name = "sphinxcontrib-qthelp", version = "2.0.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, + { name = "sphinxcontrib-serializinghtml", version = "2.0.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, + { name = "tomli", marker = "python_full_version == '3.10.*'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/6f/6d/be0b61178fe2cdcb67e2a92fc9ebb488e3c51c4f74a36a7824c0adf23425/sphinx-8.1.3.tar.gz", hash = "sha256:43c1911eecb0d3e161ad78611bc905d1ad0e523e4ddc202a58a821773dc4c927", size = 8184611 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/26/60/1ddff83a56d33aaf6f10ec8ce84b4c007d9368b21008876fceda7e7381ef/sphinx-8.1.3-py3-none-any.whl", hash = "sha256:09719015511837b76bf6e03e42eb7595ac8c2e41eeb9c29c5b755c6b677992a2", size = 3487125 }, +] + +[[package]] +name = "sphinx-rtd-theme" +version = "3.0.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "docutils" }, + { name = "sphinx", version = "7.1.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, + { name = "sphinx", version = "8.1.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, + { name = "sphinxcontrib-jquery" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/91/44/c97faec644d29a5ceddd3020ae2edffa69e7d00054a8c7a6021e82f20335/sphinx_rtd_theme-3.0.2.tar.gz", hash = "sha256:b7457bc25dda723b20b086a670b9953c859eab60a2a03ee8eb2bb23e176e5f85", size = 7620463 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/85/77/46e3bac77b82b4df5bb5b61f2de98637724f246b4966cfc34bc5895d852a/sphinx_rtd_theme-3.0.2-py2.py3-none-any.whl", hash = "sha256:422ccc750c3a3a311de4ae327e82affdaf59eb695ba4936538552f3b00f4ee13", size = 7655561 }, +] + +[[package]] +name = "sphinx-tabs" +version = "3.4.7" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "docutils" }, + { name = "pygments" }, + { name = "sphinx", version = "7.1.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, + { name = "sphinx", version = "8.1.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/6a/53/a9a91995cb365e589f413b77fc75f1c0e9b4ac61bfa8da52a779ad855cc0/sphinx-tabs-3.4.7.tar.gz", hash = "sha256:991ad4a424ff54119799ba1491701aa8130dd43509474aef45a81c42d889784d", size = 15891 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/6b/c6/f47505b564b918a3ba60c1e99232d4942c4a7e44ecaae603e829e3d05dae/sphinx_tabs-3.4.7-py3-none-any.whl", hash = "sha256:c12d7a36fd413b369e9e9967a0a4015781b71a9c393575419834f19204bd1915", size = 9727 }, +] + +[[package]] +name = "sphinxcontrib-applehelp" +version = "1.0.4" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version < '3.10'", +] +sdist = { url = "https://files.pythonhosted.org/packages/32/df/45e827f4d7e7fcc84e853bcef1d836effd762d63ccb86f43ede4e98b478c/sphinxcontrib-applehelp-1.0.4.tar.gz", hash = "sha256:828f867945bbe39817c210a1abfd1bc4895c8b73fcaade56d45357a348a07d7e", size = 24766 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/06/c1/5e2cafbd03105ce50d8500f9b4e8a6e8d02e22d0475b574c3b3e9451a15f/sphinxcontrib_applehelp-1.0.4-py3-none-any.whl", hash = "sha256:29d341f67fb0f6f586b23ad80e072c8e6ad0b48417db2bde114a4c9746feb228", size = 120601 }, +] + +[[package]] +name = "sphinxcontrib-applehelp" +version = "2.0.0" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version >= '3.10'", +] +sdist = { url = "https://files.pythonhosted.org/packages/ba/6e/b837e84a1a704953c62ef8776d45c3e8d759876b4a84fe14eba2859106fe/sphinxcontrib_applehelp-2.0.0.tar.gz", hash = "sha256:2f29ef331735ce958efa4734873f084941970894c6090408b079c61b2e1c06d1", size = 20053 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/5d/85/9ebeae2f76e9e77b952f4b274c27238156eae7979c5421fba91a28f4970d/sphinxcontrib_applehelp-2.0.0-py3-none-any.whl", hash = "sha256:4cd3f0ec4ac5dd9c17ec65e9ab272c9b867ea77425228e68ecf08d6b28ddbdb5", size = 119300 }, +] + +[[package]] +name = "sphinxcontrib-devhelp" +version = "1.0.2" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version < '3.10'", +] +sdist = { url = "https://files.pythonhosted.org/packages/98/33/dc28393f16385f722c893cb55539c641c9aaec8d1bc1c15b69ce0ac2dbb3/sphinxcontrib-devhelp-1.0.2.tar.gz", hash = "sha256:ff7f1afa7b9642e7060379360a67e9c41e8f3121f2ce9164266f61b9f4b338e4", size = 17398 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c5/09/5de5ed43a521387f18bdf5f5af31d099605c992fd25372b2b9b825ce48ee/sphinxcontrib_devhelp-1.0.2-py2.py3-none-any.whl", hash = "sha256:8165223f9a335cc1af7ffe1ed31d2871f325254c0423bc0c4c7cd1c1e4734a2e", size = 84690 }, +] + +[[package]] +name = "sphinxcontrib-devhelp" +version = "2.0.0" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version >= '3.10'", +] +sdist = { url = "https://files.pythonhosted.org/packages/f6/d2/5beee64d3e4e747f316bae86b55943f51e82bb86ecd325883ef65741e7da/sphinxcontrib_devhelp-2.0.0.tar.gz", hash = "sha256:411f5d96d445d1d73bb5d52133377b4248ec79db5c793ce7dbe59e074b4dd1ad", size = 12967 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/35/7a/987e583882f985fe4d7323774889ec58049171828b58c2217e7f79cdf44e/sphinxcontrib_devhelp-2.0.0-py3-none-any.whl", hash = "sha256:aefb8b83854e4b0998877524d1029fd3e6879210422ee3780459e28a1f03a8a2", size = 82530 }, +] + +[[package]] +name = "sphinxcontrib-htmlhelp" +version = "2.0.1" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version < '3.10'", +] +sdist = { url = "https://files.pythonhosted.org/packages/b3/47/64cff68ea3aa450c373301e5bebfbb9fce0a3e70aca245fcadd4af06cd75/sphinxcontrib-htmlhelp-2.0.1.tar.gz", hash = "sha256:0cbdd302815330058422b98a113195c9249825d681e18f11e8b1f78a2f11efff", size = 27967 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/6e/ee/a1f5e39046cbb5f8bc8fba87d1ddf1c6643fbc9194e58d26e606de4b9074/sphinxcontrib_htmlhelp-2.0.1-py3-none-any.whl", hash = "sha256:c38cb46dccf316c79de6e5515e1770414b797162b23cd3d06e67020e1d2a6903", size = 99833 }, +] + +[[package]] +name = "sphinxcontrib-htmlhelp" +version = "2.1.0" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version >= '3.10'", +] +sdist = { url = "https://files.pythonhosted.org/packages/43/93/983afd9aa001e5201eab16b5a444ed5b9b0a7a010541e0ddfbbfd0b2470c/sphinxcontrib_htmlhelp-2.1.0.tar.gz", hash = "sha256:c9e2916ace8aad64cc13a0d233ee22317f2b9025b9cf3295249fa985cc7082e9", size = 22617 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/0a/7b/18a8c0bcec9182c05a0b3ec2a776bba4ead82750a55ff798e8d406dae604/sphinxcontrib_htmlhelp-2.1.0-py3-none-any.whl", hash = "sha256:166759820b47002d22914d64a075ce08f4c46818e17cfc9470a9786b759b19f8", size = 98705 }, +] + +[[package]] +name = "sphinxcontrib-jquery" +version = "4.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "sphinx", version = "7.1.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, + { name = "sphinx", version = "8.1.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/de/f3/aa67467e051df70a6330fe7770894b3e4f09436dea6881ae0b4f3d87cad8/sphinxcontrib-jquery-4.1.tar.gz", hash = "sha256:1620739f04e36a2c779f1a131a2dfd49b2fd07351bf1968ced074365933abc7a", size = 122331 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/76/85/749bd22d1a68db7291c89e2ebca53f4306c3f205853cf31e9de279034c3c/sphinxcontrib_jquery-4.1-py2.py3-none-any.whl", hash = "sha256:f936030d7d0147dd026a4f2b5a57343d233f1fc7b363f68b3d4f1cb0993878ae", size = 121104 }, +] + +[[package]] +name = "sphinxcontrib-jsmath" +version = "1.0.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/b2/e8/9ed3830aeed71f17c026a07a5097edcf44b692850ef215b161b8ad875729/sphinxcontrib-jsmath-1.0.1.tar.gz", hash = "sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8", size = 5787 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c2/42/4c8646762ee83602e3fb3fbe774c2fac12f317deb0b5dbeeedd2d3ba4b77/sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl", hash = "sha256:2ec2eaebfb78f3f2078e73666b1415417a116cc848b72e5172e596c871103178", size = 5071 }, +] + +[[package]] +name = "sphinxcontrib-qthelp" +version = "1.0.3" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version < '3.10'", +] +sdist = { url = "https://files.pythonhosted.org/packages/b1/8e/c4846e59f38a5f2b4a0e3b27af38f2fcf904d4bfd82095bf92de0b114ebd/sphinxcontrib-qthelp-1.0.3.tar.gz", hash = "sha256:4c33767ee058b70dba89a6fc5c1892c0d57a54be67ddd3e7875a18d14cba5a72", size = 21658 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/2b/14/05f9206cf4e9cfca1afb5fd224c7cd434dcc3a433d6d9e4e0264d29c6cdb/sphinxcontrib_qthelp-1.0.3-py2.py3-none-any.whl", hash = "sha256:bd9fc24bcb748a8d51fd4ecaade681350aa63009a347a8c14e637895444dfab6", size = 90609 }, +] + +[[package]] +name = "sphinxcontrib-qthelp" +version = "2.0.0" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version >= '3.10'", +] +sdist = { url = "https://files.pythonhosted.org/packages/68/bc/9104308fc285eb3e0b31b67688235db556cd5b0ef31d96f30e45f2e51cae/sphinxcontrib_qthelp-2.0.0.tar.gz", hash = "sha256:4fe7d0ac8fc171045be623aba3e2a8f613f8682731f9153bb2e40ece16b9bbab", size = 17165 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/27/83/859ecdd180cacc13b1f7e857abf8582a64552ea7a061057a6c716e790fce/sphinxcontrib_qthelp-2.0.0-py3-none-any.whl", hash = "sha256:b18a828cdba941ccd6ee8445dbe72ffa3ef8cbe7505d8cd1fa0d42d3f2d5f3eb", size = 88743 }, +] + +[[package]] +name = "sphinxcontrib-serializinghtml" +version = "1.1.5" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version < '3.10'", +] +sdist = { url = "https://files.pythonhosted.org/packages/b5/72/835d6fadb9e5d02304cf39b18f93d227cd93abd3c41ebf58e6853eeb1455/sphinxcontrib-serializinghtml-1.1.5.tar.gz", hash = "sha256:aa5f6de5dfdf809ef505c4895e51ef5c9eac17d0f287933eb49ec495280b6952", size = 21019 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c6/77/5464ec50dd0f1c1037e3c93249b040c8fc8078fdda97530eeb02424b6eea/sphinxcontrib_serializinghtml-1.1.5-py2.py3-none-any.whl", hash = "sha256:352a9a00ae864471d3a7ead8d7d79f5fc0b57e8b3f95e9867eb9eb28999b92fd", size = 94021 }, +] + +[[package]] +name = "sphinxcontrib-serializinghtml" +version = "2.0.0" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version >= '3.10'", +] +sdist = { url = "https://files.pythonhosted.org/packages/3b/44/6716b257b0aa6bfd51a1b31665d1c205fb12cb5ad56de752dfa15657de2f/sphinxcontrib_serializinghtml-2.0.0.tar.gz", hash = "sha256:e9d912827f872c029017a53f0ef2180b327c3f7fd23c87229f7a8e8b70031d4d", size = 16080 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/52/a7/d2782e4e3f77c8450f727ba74a8f12756d5ba823d81b941f1b04da9d033a/sphinxcontrib_serializinghtml-2.0.0-py3-none-any.whl", hash = "sha256:6e2cb0eef194e10c27ec0023bfeb25badbbb5868244cf5bc5bdc04e4464bf331", size = 92072 }, +] + +[[package]] +name = "tomli" +version = "2.1.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/1e/e4/1b6cbcc82d8832dd0ce34767d5c560df8a3547ad8cbc427f34601415930a/tomli-2.1.0.tar.gz", hash = "sha256:3f646cae2aec94e17d04973e4249548320197cfabdf130015d023de4b74d8ab8", size = 16622 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/de/f7/4da0ffe1892122c9ea096c57f64c2753ae5dd3ce85488802d11b0992cc6d/tomli-2.1.0-py3-none-any.whl", hash = "sha256:a5c57c3d1c56f5ccdf89f6523458f60ef716e210fc47c4cfb188c5ba473e0391", size = 13750 }, +] + +[[package]] +name = "typing-extensions" +version = "4.12.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/df/db/f35a00659bc03fec321ba8bce9420de607a1d37f8342eee1863174c69557/typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8", size = 85321 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/26/9f/ad63fc0248c5379346306f8668cda6e2e2e9c95e01216d2b8ffd9ff037d0/typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d", size = 37438 }, +] + +[[package]] +name = "urllib3" +version = "2.2.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/ed/63/22ba4ebfe7430b76388e7cd448d5478814d3032121827c12a2cc287e2260/urllib3-2.2.3.tar.gz", hash = "sha256:e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9", size = 300677 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ce/d9/5f4c13cecde62396b0d3fe530a50ccea91e7dfc1ccf0e09c228841bb5ba8/urllib3-2.2.3-py3-none-any.whl", hash = "sha256:ca899ca043dcb1bafa3e262d73aa25c465bfb49e0bd9dd5d59f1d0acba2f8fac", size = 126338 }, +] + +[[package]] +name = "z3-solver" +version = "4.13.3.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "importlib-resources", marker = "python_full_version < '3.9'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/12/43/66654a437cd16bc25802284bd0f7ee94a679993ec0d90df25d2cbb595239/z3_solver-4.13.3.0.tar.gz", hash = "sha256:4c27466455bac65d3c512f4bb4841ac79e05e121d3f98ddc99ac27ab4bc27e05", size = 4899797 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/5b/3e/fbefba102a95621b2eb9030acbb74338ab6078d2fef587ba3dc2a705bc4b/z3_solver-4.13.3.0-py3-none-macosx_13_0_arm64.whl", hash = "sha256:cae621cb47ebcf055f6a27285343d5c932f4c282b15c5d2840327e73e15a86a4", size = 35854175 }, + { url = "https://files.pythonhosted.org/packages/2f/c3/dde2e0ec7bd698bfa3d9b6d6eb5dcc4eb6434a5dc8430c2ac97eb413b1f4/z3_solver-4.13.3.0-py3-none-macosx_13_0_x86_64.whl", hash = "sha256:7900fbd1917164c938a20bea7845f7b95fcb431d0ade474d408f979196bccb8f", size = 38534677 }, + { url = "https://files.pythonhosted.org/packages/b6/f2/036f6501d3a2835cd4a17fd67364cd56337a5183e20b063d3d8a005f7288/z3_solver-4.13.3.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:794843e4946ade1561e40a75ffc1163b45d36b493fd6cc269ad1d6a65bddb8e5", size = 28124043 }, + { url = "https://files.pythonhosted.org/packages/1c/ff/51b34658ceca98978be0d0e5161bc239015188debc4e3895803a311608fd/z3_solver-4.13.3.0-py3-none-manylinux_2_34_aarch64.whl", hash = "sha256:ab5057cb1f4680406a232d2c1d968daaf69fae10685baa0887b85ca8e938a5cf", size = 26208542 }, + { url = "https://files.pythonhosted.org/packages/18/75/adfd645c3e3418052675b06717c4339f423ca7b51b7185fb0897f913acdc/z3_solver-4.13.3.0-py3-none-win32.whl", hash = "sha256:ba465489e9ab609f1cf0f232cbc102165b89a507347a6093c2ac3224cf161aa3", size = 12700057 }, + { url = "https://files.pythonhosted.org/packages/26/94/352fc6e18bd23056b57132bbe9d40facd5f70acebe23a6c49bfd89fa2bc0/z3_solver-4.13.3.0-py3-none-win_amd64.whl", hash = "sha256:d55e4793fa48230af766c7f6f7f033198b2d9df150d89ec65b07fd7b87998897", size = 15606445 }, +] + +[[package]] +name = "zipp" +version = "3.20.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/54/bf/5c0000c44ebc80123ecbdddba1f5dcd94a5ada602a9c225d84b5aaa55e86/zipp-3.20.2.tar.gz", hash = "sha256:bc9eb26f4506fda01b81bcde0ca78103b6e62f991b381fec825435c836edbc29", size = 24199 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/62/8b/5ba542fa83c90e09eac972fc9baca7a88e7e7ca4b221a89251954019308b/zipp-3.20.2-py3-none-any.whl", hash = "sha256:a817ac80d6cf4b23bf7f2828b7cabf326f15a001bea8b1f9b49631780ba28350", size = 9200 }, +]