Skip to content

Commit

Permalink
Merge branch 'issue_308' of https://github.com/nwchemex/pluginplay in…
Browse files Browse the repository at this point in the history
…to issue_308
  • Loading branch information
ryanmrichard committed Jun 12, 2024
2 parents 9ce7b66 + deb448e commit 402f377
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 11 deletions.
2 changes: 1 addition & 1 deletion include/pluginplay/module/facade_module.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/

#pragma once
#include "pluginplay/module/module_class.hpp"
#include "pluginplay/module/module_base.hpp"
#include "pluginplay/module/module_class.hpp"
#include "pluginplay/types.hpp"
#include <utilities/type_traits/tuple/is_tuple.hpp>

Expand Down
6 changes: 3 additions & 3 deletions include/pluginplay/module/lambda_module.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ class LambdaModule : public ModuleBase {
template<typename FxnType>
explicit LambdaModule(FxnType&& fxn);

LambdaModule(const LambdaModule&) = delete;
LambdaModule(LambdaModule&&) = delete;
LambdaModule(const LambdaModule&) = delete;
LambdaModule(LambdaModule&&) = delete;
LambdaModule& operator=(const LambdaModule&) = delete;
LambdaModule& operator=(LambdaModule&&) = delete;
LambdaModule& operator=(LambdaModule&&) = delete;

/** @brief Implements the `run_as` function for the `Module` class.
*
Expand Down
16 changes: 16 additions & 0 deletions include/pluginplay/module/macros.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright 2024 NWChemEx-Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#pragma once
#include <pluginplay/module/module_base.hpp>

Expand Down
2 changes: 1 addition & 1 deletion include/pluginplay/property_type/field_tuple.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/

#pragma once
#include <pluginplay/detail_/field_tuple_traits.hpp>
#include <functional>
#include <pluginplay/detail_/field_tuple_traits.hpp>
#include <stdexcept>

namespace pluginplay {
Expand Down
2 changes: 1 addition & 1 deletion include/pluginplay/submodule_request.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
*/

#pragma once
#include <memory>
#include <pluginplay/module/module_class.hpp>
#include <pluginplay/types.hpp>
#include <memory>
#include <string>

namespace pluginplay {
Expand Down
2 changes: 1 addition & 1 deletion src/pluginplay/module_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ ModuleManager::ModuleManager() :
pimpl_(std::make_unique<detail_::ModuleManagerPIMPL>()) {}
ModuleManager::ModuleManager(runtime_ptr runtime) :
pimpl_(std::make_unique<detail_::ModuleManagerPIMPL>(runtime)) {}
ModuleManager::ModuleManager(ModuleManager&& rhs) noexcept = default;
ModuleManager::ModuleManager(ModuleManager&& rhs) noexcept = default;
ModuleManager& ModuleManager::operator=(ModuleManager&& rhs) noexcept = default;
ModuleManager::~ModuleManager() noexcept = default;

Expand Down
1 change: 0 additions & 1 deletion src/python/export_pluginplay.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ using py_class_type = pybind11::class_<T...>;
// -- Declarations of exports for top-level classes
// -----------------------------------------------------------------------------


void export_module_manager(py_module_reference m);
void export_submodule_request(py_module_reference m);
void export_printing(py_module_reference m);
Expand Down
2 changes: 1 addition & 1 deletion tests/cxx/unit_tests/pluginplay/module/lambda_module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/

#include "../test_common.hpp"
#include <pluginplay/module/lambda_module.hpp>
#include <catch2/catch.hpp>
#include <pluginplay/module/lambda_module.hpp>

/* Testing strategy.
*
Expand Down
4 changes: 2 additions & 2 deletions tests/cxx/unit_tests/pluginplay/module/module_class.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ TEST_CASE("Module : ready") {
TEST_CASE("Module : reset_cache") {
auto mod_pimpl = make_module_pimpl_with_cache<RealDeal>();
auto mod = pluginplay::Module(
std::make_unique<pluginplay::detail_::ModulePIMPL>(mod_pimpl));
std::make_unique<pluginplay::detail_::ModulePIMPL>(mod_pimpl));

auto in = mod.inputs();
in.at("Option 1").change(1);
Expand All @@ -175,7 +175,7 @@ TEST_CASE("Module : reset_cache") {
TEST_CASE("Module : reset_internal_cache") {
auto mod_base_ptr = std::make_shared<testing::NullModule>();
auto mod = pluginplay::Module(
std::make_unique<pluginplay::detail_::ModulePIMPL>(mod_base_ptr));
std::make_unique<pluginplay::detail_::ModulePIMPL>(mod_base_ptr));

pluginplay::cache::ModuleManagerCache mm_cache;
auto cache = mm_cache.get_or_make_user_cache("foo");
Expand Down

0 comments on commit 402f377

Please sign in to comment.