LCOV - code coverage report
Current view: top level - bindings/database - Database.py.cpp (source / functions) Hit Total Coverage
Test: coverage.info Lines: 9 9 100.0 %
Date: 2025-09-03 06:42:31 Functions: 2 2 100.0 %

          Line data    Source code
       1             : // SPDX-FileCopyrightText: 2024 PairInteraction Developers
       2             : // SPDX-License-Identifier: LGPL-3.0-or-later
       3             : 
       4             : #include "./Database.py.hpp"
       5             : 
       6             : #include "pairinteraction/database/Database.hpp"
       7             : 
       8             : #include <nanobind/nanobind.h>
       9             : #include <nanobind/stl/filesystem.h>
      10             : 
      11             : namespace nb = nanobind;
      12             : using namespace nb::literals;
      13             : using namespace pairinteraction;
      14             : 
      15           2 : static void declare_database(nb::module_ &m) {
      16           2 :     nb::class_<Database>(m, "Database")
      17           4 :         .def(nb::init<>())
      18           2 :         .def(nb::init<bool>(), "download_missing"_a)
      19           2 :         .def(nb::init<std::filesystem::path>(), "database_dir"_a)
      20           2 :         .def(nb::init<bool, bool, std::filesystem::path>(), "download_missing"_a, "use_cache"_a,
      21           4 :              "database_dir"_a);
      22           2 : }
      23             : 
      24           2 : void bind_database(nb::module_ &m) { declare_database(m); }

Generated by: LCOV version 1.16