From ff13017aa43ac2c708f2c11ad4f01a0958041e3f Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Wed, 4 Nov 2020 14:36:26 -0700 Subject: [PATCH 001/154] Initial commit of hand-generated factory and base class files. --- libtk205/include/RS0001_factory.h | 13 ++++++++++ libtk205/include/RS0002_factory.h | 11 ++++++++ libtk205/include/RS0003_factory.h | 11 ++++++++ libtk205/include/RS0004_factory.h | 11 ++++++++ libtk205/include/RS0005_factory.h | 11 ++++++++ libtk205/include/RS0006_factory.h | 11 ++++++++ libtk205/include/RS_instance_base.h | 33 ++++++++++++++++++++++++ libtk205/include/RS_instance_factory.h | 27 +++++++++++++++++++ libtk205/include/grid_variables_base.h | 33 ++++++++++++++++++++++++ libtk205/include/lookup_variables_base.h | 29 +++++++++++++++++++++ libtk205/include/performance_map_base.h | 26 +++++++++++++++++++ libtk205/src/RS0001_factory.cpp | 13 ++++++++++ libtk205/src/RS0002_factory.cpp | 11 ++++++++ libtk205/src/RS0003_factory.cpp | 11 ++++++++ libtk205/src/RS0004_factory.cpp | 11 ++++++++ libtk205/src/RS0005_factory.cpp | 11 ++++++++ libtk205/src/RS0006_factory.cpp | 11 ++++++++ libtk205/src/RS_instance_factory.cpp | 29 +++++++++++++++++++++ 18 files changed, 313 insertions(+) create mode 100644 libtk205/include/RS0001_factory.h create mode 100644 libtk205/include/RS0002_factory.h create mode 100644 libtk205/include/RS0003_factory.h create mode 100644 libtk205/include/RS0004_factory.h create mode 100644 libtk205/include/RS0005_factory.h create mode 100644 libtk205/include/RS0006_factory.h create mode 100755 libtk205/include/RS_instance_base.h create mode 100755 libtk205/include/RS_instance_factory.h create mode 100644 libtk205/include/grid_variables_base.h create mode 100644 libtk205/include/lookup_variables_base.h create mode 100644 libtk205/include/performance_map_base.h create mode 100755 libtk205/src/RS0001_factory.cpp create mode 100755 libtk205/src/RS0002_factory.cpp create mode 100755 libtk205/src/RS0003_factory.cpp create mode 100755 libtk205/src/RS0004_factory.cpp create mode 100755 libtk205/src/RS0005_factory.cpp create mode 100755 libtk205/src/RS0006_factory.cpp create mode 100755 libtk205/src/RS_instance_factory.cpp diff --git a/libtk205/include/RS0001_factory.h b/libtk205/include/RS0001_factory.h new file mode 100644 index 0000000..34bd795 --- /dev/null +++ b/libtk205/include/RS0001_factory.h @@ -0,0 +1,13 @@ +#include "RS_instance_factory.h" + +class RS0001_factory : public RS_instance_factory +{ + public: + + std::unique_ptr Create() const override; + + private: + // Implementation of self-registering class + // a la https://www.bfilipek.com/2018/02/factory-selfregister.html + static bool s_registered; +}; diff --git a/libtk205/include/RS0002_factory.h b/libtk205/include/RS0002_factory.h new file mode 100644 index 0000000..e4ec29d --- /dev/null +++ b/libtk205/include/RS0002_factory.h @@ -0,0 +1,11 @@ +#include "RS_instance_factory.h" + +class RS0002_factory : public RS_instance_factory +{ + public: + + std::unique_ptr Create() const override; + + private: + static bool s_registered; +}; diff --git a/libtk205/include/RS0003_factory.h b/libtk205/include/RS0003_factory.h new file mode 100644 index 0000000..747df96 --- /dev/null +++ b/libtk205/include/RS0003_factory.h @@ -0,0 +1,11 @@ +#include "RS_instance_factory.h" + +class RS0003_factory : public RS_instance_factory +{ + public: + + std::unique_ptr Create() const override; + + private: + static bool s_registered; +}; diff --git a/libtk205/include/RS0004_factory.h b/libtk205/include/RS0004_factory.h new file mode 100644 index 0000000..a1cc147 --- /dev/null +++ b/libtk205/include/RS0004_factory.h @@ -0,0 +1,11 @@ +#include "RS_instance_factory.h" + +class RS0004_factory : public RS_instance_factory +{ + public: + + std::unique_ptr Create() const override; + + private: + static bool s_registered; +}; diff --git a/libtk205/include/RS0005_factory.h b/libtk205/include/RS0005_factory.h new file mode 100644 index 0000000..f66514e --- /dev/null +++ b/libtk205/include/RS0005_factory.h @@ -0,0 +1,11 @@ +#include "RS_instance_factory.h" + +class RS0005_factory : public RS_instance_factory +{ + public: + + std::unique_ptr Create() const override; + + private: + static bool s_registered; +}; diff --git a/libtk205/include/RS0006_factory.h b/libtk205/include/RS0006_factory.h new file mode 100644 index 0000000..4496add --- /dev/null +++ b/libtk205/include/RS0006_factory.h @@ -0,0 +1,11 @@ +#include "RS_instance_factory.h" + +class RS0006_factory : public RS_instance_factory +{ + public: + + std::unique_ptr Create() const override; + + private: + static bool s_registered; +}; diff --git a/libtk205/include/RS_instance_base.h b/libtk205/include/RS_instance_base.h new file mode 100755 index 0000000..831c141 --- /dev/null +++ b/libtk205/include/RS_instance_base.h @@ -0,0 +1,33 @@ +#ifndef RS_INSTANCE_BASE_H_ +#define RS_INSTANCE_BASE_H_ + +#include +#include + +/// @class RS_instance_base RS_instance_base.h +/// @brief This class isolates derived RS classes from their owner (ASHRAE205). It handles +/// no resources. + +namespace ASHRAE205_NS { + + inline void A205_json_catch(nlohmann::json::out_of_range & ex) + { + std::cout << ex.what() << std::endl; + } +} + +class RS_instance_base +{ +public: + + RS_instance_base() = default; + virtual ~RS_instance_base() = default; + RS_instance_base(const RS_instance_base& other) = delete; + RS_instance_base& operator=(const RS_instance_base& other) = delete; + RS_instance_base(RS_instance_base&&) = delete; + RS_instance_base& operator=(RS_instance_base&&) = delete; + + virtual void Initialize(const nlohmann::json& j) = 0; +}; + +#endif \ No newline at end of file diff --git a/libtk205/include/RS_instance_factory.h b/libtk205/include/RS_instance_factory.h new file mode 100755 index 0000000..6dfb012 --- /dev/null +++ b/libtk205/include/RS_instance_factory.h @@ -0,0 +1,27 @@ +#include +#include +#include "RS_instance_base.h" // definition req'd for unique_ptr + +/// @class RS_instance_factory RS_instance_factory.h +/// @brief This class is an abstract interface to support RS factory sub-classes + +class RS_instance_factory +{ +public: // Interface + + RS_instance_factory() = default; + virtual ~RS_instance_factory() = default; + + static bool Register_factory(std::string const &RS_ID, + std::shared_ptr factory); + + static std::unique_ptr Create(std::string const &RS_ID); + + virtual std::unique_ptr Create() const = 0; + + // Rule of five + RS_instance_factory(const RS_instance_factory& other) = delete; + RS_instance_factory& operator=(const RS_instance_factory& other) = delete; + RS_instance_factory(RS_instance_factory&&) = delete; + RS_instance_factory& operator=(RS_instance_factory&&) = delete; +}; \ No newline at end of file diff --git a/libtk205/include/grid_variables_base.h b/libtk205/include/grid_variables_base.h new file mode 100644 index 0000000..fd9989e --- /dev/null +++ b/libtk205/include/grid_variables_base.h @@ -0,0 +1,33 @@ +#ifndef GRID_VARIABLES_BASE_H_ +#define GRID_VARIABLES_BASE_H_ + +#include +#include +#include + +class performance_map_base; + +// ------------------------------------------------------------------------------------------------ +/// @class grid_variables_base grid_variables_base.h + +class grid_variables_base { + +public: + grid_variables_base() = default; + virtual ~grid_variables_base() = default; + grid_variables_base(const grid_variables_base& other) = default; + grid_variables_base& operator=(const grid_variables_base& other) = default; + + virtual void Populate_performance_map(const performance_map_base* performance_map) = 0; + + inline void Add_grid_axis(const performance_map_base* performance_map, std::vector& axis) + { + std::cout << "Adding grid axis with size " << axis.size() << "\n"; + } + inline void Add_grid_axis(const performance_map_base* performance_map, std::vector& axis) + { + std::cout << "Adding (int) grid axis with size " << axis.size() << "\n"; + } +}; + +#endif \ No newline at end of file diff --git a/libtk205/include/lookup_variables_base.h b/libtk205/include/lookup_variables_base.h new file mode 100644 index 0000000..06fb2aa --- /dev/null +++ b/libtk205/include/lookup_variables_base.h @@ -0,0 +1,29 @@ +#ifndef LOOKUP_VARIABLES_BASE_H_ +#define LOOKUP_VARIABLES_BASE_H_ + +#include +#include +#include + +class performance_map_base; + +// ------------------------------------------------------------------------------------------------ +/// @class lookup_variables_base lookup_variables_base.h + +class lookup_variables_base { + +public: + lookup_variables_base() = default; + virtual ~lookup_variables_base() = default; + lookup_variables_base(const lookup_variables_base& other) = default; + lookup_variables_base& operator=(const lookup_variables_base& other) = default; + + virtual void Populate_performance_map(const performance_map_base* performance_map) = 0; + + inline void Add_data_table(const performance_map_base* performance_map, std::vector& table) + { + std::cout << "Adding grid table with size " << table.size() << "\n"; + } +}; + +#endif \ No newline at end of file diff --git a/libtk205/include/performance_map_base.h b/libtk205/include/performance_map_base.h new file mode 100644 index 0000000..1b546c5 --- /dev/null +++ b/libtk205/include/performance_map_base.h @@ -0,0 +1,26 @@ +#ifndef PERFORMANCE_MAP_BASE_H_ +#define PERFORMANCE_MAP_BASE_H_ + +#include +#include +#include +#include + +// ------------------------------------------------------------------------------------------------ +/// @class performance_map_base performance_map_base.h + +class performance_map_base { + +public: + performance_map_base() = default; + virtual ~performance_map_base() = default; + performance_map_base(const performance_map_base& other) = default; + performance_map_base& operator=(const performance_map_base& other) = default; + + virtual void Initialize(const nlohmann::json& j) {} + + //private btwxt instance to collect grid and tables for a single performance map + //public Calculate_performance(target) +}; + +#endif \ No newline at end of file diff --git a/libtk205/src/RS0001_factory.cpp b/libtk205/src/RS0001_factory.cpp new file mode 100755 index 0000000..ba85c0e --- /dev/null +++ b/libtk205/src/RS0001_factory.cpp @@ -0,0 +1,13 @@ +#include "RS0001_factory.h" +#include "RS0001.h" +#include + +// A little trickery here: https://www.learncpp.com/cpp-tutorial/811-static-member-variables/ +// "static members exist even if no objects of the class have been instantiated" + +bool RS0001_factory::s_registered = RS_instance_factory::Register_factory("RS0001", std::make_shared()); + +std::unique_ptr RS0001_factory::Create() const +{ + return std::make_unique(); +} diff --git a/libtk205/src/RS0002_factory.cpp b/libtk205/src/RS0002_factory.cpp new file mode 100755 index 0000000..09f3121 --- /dev/null +++ b/libtk205/src/RS0002_factory.cpp @@ -0,0 +1,11 @@ +#include "RS0002_factory.h" +#include "RS0002.h" +#include +//#include + +bool RS0002_factory::s_registered = RS_instance_factory::Register_factory("RS0002", std::make_shared()); + +std::unique_ptr RS0002_factory::Create() const +{ + return std::make_unique(); +} diff --git a/libtk205/src/RS0003_factory.cpp b/libtk205/src/RS0003_factory.cpp new file mode 100755 index 0000000..c833b30 --- /dev/null +++ b/libtk205/src/RS0003_factory.cpp @@ -0,0 +1,11 @@ +#include "RS0003_factory.h" +#include "RS0003.h" +#include +//#include + +bool RS0003_factory::s_registered = RS_instance_factory::Register_factory("RS0003", std::make_shared()); + +std::unique_ptr RS0003_factory::Create() const +{ + return std::make_unique(); +} diff --git a/libtk205/src/RS0004_factory.cpp b/libtk205/src/RS0004_factory.cpp new file mode 100755 index 0000000..887c3c7 --- /dev/null +++ b/libtk205/src/RS0004_factory.cpp @@ -0,0 +1,11 @@ +#include "RS0004_factory.h" +#include "RS0004.h" +#include +//#include + +bool RS0004_factory::s_registered = RS_instance_factory::Register_factory("RS0004", std::make_shared()); + +std::unique_ptr RS0004_factory::Create() const +{ + return std::make_unique(); +} diff --git a/libtk205/src/RS0005_factory.cpp b/libtk205/src/RS0005_factory.cpp new file mode 100755 index 0000000..c154da4 --- /dev/null +++ b/libtk205/src/RS0005_factory.cpp @@ -0,0 +1,11 @@ +#include "RS0005_factory.h" +#include "RS0005.h" +#include +//#include + +bool RS0005_factory::s_registered = RS_instance_factory::Register_factory("RS0005", std::make_shared()); + +std::unique_ptr RS0005_factory::Create() const +{ + return std::make_unique(); +} diff --git a/libtk205/src/RS0006_factory.cpp b/libtk205/src/RS0006_factory.cpp new file mode 100755 index 0000000..ab63b01 --- /dev/null +++ b/libtk205/src/RS0006_factory.cpp @@ -0,0 +1,11 @@ +#include "RS0006_factory.h" +#include "RS0006.h" +#include +//#include + +bool RS0006_factory::s_registered = RS_instance_factory::Register_factory("RS0006", std::make_shared()); + +std::unique_ptr RS0006_factory::Create() const +{ + return std::make_unique(); +} diff --git a/libtk205/src/RS_instance_factory.cpp b/libtk205/src/RS_instance_factory.cpp new file mode 100755 index 0000000..4492893 --- /dev/null +++ b/libtk205/src/RS_instance_factory.cpp @@ -0,0 +1,29 @@ +#include "RS_instance_factory.h" +#include + +namespace +{ + using RS_factory_map = std::map >; + + RS_factory_map& Get_RS_factory_map() + { + static RS_factory_map factory_map; + return factory_map; + } +} + +//static +bool RS_instance_factory::Register_factory(std::string const& RS_ID, + std::shared_ptr factory) +{ + Get_RS_factory_map()[RS_ID] = factory; + return true; +} + +//static +std::unique_ptr RS_instance_factory::Create(std::string const& RS_ID) +{ + const auto factory = Get_RS_factory_map()[RS_ID]; + + return (factory == nullptr) ? nullptr : factory->Create(); +} \ No newline at end of file From 80715bb1449da026cdf480fc0d462cf44aea9736 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Tue, 10 Nov 2020 11:35:58 -0700 Subject: [PATCH 002/154] Commit first build of reorganized code with submodules. --- .gitmodules | 6 ++++ libtk205/CMakeLists.txt | 38 +++++++++++++++++++++++++ libtk205/include/performance_map_base.h | 1 + libtk205/vendor/btwxt | 1 + libtk205/vendor/json | 1 + 5 files changed, 47 insertions(+) create mode 100644 libtk205/CMakeLists.txt create mode 160000 libtk205/vendor/btwxt create mode 160000 libtk205/vendor/json diff --git a/.gitmodules b/.gitmodules index cba360a..438fbc8 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,9 @@ [submodule "schema-205"] path = schema-205 url = https://github.com/open205/schema-205 +[submodule "libtk205/vendor/json"] + path = libtk205/vendor/json + url = https://github.com/nlohmann/json.git +[submodule "libtk205/vendor/btwxt"] + path = libtk205/vendor/btwxt + url = https://github.com/bigladder/btwxt.git diff --git a/libtk205/CMakeLists.txt b/libtk205/CMakeLists.txt new file mode 100644 index 0000000..fa3d650 --- /dev/null +++ b/libtk205/CMakeLists.txt @@ -0,0 +1,38 @@ +cmake_minimum_required(VERSION 3.0.0) +set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +project(libtktest VERSION 0.1.0) + +include(CTest) +enable_testing() +set(JSON_BuildTests OFF CACHE INTERNAL "") + +include_directories(vendor/btwxt/src) +include_directories(vendor/json/single_include) +include_directories(vendor/json/include) +include_directories(src/build/cpp) +include_directories(include) + +list(APPEND Factory_SOURCES "./src/RS_instance_factory.cpp" + "./src/RS0001_factory.cpp" + "./src/RS0002_factory.cpp" + "./src/RS0003_factory.cpp" + "./src/RS0004_factory.cpp" + "./src/RS0005_factory.cpp" + "./src/RS0006_factory.cpp" +) +list(APPEND RS_SOURCES "./src/build/cpp/ASHRAE205.cpp" + "./src/build/cpp/RS0001.cpp" + "./src/build/cpp/RS0002.cpp" + "./src/build/cpp/RS0003.cpp" + "./src/build/cpp/RS0004.cpp" + "./src/build/cpp/RS0005.cpp" + "./src/build/cpp/RS0006.cpp" +) + +set (SOURCES ${Factory_SOURCES} ${RS_SOURCES}) +add_executable(libtk205 src/load.cpp ${SOURCES}) + +set(CPACK_PROJECT_NAME ${PROJECT_NAME}) +set(CPACK_PROJECT_VERSION ${PROJECT_VERSION}) +include(CPack) diff --git a/libtk205/include/performance_map_base.h b/libtk205/include/performance_map_base.h index 1b546c5..9500788 100644 --- a/libtk205/include/performance_map_base.h +++ b/libtk205/include/performance_map_base.h @@ -5,6 +5,7 @@ #include #include #include +#include // ------------------------------------------------------------------------------------------------ /// @class performance_map_base performance_map_base.h diff --git a/libtk205/vendor/btwxt b/libtk205/vendor/btwxt new file mode 160000 index 0000000..692bcce --- /dev/null +++ b/libtk205/vendor/btwxt @@ -0,0 +1 @@ +Subproject commit 692bcce95f501c52ff627353d8fb90c9e7fbd2ea diff --git a/libtk205/vendor/json b/libtk205/vendor/json new file mode 160000 index 0000000..fd7a9f6 --- /dev/null +++ b/libtk205/vendor/json @@ -0,0 +1 @@ +Subproject commit fd7a9f600712b2724463e9f7f703878ade676d6e From 6f98f436f110c22c5f9e31756f6ba724ee411954 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Tue, 17 Nov 2020 11:14:20 -0700 Subject: [PATCH 003/154] Add beginnings of performance calculation. --- libtk205/CMakeLists.txt | 8 ++- libtk205/include/grid_variables_base.h | 10 +-- libtk205/include/libtk205.h | 34 ++++++++++ libtk205/include/lookup_variables_base.h | 5 +- libtk205/include/performance_map_base.h | 15 ++++- libtk205/src/libtk205.cpp | 86 ++++++++++++++++++++++++ 6 files changed, 150 insertions(+), 8 deletions(-) create mode 100644 libtk205/include/libtk205.h create mode 100644 libtk205/src/libtk205.cpp diff --git a/libtk205/CMakeLists.txt b/libtk205/CMakeLists.txt index fa3d650..7a8771d 100644 --- a/libtk205/CMakeLists.txt +++ b/libtk205/CMakeLists.txt @@ -7,12 +7,15 @@ include(CTest) enable_testing() set(JSON_BuildTests OFF CACHE INTERNAL "") + include_directories(vendor/btwxt/src) include_directories(vendor/json/single_include) include_directories(vendor/json/include) include_directories(src/build/cpp) include_directories(include) +add_subdirectory(vendor/btwxt) + list(APPEND Factory_SOURCES "./src/RS_instance_factory.cpp" "./src/RS0001_factory.cpp" "./src/RS0002_factory.cpp" @@ -31,7 +34,10 @@ list(APPEND RS_SOURCES "./src/build/cpp/ASHRAE205.cpp" ) set (SOURCES ${Factory_SOURCES} ${RS_SOURCES}) -add_executable(libtk205 src/load.cpp ${SOURCES}) +add_library(libtk205 src/libtk205.cpp ${SOURCES}) +target_link_libraries(libtk205 btwxt) +add_executable(libtktest src/load.cpp) +target_link_libraries(libtktest libtk205) set(CPACK_PROJECT_NAME ${PROJECT_NAME}) set(CPACK_PROJECT_VERSION ${PROJECT_VERSION}) diff --git a/libtk205/include/grid_variables_base.h b/libtk205/include/grid_variables_base.h index fd9989e..46cc05f 100644 --- a/libtk205/include/grid_variables_base.h +++ b/libtk205/include/grid_variables_base.h @@ -5,7 +5,7 @@ #include #include -class performance_map_base; +#include // ------------------------------------------------------------------------------------------------ /// @class grid_variables_base grid_variables_base.h @@ -18,14 +18,16 @@ class grid_variables_base { grid_variables_base(const grid_variables_base& other) = default; grid_variables_base& operator=(const grid_variables_base& other) = default; - virtual void Populate_performance_map(const performance_map_base* performance_map) = 0; + virtual void Populate_performance_map(performance_map_base* performance_map) = 0; - inline void Add_grid_axis(const performance_map_base* performance_map, std::vector& axis) + inline void Add_grid_axis(performance_map_base* performance_map, std::vector& axis) { + performance_map->Add_grid_axis(axis); std::cout << "Adding grid axis with size " << axis.size() << "\n"; } - inline void Add_grid_axis(const performance_map_base* performance_map, std::vector& axis) + inline void Add_grid_axis(performance_map_base* performance_map, std::vector& axis) { + performance_map->Add_grid_axis(axis); std::cout << "Adding (int) grid axis with size " << axis.size() << "\n"; } }; diff --git a/libtk205/include/libtk205.h b/libtk205/include/libtk205.h new file mode 100644 index 0000000..d322705 --- /dev/null +++ b/libtk205/include/libtk205.h @@ -0,0 +1,34 @@ +#ifndef LIBTK205_H_ +#define LIBTK205_H_ + +#include +#include +#include "ASHRAE205.h" +#include "RS0001.h" +#include "RS0002.h" +#include "RS0003.h" +#include "RS0004.h" +#include "RS0005.h" +#include "RS0006.h" + +namespace libtk205_NS { + + class A205_SDK + { + public: + ASHRAE205_NS::ASHRAE205 Load_A205(const char* input_file); + std::shared_ptr Get_RS0001(const ASHRAE205_NS::ASHRAE205& a205); + std::shared_ptr Get_RS0002(const ASHRAE205_NS::ASHRAE205& a205); + std::shared_ptr Get_RS0003(const ASHRAE205_NS::ASHRAE205& a205); + std::shared_ptr Get_RS0004(const ASHRAE205_NS::ASHRAE205& a205); + std::shared_ptr Get_RS0005(const ASHRAE205_NS::ASHRAE205& a205); + std::shared_ptr Get_RS0006(const ASHRAE205_NS::ASHRAE205& a205); + + private: + void Read_binary_file(const char* filename, std::vector &bytes); + + std::vector _a205_instances; + }; +} + +#endif \ No newline at end of file diff --git a/libtk205/include/lookup_variables_base.h b/libtk205/include/lookup_variables_base.h index 06fb2aa..0d69b34 100644 --- a/libtk205/include/lookup_variables_base.h +++ b/libtk205/include/lookup_variables_base.h @@ -18,10 +18,11 @@ class lookup_variables_base { lookup_variables_base(const lookup_variables_base& other) = default; lookup_variables_base& operator=(const lookup_variables_base& other) = default; - virtual void Populate_performance_map(const performance_map_base* performance_map) = 0; + virtual void Populate_performance_map(performance_map_base* performance_map) = 0; - inline void Add_data_table(const performance_map_base* performance_map, std::vector& table) + inline void Add_data_table(performance_map_base* performance_map, std::vector& table) { + performance_map->Add_data_table(table); std::cout << "Adding grid table with size " << table.size() << "\n"; } }; diff --git a/libtk205/include/performance_map_base.h b/libtk205/include/performance_map_base.h index 9500788..03138b4 100644 --- a/libtk205/include/performance_map_base.h +++ b/libtk205/include/performance_map_base.h @@ -20,8 +20,21 @@ class performance_map_base { virtual void Initialize(const nlohmann::json& j) {} - //private btwxt instance to collect grid and tables for a single performance map + inline void Add_grid_axis(std::vector& axis) const { + } + + inline void Add_grid_axis(std::vector& axis) const { + } + + inline void Add_data_table(std::vector& table) { + _btwxt.add_value_table(table); + } + //public Calculate_performance(target) + +private: + Btwxt::RegularGridInterpolator _btwxt; + }; #endif \ No newline at end of file diff --git a/libtk205/src/libtk205.cpp b/libtk205/src/libtk205.cpp new file mode 100644 index 0000000..892d187 --- /dev/null +++ b/libtk205/src/libtk205.cpp @@ -0,0 +1,86 @@ +#include "libtk205.h" +#include "nlohmann/json.hpp" +#include + +namespace libtk205_NS { + + using json = nlohmann::json; + using namespace ASHRAE205_NS; + + ASHRAE205 A205_SDK::Load_A205(const char* input_file) + { + std::string filename(input_file); + std::string::size_type idx = filename.rfind('.'); + ASHRAE205 a205; + + if(idx != std::string::npos) + { + std::string extension = filename.substr(idx+1); + json j; + + if (extension == "cbor") + { + std::vector bytearray; + Read_binary_file(input_file, bytearray); + j = json::from_cbor(bytearray); + } + else if (extension == "json") + { + std::string schema(input_file); + std::ifstream in(schema); + in >> j; + } + + a205.Initialize(j); + } + return a205; + } + + std::shared_ptr A205_SDK::Get_RS0001(const ASHRAE205& a205) + { + return std::dynamic_pointer_cast(a205.RS_instance); + } + + std::shared_ptr A205_SDK::Get_RS0002(const ASHRAE205& a205) + { + return std::dynamic_pointer_cast(a205.RS_instance); + } + + std::shared_ptr A205_SDK::Get_RS0003(const ASHRAE205& a205) + { + return std::dynamic_pointer_cast(a205.RS_instance); + } + + std::shared_ptr A205_SDK::Get_RS0004(const ASHRAE205& a205) + { + return std::dynamic_pointer_cast(a205.RS_instance); + } + + std::shared_ptr A205_SDK::Get_RS0005(const ASHRAE205& a205) + { + return std::dynamic_pointer_cast(a205.RS_instance); + } + + std::shared_ptr A205_SDK::Get_RS0006(const ASHRAE205& a205) + { + return std::dynamic_pointer_cast(a205.RS_instance); + } + + void A205_SDK::Read_binary_file(const char* filename, std::vector &bytes) + { + std::ifstream is (filename, std::ifstream::binary); + if (is) + { + // get length of file: + is.seekg(0, is.end); + int length = is.tellg(); + is.seekg(0, is.beg); + + bytes.resize(length); + // read data as a block: + is.read(reinterpret_cast(bytes.data()), length); + + is.close(); + } + } +} \ No newline at end of file From 63fb771259b506d2cd28de90ab55a13f59c637ed Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Sun, 29 Nov 2020 20:35:03 -0700 Subject: [PATCH 004/154] Library with basic functionality. --- libtk205/CMakeLists.txt | 2 ++ libtk205/include/RS0001_factory.h | 7 +++- libtk205/include/RS0002_factory.h | 7 +++- libtk205/include/RS0003_factory.h | 7 +++- libtk205/include/RS0004_factory.h | 7 +++- libtk205/include/RS0005_factory.h | 7 +++- libtk205/include/RS0006_factory.h | 7 +++- libtk205/include/RS_instance_base.h | 8 ++--- libtk205/include/RS_instance_factory.h | 11 ++++-- libtk205/include/libtk205.h | 14 ++++---- libtk205/include/performance_map_base.h | 2 +- libtk205/src/RS0001_factory.cpp | 2 +- libtk205/src/RS0002_factory.cpp | 2 +- libtk205/src/RS0003_factory.cpp | 2 +- libtk205/src/RS0004_factory.cpp | 2 +- libtk205/src/RS0005_factory.cpp | 2 +- libtk205/src/RS0006_factory.cpp | 2 +- libtk205/src/RS_instance_factory.cpp | 3 +- libtk205/src/libtk205.cpp | 47 +++++++++++++++++-------- 19 files changed, 99 insertions(+), 42 deletions(-) diff --git a/libtk205/CMakeLists.txt b/libtk205/CMakeLists.txt index 7a8771d..12251d1 100644 --- a/libtk205/CMakeLists.txt +++ b/libtk205/CMakeLists.txt @@ -34,6 +34,8 @@ list(APPEND RS_SOURCES "./src/build/cpp/ASHRAE205.cpp" ) set (SOURCES ${Factory_SOURCES} ${RS_SOURCES}) +# add_executable(libtktest src/load.cpp ${SOURCES}) +# target_link_libraries(libtktest btwxt) add_library(libtk205 src/libtk205.cpp ${SOURCES}) target_link_libraries(libtk205 btwxt) add_executable(libtktest src/load.cpp) diff --git a/libtk205/include/RS0001_factory.h b/libtk205/include/RS0001_factory.h index 34bd795..df4af38 100644 --- a/libtk205/include/RS0001_factory.h +++ b/libtk205/include/RS0001_factory.h @@ -1,13 +1,18 @@ +#ifndef RS0001_FACTORY_H_ +#define RS0001_FACTORY_H_ + #include "RS_instance_factory.h" class RS0001_factory : public RS_instance_factory { public: - std::unique_ptr Create() const override; + std::unique_ptr Create_instance() const override; private: // Implementation of self-registering class // a la https://www.bfilipek.com/2018/02/factory-selfregister.html static bool s_registered; }; + +#endif \ No newline at end of file diff --git a/libtk205/include/RS0002_factory.h b/libtk205/include/RS0002_factory.h index e4ec29d..21180ea 100644 --- a/libtk205/include/RS0002_factory.h +++ b/libtk205/include/RS0002_factory.h @@ -1,11 +1,16 @@ +#ifndef RS0002_FACTORY_H_ +#define RS0002_FACTORY_H_ + #include "RS_instance_factory.h" class RS0002_factory : public RS_instance_factory { public: - std::unique_ptr Create() const override; + std::unique_ptr Create_instance() const override; private: static bool s_registered; }; + +#endif \ No newline at end of file diff --git a/libtk205/include/RS0003_factory.h b/libtk205/include/RS0003_factory.h index 747df96..fb39028 100644 --- a/libtk205/include/RS0003_factory.h +++ b/libtk205/include/RS0003_factory.h @@ -1,11 +1,16 @@ +#ifndef RS0003_FACTORY_H_ +#define RS0003_FACTORY_H_ + #include "RS_instance_factory.h" class RS0003_factory : public RS_instance_factory { public: - std::unique_ptr Create() const override; + std::unique_ptr Create_instance() const override; private: static bool s_registered; }; + +#endif \ No newline at end of file diff --git a/libtk205/include/RS0004_factory.h b/libtk205/include/RS0004_factory.h index a1cc147..fe3b960 100644 --- a/libtk205/include/RS0004_factory.h +++ b/libtk205/include/RS0004_factory.h @@ -1,11 +1,16 @@ +#ifndef RS0004_FACTORY_H_ +#define RS0004_FACTORY_H_ + #include "RS_instance_factory.h" class RS0004_factory : public RS_instance_factory { public: - std::unique_ptr Create() const override; + std::unique_ptr Create_instance() const override; private: static bool s_registered; }; + +#endif \ No newline at end of file diff --git a/libtk205/include/RS0005_factory.h b/libtk205/include/RS0005_factory.h index f66514e..50c890d 100644 --- a/libtk205/include/RS0005_factory.h +++ b/libtk205/include/RS0005_factory.h @@ -1,11 +1,16 @@ +#ifndef RS0005_FACTORY_H_ +#define RS0005_FACTORY_H_ + #include "RS_instance_factory.h" class RS0005_factory : public RS_instance_factory { public: - std::unique_ptr Create() const override; + std::unique_ptr Create_instance() const override; private: static bool s_registered; }; + +#endif \ No newline at end of file diff --git a/libtk205/include/RS0006_factory.h b/libtk205/include/RS0006_factory.h index 4496add..ec7243e 100644 --- a/libtk205/include/RS0006_factory.h +++ b/libtk205/include/RS0006_factory.h @@ -1,11 +1,16 @@ +#ifndef RS0006_FACTORY_H_ +#define RS0006_FACTORY_H_ + #include "RS_instance_factory.h" class RS0006_factory : public RS_instance_factory { public: - std::unique_ptr Create() const override; + std::unique_ptr Create_instance() const override; private: static bool s_registered; }; + +#endif \ No newline at end of file diff --git a/libtk205/include/RS_instance_base.h b/libtk205/include/RS_instance_base.h index 831c141..6ecdbf8 100755 --- a/libtk205/include/RS_instance_base.h +++ b/libtk205/include/RS_instance_base.h @@ -22,10 +22,10 @@ class RS_instance_base RS_instance_base() = default; virtual ~RS_instance_base() = default; - RS_instance_base(const RS_instance_base& other) = delete; - RS_instance_base& operator=(const RS_instance_base& other) = delete; - RS_instance_base(RS_instance_base&&) = delete; - RS_instance_base& operator=(RS_instance_base&&) = delete; + RS_instance_base(const RS_instance_base& other) = default; + RS_instance_base& operator=(const RS_instance_base& other) = default; + RS_instance_base(RS_instance_base&&) = default; + RS_instance_base& operator=(RS_instance_base&&) = default; virtual void Initialize(const nlohmann::json& j) = 0; }; diff --git a/libtk205/include/RS_instance_factory.h b/libtk205/include/RS_instance_factory.h index 6dfb012..653d72d 100755 --- a/libtk205/include/RS_instance_factory.h +++ b/libtk205/include/RS_instance_factory.h @@ -1,3 +1,6 @@ +#ifndef RS_INSTANCE_FACTORY_H_ +#define RS_INSTANCE_FACTORY_H_ + #include #include #include "RS_instance_base.h" // definition req'd for unique_ptr @@ -15,13 +18,17 @@ class RS_instance_factory static bool Register_factory(std::string const &RS_ID, std::shared_ptr factory); + // Universal factory interface Create() static std::unique_ptr Create(std::string const &RS_ID); - virtual std::unique_ptr Create() const = 0; + // Derived factories override Create_instance() for actual resource creation + virtual std::unique_ptr Create_instance() const = 0; // Rule of five RS_instance_factory(const RS_instance_factory& other) = delete; RS_instance_factory& operator=(const RS_instance_factory& other) = delete; RS_instance_factory(RS_instance_factory&&) = delete; RS_instance_factory& operator=(RS_instance_factory&&) = delete; -}; \ No newline at end of file +}; + +#endif \ No newline at end of file diff --git a/libtk205/include/libtk205.h b/libtk205/include/libtk205.h index d322705..43f5607 100644 --- a/libtk205/include/libtk205.h +++ b/libtk205/include/libtk205.h @@ -16,13 +16,15 @@ namespace libtk205_NS { class A205_SDK { public: + A205_SDK(); + ASHRAE205_NS::ASHRAE205 Load_A205(const char* input_file); - std::shared_ptr Get_RS0001(const ASHRAE205_NS::ASHRAE205& a205); - std::shared_ptr Get_RS0002(const ASHRAE205_NS::ASHRAE205& a205); - std::shared_ptr Get_RS0003(const ASHRAE205_NS::ASHRAE205& a205); - std::shared_ptr Get_RS0004(const ASHRAE205_NS::ASHRAE205& a205); - std::shared_ptr Get_RS0005(const ASHRAE205_NS::ASHRAE205& a205); - std::shared_ptr Get_RS0006(const ASHRAE205_NS::ASHRAE205& a205); + const ASHRAE205_NS::RS0001_NS::RS0001* Get_RS0001(const ASHRAE205_NS::ASHRAE205& a205); + const ASHRAE205_NS::RS0002_NS::RS0002* Get_RS0002(const ASHRAE205_NS::ASHRAE205& a205); + const ASHRAE205_NS::RS0003_NS::RS0003* Get_RS0003(const ASHRAE205_NS::ASHRAE205& a205); + const ASHRAE205_NS::RS0004_NS::RS0004* Get_RS0004(const ASHRAE205_NS::ASHRAE205& a205); + const ASHRAE205_NS::RS0005_NS::RS0005* Get_RS0005(const ASHRAE205_NS::ASHRAE205& a205); + const ASHRAE205_NS::RS0006_NS::RS0006* Get_RS0006(const ASHRAE205_NS::ASHRAE205& a205); private: void Read_binary_file(const char* filename, std::vector &bytes); diff --git a/libtk205/include/performance_map_base.h b/libtk205/include/performance_map_base.h index 03138b4..0024e05 100644 --- a/libtk205/include/performance_map_base.h +++ b/libtk205/include/performance_map_base.h @@ -27,7 +27,7 @@ class performance_map_base { } inline void Add_data_table(std::vector& table) { - _btwxt.add_value_table(table); + //_btwxt.add_value_table(table); } //public Calculate_performance(target) diff --git a/libtk205/src/RS0001_factory.cpp b/libtk205/src/RS0001_factory.cpp index ba85c0e..0de3555 100755 --- a/libtk205/src/RS0001_factory.cpp +++ b/libtk205/src/RS0001_factory.cpp @@ -7,7 +7,7 @@ bool RS0001_factory::s_registered = RS_instance_factory::Register_factory("RS0001", std::make_shared()); -std::unique_ptr RS0001_factory::Create() const +std::unique_ptr RS0001_factory::Create_instance() const { return std::make_unique(); } diff --git a/libtk205/src/RS0002_factory.cpp b/libtk205/src/RS0002_factory.cpp index 09f3121..bfd3b45 100755 --- a/libtk205/src/RS0002_factory.cpp +++ b/libtk205/src/RS0002_factory.cpp @@ -5,7 +5,7 @@ bool RS0002_factory::s_registered = RS_instance_factory::Register_factory("RS0002", std::make_shared()); -std::unique_ptr RS0002_factory::Create() const +std::unique_ptr RS0002_factory::Create_instance() const { return std::make_unique(); } diff --git a/libtk205/src/RS0003_factory.cpp b/libtk205/src/RS0003_factory.cpp index c833b30..a2b556e 100755 --- a/libtk205/src/RS0003_factory.cpp +++ b/libtk205/src/RS0003_factory.cpp @@ -5,7 +5,7 @@ bool RS0003_factory::s_registered = RS_instance_factory::Register_factory("RS0003", std::make_shared()); -std::unique_ptr RS0003_factory::Create() const +std::unique_ptr RS0003_factory::Create_instance() const { return std::make_unique(); } diff --git a/libtk205/src/RS0004_factory.cpp b/libtk205/src/RS0004_factory.cpp index 887c3c7..d9815c8 100755 --- a/libtk205/src/RS0004_factory.cpp +++ b/libtk205/src/RS0004_factory.cpp @@ -5,7 +5,7 @@ bool RS0004_factory::s_registered = RS_instance_factory::Register_factory("RS0004", std::make_shared()); -std::unique_ptr RS0004_factory::Create() const +std::unique_ptr RS0004_factory::Create_instance() const { return std::make_unique(); } diff --git a/libtk205/src/RS0005_factory.cpp b/libtk205/src/RS0005_factory.cpp index c154da4..e4cc789 100755 --- a/libtk205/src/RS0005_factory.cpp +++ b/libtk205/src/RS0005_factory.cpp @@ -5,7 +5,7 @@ bool RS0005_factory::s_registered = RS_instance_factory::Register_factory("RS0005", std::make_shared()); -std::unique_ptr RS0005_factory::Create() const +std::unique_ptr RS0005_factory::Create_instance() const { return std::make_unique(); } diff --git a/libtk205/src/RS0006_factory.cpp b/libtk205/src/RS0006_factory.cpp index ab63b01..10d3d43 100755 --- a/libtk205/src/RS0006_factory.cpp +++ b/libtk205/src/RS0006_factory.cpp @@ -5,7 +5,7 @@ bool RS0006_factory::s_registered = RS_instance_factory::Register_factory("RS0006", std::make_shared()); -std::unique_ptr RS0006_factory::Create() const +std::unique_ptr RS0006_factory::Create_instance() const { return std::make_unique(); } diff --git a/libtk205/src/RS_instance_factory.cpp b/libtk205/src/RS_instance_factory.cpp index 4492893..7db544f 100755 --- a/libtk205/src/RS_instance_factory.cpp +++ b/libtk205/src/RS_instance_factory.cpp @@ -24,6 +24,5 @@ bool RS_instance_factory::Register_factory(std::string const& RS_ID, std::unique_ptr RS_instance_factory::Create(std::string const& RS_ID) { const auto factory = Get_RS_factory_map()[RS_ID]; - - return (factory == nullptr) ? nullptr : factory->Create(); + return (factory == nullptr) ? nullptr : factory->Create_instance(); } \ No newline at end of file diff --git a/libtk205/src/libtk205.cpp b/libtk205/src/libtk205.cpp index 892d187..57bc479 100644 --- a/libtk205/src/libtk205.cpp +++ b/libtk205/src/libtk205.cpp @@ -2,11 +2,28 @@ #include "nlohmann/json.hpp" #include +#include "RS0001_factory.h" +#include "RS0002_factory.h" +#include "RS0003_factory.h" +#include "RS0004_factory.h" +#include "RS0005_factory.h" +#include "RS0006_factory.h" + namespace libtk205_NS { using json = nlohmann::json; using namespace ASHRAE205_NS; + A205_SDK::A205_SDK() + { + RS_instance_factory::Register_factory("RS0001", std::make_shared()); + RS_instance_factory::Register_factory("RS0002", std::make_shared()); + RS_instance_factory::Register_factory("RS0003", std::make_shared()); + RS_instance_factory::Register_factory("RS0004", std::make_shared()); + RS_instance_factory::Register_factory("RS0005", std::make_shared()); + RS_instance_factory::Register_factory("RS0006", std::make_shared()); + } + ASHRAE205 A205_SDK::Load_A205(const char* input_file) { std::string filename(input_file); @@ -33,37 +50,37 @@ namespace libtk205_NS { a205.Initialize(j); } - return a205; + return std::move(a205); } - std::shared_ptr A205_SDK::Get_RS0001(const ASHRAE205& a205) + const RS0001_NS::RS0001* A205_SDK::Get_RS0001(const ASHRAE205& a205) { - return std::dynamic_pointer_cast(a205.RS_instance); + return dynamic_cast(a205.RS_instance.get()); } - std::shared_ptr A205_SDK::Get_RS0002(const ASHRAE205& a205) + const RS0002_NS::RS0002* A205_SDK::Get_RS0002(const ASHRAE205& a205) { - return std::dynamic_pointer_cast(a205.RS_instance); + return dynamic_cast(a205.RS_instance.get()); } - std::shared_ptr A205_SDK::Get_RS0003(const ASHRAE205& a205) - { - return std::dynamic_pointer_cast(a205.RS_instance); - } + // std::shared_ptr A205_SDK::Get_RS0003(const ASHRAE205& a205) + // { + // return std::dynamic_pointer_cast(a205.RS_instance); + // } - std::shared_ptr A205_SDK::Get_RS0004(const ASHRAE205& a205) + const RS0004_NS::RS0004* A205_SDK::Get_RS0004(const ASHRAE205& a205) { - return std::dynamic_pointer_cast(a205.RS_instance); + return dynamic_cast(a205.RS_instance.get()); } - std::shared_ptr A205_SDK::Get_RS0005(const ASHRAE205& a205) + const RS0005_NS::RS0005* A205_SDK::Get_RS0005(const ASHRAE205& a205) { - return std::dynamic_pointer_cast(a205.RS_instance); + return dynamic_cast(a205.RS_instance.get()); } - std::shared_ptr A205_SDK::Get_RS0006(const ASHRAE205& a205) + const RS0006_NS::RS0006* A205_SDK::Get_RS0006(const ASHRAE205& a205) { - return std::dynamic_pointer_cast(a205.RS_instance); + return dynamic_cast(a205.RS_instance.get()); } void A205_SDK::Read_binary_file(const char* filename, std::vector &bytes) From fc18af58a2a84e88e42bea9c14cbb585bf1b8226 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Sun, 29 Nov 2020 21:07:49 -0700 Subject: [PATCH 005/154] Check in submodule dependencies. --- libtk205/src/load.cpp | 143 ++++++++++++++++++++++++++++++++++++++++++ libtk205/vendor/btwxt | 2 +- schema-205 | 2 +- 3 files changed, 145 insertions(+), 2 deletions(-) create mode 100755 libtk205/src/load.cpp diff --git a/libtk205/src/load.cpp b/libtk205/src/load.cpp new file mode 100755 index 0000000..a8a372b --- /dev/null +++ b/libtk205/src/load.cpp @@ -0,0 +1,143 @@ +#include +#include +#include +#include +#include "libtk205.h" + +#include "RS_instance_factory.h" +#include "RS0003_factory.h" + +using json = nlohmann::json; + +void iterj(json& j, std::vector& lineage, std::string &out) +{ + for (json::iterator it = j.begin(); it != j.end(); ++it) + { + auto item_lineage = lineage; + std::ostringstream oss; + item_lineage.push_back(it.key()); + if (!it->is_object()) + { + for (const auto &i : item_lineage) + { + oss << i << ", "; + } + oss << " : " << it.value() << "\n"; + out += oss.str(); + } + else + { + iterj(*it, item_lineage, out); + } + } +} + +void Read_binary_file(const char* filename, std::vector &bytes) +{ + std::ifstream is (filename, std::ifstream::binary); + if (is) + { + // get length of file: + is.seekg(0, is.end); + int length = is.tellg(); + is.seekg(0, is.beg); + + bytes.resize(length); + // read data as a block: + is.read(reinterpret_cast(bytes.data()), length); + + is.close(); + } +} + +#if 0 +void Load_A205(const json& j) +{ + ASHRAE205_NS::ASHRAE205 a205; + a205.Initialize(j); + + std::cout << a205.disclaimer << "\n"; + auto rs01 = std::dynamic_pointer_cast(a205.RS_instance); + if (rs01) + { + for (const auto& element : rs01->performance.performance_map_cooling.grid_variables.condenser_liquid_entering_temperature) + { + std::cout << element << "\n"; + } + } + auto rs03 = std::dynamic_pointer_cast(a205.RS_instance); + if (rs03) + { + //std::cout << rs03->description.assembly_components.at(1).component_description << "\n"; + std::cout << rs03->description.product_information.number_of_impellers << "\n"; + auto gridvars1 = std::dynamic_pointer_cast(rs03->performance.performance_map)->grid_variables.volumetric_air_flow_rate; + for (const auto& element : gridvars1) + { + std::cout << element << "\n"; + } + } + auto rs05 = std::dynamic_pointer_cast(a205.RS_instance); + if (rs05) + { + auto rs06 = std::dynamic_pointer_cast(rs05->performance.drive_representation.RS_instance); + if (rs06) + { + std::cout << rs06->description.product_information.model_number << "\n"; + } + } + auto rs06 = std::dynamic_pointer_cast(a205.RS_instance); + if (rs06) + { + std::cout << rs06->description.product_information.model_number << "\n"; + } +} +#endif + +int main(int argc, char* argv[]) +{ + RS_instance_factory::Register_factory("RS0003", std::make_shared()); + + if (argc > 1) + { +#if 0 + using json = nlohmann::json; + std::string schema(argv[1]); + std::ifstream in(schema); + json j; + in >> j; + Load_A205(j); +#else + using namespace libtk205_NS; + A205_SDK sdk; + auto a205 = sdk.Load_A205(argv[1]); + auto rs01 = sdk.Get_RS0001(a205); + if (rs01) + { + for (const auto& element : rs01->performance.performance_map_cooling.grid_variables.condenser_liquid_entering_temperature) + { + std::cout << element << "\n"; + } + } + auto rs03 = std::dynamic_pointer_cast(a205.RS_instance); + if (rs03) + { + // //std::cout << rs03->description.assembly_components.at(1).component_description << "\n"; + std::cout << "number_of_impellers " << rs03->description.product_information.number_of_impellers << "\n"; + auto gridvars1 = std::dynamic_pointer_cast(rs03->performance.performance_map)->grid_variables.volumetric_air_flow_rate; + for (const auto& element : gridvars1) + { + std::cout << element << "\n"; + } + } + auto rs05 = sdk.Get_RS0005(a205); + if (rs05) + { + auto rs06 = sdk.Get_RS0006(rs05->performance.drive_representation); + if (rs06) + { + std::cout << rs06->description.product_information.model_number << "\n"; + } + } +#endif + } +} \ No newline at end of file diff --git a/libtk205/vendor/btwxt b/libtk205/vendor/btwxt index 692bcce..d034772 160000 --- a/libtk205/vendor/btwxt +++ b/libtk205/vendor/btwxt @@ -1 +1 @@ -Subproject commit 692bcce95f501c52ff627353d8fb90c9e7fbd2ea +Subproject commit d034772fef894750caa95b5d0933bd2434c9abe1 diff --git a/schema-205 b/schema-205 index 893edc9..bf5945a 160000 --- a/schema-205 +++ b/schema-205 @@ -1 +1 @@ -Subproject commit 893edc9d4d6670d63b4d04a7835e294ec17391cf +Subproject commit bf5945a1546281a375bf53807f431774a82ab102 From 9c1f0262912ae79193b495382f537b3049d7ccf3 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Mon, 30 Nov 2020 10:10:31 -0700 Subject: [PATCH 006/154] Remove unsed (test) code. --- libtk205/CMakeLists.txt | 3 +- libtk205/src/load.cpp | 84 ----------------------------------------- 2 files changed, 1 insertion(+), 86 deletions(-) diff --git a/libtk205/CMakeLists.txt b/libtk205/CMakeLists.txt index 12251d1..9372583 100644 --- a/libtk205/CMakeLists.txt +++ b/libtk205/CMakeLists.txt @@ -34,8 +34,7 @@ list(APPEND RS_SOURCES "./src/build/cpp/ASHRAE205.cpp" ) set (SOURCES ${Factory_SOURCES} ${RS_SOURCES}) -# add_executable(libtktest src/load.cpp ${SOURCES}) -# target_link_libraries(libtktest btwxt) + add_library(libtk205 src/libtk205.cpp ${SOURCES}) target_link_libraries(libtk205 btwxt) add_executable(libtktest src/load.cpp) diff --git a/libtk205/src/load.cpp b/libtk205/src/load.cpp index a8a372b..deaaf74 100755 --- a/libtk205/src/load.cpp +++ b/libtk205/src/load.cpp @@ -9,90 +9,6 @@ using json = nlohmann::json; -void iterj(json& j, std::vector& lineage, std::string &out) -{ - for (json::iterator it = j.begin(); it != j.end(); ++it) - { - auto item_lineage = lineage; - std::ostringstream oss; - item_lineage.push_back(it.key()); - if (!it->is_object()) - { - for (const auto &i : item_lineage) - { - oss << i << ", "; - } - oss << " : " << it.value() << "\n"; - out += oss.str(); - } - else - { - iterj(*it, item_lineage, out); - } - } -} - -void Read_binary_file(const char* filename, std::vector &bytes) -{ - std::ifstream is (filename, std::ifstream::binary); - if (is) - { - // get length of file: - is.seekg(0, is.end); - int length = is.tellg(); - is.seekg(0, is.beg); - - bytes.resize(length); - // read data as a block: - is.read(reinterpret_cast(bytes.data()), length); - - is.close(); - } -} - -#if 0 -void Load_A205(const json& j) -{ - ASHRAE205_NS::ASHRAE205 a205; - a205.Initialize(j); - - std::cout << a205.disclaimer << "\n"; - auto rs01 = std::dynamic_pointer_cast(a205.RS_instance); - if (rs01) - { - for (const auto& element : rs01->performance.performance_map_cooling.grid_variables.condenser_liquid_entering_temperature) - { - std::cout << element << "\n"; - } - } - auto rs03 = std::dynamic_pointer_cast(a205.RS_instance); - if (rs03) - { - //std::cout << rs03->description.assembly_components.at(1).component_description << "\n"; - std::cout << rs03->description.product_information.number_of_impellers << "\n"; - auto gridvars1 = std::dynamic_pointer_cast(rs03->performance.performance_map)->grid_variables.volumetric_air_flow_rate; - for (const auto& element : gridvars1) - { - std::cout << element << "\n"; - } - } - auto rs05 = std::dynamic_pointer_cast(a205.RS_instance); - if (rs05) - { - auto rs06 = std::dynamic_pointer_cast(rs05->performance.drive_representation.RS_instance); - if (rs06) - { - std::cout << rs06->description.product_information.model_number << "\n"; - } - } - auto rs06 = std::dynamic_pointer_cast(a205.RS_instance); - if (rs06) - { - std::cout << rs06->description.product_information.model_number << "\n"; - } -} -#endif - int main(int argc, char* argv[]) { RS_instance_factory::Register_factory("RS0003", std::make_shared()); From e21238e8bea7ec110c80eafc867761a3259ee750 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Mon, 30 Nov 2020 16:09:24 -0700 Subject: [PATCH 007/154] Add factory-related classes to main namespace ASHRAE205_NS. --- libtk205/include/RS0001_factory.h | 21 ++++++----- libtk205/include/RS0002_factory.h | 17 +++++---- libtk205/include/RS0003_factory.h | 17 +++++---- libtk205/include/RS0004_factory.h | 17 +++++---- libtk205/include/RS0005_factory.h | 17 +++++---- libtk205/include/RS0006_factory.h | 17 +++++---- libtk205/include/RS_instance_base.h | 29 ++++++++------- libtk205/include/RS_instance_factory.h | 47 +++++++++++++------------ libtk205/include/libtk205.h | 2 +- libtk205/include/performance_map_base.h | 2 +- libtk205/src/RS0001_factory.cpp | 3 +- libtk205/src/RS0002_factory.cpp | 3 +- libtk205/src/RS0003_factory.cpp | 3 +- libtk205/src/RS0004_factory.cpp | 3 +- libtk205/src/RS0005_factory.cpp | 3 +- libtk205/src/RS0006_factory.cpp | 3 +- libtk205/src/RS_instance_factory.cpp | 28 ++++++++------- libtk205/src/libtk205.cpp | 4 +-- libtk205/src/load.cpp | 2 ++ 19 files changed, 135 insertions(+), 103 deletions(-) diff --git a/libtk205/include/RS0001_factory.h b/libtk205/include/RS0001_factory.h index df4af38..4997e3e 100644 --- a/libtk205/include/RS0001_factory.h +++ b/libtk205/include/RS0001_factory.h @@ -3,16 +3,19 @@ #include "RS_instance_factory.h" -class RS0001_factory : public RS_instance_factory -{ - public: +namespace ASHRAE205_NS { - std::unique_ptr Create_instance() const override; + class RS0001_factory : public RS_instance_factory + { + public: - private: - // Implementation of self-registering class - // a la https://www.bfilipek.com/2018/02/factory-selfregister.html - static bool s_registered; -}; + std::unique_ptr Create_instance() const override; + + private: + // Implementation of self-registering class + // a la https://www.bfilipek.com/2018/02/factory-selfregister.html + static bool s_registered; + }; +} #endif \ No newline at end of file diff --git a/libtk205/include/RS0002_factory.h b/libtk205/include/RS0002_factory.h index 21180ea..5c0ab85 100644 --- a/libtk205/include/RS0002_factory.h +++ b/libtk205/include/RS0002_factory.h @@ -3,14 +3,17 @@ #include "RS_instance_factory.h" -class RS0002_factory : public RS_instance_factory -{ - public: +namespace ASHRAE205_NS { - std::unique_ptr Create_instance() const override; + class RS0002_factory : public RS_instance_factory + { + public: - private: - static bool s_registered; -}; + std::unique_ptr Create_instance() const override; + + private: + static bool s_registered; + }; +} #endif \ No newline at end of file diff --git a/libtk205/include/RS0003_factory.h b/libtk205/include/RS0003_factory.h index fb39028..195e94e 100644 --- a/libtk205/include/RS0003_factory.h +++ b/libtk205/include/RS0003_factory.h @@ -3,14 +3,17 @@ #include "RS_instance_factory.h" -class RS0003_factory : public RS_instance_factory -{ - public: +namespace ASHRAE205_NS { - std::unique_ptr Create_instance() const override; + class RS0003_factory : public RS_instance_factory + { + public: - private: - static bool s_registered; -}; + std::unique_ptr Create_instance() const override; + + private: + static bool s_registered; + }; +} #endif \ No newline at end of file diff --git a/libtk205/include/RS0004_factory.h b/libtk205/include/RS0004_factory.h index fe3b960..07050e6 100644 --- a/libtk205/include/RS0004_factory.h +++ b/libtk205/include/RS0004_factory.h @@ -3,14 +3,17 @@ #include "RS_instance_factory.h" -class RS0004_factory : public RS_instance_factory -{ - public: +namespace ASHRAE205_NS { - std::unique_ptr Create_instance() const override; + class RS0004_factory : public RS_instance_factory + { + public: - private: - static bool s_registered; -}; + std::unique_ptr Create_instance() const override; + + private: + static bool s_registered; + }; +} #endif \ No newline at end of file diff --git a/libtk205/include/RS0005_factory.h b/libtk205/include/RS0005_factory.h index 50c890d..206285b 100644 --- a/libtk205/include/RS0005_factory.h +++ b/libtk205/include/RS0005_factory.h @@ -3,14 +3,17 @@ #include "RS_instance_factory.h" -class RS0005_factory : public RS_instance_factory -{ - public: +namespace ASHRAE205_NS { - std::unique_ptr Create_instance() const override; + class RS0005_factory : public RS_instance_factory + { + public: - private: - static bool s_registered; -}; + std::unique_ptr Create_instance() const override; + + private: + static bool s_registered; + }; +} #endif \ No newline at end of file diff --git a/libtk205/include/RS0006_factory.h b/libtk205/include/RS0006_factory.h index ec7243e..98bef69 100644 --- a/libtk205/include/RS0006_factory.h +++ b/libtk205/include/RS0006_factory.h @@ -3,14 +3,17 @@ #include "RS_instance_factory.h" -class RS0006_factory : public RS_instance_factory -{ - public: +namespace ASHRAE205_NS { - std::unique_ptr Create_instance() const override; + class RS0006_factory : public RS_instance_factory + { + public: - private: - static bool s_registered; -}; + std::unique_ptr Create_instance() const override; + + private: + static bool s_registered; + }; +} #endif \ No newline at end of file diff --git a/libtk205/include/RS_instance_base.h b/libtk205/include/RS_instance_base.h index 6ecdbf8..dbc048a 100755 --- a/libtk205/include/RS_instance_base.h +++ b/libtk205/include/RS_instance_base.h @@ -16,18 +16,21 @@ namespace ASHRAE205_NS { } } -class RS_instance_base -{ -public: - - RS_instance_base() = default; - virtual ~RS_instance_base() = default; - RS_instance_base(const RS_instance_base& other) = default; - RS_instance_base& operator=(const RS_instance_base& other) = default; - RS_instance_base(RS_instance_base&&) = default; - RS_instance_base& operator=(RS_instance_base&&) = default; - - virtual void Initialize(const nlohmann::json& j) = 0; -}; +namespace ASHRAE205_NS { + + class RS_instance_base + { + public: + + RS_instance_base() = default; + virtual ~RS_instance_base() = default; + RS_instance_base(const RS_instance_base& other) = default; + RS_instance_base& operator=(const RS_instance_base& other) = default; + RS_instance_base(RS_instance_base&&) = default; + RS_instance_base& operator=(RS_instance_base&&) = default; + + virtual void Initialize(const nlohmann::json& j) = 0; + }; +} #endif \ No newline at end of file diff --git a/libtk205/include/RS_instance_factory.h b/libtk205/include/RS_instance_factory.h index 653d72d..1f54476 100755 --- a/libtk205/include/RS_instance_factory.h +++ b/libtk205/include/RS_instance_factory.h @@ -8,27 +8,30 @@ /// @class RS_instance_factory RS_instance_factory.h /// @brief This class is an abstract interface to support RS factory sub-classes -class RS_instance_factory -{ -public: // Interface - - RS_instance_factory() = default; - virtual ~RS_instance_factory() = default; - - static bool Register_factory(std::string const &RS_ID, - std::shared_ptr factory); - - // Universal factory interface Create() - static std::unique_ptr Create(std::string const &RS_ID); - - // Derived factories override Create_instance() for actual resource creation - virtual std::unique_ptr Create_instance() const = 0; - - // Rule of five - RS_instance_factory(const RS_instance_factory& other) = delete; - RS_instance_factory& operator=(const RS_instance_factory& other) = delete; - RS_instance_factory(RS_instance_factory&&) = delete; - RS_instance_factory& operator=(RS_instance_factory&&) = delete; -}; +namespace ASHRAE205_NS { + class RS_instance_factory + { + public: // Interface + + RS_instance_factory() = default; + virtual ~RS_instance_factory() = default; + + static bool Register_factory(std::string const &RS_ID, + std::shared_ptr factory); + + // Universal factory interface Create(). Factory::Create() will, through delegation, + // actually return the requested object. + static std::unique_ptr Create(std::string const &RS_ID); + + // Derived factories override Create_instance() for actual resource creation + virtual std::unique_ptr Create_instance() const = 0; + + // Rule of five + RS_instance_factory(const RS_instance_factory& other) = delete; + RS_instance_factory& operator=(const RS_instance_factory& other) = delete; + RS_instance_factory(RS_instance_factory&&) = delete; + RS_instance_factory& operator=(RS_instance_factory&&) = delete; + }; +} #endif \ No newline at end of file diff --git a/libtk205/include/libtk205.h b/libtk205/include/libtk205.h index 43f5607..7961ac4 100644 --- a/libtk205/include/libtk205.h +++ b/libtk205/include/libtk205.h @@ -21,7 +21,7 @@ namespace libtk205_NS { ASHRAE205_NS::ASHRAE205 Load_A205(const char* input_file); const ASHRAE205_NS::RS0001_NS::RS0001* Get_RS0001(const ASHRAE205_NS::ASHRAE205& a205); const ASHRAE205_NS::RS0002_NS::RS0002* Get_RS0002(const ASHRAE205_NS::ASHRAE205& a205); - const ASHRAE205_NS::RS0003_NS::RS0003* Get_RS0003(const ASHRAE205_NS::ASHRAE205& a205); + //const ASHRAE205_NS::RS0003_NS::RS0003* Get_RS0003(const ASHRAE205_NS::ASHRAE205& a205); const ASHRAE205_NS::RS0004_NS::RS0004* Get_RS0004(const ASHRAE205_NS::ASHRAE205& a205); const ASHRAE205_NS::RS0005_NS::RS0005* Get_RS0005(const ASHRAE205_NS::ASHRAE205& a205); const ASHRAE205_NS::RS0006_NS::RS0006* Get_RS0006(const ASHRAE205_NS::ASHRAE205& a205); diff --git a/libtk205/include/performance_map_base.h b/libtk205/include/performance_map_base.h index 0024e05..15d8061 100644 --- a/libtk205/include/performance_map_base.h +++ b/libtk205/include/performance_map_base.h @@ -18,7 +18,7 @@ class performance_map_base { performance_map_base(const performance_map_base& other) = default; performance_map_base& operator=(const performance_map_base& other) = default; - virtual void Initialize(const nlohmann::json& j) {} + virtual void Initialize(const nlohmann::json& j) = 0; inline void Add_grid_axis(std::vector& axis) const { } diff --git a/libtk205/src/RS0001_factory.cpp b/libtk205/src/RS0001_factory.cpp index 0de3555..5830075 100755 --- a/libtk205/src/RS0001_factory.cpp +++ b/libtk205/src/RS0001_factory.cpp @@ -2,8 +2,7 @@ #include "RS0001.h" #include -// A little trickery here: https://www.learncpp.com/cpp-tutorial/811-static-member-variables/ -// "static members exist even if no objects of the class have been instantiated" +using namespace ASHRAE205_NS; bool RS0001_factory::s_registered = RS_instance_factory::Register_factory("RS0001", std::make_shared()); diff --git a/libtk205/src/RS0002_factory.cpp b/libtk205/src/RS0002_factory.cpp index bfd3b45..901caff 100755 --- a/libtk205/src/RS0002_factory.cpp +++ b/libtk205/src/RS0002_factory.cpp @@ -1,7 +1,8 @@ #include "RS0002_factory.h" #include "RS0002.h" #include -//#include + +using namespace ASHRAE205_NS; bool RS0002_factory::s_registered = RS_instance_factory::Register_factory("RS0002", std::make_shared()); diff --git a/libtk205/src/RS0003_factory.cpp b/libtk205/src/RS0003_factory.cpp index a2b556e..1b19d39 100755 --- a/libtk205/src/RS0003_factory.cpp +++ b/libtk205/src/RS0003_factory.cpp @@ -1,7 +1,8 @@ #include "RS0003_factory.h" #include "RS0003.h" #include -//#include + +using namespace ASHRAE205_NS; bool RS0003_factory::s_registered = RS_instance_factory::Register_factory("RS0003", std::make_shared()); diff --git a/libtk205/src/RS0004_factory.cpp b/libtk205/src/RS0004_factory.cpp index d9815c8..73b2cfd 100755 --- a/libtk205/src/RS0004_factory.cpp +++ b/libtk205/src/RS0004_factory.cpp @@ -1,7 +1,8 @@ #include "RS0004_factory.h" #include "RS0004.h" #include -//#include + +using namespace ASHRAE205_NS; bool RS0004_factory::s_registered = RS_instance_factory::Register_factory("RS0004", std::make_shared()); diff --git a/libtk205/src/RS0005_factory.cpp b/libtk205/src/RS0005_factory.cpp index e4cc789..79ae20b 100755 --- a/libtk205/src/RS0005_factory.cpp +++ b/libtk205/src/RS0005_factory.cpp @@ -1,7 +1,8 @@ #include "RS0005_factory.h" #include "RS0005.h" #include -//#include + +using namespace ASHRAE205_NS; bool RS0005_factory::s_registered = RS_instance_factory::Register_factory("RS0005", std::make_shared()); diff --git a/libtk205/src/RS0006_factory.cpp b/libtk205/src/RS0006_factory.cpp index 10d3d43..ab27e5f 100755 --- a/libtk205/src/RS0006_factory.cpp +++ b/libtk205/src/RS0006_factory.cpp @@ -1,7 +1,8 @@ #include "RS0006_factory.h" #include "RS0006.h" #include -//#include + +using namespace ASHRAE205_NS; bool RS0006_factory::s_registered = RS_instance_factory::Register_factory("RS0006", std::make_shared()); diff --git a/libtk205/src/RS_instance_factory.cpp b/libtk205/src/RS_instance_factory.cpp index 7db544f..3449d8c 100755 --- a/libtk205/src/RS_instance_factory.cpp +++ b/libtk205/src/RS_instance_factory.cpp @@ -3,7 +3,7 @@ namespace { - using RS_factory_map = std::map >; + using RS_factory_map = std::map >; RS_factory_map& Get_RS_factory_map() { @@ -12,17 +12,19 @@ namespace } } -//static -bool RS_instance_factory::Register_factory(std::string const& RS_ID, - std::shared_ptr factory) -{ - Get_RS_factory_map()[RS_ID] = factory; - return true; -} +namespace ASHRAE205_NS { + //static + bool RS_instance_factory::Register_factory(std::string const& RS_ID, + std::shared_ptr factory) + { + Get_RS_factory_map()[RS_ID] = factory; + return true; + } -//static -std::unique_ptr RS_instance_factory::Create(std::string const& RS_ID) -{ - const auto factory = Get_RS_factory_map()[RS_ID]; - return (factory == nullptr) ? nullptr : factory->Create_instance(); + //static + std::unique_ptr RS_instance_factory::Create(std::string const& RS_ID) + { + const auto factory = Get_RS_factory_map()[RS_ID]; + return (factory == nullptr) ? nullptr : factory->Create_instance(); + } } \ No newline at end of file diff --git a/libtk205/src/libtk205.cpp b/libtk205/src/libtk205.cpp index 57bc479..2d7ba2f 100644 --- a/libtk205/src/libtk205.cpp +++ b/libtk205/src/libtk205.cpp @@ -63,9 +63,9 @@ namespace libtk205_NS { return dynamic_cast(a205.RS_instance.get()); } - // std::shared_ptr A205_SDK::Get_RS0003(const ASHRAE205& a205) + // const RS0003_NS::RS0003* A205_SDK::Get_RS0003(const ASHRAE205& a205) // { - // return std::dynamic_pointer_cast(a205.RS_instance); + // return dynamic_cast(a205.RS_instance.get()); // } const RS0004_NS::RS0004* A205_SDK::Get_RS0004(const ASHRAE205& a205) diff --git a/libtk205/src/load.cpp b/libtk205/src/load.cpp index deaaf74..8e1d65c 100755 --- a/libtk205/src/load.cpp +++ b/libtk205/src/load.cpp @@ -11,6 +11,8 @@ using json = nlohmann::json; int main(int argc, char* argv[]) { + using namespace ASHRAE205_NS; + RS_instance_factory::Register_factory("RS0003", std::make_shared()); if (argc > 1) From f15305b2d00a07e0be2cdaf420aaa8548af056dd Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Tue, 1 Dec 2020 14:44:04 -0700 Subject: [PATCH 008/154] Add top-level CMakelists that generates code and builds libtk205. --- CMakeLists.txt | 14 ++++++++++++++ libtk205/CMakeLists.txt | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..b82c62c --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,14 @@ +# Set a default build type if none was specified +if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) + message(STATUS "Setting build type to 'Release' as none was specified.") + set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE) + # Set the possible values of build type for cmake-gui + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" + "MinSizeRel" "RelWithDebInfo") +endif() + +add_custom_target(generate_cpp ALL pipenv run doit headers + COMMAND pipenv run doit cpp + WORKING_DIRECTORY "../schema-205") + +add_subdirectory(libtk205) diff --git a/libtk205/CMakeLists.txt b/libtk205/CMakeLists.txt index 9372583..9e60dc5 100644 --- a/libtk205/CMakeLists.txt +++ b/libtk205/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.0.0) set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED ON) -project(libtktest VERSION 0.1.0) +project(libtktest) include(CTest) enable_testing() From f0dc1ef02cff35f53b5f1ee8a0e2689a8f2b0760 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Mon, 7 Dec 2020 08:30:47 -0700 Subject: [PATCH 009/154] Add btwxt integration. --- libtk205/include/performance_map_base.h | 16 ++++++++++++---- schema-205 | 2 +- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/libtk205/include/performance_map_base.h b/libtk205/include/performance_map_base.h index 15d8061..9f2dad1 100644 --- a/libtk205/include/performance_map_base.h +++ b/libtk205/include/performance_map_base.h @@ -20,20 +20,28 @@ class performance_map_base { virtual void Initialize(const nlohmann::json& j) = 0; - inline void Add_grid_axis(std::vector& axis) const { + inline void Add_grid_axis(std::vector& axis) { + _grid_axes.emplace_back(Btwxt::GridAxis(axis)); } - inline void Add_grid_axis(std::vector& axis) const { + inline void Add_grid_axis(std::vector& axis) { + _grid_axes.emplace_back(Btwxt::GridAxis(std::vector(axis.begin(), axis.end()))); } inline void Add_data_table(std::vector& table) { - //_btwxt.add_value_table(table); + _btwxt.add_value_table(table); } - //public Calculate_performance(target) + inline void Finalize_grid() { + auto gd = Btwxt::GriddedData(_grid_axes); + _btwxt = Btwxt::RegularGridInterpolator(gd); + } + + inline void Calculate_performance(std::vector& target); private: Btwxt::RegularGridInterpolator _btwxt; + std::vector _grid_axes; }; diff --git a/schema-205 b/schema-205 index bf5945a..7960820 160000 --- a/schema-205 +++ b/schema-205 @@ -1 +1 @@ -Subproject commit bf5945a1546281a375bf53807f431774a82ab102 +Subproject commit 796082079b43fb7e36f1ae029328c5e005df82f9 From fe3e0c596526ce8e5440d4d701e5df4d23b1f62c Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Tue, 8 Dec 2020 12:48:01 -0700 Subject: [PATCH 010/154] Remove hard-coded factory files; add autogeneration into build directory. --- CMakeLists.txt | 5 ++-- Pipfile | 1 + libtk205/CMakeLists.txt | 14 +++++----- libtk205/include/RS0001_factory.h | 21 --------------- libtk205/include/RS0002_factory.h | 19 ------------- libtk205/include/RS0003_factory.h | 19 ------------- libtk205/include/RS0004_factory.h | 19 ------------- libtk205/include/RS0005_factory.h | 19 ------------- libtk205/include/RS0006_factory.h | 19 ------------- libtk205/include/performance_map_base.h | 36 ++++++++++++++++++++++++- libtk205/src/RS0001_factory.cpp | 12 --------- libtk205/src/RS0002_factory.cpp | 12 --------- libtk205/src/RS0003_factory.cpp | 12 --------- libtk205/src/RS0004_factory.cpp | 12 --------- libtk205/src/RS0005_factory.cpp | 12 --------- libtk205/src/RS0006_factory.cpp | 12 --------- schema-205 | 2 +- 17 files changed, 47 insertions(+), 199 deletions(-) delete mode 100644 libtk205/include/RS0001_factory.h delete mode 100644 libtk205/include/RS0002_factory.h delete mode 100644 libtk205/include/RS0003_factory.h delete mode 100644 libtk205/include/RS0004_factory.h delete mode 100644 libtk205/include/RS0005_factory.h delete mode 100644 libtk205/include/RS0006_factory.h delete mode 100755 libtk205/src/RS0001_factory.cpp delete mode 100755 libtk205/src/RS0002_factory.cpp delete mode 100755 libtk205/src/RS0003_factory.cpp delete mode 100755 libtk205/src/RS0004_factory.cpp delete mode 100755 libtk205/src/RS0005_factory.cpp delete mode 100755 libtk205/src/RS0006_factory.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index b82c62c..64ba633 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,8 +7,9 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) "MinSizeRel" "RelWithDebInfo") endif() -add_custom_target(generate_cpp ALL pipenv run doit headers - COMMAND pipenv run doit cpp +# TODO: 'pipenv run doit' or 'doit' ? +add_custom_target(generate_cpp ALL doit headers + COMMAND doit cpp WORKING_DIRECTORY "../schema-205") add_subdirectory(libtk205) diff --git a/Pipfile b/Pipfile index 782bc63..82824a1 100644 --- a/Pipfile +++ b/Pipfile @@ -18,5 +18,6 @@ jsonschema = "*" cbor2 = "*" openpyxl = "*" pyyaml = "*" +jinja2 = "*" tk205 = {editable = true,path = "."} schema205 = {editable = true,path = "schema-205"} diff --git a/libtk205/CMakeLists.txt b/libtk205/CMakeLists.txt index 9e60dc5..615a9a3 100644 --- a/libtk205/CMakeLists.txt +++ b/libtk205/CMakeLists.txt @@ -11,18 +11,18 @@ set(JSON_BuildTests OFF CACHE INTERNAL "") include_directories(vendor/btwxt/src) include_directories(vendor/json/single_include) include_directories(vendor/json/include) -include_directories(src/build/cpp) +include_directories(src/build/include) include_directories(include) add_subdirectory(vendor/btwxt) list(APPEND Factory_SOURCES "./src/RS_instance_factory.cpp" - "./src/RS0001_factory.cpp" - "./src/RS0002_factory.cpp" - "./src/RS0003_factory.cpp" - "./src/RS0004_factory.cpp" - "./src/RS0005_factory.cpp" - "./src/RS0006_factory.cpp" + "./src/build/cpp/RS0001_factory.cpp" + "./src/build/cpp/RS0002_factory.cpp" + "./src/build/cpp/RS0003_factory.cpp" + "./src/build/cpp/RS0004_factory.cpp" + "./src/build/cpp/RS0005_factory.cpp" + "./src/build/cpp/RS0006_factory.cpp" ) list(APPEND RS_SOURCES "./src/build/cpp/ASHRAE205.cpp" "./src/build/cpp/RS0001.cpp" diff --git a/libtk205/include/RS0001_factory.h b/libtk205/include/RS0001_factory.h deleted file mode 100644 index 4997e3e..0000000 --- a/libtk205/include/RS0001_factory.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef RS0001_FACTORY_H_ -#define RS0001_FACTORY_H_ - -#include "RS_instance_factory.h" - -namespace ASHRAE205_NS { - - class RS0001_factory : public RS_instance_factory - { - public: - - std::unique_ptr Create_instance() const override; - - private: - // Implementation of self-registering class - // a la https://www.bfilipek.com/2018/02/factory-selfregister.html - static bool s_registered; - }; -} - -#endif \ No newline at end of file diff --git a/libtk205/include/RS0002_factory.h b/libtk205/include/RS0002_factory.h deleted file mode 100644 index 5c0ab85..0000000 --- a/libtk205/include/RS0002_factory.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef RS0002_FACTORY_H_ -#define RS0002_FACTORY_H_ - -#include "RS_instance_factory.h" - -namespace ASHRAE205_NS { - - class RS0002_factory : public RS_instance_factory - { - public: - - std::unique_ptr Create_instance() const override; - - private: - static bool s_registered; - }; -} - -#endif \ No newline at end of file diff --git a/libtk205/include/RS0003_factory.h b/libtk205/include/RS0003_factory.h deleted file mode 100644 index 195e94e..0000000 --- a/libtk205/include/RS0003_factory.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef RS0003_FACTORY_H_ -#define RS0003_FACTORY_H_ - -#include "RS_instance_factory.h" - -namespace ASHRAE205_NS { - - class RS0003_factory : public RS_instance_factory - { - public: - - std::unique_ptr Create_instance() const override; - - private: - static bool s_registered; - }; -} - -#endif \ No newline at end of file diff --git a/libtk205/include/RS0004_factory.h b/libtk205/include/RS0004_factory.h deleted file mode 100644 index 07050e6..0000000 --- a/libtk205/include/RS0004_factory.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef RS0004_FACTORY_H_ -#define RS0004_FACTORY_H_ - -#include "RS_instance_factory.h" - -namespace ASHRAE205_NS { - - class RS0004_factory : public RS_instance_factory - { - public: - - std::unique_ptr Create_instance() const override; - - private: - static bool s_registered; - }; -} - -#endif \ No newline at end of file diff --git a/libtk205/include/RS0005_factory.h b/libtk205/include/RS0005_factory.h deleted file mode 100644 index 206285b..0000000 --- a/libtk205/include/RS0005_factory.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef RS0005_FACTORY_H_ -#define RS0005_FACTORY_H_ - -#include "RS_instance_factory.h" - -namespace ASHRAE205_NS { - - class RS0005_factory : public RS_instance_factory - { - public: - - std::unique_ptr Create_instance() const override; - - private: - static bool s_registered; - }; -} - -#endif \ No newline at end of file diff --git a/libtk205/include/RS0006_factory.h b/libtk205/include/RS0006_factory.h deleted file mode 100644 index 98bef69..0000000 --- a/libtk205/include/RS0006_factory.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef RS0006_FACTORY_H_ -#define RS0006_FACTORY_H_ - -#include "RS_instance_factory.h" - -namespace ASHRAE205_NS { - - class RS0006_factory : public RS_instance_factory - { - public: - - std::unique_ptr Create_instance() const override; - - private: - static bool s_registered; - }; -} - -#endif \ No newline at end of file diff --git a/libtk205/include/performance_map_base.h b/libtk205/include/performance_map_base.h index 9f2dad1..9ddc1cc 100644 --- a/libtk205/include/performance_map_base.h +++ b/libtk205/include/performance_map_base.h @@ -18,26 +18,60 @@ class performance_map_base { performance_map_base(const performance_map_base& other) = default; performance_map_base& operator=(const performance_map_base& other) = default; + // ---------------------------------------------------------------------------------------------- + /// @brief + /// @param j + // ---------------------------------------------------------------------------------------------- virtual void Initialize(const nlohmann::json& j) = 0; + // ---------------------------------------------------------------------------------------------- + /// @brief + /// @param axis TBD + // ---------------------------------------------------------------------------------------------- inline void Add_grid_axis(std::vector& axis) { _grid_axes.emplace_back(Btwxt::GridAxis(axis)); } + // ---------------------------------------------------------------------------------------------- + /// @brief + /// @param axis TBD + // ---------------------------------------------------------------------------------------------- inline void Add_grid_axis(std::vector& axis) { _grid_axes.emplace_back(Btwxt::GridAxis(std::vector(axis.begin(), axis.end()))); } + // ---------------------------------------------------------------------------------------------- + /// @brief + /// @param table TBD + // ---------------------------------------------------------------------------------------------- inline void Add_data_table(std::vector& table) { _btwxt.add_value_table(table); } + // ---------------------------------------------------------------------------------------------- + /// @brief + // ---------------------------------------------------------------------------------------------- inline void Finalize_grid() { auto gd = Btwxt::GriddedData(_grid_axes); _btwxt = Btwxt::RegularGridInterpolator(gd); } - inline void Calculate_performance(std::vector& target); + // ---------------------------------------------------------------------------------------------- + /// @brief + /// @param table_index TBD + // ---------------------------------------------------------------------------------------------- + inline double Calculate_performance(std::size_t table_index) { + return _btwxt.get_value_at_target(table_index); + } + + // ---------------------------------------------------------------------------------------------- + /// @brief Using pre-populated grid axes and lookup tables, calculate a set of performance + /// results. + /// @param target + // ---------------------------------------------------------------------------------------------- + inline std::vector Calculate_performance(const std::vector &target) { + return _btwxt.get_values_at_target(target); + } private: Btwxt::RegularGridInterpolator _btwxt; diff --git a/libtk205/src/RS0001_factory.cpp b/libtk205/src/RS0001_factory.cpp deleted file mode 100755 index 5830075..0000000 --- a/libtk205/src/RS0001_factory.cpp +++ /dev/null @@ -1,12 +0,0 @@ -#include "RS0001_factory.h" -#include "RS0001.h" -#include - -using namespace ASHRAE205_NS; - -bool RS0001_factory::s_registered = RS_instance_factory::Register_factory("RS0001", std::make_shared()); - -std::unique_ptr RS0001_factory::Create_instance() const -{ - return std::make_unique(); -} diff --git a/libtk205/src/RS0002_factory.cpp b/libtk205/src/RS0002_factory.cpp deleted file mode 100755 index 901caff..0000000 --- a/libtk205/src/RS0002_factory.cpp +++ /dev/null @@ -1,12 +0,0 @@ -#include "RS0002_factory.h" -#include "RS0002.h" -#include - -using namespace ASHRAE205_NS; - -bool RS0002_factory::s_registered = RS_instance_factory::Register_factory("RS0002", std::make_shared()); - -std::unique_ptr RS0002_factory::Create_instance() const -{ - return std::make_unique(); -} diff --git a/libtk205/src/RS0003_factory.cpp b/libtk205/src/RS0003_factory.cpp deleted file mode 100755 index 1b19d39..0000000 --- a/libtk205/src/RS0003_factory.cpp +++ /dev/null @@ -1,12 +0,0 @@ -#include "RS0003_factory.h" -#include "RS0003.h" -#include - -using namespace ASHRAE205_NS; - -bool RS0003_factory::s_registered = RS_instance_factory::Register_factory("RS0003", std::make_shared()); - -std::unique_ptr RS0003_factory::Create_instance() const -{ - return std::make_unique(); -} diff --git a/libtk205/src/RS0004_factory.cpp b/libtk205/src/RS0004_factory.cpp deleted file mode 100755 index 73b2cfd..0000000 --- a/libtk205/src/RS0004_factory.cpp +++ /dev/null @@ -1,12 +0,0 @@ -#include "RS0004_factory.h" -#include "RS0004.h" -#include - -using namespace ASHRAE205_NS; - -bool RS0004_factory::s_registered = RS_instance_factory::Register_factory("RS0004", std::make_shared()); - -std::unique_ptr RS0004_factory::Create_instance() const -{ - return std::make_unique(); -} diff --git a/libtk205/src/RS0005_factory.cpp b/libtk205/src/RS0005_factory.cpp deleted file mode 100755 index 79ae20b..0000000 --- a/libtk205/src/RS0005_factory.cpp +++ /dev/null @@ -1,12 +0,0 @@ -#include "RS0005_factory.h" -#include "RS0005.h" -#include - -using namespace ASHRAE205_NS; - -bool RS0005_factory::s_registered = RS_instance_factory::Register_factory("RS0005", std::make_shared()); - -std::unique_ptr RS0005_factory::Create_instance() const -{ - return std::make_unique(); -} diff --git a/libtk205/src/RS0006_factory.cpp b/libtk205/src/RS0006_factory.cpp deleted file mode 100755 index ab27e5f..0000000 --- a/libtk205/src/RS0006_factory.cpp +++ /dev/null @@ -1,12 +0,0 @@ -#include "RS0006_factory.h" -#include "RS0006.h" -#include - -using namespace ASHRAE205_NS; - -bool RS0006_factory::s_registered = RS_instance_factory::Register_factory("RS0006", std::make_shared()); - -std::unique_ptr RS0006_factory::Create_instance() const -{ - return std::make_unique(); -} diff --git a/schema-205 b/schema-205 index 7960820..04080fb 160000 --- a/schema-205 +++ b/schema-205 @@ -1 +1 @@ -Subproject commit 796082079b43fb7e36f1ae029328c5e005df82f9 +Subproject commit 04080fbed90611d36f327c9bde8de394de21c9b6 From 9d7799bf24520b9f916f78d02deadb74691b93db Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Tue, 15 Dec 2020 08:33:23 -0700 Subject: [PATCH 011/154] Re-arrange build process so submodules are built from their owner. --- CMakeLists.txt | 5 - Pipfile.lock | 316 +++++++++++------------------------- libtk205/CMakeLists.txt | 45 +++-- libtk205/include/libtk205.h | 5 +- libtk205/src/libtk205.cpp | 8 +- libtk205/src/load.cpp | 4 +- 6 files changed, 138 insertions(+), 245 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 64ba633..33e640b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,9 +7,4 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) "MinSizeRel" "RelWithDebInfo") endif() -# TODO: 'pipenv run doit' or 'doit' ? -add_custom_target(generate_cpp ALL doit headers - COMMAND doit cpp - WORKING_DIRECTORY "../schema-205") - add_subdirectory(libtk205) diff --git a/Pipfile.lock b/Pipfile.lock index 11639b4..97385a7 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "08cbd3b965ad77c4bcb29a53324840b58acda8f44926eb9ea0426c0de13a9524" + "sha256": "7fe2e1b9e147729101bcb7ed86cfbdfe8017063f40cab83bc4417d66f91a63b2" }, "pipfile-spec": 6, "requires": {}, @@ -16,25 +16,17 @@ "default": { "attrs": { "hashes": [ - "sha256:08a96c641c3a74e44eb59afb61a24f2cb9f4d7188748e76ba4bb5edfa3cb7d1c", - "sha256:f7b7ce16570fe9965acd6d30101a28f62fb4a7f9e926b3bbc9b61f8b04247e72" + "sha256:31b2eced602aa8423c2aea9c76a724617ed67cf9513173fd3a4f03e3a929c7e6", + "sha256:832aa3cde19744e49938b91fea06d69ecb9e649c93ba974535d08ad92164f700" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", - "version": "==19.3.0" + "version": "==20.3.0" }, "cbor2": { "hashes": [ - "sha256:91759bd0ee5ef0d4fa24144dfa551670730baeca8cf2fff1cc59f734ecd21de6" + "sha256:a33aa2e5534fd74401ac95686886e655e3b2ce6383b3f958199b6e70a87c94bf" ], "index": "pypi", - "version": "==5.1.2" - }, - "chardet": { - "hashes": [ - "sha256:84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae", - "sha256:fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691" - ], - "version": "==3.0.4" + "version": "==5.2.0" }, "click": { "hashes": [ @@ -44,28 +36,12 @@ "index": "pypi", "version": "==7.1.2" }, - "dataproperty": { - "hashes": [ - "sha256:1c61f85450a6cffd15faccdeedc28ddd29d9ae95140b583e0aef15feb2c3d54d", - "sha256:70ea253f74a51e39491770ac69428488bed75d62135accb234d89358d220b6ec" - ], - "markers": "python_version >= '3.5'", - "version": "==0.49.1" - }, "et-xmlfile": { "hashes": [ "sha256:614d9722d572f6246302c4491846d2c393c199cfa4edc9af593437691683335b" ], "version": "==1.0.1" }, - "importlib-metadata": { - "hashes": [ - "sha256:90bb658cdbbf6d1735b6341ce708fc7024a3e14e99ffdc5783edea9f9b077f83", - "sha256:dc15b2969b4ce36305c51eebe62d418ac7791e9a157911d58bfb1f9ccd8e2070" - ], - "markers": "python_version < '3.8'", - "version": "==1.7.0" - }, "jdcal": { "hashes": [ "sha256:1abf1305fce18b4e8aa248cf8fe0c56ce2032392bc64bbd61b5dff2a19ec8bba", @@ -73,6 +49,14 @@ ], "version": "==1.4.1" }, + "jinja2": { + "hashes": [ + "sha256:89aab215427ef59c34ad58735269eb58b1a5808103067f7bb9d5836c651b3bb0", + "sha256:f0a4641d3cf955324a89c04f3d94663aa4d638abe8f733ecd3582848e1c37035" + ], + "index": "pypi", + "version": "==2.11.2" + }, "jsonschema": { "hashes": [ "sha256:4e5b3cf8216f577bee9ce139cbe72eca3ea4f292ec60928ff24758ce626cd163", @@ -81,83 +65,70 @@ "index": "pypi", "version": "==3.2.0" }, - "mbstrdecoder": { - "hashes": [ - "sha256:9df7778c0c051c98f6b5a848909202e5cd423c9692665b20d1a9bd0f771b8235", - "sha256:a7cbc188b04937c92129c193a255ec91e8dfd8dd2e7e9bf04b61bc937ac86ad3" - ], - "markers": "python_version >= '3.5'", - "version": "==1.0.0" - }, - "msgfy": { + "markupsafe": { "hashes": [ - "sha256:474c08302cd56ccee1300ac7976a01ebd1e42716fc9bcd947d39a311a15b7012", - "sha256:ce8a8c8c223279fa0a2c0f278eec139fcf761ca4eb98f179f54a1b96f53514f5" + "sha256:00bc623926325b26bb9605ae9eae8a215691f33cae5df11ca5424f06f2d1f473", + "sha256:09027a7803a62ca78792ad89403b1b7a73a01c8cb65909cd876f7fcebd79b161", + "sha256:09c4b7f37d6c648cb13f9230d847adf22f8171b1ccc4d5682398e77f40309235", + "sha256:1027c282dad077d0bae18be6794e6b6b8c91d58ed8a8d89a89d59693b9131db5", + "sha256:13d3144e1e340870b25e7b10b98d779608c02016d5184cfb9927a9f10c689f42", + "sha256:24982cc2533820871eba85ba648cd53d8623687ff11cbb805be4ff7b4c971aff", + "sha256:29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b", + "sha256:43a55c2930bbc139570ac2452adf3d70cdbb3cfe5912c71cdce1c2c6bbd9c5d1", + "sha256:46c99d2de99945ec5cb54f23c8cd5689f6d7177305ebff350a58ce5f8de1669e", + "sha256:500d4957e52ddc3351cabf489e79c91c17f6e0899158447047588650b5e69183", + "sha256:535f6fc4d397c1563d08b88e485c3496cf5784e927af890fb3c3aac7f933ec66", + "sha256:596510de112c685489095da617b5bcbbac7dd6384aeebeda4df6025d0256a81b", + "sha256:62fe6c95e3ec8a7fad637b7f3d372c15ec1caa01ab47926cfdf7a75b40e0eac1", + "sha256:6788b695d50a51edb699cb55e35487e430fa21f1ed838122d722e0ff0ac5ba15", + "sha256:6dd73240d2af64df90aa7c4e7481e23825ea70af4b4922f8ede5b9e35f78a3b1", + "sha256:717ba8fe3ae9cc0006d7c451f0bb265ee07739daf76355d06366154ee68d221e", + "sha256:79855e1c5b8da654cf486b830bd42c06e8780cea587384cf6545b7d9ac013a0b", + "sha256:7c1699dfe0cf8ff607dbdcc1e9b9af1755371f92a68f706051cc8c37d447c905", + "sha256:88e5fcfb52ee7b911e8bb6d6aa2fd21fbecc674eadd44118a9cc3863f938e735", + "sha256:8defac2f2ccd6805ebf65f5eeb132adcf2ab57aa11fdf4c0dd5169a004710e7d", + "sha256:98c7086708b163d425c67c7a91bad6e466bb99d797aa64f965e9d25c12111a5e", + "sha256:9add70b36c5666a2ed02b43b335fe19002ee5235efd4b8a89bfcf9005bebac0d", + "sha256:9bf40443012702a1d2070043cb6291650a0841ece432556f784f004937f0f32c", + "sha256:ade5e387d2ad0d7ebf59146cc00c8044acbd863725f887353a10df825fc8ae21", + "sha256:b00c1de48212e4cc9603895652c5c410df699856a2853135b3967591e4beebc2", + "sha256:b1282f8c00509d99fef04d8ba936b156d419be841854fe901d8ae224c59f0be5", + "sha256:b2051432115498d3562c084a49bba65d97cf251f5a331c64a12ee7e04dacc51b", + "sha256:ba59edeaa2fc6114428f1637ffff42da1e311e29382d81b339c1817d37ec93c6", + "sha256:c8716a48d94b06bb3b2524c2b77e055fb313aeb4ea620c8dd03a105574ba704f", + "sha256:cd5df75523866410809ca100dc9681e301e3c27567cf498077e8551b6d20e42f", + "sha256:cdb132fc825c38e1aeec2c8aa9338310d29d337bebbd7baa06889d09a60a1fa2", + "sha256:e249096428b3ae81b08327a63a485ad0878de3fb939049038579ac0ef61e17e7", + "sha256:e8313f01ba26fbbe36c7be1966a7b7424942f670f38e666995b88d012765b9be" ], - "markers": "python_version >= '3.5'", - "version": "==0.1.0" + "version": "==1.1.1" }, "openpyxl": { "hashes": [ - "sha256:6e62f058d19b09b95d20ebfbfb04857ad08d0833190516c1660675f699c6186f", - "sha256:d88dd1480668019684c66cfff3e52a5de4ed41e9df5dd52e008cbf27af0dbf87" + "sha256:18e11f9a650128a12580a58e3daba14e00a11d9e907c554a17ea016bf1a2c71b", + "sha256:f7d666b569f729257082cf7ddc56262431878f602dcc2bc3980775c59439cdab" ], "index": "pypi", - "version": "==3.0.4" - }, - "pathvalidate": { - "hashes": [ - "sha256:1697c8ea71ff4c48e7aa0eda72fe4581404be8f41e51a17363ef682dd6824d35", - "sha256:32d30dbacb711c16bb188b12ce7e9a46b41785f50a12f64500f747480a4b6ee3" - ], - "markers": "python_version >= '3.5'", - "version": "==2.3.0" - }, - "pbr": { - "hashes": [ - "sha256:07f558fece33b05caf857474a366dfcc00562bca13dd8b47b2b3e22d9f9bf55c", - "sha256:579170e23f8e0c2f24b0de612f71f648eccb79fb1322c814ae6b3c07b5ba23e8" - ], - "version": "==5.4.5" + "version": "==3.0.5" }, "pyrsistent": { "hashes": [ - "sha256:28669905fe725965daa16184933676547c5bb40a5153055a8dee2a4bd7933ad3" + "sha256:2e636185d9eb976a18a8a8e96efce62f2905fea90041958d8cc2a189756ebf3e" ], - "version": "==0.16.0" - }, - "pytablewriter": { - "hashes": [ - "sha256:61073974ce5fe1cbd5d9f529e18df44b01ba135da4b379a52865ce7eb5af97c6", - "sha256:a9144e3d7663849926fd109d411e7e1b708362ccabe5951813ad0e20a15cfcef" - ], - "markers": "python_version >= '3.5'", - "version": "==0.55.0" - }, - "python-dateutil": { - "hashes": [ - "sha256:73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c", - "sha256:75bb3f31ea686f1197762692a9ee6a7550b59fc6ca3a1f4b5d7e32fb98e2da2a" - ], - "version": "==2.8.1" - }, - "pytz": { - "hashes": [ - "sha256:a494d53b6d39c3c6e44c3bec237336e14305e4f29bbf800b599253057fbb79ed", - "sha256:c35965d010ce31b23eeb663ed3cc8c906275d6be1a34393a1d73a41febf4a048" - ], - "version": "==2020.1" + "version": "==0.17.3" }, "pyyaml": { "hashes": [ "sha256:06a0d7ba600ce0b2d2fe2e78453a470b5a6e000a985dd4a4e54e436cc36b0e97", "sha256:240097ff019d7c70a4922b6869d8a86407758333f02203e0fc6ff79c5dcede76", "sha256:4f4b913ca1a7319b33cfb1369e91e50354d6f07a135f3b901aca02aa95940bd2", + "sha256:6034f55dab5fea9e53f436aa68fa3ace2634918e8b5994d82f3621c04ff5ed2e", "sha256:69f00dca373f240f842b2931fb2c7e14ddbacd1397d57157a9b005a6a9942648", "sha256:73f099454b799e05e5ab51423c7bcf361c58d3206fa7b0d555426b1f4d9a3eaf", "sha256:74809a57b329d6cc0fdccee6318f44b9b8649961fa73144a98735b0aaf029f1f", "sha256:7739fc0fa8205b3ee8808aea45e968bc90082c10aef6ea95e855e10abf4a37b2", "sha256:95f71d2af0ff4227885f7a6605c37fd53d3a106fcab511b8860ecca9fcf400ee", + "sha256:ad9c67312c84def58f3c04504727ca879cb0013b2517c85a9a253f0cb6380c0a", "sha256:b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d", "sha256:cc8955cfbfc7a115fa81d85284ee61147059a753344bc51098f3ccd69b0d7e0c", "sha256:d13155f591e6fcc1ec3b30685d50bf0711574e2c0dfffd7644babf8b5102ca1a" @@ -167,54 +138,18 @@ }, "schema205": { "editable": true, - "path": "./schema-205" + "path": "schema-205" }, "six": { "hashes": [ "sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259", "sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==1.15.0" }, - "tabledata": { - "hashes": [ - "sha256:7d2019de87fd5da2f45f4e36fd2dd9da326dd3c3a3191b7b5bdb65a477b29dd5", - "sha256:db893596ab9066e5c4f002ae0fed70657e3b75cceb52dd1de5a0e145e338d830" - ], - "markers": "python_version >= '3.5'", - "version": "==1.1.2" - }, - "tcolorpy": { - "hashes": [ - "sha256:6215a0db797c7520a7ac7833da91595ddd30b6743314096fe6c890d1b91ac228", - "sha256:aeed3bed7faac29a6529be7e0e0ad77ac68d8353e9a03ca18ffd2ea1d9e1d6df" - ], - "markers": "python_version >= '3.5'", - "version": "==0.0.5" - }, "tk205": { "editable": true, "path": "." - }, - "typepy": { - "extras": [ - "datetime" - ], - "hashes": [ - "sha256:418e24c44cf5fc260c2e2bbc68a3d0bc8c43f488412663c7ce1f33efa5133323", - "sha256:a0850559dfd135577c6d565c0268fcad1327cab9c4c295015d4d882aa9a24786" - ], - "markers": "python_version >= '3.5'", - "version": "==1.1.1" - }, - "zipp": { - "hashes": [ - "sha256:aa36550ff0c0b7ef7fa639055d797116ee891440eac1a56f378e2d3179e0320b", - "sha256:c599e4d75c98f6798c509911d08a22e6c021d074469042177c8c86fb92eefd96" - ], - "markers": "python_version >= '3.6'", - "version": "==3.1.0" } }, "develop": { @@ -223,7 +158,6 @@ "sha256:2f4078c2a41bf377eea06d71c9d2ba4eb8f6b1af2135bec27bbbb7d8f12bb703", "sha256:bc58d83eb610252fd8de6363e39d4f1d0619c894b0ed24603b881c02e64c7386" ], - "markers": "python_version >= '3.5'", "version": "==2.4.2" }, "atomicwrites": { @@ -236,64 +170,54 @@ }, "attrs": { "hashes": [ - "sha256:08a96c641c3a74e44eb59afb61a24f2cb9f4d7188748e76ba4bb5edfa3cb7d1c", - "sha256:f7b7ce16570fe9965acd6d30101a28f62fb4a7f9e926b3bbc9b61f8b04247e72" + "sha256:31b2eced602aa8423c2aea9c76a724617ed67cf9513173fd3a4f03e3a929c7e6", + "sha256:832aa3cde19744e49938b91fea06d69ecb9e649c93ba974535d08ad92164f700" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", - "version": "==19.3.0" + "version": "==20.3.0" }, "cloudpickle": { "hashes": [ - "sha256:820c9245cebdec7257211cbe88745101d5d6a042bca11336d78ebd4897ddbc82", - "sha256:994d503de22399a8a09091b091e3850509144ede72977ac475f323096eb72936" + "sha256:3a32d0eb0bc6f4d0c57fbc4f3e3780f7a81e6fee0fa935072884d58ae8e1cc7c", + "sha256:9bc994f9e9447593bd0a45371f0e7ac7333710fcf64a4eb9834bf149f4ef2f32" ], - "markers": "python_version >= '3.5'", - "version": "==1.5.0" + "version": "==1.6.0" }, "doit": { "hashes": [ - "sha256:323d0411e50a0babb945e2a639aa6e633fbb84a9f98086df0c880e739237750c" + "sha256:211fc0de3fd9ee31e5c4ccb36bc1a4054b5c4a4a44f915ca413896155b684bfa", + "sha256:37c3b35c2151647b968b2af24481112b2f813c30f695366db0639d529190a143" ], "index": "pypi", - "version": "==0.32.0" + "version": "==0.33.1" }, "gitdb": { "hashes": [ "sha256:91f36bfb1ab7949b3b40e23736db18231bf7593edada2ba5c3a174a7b23657ac", "sha256:c9e1f2d0db7ddb9a704c2a0217be31214e91a4fe1dea1efad19ae42ba0c285c9" ], - "markers": "python_version >= '3.4'", "version": "==4.0.5" }, "gitpython": { "hashes": [ - "sha256:2db287d71a284e22e5c2846042d0602465c7434d910406990d5b74df4afb0858", - "sha256:fa3b92da728a457dd75d62bb5f3eb2816d99a7fe6c67398e260637a40e3fafb5" + "sha256:6eea89b655917b500437e9668e4a12eabdcf00229a0df1762aabd692ef9b746b", + "sha256:befa4d101f91bad1b632df4308ec64555db684c360bd7d2130b4807d49ce86b8" ], "index": "pypi", - "version": "==3.1.7" - }, - "importlib-metadata": { - "hashes": [ - "sha256:90bb658cdbbf6d1735b6341ce708fc7024a3e14e99ffdc5783edea9f9b077f83", - "sha256:dc15b2969b4ce36305c51eebe62d418ac7791e9a157911d58bfb1f9ccd8e2070" - ], - "markers": "python_version < '3.8'", - "version": "==1.7.0" + "version": "==3.1.11" }, "iniconfig": { "hashes": [ - "sha256:aa0b40f50a00e72323cb5d41302f9c6165728fd764ac8822aa3fff00a40d56b4" + "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3", + "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32" ], - "version": "==1.0.0" + "version": "==1.1.1" }, "isort": { "hashes": [ - "sha256:54da7e92468955c4fceacd0c86bd0ec997b0e1ee80d97f67c35a78b719dccab1", - "sha256:6e811fcb295968434526407adb8796944f1988c5b65e8139058f2014cbe100fd" + "sha256:dcab1d98b469a12a1a624ead220584391648790275560e1a43e54c5dceae65e7", + "sha256:dcaeec1b5f0eca77faea2a35ab790b4f3680ff75590bfcb7145986905aab2f58" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", - "version": "==4.3.21" + "version": "==5.6.4" }, "jinja2": { "hashes": [ @@ -327,16 +251,22 @@ "sha256:efa1909120ce98bbb3777e8b6f92237f5d5c8ea6758efea36a473e1d38f7d3e4", "sha256:f3900e8a5de27447acbf900b4750b0ddfd7ec1ea7fbaf11dfa911141bc522af0" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==1.4.3" }, + "macfsevents": { + "hashes": [ + "sha256:1324b66b356051de662ba87d84f73ada062acd42b047ed1246e60a449f833e10" + ], + "markers": "sys_platform == 'darwin'", + "version": "==0.8.1" + }, "markdown": { "hashes": [ - "sha256:1fafe3f1ecabfb514a5285fca634a53c1b32a81cb0feb154264d55bf2ff22c17", - "sha256:c467cd6233885534bf0fe96e62e3cf46cfc1605112356c4f9981512b8174de59" + "sha256:5d9f2b5ca24bc4c7a390d22323ca4bad200368612b5aaa7796babf971d2b2f18", + "sha256:c109c15b7dc20a9ac454c9e6025927d44460b85bd039da028d85e2b6d0bcc328" ], "index": "pypi", - "version": "==3.2.2" + "version": "==3.3.3" }, "markupsafe": { "hashes": [ @@ -374,7 +304,6 @@ "sha256:e249096428b3ae81b08327a63a485ad0878de3fb939049038579ac0ef61e17e7", "sha256:e8313f01ba26fbbe36c7be1966a7b7424942f670f38e666995b88d012765b9be" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==1.1.1" }, "mccabe": { @@ -384,28 +313,18 @@ ], "version": "==0.6.1" }, - "more-itertools": { - "hashes": [ - "sha256:68c70cc7167bdf5c7c9d8f6954a7837089c6a36bf565383919bb595efb8a17e5", - "sha256:b78134b2063dd214000685165d81c154522c3ee0a1c0d4d113c80361c234c5a2" - ], - "markers": "python_version >= '3.5'", - "version": "==8.4.0" - }, "packaging": { "hashes": [ - "sha256:4357f74f47b9c12db93624a82154e9b120fa8293699949152b22065d556079f8", - "sha256:998416ba6962ae7fbd6596850b80e17859a5753ba17c32284f67bfff33784181" + "sha256:05af3bb85d320377db281cf254ab050e1a7ebcbf5410685a9a407e18a1f81236", + "sha256:eb41423378682dadb7166144a4926e443093863024de508ca5c9737d6bc08376" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", - "version": "==20.4" + "version": "==20.7" }, "pluggy": { "hashes": [ "sha256:15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0", "sha256:966c145cd83c96502c3c3868f50408687b38434af77734af1e9ca461a4081d2d" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==0.13.1" }, "py": { @@ -413,39 +332,36 @@ "sha256:366389d1db726cd2fcfc79732e75410e5fe4d31db13692115529d34069a043c2", "sha256:9ca6883ce56b4e8da7e79ac18787889fa5206c79dcc67fb065376cd2fe03f342" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==1.9.0" }, "pylint": { "hashes": [ - "sha256:7dd78437f2d8d019717dbf287772d0b2dbdfd13fc016aa7faa08d67bccc46adc", - "sha256:d0ece7d223fe422088b0e8f13fa0a1e8eb745ebffcb8ed53d3e95394b6101a1c" + "sha256:bb4a908c9dadbc3aac18860550e870f58e1a02c9f2c204fdf5693d73be061210", + "sha256:bfe68f020f8a0fece830a22dd4d5dddb4ecc6137db04face4c3420a46a52239f" ], "index": "pypi", - "version": "==2.5.3" + "version": "==2.6.0" }, "pyparsing": { "hashes": [ "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1", "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b" ], - "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==2.4.7" }, "pytest": { "hashes": [ - "sha256:85228d75db9f45e06e57ef9bf4429267f81ac7c0d742cc9ed63d09886a9fe6f4", - "sha256:8b6007800c53fdacd5a5c192203f4e531eb2a1540ad9c752e052ec0f7143dbad" + "sha256:4288fed0d9153d9646bfcdf0c0428197dba1ecb27a33bb6e031d002fa88653fe", + "sha256:c0a7e94a8cdbc5422a51ccdad8e6f1024795939cc89159a0ae7f0b316ad3823e" ], "index": "pypi", - "version": "==6.0.1" + "version": "==6.1.2" }, "six": { "hashes": [ "sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259", "sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==1.15.0" }, "smmap": { @@ -453,56 +369,20 @@ "sha256:54c44c197c819d5ef1991799a7e30b662d1e520f2ac75c9efbeb54a742214cf4", "sha256:9c98bbd1f9786d22f14b3d4126894d56befb835ec90cef151af566c7e19b5d24" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==3.0.4" }, "toml": { "hashes": [ - "sha256:926b612be1e5ce0634a2ca03470f95169cf16f939018233a670519cb4ac58b0f", - "sha256:bda89d5935c2eac546d648028b9901107a595863cb36bae0c73ac804a9b4ce88" - ], - "version": "==0.10.1" - }, - "typed-ast": { - "hashes": [ - "sha256:0666aa36131496aed8f7be0410ff974562ab7eeac11ef351def9ea6fa28f6355", - "sha256:0c2c07682d61a629b68433afb159376e24e5b2fd4641d35424e462169c0a7919", - "sha256:249862707802d40f7f29f6e1aad8d84b5aa9e44552d2cc17384b209f091276aa", - "sha256:24995c843eb0ad11a4527b026b4dde3da70e1f2d8806c99b7b4a7cf491612652", - "sha256:269151951236b0f9a6f04015a9004084a5ab0d5f19b57de779f908621e7d8b75", - "sha256:4083861b0aa07990b619bd7ddc365eb7fa4b817e99cf5f8d9cf21a42780f6e01", - "sha256:498b0f36cc7054c1fead3d7fc59d2150f4d5c6c56ba7fb150c013fbc683a8d2d", - "sha256:4e3e5da80ccbebfff202a67bf900d081906c358ccc3d5e3c8aea42fdfdfd51c1", - "sha256:6daac9731f172c2a22ade6ed0c00197ee7cc1221aa84cfdf9c31defeb059a907", - "sha256:715ff2f2df46121071622063fc7543d9b1fd19ebfc4f5c8895af64a77a8c852c", - "sha256:73d785a950fc82dd2a25897d525d003f6378d1cb23ab305578394694202a58c3", - "sha256:8c8aaad94455178e3187ab22c8b01a3837f8ee50e09cf31f1ba129eb293ec30b", - "sha256:8ce678dbaf790dbdb3eba24056d5364fb45944f33553dd5869b7580cdbb83614", - "sha256:aaee9905aee35ba5905cfb3c62f3e83b3bec7b39413f0a7f19be4e547ea01ebb", - "sha256:bcd3b13b56ea479b3650b82cabd6b5343a625b0ced5429e4ccad28a8973f301b", - "sha256:c9e348e02e4d2b4a8b2eedb48210430658df6951fa484e59de33ff773fbd4b41", - "sha256:d205b1b46085271b4e15f670058ce182bd1199e56b317bf2ec004b6a44f911f6", - "sha256:d43943ef777f9a1c42bf4e552ba23ac77a6351de620aa9acf64ad54933ad4d34", - "sha256:d5d33e9e7af3b34a40dc05f498939f0ebf187f07c385fd58d591c533ad8562fe", - "sha256:fc0fea399acb12edbf8a628ba8d2312f583bdbdb3335635db062fa98cf71fca4", - "sha256:fe460b922ec15dd205595c9b5b99e2f056fd98ae8f9f56b888e7a17dc2b757e7" - ], - "markers": "python_version < '3.8' and implementation_name == 'cpython'", - "version": "==1.4.1" + "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b", + "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f" + ], + "version": "==0.10.2" }, "wrapt": { "hashes": [ "sha256:b62ffa81fb85f4332a4f609cab4ac40709470da05643a082ec1eb88e6d9b97d7" ], "version": "==1.12.1" - }, - "zipp": { - "hashes": [ - "sha256:aa36550ff0c0b7ef7fa639055d797116ee891440eac1a56f378e2d3179e0320b", - "sha256:c599e4d75c98f6798c509911d08a22e6c021d074469042177c8c86fb92eefd96" - ], - "markers": "python_version >= '3.6'", - "version": "==3.1.0" } } } diff --git a/libtk205/CMakeLists.txt b/libtk205/CMakeLists.txt index 615a9a3..56522c7 100644 --- a/libtk205/CMakeLists.txt +++ b/libtk205/CMakeLists.txt @@ -7,7 +7,6 @@ include(CTest) enable_testing() set(JSON_BuildTests OFF CACHE INTERNAL "") - include_directories(vendor/btwxt/src) include_directories(vendor/json/single_include) include_directories(vendor/json/include) @@ -16,27 +15,43 @@ include_directories(include) add_subdirectory(vendor/btwxt) -list(APPEND Factory_SOURCES "./src/RS_instance_factory.cpp" - "./src/build/cpp/RS0001_factory.cpp" - "./src/build/cpp/RS0002_factory.cpp" - "./src/build/cpp/RS0003_factory.cpp" - "./src/build/cpp/RS0004_factory.cpp" - "./src/build/cpp/RS0005_factory.cpp" - "./src/build/cpp/RS0006_factory.cpp" +list(APPEND Factory_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/RS_instance_factory.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/src/build/cpp/RS0001_factory.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/src/build/cpp/RS0002_factory.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/src/build/cpp/RS0003_factory.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/src/build/cpp/RS0004_factory.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/src/build/cpp/RS0005_factory.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/src/build/cpp/RS0006_factory.cpp" ) -list(APPEND RS_SOURCES "./src/build/cpp/ASHRAE205.cpp" - "./src/build/cpp/RS0001.cpp" - "./src/build/cpp/RS0002.cpp" - "./src/build/cpp/RS0003.cpp" - "./src/build/cpp/RS0004.cpp" - "./src/build/cpp/RS0005.cpp" - "./src/build/cpp/RS0006.cpp" +list(APPEND RS_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/build/cpp/ASHRAE205.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/src/build/cpp/RS0001.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/src/build/cpp/RS0002.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/src/build/cpp/RS0003.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/src/build/cpp/RS0004.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/src/build/cpp/RS0005.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/src/build/cpp/RS0006.cpp" ) +add_custom_target(generate_cpp ALL + COMMAND pipenv run doit headers + COMMAND pipenv run doit cpp + WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../schema-205") + +# copy_directory will create the destination if it does not exist +add_custom_target(copy_generated_source ALL + COMMAND cmake -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/../schema-205/build/include" "${CMAKE_CURRENT_SOURCE_DIR}/src/build/include" + COMMAND cmake -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/../schema-205/build/cpp" "${CMAKE_CURRENT_SOURCE_DIR}/src/build/cpp" + COMMAND cmake -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/../schema-205/schema205/src" "${CMAKE_CURRENT_SOURCE_DIR}/include") + set (SOURCES ${Factory_SOURCES} ${RS_SOURCES}) +# The GENERATED property prevents the source files being used before they exist. +set_source_files_properties(${SOURCES} PROPERTIES GENERATED TRUE) add_library(libtk205 src/libtk205.cpp ${SOURCES}) target_link_libraries(libtk205 btwxt) +add_dependencies(libtk205 copy_generated_source) +add_dependencies(copy_generated_source generate_cpp) + add_executable(libtktest src/load.cpp) target_link_libraries(libtktest libtk205) diff --git a/libtk205/include/libtk205.h b/libtk205/include/libtk205.h index 7961ac4..80dc9cb 100644 --- a/libtk205/include/libtk205.h +++ b/libtk205/include/libtk205.h @@ -13,6 +13,9 @@ namespace libtk205_NS { + enum class msg_severity { DEBUG, INFO, WARN, ERR }; + void Set_error_handler(std::function handler); + class A205_SDK { public: @@ -21,7 +24,7 @@ namespace libtk205_NS { ASHRAE205_NS::ASHRAE205 Load_A205(const char* input_file); const ASHRAE205_NS::RS0001_NS::RS0001* Get_RS0001(const ASHRAE205_NS::ASHRAE205& a205); const ASHRAE205_NS::RS0002_NS::RS0002* Get_RS0002(const ASHRAE205_NS::ASHRAE205& a205); - //const ASHRAE205_NS::RS0003_NS::RS0003* Get_RS0003(const ASHRAE205_NS::ASHRAE205& a205); + const ASHRAE205_NS::RS0003_NS::RS0003* Get_RS0003(const ASHRAE205_NS::ASHRAE205& a205); const ASHRAE205_NS::RS0004_NS::RS0004* Get_RS0004(const ASHRAE205_NS::ASHRAE205& a205); const ASHRAE205_NS::RS0005_NS::RS0005* Get_RS0005(const ASHRAE205_NS::ASHRAE205& a205); const ASHRAE205_NS::RS0006_NS::RS0006* Get_RS0006(const ASHRAE205_NS::ASHRAE205& a205); diff --git a/libtk205/src/libtk205.cpp b/libtk205/src/libtk205.cpp index 2d7ba2f..6c85caf 100644 --- a/libtk205/src/libtk205.cpp +++ b/libtk205/src/libtk205.cpp @@ -63,10 +63,10 @@ namespace libtk205_NS { return dynamic_cast(a205.RS_instance.get()); } - // const RS0003_NS::RS0003* A205_SDK::Get_RS0003(const ASHRAE205& a205) - // { - // return dynamic_cast(a205.RS_instance.get()); - // } + const RS0003_NS::RS0003* A205_SDK::Get_RS0003(const ASHRAE205& a205) + { + return dynamic_cast(a205.RS_instance.get()); + } const RS0004_NS::RS0004* A205_SDK::Get_RS0004(const ASHRAE205& a205) { diff --git a/libtk205/src/load.cpp b/libtk205/src/load.cpp index 8e1d65c..e265827 100755 --- a/libtk205/src/load.cpp +++ b/libtk205/src/load.cpp @@ -5,7 +5,7 @@ #include "libtk205.h" #include "RS_instance_factory.h" -#include "RS0003_factory.h" +//#include "RS0003_factory.h" using json = nlohmann::json; @@ -13,7 +13,7 @@ int main(int argc, char* argv[]) { using namespace ASHRAE205_NS; - RS_instance_factory::Register_factory("RS0003", std::make_shared()); + //RS_instance_factory::Register_factory("RS0003", std::make_shared()); if (argc > 1) { From 105a86ac7611bbca4d4cc572ddeec08e77fbd8c9 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Tue, 15 Dec 2020 08:46:11 -0700 Subject: [PATCH 012/154] Update schema-205 sha. --- schema-205 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema-205 b/schema-205 index 04080fb..4448f23 160000 --- a/schema-205 +++ b/schema-205 @@ -1 +1 @@ -Subproject commit 04080fbed90611d36f327c9bde8de394de21c9b6 +Subproject commit 4448f23383e350d625f4188ee453058cf59fd459 From 25fbc0ce1c812f691ae725157e4e445693443502 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Mon, 21 Dec 2020 07:51:05 -0700 Subject: [PATCH 013/154] Add dependency yaml to submodule. --- schema-205 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema-205 b/schema-205 index 4448f23..7990a52 160000 --- a/schema-205 +++ b/schema-205 @@ -1 +1 @@ -Subproject commit 4448f23383e350d625f4188ee453058cf59fd459 +Subproject commit 7990a520dd02824abc643c07c8d1a2310fbeac99 From a7bccf836243d367d026bd2f93ef499cf57d620a Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Wed, 23 Dec 2020 13:45:34 -0700 Subject: [PATCH 014/154] Regenerate dependency graph with explicit dependencies in [packages]. --- Pipfile | 2 +- Pipfile.lock | 147 +++++++++++++++++++++++++++++++-------------------- 2 files changed, 92 insertions(+), 57 deletions(-) diff --git a/Pipfile b/Pipfile index 82824a1..3f0f50e 100644 --- a/Pipfile +++ b/Pipfile @@ -7,7 +7,6 @@ verify_ssl = true pylint = "*" pytest = "*" atomicwrites = "*" -Jinja2 = "*" markdown = "*" doit = "*" gitpython = "*" @@ -19,5 +18,6 @@ cbor2 = "*" openpyxl = "*" pyyaml = "*" jinja2 = "*" +pytablewriter = "*" tk205 = {editable = true,path = "."} schema205 = {editable = true,path = "schema-205"} diff --git a/Pipfile.lock b/Pipfile.lock index 97385a7..3285e5b 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "7fe2e1b9e147729101bcb7ed86cfbdfe8017063f40cab83bc4417d66f91a63b2" + "sha256": "429a15573020c5a86708fbc709795b9bf8f5c125400d7c2e626125c89801a078" }, "pipfile-spec": 6, "requires": {}, @@ -28,6 +28,13 @@ "index": "pypi", "version": "==5.2.0" }, + "chardet": { + "hashes": [ + "sha256:0d6f53a15db4120f2b08c94f11e7d93d2c911ee118b6b30a04ec3ee8310179fa", + "sha256:f864054d66fd9118f2e67044ac8981a54775ec5b67aed0441892edb553d21da5" + ], + "version": "==4.0.0" + }, "click": { "hashes": [ "sha256:d2b5255c7c6349bc1bd1e59e08cd12acbbd63ce649f2588755783aa94dfb6b1a", @@ -36,6 +43,13 @@ "index": "pypi", "version": "==7.1.2" }, + "dataproperty": { + "hashes": [ + "sha256:847f2d8927d8426a0eb20e48238e2db19133506bcd1e2608e21314004fa80d72", + "sha256:9288b74f5d6e07d4c69c218802556f877d711fce2c62abc6aea286b357e84be2" + ], + "version": "==0.50.0" + }, "et-xmlfile": { "hashes": [ "sha256:614d9722d572f6246302c4491846d2c393c199cfa4edc9af593437691683335b" @@ -103,6 +117,20 @@ ], "version": "==1.1.1" }, + "mbstrdecoder": { + "hashes": [ + "sha256:56b967800d6554815a6b18f98f915e84912852eff21d94d5e036fe124bc27f53", + "sha256:f895e1fb97496855ab5e43de99588787169c01f782c71625142d1a62729e9f9d" + ], + "version": "==1.0.1" + }, + "msgfy": { + "hashes": [ + "sha256:474c08302cd56ccee1300ac7976a01ebd1e42716fc9bcd947d39a311a15b7012", + "sha256:ce8a8c8c223279fa0a2c0f278eec139fcf761ca4eb98f179f54a1b96f53514f5" + ], + "version": "==0.1.0" + }, "openpyxl": { "hashes": [ "sha256:18e11f9a650128a12580a58e3daba14e00a11d9e907c554a17ea016bf1a2c71b", @@ -111,12 +139,41 @@ "index": "pypi", "version": "==3.0.5" }, + "pathvalidate": { + "hashes": [ + "sha256:1be91f23dd1fb5002ad2b52cb4e7396deb56092ef29a7facb6e4032c5a444f8a", + "sha256:4a84300ec54e00db7bbfbbd65b8f138c44340fac1850d7731228d3b9d6bfa4c5" + ], + "version": "==2.3.1" + }, "pyrsistent": { "hashes": [ "sha256:2e636185d9eb976a18a8a8e96efce62f2905fea90041958d8cc2a189756ebf3e" ], "version": "==0.17.3" }, + "pytablewriter": { + "hashes": [ + "sha256:763fb7717b64320188b2f55c5667f9f03c6fef3b00ac0aaafa85b6b6f2741b36", + "sha256:d232491e32fc84f28a6217fcd225d2ed82ae59d576d39724c98fdb7c7147b9ec" + ], + "index": "pypi", + "version": "==0.58.0" + }, + "python-dateutil": { + "hashes": [ + "sha256:73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c", + "sha256:75bb3f31ea686f1197762692a9ee6a7550b59fc6ca3a1f4b5d7e32fb98e2da2a" + ], + "version": "==2.8.1" + }, + "pytz": { + "hashes": [ + "sha256:3e6b7dd2d1e0a59084bcee14a17af60c5c562cdc16d828e8eba2e683d3a7e268", + "sha256:5c55e189b682d420be27c6995ba6edce0c0a77dd67bfbe2ae6607134d5851ffd" + ], + "version": "==2020.4" + }, "pyyaml": { "hashes": [ "sha256:06a0d7ba600ce0b2d2fe2e78453a470b5a6e000a985dd4a4e54e436cc36b0e97", @@ -147,9 +204,33 @@ ], "version": "==1.15.0" }, + "tabledata": { + "hashes": [ + "sha256:59cc3b5f0c52ea142386b0653d3d48d2e976fe021154871982b4d234b82be747", + "sha256:fa4c2db55cbb198ca5e21063ae743f418d3efbba94cd4844d2f759f994df76a2" + ], + "version": "==1.1.3" + }, + "tcolorpy": { + "hashes": [ + "sha256:12b5c928572781fc7e5df5629da6342a65ec7d35efb64b5824c105b8debaaac7", + "sha256:ffbe886f1321dab88d9cfd4218ea8d93d50d6ad0875c3741dd75fe1437379406" + ], + "version": "==0.0.8" + }, "tk205": { "editable": true, "path": "." + }, + "typepy": { + "extras": [ + "datetime" + ], + "hashes": [ + "sha256:30b4d955bc8b628e7ae39bf6f07e2a07939def893b84d7a6cd10ba49c5646717", + "sha256:afec7feeac73d6b01fe6b23314edc17eaf8469f93783d2460c229068ae9dc588" + ], + "version": "==1.1.2" } }, "develop": { @@ -219,14 +300,6 @@ ], "version": "==5.6.4" }, - "jinja2": { - "hashes": [ - "sha256:89aab215427ef59c34ad58735269eb58b1a5808103067f7bb9d5836c651b3bb0", - "sha256:f0a4641d3cf955324a89c04f3d94663aa4d638abe8f733ecd3582848e1c37035" - ], - "index": "pypi", - "version": "==2.11.2" - }, "lazy-object-proxy": { "hashes": [ "sha256:0c4b206227a8097f05c4dbdd323c50edf81f15db3b8dc064d08c62d37e1a504d", @@ -268,44 +341,6 @@ "index": "pypi", "version": "==3.3.3" }, - "markupsafe": { - "hashes": [ - "sha256:00bc623926325b26bb9605ae9eae8a215691f33cae5df11ca5424f06f2d1f473", - "sha256:09027a7803a62ca78792ad89403b1b7a73a01c8cb65909cd876f7fcebd79b161", - "sha256:09c4b7f37d6c648cb13f9230d847adf22f8171b1ccc4d5682398e77f40309235", - "sha256:1027c282dad077d0bae18be6794e6b6b8c91d58ed8a8d89a89d59693b9131db5", - "sha256:13d3144e1e340870b25e7b10b98d779608c02016d5184cfb9927a9f10c689f42", - "sha256:24982cc2533820871eba85ba648cd53d8623687ff11cbb805be4ff7b4c971aff", - "sha256:29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b", - "sha256:43a55c2930bbc139570ac2452adf3d70cdbb3cfe5912c71cdce1c2c6bbd9c5d1", - "sha256:46c99d2de99945ec5cb54f23c8cd5689f6d7177305ebff350a58ce5f8de1669e", - "sha256:500d4957e52ddc3351cabf489e79c91c17f6e0899158447047588650b5e69183", - "sha256:535f6fc4d397c1563d08b88e485c3496cf5784e927af890fb3c3aac7f933ec66", - "sha256:596510de112c685489095da617b5bcbbac7dd6384aeebeda4df6025d0256a81b", - "sha256:62fe6c95e3ec8a7fad637b7f3d372c15ec1caa01ab47926cfdf7a75b40e0eac1", - "sha256:6788b695d50a51edb699cb55e35487e430fa21f1ed838122d722e0ff0ac5ba15", - "sha256:6dd73240d2af64df90aa7c4e7481e23825ea70af4b4922f8ede5b9e35f78a3b1", - "sha256:717ba8fe3ae9cc0006d7c451f0bb265ee07739daf76355d06366154ee68d221e", - "sha256:79855e1c5b8da654cf486b830bd42c06e8780cea587384cf6545b7d9ac013a0b", - "sha256:7c1699dfe0cf8ff607dbdcc1e9b9af1755371f92a68f706051cc8c37d447c905", - "sha256:88e5fcfb52ee7b911e8bb6d6aa2fd21fbecc674eadd44118a9cc3863f938e735", - "sha256:8defac2f2ccd6805ebf65f5eeb132adcf2ab57aa11fdf4c0dd5169a004710e7d", - "sha256:98c7086708b163d425c67c7a91bad6e466bb99d797aa64f965e9d25c12111a5e", - "sha256:9add70b36c5666a2ed02b43b335fe19002ee5235efd4b8a89bfcf9005bebac0d", - "sha256:9bf40443012702a1d2070043cb6291650a0841ece432556f784f004937f0f32c", - "sha256:ade5e387d2ad0d7ebf59146cc00c8044acbd863725f887353a10df825fc8ae21", - "sha256:b00c1de48212e4cc9603895652c5c410df699856a2853135b3967591e4beebc2", - "sha256:b1282f8c00509d99fef04d8ba936b156d419be841854fe901d8ae224c59f0be5", - "sha256:b2051432115498d3562c084a49bba65d97cf251f5a331c64a12ee7e04dacc51b", - "sha256:ba59edeaa2fc6114428f1637ffff42da1e311e29382d81b339c1817d37ec93c6", - "sha256:c8716a48d94b06bb3b2524c2b77e055fb313aeb4ea620c8dd03a105574ba704f", - "sha256:cd5df75523866410809ca100dc9681e301e3c27567cf498077e8551b6d20e42f", - "sha256:cdb132fc825c38e1aeec2c8aa9338310d29d337bebbd7baa06889d09a60a1fa2", - "sha256:e249096428b3ae81b08327a63a485ad0878de3fb939049038579ac0ef61e17e7", - "sha256:e8313f01ba26fbbe36c7be1966a7b7424942f670f38e666995b88d012765b9be" - ], - "version": "==1.1.1" - }, "mccabe": { "hashes": [ "sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42", @@ -315,10 +350,10 @@ }, "packaging": { "hashes": [ - "sha256:05af3bb85d320377db281cf254ab050e1a7ebcbf5410685a9a407e18a1f81236", - "sha256:eb41423378682dadb7166144a4926e443093863024de508ca5c9737d6bc08376" + "sha256:24e0da08660a87484d1602c30bb4902d74816b6985b93de36926f5bc95741858", + "sha256:78598185a7008a470d64526a8059de9aaa449238f280fc9eb6b13ba6c4109093" ], - "version": "==20.7" + "version": "==20.8" }, "pluggy": { "hashes": [ @@ -329,10 +364,10 @@ }, "py": { "hashes": [ - "sha256:366389d1db726cd2fcfc79732e75410e5fe4d31db13692115529d34069a043c2", - "sha256:9ca6883ce56b4e8da7e79ac18787889fa5206c79dcc67fb065376cd2fe03f342" + "sha256:21b81bda15b66ef5e1a777a21c4dcd9c20ad3efd0b3f817e7a809035269e1bd3", + "sha256:3b80836aa6d1feeaa108e046da6423ab8f6ceda6468545ae8d02d9d58d18818a" ], - "version": "==1.9.0" + "version": "==1.10.0" }, "pylint": { "hashes": [ @@ -351,11 +386,11 @@ }, "pytest": { "hashes": [ - "sha256:4288fed0d9153d9646bfcdf0c0428197dba1ecb27a33bb6e031d002fa88653fe", - "sha256:c0a7e94a8cdbc5422a51ccdad8e6f1024795939cc89159a0ae7f0b316ad3823e" + "sha256:1969f797a1a0dbd8ccf0fecc80262312729afea9c17f1d70ebf85c5e76c6f7c8", + "sha256:66e419b1899bc27346cb2c993e12c5e5e8daba9073c1fbce33b9807abc95c306" ], "index": "pypi", - "version": "==6.1.2" + "version": "==6.2.1" }, "six": { "hashes": [ From ae6419a1c8d490638cfaf371c4cec097927cbd7f Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Wed, 23 Dec 2020 14:46:40 -0700 Subject: [PATCH 015/154] Update to version that works on CI. --- schema-205 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema-205 b/schema-205 index 7990a52..5af8b45 160000 --- a/schema-205 +++ b/schema-205 @@ -1 +1 @@ -Subproject commit 7990a520dd02824abc643c07c8d1a2310fbeac99 +Subproject commit 5af8b452da2be670a1a8a7e3cb53c92cab57aeae From 7025bfd801ea628a0a53673b9c6bc3b276071de7 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Wed, 23 Dec 2020 14:50:44 -0700 Subject: [PATCH 016/154] Upgrade build to Python 3.8. --- .github/workflows/build-and-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index a3562f0..a9540ee 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -17,7 +17,7 @@ jobs: - name: Setup python uses: actions/setup-python@v1 with: - python-version: 3.7 + python-version: 3.8 - name: Upgrade pip run: python -m pip install --upgrade pip - name: Install pipenv From a6e3581786a162af9bba381a4160a54213796594 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Thu, 7 Jan 2021 08:29:37 -0700 Subject: [PATCH 017/154] Use CMake scripts to copy files from schema-205 to build location. --- CMakeLists.txt | 2 ++ libtk205/CMakeLists.txt | 11 ++++---- libtk205/cmake/copy_autogenerated_files.cmake | 27 +++++++++++++++++++ .../cmake/copy_template_generated_files.cmake | 7 +++++ 4 files changed, 42 insertions(+), 5 deletions(-) create mode 100644 libtk205/cmake/copy_autogenerated_files.cmake create mode 100644 libtk205/cmake/copy_template_generated_files.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 33e640b..abbda87 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,3 +1,5 @@ +project(toolkit-205) + # Set a default build type if none was specified if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) message(STATUS "Setting build type to 'Release' as none was specified.") diff --git a/libtk205/CMakeLists.txt b/libtk205/CMakeLists.txt index 56522c7..f1a8e80 100644 --- a/libtk205/CMakeLists.txt +++ b/libtk205/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.0.0) set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED ON) -project(libtktest) +project(libtk205) include(CTest) enable_testing() @@ -39,11 +39,12 @@ add_custom_target(generate_cpp ALL # copy_directory will create the destination if it does not exist add_custom_target(copy_generated_source ALL - COMMAND cmake -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/../schema-205/build/include" "${CMAKE_CURRENT_SOURCE_DIR}/src/build/include" - COMMAND cmake -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/../schema-205/build/cpp" "${CMAKE_CURRENT_SOURCE_DIR}/src/build/cpp" - COMMAND cmake -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/../schema-205/schema205/src" "${CMAKE_CURRENT_SOURCE_DIR}/include") + COMMAND ${CMAKE_COMMAND} "-DPROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR}" -P "${PROJECT_SOURCE_DIR}/cmake/copy_template_generated_files.cmake" + COMMAND ${CMAKE_COMMAND} "-DPROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR}" -P "${PROJECT_SOURCE_DIR}/cmake/copy_autogenerated_files.cmake") -set (SOURCES ${Factory_SOURCES} ${RS_SOURCES}) +set (SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/error_handling_tk205.cpp" + ${Factory_SOURCES} + ${RS_SOURCES}) # The GENERATED property prevents the source files being used before they exist. set_source_files_properties(${SOURCES} PROPERTIES GENERATED TRUE) diff --git a/libtk205/cmake/copy_autogenerated_files.cmake b/libtk205/cmake/copy_autogenerated_files.cmake new file mode 100644 index 0000000..fda4502 --- /dev/null +++ b/libtk205/cmake/copy_autogenerated_files.cmake @@ -0,0 +1,27 @@ +# Copy all autogenerated source (cpp) files into build directory + +file(GLOB autogenerated_sources "${PROJECT_SOURCE_DIR}/../schema-205/build/cpp/*.cpp") + +foreach(filename ${autogenerated_sources}) + configure_file(${filename} ${PROJECT_SOURCE_DIR}/src/build/cpp COPYONLY) +endforeach(filename) + +# Copy all autogenerated factory class headers into build directory - they won't be distributed + +file(GLOB autogenerated_factories "${PROJECT_SOURCE_DIR}/../schema-205/build/include/*factory.h") + +foreach(filename ${autogenerated_factories}) + configure_file(${filename} ${PROJECT_SOURCE_DIR}/src/build/include COPYONLY) +endforeach(filename) + +# Copy the rest of the headers, for classes that must be distributed, into the project +# include directory + +file(GLOB autogenerated_headers "${PROJECT_SOURCE_DIR}/../schema-205/build/include/*.h") +foreach(filename ${autogenerated_factories}) + list(REMOVE_ITEM autogenerated_headers ${filename}) +endforeach(filename) + +foreach(filename ${autogenerated_headers}) + configure_file(${filename} ${PROJECT_SOURCE_DIR}/include COPYONLY) +endforeach(filename) diff --git a/libtk205/cmake/copy_template_generated_files.cmake b/libtk205/cmake/copy_template_generated_files.cmake new file mode 100644 index 0000000..39b6349 --- /dev/null +++ b/libtk205/cmake/copy_template_generated_files.cmake @@ -0,0 +1,7 @@ +# Copy all autogenerated source (cpp) files into build directory + +file(GLOB template_generated_files "${PROJECT_SOURCE_DIR}/../schema-205/schema205/src/*.h") + +foreach(filename ${template_generated_files}) + configure_file(${filename} ${PROJECT_SOURCE_DIR}/include COPYONLY) +endforeach(filename) From 61ec024934b5c3183e7d375c45364c3b92cbf95e Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Mon, 11 Jan 2021 08:10:55 -0700 Subject: [PATCH 018/154] Reorganize source files. --- libtk205/include/error_handling_tk205.h | 16 +++++++++++++ libtk205/src/error_handling_tk205.cpp | 32 +++++++++++++++++++++++++ schema-205 | 2 +- 3 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 libtk205/include/error_handling_tk205.h create mode 100644 libtk205/src/error_handling_tk205.cpp diff --git a/libtk205/include/error_handling_tk205.h b/libtk205/include/error_handling_tk205.h new file mode 100644 index 0000000..b4fe0c7 --- /dev/null +++ b/libtk205/include/error_handling_tk205.h @@ -0,0 +1,16 @@ +#ifndef ERROR_HANDLING_TK205_H_ +#define ERROR_HANDLING_TK205_H_ + +#include + +namespace ASHRAE205_NS { + enum class msg_severity { DEBUG, INFO, WARN, ERR }; + + using msg_handler = std::function; + + void Set_error_handler(msg_handler handler); + void Show_message(msg_severity severity, const std::string& message); +} + + +#endif \ No newline at end of file diff --git a/libtk205/src/error_handling_tk205.cpp b/libtk205/src/error_handling_tk205.cpp new file mode 100644 index 0000000..e6b9345 --- /dev/null +++ b/libtk205/src/error_handling_tk205.cpp @@ -0,0 +1,32 @@ +#include "error_handling_tk205.h" +#include +#include + +namespace ASHRAE205_NS { + + msg_handler _error_handler; + + void Set_error_handler(msg_handler handler) + { + _error_handler = std::move(handler); + } + + void Show_message(msg_severity severity, const std::string &message) + { + static std::map severity_str { + {msg_severity::DEBUG, "DEBUG"}, + {msg_severity::INFO, "INFO"}, + {msg_severity::WARN, "WARN"}, + {msg_severity::ERR, "ERR"} + }; + if (!_error_handler) + { + std::cout << severity_str[severity] << ": " << message << std::endl; + } + else + { + _error_handler(severity, message, nullptr); + } + } +} + diff --git a/schema-205 b/schema-205 index 5af8b45..d45a56b 160000 --- a/schema-205 +++ b/schema-205 @@ -1 +1 @@ -Subproject commit 5af8b452da2be670a1a8a7e3cb53c92cab57aeae +Subproject commit d45a56bd4fc696158fc1acddc04c18c06aec3647 From 93e55019911fa4a7e8fe0bbe4330271d7590e104 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Fri, 15 Jan 2021 16:01:23 -0700 Subject: [PATCH 019/154] Add error handling, build hierarchy, tests. --- libtk205/CMakeLists.txt | 26 +++++-- libtk205/include/RS_instance_base.h | 36 ---------- libtk205/include/RS_instance_factory.h | 37 ---------- libtk205/include/error_handling_tk205.h | 7 +- libtk205/include/grid_variables_base.h | 35 ---------- libtk205/include/libtk205.h | 5 -- libtk205/include/lookup_variables_base.h | 30 -------- libtk205/include/performance_map_base.h | 82 ---------------------- libtk205/test/CMakeLists.txt | 18 +++++ libtk205/test/fixtures_libtk205.hpp | 64 +++++++++++++++++ libtk205/test/main_libtk205.cpp | 88 ++++++++++++++++++++++++ libtk205/vendor/CMakeLists.txt | 23 +++++++ schema-205 | 2 +- 13 files changed, 219 insertions(+), 234 deletions(-) delete mode 100755 libtk205/include/RS_instance_base.h delete mode 100755 libtk205/include/RS_instance_factory.h delete mode 100644 libtk205/include/grid_variables_base.h delete mode 100644 libtk205/include/lookup_variables_base.h delete mode 100644 libtk205/include/performance_map_base.h create mode 100644 libtk205/test/CMakeLists.txt create mode 100644 libtk205/test/fixtures_libtk205.hpp create mode 100644 libtk205/test/main_libtk205.cpp create mode 100644 libtk205/vendor/CMakeLists.txt diff --git a/libtk205/CMakeLists.txt b/libtk205/CMakeLists.txt index f1a8e80..ff7661d 100644 --- a/libtk205/CMakeLists.txt +++ b/libtk205/CMakeLists.txt @@ -7,11 +7,11 @@ include(CTest) enable_testing() set(JSON_BuildTests OFF CACHE INTERNAL "") -include_directories(vendor/btwxt/src) -include_directories(vendor/json/single_include) -include_directories(vendor/json/include) -include_directories(src/build/include) -include_directories(include) +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/vendor/btwxt/src) +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/vendor/json/single_include) +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/vendor/json/include) +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/build/include) +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) add_subdirectory(vendor/btwxt) @@ -53,8 +53,20 @@ target_link_libraries(libtk205 btwxt) add_dependencies(libtk205 copy_generated_source) add_dependencies(copy_generated_source generate_cpp) -add_executable(libtktest src/load.cpp) -target_link_libraries(libtktest libtk205) +# add_executable(libtktest src/load.cpp) +# target_link_libraries(libtktest libtk205) + +option( BUILD_TK205_TESTING "Build libtk205 testing targets" ON ) + +# Set up testing/coverage +if (BUILD_TK205_TESTING) + enable_testing() +endif() + +add_subdirectory(vendor) +if (BUILD_TK205_TESTING) + add_subdirectory(test) +endif() set(CPACK_PROJECT_NAME ${PROJECT_NAME}) set(CPACK_PROJECT_VERSION ${PROJECT_VERSION}) diff --git a/libtk205/include/RS_instance_base.h b/libtk205/include/RS_instance_base.h deleted file mode 100755 index dbc048a..0000000 --- a/libtk205/include/RS_instance_base.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef RS_INSTANCE_BASE_H_ -#define RS_INSTANCE_BASE_H_ - -#include -#include - -/// @class RS_instance_base RS_instance_base.h -/// @brief This class isolates derived RS classes from their owner (ASHRAE205). It handles -/// no resources. - -namespace ASHRAE205_NS { - - inline void A205_json_catch(nlohmann::json::out_of_range & ex) - { - std::cout << ex.what() << std::endl; - } -} - -namespace ASHRAE205_NS { - - class RS_instance_base - { - public: - - RS_instance_base() = default; - virtual ~RS_instance_base() = default; - RS_instance_base(const RS_instance_base& other) = default; - RS_instance_base& operator=(const RS_instance_base& other) = default; - RS_instance_base(RS_instance_base&&) = default; - RS_instance_base& operator=(RS_instance_base&&) = default; - - virtual void Initialize(const nlohmann::json& j) = 0; - }; -} - -#endif \ No newline at end of file diff --git a/libtk205/include/RS_instance_factory.h b/libtk205/include/RS_instance_factory.h deleted file mode 100755 index 1f54476..0000000 --- a/libtk205/include/RS_instance_factory.h +++ /dev/null @@ -1,37 +0,0 @@ -#ifndef RS_INSTANCE_FACTORY_H_ -#define RS_INSTANCE_FACTORY_H_ - -#include -#include -#include "RS_instance_base.h" // definition req'd for unique_ptr - -/// @class RS_instance_factory RS_instance_factory.h -/// @brief This class is an abstract interface to support RS factory sub-classes - -namespace ASHRAE205_NS { - class RS_instance_factory - { - public: // Interface - - RS_instance_factory() = default; - virtual ~RS_instance_factory() = default; - - static bool Register_factory(std::string const &RS_ID, - std::shared_ptr factory); - - // Universal factory interface Create(). Factory::Create() will, through delegation, - // actually return the requested object. - static std::unique_ptr Create(std::string const &RS_ID); - - // Derived factories override Create_instance() for actual resource creation - virtual std::unique_ptr Create_instance() const = 0; - - // Rule of five - RS_instance_factory(const RS_instance_factory& other) = delete; - RS_instance_factory& operator=(const RS_instance_factory& other) = delete; - RS_instance_factory(RS_instance_factory&&) = delete; - RS_instance_factory& operator=(RS_instance_factory&&) = delete; - }; -} - -#endif \ No newline at end of file diff --git a/libtk205/include/error_handling_tk205.h b/libtk205/include/error_handling_tk205.h index b4fe0c7..b2b4091 100644 --- a/libtk205/include/error_handling_tk205.h +++ b/libtk205/include/error_handling_tk205.h @@ -4,7 +4,12 @@ #include namespace ASHRAE205_NS { - enum class msg_severity { DEBUG, INFO, WARN, ERR }; + enum class msg_severity : unsigned int { + DEBUG, + INFO, + WARN, + ERR + }; using msg_handler = std::function; diff --git a/libtk205/include/grid_variables_base.h b/libtk205/include/grid_variables_base.h deleted file mode 100644 index 46cc05f..0000000 --- a/libtk205/include/grid_variables_base.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef GRID_VARIABLES_BASE_H_ -#define GRID_VARIABLES_BASE_H_ - -#include -#include -#include - -#include - -// ------------------------------------------------------------------------------------------------ -/// @class grid_variables_base grid_variables_base.h - -class grid_variables_base { - -public: - grid_variables_base() = default; - virtual ~grid_variables_base() = default; - grid_variables_base(const grid_variables_base& other) = default; - grid_variables_base& operator=(const grid_variables_base& other) = default; - - virtual void Populate_performance_map(performance_map_base* performance_map) = 0; - - inline void Add_grid_axis(performance_map_base* performance_map, std::vector& axis) - { - performance_map->Add_grid_axis(axis); - std::cout << "Adding grid axis with size " << axis.size() << "\n"; - } - inline void Add_grid_axis(performance_map_base* performance_map, std::vector& axis) - { - performance_map->Add_grid_axis(axis); - std::cout << "Adding (int) grid axis with size " << axis.size() << "\n"; - } -}; - -#endif \ No newline at end of file diff --git a/libtk205/include/libtk205.h b/libtk205/include/libtk205.h index 80dc9cb..de92055 100644 --- a/libtk205/include/libtk205.h +++ b/libtk205/include/libtk205.h @@ -13,9 +13,6 @@ namespace libtk205_NS { - enum class msg_severity { DEBUG, INFO, WARN, ERR }; - void Set_error_handler(std::function handler); - class A205_SDK { public: @@ -31,8 +28,6 @@ namespace libtk205_NS { private: void Read_binary_file(const char* filename, std::vector &bytes); - - std::vector _a205_instances; }; } diff --git a/libtk205/include/lookup_variables_base.h b/libtk205/include/lookup_variables_base.h deleted file mode 100644 index 0d69b34..0000000 --- a/libtk205/include/lookup_variables_base.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef LOOKUP_VARIABLES_BASE_H_ -#define LOOKUP_VARIABLES_BASE_H_ - -#include -#include -#include - -class performance_map_base; - -// ------------------------------------------------------------------------------------------------ -/// @class lookup_variables_base lookup_variables_base.h - -class lookup_variables_base { - -public: - lookup_variables_base() = default; - virtual ~lookup_variables_base() = default; - lookup_variables_base(const lookup_variables_base& other) = default; - lookup_variables_base& operator=(const lookup_variables_base& other) = default; - - virtual void Populate_performance_map(performance_map_base* performance_map) = 0; - - inline void Add_data_table(performance_map_base* performance_map, std::vector& table) - { - performance_map->Add_data_table(table); - std::cout << "Adding grid table with size " << table.size() << "\n"; - } -}; - -#endif \ No newline at end of file diff --git a/libtk205/include/performance_map_base.h b/libtk205/include/performance_map_base.h deleted file mode 100644 index 9ddc1cc..0000000 --- a/libtk205/include/performance_map_base.h +++ /dev/null @@ -1,82 +0,0 @@ -#ifndef PERFORMANCE_MAP_BASE_H_ -#define PERFORMANCE_MAP_BASE_H_ - -#include -#include -#include -#include -#include - -// ------------------------------------------------------------------------------------------------ -/// @class performance_map_base performance_map_base.h - -class performance_map_base { - -public: - performance_map_base() = default; - virtual ~performance_map_base() = default; - performance_map_base(const performance_map_base& other) = default; - performance_map_base& operator=(const performance_map_base& other) = default; - - // ---------------------------------------------------------------------------------------------- - /// @brief - /// @param j - // ---------------------------------------------------------------------------------------------- - virtual void Initialize(const nlohmann::json& j) = 0; - - // ---------------------------------------------------------------------------------------------- - /// @brief - /// @param axis TBD - // ---------------------------------------------------------------------------------------------- - inline void Add_grid_axis(std::vector& axis) { - _grid_axes.emplace_back(Btwxt::GridAxis(axis)); - } - - // ---------------------------------------------------------------------------------------------- - /// @brief - /// @param axis TBD - // ---------------------------------------------------------------------------------------------- - inline void Add_grid_axis(std::vector& axis) { - _grid_axes.emplace_back(Btwxt::GridAxis(std::vector(axis.begin(), axis.end()))); - } - - // ---------------------------------------------------------------------------------------------- - /// @brief - /// @param table TBD - // ---------------------------------------------------------------------------------------------- - inline void Add_data_table(std::vector& table) { - _btwxt.add_value_table(table); - } - - // ---------------------------------------------------------------------------------------------- - /// @brief - // ---------------------------------------------------------------------------------------------- - inline void Finalize_grid() { - auto gd = Btwxt::GriddedData(_grid_axes); - _btwxt = Btwxt::RegularGridInterpolator(gd); - } - - // ---------------------------------------------------------------------------------------------- - /// @brief - /// @param table_index TBD - // ---------------------------------------------------------------------------------------------- - inline double Calculate_performance(std::size_t table_index) { - return _btwxt.get_value_at_target(table_index); - } - - // ---------------------------------------------------------------------------------------------- - /// @brief Using pre-populated grid axes and lookup tables, calculate a set of performance - /// results. - /// @param target - // ---------------------------------------------------------------------------------------------- - inline std::vector Calculate_performance(const std::vector &target) { - return _btwxt.get_values_at_target(target); - } - -private: - Btwxt::RegularGridInterpolator _btwxt; - std::vector _grid_axes; - -}; - -#endif \ No newline at end of file diff --git a/libtk205/test/CMakeLists.txt b/libtk205/test/CMakeLists.txt new file mode 100644 index 0000000..acaa4c8 --- /dev/null +++ b/libtk205/test/CMakeLists.txt @@ -0,0 +1,18 @@ +# Test Executable + +include_directories("${libtk205_SOURCE_DIR}/include" + "${libtk205_SOURCE_DIR}/src/build/include" + "${gtest_SOURCE_DIR}/include") + +set(library_sources + fixtures_libtk205.hpp + main_libtk205.cpp +) + +link_libraries(libtk205 gtest gmock) + +add_executable(libtk205_tests ${library_sources}) + +include(GoogleTest) + +gtest_discover_tests(libtk205_tests TEST_PREFIX libtk205:) diff --git a/libtk205/test/fixtures_libtk205.hpp b/libtk205/test/fixtures_libtk205.hpp new file mode 100644 index 0000000..cb4dff7 --- /dev/null +++ b/libtk205/test/fixtures_libtk205.hpp @@ -0,0 +1,64 @@ +/* Copyright (c) 2021 Big Ladder Software LLC. All rights reserved. + * See the LICENSE file for additional terms and conditions. */ + +#ifndef FIXTURE_LIBTK205_HPP_ +#define FIXTURE_LIBTK205_HPP_ + +#include "gtest/gtest.h" +#include "libtk205.h" + +using namespace libtk205_NS; + +class RS_fixture : public testing::Test { +protected: + RS_fixture(const char * filename) : _sdk() + { + _a205 = _sdk.Load_A205(filename); + } + A205_SDK _sdk; + ASHRAE205_NS::ASHRAE205 _a205; +}; + +class RS0001_fixture : public RS_fixture { +protected: + RS0001_fixture() : RS_fixture("../../build/examples/cbor/RS0001/Chiller-Constant-Efficiency.RS0001.a205.cbor") + { + } +}; + +class RS0002_fixture : public RS_fixture { +protected: + RS0002_fixture() : RS_fixture("../../build/examples/cbor/RS0002/Unitary-Constant-Efficiency.RS0002.a205.cbor") + { + } +}; + +class RS0003_fixture : public RS_fixture { +protected: + RS0003_fixture() : RS_fixture("../../build/examples/cbor/RS0003/Fan-Continuous.RS0003.a205.cbor") + { + } +}; + +class RS0004_fixture : public RS_fixture { +protected: + RS0004_fixture() : RS_fixture("../../build/examples/cbor/RS0004/DX-Constant-Efficiency.RS0004.a205.cbor") + { + } +}; + +class RS0005_fixture : public RS_fixture { +protected: + RS0005_fixture() : RS_fixture("../../build/examples/cbor/RS0005/Motor-Constant-Efficiency.RS0005.a205.cbor") + { + } +}; + +class RS0006_fixture : public RS_fixture { +protected: + RS0006_fixture() : RS_fixture("../../build/examples/cbor/RS0006/Drive-Constant-Efficiency.RS0006.a205.cbor") + { + } +}; + +#endif // FIXTURE_LIBTK205_HPP_ diff --git a/libtk205/test/main_libtk205.cpp b/libtk205/test/main_libtk205.cpp new file mode 100644 index 0000000..dd4bbf6 --- /dev/null +++ b/libtk205/test/main_libtk205.cpp @@ -0,0 +1,88 @@ +/* Copyright (c) 2018 Big Ladder Software LLC. All rights reserved. + * See the LICENSE file for additional terms and conditions. */ + +#include "gtest/gtest.h" +#include "fixtures_libtk205.hpp" +#include "libtk205.h" + +using namespace libtk205_NS; + +TEST_F(RS0001_fixture, Create_RS01) +{ + auto rs = _sdk.Get_RS0001(_a205); + EXPECT_TRUE(rs != nullptr); +} + +TEST_F(RS0001_fixture, Calculate_performance_cooling) +{ + auto rs = const_cast(_sdk.Get_RS0001(_a205)); + std::vector target {0.0755, 280.0, 0.0957, 295.0, 0.5}; + auto result = rs->performance.performance_map_cooling.Calculate_performance(target); + EXPECT_EQ(result.size(), 9u); + //EXPECT_THAT(result, testing::ElementsAre(testing::DoubleEq(3.189), testing::DoubleEq(6.378), ...)); + } + +TEST_F(RS0002_fixture, Create_RS02) +{ + auto rs = _sdk.Get_RS0002(_a205); + EXPECT_TRUE(rs != nullptr); +} + +TEST_F(RS0003_fixture, Create_RS03) +{ + auto rs = _sdk.Get_RS0003(_a205); + EXPECT_TRUE(rs != nullptr); +} + +TEST_F(RS0004_fixture, Create_RS04) +{ + auto rs = _sdk.Get_RS0004(_a205); + EXPECT_TRUE(rs != nullptr); +} + +TEST_F(RS0005_fixture, Create_RS05) +{ + auto rs = _sdk.Get_RS0005(_a205); + EXPECT_TRUE(rs != nullptr); +} + +TEST_F(RS0006_fixture, Create_RS06) +{ + auto rs = _sdk.Get_RS0006(_a205); + EXPECT_TRUE(rs != nullptr); +} + +void Display_message(ASHRAE205_NS::msg_severity severity, const std::string &message, void *) +{ + using namespace ASHRAE205_NS; + static std::map severity_str { + {msg_severity::DEBUG, "DEBUG"}, + {msg_severity::INFO, "INFO"}, + {msg_severity::WARN, "WARN"}, + {msg_severity::ERR, "ERR"} + }; + if (severity >= msg_severity::WARN) + { + std::cout << severity_str[severity] << ": " << message << std::endl; + } +} + +void Btwxt_message(const Btwxt::MsgLevel messageType, const std::string message, + void *) +{ + static std::map severity { + {Btwxt::MsgLevel::MSG_DEBUG, ASHRAE205_NS::msg_severity::DEBUG}, + {Btwxt::MsgLevel::MSG_INFO, ASHRAE205_NS::msg_severity::INFO}, + {Btwxt::MsgLevel::MSG_WARN, ASHRAE205_NS::msg_severity::WARN}, + {Btwxt::MsgLevel::MSG_ERR, ASHRAE205_NS::msg_severity::ERR} + }; + Display_message(severity[messageType], message, nullptr); +} + +int main(int argc, char **argv) +{ + ::testing::InitGoogleTest(&argc, argv); + ASHRAE205_NS::Set_error_handler(Display_message); + Btwxt::setMessageCallback(Btwxt_message, nullptr); + return RUN_ALL_TESTS(); +} diff --git a/libtk205/vendor/CMakeLists.txt b/libtk205/vendor/CMakeLists.txt new file mode 100644 index 0000000..ac170cf --- /dev/null +++ b/libtk205/vendor/CMakeLists.txt @@ -0,0 +1,23 @@ +if(GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git") + # Update submodules as needed + option(GIT_SUBMODULE "Check submodules during build" ON) + if(GIT_SUBMODULE) + message(STATUS "${PROJECT_NAME} submodule update") + execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + RESULT_VARIABLE GIT_SUBMOD_RESULT) + if(NOT GIT_SUBMOD_RESULT EQUAL "0") + message(FATAL_ERROR "git submodule update --init failed with ${GIT_SUBMOD_RESULT}, please checkout submodules") + endif() + endif() +endif() + +if (BUILD_TK205_TESTING AND NOT TARGET gtest) + + # Prevent GoogleTest from overriding our compiler/linker options + # when building with Visual Studio + set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) + set(BUILD_GTEST ON CACHE BOOL "" FORCE) + add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/btwxt/vendor/googletest) + +endif() \ No newline at end of file diff --git a/schema-205 b/schema-205 index d45a56b..e64fb41 160000 --- a/schema-205 +++ b/schema-205 @@ -1 +1 @@ -Subproject commit d45a56bd4fc696158fc1acddc04c18c06aec3647 +Subproject commit e64fb41f7aa7f82df235843b4409ef22dfe34037 From 3302050457240fb6485760704482d88bba702025 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Sun, 17 Jan 2021 15:19:48 -0700 Subject: [PATCH 020/154] Add header files explicitly to source list. --- libtk205/CMakeLists.txt | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/libtk205/CMakeLists.txt b/libtk205/CMakeLists.txt index ff7661d..426bc9d 100644 --- a/libtk205/CMakeLists.txt +++ b/libtk205/CMakeLists.txt @@ -15,20 +15,38 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) add_subdirectory(vendor/btwxt) -list(APPEND Factory_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/RS_instance_factory.cpp" +list(APPEND Factory_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/include/RS_instance_factory.h" + "${CMAKE_CURRENT_SOURCE_DIR}/src/RS_instance_factory.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/include/RS_instance_base.h" + "${CMAKE_CURRENT_SOURCE_DIR}/include/performance_map_base.h" + "${CMAKE_CURRENT_SOURCE_DIR}/include/grid_variables_base.h" + "${CMAKE_CURRENT_SOURCE_DIR}/include/lookup_variables_base.h" + "${CMAKE_CURRENT_SOURCE_DIR}/src/build/include/RS0001_factory.h" "${CMAKE_CURRENT_SOURCE_DIR}/src/build/cpp/RS0001_factory.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/src/build/include/RS0002_factory.h" "${CMAKE_CURRENT_SOURCE_DIR}/src/build/cpp/RS0002_factory.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/src/build/include/RS0003_factory.h" "${CMAKE_CURRENT_SOURCE_DIR}/src/build/cpp/RS0003_factory.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/src/build/include/RS0004_factory.h" "${CMAKE_CURRENT_SOURCE_DIR}/src/build/cpp/RS0004_factory.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/src/build/include/RS0005_factory.h" "${CMAKE_CURRENT_SOURCE_DIR}/src/build/cpp/RS0005_factory.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/src/build/include/RS0006_factory.h" "${CMAKE_CURRENT_SOURCE_DIR}/src/build/cpp/RS0006_factory.cpp" ) list(APPEND RS_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/build/cpp/ASHRAE205.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/src/build/include/ASHRAE205.h" + "${CMAKE_CURRENT_SOURCE_DIR}/src/build/include/RS0001.h" "${CMAKE_CURRENT_SOURCE_DIR}/src/build/cpp/RS0001.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/src/build/include/RS0002.h" "${CMAKE_CURRENT_SOURCE_DIR}/src/build/cpp/RS0002.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/src/build/include/RS0003.h" "${CMAKE_CURRENT_SOURCE_DIR}/src/build/cpp/RS0003.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/src/build/include/RS0004.h" "${CMAKE_CURRENT_SOURCE_DIR}/src/build/cpp/RS0004.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/src/build/include/RS0005.h" "${CMAKE_CURRENT_SOURCE_DIR}/src/build/cpp/RS0005.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/src/build/include/RS0006.h" "${CMAKE_CURRENT_SOURCE_DIR}/src/build/cpp/RS0006.cpp" ) @@ -42,7 +60,10 @@ add_custom_target(copy_generated_source ALL COMMAND ${CMAKE_COMMAND} "-DPROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR}" -P "${PROJECT_SOURCE_DIR}/cmake/copy_template_generated_files.cmake" COMMAND ${CMAKE_COMMAND} "-DPROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR}" -P "${PROJECT_SOURCE_DIR}/cmake/copy_autogenerated_files.cmake") -set (SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/error_handling_tk205.cpp" +set (SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/include/libtk205.h" + "${CMAKE_CURRENT_SOURCE_DIR}/src/libtk205.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/include/error_handling_tk205.h" + "${CMAKE_CURRENT_SOURCE_DIR}/src/error_handling_tk205.cpp" ${Factory_SOURCES} ${RS_SOURCES}) # The GENERATED property prevents the source files being used before they exist. From d472af0c6aa2aae2586452a026f4386f1d23b478 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Sun, 17 Jan 2021 15:20:32 -0700 Subject: [PATCH 021/154] Return non-const pointer for each RS. --- libtk205/include/libtk205.h | 12 ++++++------ libtk205/src/libtk205.cpp | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/libtk205/include/libtk205.h b/libtk205/include/libtk205.h index de92055..464e160 100644 --- a/libtk205/include/libtk205.h +++ b/libtk205/include/libtk205.h @@ -19,12 +19,12 @@ namespace libtk205_NS { A205_SDK(); ASHRAE205_NS::ASHRAE205 Load_A205(const char* input_file); - const ASHRAE205_NS::RS0001_NS::RS0001* Get_RS0001(const ASHRAE205_NS::ASHRAE205& a205); - const ASHRAE205_NS::RS0002_NS::RS0002* Get_RS0002(const ASHRAE205_NS::ASHRAE205& a205); - const ASHRAE205_NS::RS0003_NS::RS0003* Get_RS0003(const ASHRAE205_NS::ASHRAE205& a205); - const ASHRAE205_NS::RS0004_NS::RS0004* Get_RS0004(const ASHRAE205_NS::ASHRAE205& a205); - const ASHRAE205_NS::RS0005_NS::RS0005* Get_RS0005(const ASHRAE205_NS::ASHRAE205& a205); - const ASHRAE205_NS::RS0006_NS::RS0006* Get_RS0006(const ASHRAE205_NS::ASHRAE205& a205); + ASHRAE205_NS::RS0001_NS::RS0001* Get_RS0001(const ASHRAE205_NS::ASHRAE205& a205); + ASHRAE205_NS::RS0002_NS::RS0002* Get_RS0002(const ASHRAE205_NS::ASHRAE205& a205); + ASHRAE205_NS::RS0003_NS::RS0003* Get_RS0003(const ASHRAE205_NS::ASHRAE205& a205); + ASHRAE205_NS::RS0004_NS::RS0004* Get_RS0004(const ASHRAE205_NS::ASHRAE205& a205); + ASHRAE205_NS::RS0005_NS::RS0005* Get_RS0005(const ASHRAE205_NS::ASHRAE205& a205); + ASHRAE205_NS::RS0006_NS::RS0006* Get_RS0006(const ASHRAE205_NS::ASHRAE205& a205); private: void Read_binary_file(const char* filename, std::vector &bytes); diff --git a/libtk205/src/libtk205.cpp b/libtk205/src/libtk205.cpp index 6c85caf..9421767 100644 --- a/libtk205/src/libtk205.cpp +++ b/libtk205/src/libtk205.cpp @@ -53,32 +53,32 @@ namespace libtk205_NS { return std::move(a205); } - const RS0001_NS::RS0001* A205_SDK::Get_RS0001(const ASHRAE205& a205) + RS0001_NS::RS0001* A205_SDK::Get_RS0001(const ASHRAE205& a205) { return dynamic_cast(a205.RS_instance.get()); } - const RS0002_NS::RS0002* A205_SDK::Get_RS0002(const ASHRAE205& a205) + RS0002_NS::RS0002* A205_SDK::Get_RS0002(const ASHRAE205& a205) { return dynamic_cast(a205.RS_instance.get()); } - const RS0003_NS::RS0003* A205_SDK::Get_RS0003(const ASHRAE205& a205) + RS0003_NS::RS0003* A205_SDK::Get_RS0003(const ASHRAE205& a205) { return dynamic_cast(a205.RS_instance.get()); } - const RS0004_NS::RS0004* A205_SDK::Get_RS0004(const ASHRAE205& a205) + RS0004_NS::RS0004* A205_SDK::Get_RS0004(const ASHRAE205& a205) { return dynamic_cast(a205.RS_instance.get()); } - const RS0005_NS::RS0005* A205_SDK::Get_RS0005(const ASHRAE205& a205) + RS0005_NS::RS0005* A205_SDK::Get_RS0005(const ASHRAE205& a205) { return dynamic_cast(a205.RS_instance.get()); } - const RS0006_NS::RS0006* A205_SDK::Get_RS0006(const ASHRAE205& a205) + RS0006_NS::RS0006* A205_SDK::Get_RS0006(const ASHRAE205& a205) { return dynamic_cast(a205.RS_instance.get()); } From fbe779b65f7277fbcd3cfccb88b866ca63a3d17d Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Sun, 17 Jan 2021 15:22:11 -0700 Subject: [PATCH 022/154] Add test for embedded RS. Make relative paths from top-level repo. --- libtk205/test/fixtures_libtk205.hpp | 12 ++++++------ libtk205/test/main_libtk205.cpp | 24 ++++++++++++++++++++++-- 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/libtk205/test/fixtures_libtk205.hpp b/libtk205/test/fixtures_libtk205.hpp index cb4dff7..6e15784 100644 --- a/libtk205/test/fixtures_libtk205.hpp +++ b/libtk205/test/fixtures_libtk205.hpp @@ -21,42 +21,42 @@ class RS_fixture : public testing::Test { class RS0001_fixture : public RS_fixture { protected: - RS0001_fixture() : RS_fixture("../../build/examples/cbor/RS0001/Chiller-Constant-Efficiency.RS0001.a205.cbor") + RS0001_fixture() : RS_fixture("../build/examples/cbor/RS0001/Chiller-Constant-Efficiency.RS0001.a205.cbor") { } }; class RS0002_fixture : public RS_fixture { protected: - RS0002_fixture() : RS_fixture("../../build/examples/cbor/RS0002/Unitary-Constant-Efficiency.RS0002.a205.cbor") + RS0002_fixture() : RS_fixture("../build/examples/cbor/RS0002/Unitary-Constant-Efficiency.RS0002.a205.cbor") { } }; class RS0003_fixture : public RS_fixture { protected: - RS0003_fixture() : RS_fixture("../../build/examples/cbor/RS0003/Fan-Continuous.RS0003.a205.cbor") + RS0003_fixture() : RS_fixture("../build/examples/cbor/RS0003/Fan-Continuous.RS0003.a205.cbor") { } }; class RS0004_fixture : public RS_fixture { protected: - RS0004_fixture() : RS_fixture("../../build/examples/cbor/RS0004/DX-Constant-Efficiency.RS0004.a205.cbor") + RS0004_fixture() : RS_fixture("../build/examples/cbor/RS0004/DX-Constant-Efficiency.RS0004.a205.cbor") { } }; class RS0005_fixture : public RS_fixture { protected: - RS0005_fixture() : RS_fixture("../../build/examples/cbor/RS0005/Motor-Constant-Efficiency.RS0005.a205.cbor") + RS0005_fixture() : RS_fixture("../build/examples/cbor/RS0005/Motor-Constant-Efficiency.RS0005.a205.cbor") { } }; class RS0006_fixture : public RS_fixture { protected: - RS0006_fixture() : RS_fixture("../../build/examples/cbor/RS0006/Drive-Constant-Efficiency.RS0006.a205.cbor") + RS0006_fixture() : RS_fixture("../build/examples/cbor/RS0006/Drive-Constant-Efficiency.RS0006.a205.cbor") { } }; diff --git a/libtk205/test/main_libtk205.cpp b/libtk205/test/main_libtk205.cpp index dd4bbf6..41153fa 100644 --- a/libtk205/test/main_libtk205.cpp +++ b/libtk205/test/main_libtk205.cpp @@ -1,7 +1,9 @@ -/* Copyright (c) 2018 Big Ladder Software LLC. All rights reserved. +/* Copyright (c) 2021 Big Ladder Software LLC. All rights reserved. * See the LICENSE file for additional terms and conditions. */ #include "gtest/gtest.h" +#include "gmock/gmock.h" + #include "fixtures_libtk205.hpp" #include "libtk205.h" @@ -15,13 +17,31 @@ TEST_F(RS0001_fixture, Create_RS01) TEST_F(RS0001_fixture, Calculate_performance_cooling) { - auto rs = const_cast(_sdk.Get_RS0001(_a205)); + auto rs = _sdk.Get_RS0001(_a205); std::vector target {0.0755, 280.0, 0.0957, 295.0, 0.5}; auto result = rs->performance.performance_map_cooling.Calculate_performance(target); EXPECT_EQ(result.size(), 9u); //EXPECT_THAT(result, testing::ElementsAre(testing::DoubleEq(3.189), testing::DoubleEq(6.378), ...)); } +TEST_F(RS0005_fixture, Calculate_embedded_RS_performance) +{ + auto rs05 = _sdk.Get_RS0005(_a205); + EXPECT_TRUE(rs05 != nullptr); + + if (rs05) + { + auto rs06 = _sdk.Get_RS0006(rs05->performance.drive_representation); + EXPECT_TRUE(rs06 != nullptr); + if (rs06) + { + std::vector target {5550.0}; + auto result = rs06->performance.performance_map.Calculate_performance(target); + EXPECT_THAT(result, testing::ElementsAre(testing::DoubleEq(0.985))); + } + } +} + TEST_F(RS0002_fixture, Create_RS02) { auto rs = _sdk.Get_RS0002(_a205); From c9f81614e18a9db92cac0db1f7582cfae728fd40 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Fri, 22 Jan 2021 13:53:06 -0700 Subject: [PATCH 023/154] Merge from master and update to reflect changes. --- CMakeLists.txt | 8 + libtk205/CMakeLists.txt | 16 +- libtk205/src/RS_instance_factory.cpp | 30 - libtk205/src/libtk205.cpp | 26 +- libtk205/src/load.cpp | 61 -- libtk205/src/rs_instance_factory.cpp | 32 + libtk205/test/fixtures_libtk205.hpp | 13 +- libtk205/test/main_libtk205.cpp | 7 +- poetry.lock | 886 +++++++++++++++++++++++++++ pyproject.toml | 29 + 10 files changed, 987 insertions(+), 121 deletions(-) delete mode 100755 libtk205/src/RS_instance_factory.cpp delete mode 100755 libtk205/src/load.cpp create mode 100755 libtk205/src/rs_instance_factory.cpp create mode 100644 poetry.lock create mode 100644 pyproject.toml diff --git a/CMakeLists.txt b/CMakeLists.txt index abbda87..06a3970 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,4 +9,12 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) "MinSizeRel" "RelWithDebInfo") endif() +option( BUILD_TK205_TESTING "Build libtk205 testing targets" ON ) + +# Set up testing/coverage +if (BUILD_TK205_TESTING) + set(TEST205_INPUT_EXAMPLES_DIR ${PROJECT_SOURCE_DIR}) # TODO Upgrade to configure_file method? + enable_testing() +endif() + add_subdirectory(libtk205) diff --git a/libtk205/CMakeLists.txt b/libtk205/CMakeLists.txt index 426bc9d..b28c8ad 100644 --- a/libtk205/CMakeLists.txt +++ b/libtk205/CMakeLists.txt @@ -4,9 +4,9 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) project(libtk205) include(CTest) -enable_testing() set(JSON_BuildTests OFF CACHE INTERNAL "") +# include_directories adds locations to the -I command line include_directories(${CMAKE_CURRENT_SOURCE_DIR}/vendor/btwxt/src) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/vendor/json/single_include) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/vendor/json/include) @@ -15,9 +15,9 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) add_subdirectory(vendor/btwxt) -list(APPEND Factory_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/include/RS_instance_factory.h" - "${CMAKE_CURRENT_SOURCE_DIR}/src/RS_instance_factory.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/include/RS_instance_base.h" +list(APPEND Factory_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/include/rs_instance_factory.h" + "${CMAKE_CURRENT_SOURCE_DIR}/src/rs_instance_factory.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/include/rs_instance_base.h" "${CMAKE_CURRENT_SOURCE_DIR}/include/performance_map_base.h" "${CMAKE_CURRENT_SOURCE_DIR}/include/grid_variables_base.h" "${CMAKE_CURRENT_SOURCE_DIR}/include/lookup_variables_base.h" @@ -77,15 +77,9 @@ add_dependencies(copy_generated_source generate_cpp) # add_executable(libtktest src/load.cpp) # target_link_libraries(libtktest libtk205) -option( BUILD_TK205_TESTING "Build libtk205 testing targets" ON ) - -# Set up testing/coverage -if (BUILD_TK205_TESTING) - enable_testing() -endif() - add_subdirectory(vendor) if (BUILD_TK205_TESTING) + add_compile_definitions(TEST205_INPUT_EXAMPLES_DIR="${TEST205_INPUT_EXAMPLES_DIR}") add_subdirectory(test) endif() diff --git a/libtk205/src/RS_instance_factory.cpp b/libtk205/src/RS_instance_factory.cpp deleted file mode 100755 index 3449d8c..0000000 --- a/libtk205/src/RS_instance_factory.cpp +++ /dev/null @@ -1,30 +0,0 @@ -#include "RS_instance_factory.h" -#include - -namespace -{ - using RS_factory_map = std::map >; - - RS_factory_map& Get_RS_factory_map() - { - static RS_factory_map factory_map; - return factory_map; - } -} - -namespace ASHRAE205_NS { - //static - bool RS_instance_factory::Register_factory(std::string const& RS_ID, - std::shared_ptr factory) - { - Get_RS_factory_map()[RS_ID] = factory; - return true; - } - - //static - std::unique_ptr RS_instance_factory::Create(std::string const& RS_ID) - { - const auto factory = Get_RS_factory_map()[RS_ID]; - return (factory == nullptr) ? nullptr : factory->Create_instance(); - } -} \ No newline at end of file diff --git a/libtk205/src/libtk205.cpp b/libtk205/src/libtk205.cpp index 9421767..e5bde17 100644 --- a/libtk205/src/libtk205.cpp +++ b/libtk205/src/libtk205.cpp @@ -9,6 +9,8 @@ #include "RS0005_factory.h" #include "RS0006_factory.h" +#include + namespace libtk205_NS { using json = nlohmann::json; @@ -16,12 +18,12 @@ namespace libtk205_NS { A205_SDK::A205_SDK() { - RS_instance_factory::Register_factory("RS0001", std::make_shared()); - RS_instance_factory::Register_factory("RS0002", std::make_shared()); - RS_instance_factory::Register_factory("RS0003", std::make_shared()); - RS_instance_factory::Register_factory("RS0004", std::make_shared()); - RS_instance_factory::Register_factory("RS0005", std::make_shared()); - RS_instance_factory::Register_factory("RS0006", std::make_shared()); + rs_instance_factory::Register_factory("RS0001", std::make_shared()); + rs_instance_factory::Register_factory("RS0002", std::make_shared()); + rs_instance_factory::Register_factory("RS0003", std::make_shared()); + rs_instance_factory::Register_factory("RS0004", std::make_shared()); + rs_instance_factory::Register_factory("RS0005", std::make_shared()); + rs_instance_factory::Register_factory("RS0006", std::make_shared()); } ASHRAE205 A205_SDK::Load_A205(const char* input_file) @@ -55,32 +57,32 @@ namespace libtk205_NS { RS0001_NS::RS0001* A205_SDK::Get_RS0001(const ASHRAE205& a205) { - return dynamic_cast(a205.RS_instance.get()); + return dynamic_cast(a205.rs_instance.get()); } RS0002_NS::RS0002* A205_SDK::Get_RS0002(const ASHRAE205& a205) { - return dynamic_cast(a205.RS_instance.get()); + return dynamic_cast(a205.rs_instance.get()); } RS0003_NS::RS0003* A205_SDK::Get_RS0003(const ASHRAE205& a205) { - return dynamic_cast(a205.RS_instance.get()); + return dynamic_cast(a205.rs_instance.get()); } RS0004_NS::RS0004* A205_SDK::Get_RS0004(const ASHRAE205& a205) { - return dynamic_cast(a205.RS_instance.get()); + return dynamic_cast(a205.rs_instance.get()); } RS0005_NS::RS0005* A205_SDK::Get_RS0005(const ASHRAE205& a205) { - return dynamic_cast(a205.RS_instance.get()); + return dynamic_cast(a205.rs_instance.get()); } RS0006_NS::RS0006* A205_SDK::Get_RS0006(const ASHRAE205& a205) { - return dynamic_cast(a205.RS_instance.get()); + return dynamic_cast(a205.rs_instance.get()); } void A205_SDK::Read_binary_file(const char* filename, std::vector &bytes) diff --git a/libtk205/src/load.cpp b/libtk205/src/load.cpp deleted file mode 100755 index e265827..0000000 --- a/libtk205/src/load.cpp +++ /dev/null @@ -1,61 +0,0 @@ -#include -#include -#include -#include -#include "libtk205.h" - -#include "RS_instance_factory.h" -//#include "RS0003_factory.h" - -using json = nlohmann::json; - -int main(int argc, char* argv[]) -{ - using namespace ASHRAE205_NS; - - //RS_instance_factory::Register_factory("RS0003", std::make_shared()); - - if (argc > 1) - { -#if 0 - using json = nlohmann::json; - std::string schema(argv[1]); - std::ifstream in(schema); - json j; - in >> j; - Load_A205(j); -#else - using namespace libtk205_NS; - A205_SDK sdk; - auto a205 = sdk.Load_A205(argv[1]); - auto rs01 = sdk.Get_RS0001(a205); - if (rs01) - { - for (const auto& element : rs01->performance.performance_map_cooling.grid_variables.condenser_liquid_entering_temperature) - { - std::cout << element << "\n"; - } - } - auto rs03 = std::dynamic_pointer_cast(a205.RS_instance); - if (rs03) - { - // //std::cout << rs03->description.assembly_components.at(1).component_description << "\n"; - std::cout << "number_of_impellers " << rs03->description.product_information.number_of_impellers << "\n"; - auto gridvars1 = std::dynamic_pointer_cast(rs03->performance.performance_map)->grid_variables.volumetric_air_flow_rate; - for (const auto& element : gridvars1) - { - std::cout << element << "\n"; - } - } - auto rs05 = sdk.Get_RS0005(a205); - if (rs05) - { - auto rs06 = sdk.Get_RS0006(rs05->performance.drive_representation); - if (rs06) - { - std::cout << rs06->description.product_information.model_number << "\n"; - } - } -#endif - } -} \ No newline at end of file diff --git a/libtk205/src/rs_instance_factory.cpp b/libtk205/src/rs_instance_factory.cpp new file mode 100755 index 0000000..1e32ac6 --- /dev/null +++ b/libtk205/src/rs_instance_factory.cpp @@ -0,0 +1,32 @@ +#include "rs_instance_factory.h" +#include + +namespace +{ + using rs_factory_map = std::map >; + + rs_factory_map& Get_rs_factory_map() + { + static rs_factory_map factory_map; + return factory_map; + } +} + +namespace ASHRAE205_NS { + //static + bool rs_instance_factory::Register_factory(std::string const& RS_ID, + std::shared_ptr factory) + { + Get_rs_factory_map()[RS_ID] = factory; + return true; + } + + //static + std::unique_ptr rs_instance_factory::Create(std::string const& RS_ID) + { + const auto factory = Get_rs_factory_map()[RS_ID]; + std::unique_ptr inst = (factory == nullptr) ? nullptr : factory->Create_instance(); + std::cout << "Factory's raw pointer " << inst.get() << std::endl; + return inst; + } +} \ No newline at end of file diff --git a/libtk205/test/fixtures_libtk205.hpp b/libtk205/test/fixtures_libtk205.hpp index 6e15784..5ff273e 100644 --- a/libtk205/test/fixtures_libtk205.hpp +++ b/libtk205/test/fixtures_libtk205.hpp @@ -14,6 +14,7 @@ class RS_fixture : public testing::Test { RS_fixture(const char * filename) : _sdk() { _a205 = _sdk.Load_A205(filename); + std::cout << "Fixture gets ID " << static_cast(_a205.rs_id) << ": shared_ptr value " << _a205.rs_instance << std::endl; } A205_SDK _sdk; ASHRAE205_NS::ASHRAE205 _a205; @@ -21,42 +22,42 @@ class RS_fixture : public testing::Test { class RS0001_fixture : public RS_fixture { protected: - RS0001_fixture() : RS_fixture("../build/examples/cbor/RS0001/Chiller-Constant-Efficiency.RS0001.a205.cbor") + RS0001_fixture() : RS_fixture(TEST205_INPUT_EXAMPLES_DIR"/build/examples/json/RS0001/Chiller-Constant-Efficiency.RS0001.a205.json") { } }; class RS0002_fixture : public RS_fixture { protected: - RS0002_fixture() : RS_fixture("../build/examples/cbor/RS0002/Unitary-Constant-Efficiency.RS0002.a205.cbor") + RS0002_fixture() : RS_fixture(TEST205_INPUT_EXAMPLES_DIR"/build/examples/json/RS0002/Unitary-Constant-Efficiency.RS0002.a205.json") { } }; class RS0003_fixture : public RS_fixture { protected: - RS0003_fixture() : RS_fixture("../build/examples/cbor/RS0003/Fan-Continuous.RS0003.a205.cbor") + RS0003_fixture() : RS_fixture(TEST205_INPUT_EXAMPLES_DIR"/build/examples/json/RS0003/Fan-Continuous.RS0003.a205.json") { } }; class RS0004_fixture : public RS_fixture { protected: - RS0004_fixture() : RS_fixture("../build/examples/cbor/RS0004/DX-Constant-Efficiency.RS0004.a205.cbor") + RS0004_fixture() : RS_fixture(TEST205_INPUT_EXAMPLES_DIR"/build/examples/json/RS0004/DX-Constant-Efficiency.RS0004.a205.json") { } }; class RS0005_fixture : public RS_fixture { protected: - RS0005_fixture() : RS_fixture("../build/examples/cbor/RS0005/Motor-Constant-Efficiency.RS0005.a205.cbor") + RS0005_fixture() : RS_fixture(TEST205_INPUT_EXAMPLES_DIR"/build/examples/json/RS0005/Motor-Constant-Efficiency.RS0005.a205.json") { } }; class RS0006_fixture : public RS_fixture { protected: - RS0006_fixture() : RS_fixture("../build/examples/cbor/RS0006/Drive-Constant-Efficiency.RS0006.a205.cbor") + RS0006_fixture() : RS_fixture(TEST205_INPUT_EXAMPLES_DIR"/build/examples/cbor/RS0006/Drive-Constant-Efficiency.RS0006.a205.cbor") { } }; diff --git a/libtk205/test/main_libtk205.cpp b/libtk205/test/main_libtk205.cpp index 41153fa..14de1b3 100644 --- a/libtk205/test/main_libtk205.cpp +++ b/libtk205/test/main_libtk205.cpp @@ -6,6 +6,7 @@ #include "fixtures_libtk205.hpp" #include "libtk205.h" +#include using namespace libtk205_NS; @@ -81,10 +82,14 @@ void Display_message(ASHRAE205_NS::msg_severity severity, const std::string &mes {msg_severity::WARN, "WARN"}, {msg_severity::ERR, "ERR"} }; - if (severity >= msg_severity::WARN) + if (severity <= msg_severity::WARN) { std::cout << severity_str[severity] << ": " << message << std::endl; } + else + { + throw std::invalid_argument(message); + } } void Btwxt_message(const Btwxt::MsgLevel messageType, const std::string message, diff --git a/poetry.lock b/poetry.lock new file mode 100644 index 0000000..64adbd1 --- /dev/null +++ b/poetry.lock @@ -0,0 +1,886 @@ +[[package]] +name = "astroid" +version = "2.4.2" +description = "An abstract syntax tree for Python with inference support." +category = "dev" +optional = false +python-versions = ">=3.5" + +[package.dependencies] +lazy-object-proxy = ">=1.4.0,<1.5.0" +six = ">=1.12,<2.0" +typed-ast = {version = ">=1.4.0,<1.5", markers = "implementation_name == \"cpython\" and python_version < \"3.8\""} +wrapt = ">=1.11,<2.0" + +[[package]] +name = "atomicwrites" +version = "1.4.0" +description = "Atomic file writes." +category = "dev" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + +[[package]] +name = "attrs" +version = "20.3.0" +description = "Classes Without Boilerplate" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + +[package.extras] +dev = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "zope.interface", "furo", "sphinx", "pre-commit"] +docs = ["furo", "sphinx", "zope.interface"] +tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "zope.interface"] +tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six"] + +[[package]] +name = "cbor2" +version = "5.2.0" +description = "Pure Python CBOR (de)serializer with extensive tag support" +category = "main" +optional = false +python-versions = "*" + +[package.extras] +test = ["pytest", "pytest-cov"] + +[[package]] +name = "chardet" +version = "4.0.0" +description = "Universal encoding detector for Python 2 and 3" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" + +[[package]] +name = "click" +version = "7.1.2" +description = "Composable command line interface toolkit" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" + +[[package]] +name = "cloudpickle" +version = "1.6.0" +description = "Extended pickling support for Python objects" +category = "dev" +optional = false +python-versions = ">=3.5" + +[[package]] +name = "colorama" +version = "0.4.4" +description = "Cross-platform colored terminal text." +category = "dev" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" + +[[package]] +name = "dataproperty" +version = "0.50.0" +description = "Python library for extract property from data." +category = "main" +optional = false +python-versions = ">=3.5" + +[package.dependencies] +mbstrdecoder = ">=1.0.0,<2" +typepy = {version = ">=1.1.1,<2", extras = ["datetime"]} + +[package.extras] +logging = ["loguru (>=0.4.1,<1)"] +test = ["pytest", "pytest-md-report", "termcolor"] + +[[package]] +name = "doit" +version = "0.33.1" +description = "doit - Automation Tool" +category = "dev" +optional = false +python-versions = ">=3.5" + +[package.dependencies] +cloudpickle = "*" +macfsevents = {version = "*", markers = "sys_platform == \"darwin\""} +pyinotify = {version = "*", markers = "sys_platform == \"linux\""} + +[[package]] +name = "et-xmlfile" +version = "1.0.1" +description = "An implementation of lxml.xmlfile for the standard library" +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "gitdb" +version = "4.0.5" +description = "Git Object Database" +category = "dev" +optional = false +python-versions = ">=3.4" + +[package.dependencies] +smmap = ">=3.0.1,<4" + +[[package]] +name = "gitpython" +version = "3.1.12" +description = "Python Git Library" +category = "dev" +optional = false +python-versions = ">=3.4" + +[package.dependencies] +gitdb = ">=4.0.1,<5" + +[[package]] +name = "importlib-metadata" +version = "3.4.0" +description = "Read metadata from Python packages" +category = "main" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +typing-extensions = {version = ">=3.6.4", markers = "python_version < \"3.8\""} +zipp = ">=0.5" + +[package.extras] +docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] +testing = ["pytest (>=3.5,!=3.7.3)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pytest-cov", "pytest-enabler", "packaging", "pep517", "pyfakefs", "flufl.flake8", "pytest-black (>=0.3.7)", "pytest-mypy", "importlib-resources (>=1.3)"] + +[[package]] +name = "iniconfig" +version = "1.1.1" +description = "iniconfig: brain-dead simple config-ini parsing" +category = "dev" +optional = false +python-versions = "*" + +[[package]] +name = "isort" +version = "5.7.0" +description = "A Python utility / library to sort Python imports." +category = "dev" +optional = false +python-versions = ">=3.6,<4.0" + +[package.extras] +pipfile_deprecated_finder = ["pipreqs", "requirementslib"] +requirements_deprecated_finder = ["pipreqs", "pip-api"] +colors = ["colorama (>=0.4.3,<0.5.0)"] + +[[package]] +name = "jdcal" +version = "1.4.1" +description = "Julian dates from proleptic Gregorian and Julian calendars." +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "jinja2" +version = "2.11.2" +description = "A very fast and expressive template engine." +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" + +[package.dependencies] +MarkupSafe = ">=0.23" + +[package.extras] +i18n = ["Babel (>=0.8)"] + +[[package]] +name = "jsonschema" +version = "3.2.0" +description = "An implementation of JSON Schema validation for Python" +category = "main" +optional = false +python-versions = "*" + +[package.dependencies] +attrs = ">=17.4.0" +importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} +pyrsistent = ">=0.14.0" +six = ">=1.11.0" + +[package.extras] +format = ["idna", "jsonpointer (>1.13)", "rfc3987", "strict-rfc3339", "webcolors"] +format_nongpl = ["idna", "jsonpointer (>1.13)", "webcolors", "rfc3986-validator (>0.1.0)", "rfc3339-validator"] + +[[package]] +name = "lazy-object-proxy" +version = "1.4.3" +description = "A fast and thorough lazy object proxy." +category = "dev" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + +[[package]] +name = "macfsevents" +version = "0.8.1" +description = "Thread-based interface to file system observation primitives." +category = "dev" +optional = false +python-versions = "*" + +[[package]] +name = "markdown" +version = "3.3.3" +description = "Python implementation of Markdown." +category = "dev" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} + +[package.extras] +testing = ["coverage", "pyyaml"] + +[[package]] +name = "markupsafe" +version = "1.1.1" +description = "Safely add untrusted strings to HTML/XML markup." +category = "main" +optional = false +python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*" + +[[package]] +name = "mbstrdecoder" +version = "1.0.1" +description = "multi-byte character string decoder" +category = "main" +optional = false +python-versions = ">=3.5" + +[package.dependencies] +chardet = ">=3.0.4,<5" + +[package.extras] +test = ["Faker (>=1.0.2)", "pytest (>=6.0.1)", "pytest-md-report (>=0.1)"] + +[[package]] +name = "mccabe" +version = "0.6.1" +description = "McCabe checker, plugin for flake8" +category = "dev" +optional = false +python-versions = "*" + +[[package]] +name = "msgfy" +version = "0.1.0" +description = "msgfy is a Python library for convert Exception instance to a human-readable error message." +category = "main" +optional = false +python-versions = ">=3.5" + +[package.extras] +test = ["pytest"] + +[[package]] +name = "openpyxl" +version = "3.0.6" +description = "A Python library to read/write Excel 2010 xlsx/xlsm files" +category = "main" +optional = false +python-versions = ">=3.6," + +[package.dependencies] +et-xmlfile = "*" +jdcal = "*" + +[[package]] +name = "packaging" +version = "20.8" +description = "Core utilities for Python packages" +category = "dev" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + +[package.dependencies] +pyparsing = ">=2.0.2" + +[[package]] +name = "pathvalidate" +version = "2.3.2" +description = "pathvalidate is a Python library to sanitize/validate a string such as filenames/file-paths/etc." +category = "main" +optional = false +python-versions = ">=3.5" + +[package.extras] +test = ["allpairspy", "click", "faker", "pytest (>=6.0.1)", "pytest-md-report (>=0.0.12)", "pytest-discord (>=0.0.5)"] + +[[package]] +name = "pluggy" +version = "0.13.1" +description = "plugin and hook calling mechanisms for python" +category = "dev" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + +[package.dependencies] +importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} + +[package.extras] +dev = ["pre-commit", "tox"] + +[[package]] +name = "py" +version = "1.10.0" +description = "library with cross-python path, ini-parsing, io, code, log facilities" +category = "dev" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + +[[package]] +name = "pyinotify" +version = "0.9.6" +description = "Linux filesystem events monitoring" +category = "dev" +optional = false +python-versions = "*" + +[[package]] +name = "pylint" +version = "2.6.0" +description = "python code static checker" +category = "dev" +optional = false +python-versions = ">=3.5.*" + +[package.dependencies] +astroid = ">=2.4.0,<=2.5" +colorama = {version = "*", markers = "sys_platform == \"win32\""} +isort = ">=4.2.5,<6" +mccabe = ">=0.6,<0.7" +toml = ">=0.7.1" + +[[package]] +name = "pyparsing" +version = "2.4.7" +description = "Python parsing module" +category = "dev" +optional = false +python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" + +[[package]] +name = "pyrsistent" +version = "0.17.3" +description = "Persistent/Functional/Immutable data structures" +category = "main" +optional = false +python-versions = ">=3.5" + +[[package]] +name = "pytablewriter" +version = "0.58.0" +description = "pytablewriter is a Python library to write a table in various formats: CSV / Elasticsearch / HTML / JavaScript / JSON / LaTeX / LDJSON / LTSV / Markdown / MediaWiki / NumPy / Excel / Pandas / Python / reStructuredText / SQLite / TOML / TSV / YAML." +category = "main" +optional = false +python-versions = ">=3.5" + +[package.dependencies] +DataProperty = ">=0.50.0,<2" +mbstrdecoder = ">=1.0.0,<2" +msgfy = ">=0.1.0,<1" +pathvalidate = ">=2.3.0,<3" +tabledata = ">=1.1.3,<2" +tcolorpy = ">=0.0.5,<1" +typepy = {version = ">=1.1.1,<2", extras = ["datetime"]} + +[package.extras] +all = ["xlwt", "XlsxWriter (>=0.9.6,<2)", "elasticsearch (>=7.0.5,<8)", "pytablereader (>=0.30.0,<2)", "dominate (>=2.1.5,<3)", "loguru (>=0.4.1,<1)", "SimpleSQLite (>=1.1.3,<2)", "pytablewriter-altrow-theme (>=0.0.2,<1)", "toml (>=0.9.3,<1)", "PyYAML (>=3.11,<6)", "simplejson (>=3.8.1,<4)"] +docs = ["sphinx-rtd-theme", "Sphinx (>=2.4)"] +es = ["elasticsearch (>=7.0.5,<8)"] +es5 = ["elasticsearch (>=5.5.3,<6)"] +es6 = ["elasticsearch (>=6.3.1,<7)"] +es7 = ["elasticsearch (>=7.0.5,<8)"] +excel = ["xlwt", "XlsxWriter (>=0.9.6,<2)"] +from = ["pytablereader (>=0.30.0,<2)"] +html = ["dominate (>=2.1.5,<3)"] +logging = ["loguru (>=0.4.1,<1)"] +sqlite = ["SimpleSQLite (>=1.1.3,<2)"] +test = ["XlsxWriter (>=0.9.6,<2)", "SimpleSQLite (>=1.1.3,<2)", "pytablereader (>=0.30.0,<2)", "pytest-md-report (>=0.1)", "pytest-discord (>=0.0.5)", "dominate (>=2.1.5,<3)", "loguru (>=0.4.1,<1)", "toml (>=0.9.3,<1)", "tablib", "elasticsearch (>=7.0.5,<8)", "pytest (>=6.0.1)", "sqliteschema", "xlwt", "pytablereader[sqlite,excel] (>=0.29)", "PyYAML (>=3.11,<6)", "simplejson (>=3.8.1,<4)", "pytablewriter-altrow-theme (>=0.0.2,<1)"] +theme = ["pytablewriter-altrow-theme (>=0.0.2,<1)"] +toml = ["toml (>=0.9.3,<1)"] +yaml = ["PyYAML (>=3.11,<6)"] + +[[package]] +name = "pytest" +version = "6.2.1" +description = "pytest: simple powerful testing with Python" +category = "dev" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +atomicwrites = {version = ">=1.0", markers = "sys_platform == \"win32\""} +attrs = ">=19.2.0" +colorama = {version = "*", markers = "sys_platform == \"win32\""} +importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} +iniconfig = "*" +packaging = "*" +pluggy = ">=0.12,<1.0.0a1" +py = ">=1.8.2" +toml = "*" + +[package.extras] +testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xmlschema"] + +[[package]] +name = "python-dateutil" +version = "2.8.1" +description = "Extensions to the standard Python datetime module" +category = "main" +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" + +[package.dependencies] +six = ">=1.5" + +[[package]] +name = "pytz" +version = "2020.5" +description = "World timezone definitions, modern and historical" +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "pyyaml" +version = "5.4" +description = "YAML parser and emitter for Python" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" + +[[package]] +name = "schema205" +version = "0.1.0" +description = "" +category = "main" +optional = false +python-versions = "^3.6" +develop = true + +[package.dependencies] +jinja2 = "*" +jsonschema = "*" +pytablewriter = "*" +pyyaml = "*" + +[package.source] +type = "directory" +url = "schema-205" + +[[package]] +name = "six" +version = "1.15.0" +description = "Python 2 and 3 compatibility utilities" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" + +[[package]] +name = "smmap" +version = "3.0.4" +description = "A pure Python implementation of a sliding window memory map manager" +category = "dev" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + +[[package]] +name = "tabledata" +version = "1.1.3" +description = "tabledata is a Python library to represent tabular data. Used for pytablewriter/pytablereader/SimpleSQLite." +category = "main" +optional = false +python-versions = ">=3.5" + +[package.dependencies] +DataProperty = ">=0.50.0,<2" +typepy = ">=1.1.1,<2" + +[package.extras] +logging = ["loguru (>=0.4.1,<1)"] +test = ["pytablewriter (>=0.46)", "pytest"] + +[[package]] +name = "tcolorpy" +version = "0.0.8" +description = "tcolopy is a Python library to apply true color for terminal text." +category = "main" +optional = false +python-versions = ">=3.5" + +[package.extras] +test = ["pytest", "pytest-md-report (>=0.1)"] + +[[package]] +name = "toml" +version = "0.10.2" +description = "Python Library for Tom's Obvious, Minimal Language" +category = "dev" +optional = false +python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" + +[[package]] +name = "typed-ast" +version = "1.4.2" +description = "a fork of Python 2 and 3 ast modules with type comment support" +category = "dev" +optional = false +python-versions = "*" + +[[package]] +name = "typepy" +version = "1.1.2" +description = "typepy is a Python library for variable type checker/validator/converter at a run time." +category = "main" +optional = false +python-versions = ">=3.5" + +[package.dependencies] +mbstrdecoder = ">=1.0.0,<2" +python-dateutil = {version = ">=2.8.0,<3.0.0", optional = true, markers = "extra == \"datetime\""} +pytz = {version = ">=2018.9", optional = true, markers = "extra == \"datetime\""} + +[package.extras] +datetime = ["python-dateutil (>=2.8.0,<3.0.0)", "pytz (>=2018.9)"] +test = ["pytest", "tcolorpy", "python-dateutil (>=2.8.0,<3.0.0)", "pytz (>=2018.9)"] + +[[package]] +name = "typing-extensions" +version = "3.7.4.3" +description = "Backported and Experimental Type Hints for Python 3.5+" +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "wrapt" +version = "1.12.1" +description = "Module for decorators, wrappers and monkey patching." +category = "dev" +optional = false +python-versions = "*" + +[[package]] +name = "zipp" +version = "3.4.0" +description = "Backport of pathlib-compatible object wrapper for zip files" +category = "main" +optional = false +python-versions = ">=3.6" + +[package.extras] +docs = ["sphinx", "jaraco.packaging (>=3.2)", "rst.linker (>=1.9)"] +testing = ["pytest (>=3.5,!=3.7.3)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pytest-cov", "jaraco.test (>=3.2.0)", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy"] + +[metadata] +lock-version = "1.1" +python-versions = "^3.6" +content-hash = "c5b42f9c4592f8f618d793c3f29b0b9a295ad3335c6d6882dafa22ce56abf1ba" + +[metadata.files] +astroid = [ + {file = "astroid-2.4.2-py3-none-any.whl", hash = "sha256:bc58d83eb610252fd8de6363e39d4f1d0619c894b0ed24603b881c02e64c7386"}, + {file = "astroid-2.4.2.tar.gz", hash = "sha256:2f4078c2a41bf377eea06d71c9d2ba4eb8f6b1af2135bec27bbbb7d8f12bb703"}, +] +atomicwrites = [ + {file = "atomicwrites-1.4.0-py2.py3-none-any.whl", hash = "sha256:6d1784dea7c0c8d4a5172b6c620f40b6e4cbfdf96d783691f2e1302a7b88e197"}, + {file = "atomicwrites-1.4.0.tar.gz", hash = "sha256:ae70396ad1a434f9c7046fd2dd196fc04b12f9e91ffb859164193be8b6168a7a"}, +] +attrs = [ + {file = "attrs-20.3.0-py2.py3-none-any.whl", hash = "sha256:31b2eced602aa8423c2aea9c76a724617ed67cf9513173fd3a4f03e3a929c7e6"}, + {file = "attrs-20.3.0.tar.gz", hash = "sha256:832aa3cde19744e49938b91fea06d69ecb9e649c93ba974535d08ad92164f700"}, +] +cbor2 = [ + {file = "cbor2-5.2.0.tar.gz", hash = "sha256:a33aa2e5534fd74401ac95686886e655e3b2ce6383b3f958199b6e70a87c94bf"}, +] +chardet = [ + {file = "chardet-4.0.0-py2.py3-none-any.whl", hash = "sha256:f864054d66fd9118f2e67044ac8981a54775ec5b67aed0441892edb553d21da5"}, + {file = "chardet-4.0.0.tar.gz", hash = "sha256:0d6f53a15db4120f2b08c94f11e7d93d2c911ee118b6b30a04ec3ee8310179fa"}, +] +click = [ + {file = "click-7.1.2-py2.py3-none-any.whl", hash = "sha256:dacca89f4bfadd5de3d7489b7c8a566eee0d3676333fbb50030263894c38c0dc"}, + {file = "click-7.1.2.tar.gz", hash = "sha256:d2b5255c7c6349bc1bd1e59e08cd12acbbd63ce649f2588755783aa94dfb6b1a"}, +] +cloudpickle = [ + {file = "cloudpickle-1.6.0-py3-none-any.whl", hash = "sha256:3a32d0eb0bc6f4d0c57fbc4f3e3780f7a81e6fee0fa935072884d58ae8e1cc7c"}, + {file = "cloudpickle-1.6.0.tar.gz", hash = "sha256:9bc994f9e9447593bd0a45371f0e7ac7333710fcf64a4eb9834bf149f4ef2f32"}, +] +colorama = [ + {file = "colorama-0.4.4-py2.py3-none-any.whl", hash = "sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2"}, + {file = "colorama-0.4.4.tar.gz", hash = "sha256:5941b2b48a20143d2267e95b1c2a7603ce057ee39fd88e7329b0c292aa16869b"}, +] +dataproperty = [ + {file = "DataProperty-0.50.0-py3-none-any.whl", hash = "sha256:9288b74f5d6e07d4c69c218802556f877d711fce2c62abc6aea286b357e84be2"}, + {file = "DataProperty-0.50.0.tar.gz", hash = "sha256:847f2d8927d8426a0eb20e48238e2db19133506bcd1e2608e21314004fa80d72"}, +] +doit = [ + {file = "doit-0.33.1-py3-none-any.whl", hash = "sha256:211fc0de3fd9ee31e5c4ccb36bc1a4054b5c4a4a44f915ca413896155b684bfa"}, + {file = "doit-0.33.1.tar.gz", hash = "sha256:37c3b35c2151647b968b2af24481112b2f813c30f695366db0639d529190a143"}, +] +et-xmlfile = [ + {file = "et_xmlfile-1.0.1.tar.gz", hash = "sha256:614d9722d572f6246302c4491846d2c393c199cfa4edc9af593437691683335b"}, +] +gitdb = [ + {file = "gitdb-4.0.5-py3-none-any.whl", hash = "sha256:91f36bfb1ab7949b3b40e23736db18231bf7593edada2ba5c3a174a7b23657ac"}, + {file = "gitdb-4.0.5.tar.gz", hash = "sha256:c9e1f2d0db7ddb9a704c2a0217be31214e91a4fe1dea1efad19ae42ba0c285c9"}, +] +gitpython = [ + {file = "GitPython-3.1.12-py3-none-any.whl", hash = "sha256:867ec3dfb126aac0f8296b19fb63b8c4a399f32b4b6fafe84c4b10af5fa9f7b5"}, + {file = "GitPython-3.1.12.tar.gz", hash = "sha256:42dbefd8d9e2576c496ed0059f3103dcef7125b9ce16f9d5f9c834aed44a1dac"}, +] +importlib-metadata = [ + {file = "importlib_metadata-3.4.0-py3-none-any.whl", hash = "sha256:ace61d5fc652dc280e7b6b4ff732a9c2d40db2c0f92bc6cb74e07b73d53a1771"}, + {file = "importlib_metadata-3.4.0.tar.gz", hash = "sha256:fa5daa4477a7414ae34e95942e4dd07f62adf589143c875c133c1e53c4eff38d"}, +] +iniconfig = [ + {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"}, + {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"}, +] +isort = [ + {file = "isort-5.7.0-py3-none-any.whl", hash = "sha256:fff4f0c04e1825522ce6949973e83110a6e907750cd92d128b0d14aaaadbffdc"}, + {file = "isort-5.7.0.tar.gz", hash = "sha256:c729845434366216d320e936b8ad6f9d681aab72dc7cbc2d51bedc3582f3ad1e"}, +] +jdcal = [ + {file = "jdcal-1.4.1-py2.py3-none-any.whl", hash = "sha256:1abf1305fce18b4e8aa248cf8fe0c56ce2032392bc64bbd61b5dff2a19ec8bba"}, + {file = "jdcal-1.4.1.tar.gz", hash = "sha256:472872e096eb8df219c23f2689fc336668bdb43d194094b5cc1707e1640acfc8"}, +] +jinja2 = [ + {file = "Jinja2-2.11.2-py2.py3-none-any.whl", hash = "sha256:f0a4641d3cf955324a89c04f3d94663aa4d638abe8f733ecd3582848e1c37035"}, + {file = "Jinja2-2.11.2.tar.gz", hash = "sha256:89aab215427ef59c34ad58735269eb58b1a5808103067f7bb9d5836c651b3bb0"}, +] +jsonschema = [ + {file = "jsonschema-3.2.0-py2.py3-none-any.whl", hash = "sha256:4e5b3cf8216f577bee9ce139cbe72eca3ea4f292ec60928ff24758ce626cd163"}, + {file = "jsonschema-3.2.0.tar.gz", hash = "sha256:c8a85b28d377cc7737e46e2d9f2b4f44ee3c0e1deac6bf46ddefc7187d30797a"}, +] +lazy-object-proxy = [ + {file = "lazy-object-proxy-1.4.3.tar.gz", hash = "sha256:f3900e8a5de27447acbf900b4750b0ddfd7ec1ea7fbaf11dfa911141bc522af0"}, + {file = "lazy_object_proxy-1.4.3-cp27-cp27m-macosx_10_13_x86_64.whl", hash = "sha256:a2238e9d1bb71a56cd710611a1614d1194dc10a175c1e08d75e1a7bcc250d442"}, + {file = "lazy_object_proxy-1.4.3-cp27-cp27m-win32.whl", hash = "sha256:efa1909120ce98bbb3777e8b6f92237f5d5c8ea6758efea36a473e1d38f7d3e4"}, + {file = "lazy_object_proxy-1.4.3-cp27-cp27m-win_amd64.whl", hash = "sha256:4677f594e474c91da97f489fea5b7daa17b5517190899cf213697e48d3902f5a"}, + {file = "lazy_object_proxy-1.4.3-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:0c4b206227a8097f05c4dbdd323c50edf81f15db3b8dc064d08c62d37e1a504d"}, + {file = "lazy_object_proxy-1.4.3-cp34-cp34m-manylinux1_x86_64.whl", hash = "sha256:d945239a5639b3ff35b70a88c5f2f491913eb94871780ebfabb2568bd58afc5a"}, + {file = "lazy_object_proxy-1.4.3-cp34-cp34m-win32.whl", hash = "sha256:9651375199045a358eb6741df3e02a651e0330be090b3bc79f6d0de31a80ec3e"}, + {file = "lazy_object_proxy-1.4.3-cp34-cp34m-win_amd64.whl", hash = "sha256:eba7011090323c1dadf18b3b689845fd96a61ba0a1dfbd7f24b921398affc357"}, + {file = "lazy_object_proxy-1.4.3-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:48dab84ebd4831077b150572aec802f303117c8cc5c871e182447281ebf3ac50"}, + {file = "lazy_object_proxy-1.4.3-cp35-cp35m-win32.whl", hash = "sha256:ca0a928a3ddbc5725be2dd1cf895ec0a254798915fb3a36af0964a0a4149e3db"}, + {file = "lazy_object_proxy-1.4.3-cp35-cp35m-win_amd64.whl", hash = "sha256:194d092e6f246b906e8f70884e620e459fc54db3259e60cf69a4d66c3fda3449"}, + {file = "lazy_object_proxy-1.4.3-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:97bb5884f6f1cdce0099f86b907aa41c970c3c672ac8b9c8352789e103cf3156"}, + {file = "lazy_object_proxy-1.4.3-cp36-cp36m-win32.whl", hash = "sha256:cb2c7c57005a6804ab66f106ceb8482da55f5314b7fcb06551db1edae4ad1531"}, + {file = "lazy_object_proxy-1.4.3-cp36-cp36m-win_amd64.whl", hash = "sha256:8d859b89baf8ef7f8bc6b00aa20316483d67f0b1cbf422f5b4dc56701c8f2ffb"}, + {file = "lazy_object_proxy-1.4.3-cp37-cp37m-macosx_10_13_x86_64.whl", hash = "sha256:1be7e4c9f96948003609aa6c974ae59830a6baecc5376c25c92d7d697e684c08"}, + {file = "lazy_object_proxy-1.4.3-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:d74bb8693bf9cf75ac3b47a54d716bbb1a92648d5f781fc799347cfc95952383"}, + {file = "lazy_object_proxy-1.4.3-cp37-cp37m-win32.whl", hash = "sha256:9b15f3f4c0f35727d3a0fba4b770b3c4ebbb1fa907dbcc046a1d2799f3edd142"}, + {file = "lazy_object_proxy-1.4.3-cp37-cp37m-win_amd64.whl", hash = "sha256:9254f4358b9b541e3441b007a0ea0764b9d056afdeafc1a5569eee1cc6c1b9ea"}, + {file = "lazy_object_proxy-1.4.3-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:a6ae12d08c0bf9909ce12385803a543bfe99b95fe01e752536a60af2b7797c62"}, + {file = "lazy_object_proxy-1.4.3-cp38-cp38-win32.whl", hash = "sha256:5541cada25cd173702dbd99f8e22434105456314462326f06dba3e180f203dfd"}, + {file = "lazy_object_proxy-1.4.3-cp38-cp38-win_amd64.whl", hash = "sha256:59f79fef100b09564bc2df42ea2d8d21a64fdcda64979c0fa3db7bdaabaf6239"}, +] +macfsevents = [ + {file = "MacFSEvents-0.8.1.tar.gz", hash = "sha256:1324b66b356051de662ba87d84f73ada062acd42b047ed1246e60a449f833e10"}, +] +markdown = [ + {file = "Markdown-3.3.3-py3-none-any.whl", hash = "sha256:c109c15b7dc20a9ac454c9e6025927d44460b85bd039da028d85e2b6d0bcc328"}, + {file = "Markdown-3.3.3.tar.gz", hash = "sha256:5d9f2b5ca24bc4c7a390d22323ca4bad200368612b5aaa7796babf971d2b2f18"}, +] +markupsafe = [ + {file = "MarkupSafe-1.1.1-cp27-cp27m-macosx_10_6_intel.whl", hash = "sha256:09027a7803a62ca78792ad89403b1b7a73a01c8cb65909cd876f7fcebd79b161"}, + {file = "MarkupSafe-1.1.1-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:e249096428b3ae81b08327a63a485ad0878de3fb939049038579ac0ef61e17e7"}, + {file = "MarkupSafe-1.1.1-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:500d4957e52ddc3351cabf489e79c91c17f6e0899158447047588650b5e69183"}, + {file = "MarkupSafe-1.1.1-cp27-cp27m-win32.whl", hash = "sha256:b2051432115498d3562c084a49bba65d97cf251f5a331c64a12ee7e04dacc51b"}, + {file = "MarkupSafe-1.1.1-cp27-cp27m-win_amd64.whl", hash = "sha256:98c7086708b163d425c67c7a91bad6e466bb99d797aa64f965e9d25c12111a5e"}, + {file = "MarkupSafe-1.1.1-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:cd5df75523866410809ca100dc9681e301e3c27567cf498077e8551b6d20e42f"}, + {file = "MarkupSafe-1.1.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:43a55c2930bbc139570ac2452adf3d70cdbb3cfe5912c71cdce1c2c6bbd9c5d1"}, + {file = "MarkupSafe-1.1.1-cp34-cp34m-macosx_10_6_intel.whl", hash = "sha256:1027c282dad077d0bae18be6794e6b6b8c91d58ed8a8d89a89d59693b9131db5"}, + {file = "MarkupSafe-1.1.1-cp34-cp34m-manylinux1_i686.whl", hash = "sha256:62fe6c95e3ec8a7fad637b7f3d372c15ec1caa01ab47926cfdf7a75b40e0eac1"}, + {file = "MarkupSafe-1.1.1-cp34-cp34m-manylinux1_x86_64.whl", hash = "sha256:88e5fcfb52ee7b911e8bb6d6aa2fd21fbecc674eadd44118a9cc3863f938e735"}, + {file = "MarkupSafe-1.1.1-cp34-cp34m-win32.whl", hash = "sha256:ade5e387d2ad0d7ebf59146cc00c8044acbd863725f887353a10df825fc8ae21"}, + {file = "MarkupSafe-1.1.1-cp34-cp34m-win_amd64.whl", hash = "sha256:09c4b7f37d6c648cb13f9230d847adf22f8171b1ccc4d5682398e77f40309235"}, + {file = "MarkupSafe-1.1.1-cp35-cp35m-macosx_10_6_intel.whl", hash = "sha256:79855e1c5b8da654cf486b830bd42c06e8780cea587384cf6545b7d9ac013a0b"}, + {file = "MarkupSafe-1.1.1-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:c8716a48d94b06bb3b2524c2b77e055fb313aeb4ea620c8dd03a105574ba704f"}, + {file = "MarkupSafe-1.1.1-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:7c1699dfe0cf8ff607dbdcc1e9b9af1755371f92a68f706051cc8c37d447c905"}, + {file = "MarkupSafe-1.1.1-cp35-cp35m-win32.whl", hash = "sha256:6dd73240d2af64df90aa7c4e7481e23825ea70af4b4922f8ede5b9e35f78a3b1"}, + {file = "MarkupSafe-1.1.1-cp35-cp35m-win_amd64.whl", hash = "sha256:9add70b36c5666a2ed02b43b335fe19002ee5235efd4b8a89bfcf9005bebac0d"}, + {file = "MarkupSafe-1.1.1-cp36-cp36m-macosx_10_6_intel.whl", hash = "sha256:24982cc2533820871eba85ba648cd53d8623687ff11cbb805be4ff7b4c971aff"}, + {file = "MarkupSafe-1.1.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:00bc623926325b26bb9605ae9eae8a215691f33cae5df11ca5424f06f2d1f473"}, + {file = "MarkupSafe-1.1.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:717ba8fe3ae9cc0006d7c451f0bb265ee07739daf76355d06366154ee68d221e"}, + {file = "MarkupSafe-1.1.1-cp36-cp36m-win32.whl", hash = "sha256:535f6fc4d397c1563d08b88e485c3496cf5784e927af890fb3c3aac7f933ec66"}, + {file = "MarkupSafe-1.1.1-cp36-cp36m-win_amd64.whl", hash = "sha256:b1282f8c00509d99fef04d8ba936b156d419be841854fe901d8ae224c59f0be5"}, + {file = "MarkupSafe-1.1.1-cp37-cp37m-macosx_10_6_intel.whl", hash = "sha256:8defac2f2ccd6805ebf65f5eeb132adcf2ab57aa11fdf4c0dd5169a004710e7d"}, + {file = "MarkupSafe-1.1.1-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:46c99d2de99945ec5cb54f23c8cd5689f6d7177305ebff350a58ce5f8de1669e"}, + {file = "MarkupSafe-1.1.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:ba59edeaa2fc6114428f1637ffff42da1e311e29382d81b339c1817d37ec93c6"}, + {file = "MarkupSafe-1.1.1-cp37-cp37m-win32.whl", hash = "sha256:b00c1de48212e4cc9603895652c5c410df699856a2853135b3967591e4beebc2"}, + {file = "MarkupSafe-1.1.1-cp37-cp37m-win_amd64.whl", hash = "sha256:9bf40443012702a1d2070043cb6291650a0841ece432556f784f004937f0f32c"}, + {file = "MarkupSafe-1.1.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6788b695d50a51edb699cb55e35487e430fa21f1ed838122d722e0ff0ac5ba15"}, + {file = "MarkupSafe-1.1.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:cdb132fc825c38e1aeec2c8aa9338310d29d337bebbd7baa06889d09a60a1fa2"}, + {file = "MarkupSafe-1.1.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:13d3144e1e340870b25e7b10b98d779608c02016d5184cfb9927a9f10c689f42"}, + {file = "MarkupSafe-1.1.1-cp38-cp38-win32.whl", hash = "sha256:596510de112c685489095da617b5bcbbac7dd6384aeebeda4df6025d0256a81b"}, + {file = "MarkupSafe-1.1.1-cp38-cp38-win_amd64.whl", hash = "sha256:e8313f01ba26fbbe36c7be1966a7b7424942f670f38e666995b88d012765b9be"}, + {file = "MarkupSafe-1.1.1.tar.gz", hash = "sha256:29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b"}, +] +mbstrdecoder = [ + {file = "mbstrdecoder-1.0.1-py3-none-any.whl", hash = "sha256:56b967800d6554815a6b18f98f915e84912852eff21d94d5e036fe124bc27f53"}, + {file = "mbstrdecoder-1.0.1.tar.gz", hash = "sha256:f895e1fb97496855ab5e43de99588787169c01f782c71625142d1a62729e9f9d"}, +] +mccabe = [ + {file = "mccabe-0.6.1-py2.py3-none-any.whl", hash = "sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42"}, + {file = "mccabe-0.6.1.tar.gz", hash = "sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f"}, +] +msgfy = [ + {file = "msgfy-0.1.0-py3-none-any.whl", hash = "sha256:ce8a8c8c223279fa0a2c0f278eec139fcf761ca4eb98f179f54a1b96f53514f5"}, + {file = "msgfy-0.1.0.tar.gz", hash = "sha256:474c08302cd56ccee1300ac7976a01ebd1e42716fc9bcd947d39a311a15b7012"}, +] +openpyxl = [ + {file = "openpyxl-3.0.6-py2.py3-none-any.whl", hash = "sha256:1a4b3869c2500b5c713e8e28341cdada49ecfcff1b10cd9006945f5bcefc090d"}, + {file = "openpyxl-3.0.6.tar.gz", hash = "sha256:b229112b46e158b910a5d1b270b212c42773d39cab24e8db527f775b82afc041"}, +] +packaging = [ + {file = "packaging-20.8-py2.py3-none-any.whl", hash = "sha256:24e0da08660a87484d1602c30bb4902d74816b6985b93de36926f5bc95741858"}, + {file = "packaging-20.8.tar.gz", hash = "sha256:78598185a7008a470d64526a8059de9aaa449238f280fc9eb6b13ba6c4109093"}, +] +pathvalidate = [ + {file = "pathvalidate-2.3.2-py3-none-any.whl", hash = "sha256:cae8ad5cd9223c5c1f4bc4e2ef0cd4c5e89acd2d698fdb7610ee108b9be654d2"}, + {file = "pathvalidate-2.3.2.tar.gz", hash = "sha256:378c8b319838a255c00ab37f664686b75f0aabea4444d6c5a34effbec6738285"}, +] +pluggy = [ + {file = "pluggy-0.13.1-py2.py3-none-any.whl", hash = "sha256:966c145cd83c96502c3c3868f50408687b38434af77734af1e9ca461a4081d2d"}, + {file = "pluggy-0.13.1.tar.gz", hash = "sha256:15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0"}, +] +py = [ + {file = "py-1.10.0-py2.py3-none-any.whl", hash = "sha256:3b80836aa6d1feeaa108e046da6423ab8f6ceda6468545ae8d02d9d58d18818a"}, + {file = "py-1.10.0.tar.gz", hash = "sha256:21b81bda15b66ef5e1a777a21c4dcd9c20ad3efd0b3f817e7a809035269e1bd3"}, +] +pyinotify = [ + {file = "pyinotify-0.9.6.tar.gz", hash = "sha256:9c998a5d7606ca835065cdabc013ae6c66eb9ea76a00a1e3bc6e0cfe2b4f71f4"}, +] +pylint = [ + {file = "pylint-2.6.0-py3-none-any.whl", hash = "sha256:bfe68f020f8a0fece830a22dd4d5dddb4ecc6137db04face4c3420a46a52239f"}, + {file = "pylint-2.6.0.tar.gz", hash = "sha256:bb4a908c9dadbc3aac18860550e870f58e1a02c9f2c204fdf5693d73be061210"}, +] +pyparsing = [ + {file = "pyparsing-2.4.7-py2.py3-none-any.whl", hash = "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b"}, + {file = "pyparsing-2.4.7.tar.gz", hash = "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1"}, +] +pyrsistent = [ + {file = "pyrsistent-0.17.3.tar.gz", hash = "sha256:2e636185d9eb976a18a8a8e96efce62f2905fea90041958d8cc2a189756ebf3e"}, +] +pytablewriter = [ + {file = "pytablewriter-0.58.0-py3-none-any.whl", hash = "sha256:763fb7717b64320188b2f55c5667f9f03c6fef3b00ac0aaafa85b6b6f2741b36"}, + {file = "pytablewriter-0.58.0.tar.gz", hash = "sha256:d232491e32fc84f28a6217fcd225d2ed82ae59d576d39724c98fdb7c7147b9ec"}, +] +pytest = [ + {file = "pytest-6.2.1-py3-none-any.whl", hash = "sha256:1969f797a1a0dbd8ccf0fecc80262312729afea9c17f1d70ebf85c5e76c6f7c8"}, + {file = "pytest-6.2.1.tar.gz", hash = "sha256:66e419b1899bc27346cb2c993e12c5e5e8daba9073c1fbce33b9807abc95c306"}, +] +python-dateutil = [ + {file = "python-dateutil-2.8.1.tar.gz", hash = "sha256:73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c"}, + {file = "python_dateutil-2.8.1-py2.py3-none-any.whl", hash = "sha256:75bb3f31ea686f1197762692a9ee6a7550b59fc6ca3a1f4b5d7e32fb98e2da2a"}, +] +pytz = [ + {file = "pytz-2020.5-py2.py3-none-any.whl", hash = "sha256:16962c5fb8db4a8f63a26646d8886e9d769b6c511543557bc84e9569fb9a9cb4"}, + {file = "pytz-2020.5.tar.gz", hash = "sha256:180befebb1927b16f6b57101720075a984c019ac16b1b7575673bea42c6c3da5"}, +] +pyyaml = [ + {file = "PyYAML-5.4-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:f7a21e3d99aa3095ef0553e7ceba36fb693998fbb1226f1392ce33681047465f"}, + {file = "PyYAML-5.4-cp27-cp27m-win32.whl", hash = "sha256:52bf0930903818e600ae6c2901f748bc4869c0c406056f679ab9614e5d21a166"}, + {file = "PyYAML-5.4-cp27-cp27m-win_amd64.whl", hash = "sha256:a36a48a51e5471513a5aea920cdad84cbd56d70a5057cca3499a637496ea379c"}, + {file = "PyYAML-5.4-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:5e7ac4e0e79a53451dc2814f6876c2fa6f71452de1498bbe29c0b54b69a986f4"}, + {file = "PyYAML-5.4-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:cc552b6434b90d9dbed6a4f13339625dc466fd82597119897e9489c953acbc22"}, + {file = "PyYAML-5.4-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:0dc9f2eb2e3c97640928dec63fd8dc1dd91e6b6ed236bd5ac00332b99b5c2ff9"}, + {file = "PyYAML-5.4-cp36-cp36m-win32.whl", hash = "sha256:5a3f345acff76cad4aa9cb171ee76c590f37394186325d53d1aa25318b0d4a09"}, + {file = "PyYAML-5.4-cp36-cp36m-win_amd64.whl", hash = "sha256:f3790156c606299ff499ec44db422f66f05a7363b39eb9d5b064f17bd7d7c47b"}, + {file = "PyYAML-5.4-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:124fd7c7bc1e95b1eafc60825f2daf67c73ce7b33f1194731240d24b0d1bf628"}, + {file = "PyYAML-5.4-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:8b818b6c5a920cbe4203b5a6b14256f0e5244338244560da89b7b0f1313ea4b6"}, + {file = "PyYAML-5.4-cp37-cp37m-win32.whl", hash = "sha256:737bd70e454a284d456aa1fa71a0b429dd527bcbf52c5c33f7c8eee81ac16b89"}, + {file = "PyYAML-5.4-cp37-cp37m-win_amd64.whl", hash = "sha256:7242790ab6c20316b8e7bb545be48d7ed36e26bbe279fd56f2c4a12510e60b4b"}, + {file = "PyYAML-5.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:cc547d3ead3754712223abb7b403f0a184e4c3eae18c9bb7fd15adef1597cc4b"}, + {file = "PyYAML-5.4-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:8635d53223b1f561b081ff4adecb828fd484b8efffe542edcfdff471997f7c39"}, + {file = "PyYAML-5.4-cp38-cp38-win32.whl", hash = "sha256:26fcb33776857f4072601502d93e1a619f166c9c00befb52826e7b774efaa9db"}, + {file = "PyYAML-5.4-cp38-cp38-win_amd64.whl", hash = "sha256:b2243dd033fd02c01212ad5c601dafb44fbb293065f430b0d3dbf03f3254d615"}, + {file = "PyYAML-5.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:31ba07c54ef4a897758563e3a0fcc60077698df10180abe4b8165d9895c00ebf"}, + {file = "PyYAML-5.4-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:02c78d77281d8f8d07a255e57abdbf43b02257f59f50cc6b636937d68efa5dd0"}, + {file = "PyYAML-5.4-cp39-cp39-win32.whl", hash = "sha256:fdc6b2cb4b19e431994f25a9160695cc59a4e861710cc6fc97161c5e845fc579"}, + {file = "PyYAML-5.4-cp39-cp39-win_amd64.whl", hash = "sha256:8bf38641b4713d77da19e91f8b5296b832e4db87338d6aeffe422d42f1ca896d"}, + {file = "PyYAML-5.4.tar.gz", hash = "sha256:3c49e39ac034fd64fd576d63bb4db53cda89b362768a67f07749d55f128ac18a"}, +] +schema205 = [] +six = [ + {file = "six-1.15.0-py2.py3-none-any.whl", hash = "sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced"}, + {file = "six-1.15.0.tar.gz", hash = "sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259"}, +] +smmap = [ + {file = "smmap-3.0.4-py2.py3-none-any.whl", hash = "sha256:54c44c197c819d5ef1991799a7e30b662d1e520f2ac75c9efbeb54a742214cf4"}, + {file = "smmap-3.0.4.tar.gz", hash = "sha256:9c98bbd1f9786d22f14b3d4126894d56befb835ec90cef151af566c7e19b5d24"}, +] +tabledata = [ + {file = "tabledata-1.1.3-py3-none-any.whl", hash = "sha256:59cc3b5f0c52ea142386b0653d3d48d2e976fe021154871982b4d234b82be747"}, + {file = "tabledata-1.1.3.tar.gz", hash = "sha256:fa4c2db55cbb198ca5e21063ae743f418d3efbba94cd4844d2f759f994df76a2"}, +] +tcolorpy = [ + {file = "tcolorpy-0.0.8-py3-none-any.whl", hash = "sha256:12b5c928572781fc7e5df5629da6342a65ec7d35efb64b5824c105b8debaaac7"}, + {file = "tcolorpy-0.0.8.tar.gz", hash = "sha256:ffbe886f1321dab88d9cfd4218ea8d93d50d6ad0875c3741dd75fe1437379406"}, +] +toml = [ + {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, + {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, +] +typed-ast = [ + {file = "typed_ast-1.4.2-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:7703620125e4fb79b64aa52427ec192822e9f45d37d4b6625ab37ef403e1df70"}, + {file = "typed_ast-1.4.2-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:c9aadc4924d4b5799112837b226160428524a9a45f830e0d0f184b19e4090487"}, + {file = "typed_ast-1.4.2-cp35-cp35m-manylinux2014_aarch64.whl", hash = "sha256:9ec45db0c766f196ae629e509f059ff05fc3148f9ffd28f3cfe75d4afb485412"}, + {file = "typed_ast-1.4.2-cp35-cp35m-win32.whl", hash = "sha256:85f95aa97a35bdb2f2f7d10ec5bbdac0aeb9dafdaf88e17492da0504de2e6400"}, + {file = "typed_ast-1.4.2-cp35-cp35m-win_amd64.whl", hash = "sha256:9044ef2df88d7f33692ae3f18d3be63dec69c4fb1b5a4a9ac950f9b4ba571606"}, + {file = "typed_ast-1.4.2-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:c1c876fd795b36126f773db9cbb393f19808edd2637e00fd6caba0e25f2c7b64"}, + {file = "typed_ast-1.4.2-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:5dcfc2e264bd8a1db8b11a892bd1647154ce03eeba94b461effe68790d8b8e07"}, + {file = "typed_ast-1.4.2-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:8db0e856712f79c45956da0c9a40ca4246abc3485ae0d7ecc86a20f5e4c09abc"}, + {file = "typed_ast-1.4.2-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:d003156bb6a59cda9050e983441b7fa2487f7800d76bdc065566b7d728b4581a"}, + {file = "typed_ast-1.4.2-cp36-cp36m-win32.whl", hash = "sha256:4c790331247081ea7c632a76d5b2a265e6d325ecd3179d06e9cf8d46d90dd151"}, + {file = "typed_ast-1.4.2-cp36-cp36m-win_amd64.whl", hash = "sha256:d175297e9533d8d37437abc14e8a83cbc68af93cc9c1c59c2c292ec59a0697a3"}, + {file = "typed_ast-1.4.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:cf54cfa843f297991b7388c281cb3855d911137223c6b6d2dd82a47ae5125a41"}, + {file = "typed_ast-1.4.2-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:b4fcdcfa302538f70929eb7b392f536a237cbe2ed9cba88e3bf5027b39f5f77f"}, + {file = "typed_ast-1.4.2-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:987f15737aba2ab5f3928c617ccf1ce412e2e321c77ab16ca5a293e7bbffd581"}, + {file = "typed_ast-1.4.2-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:37f48d46d733d57cc70fd5f30572d11ab8ed92da6e6b28e024e4a3edfb456e37"}, + {file = "typed_ast-1.4.2-cp37-cp37m-win32.whl", hash = "sha256:36d829b31ab67d6fcb30e185ec996e1f72b892255a745d3a82138c97d21ed1cd"}, + {file = "typed_ast-1.4.2-cp37-cp37m-win_amd64.whl", hash = "sha256:8368f83e93c7156ccd40e49a783a6a6850ca25b556c0fa0240ed0f659d2fe496"}, + {file = "typed_ast-1.4.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:963c80b583b0661918718b095e02303d8078950b26cc00b5e5ea9ababe0de1fc"}, + {file = "typed_ast-1.4.2-cp38-cp38-manylinux1_i686.whl", hash = "sha256:e683e409e5c45d5c9082dc1daf13f6374300806240719f95dc783d1fc942af10"}, + {file = "typed_ast-1.4.2-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:84aa6223d71012c68d577c83f4e7db50d11d6b1399a9c779046d75e24bed74ea"}, + {file = "typed_ast-1.4.2-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:a38878a223bdd37c9709d07cd357bb79f4c760b29210e14ad0fb395294583787"}, + {file = "typed_ast-1.4.2-cp38-cp38-win32.whl", hash = "sha256:a2c927c49f2029291fbabd673d51a2180038f8cd5a5b2f290f78c4516be48be2"}, + {file = "typed_ast-1.4.2-cp38-cp38-win_amd64.whl", hash = "sha256:c0c74e5579af4b977c8b932f40a5464764b2f86681327410aa028a22d2f54937"}, + {file = "typed_ast-1.4.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:07d49388d5bf7e863f7fa2f124b1b1d89d8aa0e2f7812faff0a5658c01c59aa1"}, + {file = "typed_ast-1.4.2-cp39-cp39-manylinux1_i686.whl", hash = "sha256:240296b27397e4e37874abb1df2a608a92df85cf3e2a04d0d4d61055c8305ba6"}, + {file = "typed_ast-1.4.2-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:d746a437cdbca200622385305aedd9aef68e8a645e385cc483bdc5e488f07166"}, + {file = "typed_ast-1.4.2-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:14bf1522cdee369e8f5581238edac09150c765ec1cb33615855889cf33dcb92d"}, + {file = "typed_ast-1.4.2-cp39-cp39-win32.whl", hash = "sha256:cc7b98bf58167b7f2db91a4327da24fb93368838eb84a44c472283778fc2446b"}, + {file = "typed_ast-1.4.2-cp39-cp39-win_amd64.whl", hash = "sha256:7147e2a76c75f0f64c4319886e7639e490fee87c9d25cb1d4faef1d8cf83a440"}, + {file = "typed_ast-1.4.2.tar.gz", hash = "sha256:9fc0b3cb5d1720e7141d103cf4819aea239f7d136acf9ee4a69b047b7986175a"}, +] +typepy = [ + {file = "typepy-1.1.2-py3-none-any.whl", hash = "sha256:30b4d955bc8b628e7ae39bf6f07e2a07939def893b84d7a6cd10ba49c5646717"}, + {file = "typepy-1.1.2.tar.gz", hash = "sha256:afec7feeac73d6b01fe6b23314edc17eaf8469f93783d2460c229068ae9dc588"}, +] +typing-extensions = [ + {file = "typing_extensions-3.7.4.3-py2-none-any.whl", hash = "sha256:dafc7639cde7f1b6e1acc0f457842a83e722ccca8eef5270af2d74792619a89f"}, + {file = "typing_extensions-3.7.4.3-py3-none-any.whl", hash = "sha256:7cb407020f00f7bfc3cb3e7881628838e69d8f3fcab2f64742a5e76b2f841918"}, + {file = "typing_extensions-3.7.4.3.tar.gz", hash = "sha256:99d4073b617d30288f569d3f13d2bd7548c3a7e4c8de87db09a9d29bb3a4a60c"}, +] +wrapt = [ + {file = "wrapt-1.12.1.tar.gz", hash = "sha256:b62ffa81fb85f4332a4f609cab4ac40709470da05643a082ec1eb88e6d9b97d7"}, +] +zipp = [ + {file = "zipp-3.4.0-py3-none-any.whl", hash = "sha256:102c24ef8f171fd729d46599845e95c7ab894a4cf45f5de11a44cc7444fb1108"}, + {file = "zipp-3.4.0.tar.gz", hash = "sha256:ed5eee1974372595f9e416cc7bbeeb12335201d8081ca8a0743c954d4446e5cb"}, +] diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..b6ea850 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,29 @@ +[tool.poetry] +name = "toolkit-205" +version = "0.1.0" +description = "" +authors = ["Open205"] + +[tool.poetry.dependencies] +python = "^3.6" +click = "*" +jsonschema = "*" +cbor2 = "*" +openpyxl = "*" +pyyaml = "*" +jinja2 = "*" +pytablewriter = "*" +schema205 = { path = "schema-205", develop = true } +#toolkit-205 = { path = ".", develop = true } + +[tool.poetry.dev-dependencies] +pylint = "*" +pytest = "*" +atomicwrites = "*" +markdown = "*" +doit = "*" +gitpython = "*" + +[build-system] +requires = ["poetry-core>=1.0.0"] +build-backend = "poetry.core.masonry.api" From 01416f62f5f464ed13ac71d15cbc31b39c5752b5 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Mon, 25 Jan 2021 13:11:26 -0700 Subject: [PATCH 024/154] Add local path to test files. Add poetry.lock. --- libtk205/test/fixtures_libtk205.hpp | 12 +++---- poetry.lock | 56 ++++++++++++++--------------- schema-205 | 2 +- 3 files changed, 35 insertions(+), 35 deletions(-) diff --git a/libtk205/test/fixtures_libtk205.hpp b/libtk205/test/fixtures_libtk205.hpp index 5ff273e..264eb55 100644 --- a/libtk205/test/fixtures_libtk205.hpp +++ b/libtk205/test/fixtures_libtk205.hpp @@ -22,42 +22,42 @@ class RS_fixture : public testing::Test { class RS0001_fixture : public RS_fixture { protected: - RS0001_fixture() : RS_fixture(TEST205_INPUT_EXAMPLES_DIR"/build/examples/json/RS0001/Chiller-Constant-Efficiency.RS0001.a205.json") + RS0001_fixture() : RS_fixture(TEST205_INPUT_EXAMPLES_DIR"/schema-205/examples/RS0001/Chiller-Constant-Efficiency.RS0001.a205.json") { } }; class RS0002_fixture : public RS_fixture { protected: - RS0002_fixture() : RS_fixture(TEST205_INPUT_EXAMPLES_DIR"/build/examples/json/RS0002/Unitary-Constant-Efficiency.RS0002.a205.json") + RS0002_fixture() : RS_fixture(TEST205_INPUT_EXAMPLES_DIR"/schema-205/examples/RS0002/Unitary-Constant-Efficiency.RS0002.a205.json") { } }; class RS0003_fixture : public RS_fixture { protected: - RS0003_fixture() : RS_fixture(TEST205_INPUT_EXAMPLES_DIR"/build/examples/json/RS0003/Fan-Continuous.RS0003.a205.json") + RS0003_fixture() : RS_fixture(TEST205_INPUT_EXAMPLES_DIR"/schema-205/examples/RS0003/Fan-Continuous.RS0003.a205.json") { } }; class RS0004_fixture : public RS_fixture { protected: - RS0004_fixture() : RS_fixture(TEST205_INPUT_EXAMPLES_DIR"/build/examples/json/RS0004/DX-Constant-Efficiency.RS0004.a205.json") + RS0004_fixture() : RS_fixture(TEST205_INPUT_EXAMPLES_DIR"/schema-205/examples/RS0004/DX-Constant-Efficiency.RS0004.a205.json") { } }; class RS0005_fixture : public RS_fixture { protected: - RS0005_fixture() : RS_fixture(TEST205_INPUT_EXAMPLES_DIR"/build/examples/json/RS0005/Motor-Constant-Efficiency.RS0005.a205.json") + RS0005_fixture() : RS_fixture(TEST205_INPUT_EXAMPLES_DIR"/schema-205/examples/RS0005/Motor-Constant-Efficiency.RS0005.a205.json") { } }; class RS0006_fixture : public RS_fixture { protected: - RS0006_fixture() : RS_fixture(TEST205_INPUT_EXAMPLES_DIR"/build/examples/cbor/RS0006/Drive-Constant-Efficiency.RS0006.a205.cbor") + RS0006_fixture() : RS_fixture(TEST205_INPUT_EXAMPLES_DIR"/schema-205/examples/RS0006/Drive-Constant-Efficiency.RS0006.a205.json") { } }; diff --git a/poetry.lock b/poetry.lock index 64adbd1..34199e9 100644 --- a/poetry.lock +++ b/poetry.lock @@ -415,7 +415,7 @@ yaml = ["PyYAML (>=3.11,<6)"] [[package]] name = "pytest" -version = "6.2.1" +version = "6.2.2" description = "pytest: simple powerful testing with Python" category = "dev" optional = false @@ -456,7 +456,7 @@ python-versions = "*" [[package]] name = "pyyaml" -version = "5.4" +version = "5.4.1" description = "YAML parser and emitter for Python" category = "main" optional = false @@ -491,7 +491,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" [[package]] name = "smmap" -version = "3.0.4" +version = "3.0.5" description = "A pure Python implementation of a sliding window memory map manager" category = "dev" optional = false @@ -781,8 +781,8 @@ pytablewriter = [ {file = "pytablewriter-0.58.0.tar.gz", hash = "sha256:d232491e32fc84f28a6217fcd225d2ed82ae59d576d39724c98fdb7c7147b9ec"}, ] pytest = [ - {file = "pytest-6.2.1-py3-none-any.whl", hash = "sha256:1969f797a1a0dbd8ccf0fecc80262312729afea9c17f1d70ebf85c5e76c6f7c8"}, - {file = "pytest-6.2.1.tar.gz", hash = "sha256:66e419b1899bc27346cb2c993e12c5e5e8daba9073c1fbce33b9807abc95c306"}, + {file = "pytest-6.2.2-py3-none-any.whl", hash = "sha256:b574b57423e818210672e07ca1fa90aaf194a4f63f3ab909a2c67ebb22913839"}, + {file = "pytest-6.2.2.tar.gz", hash = "sha256:9d1edf9e7d0b84d72ea3dbcdfd22b35fb543a5e8f2a60092dd578936bf63d7f9"}, ] python-dateutil = [ {file = "python-dateutil-2.8.1.tar.gz", hash = "sha256:73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c"}, @@ -793,27 +793,27 @@ pytz = [ {file = "pytz-2020.5.tar.gz", hash = "sha256:180befebb1927b16f6b57101720075a984c019ac16b1b7575673bea42c6c3da5"}, ] pyyaml = [ - {file = "PyYAML-5.4-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:f7a21e3d99aa3095ef0553e7ceba36fb693998fbb1226f1392ce33681047465f"}, - {file = "PyYAML-5.4-cp27-cp27m-win32.whl", hash = "sha256:52bf0930903818e600ae6c2901f748bc4869c0c406056f679ab9614e5d21a166"}, - {file = "PyYAML-5.4-cp27-cp27m-win_amd64.whl", hash = "sha256:a36a48a51e5471513a5aea920cdad84cbd56d70a5057cca3499a637496ea379c"}, - {file = "PyYAML-5.4-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:5e7ac4e0e79a53451dc2814f6876c2fa6f71452de1498bbe29c0b54b69a986f4"}, - {file = "PyYAML-5.4-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:cc552b6434b90d9dbed6a4f13339625dc466fd82597119897e9489c953acbc22"}, - {file = "PyYAML-5.4-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:0dc9f2eb2e3c97640928dec63fd8dc1dd91e6b6ed236bd5ac00332b99b5c2ff9"}, - {file = "PyYAML-5.4-cp36-cp36m-win32.whl", hash = "sha256:5a3f345acff76cad4aa9cb171ee76c590f37394186325d53d1aa25318b0d4a09"}, - {file = "PyYAML-5.4-cp36-cp36m-win_amd64.whl", hash = "sha256:f3790156c606299ff499ec44db422f66f05a7363b39eb9d5b064f17bd7d7c47b"}, - {file = "PyYAML-5.4-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:124fd7c7bc1e95b1eafc60825f2daf67c73ce7b33f1194731240d24b0d1bf628"}, - {file = "PyYAML-5.4-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:8b818b6c5a920cbe4203b5a6b14256f0e5244338244560da89b7b0f1313ea4b6"}, - {file = "PyYAML-5.4-cp37-cp37m-win32.whl", hash = "sha256:737bd70e454a284d456aa1fa71a0b429dd527bcbf52c5c33f7c8eee81ac16b89"}, - {file = "PyYAML-5.4-cp37-cp37m-win_amd64.whl", hash = "sha256:7242790ab6c20316b8e7bb545be48d7ed36e26bbe279fd56f2c4a12510e60b4b"}, - {file = "PyYAML-5.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:cc547d3ead3754712223abb7b403f0a184e4c3eae18c9bb7fd15adef1597cc4b"}, - {file = "PyYAML-5.4-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:8635d53223b1f561b081ff4adecb828fd484b8efffe542edcfdff471997f7c39"}, - {file = "PyYAML-5.4-cp38-cp38-win32.whl", hash = "sha256:26fcb33776857f4072601502d93e1a619f166c9c00befb52826e7b774efaa9db"}, - {file = "PyYAML-5.4-cp38-cp38-win_amd64.whl", hash = "sha256:b2243dd033fd02c01212ad5c601dafb44fbb293065f430b0d3dbf03f3254d615"}, - {file = "PyYAML-5.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:31ba07c54ef4a897758563e3a0fcc60077698df10180abe4b8165d9895c00ebf"}, - {file = "PyYAML-5.4-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:02c78d77281d8f8d07a255e57abdbf43b02257f59f50cc6b636937d68efa5dd0"}, - {file = "PyYAML-5.4-cp39-cp39-win32.whl", hash = "sha256:fdc6b2cb4b19e431994f25a9160695cc59a4e861710cc6fc97161c5e845fc579"}, - {file = "PyYAML-5.4-cp39-cp39-win_amd64.whl", hash = "sha256:8bf38641b4713d77da19e91f8b5296b832e4db87338d6aeffe422d42f1ca896d"}, - {file = "PyYAML-5.4.tar.gz", hash = "sha256:3c49e39ac034fd64fd576d63bb4db53cda89b362768a67f07749d55f128ac18a"}, + {file = "PyYAML-5.4.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:3b2b1824fe7112845700f815ff6a489360226a5609b96ec2190a45e62a9fc922"}, + {file = "PyYAML-5.4.1-cp27-cp27m-win32.whl", hash = "sha256:129def1b7c1bf22faffd67b8f3724645203b79d8f4cc81f674654d9902cb4393"}, + {file = "PyYAML-5.4.1-cp27-cp27m-win_amd64.whl", hash = "sha256:4465124ef1b18d9ace298060f4eccc64b0850899ac4ac53294547536533800c8"}, + {file = "PyYAML-5.4.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:bb4191dfc9306777bc594117aee052446b3fa88737cd13b7188d0e7aa8162185"}, + {file = "PyYAML-5.4.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:6c78645d400265a062508ae399b60b8c167bf003db364ecb26dcab2bda048253"}, + {file = "PyYAML-5.4.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:4e0583d24c881e14342eaf4ec5fbc97f934b999a6828693a99157fde912540cc"}, + {file = "PyYAML-5.4.1-cp36-cp36m-win32.whl", hash = "sha256:3bd0e463264cf257d1ffd2e40223b197271046d09dadf73a0fe82b9c1fc385a5"}, + {file = "PyYAML-5.4.1-cp36-cp36m-win_amd64.whl", hash = "sha256:e4fac90784481d221a8e4b1162afa7c47ed953be40d31ab4629ae917510051df"}, + {file = "PyYAML-5.4.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:5accb17103e43963b80e6f837831f38d314a0495500067cb25afab2e8d7a4018"}, + {file = "PyYAML-5.4.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:e1d4970ea66be07ae37a3c2e48b5ec63f7ba6804bdddfdbd3cfd954d25a82e63"}, + {file = "PyYAML-5.4.1-cp37-cp37m-win32.whl", hash = "sha256:dd5de0646207f053eb0d6c74ae45ba98c3395a571a2891858e87df7c9b9bd51b"}, + {file = "PyYAML-5.4.1-cp37-cp37m-win_amd64.whl", hash = "sha256:08682f6b72c722394747bddaf0aa62277e02557c0fd1c42cb853016a38f8dedf"}, + {file = "PyYAML-5.4.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d2d9808ea7b4af864f35ea216be506ecec180628aced0704e34aca0b040ffe46"}, + {file = "PyYAML-5.4.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:8c1be557ee92a20f184922c7b6424e8ab6691788e6d86137c5d93c1a6ec1b8fb"}, + {file = "PyYAML-5.4.1-cp38-cp38-win32.whl", hash = "sha256:fa5ae20527d8e831e8230cbffd9f8fe952815b2b7dae6ffec25318803a7528fc"}, + {file = "PyYAML-5.4.1-cp38-cp38-win_amd64.whl", hash = "sha256:0f5f5786c0e09baddcd8b4b45f20a7b5d61a7e7e99846e3c799b05c7c53fa696"}, + {file = "PyYAML-5.4.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:294db365efa064d00b8d1ef65d8ea2c3426ac366c0c4368d930bf1c5fb497f77"}, + {file = "PyYAML-5.4.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:74c1485f7707cf707a7aef42ef6322b8f97921bd89be2ab6317fd782c2d53183"}, + {file = "PyYAML-5.4.1-cp39-cp39-win32.whl", hash = "sha256:49d4cdd9065b9b6e206d0595fee27a96b5dd22618e7520c33204a4a3239d5b10"}, + {file = "PyYAML-5.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:c20cfa2d49991c8b4147af39859b167664f2ad4561704ee74c1de03318e898db"}, + {file = "PyYAML-5.4.1.tar.gz", hash = "sha256:607774cbba28732bfa802b54baa7484215f530991055bb562efbed5b2f20a45e"}, ] schema205 = [] six = [ @@ -821,8 +821,8 @@ six = [ {file = "six-1.15.0.tar.gz", hash = "sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259"}, ] smmap = [ - {file = "smmap-3.0.4-py2.py3-none-any.whl", hash = "sha256:54c44c197c819d5ef1991799a7e30b662d1e520f2ac75c9efbeb54a742214cf4"}, - {file = "smmap-3.0.4.tar.gz", hash = "sha256:9c98bbd1f9786d22f14b3d4126894d56befb835ec90cef151af566c7e19b5d24"}, + {file = "smmap-3.0.5-py2.py3-none-any.whl", hash = "sha256:7bfcf367828031dc893530a29cb35eb8c8f2d7c8f2d0989354d75d24c8573714"}, + {file = "smmap-3.0.5.tar.gz", hash = "sha256:84c2751ef3072d4f6b2785ec7ee40244c6f45eb934d9e543e2c51f1bd3d54c50"}, ] tabledata = [ {file = "tabledata-1.1.3-py3-none-any.whl", hash = "sha256:59cc3b5f0c52ea142386b0653d3d48d2e976fe021154871982b4d234b82be747"}, diff --git a/schema-205 b/schema-205 index e64fb41..17092b6 160000 --- a/schema-205 +++ b/schema-205 @@ -1 +1 @@ -Subproject commit e64fb41f7aa7f82df235843b4409ef22dfe34037 +Subproject commit 17092b62dd6e37e99c369074762ab15b8818711c From 64aadf1f0898211eafb6e1acfa76feb3dcbc212e Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Mon, 25 Jan 2021 13:37:18 -0700 Subject: [PATCH 025/154] Attempt github actions with poetry. --- .github/workflows/build-and-test.yml | 33 -------------- .../validate-and-build-with-poetry.yml | 45 +++++++++++++++++++ 2 files changed, 45 insertions(+), 33 deletions(-) delete mode 100644 .github/workflows/build-and-test.yml create mode 100644 .github/workflows/validate-and-build-with-poetry.yml diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml deleted file mode 100644 index a9540ee..0000000 --- a/.github/workflows/build-and-test.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Build and Test - -on: push - -jobs: - build: - name: Build - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - steps: - - name: Checkout - uses: actions/checkout@v1 - with: - submodules: true - - name: Setup python - uses: actions/setup-python@v1 - with: - python-version: 3.8 - - name: Upgrade pip - run: python -m pip install --upgrade pip - - name: Install pipenv - run: python -m pip install pipenv - - name: Install project - run: pipenv install --dev - - name: Build and test - run: pipenv run doit - - name: Upload web content - uses: actions/upload-artifact@v2 - with: - name: web-content-${{ matrix.os }} - path: build/web diff --git a/.github/workflows/validate-and-build-with-poetry.yml b/.github/workflows/validate-and-build-with-poetry.yml new file mode 100644 index 0000000..02ab56e --- /dev/null +++ b/.github/workflows/validate-and-build-with-poetry.yml @@ -0,0 +1,45 @@ +name: Validate and Build with Poetry + +on: push + +jobs: + build: + name: Build + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + python-version: ["3.6", "3.7", "3.8", "3.9"] + defaults: + run: + shell: bash + runs-on: ${{ matrix.os }} + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install Poetry + uses: snok/install-poetry@v1.1.1 + with: + virtualenvs-create: true + virtualenvs-in-project: true + - name: Load cached venv if cache exists + id: cached-poetry-dependencies + uses: actions/cache@v2 + with: + path: .venv + key: venv-${{ matrix.os }}-py${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} + - name: Install dependencies if cache does not exist + run: poetry install + if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' + # - name: Validate, build, and test + # run: | + # source $VENV + # poetry run doit + - name: Generate, build, and test libtk205 + run: | + source $VENV + cd build + poetry run make From 48f133adb917c8fccf9ec4e27c27db92f283eeca Mon Sep 17 00:00:00 2001 From: Tanaya Mankad Date: Tue, 26 Jan 2021 09:59:47 -0700 Subject: [PATCH 026/154] Add modifications for VS2019 build. --- libtk205/CMakeLists.txt | 3 +++ libtk205/include/error_handling_tk205.h | 1 + 2 files changed, 4 insertions(+) diff --git a/libtk205/CMakeLists.txt b/libtk205/CMakeLists.txt index b28c8ad..08a966f 100644 --- a/libtk205/CMakeLists.txt +++ b/libtk205/CMakeLists.txt @@ -57,6 +57,9 @@ add_custom_target(generate_cpp ALL # copy_directory will create the destination if it does not exist add_custom_target(copy_generated_source ALL + COMMAND ${CMAKE_COMMAND} -E make_directory "${PROJECT_SOURCE_DIR}/include" + COMMAND ${CMAKE_COMMAND} -E make_directory "${PROJECT_SOURCE_DIR}/src/build/include" + COMMAND ${CMAKE_COMMAND} -E make_directory "${PROJECT_SOURCE_DIR}/src/build/cpp" COMMAND ${CMAKE_COMMAND} "-DPROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR}" -P "${PROJECT_SOURCE_DIR}/cmake/copy_template_generated_files.cmake" COMMAND ${CMAKE_COMMAND} "-DPROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR}" -P "${PROJECT_SOURCE_DIR}/cmake/copy_autogenerated_files.cmake") diff --git a/libtk205/include/error_handling_tk205.h b/libtk205/include/error_handling_tk205.h index b2b4091..c039600 100644 --- a/libtk205/include/error_handling_tk205.h +++ b/libtk205/include/error_handling_tk205.h @@ -2,6 +2,7 @@ #define ERROR_HANDLING_TK205_H_ #include +#include namespace ASHRAE205_NS { enum class msg_severity : unsigned int { From 3999aadb6808b4b02e683fb1e9c7a492c5c53cce Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Mon, 15 Feb 2021 13:02:59 -0700 Subject: [PATCH 027/154] Add submodules input to checkout action. --- .github/workflows/validate-and-build-with-poetry.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/validate-and-build-with-poetry.yml b/.github/workflows/validate-and-build-with-poetry.yml index 02ab56e..f6ba5d8 100644 --- a/.github/workflows/validate-and-build-with-poetry.yml +++ b/.github/workflows/validate-and-build-with-poetry.yml @@ -16,6 +16,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + with: + submodules: recursive - name: Setup python ${{ matrix.python-version }} uses: actions/setup-python@v2 with: From 8ae608c4cfec828c1b87a5f81c0a32543c907ef3 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Mon, 15 Feb 2021 15:30:03 -0700 Subject: [PATCH 028/154] Cmake build test for ubuntu/mac. --- .github/workflows/validate-and-build-with-poetry.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/validate-and-build-with-poetry.yml b/.github/workflows/validate-and-build-with-poetry.yml index f6ba5d8..6a7aba7 100644 --- a/.github/workflows/validate-and-build-with-poetry.yml +++ b/.github/workflows/validate-and-build-with-poetry.yml @@ -7,7 +7,7 @@ jobs: name: Build strategy: matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + os: [ubuntu-latest, macos-latest] #, windows-latest] python-version: ["3.6", "3.7", "3.8", "3.9"] defaults: run: @@ -40,8 +40,10 @@ jobs: # run: | # source $VENV # poetry run doit - - name: Generate, build, and test libtk205 + - name: generate and make libtk205 run: | source $VENV + mkdir build cd build + poetry run cmake .. poetry run make From 7574908b56e42cc8d06edb60efa0f83667dc3192 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Mon, 15 Feb 2021 15:35:03 -0700 Subject: [PATCH 029/154] Change pipenv to poetry. --- libtk205/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libtk205/CMakeLists.txt b/libtk205/CMakeLists.txt index 08a966f..4e1f733 100644 --- a/libtk205/CMakeLists.txt +++ b/libtk205/CMakeLists.txt @@ -51,8 +51,8 @@ list(APPEND RS_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/build/cpp/ASHRAE205.cpp" ) add_custom_target(generate_cpp ALL - COMMAND pipenv run doit headers - COMMAND pipenv run doit cpp + COMMAND poetry run doit headers + COMMAND poetry run doit cpp WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../schema-205") # copy_directory will create the destination if it does not exist From 1f323c5942770b9149c78e617f66d8736fb74f30 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Tue, 16 Feb 2021 10:02:52 -0700 Subject: [PATCH 030/154] Add Windows build. --- .github/workflows/validate-and-build-with-poetry.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/validate-and-build-with-poetry.yml b/.github/workflows/validate-and-build-with-poetry.yml index 6a7aba7..a500d93 100644 --- a/.github/workflows/validate-and-build-with-poetry.yml +++ b/.github/workflows/validate-and-build-with-poetry.yml @@ -7,7 +7,7 @@ jobs: name: Build strategy: matrix: - os: [ubuntu-latest, macos-latest] #, windows-latest] + os: [ubuntu-latest, macos-latest, windows-latest] python-version: ["3.6", "3.7", "3.8", "3.9"] defaults: run: @@ -41,9 +41,19 @@ jobs: # source $VENV # poetry run doit - name: generate and make libtk205 + if: matrix.os != 'windows-latest' run: | source $VENV mkdir build cd build poetry run cmake .. poetry run make + - name: generate and make libtk205 (Windows) + if: matrix.os == 'windows-latest' + shell: cmd + run: | + source $VENV + mkdir build + cd build + cmake .. + cmake --build . --config Release \ No newline at end of file From 00778e4a329c33f6fb842a497ea84f504681d832 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Tue, 16 Feb 2021 19:59:04 -0700 Subject: [PATCH 031/154] Use bash as windows shell as suggested by CI poetry install. --- .github/workflows/validate-and-build-with-poetry.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/validate-and-build-with-poetry.yml b/.github/workflows/validate-and-build-with-poetry.yml index a500d93..c774914 100644 --- a/.github/workflows/validate-and-build-with-poetry.yml +++ b/.github/workflows/validate-and-build-with-poetry.yml @@ -48,9 +48,9 @@ jobs: cd build poetry run cmake .. poetry run make - - name: generate and make libtk205 (Windows) + - name: generate and build libtk205 (Windows) if: matrix.os == 'windows-latest' - shell: cmd + shell: bash run: | source $VENV mkdir build From f5dbde399de5316f5dd8a2e8bde2275e88fc70f8 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Wed, 17 Feb 2021 10:00:42 -0700 Subject: [PATCH 032/154] Add workflow test for Windows. --- .github/workflows/validate-and-build-with-poetry.yml | 10 +++++++++- CMakeLists.txt | 1 + libtk205/CMakeLists.txt | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/validate-and-build-with-poetry.yml b/.github/workflows/validate-and-build-with-poetry.yml index c774914..623d4e3 100644 --- a/.github/workflows/validate-and-build-with-poetry.yml +++ b/.github/workflows/validate-and-build-with-poetry.yml @@ -36,7 +36,7 @@ jobs: - name: Install dependencies if cache does not exist run: poetry install if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' - # - name: Validate, build, and test + # - name: Validate, generate, and test # run: | # source $VENV # poetry run doit @@ -48,6 +48,14 @@ jobs: cd build poetry run cmake .. poetry run make + - name: test wd (Windows) + if: matrix.os == 'windows-latest' + shell: bash + working-directory: schema-205 + run: | + source $VENV + poetry run doit headers + poetry run doit cpp - name: generate and build libtk205 (Windows) if: matrix.os == 'windows-latest' shell: bash diff --git a/CMakeLists.txt b/CMakeLists.txt index 06a3970..212e5b6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,3 +1,4 @@ +cmake_minimum_required(VERSION 3.14.0) project(toolkit-205) # Set a default build type if none was specified diff --git a/libtk205/CMakeLists.txt b/libtk205/CMakeLists.txt index 4e1f733..cd72c57 100644 --- a/libtk205/CMakeLists.txt +++ b/libtk205/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.0.0) +#cmake_minimum_required(VERSION 3.0.0) set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED ON) project(libtk205) From 89443656cb4c4fd563c96b20789a32f0fd40ae79 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Wed, 17 Feb 2021 10:31:16 -0700 Subject: [PATCH 033/154] Omit source $VENV as test --- .github/workflows/validate-and-build-with-poetry.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/validate-and-build-with-poetry.yml b/.github/workflows/validate-and-build-with-poetry.yml index 623d4e3..bd60c31 100644 --- a/.github/workflows/validate-and-build-with-poetry.yml +++ b/.github/workflows/validate-and-build-with-poetry.yml @@ -53,7 +53,7 @@ jobs: shell: bash working-directory: schema-205 run: | - source $VENV + # source $VENV poetry run doit headers poetry run doit cpp - name: generate and build libtk205 (Windows) @@ -64,4 +64,4 @@ jobs: mkdir build cd build cmake .. - cmake --build . --config Release \ No newline at end of file + cmake --build . --config Release From 56955dba32ba2885e5168be03fb523eac6e02ca1 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Wed, 17 Feb 2021 10:43:12 -0700 Subject: [PATCH 034/154] Update validate-and-build-with-poetry.yml --- .github/workflows/validate-and-build-with-poetry.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/validate-and-build-with-poetry.yml b/.github/workflows/validate-and-build-with-poetry.yml index bd60c31..fc82489 100644 --- a/.github/workflows/validate-and-build-with-poetry.yml +++ b/.github/workflows/validate-and-build-with-poetry.yml @@ -53,7 +53,6 @@ jobs: shell: bash working-directory: schema-205 run: | - # source $VENV poetry run doit headers poetry run doit cpp - name: generate and build libtk205 (Windows) From 7a1facacfed4bc430cfbad824cf84f96e4c4b28d Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Wed, 17 Feb 2021 11:12:54 -0700 Subject: [PATCH 035/154] Try without working-directory tag. --- .github/workflows/validate-and-build-with-poetry.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/validate-and-build-with-poetry.yml b/.github/workflows/validate-and-build-with-poetry.yml index fc82489..006416c 100644 --- a/.github/workflows/validate-and-build-with-poetry.yml +++ b/.github/workflows/validate-and-build-with-poetry.yml @@ -51,8 +51,9 @@ jobs: - name: test wd (Windows) if: matrix.os == 'windows-latest' shell: bash - working-directory: schema-205 run: | + source $VENV + cd schema-205 poetry run doit headers poetry run doit cpp - name: generate and build libtk205 (Windows) From 20891c8854ce6990603a767cbe42c05deabf77a6 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Sun, 21 Feb 2021 16:59:50 -0700 Subject: [PATCH 036/154] Update Windows build script to initiate poetry from the CI, not from the CMakeLists. --- .../workflows/validate-and-build-with-poetry.yml | 13 ++----------- libtk205/CMakeLists.txt | 4 ++-- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/.github/workflows/validate-and-build-with-poetry.yml b/.github/workflows/validate-and-build-with-poetry.yml index 006416c..ada988d 100644 --- a/.github/workflows/validate-and-build-with-poetry.yml +++ b/.github/workflows/validate-and-build-with-poetry.yml @@ -48,20 +48,11 @@ jobs: cd build poetry run cmake .. poetry run make - - name: test wd (Windows) - if: matrix.os == 'windows-latest' - shell: bash - run: | - source $VENV - cd schema-205 - poetry run doit headers - poetry run doit cpp - name: generate and build libtk205 (Windows) if: matrix.os == 'windows-latest' shell: bash run: | source $VENV mkdir build - cd build - cmake .. - cmake --build . --config Release + poetry run cmake -B build + poetry run cmake --build build --config Release diff --git a/libtk205/CMakeLists.txt b/libtk205/CMakeLists.txt index cd72c57..236174c 100644 --- a/libtk205/CMakeLists.txt +++ b/libtk205/CMakeLists.txt @@ -51,8 +51,8 @@ list(APPEND RS_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/build/cpp/ASHRAE205.cpp" ) add_custom_target(generate_cpp ALL - COMMAND poetry run doit headers - COMMAND poetry run doit cpp + COMMAND doit headers + COMMAND doit -s cpp WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../schema-205") # copy_directory will create the destination if it does not exist From d98fe9e03c40dc2df9e915a338b5c2387b5229cf Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Sun, 21 Feb 2021 17:01:21 -0700 Subject: [PATCH 037/154] Update submodule. --- schema-205 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema-205 b/schema-205 index 17092b6..f4268f2 160000 --- a/schema-205 +++ b/schema-205 @@ -1 +1 @@ -Subproject commit 17092b62dd6e37e99c369074762ab15b8818711c +Subproject commit f4268f2fd25e0b37185e0c8fcde17ba36475d098 From cc2d53773829b42101930bd627fbb41c9896d3df Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Mon, 22 Feb 2021 12:25:52 -0700 Subject: [PATCH 038/154] Add merged schema-205. --- schema-205 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema-205 b/schema-205 index f4268f2..f6a5d28 160000 --- a/schema-205 +++ b/schema-205 @@ -1 +1 @@ -Subproject commit f4268f2fd25e0b37185e0c8fcde17ba36475d098 +Subproject commit f6a5d2803f17b75df4a1971caa242f7ed1a23c25 From 6127e0e502c0ff4d56d539cfa88f33ea5a1e596a Mon Sep 17 00:00:00 2001 From: Tanaya Mankad Date: Tue, 23 Feb 2021 06:50:07 -0700 Subject: [PATCH 039/154] Fix compiler warning. --- libtk205/src/libtk205.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libtk205/src/libtk205.cpp b/libtk205/src/libtk205.cpp index e5bde17..b2c80b6 100644 --- a/libtk205/src/libtk205.cpp +++ b/libtk205/src/libtk205.cpp @@ -92,7 +92,7 @@ namespace libtk205_NS { { // get length of file: is.seekg(0, is.end); - int length = is.tellg(); + size_t length = static_cast(is.tellg()); is.seekg(0, is.beg); bytes.resize(length); From d974610423bd76ce13428e04aee9c449dea10f45 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Wed, 24 Feb 2021 12:46:44 -0700 Subject: [PATCH 040/154] Change source file search to GLOB directly in the autogeneration directory. --- libtk205/CMakeLists.txt | 57 +++++-------------- libtk205/cmake/copy_autogenerated_files.cmake | 19 +------ ...iles.cmake => copy_base_class_files.cmake} | 0 3 files changed, 15 insertions(+), 61 deletions(-) rename libtk205/cmake/{copy_template_generated_files.cmake => copy_base_class_files.cmake} (100%) diff --git a/libtk205/CMakeLists.txt b/libtk205/CMakeLists.txt index 236174c..19207f4 100644 --- a/libtk205/CMakeLists.txt +++ b/libtk205/CMakeLists.txt @@ -1,4 +1,3 @@ -#cmake_minimum_required(VERSION 3.0.0) set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED ON) project(libtk205) @@ -12,44 +11,10 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/vendor/json/single_include) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/vendor/json/include) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/build/include) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../schema-205/build/include) add_subdirectory(vendor/btwxt) -list(APPEND Factory_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/include/rs_instance_factory.h" - "${CMAKE_CURRENT_SOURCE_DIR}/src/rs_instance_factory.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/include/rs_instance_base.h" - "${CMAKE_CURRENT_SOURCE_DIR}/include/performance_map_base.h" - "${CMAKE_CURRENT_SOURCE_DIR}/include/grid_variables_base.h" - "${CMAKE_CURRENT_SOURCE_DIR}/include/lookup_variables_base.h" - "${CMAKE_CURRENT_SOURCE_DIR}/src/build/include/RS0001_factory.h" - "${CMAKE_CURRENT_SOURCE_DIR}/src/build/cpp/RS0001_factory.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/src/build/include/RS0002_factory.h" - "${CMAKE_CURRENT_SOURCE_DIR}/src/build/cpp/RS0002_factory.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/src/build/include/RS0003_factory.h" - "${CMAKE_CURRENT_SOURCE_DIR}/src/build/cpp/RS0003_factory.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/src/build/include/RS0004_factory.h" - "${CMAKE_CURRENT_SOURCE_DIR}/src/build/cpp/RS0004_factory.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/src/build/include/RS0005_factory.h" - "${CMAKE_CURRENT_SOURCE_DIR}/src/build/cpp/RS0005_factory.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/src/build/include/RS0006_factory.h" - "${CMAKE_CURRENT_SOURCE_DIR}/src/build/cpp/RS0006_factory.cpp" -) -list(APPEND RS_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/build/cpp/ASHRAE205.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/src/build/include/ASHRAE205.h" - "${CMAKE_CURRENT_SOURCE_DIR}/src/build/include/RS0001.h" - "${CMAKE_CURRENT_SOURCE_DIR}/src/build/cpp/RS0001.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/src/build/include/RS0002.h" - "${CMAKE_CURRENT_SOURCE_DIR}/src/build/cpp/RS0002.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/src/build/include/RS0003.h" - "${CMAKE_CURRENT_SOURCE_DIR}/src/build/cpp/RS0003.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/src/build/include/RS0004.h" - "${CMAKE_CURRENT_SOURCE_DIR}/src/build/cpp/RS0004.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/src/build/include/RS0005.h" - "${CMAKE_CURRENT_SOURCE_DIR}/src/build/cpp/RS0005.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/src/build/include/RS0006.h" - "${CMAKE_CURRENT_SOURCE_DIR}/src/build/cpp/RS0006.cpp" -) - add_custom_target(generate_cpp ALL COMMAND doit headers COMMAND doit -s cpp @@ -60,15 +25,22 @@ add_custom_target(copy_generated_source ALL COMMAND ${CMAKE_COMMAND} -E make_directory "${PROJECT_SOURCE_DIR}/include" COMMAND ${CMAKE_COMMAND} -E make_directory "${PROJECT_SOURCE_DIR}/src/build/include" COMMAND ${CMAKE_COMMAND} -E make_directory "${PROJECT_SOURCE_DIR}/src/build/cpp" - COMMAND ${CMAKE_COMMAND} "-DPROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR}" -P "${PROJECT_SOURCE_DIR}/cmake/copy_template_generated_files.cmake" + COMMAND ${CMAKE_COMMAND} "-DPROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR}" -P "${PROJECT_SOURCE_DIR}/cmake/copy_base_class_files.cmake" COMMAND ${CMAKE_COMMAND} "-DPROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR}" -P "${PROJECT_SOURCE_DIR}/cmake/copy_autogenerated_files.cmake") -set (SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/include/libtk205.h" - "${CMAKE_CURRENT_SOURCE_DIR}/src/libtk205.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/include/error_handling_tk205.h" +# Ideally, generated source files would be cleaned before cmake builds the project. Then GLOB +# would be appropriate for this build. +file(GLOB RS_SOURCES "${PROJECT_SOURCE_DIR}/../schema-205/build/cpp/*.cpp") +file(GLOB Factory_SOURCES "${PROJECT_SOURCE_DIR}/../schema-205/build/include/*.h") +file(GLOB Class_declarations "${PROJECT_SOURCE_DIR}/include/*.h") + +set (SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/libtk205.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/src/error_handling_tk205.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/src/rs_instance_factory.cpp" ${Factory_SOURCES} - ${RS_SOURCES}) + ${RS_SOURCES} + ${Class_declarations}) + # The GENERATED property prevents the source files being used before they exist. set_source_files_properties(${SOURCES} PROPERTIES GENERATED TRUE) @@ -77,9 +49,6 @@ target_link_libraries(libtk205 btwxt) add_dependencies(libtk205 copy_generated_source) add_dependencies(copy_generated_source generate_cpp) -# add_executable(libtktest src/load.cpp) -# target_link_libraries(libtktest libtk205) - add_subdirectory(vendor) if (BUILD_TK205_TESTING) add_compile_definitions(TEST205_INPUT_EXAMPLES_DIR="${TEST205_INPUT_EXAMPLES_DIR}") diff --git a/libtk205/cmake/copy_autogenerated_files.cmake b/libtk205/cmake/copy_autogenerated_files.cmake index fda4502..d4369e4 100644 --- a/libtk205/cmake/copy_autogenerated_files.cmake +++ b/libtk205/cmake/copy_autogenerated_files.cmake @@ -1,22 +1,7 @@ -# Copy all autogenerated source (cpp) files into build directory - -file(GLOB autogenerated_sources "${PROJECT_SOURCE_DIR}/../schema-205/build/cpp/*.cpp") - -foreach(filename ${autogenerated_sources}) - configure_file(${filename} ${PROJECT_SOURCE_DIR}/src/build/cpp COPYONLY) -endforeach(filename) - -# Copy all autogenerated factory class headers into build directory - they won't be distributed - -file(GLOB autogenerated_factories "${PROJECT_SOURCE_DIR}/../schema-205/build/include/*factory.h") - -foreach(filename ${autogenerated_factories}) - configure_file(${filename} ${PROJECT_SOURCE_DIR}/src/build/include COPYONLY) -endforeach(filename) - -# Copy the rest of the headers, for classes that must be distributed, into the project +# Copy headers, for classes that must be distributed (not factories), into the project # include directory +file(GLOB autogenerated_factories "${PROJECT_SOURCE_DIR}/../schema-205/build/include/*factory.h") file(GLOB autogenerated_headers "${PROJECT_SOURCE_DIR}/../schema-205/build/include/*.h") foreach(filename ${autogenerated_factories}) list(REMOVE_ITEM autogenerated_headers ${filename}) diff --git a/libtk205/cmake/copy_template_generated_files.cmake b/libtk205/cmake/copy_base_class_files.cmake similarity index 100% rename from libtk205/cmake/copy_template_generated_files.cmake rename to libtk205/cmake/copy_base_class_files.cmake From 58ffb641ab7c0ce4f87e33ab5db5f1cb1af0d5e0 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Fri, 26 Feb 2021 15:07:38 -0700 Subject: [PATCH 041/154] Add manual cleanup step. --- libtk205/CMakeLists.txt | 4 ++++ schema-205 | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/libtk205/CMakeLists.txt b/libtk205/CMakeLists.txt index 19207f4..b508817 100644 --- a/libtk205/CMakeLists.txt +++ b/libtk205/CMakeLists.txt @@ -49,6 +49,10 @@ target_link_libraries(libtk205 btwxt) add_dependencies(libtk205 copy_generated_source) add_dependencies(copy_generated_source generate_cpp) +add_custom_command(TARGET libtk205 POST_BUILD + COMMAND doit clean + WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../schema-205") + add_subdirectory(vendor) if (BUILD_TK205_TESTING) add_compile_definitions(TEST205_INPUT_EXAMPLES_DIR="${TEST205_INPUT_EXAMPLES_DIR}") diff --git a/schema-205 b/schema-205 index f6a5d28..8fe32ca 160000 --- a/schema-205 +++ b/schema-205 @@ -1 +1 @@ -Subproject commit f6a5d2803f17b75df4a1971caa242f7ed1a23c25 +Subproject commit 8fe32ca8154268062414cfe885ecf994a84af0e5 From 003b52f3174bfba92cbf0c72c3ddf8e3f1281b2f Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Mon, 1 Mar 2021 08:01:02 -0700 Subject: [PATCH 042/154] Try 'poetry doit' in cmakelists in addition to 'poetry cmake' in CI build file. --- libtk205/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libtk205/CMakeLists.txt b/libtk205/CMakeLists.txt index b508817..841ae94 100644 --- a/libtk205/CMakeLists.txt +++ b/libtk205/CMakeLists.txt @@ -16,8 +16,8 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../schema-205/build/include) add_subdirectory(vendor/btwxt) add_custom_target(generate_cpp ALL - COMMAND doit headers - COMMAND doit -s cpp + COMMAND poetry doit headers + COMMAND poetry doit -s cpp WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../schema-205") # copy_directory will create the destination if it does not exist @@ -50,7 +50,7 @@ add_dependencies(libtk205 copy_generated_source) add_dependencies(copy_generated_source generate_cpp) add_custom_command(TARGET libtk205 POST_BUILD - COMMAND doit clean + COMMAND poetry doit clean WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../schema-205") add_subdirectory(vendor) From 7181fbe2cfc830252ea2d61d3951a05364a75eff Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Mon, 1 Mar 2021 11:18:40 -0700 Subject: [PATCH 043/154] Attempt to recreate a CI cache. --- .github/workflows/validate-and-build-with-poetry.yml | 2 +- libtk205/CMakeLists.txt | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/validate-and-build-with-poetry.yml b/.github/workflows/validate-and-build-with-poetry.yml index ada988d..dec7d80 100644 --- a/.github/workflows/validate-and-build-with-poetry.yml +++ b/.github/workflows/validate-and-build-with-poetry.yml @@ -32,7 +32,7 @@ jobs: uses: actions/cache@v2 with: path: .venv - key: venv-${{ matrix.os }}-py${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} + key: venv-poe-v1-${{ matrix.os }}-py${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} - name: Install dependencies if cache does not exist run: poetry install if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' diff --git a/libtk205/CMakeLists.txt b/libtk205/CMakeLists.txt index 841ae94..b508817 100644 --- a/libtk205/CMakeLists.txt +++ b/libtk205/CMakeLists.txt @@ -16,8 +16,8 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../schema-205/build/include) add_subdirectory(vendor/btwxt) add_custom_target(generate_cpp ALL - COMMAND poetry doit headers - COMMAND poetry doit -s cpp + COMMAND doit headers + COMMAND doit -s cpp WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../schema-205") # copy_directory will create the destination if it does not exist @@ -50,7 +50,7 @@ add_dependencies(libtk205 copy_generated_source) add_dependencies(copy_generated_source generate_cpp) add_custom_command(TARGET libtk205 POST_BUILD - COMMAND poetry doit clean + COMMAND doit clean WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../schema-205") add_subdirectory(vendor) From 573faf343bb9ede20220fb4bf2150c7c23a1cd43 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Wed, 3 Mar 2021 11:37:56 -0700 Subject: [PATCH 044/154] Move all smart pointers to unique_ptr. Simplify build and fix test. --- libtk205/CMakeLists.txt | 14 ++++++-------- libtk205/src/libtk205.cpp | 12 ++++++------ libtk205/src/rs_instance_factory.cpp | 10 +++++----- libtk205/test/CMakeLists.txt | 4 ++++ libtk205/test/main_libtk205.cpp | 2 +- schema-205 | 2 +- 6 files changed, 23 insertions(+), 21 deletions(-) diff --git a/libtk205/CMakeLists.txt b/libtk205/CMakeLists.txt index b508817..01c1f3a 100644 --- a/libtk205/CMakeLists.txt +++ b/libtk205/CMakeLists.txt @@ -23,13 +23,15 @@ add_custom_target(generate_cpp ALL # copy_directory will create the destination if it does not exist add_custom_target(copy_generated_source ALL COMMAND ${CMAKE_COMMAND} -E make_directory "${PROJECT_SOURCE_DIR}/include" - COMMAND ${CMAKE_COMMAND} -E make_directory "${PROJECT_SOURCE_DIR}/src/build/include" - COMMAND ${CMAKE_COMMAND} -E make_directory "${PROJECT_SOURCE_DIR}/src/build/cpp" COMMAND ${CMAKE_COMMAND} "-DPROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR}" -P "${PROJECT_SOURCE_DIR}/cmake/copy_base_class_files.cmake" COMMAND ${CMAKE_COMMAND} "-DPROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR}" -P "${PROJECT_SOURCE_DIR}/cmake/copy_autogenerated_files.cmake") -# Ideally, generated source files would be cleaned before cmake builds the project. Then GLOB -# would be appropriate for this build. +# Ideally, generated source files will be cleaned before cmake builds the project. Cleaning the +# files guarantees that if the generator fails silently, the build fails normally (and +# does not use out-of-date source). (CMake can check if files are different, but there's no +# check for if they should be different and aren't.) +# GLOB is deemed acceptable for this build. + file(GLOB RS_SOURCES "${PROJECT_SOURCE_DIR}/../schema-205/build/cpp/*.cpp") file(GLOB Factory_SOURCES "${PROJECT_SOURCE_DIR}/../schema-205/build/include/*.h") file(GLOB Class_declarations "${PROJECT_SOURCE_DIR}/include/*.h") @@ -49,10 +51,6 @@ target_link_libraries(libtk205 btwxt) add_dependencies(libtk205 copy_generated_source) add_dependencies(copy_generated_source generate_cpp) -add_custom_command(TARGET libtk205 POST_BUILD - COMMAND doit clean - WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../schema-205") - add_subdirectory(vendor) if (BUILD_TK205_TESTING) add_compile_definitions(TEST205_INPUT_EXAMPLES_DIR="${TEST205_INPUT_EXAMPLES_DIR}") diff --git a/libtk205/src/libtk205.cpp b/libtk205/src/libtk205.cpp index b2c80b6..0386616 100644 --- a/libtk205/src/libtk205.cpp +++ b/libtk205/src/libtk205.cpp @@ -18,12 +18,12 @@ namespace libtk205_NS { A205_SDK::A205_SDK() { - rs_instance_factory::Register_factory("RS0001", std::make_shared()); - rs_instance_factory::Register_factory("RS0002", std::make_shared()); - rs_instance_factory::Register_factory("RS0003", std::make_shared()); - rs_instance_factory::Register_factory("RS0004", std::make_shared()); - rs_instance_factory::Register_factory("RS0005", std::make_shared()); - rs_instance_factory::Register_factory("RS0006", std::make_shared()); + rs_instance_factory::Register_factory("RS0001", std::make_unique()); + rs_instance_factory::Register_factory("RS0002", std::make_unique()); + rs_instance_factory::Register_factory("RS0003", std::make_unique()); + rs_instance_factory::Register_factory("RS0004", std::make_unique()); + rs_instance_factory::Register_factory("RS0005", std::make_unique()); + rs_instance_factory::Register_factory("RS0006", std::make_unique()); } ASHRAE205 A205_SDK::Load_A205(const char* input_file) diff --git a/libtk205/src/rs_instance_factory.cpp b/libtk205/src/rs_instance_factory.cpp index 1e32ac6..99113b1 100755 --- a/libtk205/src/rs_instance_factory.cpp +++ b/libtk205/src/rs_instance_factory.cpp @@ -3,7 +3,7 @@ namespace { - using rs_factory_map = std::map >; + using rs_factory_map = std::map >; rs_factory_map& Get_rs_factory_map() { @@ -15,18 +15,18 @@ namespace namespace ASHRAE205_NS { //static bool rs_instance_factory::Register_factory(std::string const& RS_ID, - std::shared_ptr factory) + std::unique_ptr factory) { - Get_rs_factory_map()[RS_ID] = factory; + Get_rs_factory_map()[RS_ID] = std::move(factory); return true; } //static std::unique_ptr rs_instance_factory::Create(std::string const& RS_ID) { - const auto factory = Get_rs_factory_map()[RS_ID]; + const auto &factory = Get_rs_factory_map()[RS_ID]; std::unique_ptr inst = (factory == nullptr) ? nullptr : factory->Create_instance(); - std::cout << "Factory's raw pointer " << inst.get() << std::endl; + // Return smart pointers by value to take advantage of RVO or move semantics: return inst; } } \ No newline at end of file diff --git a/libtk205/test/CMakeLists.txt b/libtk205/test/CMakeLists.txt index acaa4c8..7eb56e8 100644 --- a/libtk205/test/CMakeLists.txt +++ b/libtk205/test/CMakeLists.txt @@ -16,3 +16,7 @@ add_executable(libtk205_tests ${library_sources}) include(GoogleTest) gtest_discover_tests(libtk205_tests TEST_PREFIX libtk205:) + +# add_custom_command(TARGET libtk205_tests POST_BUILD +# COMMAND doit clean +# WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../../schema-205") diff --git a/libtk205/test/main_libtk205.cpp b/libtk205/test/main_libtk205.cpp index 14de1b3..eef6f6c 100644 --- a/libtk205/test/main_libtk205.cpp +++ b/libtk205/test/main_libtk205.cpp @@ -36,7 +36,7 @@ TEST_F(RS0005_fixture, Calculate_embedded_RS_performance) EXPECT_TRUE(rs06 != nullptr); if (rs06) { - std::vector target {5550.0}; + std::vector target {5550.0, 10.0}; auto result = rs06->performance.performance_map.Calculate_performance(target); EXPECT_THAT(result, testing::ElementsAre(testing::DoubleEq(0.985))); } diff --git a/schema-205 b/schema-205 index 8fe32ca..f32ee0b 160000 --- a/schema-205 +++ b/schema-205 @@ -1 +1 @@ -Subproject commit 8fe32ca8154268062414cfe885ecf994a84af0e5 +Subproject commit f32ee0bda5d763c895087b83ad2c7aae99ac3cfd From 033e6428b3231b68ca9ebf00160f06e3c3ce366e Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Wed, 3 Mar 2021 11:41:38 -0700 Subject: [PATCH 045/154] Attach CI-passing submodule checkin. --- schema-205 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema-205 b/schema-205 index f32ee0b..489d6dd 160000 --- a/schema-205 +++ b/schema-205 @@ -1 +1 @@ -Subproject commit f32ee0bda5d763c895087b83ad2c7aae99ac3cfd +Subproject commit 489d6dde9cc7b979448712d7937fa33641bbc12e From d78910805119e2ff4df6c0aa57e014a21a4f1060 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Wed, 3 Mar 2021 11:57:56 -0700 Subject: [PATCH 046/154] Remove unneeded debug ostream (failed with unique_ptr on ubuntu). --- libtk205/test/fixtures_libtk205.hpp | 1 - 1 file changed, 1 deletion(-) diff --git a/libtk205/test/fixtures_libtk205.hpp b/libtk205/test/fixtures_libtk205.hpp index 264eb55..f57643e 100644 --- a/libtk205/test/fixtures_libtk205.hpp +++ b/libtk205/test/fixtures_libtk205.hpp @@ -14,7 +14,6 @@ class RS_fixture : public testing::Test { RS_fixture(const char * filename) : _sdk() { _a205 = _sdk.Load_A205(filename); - std::cout << "Fixture gets ID " << static_cast(_a205.rs_id) << ": shared_ptr value " << _a205.rs_instance << std::endl; } A205_SDK _sdk; ASHRAE205_NS::ASHRAE205 _a205; From 74d69f094be83cdac4a5df3c9e79d2cc8e72c0bc Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Tue, 9 Mar 2021 10:34:37 -0700 Subject: [PATCH 047/154] Update submodule. --- libtk205/src/libtk205.cpp | 2 +- schema-205 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libtk205/src/libtk205.cpp b/libtk205/src/libtk205.cpp index 0386616..e6c69ed 100644 --- a/libtk205/src/libtk205.cpp +++ b/libtk205/src/libtk205.cpp @@ -52,7 +52,7 @@ namespace libtk205_NS { a205.Initialize(j); } - return std::move(a205); + return a205; } RS0001_NS::RS0001* A205_SDK::Get_RS0001(const ASHRAE205& a205) diff --git a/schema-205 b/schema-205 index 489d6dd..fdc28bb 160000 --- a/schema-205 +++ b/schema-205 @@ -1 +1 @@ -Subproject commit 489d6dde9cc7b979448712d7937fa33641bbc12e +Subproject commit fdc28bb4f8dcc98cff3d41acf35f0f786e0ce9fa From b0466d58b0f86e7e11eeeefa46c1b0d244a57ce7 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Mon, 15 Mar 2021 16:11:15 -0600 Subject: [PATCH 048/154] Add explicit source list for tests. --- libtk205/CMakeLists.txt | 4 ++-- libtk205/test/CMakeLists.txt | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/libtk205/CMakeLists.txt b/libtk205/CMakeLists.txt index 01c1f3a..858f8c2 100644 --- a/libtk205/CMakeLists.txt +++ b/libtk205/CMakeLists.txt @@ -33,13 +33,13 @@ add_custom_target(copy_generated_source ALL # GLOB is deemed acceptable for this build. file(GLOB RS_SOURCES "${PROJECT_SOURCE_DIR}/../schema-205/build/cpp/*.cpp") -file(GLOB Factory_SOURCES "${PROJECT_SOURCE_DIR}/../schema-205/build/include/*.h") +file(GLOB RS_HEADERS "${PROJECT_SOURCE_DIR}/../schema-205/build/include/*.h") file(GLOB Class_declarations "${PROJECT_SOURCE_DIR}/include/*.h") set (SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/libtk205.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/src/error_handling_tk205.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/src/rs_instance_factory.cpp" - ${Factory_SOURCES} + ${RS_HEADERS} ${RS_SOURCES} ${Class_declarations}) diff --git a/libtk205/test/CMakeLists.txt b/libtk205/test/CMakeLists.txt index 7eb56e8..cf038f3 100644 --- a/libtk205/test/CMakeLists.txt +++ b/libtk205/test/CMakeLists.txt @@ -1,12 +1,17 @@ # Test Executable include_directories("${libtk205_SOURCE_DIR}/include" - "${libtk205_SOURCE_DIR}/src/build/include" + "${libtk205_SOURCE_DIR}/../schema-205/build/include" "${gtest_SOURCE_DIR}/include") +file(GLOB RS_SOURCES "${libtk205_SOURCE_DIR}/../schema-205/build/cpp/*.cpp") +file(GLOB RS_HEADERS "${libtk205_SOURCE_DIR}/../schema-205/build/include/*.h") + set(library_sources fixtures_libtk205.hpp main_libtk205.cpp + ${RS_HEADERS} + ${RS_SOURCES} ) link_libraries(libtk205 gtest gmock) From bba9d2ddd40286f771e35fe84952286630ad8fbd Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Mon, 15 Mar 2021 21:00:09 -0600 Subject: [PATCH 049/154] Try CI Windows build. --- .github/workflows/validate-and-build-with-poetry.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/validate-and-build-with-poetry.yml b/.github/workflows/validate-and-build-with-poetry.yml index dec7d80..b0c3f4f 100644 --- a/.github/workflows/validate-and-build-with-poetry.yml +++ b/.github/workflows/validate-and-build-with-poetry.yml @@ -7,7 +7,7 @@ jobs: name: Build strategy: matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + os: [windows-latest] python-version: ["3.6", "3.7", "3.8", "3.9"] defaults: run: From 64f834426acb4a9db5da181e6ada59db6f9c3885 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Tue, 16 Mar 2021 08:21:46 -0600 Subject: [PATCH 050/154] Print path to build files. --- libtk205/test/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/libtk205/test/CMakeLists.txt b/libtk205/test/CMakeLists.txt index cf038f3..7b57d6f 100644 --- a/libtk205/test/CMakeLists.txt +++ b/libtk205/test/CMakeLists.txt @@ -13,6 +13,7 @@ set(library_sources ${RS_HEADERS} ${RS_SOURCES} ) +message(STATUS "${library_sources}") link_libraries(libtk205 gtest gmock) From 12a7e4411fcb2e543925a08795dd2924bfc4b6a9 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Tue, 16 Mar 2021 08:42:57 -0600 Subject: [PATCH 051/154] Debug source files path. --- libtk205/test/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/libtk205/test/CMakeLists.txt b/libtk205/test/CMakeLists.txt index 7b57d6f..3244b99 100644 --- a/libtk205/test/CMakeLists.txt +++ b/libtk205/test/CMakeLists.txt @@ -13,6 +13,7 @@ set(library_sources ${RS_HEADERS} ${RS_SOURCES} ) +message(STATUS "Source_dir: ${libtk205_SOURCE_DIR}/../schema-205/build/cpp/*.cpp") message(STATUS "${library_sources}") link_libraries(libtk205 gtest gmock) From cc85a1034d43e19bbd6f7c714cbdbdbf98ccd35b Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Tue, 16 Mar 2021 09:42:51 -0600 Subject: [PATCH 052/154] More debug messages. --- libtk205/test/CMakeLists.txt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/libtk205/test/CMakeLists.txt b/libtk205/test/CMakeLists.txt index 3244b99..461dcb1 100644 --- a/libtk205/test/CMakeLists.txt +++ b/libtk205/test/CMakeLists.txt @@ -1,11 +1,11 @@ # Test Executable -include_directories("${libtk205_SOURCE_DIR}/include" - "${libtk205_SOURCE_DIR}/../schema-205/build/include" +include_directories("${PROJECT_SOURCE_DIR}/include" + "${PROJECT_SOURCE_DIR}/../schema-205/build/include" "${gtest_SOURCE_DIR}/include") -file(GLOB RS_SOURCES "${libtk205_SOURCE_DIR}/../schema-205/build/cpp/*.cpp") -file(GLOB RS_HEADERS "${libtk205_SOURCE_DIR}/../schema-205/build/include/*.h") +file(GLOB RS_SOURCES "${PROJECT_SOURCE_DIR}/../schema-205/build/cpp/*.cpp") +file(GLOB RS_HEADERS "${PROJECT_SOURCE_DIR}/../schema-205/build/include/*.h") set(library_sources fixtures_libtk205.hpp @@ -13,7 +13,8 @@ set(library_sources ${RS_HEADERS} ${RS_SOURCES} ) -message(STATUS "Source_dir: ${libtk205_SOURCE_DIR}/../schema-205/build/cpp/*.cpp") +get_filename_component(source_dir "${PROJECT_SOURCE_DIR}/../schema-205/build/cpp" ABSOLUTE) +message(STATUS "Source_dir: ${source_dir}") message(STATUS "${library_sources}") link_libraries(libtk205 gtest gmock) From b2430c90e11d613d2048f60fbd14327f4ab3d695 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Tue, 16 Mar 2021 09:59:08 -0600 Subject: [PATCH 053/154] Declare sources as generated. --- libtk205/test/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libtk205/test/CMakeLists.txt b/libtk205/test/CMakeLists.txt index 461dcb1..1bd4382 100644 --- a/libtk205/test/CMakeLists.txt +++ b/libtk205/test/CMakeLists.txt @@ -13,6 +13,9 @@ set(library_sources ${RS_HEADERS} ${RS_SOURCES} ) +# The GENERATED property prevents the source files being used before they exist. +set_source_files_properties(${library_sources} PROPERTIES GENERATED TRUE) + get_filename_component(source_dir "${PROJECT_SOURCE_DIR}/../schema-205/build/cpp" ABSOLUTE) message(STATUS "Source_dir: ${source_dir}") message(STATUS "${library_sources}") From 213895a7d7b94c880cad3db908555724faf1281e Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Mon, 29 Mar 2021 15:20:08 -0600 Subject: [PATCH 054/154] Modify CMakeLists hierarchy to require regeneration and reGLOB. --- libtk205/CMakeLists.txt | 35 ++++++---------------------- libtk205/test/CMakeLists.txt | 45 ++++++++++++++++++------------------ 2 files changed, 30 insertions(+), 50 deletions(-) diff --git a/libtk205/CMakeLists.txt b/libtk205/CMakeLists.txt index 858f8c2..641aa94 100644 --- a/libtk205/CMakeLists.txt +++ b/libtk205/CMakeLists.txt @@ -9,49 +9,28 @@ set(JSON_BuildTests OFF CACHE INTERNAL "") include_directories(${CMAKE_CURRENT_SOURCE_DIR}/vendor/btwxt/src) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/vendor/json/single_include) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/vendor/json/include) -include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/build/include) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../schema-205/build/include) +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../schema-205/schema205/src) add_subdirectory(vendor/btwxt) add_custom_target(generate_cpp ALL COMMAND doit headers - COMMAND doit -s cpp + #COMMAND doit -s cpp WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../schema-205") -# copy_directory will create the destination if it does not exist -add_custom_target(copy_generated_source ALL - COMMAND ${CMAKE_COMMAND} -E make_directory "${PROJECT_SOURCE_DIR}/include" - COMMAND ${CMAKE_COMMAND} "-DPROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR}" -P "${PROJECT_SOURCE_DIR}/cmake/copy_base_class_files.cmake" - COMMAND ${CMAKE_COMMAND} "-DPROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR}" -P "${PROJECT_SOURCE_DIR}/cmake/copy_autogenerated_files.cmake") - -# Ideally, generated source files will be cleaned before cmake builds the project. Cleaning the -# files guarantees that if the generator fails silently, the build fails normally (and -# does not use out-of-date source). (CMake can check if files are different, but there's no -# check for if they should be different and aren't.) -# GLOB is deemed acceptable for this build. - -file(GLOB RS_SOURCES "${PROJECT_SOURCE_DIR}/../schema-205/build/cpp/*.cpp") -file(GLOB RS_HEADERS "${PROJECT_SOURCE_DIR}/../schema-205/build/include/*.h") -file(GLOB Class_declarations "${PROJECT_SOURCE_DIR}/include/*.h") - set (SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/libtk205.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/src/error_handling_tk205.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/src/rs_instance_factory.cpp" - ${RS_HEADERS} - ${RS_SOURCES} - ${Class_declarations}) + "${CMAKE_CURRENT_SOURCE_DIR}/src/rs_instance_factory.cpp") -# The GENERATED property prevents the source files being used before they exist. -set_source_files_properties(${SOURCES} PROPERTIES GENERATED TRUE) +message(STATUS "libtk205 sources: ${SOURCES}") -add_library(libtk205 src/libtk205.cpp ${SOURCES}) -target_link_libraries(libtk205 btwxt) -add_dependencies(libtk205 copy_generated_source) -add_dependencies(copy_generated_source generate_cpp) +add_library(libtk205 ${SOURCES}) +add_dependencies(libtk205 generate_cpp) add_subdirectory(vendor) + if (BUILD_TK205_TESTING) add_compile_definitions(TEST205_INPUT_EXAMPLES_DIR="${TEST205_INPUT_EXAMPLES_DIR}") add_subdirectory(test) diff --git a/libtk205/test/CMakeLists.txt b/libtk205/test/CMakeLists.txt index 1bd4382..d31dfa3 100644 --- a/libtk205/test/CMakeLists.txt +++ b/libtk205/test/CMakeLists.txt @@ -1,33 +1,34 @@ # Test Executable -include_directories("${PROJECT_SOURCE_DIR}/include" - "${PROJECT_SOURCE_DIR}/../schema-205/build/include" - "${gtest_SOURCE_DIR}/include") +include_directories(${PROJECT_SOURCE_DIR}/vendor/json/single_include) +include_directories(${PROJECT_SOURCE_DIR}/vendor/json/include) -file(GLOB RS_SOURCES "${PROJECT_SOURCE_DIR}/../schema-205/build/cpp/*.cpp") -file(GLOB RS_HEADERS "${PROJECT_SOURCE_DIR}/../schema-205/build/include/*.h") +include_directories(${PROJECT_SOURCE_DIR}/include) +include_directories(${PROJECT_SOURCE_DIR}/../schema-205/build/include) +include_directories(${gtest_SOURCE_DIR}/include) -set(library_sources - fixtures_libtk205.hpp - main_libtk205.cpp - ${RS_HEADERS} - ${RS_SOURCES} -) -# The GENERATED property prevents the source files being used before they exist. -set_source_files_properties(${library_sources} PROPERTIES GENERATED TRUE) +include(GoogleTest) -get_filename_component(source_dir "${PROJECT_SOURCE_DIR}/../schema-205/build/cpp" ABSOLUTE) -message(STATUS "Source_dir: ${source_dir}") -message(STATUS "${library_sources}") +execute_process(COMMAND doit headers cpp + WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/../schema-205") +file(GLOB RS_headers "${PROJECT_SOURCE_DIR}/../schema-205/build/include/*.h") +file(GLOB RS_src "${PROJECT_SOURCE_DIR}/../schema-205/build/cpp/*.cpp") -link_libraries(libtk205 gtest gmock) +set (SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/fixtures_libtk205.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/main_libtk205.cpp + ${RS_headers} + ${RS_src}) +message(STATUS "libtk205_tests sources: ${SOURCES}") -add_executable(libtk205_tests ${library_sources}) +#Does the following command do anything? +set_source_files_properties(${SOURCES} PROPERTIES GENERATED TRUE) -include(GoogleTest) +add_executable(libtk205_tests ${SOURCES}) +target_link_libraries(libtk205_tests libtk205 btwxt gtest gmock) gtest_discover_tests(libtk205_tests TEST_PREFIX libtk205:) -# add_custom_command(TARGET libtk205_tests POST_BUILD -# COMMAND doit clean -# WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../../schema-205") +add_custom_command(TARGET libtk205_tests POST_BUILD + COMMAND doit clean + WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/../schema-205") + From abac1720e879477c2131474f31666ccaf33c6e15 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Mon, 29 Mar 2021 15:27:21 -0600 Subject: [PATCH 055/154] Repopulate build matrix. --- .github/workflows/validate-and-build-with-poetry.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/validate-and-build-with-poetry.yml b/.github/workflows/validate-and-build-with-poetry.yml index b0c3f4f..dec7d80 100644 --- a/.github/workflows/validate-and-build-with-poetry.yml +++ b/.github/workflows/validate-and-build-with-poetry.yml @@ -7,7 +7,7 @@ jobs: name: Build strategy: matrix: - os: [windows-latest] + os: [ubuntu-latest, macos-latest, windows-latest] python-version: ["3.6", "3.7", "3.8", "3.9"] defaults: run: From b147f14f7437957a583732a6f7d7651c2df97ddf Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Tue, 30 Mar 2021 13:05:06 -0600 Subject: [PATCH 056/154] Clean only generated files. --- libtk205/test/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libtk205/test/CMakeLists.txt b/libtk205/test/CMakeLists.txt index d31dfa3..ea23f23 100644 --- a/libtk205/test/CMakeLists.txt +++ b/libtk205/test/CMakeLists.txt @@ -28,7 +28,8 @@ target_link_libraries(libtk205_tests libtk205 btwxt gtest gmock) gtest_discover_tests(libtk205_tests TEST_PREFIX libtk205:) +# Optional clean: Copy files to distributable directory first, if desired add_custom_command(TARGET libtk205_tests POST_BUILD - COMMAND doit clean + COMMAND doit clean headers cpp WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/../schema-205") From 58a1f1b1c691e50ab691af3a799db2fd0657803c Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Wed, 31 Mar 2021 09:29:26 -0600 Subject: [PATCH 057/154] Add static schema validation function and valijson submodule. --- .gitmodules | 3 +++ libtk205/CMakeLists.txt | 4 ++++ libtk205/include/libtk205.h | 1 + libtk205/src/libtk205.cpp | 38 +++++++++++++++++++++++++++++++++ libtk205/test/main_libtk205.cpp | 6 ++++++ libtk205/vendor/valijson | 1 + 6 files changed, 53 insertions(+) create mode 160000 libtk205/vendor/valijson diff --git a/.gitmodules b/.gitmodules index 438fbc8..c63de18 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,3 +7,6 @@ [submodule "libtk205/vendor/btwxt"] path = libtk205/vendor/btwxt url = https://github.com/bigladder/btwxt.git +[submodule "libtk205/vendor/valijson"] + path = libtk205/vendor/valijson + url = https://github.com/tristanpenman/valijson.git diff --git a/libtk205/CMakeLists.txt b/libtk205/CMakeLists.txt index 641aa94..f258fd7 100644 --- a/libtk205/CMakeLists.txt +++ b/libtk205/CMakeLists.txt @@ -9,6 +9,10 @@ set(JSON_BuildTests OFF CACHE INTERNAL "") include_directories(${CMAKE_CURRENT_SOURCE_DIR}/vendor/btwxt/src) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/vendor/json/single_include) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/vendor/json/include) +# Two "deeper" include directories necessary bc Valijson doesn't scope includes the same as everyone else +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/vendor/json/single_include/nlohmann) +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/vendor/json/include/nlohmann) +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/vendor/valijson/include) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../schema-205/build/include) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../schema-205/schema205/src) diff --git a/libtk205/include/libtk205.h b/libtk205/include/libtk205.h index 464e160..d976042 100644 --- a/libtk205/include/libtk205.h +++ b/libtk205/include/libtk205.h @@ -18,6 +18,7 @@ namespace libtk205_NS { public: A205_SDK(); + static bool Validate_A205(const char* schema, const char* input_file); ASHRAE205_NS::ASHRAE205 Load_A205(const char* input_file); ASHRAE205_NS::RS0001_NS::RS0001* Get_RS0001(const ASHRAE205_NS::ASHRAE205& a205); ASHRAE205_NS::RS0002_NS::RS0002* Get_RS0002(const ASHRAE205_NS::ASHRAE205& a205); diff --git a/libtk205/src/libtk205.cpp b/libtk205/src/libtk205.cpp index e6c69ed..faf1d73 100644 --- a/libtk205/src/libtk205.cpp +++ b/libtk205/src/libtk205.cpp @@ -11,10 +11,48 @@ #include +#include +#include +#include +#include +#include + namespace libtk205_NS { using json = nlohmann::json; using namespace ASHRAE205_NS; + using valijson::Schema; + using valijson::SchemaParser; + using valijson::Validator; + using valijson::adapters::NlohmannJsonAdapter; + + bool A205_SDK::Validate_A205(const char* schema_file, const char* input_file) + { + json schema_doc; + if (!valijson::utils::loadDocument(schema_file, schema_doc)) + { + throw std::runtime_error("Failed to load schema document"); + } + + Schema schema; + SchemaParser parser; + NlohmannJsonAdapter schema_adapter(schema_doc); + parser.populateSchema(schema_adapter, schema); + + json input_doc; + if (!valijson::utils::loadDocument(input_file, input_doc)) + { + throw std::runtime_error("Failed to load input document"); + } + + Validator validator; + NlohmannJsonAdapter input_adapter(input_doc); + if (!validator.validate(schema, input_adapter, NULL)) + { + throw std::runtime_error("Validation failed."); + } + return true; + } A205_SDK::A205_SDK() { diff --git a/libtk205/test/main_libtk205.cpp b/libtk205/test/main_libtk205.cpp index eef6f6c..277277d 100644 --- a/libtk205/test/main_libtk205.cpp +++ b/libtk205/test/main_libtk205.cpp @@ -16,6 +16,12 @@ TEST_F(RS0001_fixture, Create_RS01) EXPECT_TRUE(rs != nullptr); } +TEST(A205, Validate_RS01) +{ + EXPECT_TRUE(A205_SDK::Validate_A205(TEST205_INPUT_EXAMPLES_DIR"/schema-205/build/schema/RS0001.schema.json", + TEST205_INPUT_EXAMPLES_DIR"/schema-205/examples/RS0001/Chiller-Constant-Efficiency.RS0001.a205.json")); +} + TEST_F(RS0001_fixture, Calculate_performance_cooling) { auto rs = _sdk.Get_RS0001(_a205); diff --git a/libtk205/vendor/valijson b/libtk205/vendor/valijson new file mode 160000 index 0000000..8a784f2 --- /dev/null +++ b/libtk205/vendor/valijson @@ -0,0 +1 @@ +Subproject commit 8a784f23bf3ee6a183c450cfb60271b76e0b1b1c From 1329c71cc6c253651561fe80446dd31e0b1087a6 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Wed, 31 Mar 2021 09:42:30 -0600 Subject: [PATCH 058/154] Add test to workflow. --- .github/workflows/validate-and-build-with-poetry.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/validate-and-build-with-poetry.yml b/.github/workflows/validate-and-build-with-poetry.yml index dec7d80..4a5b87d 100644 --- a/.github/workflows/validate-and-build-with-poetry.yml +++ b/.github/workflows/validate-and-build-with-poetry.yml @@ -56,3 +56,5 @@ jobs: mkdir build poetry run cmake -B build poetry run cmake --build build --config Release + - name: test + run: source $VENV && cd build && ctest From c92a60d8adb6efeed226051bbfad723d9110ea45 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Wed, 31 Mar 2021 17:10:40 -0600 Subject: [PATCH 059/154] Test step needs schema to be generated. --- .github/workflows/validate-and-build-with-poetry.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/validate-and-build-with-poetry.yml b/.github/workflows/validate-and-build-with-poetry.yml index 4a5b87d..2c92704 100644 --- a/.github/workflows/validate-and-build-with-poetry.yml +++ b/.github/workflows/validate-and-build-with-poetry.yml @@ -57,4 +57,8 @@ jobs: poetry run cmake -B build poetry run cmake --build build --config Release - name: test - run: source $VENV && cd build && ctest + run: | + source $VENV + poetry run doit schema + cd build + ctest From 023d2feb7916e65bb597a418eea0c4e7026a180d Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Wed, 31 Mar 2021 19:38:53 -0600 Subject: [PATCH 060/154] Change to schema directory before generating json. --- .github/workflows/validate-and-build-with-poetry.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/validate-and-build-with-poetry.yml b/.github/workflows/validate-and-build-with-poetry.yml index 2c92704..a0e86c0 100644 --- a/.github/workflows/validate-and-build-with-poetry.yml +++ b/.github/workflows/validate-and-build-with-poetry.yml @@ -59,6 +59,7 @@ jobs: - name: test run: | source $VENV + cd schema-205 poetry run doit schema - cd build + cd ..\build ctest From 3bfb102c517f283cdc19b66a6a9946fbc4dc4e4f Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Mon, 5 Apr 2021 07:54:05 -0600 Subject: [PATCH 061/154] Try new cache on CI. --- .github/workflows/validate-and-build-with-poetry.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/validate-and-build-with-poetry.yml b/.github/workflows/validate-and-build-with-poetry.yml index a0e86c0..ec8dae6 100644 --- a/.github/workflows/validate-and-build-with-poetry.yml +++ b/.github/workflows/validate-and-build-with-poetry.yml @@ -32,7 +32,7 @@ jobs: uses: actions/cache@v2 with: path: .venv - key: venv-poe-v1-${{ matrix.os }}-py${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} + key: venv-poe-v2-${{ matrix.os }}-py${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} - name: Install dependencies if cache does not exist run: poetry install if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' From 2ec48e7ed74255b4c6f5ba3b2c4d562ad5bb6bf7 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Mon, 5 Apr 2021 08:18:03 -0600 Subject: [PATCH 062/154] Separate cd steps so Lin/Win both work. --- .github/workflows/validate-and-build-with-poetry.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/validate-and-build-with-poetry.yml b/.github/workflows/validate-and-build-with-poetry.yml index ec8dae6..b782c37 100644 --- a/.github/workflows/validate-and-build-with-poetry.yml +++ b/.github/workflows/validate-and-build-with-poetry.yml @@ -61,5 +61,6 @@ jobs: source $VENV cd schema-205 poetry run doit schema - cd ..\build + cd .. + cd build ctest From 6dcd155b053d902cc1a4ab8d4bfab62bd079595a Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Wed, 14 Apr 2021 10:10:23 -0600 Subject: [PATCH 063/154] Add libtk205 build instructions. --- README.md | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 640f9a7..b09b622 100755 --- a/README.md +++ b/README.md @@ -28,8 +28,8 @@ The Standard is intended to support the following use cases: Generally, a data publisher (e.g., manufacturer) provides an ASHRAE Standard 205 representation of a specific piece of equipment that the application user can load into compliant performance simulation software. -Building --------- +Building the Toolkit +-------------------- Toolkit 205 uses git submodules. To clone the submodules, you will either have to: @@ -64,6 +64,23 @@ Finally, you can build (generate the schema, translate examples, generate templa tk205 is both a python module and a command line tool. +Building the Toolkit C++ library +-------------------------------- + +The toolkit can additionally build a C++ library suitable for import into C++ modeling tools. The library (libtk205) uses elements of the schema-205 submodule to auto-generate source code for Representation Specifications, and includes other source files from this repository. + +To build the library, use + +`cmake -B build` + +to generate build files for an "out-of-source" build directory, then + +`cmake --build build --config [Debug/Release]` + +to build libtk205. + +**Note:** Because the tests for libtk205 automatically clean all auto-generated files after the build, the cmake generator must be run fresh each time. This ensures that no Representations are out of date. + Example Usage ------------- From 2ca350cd1a7810e19df3ecddc64a3387774a9d26 Mon Sep 17 00:00:00 2001 From: Neal Kruis Date: Tue, 20 Apr 2021 15:03:23 -0600 Subject: [PATCH 064/154] Run everything through doit. --- .../validate-and-build-with-poetry.yml | 32 +- .gitignore | 2 +- Pipfile | 23 - Pipfile.lock | 423 ------------------ config/templates.json | 8 +- dodo.py | 27 +- pyproject.toml | 3 +- setup.cfg | 17 - setup.py | 8 - tk205/xlsx.py | 17 +- 10 files changed, 44 insertions(+), 516 deletions(-) delete mode 100644 Pipfile delete mode 100644 Pipfile.lock delete mode 100644 setup.cfg delete mode 100644 setup.py diff --git a/.github/workflows/validate-and-build-with-poetry.yml b/.github/workflows/validate-and-build-with-poetry.yml index b782c37..6b5d7a6 100644 --- a/.github/workflows/validate-and-build-with-poetry.yml +++ b/.github/workflows/validate-and-build-with-poetry.yml @@ -36,31 +36,7 @@ jobs: - name: Install dependencies if cache does not exist run: poetry install if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' - # - name: Validate, generate, and test - # run: | - # source $VENV - # poetry run doit - - name: generate and make libtk205 - if: matrix.os != 'windows-latest' - run: | - source $VENV - mkdir build - cd build - poetry run cmake .. - poetry run make - - name: generate and build libtk205 (Windows) - if: matrix.os == 'windows-latest' - shell: bash - run: | - source $VENV - mkdir build - poetry run cmake -B build - poetry run cmake --build build --config Release - - name: test - run: | - source $VENV - cd schema-205 - poetry run doit schema - cd .. - cd build - ctest + - name: Validate, generate, and test + run: | + source $VENV + poetry run doit diff --git a/.gitignore b/.gitignore index b90986f..4be485f 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,4 @@ env/ .vscode/ .pytest_cache/ sandbox/ -.doit.db.db \ No newline at end of file +.doit.db* \ No newline at end of file diff --git a/Pipfile b/Pipfile deleted file mode 100644 index 3f0f50e..0000000 --- a/Pipfile +++ /dev/null @@ -1,23 +0,0 @@ -[[source]] -name = "pypi" -url = "https://pypi.org/simple" -verify_ssl = true - -[dev-packages] -pylint = "*" -pytest = "*" -atomicwrites = "*" -markdown = "*" -doit = "*" -gitpython = "*" - -[packages] -click = "*" -jsonschema = "*" -cbor2 = "*" -openpyxl = "*" -pyyaml = "*" -jinja2 = "*" -pytablewriter = "*" -tk205 = {editable = true,path = "."} -schema205 = {editable = true,path = "schema-205"} diff --git a/Pipfile.lock b/Pipfile.lock deleted file mode 100644 index 3285e5b..0000000 --- a/Pipfile.lock +++ /dev/null @@ -1,423 +0,0 @@ -{ - "_meta": { - "hash": { - "sha256": "429a15573020c5a86708fbc709795b9bf8f5c125400d7c2e626125c89801a078" - }, - "pipfile-spec": 6, - "requires": {}, - "sources": [ - { - "name": "pypi", - "url": "https://pypi.org/simple", - "verify_ssl": true - } - ] - }, - "default": { - "attrs": { - "hashes": [ - "sha256:31b2eced602aa8423c2aea9c76a724617ed67cf9513173fd3a4f03e3a929c7e6", - "sha256:832aa3cde19744e49938b91fea06d69ecb9e649c93ba974535d08ad92164f700" - ], - "version": "==20.3.0" - }, - "cbor2": { - "hashes": [ - "sha256:a33aa2e5534fd74401ac95686886e655e3b2ce6383b3f958199b6e70a87c94bf" - ], - "index": "pypi", - "version": "==5.2.0" - }, - "chardet": { - "hashes": [ - "sha256:0d6f53a15db4120f2b08c94f11e7d93d2c911ee118b6b30a04ec3ee8310179fa", - "sha256:f864054d66fd9118f2e67044ac8981a54775ec5b67aed0441892edb553d21da5" - ], - "version": "==4.0.0" - }, - "click": { - "hashes": [ - "sha256:d2b5255c7c6349bc1bd1e59e08cd12acbbd63ce649f2588755783aa94dfb6b1a", - "sha256:dacca89f4bfadd5de3d7489b7c8a566eee0d3676333fbb50030263894c38c0dc" - ], - "index": "pypi", - "version": "==7.1.2" - }, - "dataproperty": { - "hashes": [ - "sha256:847f2d8927d8426a0eb20e48238e2db19133506bcd1e2608e21314004fa80d72", - "sha256:9288b74f5d6e07d4c69c218802556f877d711fce2c62abc6aea286b357e84be2" - ], - "version": "==0.50.0" - }, - "et-xmlfile": { - "hashes": [ - "sha256:614d9722d572f6246302c4491846d2c393c199cfa4edc9af593437691683335b" - ], - "version": "==1.0.1" - }, - "jdcal": { - "hashes": [ - "sha256:1abf1305fce18b4e8aa248cf8fe0c56ce2032392bc64bbd61b5dff2a19ec8bba", - "sha256:472872e096eb8df219c23f2689fc336668bdb43d194094b5cc1707e1640acfc8" - ], - "version": "==1.4.1" - }, - "jinja2": { - "hashes": [ - "sha256:89aab215427ef59c34ad58735269eb58b1a5808103067f7bb9d5836c651b3bb0", - "sha256:f0a4641d3cf955324a89c04f3d94663aa4d638abe8f733ecd3582848e1c37035" - ], - "index": "pypi", - "version": "==2.11.2" - }, - "jsonschema": { - "hashes": [ - "sha256:4e5b3cf8216f577bee9ce139cbe72eca3ea4f292ec60928ff24758ce626cd163", - "sha256:c8a85b28d377cc7737e46e2d9f2b4f44ee3c0e1deac6bf46ddefc7187d30797a" - ], - "index": "pypi", - "version": "==3.2.0" - }, - "markupsafe": { - "hashes": [ - "sha256:00bc623926325b26bb9605ae9eae8a215691f33cae5df11ca5424f06f2d1f473", - "sha256:09027a7803a62ca78792ad89403b1b7a73a01c8cb65909cd876f7fcebd79b161", - "sha256:09c4b7f37d6c648cb13f9230d847adf22f8171b1ccc4d5682398e77f40309235", - "sha256:1027c282dad077d0bae18be6794e6b6b8c91d58ed8a8d89a89d59693b9131db5", - "sha256:13d3144e1e340870b25e7b10b98d779608c02016d5184cfb9927a9f10c689f42", - "sha256:24982cc2533820871eba85ba648cd53d8623687ff11cbb805be4ff7b4c971aff", - "sha256:29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b", - "sha256:43a55c2930bbc139570ac2452adf3d70cdbb3cfe5912c71cdce1c2c6bbd9c5d1", - "sha256:46c99d2de99945ec5cb54f23c8cd5689f6d7177305ebff350a58ce5f8de1669e", - "sha256:500d4957e52ddc3351cabf489e79c91c17f6e0899158447047588650b5e69183", - "sha256:535f6fc4d397c1563d08b88e485c3496cf5784e927af890fb3c3aac7f933ec66", - "sha256:596510de112c685489095da617b5bcbbac7dd6384aeebeda4df6025d0256a81b", - "sha256:62fe6c95e3ec8a7fad637b7f3d372c15ec1caa01ab47926cfdf7a75b40e0eac1", - "sha256:6788b695d50a51edb699cb55e35487e430fa21f1ed838122d722e0ff0ac5ba15", - "sha256:6dd73240d2af64df90aa7c4e7481e23825ea70af4b4922f8ede5b9e35f78a3b1", - "sha256:717ba8fe3ae9cc0006d7c451f0bb265ee07739daf76355d06366154ee68d221e", - "sha256:79855e1c5b8da654cf486b830bd42c06e8780cea587384cf6545b7d9ac013a0b", - "sha256:7c1699dfe0cf8ff607dbdcc1e9b9af1755371f92a68f706051cc8c37d447c905", - "sha256:88e5fcfb52ee7b911e8bb6d6aa2fd21fbecc674eadd44118a9cc3863f938e735", - "sha256:8defac2f2ccd6805ebf65f5eeb132adcf2ab57aa11fdf4c0dd5169a004710e7d", - "sha256:98c7086708b163d425c67c7a91bad6e466bb99d797aa64f965e9d25c12111a5e", - "sha256:9add70b36c5666a2ed02b43b335fe19002ee5235efd4b8a89bfcf9005bebac0d", - "sha256:9bf40443012702a1d2070043cb6291650a0841ece432556f784f004937f0f32c", - "sha256:ade5e387d2ad0d7ebf59146cc00c8044acbd863725f887353a10df825fc8ae21", - "sha256:b00c1de48212e4cc9603895652c5c410df699856a2853135b3967591e4beebc2", - "sha256:b1282f8c00509d99fef04d8ba936b156d419be841854fe901d8ae224c59f0be5", - "sha256:b2051432115498d3562c084a49bba65d97cf251f5a331c64a12ee7e04dacc51b", - "sha256:ba59edeaa2fc6114428f1637ffff42da1e311e29382d81b339c1817d37ec93c6", - "sha256:c8716a48d94b06bb3b2524c2b77e055fb313aeb4ea620c8dd03a105574ba704f", - "sha256:cd5df75523866410809ca100dc9681e301e3c27567cf498077e8551b6d20e42f", - "sha256:cdb132fc825c38e1aeec2c8aa9338310d29d337bebbd7baa06889d09a60a1fa2", - "sha256:e249096428b3ae81b08327a63a485ad0878de3fb939049038579ac0ef61e17e7", - "sha256:e8313f01ba26fbbe36c7be1966a7b7424942f670f38e666995b88d012765b9be" - ], - "version": "==1.1.1" - }, - "mbstrdecoder": { - "hashes": [ - "sha256:56b967800d6554815a6b18f98f915e84912852eff21d94d5e036fe124bc27f53", - "sha256:f895e1fb97496855ab5e43de99588787169c01f782c71625142d1a62729e9f9d" - ], - "version": "==1.0.1" - }, - "msgfy": { - "hashes": [ - "sha256:474c08302cd56ccee1300ac7976a01ebd1e42716fc9bcd947d39a311a15b7012", - "sha256:ce8a8c8c223279fa0a2c0f278eec139fcf761ca4eb98f179f54a1b96f53514f5" - ], - "version": "==0.1.0" - }, - "openpyxl": { - "hashes": [ - "sha256:18e11f9a650128a12580a58e3daba14e00a11d9e907c554a17ea016bf1a2c71b", - "sha256:f7d666b569f729257082cf7ddc56262431878f602dcc2bc3980775c59439cdab" - ], - "index": "pypi", - "version": "==3.0.5" - }, - "pathvalidate": { - "hashes": [ - "sha256:1be91f23dd1fb5002ad2b52cb4e7396deb56092ef29a7facb6e4032c5a444f8a", - "sha256:4a84300ec54e00db7bbfbbd65b8f138c44340fac1850d7731228d3b9d6bfa4c5" - ], - "version": "==2.3.1" - }, - "pyrsistent": { - "hashes": [ - "sha256:2e636185d9eb976a18a8a8e96efce62f2905fea90041958d8cc2a189756ebf3e" - ], - "version": "==0.17.3" - }, - "pytablewriter": { - "hashes": [ - "sha256:763fb7717b64320188b2f55c5667f9f03c6fef3b00ac0aaafa85b6b6f2741b36", - "sha256:d232491e32fc84f28a6217fcd225d2ed82ae59d576d39724c98fdb7c7147b9ec" - ], - "index": "pypi", - "version": "==0.58.0" - }, - "python-dateutil": { - "hashes": [ - "sha256:73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c", - "sha256:75bb3f31ea686f1197762692a9ee6a7550b59fc6ca3a1f4b5d7e32fb98e2da2a" - ], - "version": "==2.8.1" - }, - "pytz": { - "hashes": [ - "sha256:3e6b7dd2d1e0a59084bcee14a17af60c5c562cdc16d828e8eba2e683d3a7e268", - "sha256:5c55e189b682d420be27c6995ba6edce0c0a77dd67bfbe2ae6607134d5851ffd" - ], - "version": "==2020.4" - }, - "pyyaml": { - "hashes": [ - "sha256:06a0d7ba600ce0b2d2fe2e78453a470b5a6e000a985dd4a4e54e436cc36b0e97", - "sha256:240097ff019d7c70a4922b6869d8a86407758333f02203e0fc6ff79c5dcede76", - "sha256:4f4b913ca1a7319b33cfb1369e91e50354d6f07a135f3b901aca02aa95940bd2", - "sha256:6034f55dab5fea9e53f436aa68fa3ace2634918e8b5994d82f3621c04ff5ed2e", - "sha256:69f00dca373f240f842b2931fb2c7e14ddbacd1397d57157a9b005a6a9942648", - "sha256:73f099454b799e05e5ab51423c7bcf361c58d3206fa7b0d555426b1f4d9a3eaf", - "sha256:74809a57b329d6cc0fdccee6318f44b9b8649961fa73144a98735b0aaf029f1f", - "sha256:7739fc0fa8205b3ee8808aea45e968bc90082c10aef6ea95e855e10abf4a37b2", - "sha256:95f71d2af0ff4227885f7a6605c37fd53d3a106fcab511b8860ecca9fcf400ee", - "sha256:ad9c67312c84def58f3c04504727ca879cb0013b2517c85a9a253f0cb6380c0a", - "sha256:b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d", - "sha256:cc8955cfbfc7a115fa81d85284ee61147059a753344bc51098f3ccd69b0d7e0c", - "sha256:d13155f591e6fcc1ec3b30685d50bf0711574e2c0dfffd7644babf8b5102ca1a" - ], - "index": "pypi", - "version": "==5.3.1" - }, - "schema205": { - "editable": true, - "path": "schema-205" - }, - "six": { - "hashes": [ - "sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259", - "sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced" - ], - "version": "==1.15.0" - }, - "tabledata": { - "hashes": [ - "sha256:59cc3b5f0c52ea142386b0653d3d48d2e976fe021154871982b4d234b82be747", - "sha256:fa4c2db55cbb198ca5e21063ae743f418d3efbba94cd4844d2f759f994df76a2" - ], - "version": "==1.1.3" - }, - "tcolorpy": { - "hashes": [ - "sha256:12b5c928572781fc7e5df5629da6342a65ec7d35efb64b5824c105b8debaaac7", - "sha256:ffbe886f1321dab88d9cfd4218ea8d93d50d6ad0875c3741dd75fe1437379406" - ], - "version": "==0.0.8" - }, - "tk205": { - "editable": true, - "path": "." - }, - "typepy": { - "extras": [ - "datetime" - ], - "hashes": [ - "sha256:30b4d955bc8b628e7ae39bf6f07e2a07939def893b84d7a6cd10ba49c5646717", - "sha256:afec7feeac73d6b01fe6b23314edc17eaf8469f93783d2460c229068ae9dc588" - ], - "version": "==1.1.2" - } - }, - "develop": { - "astroid": { - "hashes": [ - "sha256:2f4078c2a41bf377eea06d71c9d2ba4eb8f6b1af2135bec27bbbb7d8f12bb703", - "sha256:bc58d83eb610252fd8de6363e39d4f1d0619c894b0ed24603b881c02e64c7386" - ], - "version": "==2.4.2" - }, - "atomicwrites": { - "hashes": [ - "sha256:6d1784dea7c0c8d4a5172b6c620f40b6e4cbfdf96d783691f2e1302a7b88e197", - "sha256:ae70396ad1a434f9c7046fd2dd196fc04b12f9e91ffb859164193be8b6168a7a" - ], - "index": "pypi", - "version": "==1.4.0" - }, - "attrs": { - "hashes": [ - "sha256:31b2eced602aa8423c2aea9c76a724617ed67cf9513173fd3a4f03e3a929c7e6", - "sha256:832aa3cde19744e49938b91fea06d69ecb9e649c93ba974535d08ad92164f700" - ], - "version": "==20.3.0" - }, - "cloudpickle": { - "hashes": [ - "sha256:3a32d0eb0bc6f4d0c57fbc4f3e3780f7a81e6fee0fa935072884d58ae8e1cc7c", - "sha256:9bc994f9e9447593bd0a45371f0e7ac7333710fcf64a4eb9834bf149f4ef2f32" - ], - "version": "==1.6.0" - }, - "doit": { - "hashes": [ - "sha256:211fc0de3fd9ee31e5c4ccb36bc1a4054b5c4a4a44f915ca413896155b684bfa", - "sha256:37c3b35c2151647b968b2af24481112b2f813c30f695366db0639d529190a143" - ], - "index": "pypi", - "version": "==0.33.1" - }, - "gitdb": { - "hashes": [ - "sha256:91f36bfb1ab7949b3b40e23736db18231bf7593edada2ba5c3a174a7b23657ac", - "sha256:c9e1f2d0db7ddb9a704c2a0217be31214e91a4fe1dea1efad19ae42ba0c285c9" - ], - "version": "==4.0.5" - }, - "gitpython": { - "hashes": [ - "sha256:6eea89b655917b500437e9668e4a12eabdcf00229a0df1762aabd692ef9b746b", - "sha256:befa4d101f91bad1b632df4308ec64555db684c360bd7d2130b4807d49ce86b8" - ], - "index": "pypi", - "version": "==3.1.11" - }, - "iniconfig": { - "hashes": [ - "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3", - "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32" - ], - "version": "==1.1.1" - }, - "isort": { - "hashes": [ - "sha256:dcab1d98b469a12a1a624ead220584391648790275560e1a43e54c5dceae65e7", - "sha256:dcaeec1b5f0eca77faea2a35ab790b4f3680ff75590bfcb7145986905aab2f58" - ], - "version": "==5.6.4" - }, - "lazy-object-proxy": { - "hashes": [ - "sha256:0c4b206227a8097f05c4dbdd323c50edf81f15db3b8dc064d08c62d37e1a504d", - "sha256:194d092e6f246b906e8f70884e620e459fc54db3259e60cf69a4d66c3fda3449", - "sha256:1be7e4c9f96948003609aa6c974ae59830a6baecc5376c25c92d7d697e684c08", - "sha256:4677f594e474c91da97f489fea5b7daa17b5517190899cf213697e48d3902f5a", - "sha256:48dab84ebd4831077b150572aec802f303117c8cc5c871e182447281ebf3ac50", - "sha256:5541cada25cd173702dbd99f8e22434105456314462326f06dba3e180f203dfd", - "sha256:59f79fef100b09564bc2df42ea2d8d21a64fdcda64979c0fa3db7bdaabaf6239", - "sha256:8d859b89baf8ef7f8bc6b00aa20316483d67f0b1cbf422f5b4dc56701c8f2ffb", - "sha256:9254f4358b9b541e3441b007a0ea0764b9d056afdeafc1a5569eee1cc6c1b9ea", - "sha256:9651375199045a358eb6741df3e02a651e0330be090b3bc79f6d0de31a80ec3e", - "sha256:97bb5884f6f1cdce0099f86b907aa41c970c3c672ac8b9c8352789e103cf3156", - "sha256:9b15f3f4c0f35727d3a0fba4b770b3c4ebbb1fa907dbcc046a1d2799f3edd142", - "sha256:a2238e9d1bb71a56cd710611a1614d1194dc10a175c1e08d75e1a7bcc250d442", - "sha256:a6ae12d08c0bf9909ce12385803a543bfe99b95fe01e752536a60af2b7797c62", - "sha256:ca0a928a3ddbc5725be2dd1cf895ec0a254798915fb3a36af0964a0a4149e3db", - "sha256:cb2c7c57005a6804ab66f106ceb8482da55f5314b7fcb06551db1edae4ad1531", - "sha256:d74bb8693bf9cf75ac3b47a54d716bbb1a92648d5f781fc799347cfc95952383", - "sha256:d945239a5639b3ff35b70a88c5f2f491913eb94871780ebfabb2568bd58afc5a", - "sha256:eba7011090323c1dadf18b3b689845fd96a61ba0a1dfbd7f24b921398affc357", - "sha256:efa1909120ce98bbb3777e8b6f92237f5d5c8ea6758efea36a473e1d38f7d3e4", - "sha256:f3900e8a5de27447acbf900b4750b0ddfd7ec1ea7fbaf11dfa911141bc522af0" - ], - "version": "==1.4.3" - }, - "macfsevents": { - "hashes": [ - "sha256:1324b66b356051de662ba87d84f73ada062acd42b047ed1246e60a449f833e10" - ], - "markers": "sys_platform == 'darwin'", - "version": "==0.8.1" - }, - "markdown": { - "hashes": [ - "sha256:5d9f2b5ca24bc4c7a390d22323ca4bad200368612b5aaa7796babf971d2b2f18", - "sha256:c109c15b7dc20a9ac454c9e6025927d44460b85bd039da028d85e2b6d0bcc328" - ], - "index": "pypi", - "version": "==3.3.3" - }, - "mccabe": { - "hashes": [ - "sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42", - "sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f" - ], - "version": "==0.6.1" - }, - "packaging": { - "hashes": [ - "sha256:24e0da08660a87484d1602c30bb4902d74816b6985b93de36926f5bc95741858", - "sha256:78598185a7008a470d64526a8059de9aaa449238f280fc9eb6b13ba6c4109093" - ], - "version": "==20.8" - }, - "pluggy": { - "hashes": [ - "sha256:15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0", - "sha256:966c145cd83c96502c3c3868f50408687b38434af77734af1e9ca461a4081d2d" - ], - "version": "==0.13.1" - }, - "py": { - "hashes": [ - "sha256:21b81bda15b66ef5e1a777a21c4dcd9c20ad3efd0b3f817e7a809035269e1bd3", - "sha256:3b80836aa6d1feeaa108e046da6423ab8f6ceda6468545ae8d02d9d58d18818a" - ], - "version": "==1.10.0" - }, - "pylint": { - "hashes": [ - "sha256:bb4a908c9dadbc3aac18860550e870f58e1a02c9f2c204fdf5693d73be061210", - "sha256:bfe68f020f8a0fece830a22dd4d5dddb4ecc6137db04face4c3420a46a52239f" - ], - "index": "pypi", - "version": "==2.6.0" - }, - "pyparsing": { - "hashes": [ - "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1", - "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b" - ], - "version": "==2.4.7" - }, - "pytest": { - "hashes": [ - "sha256:1969f797a1a0dbd8ccf0fecc80262312729afea9c17f1d70ebf85c5e76c6f7c8", - "sha256:66e419b1899bc27346cb2c993e12c5e5e8daba9073c1fbce33b9807abc95c306" - ], - "index": "pypi", - "version": "==6.2.1" - }, - "six": { - "hashes": [ - "sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259", - "sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced" - ], - "version": "==1.15.0" - }, - "smmap": { - "hashes": [ - "sha256:54c44c197c819d5ef1991799a7e30b662d1e520f2ac75c9efbeb54a742214cf4", - "sha256:9c98bbd1f9786d22f14b3d4126894d56befb835ec90cef151af566c7e19b5d24" - ], - "version": "==3.0.4" - }, - "toml": { - "hashes": [ - "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b", - "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f" - ], - "version": "==0.10.2" - }, - "wrapt": { - "hashes": [ - "sha256:b62ffa81fb85f4332a4f609cab4ac40709470da05643a082ec1eb88e6d9b97d7" - ], - "version": "==1.12.1" - } - } -} diff --git a/config/templates.json b/config/templates.json index b422f40..cd130c3 100644 --- a/config/templates.json +++ b/config/templates.json @@ -8,24 +8,24 @@ ], "RS0002" : [ { - "keywords": {"performance_map_type": "CONTINUOUS"}, + "keywords": {"operation_speed_control_type": "CONTINUOUS"}, "file-name-suffix": "continuous-fan", "description": "Unitary System with Continuous Fan" }, { - "keywords": {"performance_map_type": "DISCRETE"}, + "keywords": {"operation_speed_control_type": "DISCRETE"}, "file-name-suffix": "discrete-fan", "description": "Unitary System with Discrete Fan" } ], "RS0003" : [ { - "keywords": {"performance_map_type": "CONTINUOUS"}, + "keywords": {"operation_speed_control_type": "CONTINUOUS"}, "file-name-suffix": "continuous", "description": "Continuous Fan Assembly" }, { - "keywords": {"performance_map_type": "DISCRETE"}, + "keywords": {"operation_speed_control_type": "DISCRETE"}, "file-name-suffix": "discrete", "description": "Discrete Fan Assembly" } diff --git a/dodo.py b/dodo.py index 45478eb..8b31b08 100644 --- a/dodo.py +++ b/dodo.py @@ -9,6 +9,7 @@ EXAMPLES_OUTPUT_PATH = os.path.join(BUILD_PATH,"examples") TEMPLATE_OUTPUT_PATH = os.path.join(BUILD_PATH,"templates") TEMPLATE_CONFIG = os.path.join('config','templates.json') +LIB_BUILD_PATH = os.path.join(BUILD_PATH,"libtk205") def task_build_schema(): '''Build the schema''' @@ -148,12 +149,34 @@ def task_templates(): 'clean': True } -def task_test(): +def task_python_tests(): '''Performs unit tests and example file validation tests''' return { 'task_dep': ['build_schema','cbor','yaml','xlsx','json'], 'file_dep': cbor_examples + yaml_examples + xlsx_examples + json_examples, - 'actions': ['pytest -v test'] + 'actions': [ + 'pytest -v test', + ] + } + +def task_libtk205(): + '''Build libtk205''' + return { + 'task_dep': ['build_schema'], + 'actions': [ + (create_folder, [LIB_BUILD_PATH]), + f'cmake -B {LIB_BUILD_PATH}', + f'cmake --build {LIB_BUILD_PATH} --config Release' + ], + } + +def task_libtk205_tests(): + '''Performs unit tests and example file validation tests''' + return { + 'task_dep': ['libtk205'], + 'actions': [ + f'cd {LIB_BUILD_PATH} && ctest', + ], } def task_web(): diff --git a/pyproject.toml b/pyproject.toml index b6ea850..e8d531f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [tool.poetry] -name = "toolkit-205" +name = "tk205" version = "0.1.0" description = "" authors = ["Open205"] @@ -14,7 +14,6 @@ pyyaml = "*" jinja2 = "*" pytablewriter = "*" schema205 = { path = "schema-205", develop = true } -#toolkit-205 = { path = ".", develop = true } [tool.poetry.dev-dependencies] pylint = "*" diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 094bdf3..0000000 --- a/setup.cfg +++ /dev/null @@ -1,17 +0,0 @@ -[metadata] -name = tk205 -author = Open205 -description-file = README.md -license = BSD-3 -keywords = - hvac - simulation - buildings - -[files] -packages = - tk205 - -[entry_points] -console_scripts = - tk205 = tk205.cli:cli diff --git a/setup.py b/setup.py deleted file mode 100644 index aa2d8a0..0000000 --- a/setup.py +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env python - -from setuptools import setup - -setup( - setup_requires=['pbr'], - pbr=True, -) diff --git a/tk205/xlsx.py b/tk205/xlsx.py index 62c71d0..e267022 100644 --- a/tk205/xlsx.py +++ b/tk205/xlsx.py @@ -656,8 +656,9 @@ def create_tree_from_content(self, content, parent): self.create_tree_from_content(content[item], new_node) elif type(content[item]) == list: if len(content[item]) == 0: - # effectively leave blank - A205XLSXNode(item,parent=parent,value=content[item]) + # Create new sheet for blank array + sheet_ref = unique_name_with_index(item, self.sheets) + A205XLSXNode(item,parent=parent,sheet_ref=sheet_ref) elif type(content[item][0]) == dict: # Create new sheet for array sheet_ref = unique_name_with_index(item, self.sheets) @@ -717,7 +718,7 @@ def create_tree_from_schema(self, node): value = node.inner_rs elif item == 'rs_instance': option = get_rs_index(node.inner_rs) - elif 'performance_map' == item[:len('performance_map')] and '_type' not in item: # TODO: Something more robust than this... + elif 'performance_map' == item[:len('performance_map')]: sheet_ref = unique_name_with_index(item, self.sheets) elif 'items' in child_schema_node and node.sheet_type == SheetType.FLAT: sheet_ref = unique_name_with_index(item, self.sheets) @@ -739,8 +740,8 @@ def create_tree_from_schema(self, node): # oneOf nodes if 'oneOf' in schema_node: - if node.inner_rs == 'RS0003' and node.name == 'performance_map' and 'performance_map_type' in self.template_args: - template_arg_value = self.get_template_arg('performance_map_type') + if node.inner_rs == 'RS0003' and node.name == 'performance_map' and 'operation_speed_control_type' in self.template_args: + template_arg_value = self.get_template_arg('operation_speed_control_type') if template_arg_value == 'CONTINUOUS': schema_node = self.schema.resolve(schema_node['oneOf'][0],step_in=False) node.options[-1] = 0 @@ -769,9 +770,9 @@ def template_tree(self, repspec, **kwargs): self.template_args_used[arg] = False self.root_node = A205XLSXNode(None, tree=self) self.create_tree_from_schema(self.root_node) - for arg in self.template_args_used: - if not self.template_args_used[arg]: - raise Exception(f"Unused template argument: \"{arg}\".") + #for arg in self.template_args_used: + # if not self.template_args_used[arg]: + # raise Exception(f"Unused template argument: \"{arg}\".") def template(self, repspec, output_path, **kwargs): ''' From e3bbefd58966252b70d229c32688a70e4d466955 Mon Sep 17 00:00:00 2001 From: Neal Kruis Date: Tue, 20 Apr 2021 15:12:20 -0600 Subject: [PATCH 065/154] Fix CI yaml indent. --- .github/workflows/validate-and-build-with-poetry.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/validate-and-build-with-poetry.yml b/.github/workflows/validate-and-build-with-poetry.yml index 6b5d7a6..ce27611 100644 --- a/.github/workflows/validate-and-build-with-poetry.yml +++ b/.github/workflows/validate-and-build-with-poetry.yml @@ -36,7 +36,7 @@ jobs: - name: Install dependencies if cache does not exist run: poetry install if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' - - name: Validate, generate, and test - run: | - source $VENV - poetry run doit + - name: Validate, generate, and test + run: | + source $VENV + poetry run doit From c0ce73421ed7dd8ab84c20c849d4785e4954f974 Mon Sep 17 00:00:00 2001 From: Neal Kruis Date: Tue, 20 Apr 2021 15:23:37 -0600 Subject: [PATCH 066/154] Refresh CI cache. --- .github/workflows/validate-and-build-with-poetry.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/validate-and-build-with-poetry.yml b/.github/workflows/validate-and-build-with-poetry.yml index ce27611..90bd173 100644 --- a/.github/workflows/validate-and-build-with-poetry.yml +++ b/.github/workflows/validate-and-build-with-poetry.yml @@ -32,7 +32,7 @@ jobs: uses: actions/cache@v2 with: path: .venv - key: venv-poe-v2-${{ matrix.os }}-py${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} + key: poetry-cache-v3-${{ matrix.os }}-py${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} - name: Install dependencies if cache does not exist run: poetry install if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' From ca2f1da2bf524fbfa0b0496cebab824a40c5dea8 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Wed, 28 Apr 2021 13:14:36 -0600 Subject: [PATCH 067/154] Modify cpp library code to use new flattened RS schema architecture. --- libtk205/include/error_handling_tk205.h | 7 ++ libtk205/include/libtk205.h | 13 +++ libtk205/src/libtk205.cpp | 107 ++++++++++++++++++++--- libtk205/test/fixtures_libtk205.hpp | 111 +++++++++++++++--------- libtk205/test/main_libtk205.cpp | 109 ++++++++++++----------- schema-205 | 2 +- 6 files changed, 238 insertions(+), 111 deletions(-) diff --git a/libtk205/include/error_handling_tk205.h b/libtk205/include/error_handling_tk205.h index c039600..d3615d3 100644 --- a/libtk205/include/error_handling_tk205.h +++ b/libtk205/include/error_handling_tk205.h @@ -3,6 +3,7 @@ #include #include +#include namespace ASHRAE205_NS { enum class msg_severity : unsigned int { @@ -16,6 +17,12 @@ namespace ASHRAE205_NS { void Set_error_handler(msg_handler handler); void Show_message(msg_severity severity, const std::string& message); + + inline void A205_json_catch(nlohmann::json::out_of_range & ex) + { + Show_message(msg_severity::WARN, ex.what()); + } + } diff --git a/libtk205/include/libtk205.h b/libtk205/include/libtk205.h index d976042..5f8150d 100644 --- a/libtk205/include/libtk205.h +++ b/libtk205/include/libtk205.h @@ -10,6 +10,8 @@ #include "RS0004.h" #include "RS0005.h" #include "RS0006.h" +#include "RS0007.h" +#include "nlohmann/json.hpp" namespace libtk205_NS { @@ -19,6 +21,7 @@ namespace libtk205_NS { A205_SDK(); static bool Validate_A205(const char* schema, const char* input_file); +#if 0 ASHRAE205_NS::ASHRAE205 Load_A205(const char* input_file); ASHRAE205_NS::RS0001_NS::RS0001* Get_RS0001(const ASHRAE205_NS::ASHRAE205& a205); ASHRAE205_NS::RS0002_NS::RS0002* Get_RS0002(const ASHRAE205_NS::ASHRAE205& a205); @@ -26,6 +29,16 @@ namespace libtk205_NS { ASHRAE205_NS::RS0004_NS::RS0004* Get_RS0004(const ASHRAE205_NS::ASHRAE205& a205); ASHRAE205_NS::RS0005_NS::RS0005* Get_RS0005(const ASHRAE205_NS::ASHRAE205& a205); ASHRAE205_NS::RS0006_NS::RS0006* Get_RS0006(const ASHRAE205_NS::ASHRAE205& a205); +#endif + nlohmann::json Load_json(const char* input_file); + + ASHRAE205_NS::RS0001_NS::RS0001 Load_RS0001(const char* input_file); + ASHRAE205_NS::RS0002_NS::RS0002 Load_RS0002(const char* input_file); + ASHRAE205_NS::RS0003_NS::RS0003 Load_RS0003(const char* input_file); + ASHRAE205_NS::RS0004_NS::RS0004 Load_RS0004(const char* input_file); + ASHRAE205_NS::RS0005_NS::RS0005 Load_RS0005(const char* input_file); + ASHRAE205_NS::RS0006_NS::RS0006 Load_RS0006(const char* input_file); + ASHRAE205_NS::RS0007_NS::RS0007 Load_RS0007(const char* input_file); private: void Read_binary_file(const char* filename, std::vector &bytes); diff --git a/libtk205/src/libtk205.cpp b/libtk205/src/libtk205.cpp index faf1d73..c2a2dcf 100644 --- a/libtk205/src/libtk205.cpp +++ b/libtk205/src/libtk205.cpp @@ -1,13 +1,12 @@ #include "libtk205.h" -#include "nlohmann/json.hpp" #include -#include "RS0001_factory.h" -#include "RS0002_factory.h" -#include "RS0003_factory.h" -#include "RS0004_factory.h" -#include "RS0005_factory.h" -#include "RS0006_factory.h" +// #include "RS0001_factory.h" +// #include "RS0002_factory.h" +// #include "RS0003_factory.h" +// #include "RS0004_factory.h" +// #include "RS0005_factory.h" +// #include "RS0006_factory.h" #include @@ -56,14 +55,94 @@ namespace libtk205_NS { A205_SDK::A205_SDK() { - rs_instance_factory::Register_factory("RS0001", std::make_unique()); - rs_instance_factory::Register_factory("RS0002", std::make_unique()); - rs_instance_factory::Register_factory("RS0003", std::make_unique()); - rs_instance_factory::Register_factory("RS0004", std::make_unique()); - rs_instance_factory::Register_factory("RS0005", std::make_unique()); - rs_instance_factory::Register_factory("RS0006", std::make_unique()); + // rs_instance_factory::Register_factory("RS0001", std::make_unique()); + // rs_instance_factory::Register_factory("RS0002", std::make_unique()); + // rs_instance_factory::Register_factory("RS0003", std::make_unique()); + // rs_instance_factory::Register_factory("RS0004", std::make_unique()); + // rs_instance_factory::Register_factory("RS0005", std::make_unique()); + // rs_instance_factory::Register_factory("RS0006", std::make_unique()); } + json A205_SDK::Load_json(const char* input_file) + { + std::string filename(input_file); + std::string::size_type idx = filename.rfind('.'); + json j; + + if(idx != std::string::npos) + { + std::string extension = filename.substr(idx+1); + + if (extension == "cbor") + { + std::vector bytearray; + Read_binary_file(input_file, bytearray); + j = json::from_cbor(bytearray); + } + else if (extension == "json") + { + std::string schema(input_file); + std::ifstream in(schema); + in >> j; + } + } + return j; + } + + RS0001_NS::RS0001 A205_SDK::Load_RS0001(const char* input_file) + { + auto j = Load_json(input_file); + return j.get(); + } + + // RS0002_NS::RS0002 A205_SDK::Load_RS0002(const char* input_file) + // { + // auto j = Load_json(input_file); + // RS0002_NS::RS0002 rs_0002 = j.get(); // can throw + // return rs_0002; + // } + + // RS0003_NS::RS0003 A205_SDK::Load_RS0003(const char* input_file) + // { + // RS0003_NS::RS0003 rs_0003; + // auto j = Load_json(input_file); + // j.at("RS0003").get_to(rs_0003); // can throw + // return rs_0003; + // } + + // RS0004_NS::RS0004 A205_SDK::Load_RS0004(const char* input_file) + // { + // RS0004_NS::RS0004 rs_0004; + // auto j = Load_json(input_file); + // j.get_to(rs_0004); // can throw + // return rs_0004; + // } + + // RS0005_NS::RS0005 A205_SDK::Load_RS0005(const char* input_file) + // { + // RS0005_NS::RS0005 rs_0005; + // auto j = Load_json(input_file); + // j.get_to(rs_00015; // can throw + // return rs_0005; + // } + + // RS0006_NS::RS0006 A205_SDK::Load_RS0006(const char* input_file) + // { + // RS0006_NS::RS0006 rs_0006; + // auto j = Load_json(input_file); + // j.get_to(rs_0006); // can throw + // return rs_0006; + // } + + // RS0007_NS::RS0007 A205_SDK::Load_RS0007(const char* input_file) + // { + // RS0007_NS::RS0007 rs_0007; + // auto j = Load_json(input_file); + // j.get_to(rs_0007); // can throw + // return rs_0007; + // } + +#if 0 ASHRAE205 A205_SDK::Load_A205(const char* input_file) { std::string filename(input_file); @@ -122,7 +201,7 @@ namespace libtk205_NS { { return dynamic_cast(a205.rs_instance.get()); } - +#endif void A205_SDK::Read_binary_file(const char* filename, std::vector &bytes) { std::ifstream is (filename, std::ifstream::binary); diff --git a/libtk205/test/fixtures_libtk205.hpp b/libtk205/test/fixtures_libtk205.hpp index f57643e..cd3ead3 100644 --- a/libtk205/test/fixtures_libtk205.hpp +++ b/libtk205/test/fixtures_libtk205.hpp @@ -9,56 +9,85 @@ using namespace libtk205_NS; -class RS_fixture : public testing::Test { -protected: - RS_fixture(const char * filename) : _sdk() - { - _a205 = _sdk.Load_A205(filename); - } - A205_SDK _sdk; - ASHRAE205_NS::ASHRAE205 _a205; -}; +// class RS_fixture : public testing::Test { +// protected: +// RS_fixture(const char * filename) : _sdk() +// { +// _a205 = _sdk.Load_A205(filename); +// } +// A205_SDK _sdk; +// ASHRAE205_NS::ASHRAE205 _a205; +// }; -class RS0001_fixture : public RS_fixture { +class RS_fixture : public testing::Test +{ protected: - RS0001_fixture() : RS_fixture(TEST205_INPUT_EXAMPLES_DIR"/schema-205/examples/RS0001/Chiller-Constant-Efficiency.RS0001.a205.json") - { - } + RS_fixture() : _sdk() {} + A205_SDK _sdk; }; -class RS0002_fixture : public RS_fixture { +class RS0001_fixture : public RS_fixture +{ protected: - RS0002_fixture() : RS_fixture(TEST205_INPUT_EXAMPLES_DIR"/schema-205/examples/RS0002/Unitary-Constant-Efficiency.RS0002.a205.json") - { - } + RS0001_fixture() : RS_fixture() + { + _rs = _sdk.Load_RS0001(TEST205_INPUT_EXAMPLES_DIR "/schema-205/examples/RS0001/Chiller-Constant-Efficiency.RS0001.a205.json"); + } + ASHRAE205_NS::RS0001_NS::RS0001 _rs; }; -class RS0003_fixture : public RS_fixture { -protected: - RS0003_fixture() : RS_fixture(TEST205_INPUT_EXAMPLES_DIR"/schema-205/examples/RS0003/Fan-Continuous.RS0003.a205.json") - { - } -}; +// class RS0002_fixture : public RS_fixture +// { +// protected: +// RS0002_fixture() : RS_fixture(), _rs(TEST205_INPUT_EXAMPLES_DIR "/schema-205/examples/RS0002/Unitary-Constant-Efficiency.RS0002.a205.json") +// { +// } +// ASHRAE205_NS::RS0002_NS::RS0002 _rs; +// }; -class RS0004_fixture : public RS_fixture { -protected: - RS0004_fixture() : RS_fixture(TEST205_INPUT_EXAMPLES_DIR"/schema-205/examples/RS0004/DX-Constant-Efficiency.RS0004.a205.json") - { - } -}; +// class RS0003_fixture : public RS_fixture +// { +// protected: +// RS0003_fixture() : RS_fixture(), _rs(TEST205_INPUT_EXAMPLES_DIR "/schema-205/examples/RS0003/Fan-Continuous.RS0003.a205.json") +// { +// } +// ASHRAE205_NS::RS0003_NS::RS0003 _rs; +// }; -class RS0005_fixture : public RS_fixture { -protected: - RS0005_fixture() : RS_fixture(TEST205_INPUT_EXAMPLES_DIR"/schema-205/examples/RS0005/Motor-Constant-Efficiency.RS0005.a205.json") - { - } -}; +// class RS0004_fixture : public RS_fixture +// { +// protected: +// RS0004_fixture() : RS_fixture(), _rs(TEST205_INPUT_EXAMPLES_DIR "/schema-205/examples/RS0004/DX-Constant-Efficiency.RS0004.a205.json") +// { +// } +// ASHRAE205_NS::RS0004_NS::RS0004 _rs; +// }; -class RS0006_fixture : public RS_fixture { -protected: - RS0006_fixture() : RS_fixture(TEST205_INPUT_EXAMPLES_DIR"/schema-205/examples/RS0006/Drive-Constant-Efficiency.RS0006.a205.json") - { - } -}; +// class RS0005_fixture : public RS_fixture +// { +// protected: +// RS0005_fixture() : RS_fixture(), _rs(TEST205_INPUT_EXAMPLES_DIR "/schema-205/examples/RS0005/Motor-Constant-Efficiency.RS0005.a205.json") +// { +// } +// ASHRAE205_NS::RS0005_NS::RS0005 _rs; +// }; + +// class RS0006_fixture : public RS_fixture +// { +// protected: +// RS0006_fixture() : RS_fixture(), _rs(TEST205_INPUT_EXAMPLES_DIR "/schema-205/examples/RS0006/Drive-Constant-Efficiency.RS0006.a205.json") +// { +// } +// ASHRAE205_NS::RS0006_NS::RS0006 _rs; +// }; + +// class RS0007_fixture : public RS_fixture +// { +// protected: +// RS0007_fixture() : RS_fixture(), _rs(TEST205_INPUT_EXAMPLES_DIR "/schema-205/examples/RS0007/Belt-Drive-Constant-Efficiency.RS0007.a205.json") +// { +// } +// ASHRAE205_NS::RS0007_NS::RS0007 _rs; +// }; #endif // FIXTURE_LIBTK205_HPP_ diff --git a/libtk205/test/main_libtk205.cpp b/libtk205/test/main_libtk205.cpp index 277277d..b07627d 100644 --- a/libtk205/test/main_libtk205.cpp +++ b/libtk205/test/main_libtk205.cpp @@ -10,13 +10,13 @@ using namespace libtk205_NS; -TEST_F(RS0001_fixture, Create_RS01) -{ - auto rs = _sdk.Get_RS0001(_a205); - EXPECT_TRUE(rs != nullptr); -} +// TEST_F(RS0001_fixture, Create_RS01) +// { +// auto rs = _sdk.Get_RS0001(_a205); +// EXPECT_TRUE(rs != nullptr); +// } -TEST(A205, Validate_RS01) +TEST(RS_fixture, Validate_RS01) { EXPECT_TRUE(A205_SDK::Validate_A205(TEST205_INPUT_EXAMPLES_DIR"/schema-205/build/schema/RS0001.schema.json", TEST205_INPUT_EXAMPLES_DIR"/schema-205/examples/RS0001/Chiller-Constant-Efficiency.RS0001.a205.json")); @@ -24,60 +24,59 @@ TEST(A205, Validate_RS01) TEST_F(RS0001_fixture, Calculate_performance_cooling) { - auto rs = _sdk.Get_RS0001(_a205); std::vector target {0.0755, 280.0, 0.0957, 295.0, 0.5}; - auto result = rs->performance.performance_map_cooling.Calculate_performance(target); + auto result = _rs.performance.performance_map_cooling.Calculate_performance(target); EXPECT_EQ(result.size(), 9u); //EXPECT_THAT(result, testing::ElementsAre(testing::DoubleEq(3.189), testing::DoubleEq(6.378), ...)); } -TEST_F(RS0005_fixture, Calculate_embedded_RS_performance) -{ - auto rs05 = _sdk.Get_RS0005(_a205); - EXPECT_TRUE(rs05 != nullptr); - - if (rs05) - { - auto rs06 = _sdk.Get_RS0006(rs05->performance.drive_representation); - EXPECT_TRUE(rs06 != nullptr); - if (rs06) - { - std::vector target {5550.0, 10.0}; - auto result = rs06->performance.performance_map.Calculate_performance(target); - EXPECT_THAT(result, testing::ElementsAre(testing::DoubleEq(0.985))); - } - } -} - -TEST_F(RS0002_fixture, Create_RS02) -{ - auto rs = _sdk.Get_RS0002(_a205); - EXPECT_TRUE(rs != nullptr); -} - -TEST_F(RS0003_fixture, Create_RS03) -{ - auto rs = _sdk.Get_RS0003(_a205); - EXPECT_TRUE(rs != nullptr); -} - -TEST_F(RS0004_fixture, Create_RS04) -{ - auto rs = _sdk.Get_RS0004(_a205); - EXPECT_TRUE(rs != nullptr); -} - -TEST_F(RS0005_fixture, Create_RS05) -{ - auto rs = _sdk.Get_RS0005(_a205); - EXPECT_TRUE(rs != nullptr); -} - -TEST_F(RS0006_fixture, Create_RS06) -{ - auto rs = _sdk.Get_RS0006(_a205); - EXPECT_TRUE(rs != nullptr); -} +// TEST_F(RS0005_fixture, Calculate_embedded_RS_performance) +// { +// auto rs05 = _sdk.Get_RS0005(_a205); +// EXPECT_TRUE(rs05 != nullptr); + +// if (rs05) +// { +// auto rs06 = _sdk.Get_RS0006(rs05->performance.drive_representation); +// EXPECT_TRUE(rs06 != nullptr); +// if (rs06) +// { +// std::vector target {5550.0, 10.0}; +// auto result = rs06->performance.performance_map.Calculate_performance(target); +// EXPECT_THAT(result, testing::ElementsAre(testing::DoubleEq(0.985))); +// } +// } +// } + +// TEST_F(RS0002_fixture, Create_RS02) +// { +// auto rs = _sdk.Get_RS0002(_a205); +// EXPECT_TRUE(rs != nullptr); +// } + +// TEST_F(RS0003_fixture, Create_RS03) +// { +// auto rs = _sdk.Get_RS0003(_a205); +// EXPECT_TRUE(rs != nullptr); +// } + +// TEST_F(RS0004_fixture, Create_RS04) +// { +// auto rs = _sdk.Get_RS0004(_a205); +// EXPECT_TRUE(rs != nullptr); +// } + +// TEST_F(RS0005_fixture, Create_RS05) +// { +// auto rs = _sdk.Get_RS0005(_a205); +// EXPECT_TRUE(rs != nullptr); +// } + +// TEST_F(RS0006_fixture, Create_RS06) +// { +// auto rs = _sdk.Get_RS0006(_a205); +// EXPECT_TRUE(rs != nullptr); +// } void Display_message(ASHRAE205_NS::msg_severity severity, const std::string &message, void *) { diff --git a/schema-205 b/schema-205 index fdc28bb..cfe18a3 160000 --- a/schema-205 +++ b/schema-205 @@ -1 +1 @@ -Subproject commit fdc28bb4f8dcc98cff3d41acf35f0f786e0ce9fa +Subproject commit cfe18a35b90d852391f7bc1b83f89e41e372e5f9 From e710c0b45b19c019283291c5e8d0e8845b1b909e Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Mon, 3 May 2021 16:57:34 -0600 Subject: [PATCH 068/154] Modify library code to reflect restructured schema (RS has-a(n) ASHRAE205 instead of RS is-a(n) ASHRAE205). --- libtk205/include/libtk205.h | 14 +-- libtk205/src/libtk205.cpp | 180 +++++++--------------------- libtk205/test/fixtures_libtk205.hpp | 112 +++++++++-------- libtk205/test/main_libtk205.cpp | 67 ++--------- 4 files changed, 114 insertions(+), 259 deletions(-) diff --git a/libtk205/include/libtk205.h b/libtk205/include/libtk205.h index 5f8150d..474d6f7 100644 --- a/libtk205/include/libtk205.h +++ b/libtk205/include/libtk205.h @@ -18,19 +18,8 @@ namespace libtk205_NS { class A205_SDK { public: - A205_SDK(); static bool Validate_A205(const char* schema, const char* input_file); -#if 0 - ASHRAE205_NS::ASHRAE205 Load_A205(const char* input_file); - ASHRAE205_NS::RS0001_NS::RS0001* Get_RS0001(const ASHRAE205_NS::ASHRAE205& a205); - ASHRAE205_NS::RS0002_NS::RS0002* Get_RS0002(const ASHRAE205_NS::ASHRAE205& a205); - ASHRAE205_NS::RS0003_NS::RS0003* Get_RS0003(const ASHRAE205_NS::ASHRAE205& a205); - ASHRAE205_NS::RS0004_NS::RS0004* Get_RS0004(const ASHRAE205_NS::ASHRAE205& a205); - ASHRAE205_NS::RS0005_NS::RS0005* Get_RS0005(const ASHRAE205_NS::ASHRAE205& a205); - ASHRAE205_NS::RS0006_NS::RS0006* Get_RS0006(const ASHRAE205_NS::ASHRAE205& a205); -#endif - nlohmann::json Load_json(const char* input_file); ASHRAE205_NS::RS0001_NS::RS0001 Load_RS0001(const char* input_file); ASHRAE205_NS::RS0002_NS::RS0002 Load_RS0002(const char* input_file); @@ -41,7 +30,8 @@ namespace libtk205_NS { ASHRAE205_NS::RS0007_NS::RS0007 Load_RS0007(const char* input_file); private: - void Read_binary_file(const char* filename, std::vector &bytes); + void Read_binary_file(const char* filename, std::vector &bytes); + nlohmann::json Load_json(const char* input_file); }; } diff --git a/libtk205/src/libtk205.cpp b/libtk205/src/libtk205.cpp index c2a2dcf..a40a0e0 100644 --- a/libtk205/src/libtk205.cpp +++ b/libtk205/src/libtk205.cpp @@ -1,13 +1,6 @@ #include "libtk205.h" #include -// #include "RS0001_factory.h" -// #include "RS0002_factory.h" -// #include "RS0003_factory.h" -// #include "RS0004_factory.h" -// #include "RS0005_factory.h" -// #include "RS0006_factory.h" - #include #include @@ -53,156 +46,49 @@ namespace libtk205_NS { return true; } - A205_SDK::A205_SDK() - { - // rs_instance_factory::Register_factory("RS0001", std::make_unique()); - // rs_instance_factory::Register_factory("RS0002", std::make_unique()); - // rs_instance_factory::Register_factory("RS0003", std::make_unique()); - // rs_instance_factory::Register_factory("RS0004", std::make_unique()); - // rs_instance_factory::Register_factory("RS0005", std::make_unique()); - // rs_instance_factory::Register_factory("RS0006", std::make_unique()); - } - - json A205_SDK::Load_json(const char* input_file) - { - std::string filename(input_file); - std::string::size_type idx = filename.rfind('.'); - json j; - - if(idx != std::string::npos) - { - std::string extension = filename.substr(idx+1); - - if (extension == "cbor") - { - std::vector bytearray; - Read_binary_file(input_file, bytearray); - j = json::from_cbor(bytearray); - } - else if (extension == "json") - { - std::string schema(input_file); - std::ifstream in(schema); - in >> j; - } - } - return j; - } - RS0001_NS::RS0001 A205_SDK::Load_RS0001(const char* input_file) { auto j = Load_json(input_file); return j.get(); } - // RS0002_NS::RS0002 A205_SDK::Load_RS0002(const char* input_file) - // { - // auto j = Load_json(input_file); - // RS0002_NS::RS0002 rs_0002 = j.get(); // can throw - // return rs_0002; - // } - - // RS0003_NS::RS0003 A205_SDK::Load_RS0003(const char* input_file) - // { - // RS0003_NS::RS0003 rs_0003; - // auto j = Load_json(input_file); - // j.at("RS0003").get_to(rs_0003); // can throw - // return rs_0003; - // } - - // RS0004_NS::RS0004 A205_SDK::Load_RS0004(const char* input_file) - // { - // RS0004_NS::RS0004 rs_0004; - // auto j = Load_json(input_file); - // j.get_to(rs_0004); // can throw - // return rs_0004; - // } - - // RS0005_NS::RS0005 A205_SDK::Load_RS0005(const char* input_file) - // { - // RS0005_NS::RS0005 rs_0005; - // auto j = Load_json(input_file); - // j.get_to(rs_00015; // can throw - // return rs_0005; - // } - - // RS0006_NS::RS0006 A205_SDK::Load_RS0006(const char* input_file) - // { - // RS0006_NS::RS0006 rs_0006; - // auto j = Load_json(input_file); - // j.get_to(rs_0006); // can throw - // return rs_0006; - // } - - // RS0007_NS::RS0007 A205_SDK::Load_RS0007(const char* input_file) - // { - // RS0007_NS::RS0007 rs_0007; - // auto j = Load_json(input_file); - // j.get_to(rs_0007); // can throw - // return rs_0007; - // } - -#if 0 - ASHRAE205 A205_SDK::Load_A205(const char* input_file) + RS0002_NS::RS0002 A205_SDK::Load_RS0002(const char* input_file) { - std::string filename(input_file); - std::string::size_type idx = filename.rfind('.'); - ASHRAE205 a205; - - if(idx != std::string::npos) - { - std::string extension = filename.substr(idx+1); - json j; - - if (extension == "cbor") - { - std::vector bytearray; - Read_binary_file(input_file, bytearray); - j = json::from_cbor(bytearray); - } - else if (extension == "json") - { - std::string schema(input_file); - std::ifstream in(schema); - in >> j; - } - - a205.Initialize(j); - } - return a205; + auto j = Load_json(input_file); + return j.get(); } - RS0001_NS::RS0001* A205_SDK::Get_RS0001(const ASHRAE205& a205) + RS0003_NS::RS0003 A205_SDK::Load_RS0003(const char* input_file) { - return dynamic_cast(a205.rs_instance.get()); + auto j = Load_json(input_file); + return j.get(); } - RS0002_NS::RS0002* A205_SDK::Get_RS0002(const ASHRAE205& a205) + RS0004_NS::RS0004 A205_SDK::Load_RS0004(const char* input_file) { - return dynamic_cast(a205.rs_instance.get()); + auto j = Load_json(input_file); + return j.get(); } - RS0003_NS::RS0003* A205_SDK::Get_RS0003(const ASHRAE205& a205) + RS0005_NS::RS0005 A205_SDK::Load_RS0005(const char* input_file) { - return dynamic_cast(a205.rs_instance.get()); + auto j = Load_json(input_file); + return j.get(); } - RS0004_NS::RS0004* A205_SDK::Get_RS0004(const ASHRAE205& a205) + RS0006_NS::RS0006 A205_SDK::Load_RS0006(const char* input_file) { - return dynamic_cast(a205.rs_instance.get()); + auto j = Load_json(input_file); + return j.get(); } - RS0005_NS::RS0005* A205_SDK::Get_RS0005(const ASHRAE205& a205) + RS0007_NS::RS0007 A205_SDK::Load_RS0007(const char* input_file) { - return dynamic_cast(a205.rs_instance.get()); + auto j = Load_json(input_file); + return j.get(); } - RS0006_NS::RS0006* A205_SDK::Get_RS0006(const ASHRAE205& a205) - { - return dynamic_cast(a205.rs_instance.get()); - } -#endif - void A205_SDK::Read_binary_file(const char* filename, std::vector &bytes) + void A205_SDK::Read_binary_file(const char* filename, std::vector &bytes) { std::ifstream is (filename, std::ifstream::binary); if (is) @@ -214,9 +100,35 @@ namespace libtk205_NS { bytes.resize(length); // read data as a block: - is.read(reinterpret_cast(bytes.data()), length); + is.read(bytes.data(), length); is.close(); } } + + json A205_SDK::Load_json(const char* input_file) + { + std::string filename(input_file); + std::string::size_type idx = filename.rfind('.'); + json j; + + if(idx != std::string::npos) + { + std::string extension = filename.substr(idx+1); + + if (extension == "cbor") + { + std::vector bytearray; + Read_binary_file(input_file, bytearray); + j = json::from_cbor(bytearray); + } + else if (extension == "json") + { + std::string schema(input_file); + std::ifstream in(schema); + in >> j; + } + } + return j; + } } \ No newline at end of file diff --git a/libtk205/test/fixtures_libtk205.hpp b/libtk205/test/fixtures_libtk205.hpp index cd3ead3..40a2031 100644 --- a/libtk205/test/fixtures_libtk205.hpp +++ b/libtk205/test/fixtures_libtk205.hpp @@ -9,16 +9,6 @@ using namespace libtk205_NS; -// class RS_fixture : public testing::Test { -// protected: -// RS_fixture(const char * filename) : _sdk() -// { -// _a205 = _sdk.Load_A205(filename); -// } -// A205_SDK _sdk; -// ASHRAE205_NS::ASHRAE205 _a205; -// }; - class RS_fixture : public testing::Test { protected: @@ -36,58 +26,64 @@ class RS0001_fixture : public RS_fixture ASHRAE205_NS::RS0001_NS::RS0001 _rs; }; -// class RS0002_fixture : public RS_fixture -// { -// protected: -// RS0002_fixture() : RS_fixture(), _rs(TEST205_INPUT_EXAMPLES_DIR "/schema-205/examples/RS0002/Unitary-Constant-Efficiency.RS0002.a205.json") -// { -// } -// ASHRAE205_NS::RS0002_NS::RS0002 _rs; -// }; +class RS0002_fixture : public RS_fixture +{ +protected: + RS0002_fixture() : RS_fixture() + { + _rs = _sdk.Load_RS0002(TEST205_INPUT_EXAMPLES_DIR "/schema-205/examples/RS0002/Unitary-Constant-Efficiency.RS0002.a205.json"); + } + ASHRAE205_NS::RS0002_NS::RS0002 _rs; +}; -// class RS0003_fixture : public RS_fixture -// { -// protected: -// RS0003_fixture() : RS_fixture(), _rs(TEST205_INPUT_EXAMPLES_DIR "/schema-205/examples/RS0003/Fan-Continuous.RS0003.a205.json") -// { -// } -// ASHRAE205_NS::RS0003_NS::RS0003 _rs; -// }; +class RS0003_fixture : public RS_fixture +{ +protected: + RS0003_fixture() : RS_fixture() + { + _rs= _sdk.Load_RS0003(TEST205_INPUT_EXAMPLES_DIR "/schema-205/examples/RS0003/Fan-Continuous.RS0003.a205.json"); + } + ASHRAE205_NS::RS0003_NS::RS0003 _rs; +}; -// class RS0004_fixture : public RS_fixture -// { -// protected: -// RS0004_fixture() : RS_fixture(), _rs(TEST205_INPUT_EXAMPLES_DIR "/schema-205/examples/RS0004/DX-Constant-Efficiency.RS0004.a205.json") -// { -// } -// ASHRAE205_NS::RS0004_NS::RS0004 _rs; -// }; +class RS0004_fixture : public RS_fixture +{ +protected: + RS0004_fixture() : RS_fixture() + { + _rs= _sdk.Load_RS0004(TEST205_INPUT_EXAMPLES_DIR "/schema-205/examples/RS0004/DX-Constant-Efficiency.RS0004.a205.json"); + } + ASHRAE205_NS::RS0004_NS::RS0004 _rs; +}; -// class RS0005_fixture : public RS_fixture -// { -// protected: -// RS0005_fixture() : RS_fixture(), _rs(TEST205_INPUT_EXAMPLES_DIR "/schema-205/examples/RS0005/Motor-Constant-Efficiency.RS0005.a205.json") -// { -// } -// ASHRAE205_NS::RS0005_NS::RS0005 _rs; -// }; +class RS0005_fixture : public RS_fixture +{ +protected: + RS0005_fixture() : RS_fixture() + { + _rs= _sdk.Load_RS0005(TEST205_INPUT_EXAMPLES_DIR "/schema-205/examples/RS0005/Motor-Constant-Efficiency.RS0005.a205.json"); + } + ASHRAE205_NS::RS0005_NS::RS0005 _rs; +}; -// class RS0006_fixture : public RS_fixture -// { -// protected: -// RS0006_fixture() : RS_fixture(), _rs(TEST205_INPUT_EXAMPLES_DIR "/schema-205/examples/RS0006/Drive-Constant-Efficiency.RS0006.a205.json") -// { -// } -// ASHRAE205_NS::RS0006_NS::RS0006 _rs; -// }; +class RS0006_fixture : public RS_fixture +{ +protected: + RS0006_fixture() : RS_fixture() + { + _rs = _sdk.Load_RS0006(TEST205_INPUT_EXAMPLES_DIR "/schema-205/examples/RS0006/Drive-Constant-Efficiency.RS0006.a205.json"); + } + ASHRAE205_NS::RS0006_NS::RS0006 _rs; +}; -// class RS0007_fixture : public RS_fixture -// { -// protected: -// RS0007_fixture() : RS_fixture(), _rs(TEST205_INPUT_EXAMPLES_DIR "/schema-205/examples/RS0007/Belt-Drive-Constant-Efficiency.RS0007.a205.json") -// { -// } -// ASHRAE205_NS::RS0007_NS::RS0007 _rs; -// }; +class RS0007_fixture : public RS_fixture +{ +protected: + RS0007_fixture() : RS_fixture() + { + _rs = _sdk.Load_RS0007(TEST205_INPUT_EXAMPLES_DIR "/schema-205/examples/RS0007/Belt-Drive-Constant-Efficiency.RS0007.a205.json"); + } + ASHRAE205_NS::RS0007_NS::RS0007 _rs; +}; #endif // FIXTURE_LIBTK205_HPP_ diff --git a/libtk205/test/main_libtk205.cpp b/libtk205/test/main_libtk205.cpp index b07627d..43400d1 100644 --- a/libtk205/test/main_libtk205.cpp +++ b/libtk205/test/main_libtk205.cpp @@ -10,73 +10,30 @@ using namespace libtk205_NS; -// TEST_F(RS0001_fixture, Create_RS01) -// { -// auto rs = _sdk.Get_RS0001(_a205); -// EXPECT_TRUE(rs != nullptr); -// } - -TEST(RS_fixture, Validate_RS01) +TEST(RS_fixture, Validate_RSes) { EXPECT_TRUE(A205_SDK::Validate_A205(TEST205_INPUT_EXAMPLES_DIR"/schema-205/build/schema/RS0001.schema.json", TEST205_INPUT_EXAMPLES_DIR"/schema-205/examples/RS0001/Chiller-Constant-Efficiency.RS0001.a205.json")); + EXPECT_TRUE(A205_SDK::Validate_A205(TEST205_INPUT_EXAMPLES_DIR"/schema-205/build/schema/RS0002.schema.json", + TEST205_INPUT_EXAMPLES_DIR"/schema-205/examples/RS0002/Unitary-Constant-Efficiency.RS0002.a205.json")); + EXPECT_TRUE(A205_SDK::Validate_A205(TEST205_INPUT_EXAMPLES_DIR"/schema-205/build/schema/RS0003.schema.json", + TEST205_INPUT_EXAMPLES_DIR"/schema-205/examples/RS0003/Fan-Continuous.RS0003.a205.json")); } TEST_F(RS0001_fixture, Calculate_performance_cooling) { - std::vector target {0.0755, 280.0, 0.0957, 295.0, 0.5}; + std::vector target {0.0755, 280.0, 0.0957, 295.0, 0.5}; //NOLINT : Of course you need magic numbers; it's a numerical test auto result = _rs.performance.performance_map_cooling.Calculate_performance(target); EXPECT_EQ(result.size(), 9u); //EXPECT_THAT(result, testing::ElementsAre(testing::DoubleEq(3.189), testing::DoubleEq(6.378), ...)); } -// TEST_F(RS0005_fixture, Calculate_embedded_RS_performance) -// { -// auto rs05 = _sdk.Get_RS0005(_a205); -// EXPECT_TRUE(rs05 != nullptr); - -// if (rs05) -// { -// auto rs06 = _sdk.Get_RS0006(rs05->performance.drive_representation); -// EXPECT_TRUE(rs06 != nullptr); -// if (rs06) -// { -// std::vector target {5550.0, 10.0}; -// auto result = rs06->performance.performance_map.Calculate_performance(target); -// EXPECT_THAT(result, testing::ElementsAre(testing::DoubleEq(0.985))); -// } -// } -// } - -// TEST_F(RS0002_fixture, Create_RS02) -// { -// auto rs = _sdk.Get_RS0002(_a205); -// EXPECT_TRUE(rs != nullptr); -// } - -// TEST_F(RS0003_fixture, Create_RS03) -// { -// auto rs = _sdk.Get_RS0003(_a205); -// EXPECT_TRUE(rs != nullptr); -// } - -// TEST_F(RS0004_fixture, Create_RS04) -// { -// auto rs = _sdk.Get_RS0004(_a205); -// EXPECT_TRUE(rs != nullptr); -// } - -// TEST_F(RS0005_fixture, Create_RS05) -// { -// auto rs = _sdk.Get_RS0005(_a205); -// EXPECT_TRUE(rs != nullptr); -// } - -// TEST_F(RS0006_fixture, Create_RS06) -// { -// auto rs = _sdk.Get_RS0006(_a205); -// EXPECT_TRUE(rs != nullptr); -// } +TEST_F(RS0005_fixture, Calculate_embedded_RS_performance) +{ + std::vector target {5550.0, 10.0}; //NOLINT + auto result = _rs.performance.drive_representation.performance.performance_map.Calculate_performance(target); + EXPECT_THAT(result, testing::ElementsAre(testing::DoubleEq(0.985))); +} void Display_message(ASHRAE205_NS::msg_severity severity, const std::string &message, void *) { From 56fb242ba3f032b8aa06dd89e4ffcdbe9fdddf56 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Mon, 3 May 2021 16:58:21 -0600 Subject: [PATCH 069/154] Add clang-tidy static analysis to build. --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 212e5b6..df1d5c3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,11 @@ cmake_minimum_required(VERSION 3.14.0) project(toolkit-205) +set(CMAKE_CXX_CLANG_TIDY + clang-tidy; + -checks=-*,clang-analyzer-*,cppcoreguidelines-* + ) + # Set a default build type if none was specified if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) message(STATUS "Setting build type to 'Release' as none was specified.") From 929a012ba73cfcd948e7ed4323919f4147c7fcc0 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Wed, 12 May 2021 12:35:40 -0600 Subject: [PATCH 070/154] Minor build changes. --- .gitmodules | 3 +++ CMakeLists.txt | 10 ++++++---- libtk205/CMakeLists.txt | 5 +++-- libtk205/src/libtk205.cpp | 25 ++++++++++++++++++++++++- libtk205/vendor/curlpp | 1 + 5 files changed, 37 insertions(+), 7 deletions(-) create mode 160000 libtk205/vendor/curlpp diff --git a/.gitmodules b/.gitmodules index c63de18..82b64e7 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,3 +10,6 @@ [submodule "libtk205/vendor/valijson"] path = libtk205/vendor/valijson url = https://github.com/tristanpenman/valijson.git +[submodule "libtk205/vendor/curlpp"] + path = libtk205/vendor/curlpp + url = https://github.com/jpbarrette/curlpp.git diff --git a/CMakeLists.txt b/CMakeLists.txt index df1d5c3..33e92ca 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,10 +1,12 @@ cmake_minimum_required(VERSION 3.14.0) project(toolkit-205) -set(CMAKE_CXX_CLANG_TIDY - clang-tidy; - -checks=-*,clang-analyzer-*,cppcoreguidelines-* - ) +if (USE_CLANGTIDY_STATIC_ANALYSIS) + set(CMAKE_CXX_CLANG_TIDY + clang-tidy; + -checks=-*,clang-analyzer-*,cppcoreguidelines-* + ) +endif() # Set a default build type if none was specified if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) diff --git a/libtk205/CMakeLists.txt b/libtk205/CMakeLists.txt index f258fd7..c67a2b2 100644 --- a/libtk205/CMakeLists.txt +++ b/libtk205/CMakeLists.txt @@ -16,8 +16,10 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/vendor/valijson/include) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../schema-205/build/include) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../schema-205/schema205/src) +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/vendor/curlpp/include) add_subdirectory(vendor/btwxt) +add_subdirectory(vendor/curlpp) add_custom_target(generate_cpp ALL COMMAND doit headers @@ -25,8 +27,7 @@ add_custom_target(generate_cpp ALL WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../schema-205") set (SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/libtk205.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/src/error_handling_tk205.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/src/rs_instance_factory.cpp") + "${CMAKE_CURRENT_SOURCE_DIR}/src/error_handling_tk205.cpp") message(STATUS "libtk205 sources: ${SOURCES}") diff --git a/libtk205/src/libtk205.cpp b/libtk205/src/libtk205.cpp index a40a0e0..ea53b19 100644 --- a/libtk205/src/libtk205.cpp +++ b/libtk205/src/libtk205.cpp @@ -8,6 +8,8 @@ #include #include #include +#include +#include namespace libtk205_NS { @@ -18,6 +20,24 @@ namespace libtk205_NS { using valijson::Validator; using valijson::adapters::NlohmannJsonAdapter; + const json* fetchDocument(const std::string &uri) + { + std::cout << "Fetching " << uri << "..." << std::endl; + curlpp::Cleanup myCleanup; + std::ostringstream os; + os << curlpp::options::Url(uri); + std::cout << curlpp::options::Url(uri) << std::endl; + json *fetchedRoot = new json; + std::ifstream in(os.str().c_str()); + in >> *fetchedRoot; + return fetchedRoot; + } + + void freeDocument(const json *adapter) + { + delete adapter; + } + bool A205_SDK::Validate_A205(const char* schema_file, const char* input_file) { json schema_doc; @@ -29,15 +49,18 @@ namespace libtk205_NS { Schema schema; SchemaParser parser; NlohmannJsonAdapter schema_adapter(schema_doc); - parser.populateSchema(schema_adapter, schema); + std::cout << "Populating schema.\n"; + parser.populateSchema(schema_adapter, schema, fetchDocument, freeDocument); json input_doc; + std::cout << "Loading input.\n"; if (!valijson::utils::loadDocument(input_file, input_doc)) { throw std::runtime_error("Failed to load input document"); } Validator validator; + std::cout << "Validation.\n"; NlohmannJsonAdapter input_adapter(input_doc); if (!validator.validate(schema, input_adapter, NULL)) { diff --git a/libtk205/vendor/curlpp b/libtk205/vendor/curlpp new file mode 160000 index 0000000..5e25a51 --- /dev/null +++ b/libtk205/vendor/curlpp @@ -0,0 +1 @@ +Subproject commit 5e25a51e8dc75e05b707e08536abee28e0a45738 From 391821de050ca816322b3f6a18122710f203d9e5 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Mon, 17 May 2021 11:19:17 -0600 Subject: [PATCH 071/154] Give up on validation; commit rs-restructure support. --- .gitmodules | 3 +++ libtk205/CMakeLists.txt | 2 -- libtk205/src/libtk205.cpp | 25 +------------------------ libtk205/test/main_libtk205.cpp | 2 ++ libtk205/vendor/json-schema-validator | 1 + schema-205 | 2 +- 6 files changed, 8 insertions(+), 27 deletions(-) create mode 160000 libtk205/vendor/json-schema-validator diff --git a/.gitmodules b/.gitmodules index 82b64e7..f2b7422 100644 --- a/.gitmodules +++ b/.gitmodules @@ -13,3 +13,6 @@ [submodule "libtk205/vendor/curlpp"] path = libtk205/vendor/curlpp url = https://github.com/jpbarrette/curlpp.git +[submodule "libtk205/vendor/json-schema-validator"] + path = libtk205/vendor/json-schema-validator + url = https://github.com/pboettch/json-schema-validator.git diff --git a/libtk205/CMakeLists.txt b/libtk205/CMakeLists.txt index c67a2b2..c42c68e 100644 --- a/libtk205/CMakeLists.txt +++ b/libtk205/CMakeLists.txt @@ -16,10 +16,8 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/vendor/valijson/include) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../schema-205/build/include) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../schema-205/schema205/src) -include_directories(${CMAKE_CURRENT_SOURCE_DIR}/vendor/curlpp/include) add_subdirectory(vendor/btwxt) -add_subdirectory(vendor/curlpp) add_custom_target(generate_cpp ALL COMMAND doit headers diff --git a/libtk205/src/libtk205.cpp b/libtk205/src/libtk205.cpp index ea53b19..a40a0e0 100644 --- a/libtk205/src/libtk205.cpp +++ b/libtk205/src/libtk205.cpp @@ -8,8 +8,6 @@ #include #include #include -#include -#include namespace libtk205_NS { @@ -20,24 +18,6 @@ namespace libtk205_NS { using valijson::Validator; using valijson::adapters::NlohmannJsonAdapter; - const json* fetchDocument(const std::string &uri) - { - std::cout << "Fetching " << uri << "..." << std::endl; - curlpp::Cleanup myCleanup; - std::ostringstream os; - os << curlpp::options::Url(uri); - std::cout << curlpp::options::Url(uri) << std::endl; - json *fetchedRoot = new json; - std::ifstream in(os.str().c_str()); - in >> *fetchedRoot; - return fetchedRoot; - } - - void freeDocument(const json *adapter) - { - delete adapter; - } - bool A205_SDK::Validate_A205(const char* schema_file, const char* input_file) { json schema_doc; @@ -49,18 +29,15 @@ namespace libtk205_NS { Schema schema; SchemaParser parser; NlohmannJsonAdapter schema_adapter(schema_doc); - std::cout << "Populating schema.\n"; - parser.populateSchema(schema_adapter, schema, fetchDocument, freeDocument); + parser.populateSchema(schema_adapter, schema); json input_doc; - std::cout << "Loading input.\n"; if (!valijson::utils::loadDocument(input_file, input_doc)) { throw std::runtime_error("Failed to load input document"); } Validator validator; - std::cout << "Validation.\n"; NlohmannJsonAdapter input_adapter(input_doc); if (!validator.validate(schema, input_adapter, NULL)) { diff --git a/libtk205/test/main_libtk205.cpp b/libtk205/test/main_libtk205.cpp index 43400d1..0cb9121 100644 --- a/libtk205/test/main_libtk205.cpp +++ b/libtk205/test/main_libtk205.cpp @@ -10,6 +10,7 @@ using namespace libtk205_NS; +#if 0 TEST(RS_fixture, Validate_RSes) { EXPECT_TRUE(A205_SDK::Validate_A205(TEST205_INPUT_EXAMPLES_DIR"/schema-205/build/schema/RS0001.schema.json", @@ -19,6 +20,7 @@ TEST(RS_fixture, Validate_RSes) EXPECT_TRUE(A205_SDK::Validate_A205(TEST205_INPUT_EXAMPLES_DIR"/schema-205/build/schema/RS0003.schema.json", TEST205_INPUT_EXAMPLES_DIR"/schema-205/examples/RS0003/Fan-Continuous.RS0003.a205.json")); } +#endif TEST_F(RS0001_fixture, Calculate_performance_cooling) { diff --git a/libtk205/vendor/json-schema-validator b/libtk205/vendor/json-schema-validator new file mode 160000 index 0000000..e1cef0b --- /dev/null +++ b/libtk205/vendor/json-schema-validator @@ -0,0 +1 @@ +Subproject commit e1cef0b58b1a89915577ca163fc491c2e84d4b34 diff --git a/schema-205 b/schema-205 index cfe18a3..67085dc 160000 --- a/schema-205 +++ b/schema-205 @@ -1 +1 @@ -Subproject commit cfe18a35b90d852391f7bc1b83f89e41e372e5f9 +Subproject commit 67085dc262d1dd7816fd52a8d30aea57c77dbd47 From 4ffa7c4908eb2c8f9fac84b9eaf63056bbf8fb01 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Mon, 17 May 2021 13:05:10 -0600 Subject: [PATCH 072/154] Accept all incoming changes. --- poetry.lock | 479 ---------------------------------------------------- 1 file changed, 479 deletions(-) diff --git a/poetry.lock b/poetry.lock index 5586f9e..56452a7 100644 --- a/poetry.lock +++ b/poetry.lock @@ -45,17 +45,6 @@ python-versions = "*" test = ["pytest", "pytest-cov"] [[package]] -<<<<<<< HEAD -name = "chardet" -version = "4.0.0" -description = "Universal encoding detector for Python 2 and 3" -category = "main" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" - -[[package]] -======= ->>>>>>> master name = "click" version = "7.1.2" description = "Composable command line interface toolkit" @@ -80,25 +69,6 @@ optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [[package]] -<<<<<<< HEAD -name = "dataproperty" -version = "0.50.0" -description = "Python library for extract property from data." -category = "main" -optional = false -python-versions = ">=3.5" - -[package.dependencies] -mbstrdecoder = ">=1.0.0,<2" -typepy = {version = ">=1.1.1,<2", extras = ["datetime"]} - -[package.extras] -logging = ["loguru (>=0.4.1,<1)"] -test = ["pytest", "pytest-md-report", "termcolor"] - -[[package]] -======= ->>>>>>> master name = "doit" version = "0.33.1" description = "doit - Automation Tool" @@ -121,30 +91,18 @@ python-versions = "*" [[package]] name = "gitdb" -<<<<<<< HEAD -version = "4.0.5" -======= version = "4.0.7" ->>>>>>> master description = "Git Object Database" category = "dev" optional = false python-versions = ">=3.4" [package.dependencies] -<<<<<<< HEAD -smmap = ">=3.0.1,<4" - -[[package]] -name = "gitpython" -version = "3.1.12" -======= smmap = ">=3.0.1,<5" [[package]] name = "gitpython" version = "3.1.14" ->>>>>>> master description = "Python Git Library" category = "dev" optional = false @@ -155,11 +113,7 @@ gitdb = ">=4.0.1,<5" [[package]] name = "importlib-metadata" -<<<<<<< HEAD -version = "3.4.0" -======= version = "4.0.0" ->>>>>>> master description = "Read metadata from Python packages" category = "main" optional = false @@ -171,11 +125,7 @@ zipp = ">=0.5" [package.extras] docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] -<<<<<<< HEAD -testing = ["pytest (>=3.5,!=3.7.3)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pytest-cov", "pytest-enabler", "packaging", "pep517", "pyfakefs", "flufl.flake8", "pytest-black (>=0.3.7)", "pytest-mypy", "importlib-resources (>=1.3)"] -======= testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "packaging", "pep517", "pyfakefs", "flufl.flake8", "pytest-black (>=0.3.7)", "pytest-mypy", "importlib-resources (>=1.3)"] ->>>>>>> master [[package]] name = "iniconfig" @@ -187,11 +137,7 @@ python-versions = "*" [[package]] name = "isort" -<<<<<<< HEAD -version = "5.7.0" -======= version = "5.8.0" ->>>>>>> master description = "A Python utility / library to sort Python imports." category = "dev" optional = false @@ -203,21 +149,8 @@ requirements_deprecated_finder = ["pipreqs", "pip-api"] colors = ["colorama (>=0.4.3,<0.5.0)"] [[package]] -<<<<<<< HEAD -name = "jdcal" -version = "1.4.1" -description = "Julian dates from proleptic Gregorian and Julian calendars." -category = "main" -optional = false -python-versions = "*" - -[[package]] -name = "jinja2" -version = "2.11.2" -======= name = "jinja2" version = "2.11.3" ->>>>>>> master description = "A very fast and expressive template engine." category = "main" optional = false @@ -249,19 +182,11 @@ format_nongpl = ["idna", "jsonpointer (>1.13)", "webcolors", "rfc3986-validator [[package]] name = "lazy-object-proxy" -<<<<<<< HEAD -version = "1.4.3" -description = "A fast and thorough lazy object proxy." -category = "dev" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -======= version = "1.6.0" description = "A fast and thorough lazy object proxy." category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" ->>>>>>> master [[package]] name = "macfsevents" @@ -273,11 +198,7 @@ python-versions = "*" [[package]] name = "markdown" -<<<<<<< HEAD -version = "3.3.3" -======= version = "3.3.4" ->>>>>>> master description = "Python implementation of Markdown." category = "dev" optional = false @@ -298,23 +219,6 @@ optional = false python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*" [[package]] -<<<<<<< HEAD -name = "mbstrdecoder" -version = "1.0.1" -description = "multi-byte character string decoder" -category = "main" -optional = false -python-versions = ">=3.5" - -[package.dependencies] -chardet = ">=3.0.4,<5" - -[package.extras] -test = ["Faker (>=1.0.2)", "pytest (>=6.0.1)", "pytest-md-report (>=0.1)"] - -[[package]] -======= ->>>>>>> master name = "mccabe" version = "0.6.1" description = "McCabe checker, plugin for flake8" @@ -323,24 +227,8 @@ optional = false python-versions = "*" [[package]] -<<<<<<< HEAD -name = "msgfy" -version = "0.1.0" -description = "msgfy is a Python library for convert Exception instance to a human-readable error message." -category = "main" -optional = false -python-versions = ">=3.5" - -[package.extras] -test = ["pytest"] - -[[package]] -name = "openpyxl" -version = "3.0.6" -======= name = "openpyxl" version = "3.0.7" ->>>>>>> master description = "A Python library to read/write Excel 2010 xlsx/xlsm files" category = "main" optional = false @@ -348,18 +236,10 @@ python-versions = ">=3.6," [package.dependencies] et-xmlfile = "*" -<<<<<<< HEAD -jdcal = "*" - -[[package]] -name = "packaging" -version = "20.8" -======= [[package]] name = "packaging" version = "20.9" ->>>>>>> master description = "Core utilities for Python packages" category = "dev" optional = false @@ -369,20 +249,6 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" pyparsing = ">=2.0.2" [[package]] -<<<<<<< HEAD -name = "pathvalidate" -version = "2.3.2" -description = "pathvalidate is a Python library to sanitize/validate a string such as filenames/file-paths/etc." -category = "main" -optional = false -python-versions = ">=3.5" - -[package.extras] -test = ["allpairspy", "click", "faker", "pytest (>=6.0.1)", "pytest-md-report (>=0.0.12)", "pytest-discord (>=0.0.5)"] - -[[package]] -======= ->>>>>>> master name = "pluggy" version = "0.13.1" description = "plugin and hook calling mechanisms for python" @@ -414,16 +280,6 @@ python-versions = "*" [[package]] name = "pylint" -<<<<<<< HEAD -version = "2.6.0" -description = "python code static checker" -category = "dev" -optional = false -python-versions = ">=3.5.*" - -[package.dependencies] -astroid = ">=2.4.0,<=2.5" -======= version = "2.7.4" description = "python code static checker" category = "dev" @@ -432,18 +288,14 @@ python-versions = "~=3.6" [package.dependencies] astroid = ">=2.5.2,<2.7" ->>>>>>> master colorama = {version = "*", markers = "sys_platform == \"win32\""} isort = ">=4.2.5,<6" mccabe = ">=0.6,<0.7" toml = ">=0.7.1" -<<<<<<< HEAD -======= [package.extras] docs = ["sphinx (==3.5.1)", "python-docs-theme (==2020.12)"] ->>>>>>> master [[package]] name = "pyparsing" version = "2.4.7" @@ -460,48 +312,9 @@ category = "main" optional = false python-versions = ">=3.5" -[[package]] -<<<<<<< HEAD -name = "pytablewriter" -version = "0.58.0" -description = "pytablewriter is a Python library to write a table in various formats: CSV / Elasticsearch / HTML / JavaScript / JSON / LaTeX / LDJSON / LTSV / Markdown / MediaWiki / NumPy / Excel / Pandas / Python / reStructuredText / SQLite / TOML / TSV / YAML." -category = "main" -optional = false -python-versions = ">=3.5" - -[package.dependencies] -DataProperty = ">=0.50.0,<2" -mbstrdecoder = ">=1.0.0,<2" -msgfy = ">=0.1.0,<1" -pathvalidate = ">=2.3.0,<3" -tabledata = ">=1.1.3,<2" -tcolorpy = ">=0.0.5,<1" -typepy = {version = ">=1.1.1,<2", extras = ["datetime"]} - -[package.extras] -all = ["xlwt", "XlsxWriter (>=0.9.6,<2)", "elasticsearch (>=7.0.5,<8)", "pytablereader (>=0.30.0,<2)", "dominate (>=2.1.5,<3)", "loguru (>=0.4.1,<1)", "SimpleSQLite (>=1.1.3,<2)", "pytablewriter-altrow-theme (>=0.0.2,<1)", "toml (>=0.9.3,<1)", "PyYAML (>=3.11,<6)", "simplejson (>=3.8.1,<4)"] -docs = ["sphinx-rtd-theme", "Sphinx (>=2.4)"] -es = ["elasticsearch (>=7.0.5,<8)"] -es5 = ["elasticsearch (>=5.5.3,<6)"] -es6 = ["elasticsearch (>=6.3.1,<7)"] -es7 = ["elasticsearch (>=7.0.5,<8)"] -excel = ["xlwt", "XlsxWriter (>=0.9.6,<2)"] -from = ["pytablereader (>=0.30.0,<2)"] -html = ["dominate (>=2.1.5,<3)"] -logging = ["loguru (>=0.4.1,<1)"] -sqlite = ["SimpleSQLite (>=1.1.3,<2)"] -test = ["XlsxWriter (>=0.9.6,<2)", "SimpleSQLite (>=1.1.3,<2)", "pytablereader (>=0.30.0,<2)", "pytest-md-report (>=0.1)", "pytest-discord (>=0.0.5)", "dominate (>=2.1.5,<3)", "loguru (>=0.4.1,<1)", "toml (>=0.9.3,<1)", "tablib", "elasticsearch (>=7.0.5,<8)", "pytest (>=6.0.1)", "sqliteschema", "xlwt", "pytablereader[sqlite,excel] (>=0.29)", "PyYAML (>=3.11,<6)", "simplejson (>=3.8.1,<4)", "pytablewriter-altrow-theme (>=0.0.2,<1)"] -theme = ["pytablewriter-altrow-theme (>=0.0.2,<1)"] -toml = ["toml (>=0.9.3,<1)"] -yaml = ["PyYAML (>=3.11,<6)"] - [[package]] name = "pytest" -version = "6.2.2" -======= -name = "pytest" version = "6.2.3" ->>>>>>> master description = "pytest: simple powerful testing with Python" category = "dev" optional = false @@ -522,28 +335,6 @@ toml = "*" testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xmlschema"] [[package]] -<<<<<<< HEAD -name = "python-dateutil" -version = "2.8.1" -description = "Extensions to the standard Python datetime module" -category = "main" -optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" - -[package.dependencies] -six = ">=1.5" - -[[package]] -name = "pytz" -version = "2020.5" -description = "World timezone definitions, modern and historical" -category = "main" -optional = false -python-versions = "*" - -[[package]] -======= ->>>>>>> master name = "pyyaml" version = "5.4.1" description = "YAML parser and emitter for Python" @@ -561,14 +352,8 @@ python-versions = "^3.6" develop = true [package.dependencies] -<<<<<<< HEAD -jinja2 = "*" -jsonschema = "*" -pytablewriter = "*" -======= Jinja2 = "*" jsonschema = "*" ->>>>>>> master pyyaml = "*" [package.source] @@ -585,48 +370,12 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" [[package]] name = "smmap" -<<<<<<< HEAD -version = "3.0.5" -description = "A pure Python implementation of a sliding window memory map manager" -category = "dev" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" - -[[package]] -name = "tabledata" -version = "1.1.3" -description = "tabledata is a Python library to represent tabular data. Used for pytablewriter/pytablereader/SimpleSQLite." -category = "main" -optional = false -python-versions = ">=3.5" - -[package.dependencies] -DataProperty = ">=0.50.0,<2" -typepy = ">=1.1.1,<2" - -[package.extras] -logging = ["loguru (>=0.4.1,<1)"] -test = ["pytablewriter (>=0.46)", "pytest"] - -[[package]] -name = "tcolorpy" -version = "0.0.8" -description = "tcolopy is a Python library to apply true color for terminal text." -category = "main" -optional = false -python-versions = ">=3.5" - -[package.extras] -test = ["pytest", "pytest-md-report (>=0.1)"] - -======= version = "4.0.0" description = "A pure Python implementation of a sliding window memory map manager" category = "dev" optional = false python-versions = ">=3.5" ->>>>>>> master [[package]] name = "toml" version = "0.10.2" @@ -637,37 +386,13 @@ python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" [[package]] name = "typed-ast" -<<<<<<< HEAD -version = "1.4.2" -======= version = "1.4.3" ->>>>>>> master description = "a fork of Python 2 and 3 ast modules with type comment support" category = "dev" optional = false python-versions = "*" [[package]] -<<<<<<< HEAD -name = "typepy" -version = "1.1.2" -description = "typepy is a Python library for variable type checker/validator/converter at a run time." -category = "main" -optional = false -python-versions = ">=3.5" - -[package.dependencies] -mbstrdecoder = ">=1.0.0,<2" -python-dateutil = {version = ">=2.8.0,<3.0.0", optional = true, markers = "extra == \"datetime\""} -pytz = {version = ">=2018.9", optional = true, markers = "extra == \"datetime\""} - -[package.extras] -datetime = ["python-dateutil (>=2.8.0,<3.0.0)", "pytz (>=2018.9)"] -test = ["pytest", "tcolorpy", "python-dateutil (>=2.8.0,<3.0.0)", "pytz (>=2018.9)"] - -[[package]] -======= ->>>>>>> master name = "typing-extensions" version = "3.7.4.3" description = "Backported and Experimental Type Hints for Python 3.5+" @@ -685,43 +410,25 @@ python-versions = "*" [[package]] name = "zipp" -<<<<<<< HEAD -version = "3.4.0" -======= version = "3.4.1" ->>>>>>> master description = "Backport of pathlib-compatible object wrapper for zip files" category = "main" optional = false python-versions = ">=3.6" [package.extras] -<<<<<<< HEAD -docs = ["sphinx", "jaraco.packaging (>=3.2)", "rst.linker (>=1.9)"] -testing = ["pytest (>=3.5,!=3.7.3)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pytest-cov", "jaraco.test (>=3.2.0)", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy"] -======= docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] testing = ["pytest (>=4.6)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pytest-cov", "pytest-enabler", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy"] ->>>>>>> master [metadata] lock-version = "1.1" python-versions = "^3.6" -<<<<<<< HEAD -content-hash = "c5b42f9c4592f8f618d793c3f29b0b9a295ad3335c6d6882dafa22ce56abf1ba" - -[metadata.files] -astroid = [ - {file = "astroid-2.4.2-py3-none-any.whl", hash = "sha256:bc58d83eb610252fd8de6363e39d4f1d0619c894b0ed24603b881c02e64c7386"}, - {file = "astroid-2.4.2.tar.gz", hash = "sha256:2f4078c2a41bf377eea06d71c9d2ba4eb8f6b1af2135bec27bbbb7d8f12bb703"}, -======= content-hash = "2c5c9c7a982da68ad32260baf6303898e2c2fd66663f195159e199041e72536f" [metadata.files] astroid = [ {file = "astroid-2.5.3-py3-none-any.whl", hash = "sha256:bea3f32799fbb8581f58431c12591bc20ce11cbc90ad82e2ea5717d94f2080d5"}, {file = "astroid-2.5.3.tar.gz", hash = "sha256:ad63b8552c70939568966811a088ef0bc880f99a24a00834abd0e3681b514f91"}, ->>>>>>> master ] atomicwrites = [ {file = "atomicwrites-1.4.0-py2.py3-none-any.whl", hash = "sha256:6d1784dea7c0c8d4a5172b6c620f40b6e4cbfdf96d783691f2e1302a7b88e197"}, @@ -734,13 +441,6 @@ attrs = [ cbor2 = [ {file = "cbor2-5.2.0.tar.gz", hash = "sha256:a33aa2e5534fd74401ac95686886e655e3b2ce6383b3f958199b6e70a87c94bf"}, ] -<<<<<<< HEAD -chardet = [ - {file = "chardet-4.0.0-py2.py3-none-any.whl", hash = "sha256:f864054d66fd9118f2e67044ac8981a54775ec5b67aed0441892edb553d21da5"}, - {file = "chardet-4.0.0.tar.gz", hash = "sha256:0d6f53a15db4120f2b08c94f11e7d93d2c911ee118b6b30a04ec3ee8310179fa"}, -] -======= ->>>>>>> master click = [ {file = "click-7.1.2-py2.py3-none-any.whl", hash = "sha256:dacca89f4bfadd5de3d7489b7c8a566eee0d3676333fbb50030263894c38c0dc"}, {file = "click-7.1.2.tar.gz", hash = "sha256:d2b5255c7c6349bc1bd1e59e08cd12acbbd63ce649f2588755783aa94dfb6b1a"}, @@ -753,13 +453,6 @@ colorama = [ {file = "colorama-0.4.4-py2.py3-none-any.whl", hash = "sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2"}, {file = "colorama-0.4.4.tar.gz", hash = "sha256:5941b2b48a20143d2267e95b1c2a7603ce057ee39fd88e7329b0c292aa16869b"}, ] -<<<<<<< HEAD -dataproperty = [ - {file = "DataProperty-0.50.0-py3-none-any.whl", hash = "sha256:9288b74f5d6e07d4c69c218802556f877d711fce2c62abc6aea286b357e84be2"}, - {file = "DataProperty-0.50.0.tar.gz", hash = "sha256:847f2d8927d8426a0eb20e48238e2db19133506bcd1e2608e21314004fa80d72"}, -] -======= ->>>>>>> master doit = [ {file = "doit-0.33.1-py3-none-any.whl", hash = "sha256:211fc0de3fd9ee31e5c4ccb36bc1a4054b5c4a4a44f915ca413896155b684bfa"}, {file = "doit-0.33.1.tar.gz", hash = "sha256:37c3b35c2151647b968b2af24481112b2f813c30f695366db0639d529190a143"}, @@ -768,18 +461,6 @@ et-xmlfile = [ {file = "et_xmlfile-1.0.1.tar.gz", hash = "sha256:614d9722d572f6246302c4491846d2c393c199cfa4edc9af593437691683335b"}, ] gitdb = [ -<<<<<<< HEAD - {file = "gitdb-4.0.5-py3-none-any.whl", hash = "sha256:91f36bfb1ab7949b3b40e23736db18231bf7593edada2ba5c3a174a7b23657ac"}, - {file = "gitdb-4.0.5.tar.gz", hash = "sha256:c9e1f2d0db7ddb9a704c2a0217be31214e91a4fe1dea1efad19ae42ba0c285c9"}, -] -gitpython = [ - {file = "GitPython-3.1.12-py3-none-any.whl", hash = "sha256:867ec3dfb126aac0f8296b19fb63b8c4a399f32b4b6fafe84c4b10af5fa9f7b5"}, - {file = "GitPython-3.1.12.tar.gz", hash = "sha256:42dbefd8d9e2576c496ed0059f3103dcef7125b9ce16f9d5f9c834aed44a1dac"}, -] -importlib-metadata = [ - {file = "importlib_metadata-3.4.0-py3-none-any.whl", hash = "sha256:ace61d5fc652dc280e7b6b4ff732a9c2d40db2c0f92bc6cb74e07b73d53a1771"}, - {file = "importlib_metadata-3.4.0.tar.gz", hash = "sha256:fa5daa4477a7414ae34e95942e4dd07f62adf589143c875c133c1e53c4eff38d"}, -======= {file = "gitdb-4.0.7-py3-none-any.whl", hash = "sha256:6c4cc71933456991da20917998acbe6cf4fb41eeaab7d6d67fbc05ecd4c865b0"}, {file = "gitdb-4.0.7.tar.gz", hash = "sha256:96bf5c08b157a666fec41129e6d327235284cca4c81e92109260f353ba138005"}, ] @@ -790,61 +471,24 @@ gitpython = [ importlib-metadata = [ {file = "importlib_metadata-4.0.0-py3-none-any.whl", hash = "sha256:19192b88d959336bfa6bdaaaef99aeafec179eca19c47c804e555703ee5f07ef"}, {file = "importlib_metadata-4.0.0.tar.gz", hash = "sha256:2e881981c9748d7282b374b68e759c87745c25427b67ecf0cc67fb6637a1bff9"}, ->>>>>>> master ] iniconfig = [ {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"}, {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"}, ] isort = [ -<<<<<<< HEAD - {file = "isort-5.7.0-py3-none-any.whl", hash = "sha256:fff4f0c04e1825522ce6949973e83110a6e907750cd92d128b0d14aaaadbffdc"}, - {file = "isort-5.7.0.tar.gz", hash = "sha256:c729845434366216d320e936b8ad6f9d681aab72dc7cbc2d51bedc3582f3ad1e"}, -] -jdcal = [ - {file = "jdcal-1.4.1-py2.py3-none-any.whl", hash = "sha256:1abf1305fce18b4e8aa248cf8fe0c56ce2032392bc64bbd61b5dff2a19ec8bba"}, - {file = "jdcal-1.4.1.tar.gz", hash = "sha256:472872e096eb8df219c23f2689fc336668bdb43d194094b5cc1707e1640acfc8"}, -] -jinja2 = [ - {file = "Jinja2-2.11.2-py2.py3-none-any.whl", hash = "sha256:f0a4641d3cf955324a89c04f3d94663aa4d638abe8f733ecd3582848e1c37035"}, - {file = "Jinja2-2.11.2.tar.gz", hash = "sha256:89aab215427ef59c34ad58735269eb58b1a5808103067f7bb9d5836c651b3bb0"}, -======= {file = "isort-5.8.0-py3-none-any.whl", hash = "sha256:2bb1680aad211e3c9944dbce1d4ba09a989f04e238296c87fe2139faa26d655d"}, {file = "isort-5.8.0.tar.gz", hash = "sha256:0a943902919f65c5684ac4e0154b1ad4fac6dcaa5d9f3426b732f1c8b5419be6"}, ] jinja2 = [ {file = "Jinja2-2.11.3-py2.py3-none-any.whl", hash = "sha256:03e47ad063331dd6a3f04a43eddca8a966a26ba0c5b7207a9a9e4e08f1b29419"}, {file = "Jinja2-2.11.3.tar.gz", hash = "sha256:a6d58433de0ae800347cab1fa3043cebbabe8baa9d29e668f1c768cb87a333c6"}, ->>>>>>> master ] jsonschema = [ {file = "jsonschema-3.2.0-py2.py3-none-any.whl", hash = "sha256:4e5b3cf8216f577bee9ce139cbe72eca3ea4f292ec60928ff24758ce626cd163"}, {file = "jsonschema-3.2.0.tar.gz", hash = "sha256:c8a85b28d377cc7737e46e2d9f2b4f44ee3c0e1deac6bf46ddefc7187d30797a"}, ] lazy-object-proxy = [ -<<<<<<< HEAD - {file = "lazy-object-proxy-1.4.3.tar.gz", hash = "sha256:f3900e8a5de27447acbf900b4750b0ddfd7ec1ea7fbaf11dfa911141bc522af0"}, - {file = "lazy_object_proxy-1.4.3-cp27-cp27m-macosx_10_13_x86_64.whl", hash = "sha256:a2238e9d1bb71a56cd710611a1614d1194dc10a175c1e08d75e1a7bcc250d442"}, - {file = "lazy_object_proxy-1.4.3-cp27-cp27m-win32.whl", hash = "sha256:efa1909120ce98bbb3777e8b6f92237f5d5c8ea6758efea36a473e1d38f7d3e4"}, - {file = "lazy_object_proxy-1.4.3-cp27-cp27m-win_amd64.whl", hash = "sha256:4677f594e474c91da97f489fea5b7daa17b5517190899cf213697e48d3902f5a"}, - {file = "lazy_object_proxy-1.4.3-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:0c4b206227a8097f05c4dbdd323c50edf81f15db3b8dc064d08c62d37e1a504d"}, - {file = "lazy_object_proxy-1.4.3-cp34-cp34m-manylinux1_x86_64.whl", hash = "sha256:d945239a5639b3ff35b70a88c5f2f491913eb94871780ebfabb2568bd58afc5a"}, - {file = "lazy_object_proxy-1.4.3-cp34-cp34m-win32.whl", hash = "sha256:9651375199045a358eb6741df3e02a651e0330be090b3bc79f6d0de31a80ec3e"}, - {file = "lazy_object_proxy-1.4.3-cp34-cp34m-win_amd64.whl", hash = "sha256:eba7011090323c1dadf18b3b689845fd96a61ba0a1dfbd7f24b921398affc357"}, - {file = "lazy_object_proxy-1.4.3-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:48dab84ebd4831077b150572aec802f303117c8cc5c871e182447281ebf3ac50"}, - {file = "lazy_object_proxy-1.4.3-cp35-cp35m-win32.whl", hash = "sha256:ca0a928a3ddbc5725be2dd1cf895ec0a254798915fb3a36af0964a0a4149e3db"}, - {file = "lazy_object_proxy-1.4.3-cp35-cp35m-win_amd64.whl", hash = "sha256:194d092e6f246b906e8f70884e620e459fc54db3259e60cf69a4d66c3fda3449"}, - {file = "lazy_object_proxy-1.4.3-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:97bb5884f6f1cdce0099f86b907aa41c970c3c672ac8b9c8352789e103cf3156"}, - {file = "lazy_object_proxy-1.4.3-cp36-cp36m-win32.whl", hash = "sha256:cb2c7c57005a6804ab66f106ceb8482da55f5314b7fcb06551db1edae4ad1531"}, - {file = "lazy_object_proxy-1.4.3-cp36-cp36m-win_amd64.whl", hash = "sha256:8d859b89baf8ef7f8bc6b00aa20316483d67f0b1cbf422f5b4dc56701c8f2ffb"}, - {file = "lazy_object_proxy-1.4.3-cp37-cp37m-macosx_10_13_x86_64.whl", hash = "sha256:1be7e4c9f96948003609aa6c974ae59830a6baecc5376c25c92d7d697e684c08"}, - {file = "lazy_object_proxy-1.4.3-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:d74bb8693bf9cf75ac3b47a54d716bbb1a92648d5f781fc799347cfc95952383"}, - {file = "lazy_object_proxy-1.4.3-cp37-cp37m-win32.whl", hash = "sha256:9b15f3f4c0f35727d3a0fba4b770b3c4ebbb1fa907dbcc046a1d2799f3edd142"}, - {file = "lazy_object_proxy-1.4.3-cp37-cp37m-win_amd64.whl", hash = "sha256:9254f4358b9b541e3441b007a0ea0764b9d056afdeafc1a5569eee1cc6c1b9ea"}, - {file = "lazy_object_proxy-1.4.3-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:a6ae12d08c0bf9909ce12385803a543bfe99b95fe01e752536a60af2b7797c62"}, - {file = "lazy_object_proxy-1.4.3-cp38-cp38-win32.whl", hash = "sha256:5541cada25cd173702dbd99f8e22434105456314462326f06dba3e180f203dfd"}, - {file = "lazy_object_proxy-1.4.3-cp38-cp38-win_amd64.whl", hash = "sha256:59f79fef100b09564bc2df42ea2d8d21a64fdcda64979c0fa3db7bdaabaf6239"}, -======= {file = "lazy-object-proxy-1.6.0.tar.gz", hash = "sha256:489000d368377571c6f982fba6497f2aa13c6d1facc40660963da62f5c379726"}, {file = "lazy_object_proxy-1.6.0-cp27-cp27m-macosx_10_14_x86_64.whl", hash = "sha256:c6938967f8528b3668622a9ed3b31d145fab161a32f5891ea7b84f6b790be05b"}, {file = "lazy_object_proxy-1.6.0-cp27-cp27m-win32.whl", hash = "sha256:ebfd274dcd5133e0afae738e6d9da4323c3eb021b3e13052d8cbd0e457b1256e"}, @@ -867,19 +511,13 @@ lazy-object-proxy = [ {file = "lazy_object_proxy-1.6.0-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:9698110e36e2df951c7c36b6729e96429c9c32b3331989ef19976592c5f3c77a"}, {file = "lazy_object_proxy-1.6.0-cp39-cp39-win32.whl", hash = "sha256:1fee665d2638491f4d6e55bd483e15ef21f6c8c2095f235fef72601021e64f61"}, {file = "lazy_object_proxy-1.6.0-cp39-cp39-win_amd64.whl", hash = "sha256:f5144c75445ae3ca2057faac03fda5a902eff196702b0a24daf1d6ce0650514b"}, ->>>>>>> master ] macfsevents = [ {file = "MacFSEvents-0.8.1.tar.gz", hash = "sha256:1324b66b356051de662ba87d84f73ada062acd42b047ed1246e60a449f833e10"}, ] markdown = [ -<<<<<<< HEAD - {file = "Markdown-3.3.3-py3-none-any.whl", hash = "sha256:c109c15b7dc20a9ac454c9e6025927d44460b85bd039da028d85e2b6d0bcc328"}, - {file = "Markdown-3.3.3.tar.gz", hash = "sha256:5d9f2b5ca24bc4c7a390d22323ca4bad200368612b5aaa7796babf971d2b2f18"}, -======= {file = "Markdown-3.3.4-py3-none-any.whl", hash = "sha256:96c3ba1261de2f7547b46a00ea8463832c921d3f9d6aba3f255a6f71386db20c"}, {file = "Markdown-3.3.4.tar.gz", hash = "sha256:31b5b491868dcc87d6c24b7e3d19a0d730d59d3e46f4eea6430a321bed387a49"}, ->>>>>>> master ] markupsafe = [ {file = "MarkupSafe-1.1.1-cp27-cp27m-macosx_10_6_intel.whl", hash = "sha256:09027a7803a62ca78792ad89403b1b7a73a01c8cb65909cd876f7fcebd79b161"}, @@ -900,15 +538,6 @@ markupsafe = [ {file = "MarkupSafe-1.1.1-cp35-cp35m-win32.whl", hash = "sha256:6dd73240d2af64df90aa7c4e7481e23825ea70af4b4922f8ede5b9e35f78a3b1"}, {file = "MarkupSafe-1.1.1-cp35-cp35m-win_amd64.whl", hash = "sha256:9add70b36c5666a2ed02b43b335fe19002ee5235efd4b8a89bfcf9005bebac0d"}, {file = "MarkupSafe-1.1.1-cp36-cp36m-macosx_10_6_intel.whl", hash = "sha256:24982cc2533820871eba85ba648cd53d8623687ff11cbb805be4ff7b4c971aff"}, -<<<<<<< HEAD - {file = "MarkupSafe-1.1.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:00bc623926325b26bb9605ae9eae8a215691f33cae5df11ca5424f06f2d1f473"}, - {file = "MarkupSafe-1.1.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:717ba8fe3ae9cc0006d7c451f0bb265ee07739daf76355d06366154ee68d221e"}, - {file = "MarkupSafe-1.1.1-cp36-cp36m-win32.whl", hash = "sha256:535f6fc4d397c1563d08b88e485c3496cf5784e927af890fb3c3aac7f933ec66"}, - {file = "MarkupSafe-1.1.1-cp36-cp36m-win_amd64.whl", hash = "sha256:b1282f8c00509d99fef04d8ba936b156d419be841854fe901d8ae224c59f0be5"}, - {file = "MarkupSafe-1.1.1-cp37-cp37m-macosx_10_6_intel.whl", hash = "sha256:8defac2f2ccd6805ebf65f5eeb132adcf2ab57aa11fdf4c0dd5169a004710e7d"}, - {file = "MarkupSafe-1.1.1-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:46c99d2de99945ec5cb54f23c8cd5689f6d7177305ebff350a58ce5f8de1669e"}, - {file = "MarkupSafe-1.1.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:ba59edeaa2fc6114428f1637ffff42da1e311e29382d81b339c1817d37ec93c6"}, -======= {file = "MarkupSafe-1.1.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:d53bc011414228441014aa71dbec320c66468c1030aae3a6e29778a3382d96e5"}, {file = "MarkupSafe-1.1.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:00bc623926325b26bb9605ae9eae8a215691f33cae5df11ca5424f06f2d1f473"}, {file = "MarkupSafe-1.1.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:717ba8fe3ae9cc0006d7c451f0bb265ee07739daf76355d06366154ee68d221e"}, @@ -924,22 +553,11 @@ markupsafe = [ {file = "MarkupSafe-1.1.1-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:6fffc775d90dcc9aed1b89219549b329a9250d918fd0b8fa8d93d154918422e1"}, {file = "MarkupSafe-1.1.1-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:a6a744282b7718a2a62d2ed9d993cad6f5f585605ad352c11de459f4108df0a1"}, {file = "MarkupSafe-1.1.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:195d7d2c4fbb0ee8139a6cf67194f3973a6b3042d742ebe0a9ed36d8b6f0c07f"}, ->>>>>>> master {file = "MarkupSafe-1.1.1-cp37-cp37m-win32.whl", hash = "sha256:b00c1de48212e4cc9603895652c5c410df699856a2853135b3967591e4beebc2"}, {file = "MarkupSafe-1.1.1-cp37-cp37m-win_amd64.whl", hash = "sha256:9bf40443012702a1d2070043cb6291650a0841ece432556f784f004937f0f32c"}, {file = "MarkupSafe-1.1.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6788b695d50a51edb699cb55e35487e430fa21f1ed838122d722e0ff0ac5ba15"}, {file = "MarkupSafe-1.1.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:cdb132fc825c38e1aeec2c8aa9338310d29d337bebbd7baa06889d09a60a1fa2"}, {file = "MarkupSafe-1.1.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:13d3144e1e340870b25e7b10b98d779608c02016d5184cfb9927a9f10c689f42"}, -<<<<<<< HEAD - {file = "MarkupSafe-1.1.1-cp38-cp38-win32.whl", hash = "sha256:596510de112c685489095da617b5bcbbac7dd6384aeebeda4df6025d0256a81b"}, - {file = "MarkupSafe-1.1.1-cp38-cp38-win_amd64.whl", hash = "sha256:e8313f01ba26fbbe36c7be1966a7b7424942f670f38e666995b88d012765b9be"}, - {file = "MarkupSafe-1.1.1.tar.gz", hash = "sha256:29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b"}, -] -mbstrdecoder = [ - {file = "mbstrdecoder-1.0.1-py3-none-any.whl", hash = "sha256:56b967800d6554815a6b18f98f915e84912852eff21d94d5e036fe124bc27f53"}, - {file = "mbstrdecoder-1.0.1.tar.gz", hash = "sha256:f895e1fb97496855ab5e43de99588787169c01f782c71625142d1a62729e9f9d"}, -] -======= {file = "MarkupSafe-1.1.1-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:acf08ac40292838b3cbbb06cfe9b2cb9ec78fce8baca31ddb87aaac2e2dc3bc2"}, {file = "MarkupSafe-1.1.1-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:d9be0ba6c527163cbed5e0857c451fcd092ce83947944d6c14bc95441203f032"}, {file = "MarkupSafe-1.1.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:caabedc8323f1e93231b52fc32bdcde6db817623d33e100708d9a68e1f53b26b"}, @@ -955,28 +573,10 @@ mbstrdecoder = [ {file = "MarkupSafe-1.1.1-cp39-cp39-win_amd64.whl", hash = "sha256:b7d644ddb4dbd407d31ffb699f1d140bc35478da613b441c582aeb7c43838dd8"}, {file = "MarkupSafe-1.1.1.tar.gz", hash = "sha256:29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b"}, ] ->>>>>>> master mccabe = [ {file = "mccabe-0.6.1-py2.py3-none-any.whl", hash = "sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42"}, {file = "mccabe-0.6.1.tar.gz", hash = "sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f"}, ] -<<<<<<< HEAD -msgfy = [ - {file = "msgfy-0.1.0-py3-none-any.whl", hash = "sha256:ce8a8c8c223279fa0a2c0f278eec139fcf761ca4eb98f179f54a1b96f53514f5"}, - {file = "msgfy-0.1.0.tar.gz", hash = "sha256:474c08302cd56ccee1300ac7976a01ebd1e42716fc9bcd947d39a311a15b7012"}, -] -openpyxl = [ - {file = "openpyxl-3.0.6-py2.py3-none-any.whl", hash = "sha256:1a4b3869c2500b5c713e8e28341cdada49ecfcff1b10cd9006945f5bcefc090d"}, - {file = "openpyxl-3.0.6.tar.gz", hash = "sha256:b229112b46e158b910a5d1b270b212c42773d39cab24e8db527f775b82afc041"}, -] -packaging = [ - {file = "packaging-20.8-py2.py3-none-any.whl", hash = "sha256:24e0da08660a87484d1602c30bb4902d74816b6985b93de36926f5bc95741858"}, - {file = "packaging-20.8.tar.gz", hash = "sha256:78598185a7008a470d64526a8059de9aaa449238f280fc9eb6b13ba6c4109093"}, -] -pathvalidate = [ - {file = "pathvalidate-2.3.2-py3-none-any.whl", hash = "sha256:cae8ad5cd9223c5c1f4bc4e2ef0cd4c5e89acd2d698fdb7610ee108b9be654d2"}, - {file = "pathvalidate-2.3.2.tar.gz", hash = "sha256:378c8b319838a255c00ab37f664686b75f0aabea4444d6c5a34effbec6738285"}, -======= openpyxl = [ {file = "openpyxl-3.0.7-py2.py3-none-any.whl", hash = "sha256:46af4eaf201a89b610fcca177eed957635f88770a5462fb6aae4a2a52b0ff516"}, {file = "openpyxl-3.0.7.tar.gz", hash = "sha256:6456a3b472e1ef0facb1129f3c6ef00713cebf62e736cd7a75bcc3247432f251"}, @@ -984,7 +584,6 @@ openpyxl = [ packaging = [ {file = "packaging-20.9-py2.py3-none-any.whl", hash = "sha256:67714da7f7bc052e064859c05c595155bd1ee9f69f76557e21f051443c20947a"}, {file = "packaging-20.9.tar.gz", hash = "sha256:5b327ac1320dc863dca72f4514ecc086f31186744b84a230374cc1fd776feae5"}, ->>>>>>> master ] pluggy = [ {file = "pluggy-0.13.1-py2.py3-none-any.whl", hash = "sha256:966c145cd83c96502c3c3868f50408687b38434af77734af1e9ca461a4081d2d"}, @@ -998,13 +597,8 @@ pyinotify = [ {file = "pyinotify-0.9.6.tar.gz", hash = "sha256:9c998a5d7606ca835065cdabc013ae6c66eb9ea76a00a1e3bc6e0cfe2b4f71f4"}, ] pylint = [ -<<<<<<< HEAD - {file = "pylint-2.6.0-py3-none-any.whl", hash = "sha256:bfe68f020f8a0fece830a22dd4d5dddb4ecc6137db04face4c3420a46a52239f"}, - {file = "pylint-2.6.0.tar.gz", hash = "sha256:bb4a908c9dadbc3aac18860550e870f58e1a02c9f2c204fdf5693d73be061210"}, -======= {file = "pylint-2.7.4-py3-none-any.whl", hash = "sha256:209d712ec870a0182df034ae19f347e725c1e615b2269519ab58a35b3fcbbe7a"}, {file = "pylint-2.7.4.tar.gz", hash = "sha256:bd38914c7731cdc518634a8d3c5585951302b6e2b6de60fbb3f7a0220e21eeee"}, ->>>>>>> master ] pyparsing = [ {file = "pyparsing-2.4.7-py2.py3-none-any.whl", hash = "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b"}, @@ -1013,27 +607,9 @@ pyparsing = [ pyrsistent = [ {file = "pyrsistent-0.17.3.tar.gz", hash = "sha256:2e636185d9eb976a18a8a8e96efce62f2905fea90041958d8cc2a189756ebf3e"}, ] -<<<<<<< HEAD -pytablewriter = [ - {file = "pytablewriter-0.58.0-py3-none-any.whl", hash = "sha256:763fb7717b64320188b2f55c5667f9f03c6fef3b00ac0aaafa85b6b6f2741b36"}, - {file = "pytablewriter-0.58.0.tar.gz", hash = "sha256:d232491e32fc84f28a6217fcd225d2ed82ae59d576d39724c98fdb7c7147b9ec"}, -] -pytest = [ - {file = "pytest-6.2.2-py3-none-any.whl", hash = "sha256:b574b57423e818210672e07ca1fa90aaf194a4f63f3ab909a2c67ebb22913839"}, - {file = "pytest-6.2.2.tar.gz", hash = "sha256:9d1edf9e7d0b84d72ea3dbcdfd22b35fb543a5e8f2a60092dd578936bf63d7f9"}, -] -python-dateutil = [ - {file = "python-dateutil-2.8.1.tar.gz", hash = "sha256:73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c"}, - {file = "python_dateutil-2.8.1-py2.py3-none-any.whl", hash = "sha256:75bb3f31ea686f1197762692a9ee6a7550b59fc6ca3a1f4b5d7e32fb98e2da2a"}, -] -pytz = [ - {file = "pytz-2020.5-py2.py3-none-any.whl", hash = "sha256:16962c5fb8db4a8f63a26646d8886e9d769b6c511543557bc84e9569fb9a9cb4"}, - {file = "pytz-2020.5.tar.gz", hash = "sha256:180befebb1927b16f6b57101720075a984c019ac16b1b7575673bea42c6c3da5"}, -======= pytest = [ {file = "pytest-6.2.3-py3-none-any.whl", hash = "sha256:6ad9c7bdf517a808242b998ac20063c41532a570d088d77eec1ee12b0b5574bc"}, {file = "pytest-6.2.3.tar.gz", hash = "sha256:671238a46e4df0f3498d1c3270e5deb9b32d25134c99b7d75370a68cfbe9b634"}, ->>>>>>> master ] pyyaml = [ {file = "PyYAML-5.4.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:3b2b1824fe7112845700f815ff6a489360226a5609b96ec2190a45e62a9fc922"}, @@ -1064,63 +640,14 @@ six = [ {file = "six-1.15.0.tar.gz", hash = "sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259"}, ] smmap = [ -<<<<<<< HEAD - {file = "smmap-3.0.5-py2.py3-none-any.whl", hash = "sha256:7bfcf367828031dc893530a29cb35eb8c8f2d7c8f2d0989354d75d24c8573714"}, - {file = "smmap-3.0.5.tar.gz", hash = "sha256:84c2751ef3072d4f6b2785ec7ee40244c6f45eb934d9e543e2c51f1bd3d54c50"}, -] -tabledata = [ - {file = "tabledata-1.1.3-py3-none-any.whl", hash = "sha256:59cc3b5f0c52ea142386b0653d3d48d2e976fe021154871982b4d234b82be747"}, - {file = "tabledata-1.1.3.tar.gz", hash = "sha256:fa4c2db55cbb198ca5e21063ae743f418d3efbba94cd4844d2f759f994df76a2"}, -] -tcolorpy = [ - {file = "tcolorpy-0.0.8-py3-none-any.whl", hash = "sha256:12b5c928572781fc7e5df5629da6342a65ec7d35efb64b5824c105b8debaaac7"}, - {file = "tcolorpy-0.0.8.tar.gz", hash = "sha256:ffbe886f1321dab88d9cfd4218ea8d93d50d6ad0875c3741dd75fe1437379406"}, -======= {file = "smmap-4.0.0-py2.py3-none-any.whl", hash = "sha256:a9a7479e4c572e2e775c404dcd3080c8dc49f39918c2cf74913d30c4c478e3c2"}, {file = "smmap-4.0.0.tar.gz", hash = "sha256:7e65386bd122d45405ddf795637b7f7d2b532e7e401d46bbe3fb49b9986d5182"}, ->>>>>>> master ] toml = [ {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, ] typed-ast = [ -<<<<<<< HEAD - {file = "typed_ast-1.4.2-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:7703620125e4fb79b64aa52427ec192822e9f45d37d4b6625ab37ef403e1df70"}, - {file = "typed_ast-1.4.2-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:c9aadc4924d4b5799112837b226160428524a9a45f830e0d0f184b19e4090487"}, - {file = "typed_ast-1.4.2-cp35-cp35m-manylinux2014_aarch64.whl", hash = "sha256:9ec45db0c766f196ae629e509f059ff05fc3148f9ffd28f3cfe75d4afb485412"}, - {file = "typed_ast-1.4.2-cp35-cp35m-win32.whl", hash = "sha256:85f95aa97a35bdb2f2f7d10ec5bbdac0aeb9dafdaf88e17492da0504de2e6400"}, - {file = "typed_ast-1.4.2-cp35-cp35m-win_amd64.whl", hash = "sha256:9044ef2df88d7f33692ae3f18d3be63dec69c4fb1b5a4a9ac950f9b4ba571606"}, - {file = "typed_ast-1.4.2-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:c1c876fd795b36126f773db9cbb393f19808edd2637e00fd6caba0e25f2c7b64"}, - {file = "typed_ast-1.4.2-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:5dcfc2e264bd8a1db8b11a892bd1647154ce03eeba94b461effe68790d8b8e07"}, - {file = "typed_ast-1.4.2-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:8db0e856712f79c45956da0c9a40ca4246abc3485ae0d7ecc86a20f5e4c09abc"}, - {file = "typed_ast-1.4.2-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:d003156bb6a59cda9050e983441b7fa2487f7800d76bdc065566b7d728b4581a"}, - {file = "typed_ast-1.4.2-cp36-cp36m-win32.whl", hash = "sha256:4c790331247081ea7c632a76d5b2a265e6d325ecd3179d06e9cf8d46d90dd151"}, - {file = "typed_ast-1.4.2-cp36-cp36m-win_amd64.whl", hash = "sha256:d175297e9533d8d37437abc14e8a83cbc68af93cc9c1c59c2c292ec59a0697a3"}, - {file = "typed_ast-1.4.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:cf54cfa843f297991b7388c281cb3855d911137223c6b6d2dd82a47ae5125a41"}, - {file = "typed_ast-1.4.2-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:b4fcdcfa302538f70929eb7b392f536a237cbe2ed9cba88e3bf5027b39f5f77f"}, - {file = "typed_ast-1.4.2-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:987f15737aba2ab5f3928c617ccf1ce412e2e321c77ab16ca5a293e7bbffd581"}, - {file = "typed_ast-1.4.2-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:37f48d46d733d57cc70fd5f30572d11ab8ed92da6e6b28e024e4a3edfb456e37"}, - {file = "typed_ast-1.4.2-cp37-cp37m-win32.whl", hash = "sha256:36d829b31ab67d6fcb30e185ec996e1f72b892255a745d3a82138c97d21ed1cd"}, - {file = "typed_ast-1.4.2-cp37-cp37m-win_amd64.whl", hash = "sha256:8368f83e93c7156ccd40e49a783a6a6850ca25b556c0fa0240ed0f659d2fe496"}, - {file = "typed_ast-1.4.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:963c80b583b0661918718b095e02303d8078950b26cc00b5e5ea9ababe0de1fc"}, - {file = "typed_ast-1.4.2-cp38-cp38-manylinux1_i686.whl", hash = "sha256:e683e409e5c45d5c9082dc1daf13f6374300806240719f95dc783d1fc942af10"}, - {file = "typed_ast-1.4.2-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:84aa6223d71012c68d577c83f4e7db50d11d6b1399a9c779046d75e24bed74ea"}, - {file = "typed_ast-1.4.2-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:a38878a223bdd37c9709d07cd357bb79f4c760b29210e14ad0fb395294583787"}, - {file = "typed_ast-1.4.2-cp38-cp38-win32.whl", hash = "sha256:a2c927c49f2029291fbabd673d51a2180038f8cd5a5b2f290f78c4516be48be2"}, - {file = "typed_ast-1.4.2-cp38-cp38-win_amd64.whl", hash = "sha256:c0c74e5579af4b977c8b932f40a5464764b2f86681327410aa028a22d2f54937"}, - {file = "typed_ast-1.4.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:07d49388d5bf7e863f7fa2f124b1b1d89d8aa0e2f7812faff0a5658c01c59aa1"}, - {file = "typed_ast-1.4.2-cp39-cp39-manylinux1_i686.whl", hash = "sha256:240296b27397e4e37874abb1df2a608a92df85cf3e2a04d0d4d61055c8305ba6"}, - {file = "typed_ast-1.4.2-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:d746a437cdbca200622385305aedd9aef68e8a645e385cc483bdc5e488f07166"}, - {file = "typed_ast-1.4.2-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:14bf1522cdee369e8f5581238edac09150c765ec1cb33615855889cf33dcb92d"}, - {file = "typed_ast-1.4.2-cp39-cp39-win32.whl", hash = "sha256:cc7b98bf58167b7f2db91a4327da24fb93368838eb84a44c472283778fc2446b"}, - {file = "typed_ast-1.4.2-cp39-cp39-win_amd64.whl", hash = "sha256:7147e2a76c75f0f64c4319886e7639e490fee87c9d25cb1d4faef1d8cf83a440"}, - {file = "typed_ast-1.4.2.tar.gz", hash = "sha256:9fc0b3cb5d1720e7141d103cf4819aea239f7d136acf9ee4a69b047b7986175a"}, -] -typepy = [ - {file = "typepy-1.1.2-py3-none-any.whl", hash = "sha256:30b4d955bc8b628e7ae39bf6f07e2a07939def893b84d7a6cd10ba49c5646717"}, - {file = "typepy-1.1.2.tar.gz", hash = "sha256:afec7feeac73d6b01fe6b23314edc17eaf8469f93783d2460c229068ae9dc588"}, -======= {file = "typed_ast-1.4.3-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:2068531575a125b87a41802130fa7e29f26c09a2833fea68d9a40cf33902eba6"}, {file = "typed_ast-1.4.3-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:c907f561b1e83e93fad565bac5ba9c22d96a54e7ea0267c708bffe863cbe4075"}, {file = "typed_ast-1.4.3-cp35-cp35m-manylinux2014_aarch64.whl", hash = "sha256:1b3ead4a96c9101bef08f9f7d1217c096f31667617b58de957f690c92378b528"}, @@ -1151,7 +678,6 @@ typepy = [ {file = "typed_ast-1.4.3-cp39-cp39-win32.whl", hash = "sha256:209596a4ec71d990d71d5e0d312ac935d86930e6eecff6ccc7007fe54d703808"}, {file = "typed_ast-1.4.3-cp39-cp39-win_amd64.whl", hash = "sha256:9c6d1a54552b5330bc657b7ef0eae25d00ba7ffe85d9ea8ae6540d2197a3788c"}, {file = "typed_ast-1.4.3.tar.gz", hash = "sha256:fb1bbeac803adea29cedd70781399c99138358c26d05fcbd23c13016b7f5ec65"}, ->>>>>>> master ] typing-extensions = [ {file = "typing_extensions-3.7.4.3-py2-none-any.whl", hash = "sha256:dafc7639cde7f1b6e1acc0f457842a83e722ccca8eef5270af2d74792619a89f"}, @@ -1162,11 +688,6 @@ wrapt = [ {file = "wrapt-1.12.1.tar.gz", hash = "sha256:b62ffa81fb85f4332a4f609cab4ac40709470da05643a082ec1eb88e6d9b97d7"}, ] zipp = [ -<<<<<<< HEAD - {file = "zipp-3.4.0-py3-none-any.whl", hash = "sha256:102c24ef8f171fd729d46599845e95c7ab894a4cf45f5de11a44cc7444fb1108"}, - {file = "zipp-3.4.0.tar.gz", hash = "sha256:ed5eee1974372595f9e416cc7bbeeb12335201d8081ca8a0743c954d4446e5cb"}, -======= {file = "zipp-3.4.1-py3-none-any.whl", hash = "sha256:51cb66cc54621609dd593d1787f286ee42a5c0adbb4b29abea5a63edc3e03098"}, {file = "zipp-3.4.1.tar.gz", hash = "sha256:3607921face881ba3e026887d8150cca609d517579abe052ac81fc5aeffdbd76"}, ->>>>>>> master ] From 3a76fa2232a49e1f669bcbea336be6e7b4716060 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Mon, 17 May 2021 13:08:38 -0600 Subject: [PATCH 073/154] Accept all incoming changes. --- tk205/xlsx.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/tk205/xlsx.py b/tk205/xlsx.py index 025756e..c97acf6 100644 --- a/tk205/xlsx.py +++ b/tk205/xlsx.py @@ -721,13 +721,10 @@ def create_tree_from_schema(self, node): # Special cases if item == 'schema_version': value = self.schema.get_schema_version() -<<<<<<< HEAD -======= elif item == 'rs_id': value = node.inner_rs elif item == 'rs_instance': option = get_rs_index(node.inner_rs) ->>>>>>> c0ce73421ed7dd8ab84c20c849d4785e4954f974 elif 'performance_map' == item[:len('performance_map')]: sheet_ref = unique_name_with_index(item, self.sheets) elif 'items' in child_schema_node and node.sheet_type == SheetType.FLAT: @@ -750,9 +747,6 @@ def create_tree_from_schema(self, node): # oneOf nodes if 'oneOf' in schema_node: -<<<<<<< HEAD - raise Exception(f"oneOf not yet handled for '{node.name}'.") -======= if node.inner_rs == 'RS0003' and node.name == 'performance_map' and 'operation_speed_control_type' in self.template_args: template_arg_value = self.get_template_arg('operation_speed_control_type') if template_arg_value == 'CONTINUOUS': @@ -768,7 +762,6 @@ def create_tree_from_schema(self, node): self.create_tree_from_schema(A205XLSXNode(item, parent=node)) else: raise Exception(f"No keyword arguments provided to determine template for '{node.name}'.") ->>>>>>> c0ce73421ed7dd8ab84c20c849d4785e4954f974 def template_tree(self, repspec, **kwargs): ''' @@ -784,15 +777,9 @@ def template_tree(self, repspec, **kwargs): self.template_args_used[arg] = False self.root_node = A205XLSXNode(None, tree=self) self.create_tree_from_schema(self.root_node) -<<<<<<< HEAD - for arg in self.template_args_used: - if not self.template_args_used[arg]: - raise Exception(f"{self.schema_type} unused template argument: \"{arg}\". ") -======= #for arg in self.template_args_used: # if not self.template_args_used[arg]: # raise Exception(f"Unused template argument: \"{arg}\".") ->>>>>>> c0ce73421ed7dd8ab84c20c849d4785e4954f974 def template(self, repspec, output_path, **kwargs): ''' From edb434983585dff051871f5bea0758b69fd53886 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Thu, 20 May 2021 13:29:34 -0600 Subject: [PATCH 074/154] Fix merge errors. --- dodo.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dodo.py b/dodo.py index e9cfbe1..84ac732 100644 --- a/dodo.py +++ b/dodo.py @@ -10,6 +10,8 @@ TEMPLATE_OUTPUT_PATH = os.path.join(BUILD_PATH,"templates") TEMPLATE_CONFIG = os.path.join('config','templates.json') LIB_BUILD_PATH = os.path.join(BUILD_PATH,"libtk205") +TK205_SOURCE_PATH = 'tk205' +SCHEMA205_SOURCE_PATH = os.path.join("schema-205","schema205") def task_build_schema(): '''Build the schema''' @@ -149,7 +151,7 @@ def task_templates(): 'clean': True } -def task_python_tests(): +def task_test(): '''Performs unit tests and example file validation tests''' return { 'task_dep': ['build_schema','cbor','yaml','xlsx','json'], From bcbc2dcc3b1e90139ab82d32feb5a2d8abe41128 Mon Sep 17 00:00:00 2001 From: Neal Kruis Date: Fri, 21 May 2021 15:30:56 -0600 Subject: [PATCH 075/154] CMake fixes for dependency builds. --- libtk205/CMakeLists.txt | 19 +++++++++++++------ libtk205/test/CMakeLists.txt | 16 +--------------- libtk205/vendor/CMakeLists.txt | 14 +------------- 3 files changed, 15 insertions(+), 34 deletions(-) diff --git a/libtk205/CMakeLists.txt b/libtk205/CMakeLists.txt index c42c68e..be39e2e 100644 --- a/libtk205/CMakeLists.txt +++ b/libtk205/CMakeLists.txt @@ -17,20 +17,27 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../schema-205/build/include) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../schema-205/schema205/src) -add_subdirectory(vendor/btwxt) +file(GLOB RS_schemas "${PROJECT_SOURCE_DIR}/../schema-205/schema-source/*.schema.yaml") -add_custom_target(generate_cpp ALL - COMMAND doit headers - #COMMAND doit -s cpp +foreach(schema IN LISTS RS_schemas) + string(REGEX REPLACE "${PROJECT_SOURCE_DIR}/../schema-205/schema-source/(.*).schema.yaml" "\\1" schema_name "${schema}") + list(APPEND RS_headers "${PROJECT_SOURCE_DIR}/../schema-205/build/include/${schema_name}.h") + list(APPEND RS_src "${PROJECT_SOURCE_DIR}/../schema-205/build/cpp/${schema_name}.cpp") +endforeach() + +add_custom_command(OUTPUT "${RS_headers}" "${RS_src}" + COMMAND poetry run doit headers cpp + DEPENDS "${RS_schemas}" WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../schema-205") set (SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/libtk205.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/src/error_handling_tk205.cpp") + "${CMAKE_CURRENT_SOURCE_DIR}/src/error_handling_tk205.cpp" + "${RS_headers}" + "${RS_src}") message(STATUS "libtk205 sources: ${SOURCES}") add_library(libtk205 ${SOURCES}) -add_dependencies(libtk205 generate_cpp) add_subdirectory(vendor) diff --git a/libtk205/test/CMakeLists.txt b/libtk205/test/CMakeLists.txt index ea23f23..b43351b 100644 --- a/libtk205/test/CMakeLists.txt +++ b/libtk205/test/CMakeLists.txt @@ -9,16 +9,8 @@ include_directories(${gtest_SOURCE_DIR}/include) include(GoogleTest) -execute_process(COMMAND doit headers cpp - WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/../schema-205") -file(GLOB RS_headers "${PROJECT_SOURCE_DIR}/../schema-205/build/include/*.h") -file(GLOB RS_src "${PROJECT_SOURCE_DIR}/../schema-205/build/cpp/*.cpp") - set (SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/fixtures_libtk205.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/main_libtk205.cpp - ${RS_headers} - ${RS_src}) -message(STATUS "libtk205_tests sources: ${SOURCES}") + ${CMAKE_CURRENT_SOURCE_DIR}/main_libtk205.cpp) #Does the following command do anything? set_source_files_properties(${SOURCES} PROPERTIES GENERATED TRUE) @@ -27,9 +19,3 @@ add_executable(libtk205_tests ${SOURCES}) target_link_libraries(libtk205_tests libtk205 btwxt gtest gmock) gtest_discover_tests(libtk205_tests TEST_PREFIX libtk205:) - -# Optional clean: Copy files to distributable directory first, if desired -add_custom_command(TARGET libtk205_tests POST_BUILD - COMMAND doit clean headers cpp - WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/../schema-205") - diff --git a/libtk205/vendor/CMakeLists.txt b/libtk205/vendor/CMakeLists.txt index ac170cf..6fb2f73 100644 --- a/libtk205/vendor/CMakeLists.txt +++ b/libtk205/vendor/CMakeLists.txt @@ -1,16 +1,4 @@ -if(GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git") - # Update submodules as needed - option(GIT_SUBMODULE "Check submodules during build" ON) - if(GIT_SUBMODULE) - message(STATUS "${PROJECT_NAME} submodule update") - execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - RESULT_VARIABLE GIT_SUBMOD_RESULT) - if(NOT GIT_SUBMOD_RESULT EQUAL "0") - message(FATAL_ERROR "git submodule update --init failed with ${GIT_SUBMOD_RESULT}, please checkout submodules") - endif() - endif() -endif() +add_subdirectory(btwxt) if (BUILD_TK205_TESTING AND NOT TARGET gtest) From a352cfad0ca6c0105b51c51a7b73c63c19eef2c7 Mon Sep 17 00:00:00 2001 From: Neal Kruis Date: Fri, 21 May 2021 15:43:16 -0600 Subject: [PATCH 076/154] Remove extra CI workflow. --- .github/workflows/build-and-test.yml | 4 +- .../validate-and-build-with-poetry.yml | 42 ------------------- 2 files changed, 1 insertion(+), 45 deletions(-) delete mode 100644 .github/workflows/validate-and-build-with-poetry.yml diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 99c9028..757358d 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -37,6 +37,4 @@ jobs: run: poetry install if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' - name: Build and test - run: | - source $VENV - poetry run doit \ No newline at end of file + run: poetry run doit \ No newline at end of file diff --git a/.github/workflows/validate-and-build-with-poetry.yml b/.github/workflows/validate-and-build-with-poetry.yml deleted file mode 100644 index 90bd173..0000000 --- a/.github/workflows/validate-and-build-with-poetry.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: Validate and Build with Poetry - -on: push - -jobs: - build: - name: Build - strategy: - matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ["3.6", "3.7", "3.8", "3.9"] - defaults: - run: - shell: bash - runs-on: ${{ matrix.os }} - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - submodules: recursive - - name: Setup python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - name: Install Poetry - uses: snok/install-poetry@v1.1.1 - with: - virtualenvs-create: true - virtualenvs-in-project: true - - name: Load cached venv if cache exists - id: cached-poetry-dependencies - uses: actions/cache@v2 - with: - path: .venv - key: poetry-cache-v3-${{ matrix.os }}-py${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} - - name: Install dependencies if cache does not exist - run: poetry install - if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' - - name: Validate, generate, and test - run: | - source $VENV - poetry run doit From 3dd8dc9db2c0a5e377f8cb508dfa82505b2283fe Mon Sep 17 00:00:00 2001 From: Neal Kruis Date: Tue, 25 May 2021 11:47:30 -0600 Subject: [PATCH 077/154] User more specific message level names. --- libtk205/CMakeLists.txt | 2 -- libtk205/include/error_handling_tk205.h | 10 +++++----- libtk205/src/error_handling_tk205.cpp | 8 ++++---- libtk205/test/main_libtk205.cpp | 18 +++++++++--------- schema-205 | 2 +- 5 files changed, 19 insertions(+), 21 deletions(-) diff --git a/libtk205/CMakeLists.txt b/libtk205/CMakeLists.txt index be39e2e..fba1e10 100644 --- a/libtk205/CMakeLists.txt +++ b/libtk205/CMakeLists.txt @@ -35,8 +35,6 @@ set (SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/libtk205.cpp" "${RS_headers}" "${RS_src}") -message(STATUS "libtk205 sources: ${SOURCES}") - add_library(libtk205 ${SOURCES}) add_subdirectory(vendor) diff --git a/libtk205/include/error_handling_tk205.h b/libtk205/include/error_handling_tk205.h index d3615d3..2920b20 100644 --- a/libtk205/include/error_handling_tk205.h +++ b/libtk205/include/error_handling_tk205.h @@ -7,10 +7,10 @@ namespace ASHRAE205_NS { enum class msg_severity : unsigned int { - DEBUG, - INFO, - WARN, - ERR + DEBUG_205, + INFO_205, + WARN_205, + ERR_205 }; using msg_handler = std::function; @@ -20,7 +20,7 @@ namespace ASHRAE205_NS { inline void A205_json_catch(nlohmann::json::out_of_range & ex) { - Show_message(msg_severity::WARN, ex.what()); + Show_message(msg_severity::WARN_205, ex.what()); } } diff --git a/libtk205/src/error_handling_tk205.cpp b/libtk205/src/error_handling_tk205.cpp index e6b9345..bc97ce3 100644 --- a/libtk205/src/error_handling_tk205.cpp +++ b/libtk205/src/error_handling_tk205.cpp @@ -14,10 +14,10 @@ namespace ASHRAE205_NS { void Show_message(msg_severity severity, const std::string &message) { static std::map severity_str { - {msg_severity::DEBUG, "DEBUG"}, - {msg_severity::INFO, "INFO"}, - {msg_severity::WARN, "WARN"}, - {msg_severity::ERR, "ERR"} + {msg_severity::DEBUG_205, "DEBUG"}, + {msg_severity::INFO_205, "INFO"}, + {msg_severity::WARN_205, "WARN"}, + {msg_severity::ERR_205, "ERR"} }; if (!_error_handler) { diff --git a/libtk205/test/main_libtk205.cpp b/libtk205/test/main_libtk205.cpp index 0cb9121..192b555 100644 --- a/libtk205/test/main_libtk205.cpp +++ b/libtk205/test/main_libtk205.cpp @@ -41,12 +41,12 @@ void Display_message(ASHRAE205_NS::msg_severity severity, const std::string &mes { using namespace ASHRAE205_NS; static std::map severity_str { - {msg_severity::DEBUG, "DEBUG"}, - {msg_severity::INFO, "INFO"}, - {msg_severity::WARN, "WARN"}, - {msg_severity::ERR, "ERR"} + {msg_severity::DEBUG_205, "DEBUG"}, + {msg_severity::INFO_205, "INFO"}, + {msg_severity::WARN_205, "WARN"}, + {msg_severity::ERR_205, "ERR"} }; - if (severity <= msg_severity::WARN) + if (severity <= msg_severity::WARN_205) { std::cout << severity_str[severity] << ": " << message << std::endl; } @@ -60,10 +60,10 @@ void Btwxt_message(const Btwxt::MsgLevel messageType, const std::string message, void *) { static std::map severity { - {Btwxt::MsgLevel::MSG_DEBUG, ASHRAE205_NS::msg_severity::DEBUG}, - {Btwxt::MsgLevel::MSG_INFO, ASHRAE205_NS::msg_severity::INFO}, - {Btwxt::MsgLevel::MSG_WARN, ASHRAE205_NS::msg_severity::WARN}, - {Btwxt::MsgLevel::MSG_ERR, ASHRAE205_NS::msg_severity::ERR} + {Btwxt::MsgLevel::MSG_DEBUG, ASHRAE205_NS::msg_severity::DEBUG_205}, + {Btwxt::MsgLevel::MSG_INFO, ASHRAE205_NS::msg_severity::INFO_205}, + {Btwxt::MsgLevel::MSG_WARN, ASHRAE205_NS::msg_severity::WARN_205}, + {Btwxt::MsgLevel::MSG_ERR, ASHRAE205_NS::msg_severity::ERR_205} }; Display_message(severity[messageType], message, nullptr); } diff --git a/schema-205 b/schema-205 index 67085dc..438d871 160000 --- a/schema-205 +++ b/schema-205 @@ -1 +1 @@ -Subproject commit 67085dc262d1dd7816fd52a8d30aea57c77dbd47 +Subproject commit 438d871676b8eb2149643ee05866257c56c19e65 From 263b5d516a96987c9fbbf6349234d02cbc29f8b3 Mon Sep 17 00:00:00 2001 From: Neal Kruis Date: Tue, 25 May 2021 11:51:39 -0600 Subject: [PATCH 078/154] Update CI cache. --- .github/workflows/build-and-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 757358d..96868f0 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -32,7 +32,7 @@ jobs: uses: actions/cache@v2 with: path: .venv - key: poetry-cache-v3-${{ matrix.os }}-py${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} + key: poetry-cache-v4-${{ matrix.os }}-py${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} - name: Install dependencies if cache does not exist run: poetry install if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' From 35bba22fc9c9e7027117d85dbebaf6c78f3e8642 Mon Sep 17 00:00:00 2001 From: Neal Kruis Date: Tue, 25 May 2021 15:19:30 -0600 Subject: [PATCH 079/154] Fix custom command output/dependencies. --- libtk205/CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libtk205/CMakeLists.txt b/libtk205/CMakeLists.txt index fba1e10..f1de8e0 100644 --- a/libtk205/CMakeLists.txt +++ b/libtk205/CMakeLists.txt @@ -25,9 +25,10 @@ foreach(schema IN LISTS RS_schemas) list(APPEND RS_src "${PROJECT_SOURCE_DIR}/../schema-205/build/cpp/${schema_name}.cpp") endforeach() -add_custom_command(OUTPUT "${RS_headers}" "${RS_src}" +add_custom_command(OUTPUT ${RS_headers} ${RS_src} COMMAND poetry run doit headers cpp - DEPENDS "${RS_schemas}" + DEPENDS ${RS_schemas} + COMMENT "Generate libtk205 files from YAML schema" WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../schema-205") set (SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/libtk205.cpp" From fa10fa129c1eddbf8a7f896fac9cc62f08aa248f Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Tue, 8 Jun 2021 14:29:49 -0600 Subject: [PATCH 080/154] Move json object population into own function, with requirement checking. --- libtk205/include/error_handling_tk205.h | 17 +++++++++++++++++ schema-205 | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/libtk205/include/error_handling_tk205.h b/libtk205/include/error_handling_tk205.h index 2920b20..329aa0b 100644 --- a/libtk205/include/error_handling_tk205.h +++ b/libtk205/include/error_handling_tk205.h @@ -4,6 +4,7 @@ #include #include #include +#include namespace ASHRAE205_NS { enum class msg_severity : unsigned int { @@ -18,6 +19,22 @@ namespace ASHRAE205_NS { void Set_error_handler(msg_handler handler); void Show_message(msg_severity severity, const std::string& message); + template + void A205_json_get(nlohmann::json j, const char *subnode, T& a205_object, bool required = false) + { + try + { + a205_object = j.at(subnode).get(); + } + catch (nlohmann::json::out_of_range & ex) + { + if (required) + { + Show_message(msg_severity::WARN_205, ex.what()); + } + } + } + inline void A205_json_catch(nlohmann::json::out_of_range & ex) { Show_message(msg_severity::WARN_205, ex.what()); diff --git a/schema-205 b/schema-205 index 438d871..f82b08b 160000 --- a/schema-205 +++ b/schema-205 @@ -1 +1 @@ -Subproject commit 438d871676b8eb2149643ee05866257c56c19e65 +Subproject commit f82b08b46d77c12f344c97e972bb6fd708e1a5a8 From ecc9b8048fdec5f855b387c5cb19b1a4283d0949 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Wed, 9 Jun 2021 13:15:17 -0600 Subject: [PATCH 081/154] Add test for grid-variable-counting enumerators. --- libtk205/test/main_libtk205.cpp | 9 ++++++++- schema-205 | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/libtk205/test/main_libtk205.cpp b/libtk205/test/main_libtk205.cpp index 192b555..49a6e78 100644 --- a/libtk205/test/main_libtk205.cpp +++ b/libtk205/test/main_libtk205.cpp @@ -28,7 +28,7 @@ TEST_F(RS0001_fixture, Calculate_performance_cooling) auto result = _rs.performance.performance_map_cooling.Calculate_performance(target); EXPECT_EQ(result.size(), 9u); //EXPECT_THAT(result, testing::ElementsAre(testing::DoubleEq(3.189), testing::DoubleEq(6.378), ...)); - } +} TEST_F(RS0005_fixture, Calculate_embedded_RS_performance) { @@ -37,6 +37,13 @@ TEST_F(RS0005_fixture, Calculate_embedded_RS_performance) EXPECT_THAT(result, testing::ElementsAre(testing::DoubleEq(0.985))); } +TEST_F(RS0003_fixture, Verify_grid_variable_index) +{ + auto pm = dynamic_cast(_rs.performance.performance_map.get()); + auto result = pm->grid_variables.static_pressure_difference_index; + EXPECT_EQ(result, 1u); +} + void Display_message(ASHRAE205_NS::msg_severity severity, const std::string &message, void *) { using namespace ASHRAE205_NS; diff --git a/schema-205 b/schema-205 index f82b08b..3065c22 160000 --- a/schema-205 +++ b/schema-205 @@ -1 +1 @@ -Subproject commit f82b08b46d77c12f344c97e972bb6fd708e1a5a8 +Subproject commit 3065c22f250e1c23fa592d46956da753075bc509 From bec5c8194fa834a5c7861a4f47fa8be6ba8890dc Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Wed, 9 Jun 2021 13:19:24 -0600 Subject: [PATCH 082/154] Don't show warnings or log messages to stdout. --- libtk205/src/error_handling_tk205.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libtk205/src/error_handling_tk205.cpp b/libtk205/src/error_handling_tk205.cpp index bc97ce3..0235d41 100644 --- a/libtk205/src/error_handling_tk205.cpp +++ b/libtk205/src/error_handling_tk205.cpp @@ -21,7 +21,7 @@ namespace ASHRAE205_NS { }; if (!_error_handler) { - std::cout << severity_str[severity] << ": " << message << std::endl; + //std::cout << severity_str[severity] << ": " << message << std::endl; } else { From 2b5ad4962786f763f6ef6756a7e20190c061cfec Mon Sep 17 00:00:00 2001 From: Neal Kruis Date: Mon, 4 Oct 2021 10:20:56 -0600 Subject: [PATCH 083/154] Don't add Btwxt if it already exists. --- libtk205/vendor/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libtk205/vendor/CMakeLists.txt b/libtk205/vendor/CMakeLists.txt index 6fb2f73..1da69de 100644 --- a/libtk205/vendor/CMakeLists.txt +++ b/libtk205/vendor/CMakeLists.txt @@ -1,4 +1,6 @@ -add_subdirectory(btwxt) +if (NOT TARGET btwxt) + add_subdirectory(btwxt) +endif() if (BUILD_TK205_TESTING AND NOT TARGET gtest) From 0574536a19fff902bea80d900b5cbb1752d84f8e Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Tue, 19 Oct 2021 12:47:13 -0600 Subject: [PATCH 084/154] Build lib from generated main files. --- libtk205/CMakeLists.txt | 8 +-- libtk205/include/libtk205.h | 38 ---------- libtk205/src/libtk205.cpp | 134 ------------------------------------ schema-205 | 2 +- 4 files changed, 5 insertions(+), 177 deletions(-) delete mode 100644 libtk205/include/libtk205.h delete mode 100644 libtk205/src/libtk205.cpp diff --git a/libtk205/CMakeLists.txt b/libtk205/CMakeLists.txt index f1de8e0..dc3be32 100644 --- a/libtk205/CMakeLists.txt +++ b/libtk205/CMakeLists.txt @@ -26,15 +26,15 @@ foreach(schema IN LISTS RS_schemas) endforeach() add_custom_command(OUTPUT ${RS_headers} ${RS_src} - COMMAND poetry run doit headers cpp + COMMAND poetry run doit cpp DEPENDS ${RS_schemas} COMMENT "Generate libtk205 files from YAML schema" WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../schema-205") -set (SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/libtk205.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/src/error_handling_tk205.cpp" +set (SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/error_handling_tk205.cpp" "${RS_headers}" - "${RS_src}") + "${RS_src}" + "${PROJECT_SOURCE_DIR}/../schema-205/build/cpp/libtk205.cpp") add_library(libtk205 ${SOURCES}) diff --git a/libtk205/include/libtk205.h b/libtk205/include/libtk205.h deleted file mode 100644 index 474d6f7..0000000 --- a/libtk205/include/libtk205.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef LIBTK205_H_ -#define LIBTK205_H_ - -#include -#include -#include "ASHRAE205.h" -#include "RS0001.h" -#include "RS0002.h" -#include "RS0003.h" -#include "RS0004.h" -#include "RS0005.h" -#include "RS0006.h" -#include "RS0007.h" -#include "nlohmann/json.hpp" - -namespace libtk205_NS { - - class A205_SDK - { - public: - - static bool Validate_A205(const char* schema, const char* input_file); - - ASHRAE205_NS::RS0001_NS::RS0001 Load_RS0001(const char* input_file); - ASHRAE205_NS::RS0002_NS::RS0002 Load_RS0002(const char* input_file); - ASHRAE205_NS::RS0003_NS::RS0003 Load_RS0003(const char* input_file); - ASHRAE205_NS::RS0004_NS::RS0004 Load_RS0004(const char* input_file); - ASHRAE205_NS::RS0005_NS::RS0005 Load_RS0005(const char* input_file); - ASHRAE205_NS::RS0006_NS::RS0006 Load_RS0006(const char* input_file); - ASHRAE205_NS::RS0007_NS::RS0007 Load_RS0007(const char* input_file); - - private: - void Read_binary_file(const char* filename, std::vector &bytes); - nlohmann::json Load_json(const char* input_file); - }; -} - -#endif \ No newline at end of file diff --git a/libtk205/src/libtk205.cpp b/libtk205/src/libtk205.cpp deleted file mode 100644 index a40a0e0..0000000 --- a/libtk205/src/libtk205.cpp +++ /dev/null @@ -1,134 +0,0 @@ -#include "libtk205.h" -#include - -#include - -#include -#include -#include -#include -#include - -namespace libtk205_NS { - - using json = nlohmann::json; - using namespace ASHRAE205_NS; - using valijson::Schema; - using valijson::SchemaParser; - using valijson::Validator; - using valijson::adapters::NlohmannJsonAdapter; - - bool A205_SDK::Validate_A205(const char* schema_file, const char* input_file) - { - json schema_doc; - if (!valijson::utils::loadDocument(schema_file, schema_doc)) - { - throw std::runtime_error("Failed to load schema document"); - } - - Schema schema; - SchemaParser parser; - NlohmannJsonAdapter schema_adapter(schema_doc); - parser.populateSchema(schema_adapter, schema); - - json input_doc; - if (!valijson::utils::loadDocument(input_file, input_doc)) - { - throw std::runtime_error("Failed to load input document"); - } - - Validator validator; - NlohmannJsonAdapter input_adapter(input_doc); - if (!validator.validate(schema, input_adapter, NULL)) - { - throw std::runtime_error("Validation failed."); - } - return true; - } - - RS0001_NS::RS0001 A205_SDK::Load_RS0001(const char* input_file) - { - auto j = Load_json(input_file); - return j.get(); - } - - RS0002_NS::RS0002 A205_SDK::Load_RS0002(const char* input_file) - { - auto j = Load_json(input_file); - return j.get(); - } - - RS0003_NS::RS0003 A205_SDK::Load_RS0003(const char* input_file) - { - auto j = Load_json(input_file); - return j.get(); - } - - RS0004_NS::RS0004 A205_SDK::Load_RS0004(const char* input_file) - { - auto j = Load_json(input_file); - return j.get(); - } - - RS0005_NS::RS0005 A205_SDK::Load_RS0005(const char* input_file) - { - auto j = Load_json(input_file); - return j.get(); - } - - RS0006_NS::RS0006 A205_SDK::Load_RS0006(const char* input_file) - { - auto j = Load_json(input_file); - return j.get(); - } - - RS0007_NS::RS0007 A205_SDK::Load_RS0007(const char* input_file) - { - auto j = Load_json(input_file); - return j.get(); - } - - void A205_SDK::Read_binary_file(const char* filename, std::vector &bytes) - { - std::ifstream is (filename, std::ifstream::binary); - if (is) - { - // get length of file: - is.seekg(0, is.end); - size_t length = static_cast(is.tellg()); - is.seekg(0, is.beg); - - bytes.resize(length); - // read data as a block: - is.read(bytes.data(), length); - - is.close(); - } - } - - json A205_SDK::Load_json(const char* input_file) - { - std::string filename(input_file); - std::string::size_type idx = filename.rfind('.'); - json j; - - if(idx != std::string::npos) - { - std::string extension = filename.substr(idx+1); - - if (extension == "cbor") - { - std::vector bytearray; - Read_binary_file(input_file, bytearray); - j = json::from_cbor(bytearray); - } - else if (extension == "json") - { - std::string schema(input_file); - std::ifstream in(schema); - in >> j; - } - } - return j; - } -} \ No newline at end of file diff --git a/schema-205 b/schema-205 index 3065c22..1b75f5a 160000 --- a/schema-205 +++ b/schema-205 @@ -1 +1 @@ -Subproject commit 3065c22f250e1c23fa592d46956da753075bc509 +Subproject commit 1b75f5abf27df26d8bfbc95110fb31078b7b45c9 From e15754ff4e5a286bb918b9d58b3f717f518ea2f0 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Tue, 19 Oct 2021 13:39:47 -0600 Subject: [PATCH 085/154] Remove extraneous namespace. --- libtk205/test/fixtures_libtk205.hpp | 2 +- libtk205/test/main_libtk205.cpp | 2 +- schema-205 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libtk205/test/fixtures_libtk205.hpp b/libtk205/test/fixtures_libtk205.hpp index 40a2031..5145fe7 100644 --- a/libtk205/test/fixtures_libtk205.hpp +++ b/libtk205/test/fixtures_libtk205.hpp @@ -7,7 +7,7 @@ #include "gtest/gtest.h" #include "libtk205.h" -using namespace libtk205_NS; +using namespace ASHRAE205_NS; class RS_fixture : public testing::Test { diff --git a/libtk205/test/main_libtk205.cpp b/libtk205/test/main_libtk205.cpp index 49a6e78..003b9aa 100644 --- a/libtk205/test/main_libtk205.cpp +++ b/libtk205/test/main_libtk205.cpp @@ -8,7 +8,7 @@ #include "libtk205.h" #include -using namespace libtk205_NS; +using namespace ASHRAE205_NS; #if 0 TEST(RS_fixture, Validate_RSes) diff --git a/schema-205 b/schema-205 index 1b75f5a..f1612ba 160000 --- a/schema-205 +++ b/schema-205 @@ -1 +1 @@ -Subproject commit 1b75f5abf27df26d8bfbc95110fb31078b7b45c9 +Subproject commit f1612ba5258559e92ff991c1785eff91cc52e0f8 From b139cbeb4f06c5bd40c7b1914513feba13259cde Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Tue, 19 Oct 2021 15:47:18 -0600 Subject: [PATCH 086/154] Add lib files to build dependencies. --- libtk205/CMakeLists.txt | 8 ++++++-- schema-205 | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/libtk205/CMakeLists.txt b/libtk205/CMakeLists.txt index dc3be32..dd8e0dd 100644 --- a/libtk205/CMakeLists.txt +++ b/libtk205/CMakeLists.txt @@ -25,7 +25,10 @@ foreach(schema IN LISTS RS_schemas) list(APPEND RS_src "${PROJECT_SOURCE_DIR}/../schema-205/build/cpp/${schema_name}.cpp") endforeach() -add_custom_command(OUTPUT ${RS_headers} ${RS_src} +list(APPEND lib_headers "${PROJECT_SOURCE_DIR}/../schema-205/build/include/libtk205.h") +list(APPEND lib_src "${PROJECT_SOURCE_DIR}/../schema-205/build/cpp/libtk205.cpp") + +add_custom_command(OUTPUT ${RS_headers} ${RS_src} ${lib_headers} ${lib_src} COMMAND poetry run doit cpp DEPENDS ${RS_schemas} COMMENT "Generate libtk205 files from YAML schema" @@ -34,7 +37,8 @@ add_custom_command(OUTPUT ${RS_headers} ${RS_src} set (SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/error_handling_tk205.cpp" "${RS_headers}" "${RS_src}" - "${PROJECT_SOURCE_DIR}/../schema-205/build/cpp/libtk205.cpp") + "${lib_headers}" + "${lib_src}") add_library(libtk205 ${SOURCES}) diff --git a/schema-205 b/schema-205 index f1612ba..cb611b8 160000 --- a/schema-205 +++ b/schema-205 @@ -1 +1 @@ -Subproject commit f1612ba5258559e92ff991c1785eff91cc52e0f8 +Subproject commit cb611b8e0a0b9729ae15e16edf84df86b61ebde8 From 6fd230b841313e8ceccc89530ce66966bee6be8f Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Tue, 26 Oct 2021 11:25:15 -0600 Subject: [PATCH 087/154] Add generic enum_info struct to project. --- libtk205/include/error_handling_tk205.h | 20 ++++++++++++++------ libtk205/test/main_libtk205.cpp | 6 ++++++ schema-205 | 2 +- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/libtk205/include/error_handling_tk205.h b/libtk205/include/error_handling_tk205.h index 329aa0b..d273e7f 100644 --- a/libtk205/include/error_handling_tk205.h +++ b/libtk205/include/error_handling_tk205.h @@ -7,12 +7,20 @@ #include namespace ASHRAE205_NS { - enum class msg_severity : unsigned int { - DEBUG_205, - INFO_205, - WARN_205, - ERR_205 - }; + + struct enum_info + { + std::string enum_name; + std::string display_text; + std::string description; + }; + + enum class msg_severity : unsigned int { + DEBUG_205, + INFO_205, + WARN_205, + ERR_205 + }; using msg_handler = std::function; diff --git a/libtk205/test/main_libtk205.cpp b/libtk205/test/main_libtk205.cpp index 003b9aa..1133b08 100644 --- a/libtk205/test/main_libtk205.cpp +++ b/libtk205/test/main_libtk205.cpp @@ -44,6 +44,12 @@ TEST_F(RS0003_fixture, Verify_grid_variable_index) EXPECT_EQ(result, 1u); } +TEST_F(RS0006_fixture, Verify_enum_description) +{ + auto result = RS0006_NS::CoolingMethod_info[RS0006_NS::CoolingMethod::ACTIVE_AIR_COOLED].description; + EXPECT_THAT(result, "Drive is cooled using forced air convection within the surrounding environment"); +} + void Display_message(ASHRAE205_NS::msg_severity severity, const std::string &message, void *) { using namespace ASHRAE205_NS; diff --git a/schema-205 b/schema-205 index cb611b8..a793a68 160000 --- a/schema-205 +++ b/schema-205 @@ -1 +1 @@ -Subproject commit cb611b8e0a0b9729ae15e16edf84df86b61ebde8 +Subproject commit a793a68dda747cc7e4f9146bb074c7c9a27b51ed From 70be48e49344513b98d587f2913d6788eb7cf39e Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Tue, 26 Oct 2021 13:02:58 -0600 Subject: [PATCH 088/154] Use string_view instead of string. --- libtk205/include/error_handling_tk205.h | 6 +++--- schema-205 | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libtk205/include/error_handling_tk205.h b/libtk205/include/error_handling_tk205.h index d273e7f..7681654 100644 --- a/libtk205/include/error_handling_tk205.h +++ b/libtk205/include/error_handling_tk205.h @@ -10,9 +10,9 @@ namespace ASHRAE205_NS { struct enum_info { - std::string enum_name; - std::string display_text; - std::string description; + std::string_view enumerant_name; + std::string_view display_text; + std::string_view description; }; enum class msg_severity : unsigned int { diff --git a/schema-205 b/schema-205 index a793a68..af71c8f 160000 --- a/schema-205 +++ b/schema-205 @@ -1 +1 @@ -Subproject commit a793a68dda747cc7e4f9146bb074c7c9a27b51ed +Subproject commit af71c8fc31aa07840099790eee82be638ad4f53d From cb7abc2b4295e7323737013ce1bd8d3df039fa8a Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Tue, 26 Oct 2021 18:44:38 -0600 Subject: [PATCH 089/154] Add support for set status of each data element. --- libtk205/include/error_handling_tk205.h | 10 +++------- libtk205/test/main_libtk205.cpp | 6 ++++++ schema-205 | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/libtk205/include/error_handling_tk205.h b/libtk205/include/error_handling_tk205.h index 7681654..f4f501d 100644 --- a/libtk205/include/error_handling_tk205.h +++ b/libtk205/include/error_handling_tk205.h @@ -28,26 +28,22 @@ namespace ASHRAE205_NS { void Show_message(msg_severity severity, const std::string& message); template - void A205_json_get(nlohmann::json j, const char *subnode, T& a205_object, bool required = false) + void A205_json_get(nlohmann::json j, const char *subnode, T& a205_object, bool& object_is_set, bool required = false) { try { a205_object = j.at(subnode).get(); + object_is_set = true; } catch (nlohmann::json::out_of_range & ex) { + object_is_set = false; if (required) { Show_message(msg_severity::WARN_205, ex.what()); } } } - - inline void A205_json_catch(nlohmann::json::out_of_range & ex) - { - Show_message(msg_severity::WARN_205, ex.what()); - } - } diff --git a/libtk205/test/main_libtk205.cpp b/libtk205/test/main_libtk205.cpp index 1133b08..22eee57 100644 --- a/libtk205/test/main_libtk205.cpp +++ b/libtk205/test/main_libtk205.cpp @@ -22,6 +22,12 @@ TEST(RS_fixture, Validate_RSes) } #endif +TEST_F(RS0001_fixture, Check_is_set) +{ + EXPECT_FALSE(_rs.metadata.data_source_is_set); + EXPECT_TRUE(_rs.metadata.description_is_set); +} + TEST_F(RS0001_fixture, Calculate_performance_cooling) { std::vector target {0.0755, 280.0, 0.0957, 295.0, 0.5}; //NOLINT : Of course you need magic numbers; it's a numerical test diff --git a/schema-205 b/schema-205 index af71c8f..794c934 160000 --- a/schema-205 +++ b/schema-205 @@ -1 +1 @@ -Subproject commit af71c8fc31aa07840099790eee82be638ad4f53d +Subproject commit 794c9340696b139c64f7018e7d01e2e68ca2dcc6 From 646a3c862d13573170dd57cc797a05e2585b3037 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Mon, 1 Nov 2021 09:41:26 -0600 Subject: [PATCH 090/154] Better separate header contents by functionality. --- libtk205/CMakeLists.txt | 4 +++- libtk205/include/error_handling_tk205.h | 25 --------------------- libtk205/include/loadobject_205.h | 29 +++++++++++++++++++++++++ libtk205/include/typeinfo_205.h | 16 ++++++++++++++ libtk205/src/error_handling_tk205.cpp | 2 +- schema-205 | 2 +- 6 files changed, 50 insertions(+), 28 deletions(-) create mode 100644 libtk205/include/loadobject_205.h create mode 100644 libtk205/include/typeinfo_205.h diff --git a/libtk205/CMakeLists.txt b/libtk205/CMakeLists.txt index dd8e0dd..7c9d06e 100644 --- a/libtk205/CMakeLists.txt +++ b/libtk205/CMakeLists.txt @@ -25,7 +25,9 @@ foreach(schema IN LISTS RS_schemas) list(APPEND RS_src "${PROJECT_SOURCE_DIR}/../schema-205/build/cpp/${schema_name}.cpp") endforeach() -list(APPEND lib_headers "${PROJECT_SOURCE_DIR}/../schema-205/build/include/libtk205.h") +list(APPEND lib_headers "${PROJECT_SOURCE_DIR}/../schema-205/build/include/libtk205.h" + "${CMAKE_CURRENT_SOURCE_DIR}/include/typeinfo_205.h" + "${CMAKE_CURRENT_SOURCE_DIR}/include/loadobject_205.h") list(APPEND lib_src "${PROJECT_SOURCE_DIR}/../schema-205/build/cpp/libtk205.cpp") add_custom_command(OUTPUT ${RS_headers} ${RS_src} ${lib_headers} ${lib_src} diff --git a/libtk205/include/error_handling_tk205.h b/libtk205/include/error_handling_tk205.h index f4f501d..72d5b50 100644 --- a/libtk205/include/error_handling_tk205.h +++ b/libtk205/include/error_handling_tk205.h @@ -8,13 +8,6 @@ namespace ASHRAE205_NS { - struct enum_info - { - std::string_view enumerant_name; - std::string_view display_text; - std::string_view description; - }; - enum class msg_severity : unsigned int { DEBUG_205, INFO_205, @@ -26,24 +19,6 @@ namespace ASHRAE205_NS { void Set_error_handler(msg_handler handler); void Show_message(msg_severity severity, const std::string& message); - - template - void A205_json_get(nlohmann::json j, const char *subnode, T& a205_object, bool& object_is_set, bool required = false) - { - try - { - a205_object = j.at(subnode).get(); - object_is_set = true; - } - catch (nlohmann::json::out_of_range & ex) - { - object_is_set = false; - if (required) - { - Show_message(msg_severity::WARN_205, ex.what()); - } - } - } } diff --git a/libtk205/include/loadobject_205.h b/libtk205/include/loadobject_205.h new file mode 100644 index 0000000..71a3e04 --- /dev/null +++ b/libtk205/include/loadobject_205.h @@ -0,0 +1,29 @@ +#ifndef LOADOBJECT_205_H_ +#define LOADOBJECT_205_H_ + +#include +#include + +namespace ASHRAE205_NS { + + template + void A205_json_get(nlohmann::json j, const char *subnode, T& a205_object, bool& object_is_set, bool required = false) + { + try + { + a205_object = j.at(subnode).get(); + object_is_set = true; + } + catch (nlohmann::json::out_of_range & ex) + { + object_is_set = false; + if (required) + { + Show_message(msg_severity::WARN_205, ex.what()); + } + } + } +} + + +#endif \ No newline at end of file diff --git a/libtk205/include/typeinfo_205.h b/libtk205/include/typeinfo_205.h new file mode 100644 index 0000000..6f647d0 --- /dev/null +++ b/libtk205/include/typeinfo_205.h @@ -0,0 +1,16 @@ +#ifndef TYPEINFO_205_H_ +#define TYPEINFO_205_H_ + +#include + +namespace ASHRAE205_NS { + + struct enum_info + { + std::string_view enumerant_name; + std::string_view display_text; + std::string_view description; + }; +} + +#endif // TYPEINFO_205_H_ \ No newline at end of file diff --git a/libtk205/src/error_handling_tk205.cpp b/libtk205/src/error_handling_tk205.cpp index 0235d41..792aed7 100644 --- a/libtk205/src/error_handling_tk205.cpp +++ b/libtk205/src/error_handling_tk205.cpp @@ -13,7 +13,7 @@ namespace ASHRAE205_NS { void Show_message(msg_severity severity, const std::string &message) { - static std::map severity_str { + static std::map severity_str { {msg_severity::DEBUG_205, "DEBUG"}, {msg_severity::INFO_205, "INFO"}, {msg_severity::WARN_205, "WARN"}, diff --git a/schema-205 b/schema-205 index 794c934..f747ea0 160000 --- a/schema-205 +++ b/schema-205 @@ -1 +1 @@ -Subproject commit 794c9340696b139c64f7018e7d01e2e68ca2dcc6 +Subproject commit f747ea0a27bb6ec4dfea4b4783f36282954efc1a From 6859a62238dedeeb45c8aaabed99933a2884dbad Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Tue, 2 Nov 2021 11:05:50 -0600 Subject: [PATCH 091/154] Add static descriptive variables to classes. --- schema-205 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema-205 b/schema-205 index f747ea0..6f8e358 160000 --- a/schema-205 +++ b/schema-205 @@ -1 +1 @@ -Subproject commit f747ea0a27bb6ec4dfea4b4783f36282954efc1a +Subproject commit 6f8e35878edcfc0c7ae550061d773868567bacff From 6ab68a95b84071be252fbdc0298ca363ea77308c Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Tue, 2 Nov 2021 15:55:31 -0600 Subject: [PATCH 092/154] Enum metainfo maps should not be modifiable. --- libtk205/test/main_libtk205.cpp | 2 +- schema-205 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libtk205/test/main_libtk205.cpp b/libtk205/test/main_libtk205.cpp index 22eee57..bf98072 100644 --- a/libtk205/test/main_libtk205.cpp +++ b/libtk205/test/main_libtk205.cpp @@ -52,7 +52,7 @@ TEST_F(RS0003_fixture, Verify_grid_variable_index) TEST_F(RS0006_fixture, Verify_enum_description) { - auto result = RS0006_NS::CoolingMethod_info[RS0006_NS::CoolingMethod::ACTIVE_AIR_COOLED].description; + auto result = RS0006_NS::CoolingMethod_info.at(RS0006_NS::CoolingMethod::ACTIVE_AIR_COOLED).description; EXPECT_THAT(result, "Drive is cooled using forced air convection within the surrounding environment"); } diff --git a/schema-205 b/schema-205 index 6f8e358..670c6d0 160000 --- a/schema-205 +++ b/schema-205 @@ -1 +1 @@ -Subproject commit 6f8e35878edcfc0c7ae550061d773868567bacff +Subproject commit 670c6d0916bde581f93e64898c9e00991f4a6d91 From 87e52355f0e53fd408fa324e6b3b78fce6b5c5e5 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Tue, 2 Nov 2021 16:10:28 -0600 Subject: [PATCH 093/154] Require CPP17 to use string_view. --- libtk205/CMakeLists.txt | 2 +- libtk205/src/error_handling_tk205.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/libtk205/CMakeLists.txt b/libtk205/CMakeLists.txt index 7c9d06e..32fba0c 100644 --- a/libtk205/CMakeLists.txt +++ b/libtk205/CMakeLists.txt @@ -1,4 +1,4 @@ -set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) project(libtk205) diff --git a/libtk205/src/error_handling_tk205.cpp b/libtk205/src/error_handling_tk205.cpp index 792aed7..22ae7ba 100644 --- a/libtk205/src/error_handling_tk205.cpp +++ b/libtk205/src/error_handling_tk205.cpp @@ -1,6 +1,7 @@ #include "error_handling_tk205.h" #include #include +#include namespace ASHRAE205_NS { From 88b0fa4f68ca87485677bcce2b01608fe8c2f182 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Tue, 2 Nov 2021 18:30:22 -0600 Subject: [PATCH 094/154] Remove unnecessary class level. --- libtk205/test/fixtures_libtk205.hpp | 17 ++++++++--------- schema-205 | 2 +- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/libtk205/test/fixtures_libtk205.hpp b/libtk205/test/fixtures_libtk205.hpp index 5145fe7..60d9046 100644 --- a/libtk205/test/fixtures_libtk205.hpp +++ b/libtk205/test/fixtures_libtk205.hpp @@ -12,8 +12,7 @@ using namespace ASHRAE205_NS; class RS_fixture : public testing::Test { protected: - RS_fixture() : _sdk() {} - A205_SDK _sdk; + RS_fixture() {} }; class RS0001_fixture : public RS_fixture @@ -21,7 +20,7 @@ class RS0001_fixture : public RS_fixture protected: RS0001_fixture() : RS_fixture() { - _rs = _sdk.Load_RS0001(TEST205_INPUT_EXAMPLES_DIR "/schema-205/examples/RS0001/Chiller-Constant-Efficiency.RS0001.a205.json"); + _rs = Load_RS0001(TEST205_INPUT_EXAMPLES_DIR "/schema-205/examples/RS0001/Chiller-Constant-Efficiency.RS0001.a205.json"); } ASHRAE205_NS::RS0001_NS::RS0001 _rs; }; @@ -31,7 +30,7 @@ class RS0002_fixture : public RS_fixture protected: RS0002_fixture() : RS_fixture() { - _rs = _sdk.Load_RS0002(TEST205_INPUT_EXAMPLES_DIR "/schema-205/examples/RS0002/Unitary-Constant-Efficiency.RS0002.a205.json"); + _rs = Load_RS0002(TEST205_INPUT_EXAMPLES_DIR "/schema-205/examples/RS0002/Unitary-Constant-Efficiency.RS0002.a205.json"); } ASHRAE205_NS::RS0002_NS::RS0002 _rs; }; @@ -41,7 +40,7 @@ class RS0003_fixture : public RS_fixture protected: RS0003_fixture() : RS_fixture() { - _rs= _sdk.Load_RS0003(TEST205_INPUT_EXAMPLES_DIR "/schema-205/examples/RS0003/Fan-Continuous.RS0003.a205.json"); + _rs= Load_RS0003(TEST205_INPUT_EXAMPLES_DIR "/schema-205/examples/RS0003/Fan-Continuous.RS0003.a205.json"); } ASHRAE205_NS::RS0003_NS::RS0003 _rs; }; @@ -51,7 +50,7 @@ class RS0004_fixture : public RS_fixture protected: RS0004_fixture() : RS_fixture() { - _rs= _sdk.Load_RS0004(TEST205_INPUT_EXAMPLES_DIR "/schema-205/examples/RS0004/DX-Constant-Efficiency.RS0004.a205.json"); + _rs= Load_RS0004(TEST205_INPUT_EXAMPLES_DIR "/schema-205/examples/RS0004/DX-Constant-Efficiency.RS0004.a205.json"); } ASHRAE205_NS::RS0004_NS::RS0004 _rs; }; @@ -61,7 +60,7 @@ class RS0005_fixture : public RS_fixture protected: RS0005_fixture() : RS_fixture() { - _rs= _sdk.Load_RS0005(TEST205_INPUT_EXAMPLES_DIR "/schema-205/examples/RS0005/Motor-Constant-Efficiency.RS0005.a205.json"); + _rs= Load_RS0005(TEST205_INPUT_EXAMPLES_DIR "/schema-205/examples/RS0005/Motor-Constant-Efficiency.RS0005.a205.json"); } ASHRAE205_NS::RS0005_NS::RS0005 _rs; }; @@ -71,7 +70,7 @@ class RS0006_fixture : public RS_fixture protected: RS0006_fixture() : RS_fixture() { - _rs = _sdk.Load_RS0006(TEST205_INPUT_EXAMPLES_DIR "/schema-205/examples/RS0006/Drive-Constant-Efficiency.RS0006.a205.json"); + _rs = Load_RS0006(TEST205_INPUT_EXAMPLES_DIR "/schema-205/examples/RS0006/Drive-Constant-Efficiency.RS0006.a205.json"); } ASHRAE205_NS::RS0006_NS::RS0006 _rs; }; @@ -81,7 +80,7 @@ class RS0007_fixture : public RS_fixture protected: RS0007_fixture() : RS_fixture() { - _rs = _sdk.Load_RS0007(TEST205_INPUT_EXAMPLES_DIR "/schema-205/examples/RS0007/Belt-Drive-Constant-Efficiency.RS0007.a205.json"); + _rs = Load_RS0007(TEST205_INPUT_EXAMPLES_DIR "/schema-205/examples/RS0007/Belt-Drive-Constant-Efficiency.RS0007.a205.json"); } ASHRAE205_NS::RS0007_NS::RS0007 _rs; }; diff --git a/schema-205 b/schema-205 index 670c6d0..23f801a 160000 --- a/schema-205 +++ b/schema-205 @@ -1 +1 @@ -Subproject commit 670c6d0916bde581f93e64898c9e00991f4a6d91 +Subproject commit 23f801a5bd3ae4e9846cf82600234b693b0b608b From 6695c1467e5a1cb7b054594b350989945d86ea97 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Tue, 9 Nov 2021 06:44:03 -0700 Subject: [PATCH 095/154] Add overloaded performance functions. --- schema-205 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema-205 b/schema-205 index 23f801a..637ac6c 160000 --- a/schema-205 +++ b/schema-205 @@ -1 +1 @@ -Subproject commit 23f801a5bd3ae4e9846cf82600234b693b0b608b +Subproject commit 637ac6c823326a1d0323c8be1f7ca3a448359f5e From c264d42d6fe3fd727077bd96137490a42daa977d Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Tue, 9 Nov 2021 16:05:12 -0700 Subject: [PATCH 096/154] Add tests for new lookup struct. --- libtk205/test/main_libtk205.cpp | 17 +++++++++++++++-- schema-205 | 2 +- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/libtk205/test/main_libtk205.cpp b/libtk205/test/main_libtk205.cpp index bf98072..ed8ed83 100644 --- a/libtk205/test/main_libtk205.cpp +++ b/libtk205/test/main_libtk205.cpp @@ -30,10 +30,23 @@ TEST_F(RS0001_fixture, Check_is_set) TEST_F(RS0001_fixture, Calculate_performance_cooling) { - std::vector target {0.0755, 280.0, 0.0957, 295.0, 0.5}; //NOLINT : Of course you need magic numbers; it's a numerical test + std::vector target {0.0755, 280.0, 0.0957, 295.0, 0.5}; //NOLINT : Magic numbers necessary! auto result = _rs.performance.performance_map_cooling.Calculate_performance(target); EXPECT_EQ(result.size(), 9u); - //EXPECT_THAT(result, testing::ElementsAre(testing::DoubleEq(3.189), testing::DoubleEq(6.378), ...)); +} + +TEST_F(RS0001_fixture, Calculate_performance_cooling_2) +{ + std::vector target {0.0755, 280.0, 0.0957, 295.0, 0.5}; //NOLINT : Magic numbers necessary! + auto result = _rs.performance.performance_map_cooling.Calculate_performance(target, _rs.performance.performance_map_cooling.lookup_variables.condenser_liquid_leaving_temperature_index); + // 59593.2,351600,411193,281.11,296.03,74400,23600,0,0 + EXPECT_NEAR(result, 296.03, 0.001); +} + +TEST_F(RS0001_fixture, Calculate_performance_cooling_3) +{ + auto result = _rs.performance.performance_map_cooling.Calculate_performance(0.0755, 280.0, 0.0957, 295.0, 0.5).condenser_liquid_leaving_temperature; + EXPECT_NEAR(result, 296.03, 0.001); } TEST_F(RS0005_fixture, Calculate_embedded_RS_performance) diff --git a/schema-205 b/schema-205 index 637ac6c..74afdda 160000 --- a/schema-205 +++ b/schema-205 @@ -1 +1 @@ -Subproject commit 637ac6c823326a1d0323c8be1f7ca3a448359f5e +Subproject commit 74afddaf4bfe572bc76f312a7d229a7391c1327e From 27f88b6fc24d64efb5ebed14019c238755543929 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Wed, 10 Nov 2021 11:10:07 -0700 Subject: [PATCH 097/154] Tests for element metadata. --- .github/workflows/build-and-test.yml | 2 +- libtk205/test/main_libtk205.cpp | 10 +++++++++- schema-205 | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 96868f0..f79b198 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -32,7 +32,7 @@ jobs: uses: actions/cache@v2 with: path: .venv - key: poetry-cache-v4-${{ matrix.os }}-py${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} + key: poetry-cache-v1-${{ matrix.os }}-py${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} - name: Install dependencies if cache does not exist run: poetry install if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' diff --git a/libtk205/test/main_libtk205.cpp b/libtk205/test/main_libtk205.cpp index ed8ed83..795a927 100644 --- a/libtk205/test/main_libtk205.cpp +++ b/libtk205/test/main_libtk205.cpp @@ -45,7 +45,7 @@ TEST_F(RS0001_fixture, Calculate_performance_cooling_2) TEST_F(RS0001_fixture, Calculate_performance_cooling_3) { - auto result = _rs.performance.performance_map_cooling.Calculate_performance(0.0755, 280.0, 0.0957, 295.0, 0.5).condenser_liquid_leaving_temperature; + auto result = _rs.performance.performance_map_cooling.Calculate_performance(0.0755, 280.0, 0.0957, 295.0, 1).condenser_liquid_leaving_temperature; EXPECT_NEAR(result, 296.03, 0.001); } @@ -69,6 +69,14 @@ TEST_F(RS0006_fixture, Verify_enum_description) EXPECT_THAT(result, "Drive is cooled using forced air convection within the surrounding environment"); } +TEST_F(RS0001_fixture, Verify_element_metadata) +{ + auto result = RS0001_NS::RatingAHRI550590PartLoadPoint::evaporator_liquid_volumetric_flow_rate_name; + EXPECT_THAT(result, "evaporator_liquid_volumetric_flow_rate"); + result = RS0001_NS::RatingAHRI550590PartLoadPoint::evaporator_liquid_volumetric_flow_rate_units; + EXPECT_THAT(result, "gpm"); +} + void Display_message(ASHRAE205_NS::msg_severity severity, const std::string &message, void *) { using namespace ASHRAE205_NS; diff --git a/schema-205 b/schema-205 index 74afdda..6f3c5be 160000 --- a/schema-205 +++ b/schema-205 @@ -1 +1 @@ -Subproject commit 74afddaf4bfe572bc76f312a7d229a7391c1327e +Subproject commit 6f3c5be4d201d0f567ea86b08a4713f8f03b5d28 From 238fb624b33830dac14dc3ee97add7645c4b43d6 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Mon, 15 Nov 2021 15:34:26 -0700 Subject: [PATCH 098/154] Remove ASHRAE205 as namespace; use top level tk205 instead. --- libtk205/include/error_handling_tk205.h | 2 +- libtk205/include/loadobject_205.h | 2 +- libtk205/include/typeinfo_205.h | 2 +- libtk205/src/error_handling_tk205.cpp | 2 +- libtk205/test/fixtures_libtk205.hpp | 16 ++++++++-------- libtk205/test/main_libtk205.cpp | 19 +++++++++---------- schema-205 | 2 +- 7 files changed, 22 insertions(+), 23 deletions(-) diff --git a/libtk205/include/error_handling_tk205.h b/libtk205/include/error_handling_tk205.h index 72d5b50..106c694 100644 --- a/libtk205/include/error_handling_tk205.h +++ b/libtk205/include/error_handling_tk205.h @@ -6,7 +6,7 @@ #include #include -namespace ASHRAE205_NS { +namespace tk205 { enum class msg_severity : unsigned int { DEBUG_205, diff --git a/libtk205/include/loadobject_205.h b/libtk205/include/loadobject_205.h index 71a3e04..c92fd16 100644 --- a/libtk205/include/loadobject_205.h +++ b/libtk205/include/loadobject_205.h @@ -4,7 +4,7 @@ #include #include -namespace ASHRAE205_NS { +namespace tk205 { template void A205_json_get(nlohmann::json j, const char *subnode, T& a205_object, bool& object_is_set, bool required = false) diff --git a/libtk205/include/typeinfo_205.h b/libtk205/include/typeinfo_205.h index 6f647d0..18cfcc3 100644 --- a/libtk205/include/typeinfo_205.h +++ b/libtk205/include/typeinfo_205.h @@ -3,7 +3,7 @@ #include -namespace ASHRAE205_NS { +namespace tk205 { struct enum_info { diff --git a/libtk205/src/error_handling_tk205.cpp b/libtk205/src/error_handling_tk205.cpp index 22ae7ba..279ebb6 100644 --- a/libtk205/src/error_handling_tk205.cpp +++ b/libtk205/src/error_handling_tk205.cpp @@ -3,7 +3,7 @@ #include #include -namespace ASHRAE205_NS { +namespace tk205 { msg_handler _error_handler; diff --git a/libtk205/test/fixtures_libtk205.hpp b/libtk205/test/fixtures_libtk205.hpp index 60d9046..fde4ff2 100644 --- a/libtk205/test/fixtures_libtk205.hpp +++ b/libtk205/test/fixtures_libtk205.hpp @@ -7,7 +7,7 @@ #include "gtest/gtest.h" #include "libtk205.h" -using namespace ASHRAE205_NS; +using namespace tk205; class RS_fixture : public testing::Test { @@ -22,7 +22,7 @@ class RS0001_fixture : public RS_fixture { _rs = Load_RS0001(TEST205_INPUT_EXAMPLES_DIR "/schema-205/examples/RS0001/Chiller-Constant-Efficiency.RS0001.a205.json"); } - ASHRAE205_NS::RS0001_NS::RS0001 _rs; + RS0001_NS::RS0001 _rs; }; class RS0002_fixture : public RS_fixture @@ -32,7 +32,7 @@ class RS0002_fixture : public RS_fixture { _rs = Load_RS0002(TEST205_INPUT_EXAMPLES_DIR "/schema-205/examples/RS0002/Unitary-Constant-Efficiency.RS0002.a205.json"); } - ASHRAE205_NS::RS0002_NS::RS0002 _rs; + RS0002_NS::RS0002 _rs; }; class RS0003_fixture : public RS_fixture @@ -42,7 +42,7 @@ class RS0003_fixture : public RS_fixture { _rs= Load_RS0003(TEST205_INPUT_EXAMPLES_DIR "/schema-205/examples/RS0003/Fan-Continuous.RS0003.a205.json"); } - ASHRAE205_NS::RS0003_NS::RS0003 _rs; + RS0003_NS::RS0003 _rs; }; class RS0004_fixture : public RS_fixture @@ -52,7 +52,7 @@ class RS0004_fixture : public RS_fixture { _rs= Load_RS0004(TEST205_INPUT_EXAMPLES_DIR "/schema-205/examples/RS0004/DX-Constant-Efficiency.RS0004.a205.json"); } - ASHRAE205_NS::RS0004_NS::RS0004 _rs; + RS0004_NS::RS0004 _rs; }; class RS0005_fixture : public RS_fixture @@ -62,7 +62,7 @@ class RS0005_fixture : public RS_fixture { _rs= Load_RS0005(TEST205_INPUT_EXAMPLES_DIR "/schema-205/examples/RS0005/Motor-Constant-Efficiency.RS0005.a205.json"); } - ASHRAE205_NS::RS0005_NS::RS0005 _rs; + RS0005_NS::RS0005 _rs; }; class RS0006_fixture : public RS_fixture @@ -72,7 +72,7 @@ class RS0006_fixture : public RS_fixture { _rs = Load_RS0006(TEST205_INPUT_EXAMPLES_DIR "/schema-205/examples/RS0006/Drive-Constant-Efficiency.RS0006.a205.json"); } - ASHRAE205_NS::RS0006_NS::RS0006 _rs; + RS0006_NS::RS0006 _rs; }; class RS0007_fixture : public RS_fixture @@ -82,7 +82,7 @@ class RS0007_fixture : public RS_fixture { _rs = Load_RS0007(TEST205_INPUT_EXAMPLES_DIR "/schema-205/examples/RS0007/Belt-Drive-Constant-Efficiency.RS0007.a205.json"); } - ASHRAE205_NS::RS0007_NS::RS0007 _rs; + RS0007_NS::RS0007 _rs; }; #endif // FIXTURE_LIBTK205_HPP_ diff --git a/libtk205/test/main_libtk205.cpp b/libtk205/test/main_libtk205.cpp index 795a927..b148dcd 100644 --- a/libtk205/test/main_libtk205.cpp +++ b/libtk205/test/main_libtk205.cpp @@ -8,7 +8,7 @@ #include "libtk205.h" #include -using namespace ASHRAE205_NS; +using namespace tk205; #if 0 TEST(RS_fixture, Validate_RSes) @@ -58,7 +58,7 @@ TEST_F(RS0005_fixture, Calculate_embedded_RS_performance) TEST_F(RS0003_fixture, Verify_grid_variable_index) { - auto pm = dynamic_cast(_rs.performance.performance_map.get()); + auto pm = dynamic_cast(_rs.performance.performance_map.get()); auto result = pm->grid_variables.static_pressure_difference_index; EXPECT_EQ(result, 1u); } @@ -77,9 +77,8 @@ TEST_F(RS0001_fixture, Verify_element_metadata) EXPECT_THAT(result, "gpm"); } -void Display_message(ASHRAE205_NS::msg_severity severity, const std::string &message, void *) +void Display_message(msg_severity severity, const std::string &message, void *) { - using namespace ASHRAE205_NS; static std::map severity_str { {msg_severity::DEBUG_205, "DEBUG"}, {msg_severity::INFO_205, "INFO"}, @@ -99,11 +98,11 @@ void Display_message(ASHRAE205_NS::msg_severity severity, const std::string &mes void Btwxt_message(const Btwxt::MsgLevel messageType, const std::string message, void *) { - static std::map severity { - {Btwxt::MsgLevel::MSG_DEBUG, ASHRAE205_NS::msg_severity::DEBUG_205}, - {Btwxt::MsgLevel::MSG_INFO, ASHRAE205_NS::msg_severity::INFO_205}, - {Btwxt::MsgLevel::MSG_WARN, ASHRAE205_NS::msg_severity::WARN_205}, - {Btwxt::MsgLevel::MSG_ERR, ASHRAE205_NS::msg_severity::ERR_205} + static std::map severity { + {Btwxt::MsgLevel::MSG_DEBUG, msg_severity::DEBUG_205}, + {Btwxt::MsgLevel::MSG_INFO, msg_severity::INFO_205}, + {Btwxt::MsgLevel::MSG_WARN, msg_severity::WARN_205}, + {Btwxt::MsgLevel::MSG_ERR, msg_severity::ERR_205} }; Display_message(severity[messageType], message, nullptr); } @@ -111,7 +110,7 @@ void Btwxt_message(const Btwxt::MsgLevel messageType, const std::string message, int main(int argc, char **argv) { ::testing::InitGoogleTest(&argc, argv); - ASHRAE205_NS::Set_error_handler(Display_message); + tk205::Set_error_handler(Display_message); Btwxt::setMessageCallback(Btwxt_message, nullptr); return RUN_ALL_TESTS(); } diff --git a/schema-205 b/schema-205 index 6f3c5be..47ced87 160000 --- a/schema-205 +++ b/schema-205 @@ -1 +1 @@ -Subproject commit 6f3c5be4d201d0f567ea86b08a4713f8f03b5d28 +Subproject commit 47ced873a83e27d082c27102c0eb7ff9430910b7 From 95d9df66dad1226f0fefe83864394eb8ffba273e Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Tue, 16 Nov 2021 07:45:05 -0700 Subject: [PATCH 099/154] Calculate_performance overload should use all double inputs. --- libtk205/test/main_libtk205.cpp | 2 +- schema-205 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libtk205/test/main_libtk205.cpp b/libtk205/test/main_libtk205.cpp index b148dcd..a787bcb 100644 --- a/libtk205/test/main_libtk205.cpp +++ b/libtk205/test/main_libtk205.cpp @@ -45,7 +45,7 @@ TEST_F(RS0001_fixture, Calculate_performance_cooling_2) TEST_F(RS0001_fixture, Calculate_performance_cooling_3) { - auto result = _rs.performance.performance_map_cooling.Calculate_performance(0.0755, 280.0, 0.0957, 295.0, 1).condenser_liquid_leaving_temperature; + auto result = _rs.performance.performance_map_cooling.Calculate_performance(0.0755, 280.0, 0.0957, 295.0, 0.5).condenser_liquid_leaving_temperature; EXPECT_NEAR(result, 296.03, 0.001); } diff --git a/schema-205 b/schema-205 index 47ced87..ea05553 160000 --- a/schema-205 +++ b/schema-205 @@ -1 +1 @@ -Subproject commit 47ced873a83e27d082c27102c0eb7ff9430910b7 +Subproject commit ea05553e410f7fa584554d7a13061ce722d2b30a From ba73d23ed3ca8a7271ad85559b4e18d155c390f4 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Wed, 8 Dec 2021 13:27:42 -0700 Subject: [PATCH 100/154] Add script to export libtk205 source to its own repo. --- .github/workflows/build-and-test.yml | 7 +- libtk205/CMakeLists.txt | 5 ++ libtk205/cmake/update_lib_repo.cmake | 101 +++++++++++++++++++++++++++ 3 files changed, 112 insertions(+), 1 deletion(-) create mode 100644 libtk205/cmake/update_lib_repo.cmake diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index f79b198..150d683 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -2,6 +2,8 @@ name: Build and Test on: push +env: + PATOKEN: ${{ secrets.CI_PA_TOKEN }} jobs: build: name: Build @@ -37,4 +39,7 @@ jobs: run: poetry install if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' - name: Build and test - run: poetry run doit \ No newline at end of file + run: poetry run doit + - name: Export libtk205 source + run: cmake "-DPA_TOKEN="${PATOKEN} -DPROJECT_SOURCE_DIR=${{github.workspace}}/libtk205" -P "${{github.workspace}}/libtk205/cmake/update_lib_repo.cmake" + diff --git a/libtk205/CMakeLists.txt b/libtk205/CMakeLists.txt index 32fba0c..b915179 100644 --- a/libtk205/CMakeLists.txt +++ b/libtk205/CMakeLists.txt @@ -44,6 +44,11 @@ set (SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/error_handling_tk205.cpp" add_library(libtk205 ${SOURCES}) +# add_custom_target(update_lib_repo ALL +# COMMAND ${CMAKE_COMMAND} "-DPROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR}" -P "${PROJECT_SOURCE_DIR}/cmake/update_lib_repo.cmake" +# VERBATIM) +# add_dependencies(update_lib_repo libtk205) + add_subdirectory(vendor) if (BUILD_TK205_TESTING) diff --git a/libtk205/cmake/update_lib_repo.cmake b/libtk205/cmake/update_lib_repo.cmake new file mode 100644 index 0000000..91558c7 --- /dev/null +++ b/libtk205/cmake/update_lib_repo.cmake @@ -0,0 +1,101 @@ +# repo_name is unique to the project +set(repo_name "libtk205") +set(upload_repo "github.com/open205/${repo_name}") +set(authenticated_repo "https://${PATOKEN}:x-oauth-basic@${upload_repo}") # PATOKEN is set by GitHub Actions + +message(STATUS ${authenticated_repo}) + +if(NOT EXISTS "${PROJECT_SOURCE_DIR}/ci") + file(MAKE_DIRECTORY "${PROJECT_SOURCE_DIR}/ci") +endif() +set(clone_dir "${PROJECT_SOURCE_DIR}/ci/${repo_name}") + +find_package(Git QUIET) + +if(GIT_FOUND) + if(NOT EXISTS "${clone_dir}") + execute_process(COMMAND ${GIT_EXECUTABLE} clone ${authenticated_repo} + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/ci + RESULT_VARIABLE GIT_SUBMOD_RESULT) + if(NOT GIT_SUBMOD_RESULT EQUAL "0") + message(FATAL_ERROR "${GIT_EXECUTABLE} clone ${authenticated_repo} failed with ${GIT_SUBMOD_RESULT}.") + endif() + endif() +else() + message(FATAL_ERROR "git not found!") +endif() + +# git branch name query +execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + OUTPUT_VARIABLE current_git_branch + OUTPUT_STRIP_TRAILING_WHITESPACE +) +message(STATUS "Current local branch is ${current_git_branch}.") + +execute_process(COMMAND ${GIT_EXECUTABLE} log -1 --pretty=%B + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + OUTPUT_VARIABLE last_commit_msg + OUTPUT_STRIP_TRAILING_WHITESPACE +) +message(STATUS "Last commit on local branch was ${last_commit_msg}") + +execute_process(COMMAND ${GIT_EXECUTABLE} ls-remote --heads --exit-code ${authenticated_repo} ${current_git_branch} + WORKING_DIRECTORY ${clone_dir} + RESULT_VARIABLE exit_code + OUTPUT_VARIABLE output_repo_branches +) +if(exit_code EQUAL "0") + message(STATUS "Branch ${current_git_branch} exists in upload remote.") + execute_process(COMMAND ${GIT_EXECUTABLE} checkout ${current_git_branch} + WORKING_DIRECTORY ${clone_dir} + ) +else() + message(STATUS "Branch ${current_git_branch} must be created in upload remote.") + execute_process(COMMAND ${GIT_EXECUTABLE} checkout -b ${current_git_branch} + WORKING_DIRECTORY ${clone_dir} + ) + execute_process(COMMAND ${GIT_EXECUTABLE} push -u origin ${current_git_branch} + WORKING_DIRECTORY ${clone_dir} + ) +endif() + +set(include_dest_dir "${clone_dir}/include/${clone_dir}") +set(src_dest_dir "${clone_dir}/src") + +file(MAKE_DIRECTORY "${include_dest_dir}") +file(MAKE_DIRECTORY "${src_dest_dir}") + +# Copy generated files +file(COPY "${PROJECT_SOURCE_DIR}/../schema-205/build/include/" + DESTINATION "${include_dest_dir}" + FILES_MATCHING PATTERN *.h) +file(COPY "${PROJECT_SOURCE_DIR}/include/" + DESTINATION "${include_dest_dir}" + FILES_MATCHING PATTERN *.h) +file(COPY "${PROJECT_SOURCE_DIR}/../schema-205/schema205/src/" + DESTINATION "${include_dest_dir}" + FILES_MATCHING PATTERN *.h) + +file(COPY "${PROJECT_SOURCE_DIR}/../schema-205/build/cpp/" + DESTINATION "${src_dest_dir}" + FILES_MATCHING PATTERN *.cpp) +file(COPY "${PROJECT_SOURCE_DIR}/src/" + DESTINATION "${src_dest_dir}" + FILES_MATCHING PATTERN *.cpp) + +file(COPY "${PROJECT_SOURCE_DIR}/test" + DESTINATION "${clone_dir}") + +# git add +execute_process(COMMAND ${GIT_EXECUTABLE} add include src test + WORKING_DIRECTORY ${clone_dir} +) +# git commit +execute_process(COMMAND ${GIT_EXECUTABLE} commit -m"${last_commit_msg}" + WORKING_DIRECTORY ${clone_dir} +) +# git push +execute_process(COMMAND ${GIT_EXECUTABLE} push + WORKING_DIRECTORY ${clone_dir} +) From 0517a6aacec43cefb4fedaad6f6b13198f21acda Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Wed, 8 Dec 2021 13:33:15 -0700 Subject: [PATCH 101/154] Fix extraneous quote. --- .github/workflows/build-and-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 150d683..20396e8 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -41,5 +41,5 @@ jobs: - name: Build and test run: poetry run doit - name: Export libtk205 source - run: cmake "-DPA_TOKEN="${PATOKEN} -DPROJECT_SOURCE_DIR=${{github.workspace}}/libtk205" -P "${{github.workspace}}/libtk205/cmake/update_lib_repo.cmake" + run: cmake "-DPA_TOKEN=${PATOKEN} -DPROJECT_SOURCE_DIR=${{github.workspace}}/libtk205" -P "${{github.workspace}}/libtk205/cmake/update_lib_repo.cmake" From b7ad2bfdf0705f5f8bdd1c64a5a3c4922ad7f90b Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Wed, 8 Dec 2021 13:42:39 -0700 Subject: [PATCH 102/154] Fix typos in token variables. --- .github/workflows/build-and-test.yml | 4 +--- libtk205/cmake/update_lib_repo.cmake | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 20396e8..5ac6dcc 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -2,8 +2,6 @@ name: Build and Test on: push -env: - PATOKEN: ${{ secrets.CI_PA_TOKEN }} jobs: build: name: Build @@ -41,5 +39,5 @@ jobs: - name: Build and test run: poetry run doit - name: Export libtk205 source - run: cmake "-DPA_TOKEN=${PATOKEN} -DPROJECT_SOURCE_DIR=${{github.workspace}}/libtk205" -P "${{github.workspace}}/libtk205/cmake/update_lib_repo.cmake" + run: cmake "-DPA_TOKEN=${{secrets.CI_PA_TOKEN}} -DPROJECT_SOURCE_DIR=${{github.workspace}}/libtk205" -P "${{github.workspace}}/libtk205/cmake/update_lib_repo.cmake" diff --git a/libtk205/cmake/update_lib_repo.cmake b/libtk205/cmake/update_lib_repo.cmake index 91558c7..97bc769 100644 --- a/libtk205/cmake/update_lib_repo.cmake +++ b/libtk205/cmake/update_lib_repo.cmake @@ -1,7 +1,7 @@ # repo_name is unique to the project set(repo_name "libtk205") set(upload_repo "github.com/open205/${repo_name}") -set(authenticated_repo "https://${PATOKEN}:x-oauth-basic@${upload_repo}") # PATOKEN is set by GitHub Actions +set(authenticated_repo "https://${PA_TOKEN}:x-oauth-basic@${upload_repo}") # PA_TOKEN is set by GitHub Actions message(STATUS ${authenticated_repo}) From 99fa1badd99fabcaddd15cf86fef14a686eeefd5 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Wed, 8 Dec 2021 13:49:05 -0700 Subject: [PATCH 103/154] Adjust quotes on cmake call. --- .github/workflows/build-and-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 5ac6dcc..ce77cae 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -39,5 +39,5 @@ jobs: - name: Build and test run: poetry run doit - name: Export libtk205 source - run: cmake "-DPA_TOKEN=${{secrets.CI_PA_TOKEN}} -DPROJECT_SOURCE_DIR=${{github.workspace}}/libtk205" -P "${{github.workspace}}/libtk205/cmake/update_lib_repo.cmake" + run: cmake -DPA_TOKEN="${{secrets.CI_PA_TOKEN}}" -DPROJECT_SOURCE_DIR="${{github.workspace}}/libtk205" -P "${{github.workspace}}/libtk205/cmake/update_lib_repo.cmake" From d62a5c9940fa455cfc131118ea15b4152fe23d12 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Wed, 8 Dec 2021 14:36:27 -0700 Subject: [PATCH 104/154] Add user and email. --- libtk205/cmake/update_lib_repo.cmake | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libtk205/cmake/update_lib_repo.cmake b/libtk205/cmake/update_lib_repo.cmake index 97bc769..e899d27 100644 --- a/libtk205/cmake/update_lib_repo.cmake +++ b/libtk205/cmake/update_lib_repo.cmake @@ -87,6 +87,13 @@ file(COPY "${PROJECT_SOURCE_DIR}/src/" file(COPY "${PROJECT_SOURCE_DIR}/test" DESTINATION "${clone_dir}") +# git config +execute_process(COMMAND ${GIT_EXECUTABLE} config user.name "Actions CI" + WORKING_DIRECTORY ${clone_dir} +) +execute_process(COMMAND ${GIT_EXECUTABLE} config user.email "ci.bigladdersoftware.com" + WORKING_DIRECTORY ${clone_dir} +) # git add execute_process(COMMAND ${GIT_EXECUTABLE} add include src test WORKING_DIRECTORY ${clone_dir} From 1031b29af9117e36258a92154caee4fd4e6c49a9 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Mon, 13 Dec 2021 08:48:03 -0700 Subject: [PATCH 105/154] Fix include directory name. --- libtk205/cmake/update_lib_repo.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libtk205/cmake/update_lib_repo.cmake b/libtk205/cmake/update_lib_repo.cmake index e899d27..b7a22f4 100644 --- a/libtk205/cmake/update_lib_repo.cmake +++ b/libtk205/cmake/update_lib_repo.cmake @@ -60,7 +60,7 @@ else() ) endif() -set(include_dest_dir "${clone_dir}/include/${clone_dir}") +set(include_dest_dir "${clone_dir}/include/${repo_name}") set(src_dest_dir "${clone_dir}/src") file(MAKE_DIRECTORY "${include_dest_dir}") From aa2d5269bba9f017bc16b1bb565e771d64e9bcf9 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Tue, 14 Dec 2021 10:05:52 -0700 Subject: [PATCH 106/154] Remove unused factory class files. --- libtk205/cmake/update_lib_repo.cmake | 2 +- libtk205/src/rs_instance_factory.cpp | 32 ---------------------------- schema-205 | 2 +- 3 files changed, 2 insertions(+), 34 deletions(-) delete mode 100755 libtk205/src/rs_instance_factory.cpp diff --git a/libtk205/cmake/update_lib_repo.cmake b/libtk205/cmake/update_lib_repo.cmake index b7a22f4..7878d65 100644 --- a/libtk205/cmake/update_lib_repo.cmake +++ b/libtk205/cmake/update_lib_repo.cmake @@ -38,7 +38,7 @@ execute_process(COMMAND ${GIT_EXECUTABLE} log -1 --pretty=%B OUTPUT_VARIABLE last_commit_msg OUTPUT_STRIP_TRAILING_WHITESPACE ) -message(STATUS "Last commit on local branch was ${last_commit_msg}") +message(STATUS "Last commit message on local branch was "${last_commit_msg}"") execute_process(COMMAND ${GIT_EXECUTABLE} ls-remote --heads --exit-code ${authenticated_repo} ${current_git_branch} WORKING_DIRECTORY ${clone_dir} diff --git a/libtk205/src/rs_instance_factory.cpp b/libtk205/src/rs_instance_factory.cpp deleted file mode 100755 index 99113b1..0000000 --- a/libtk205/src/rs_instance_factory.cpp +++ /dev/null @@ -1,32 +0,0 @@ -#include "rs_instance_factory.h" -#include - -namespace -{ - using rs_factory_map = std::map >; - - rs_factory_map& Get_rs_factory_map() - { - static rs_factory_map factory_map; - return factory_map; - } -} - -namespace ASHRAE205_NS { - //static - bool rs_instance_factory::Register_factory(std::string const& RS_ID, - std::unique_ptr factory) - { - Get_rs_factory_map()[RS_ID] = std::move(factory); - return true; - } - - //static - std::unique_ptr rs_instance_factory::Create(std::string const& RS_ID) - { - const auto &factory = Get_rs_factory_map()[RS_ID]; - std::unique_ptr inst = (factory == nullptr) ? nullptr : factory->Create_instance(); - // Return smart pointers by value to take advantage of RVO or move semantics: - return inst; - } -} \ No newline at end of file diff --git a/schema-205 b/schema-205 index ea05553..0847b53 160000 --- a/schema-205 +++ b/schema-205 @@ -1 +1 @@ -Subproject commit ea05553e410f7fa584554d7a13061ce722d2b30a +Subproject commit 0847b5316d00693df4c95d6e0e60ea69b890eb2c From 8b3034b127ca10d549d6b204eca9f42f36fa3c71 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Mon, 27 Dec 2021 11:54:38 -0700 Subject: [PATCH 107/154] Update location of testing examples. --- CMakeLists.txt | 2 +- libtk205/cmake/update_lib_repo.cmake | 3 +++ libtk205/test/fixtures_libtk205.hpp | 14 +++++++------- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 33e92ca..86ad303 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,7 +21,7 @@ option( BUILD_TK205_TESTING "Build libtk205 testing targets" ON ) # Set up testing/coverage if (BUILD_TK205_TESTING) - set(TEST205_INPUT_EXAMPLES_DIR ${PROJECT_SOURCE_DIR}) # TODO Upgrade to configure_file method? + set(TEST205_INPUT_EXAMPLES_DIR "${PROJECT_SOURCE_DIR}/schema-205") enable_testing() endif() diff --git a/libtk205/cmake/update_lib_repo.cmake b/libtk205/cmake/update_lib_repo.cmake index 7878d65..047f885 100644 --- a/libtk205/cmake/update_lib_repo.cmake +++ b/libtk205/cmake/update_lib_repo.cmake @@ -87,6 +87,9 @@ file(COPY "${PROJECT_SOURCE_DIR}/src/" file(COPY "${PROJECT_SOURCE_DIR}/test" DESTINATION "${clone_dir}") +file(COPY "${PROJECT_SOURCE_DIR}/../schema-205/examples" + DESTINATION "${clone_dir}") + # git config execute_process(COMMAND ${GIT_EXECUTABLE} config user.name "Actions CI" WORKING_DIRECTORY ${clone_dir} diff --git a/libtk205/test/fixtures_libtk205.hpp b/libtk205/test/fixtures_libtk205.hpp index fde4ff2..1599866 100644 --- a/libtk205/test/fixtures_libtk205.hpp +++ b/libtk205/test/fixtures_libtk205.hpp @@ -20,7 +20,7 @@ class RS0001_fixture : public RS_fixture protected: RS0001_fixture() : RS_fixture() { - _rs = Load_RS0001(TEST205_INPUT_EXAMPLES_DIR "/schema-205/examples/RS0001/Chiller-Constant-Efficiency.RS0001.a205.json"); + _rs = Load_RS0001(TEST205_INPUT_EXAMPLES_DIR "/examples/RS0001/Chiller-Constant-Efficiency.RS0001.a205.json"); } RS0001_NS::RS0001 _rs; }; @@ -30,7 +30,7 @@ class RS0002_fixture : public RS_fixture protected: RS0002_fixture() : RS_fixture() { - _rs = Load_RS0002(TEST205_INPUT_EXAMPLES_DIR "/schema-205/examples/RS0002/Unitary-Constant-Efficiency.RS0002.a205.json"); + _rs = Load_RS0002(TEST205_INPUT_EXAMPLES_DIR "/examples/RS0002/Unitary-Constant-Efficiency.RS0002.a205.json"); } RS0002_NS::RS0002 _rs; }; @@ -40,7 +40,7 @@ class RS0003_fixture : public RS_fixture protected: RS0003_fixture() : RS_fixture() { - _rs= Load_RS0003(TEST205_INPUT_EXAMPLES_DIR "/schema-205/examples/RS0003/Fan-Continuous.RS0003.a205.json"); + _rs= Load_RS0003(TEST205_INPUT_EXAMPLES_DIR "/examples/RS0003/Fan-Continuous.RS0003.a205.json"); } RS0003_NS::RS0003 _rs; }; @@ -50,7 +50,7 @@ class RS0004_fixture : public RS_fixture protected: RS0004_fixture() : RS_fixture() { - _rs= Load_RS0004(TEST205_INPUT_EXAMPLES_DIR "/schema-205/examples/RS0004/DX-Constant-Efficiency.RS0004.a205.json"); + _rs= Load_RS0004(TEST205_INPUT_EXAMPLES_DIR "/examples/RS0004/DX-Constant-Efficiency.RS0004.a205.json"); } RS0004_NS::RS0004 _rs; }; @@ -60,7 +60,7 @@ class RS0005_fixture : public RS_fixture protected: RS0005_fixture() : RS_fixture() { - _rs= Load_RS0005(TEST205_INPUT_EXAMPLES_DIR "/schema-205/examples/RS0005/Motor-Constant-Efficiency.RS0005.a205.json"); + _rs= Load_RS0005(TEST205_INPUT_EXAMPLES_DIR "/examples/RS0005/Motor-Constant-Efficiency.RS0005.a205.json"); } RS0005_NS::RS0005 _rs; }; @@ -70,7 +70,7 @@ class RS0006_fixture : public RS_fixture protected: RS0006_fixture() : RS_fixture() { - _rs = Load_RS0006(TEST205_INPUT_EXAMPLES_DIR "/schema-205/examples/RS0006/Drive-Constant-Efficiency.RS0006.a205.json"); + _rs = Load_RS0006(TEST205_INPUT_EXAMPLES_DIR "/examples/RS0006/Drive-Constant-Efficiency.RS0006.a205.json"); } RS0006_NS::RS0006 _rs; }; @@ -80,7 +80,7 @@ class RS0007_fixture : public RS_fixture protected: RS0007_fixture() : RS_fixture() { - _rs = Load_RS0007(TEST205_INPUT_EXAMPLES_DIR "/schema-205/examples/RS0007/Belt-Drive-Constant-Efficiency.RS0007.a205.json"); + _rs = Load_RS0007(TEST205_INPUT_EXAMPLES_DIR "/examples/RS0007/Belt-Drive-Constant-Efficiency.RS0007.a205.json"); } RS0007_NS::RS0007 _rs; }; From 81b2862f394f466c1127bafbc7fae95243725518 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Mon, 27 Dec 2021 12:19:21 -0700 Subject: [PATCH 108/154] Add examples dir to export commit. --- libtk205/cmake/update_lib_repo.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libtk205/cmake/update_lib_repo.cmake b/libtk205/cmake/update_lib_repo.cmake index 047f885..3c1a6bb 100644 --- a/libtk205/cmake/update_lib_repo.cmake +++ b/libtk205/cmake/update_lib_repo.cmake @@ -98,7 +98,7 @@ execute_process(COMMAND ${GIT_EXECUTABLE} config user.email "ci.bigladdersoftwar WORKING_DIRECTORY ${clone_dir} ) # git add -execute_process(COMMAND ${GIT_EXECUTABLE} add include src test +execute_process(COMMAND ${GIT_EXECUTABLE} add include src test examples WORKING_DIRECTORY ${clone_dir} ) # git commit From a82d9862c47e69f8ae20bd80b1ff8784c9bdf608 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Mon, 27 Dec 2021 14:51:47 -0700 Subject: [PATCH 109/154] Bugfix for differently ordered generated functions on different platforms. --- libtk205/cmake/update_lib_repo.cmake | 2 +- schema-205 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libtk205/cmake/update_lib_repo.cmake b/libtk205/cmake/update_lib_repo.cmake index 3c1a6bb..3267fa5 100644 --- a/libtk205/cmake/update_lib_repo.cmake +++ b/libtk205/cmake/update_lib_repo.cmake @@ -38,7 +38,7 @@ execute_process(COMMAND ${GIT_EXECUTABLE} log -1 --pretty=%B OUTPUT_VARIABLE last_commit_msg OUTPUT_STRIP_TRAILING_WHITESPACE ) -message(STATUS "Last commit message on local branch was "${last_commit_msg}"") +message(STATUS "Last commit message on local branch was \"${last_commit_msg}\"") execute_process(COMMAND ${GIT_EXECUTABLE} ls-remote --heads --exit-code ${authenticated_repo} ${current_git_branch} WORKING_DIRECTORY ${clone_dir} diff --git a/schema-205 b/schema-205 index 0847b53..df133a2 160000 --- a/schema-205 +++ b/schema-205 @@ -1 +1 @@ -Subproject commit 0847b5316d00693df4c95d6e0e60ea69b890eb2c +Subproject commit df133a2b3c98dd236a2dc32a74358c41ee9386c9 From 29b61b2d207d7d7139c44f9309c8af650a9d2616 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Wed, 13 Apr 2022 10:58:38 -0600 Subject: [PATCH 110/154] Mild cleanup. --- schema-205 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema-205 b/schema-205 index df133a2..55c1c57 160000 --- a/schema-205 +++ b/schema-205 @@ -1 +1 @@ -Subproject commit df133a2b3c98dd236a2dc32a74358c41ee9386c9 +Subproject commit 55c1c571f69b550ccc80100a8ee8458f54aa79b1 From e4cc8ff43c27520c0ef7efc7952a4ee305767306 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Mon, 23 May 2022 17:02:58 -0600 Subject: [PATCH 111/154] Update test code to use factories. --- libtk205/CMakeLists.txt | 20 ++++++++----- libtk205/test/CMakeLists.txt | 5 +++- libtk205/test/fixtures_libtk205.hpp | 44 +++++++++++++++++++---------- libtk205/test/main_libtk205.cpp | 24 ++++++++++------ schema-205 | 2 +- 5 files changed, 62 insertions(+), 33 deletions(-) diff --git a/libtk205/CMakeLists.txt b/libtk205/CMakeLists.txt index b915179..736c888 100644 --- a/libtk205/CMakeLists.txt +++ b/libtk205/CMakeLists.txt @@ -10,9 +10,9 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/vendor/btwxt/src) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/vendor/json/single_include) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/vendor/json/include) # Two "deeper" include directories necessary bc Valijson doesn't scope includes the same as everyone else -include_directories(${CMAKE_CURRENT_SOURCE_DIR}/vendor/json/single_include/nlohmann) -include_directories(${CMAKE_CURRENT_SOURCE_DIR}/vendor/json/include/nlohmann) -include_directories(${CMAKE_CURRENT_SOURCE_DIR}/vendor/valijson/include) +#include_directories(${CMAKE_CURRENT_SOURCE_DIR}/vendor/json/single_include/nlohmann) +#include_directories(${CMAKE_CURRENT_SOURCE_DIR}/vendor/json/include/nlohmann) +#include_directories(${CMAKE_CURRENT_SOURCE_DIR}/vendor/valijson/include) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../schema-205/build/include) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../schema-205/schema205/src) @@ -23,12 +23,16 @@ foreach(schema IN LISTS RS_schemas) string(REGEX REPLACE "${PROJECT_SOURCE_DIR}/../schema-205/schema-source/(.*).schema.yaml" "\\1" schema_name "${schema}") list(APPEND RS_headers "${PROJECT_SOURCE_DIR}/../schema-205/build/include/${schema_name}.h") list(APPEND RS_src "${PROJECT_SOURCE_DIR}/../schema-205/build/cpp/${schema_name}.cpp") + if (schema_name MATCHES "RS.*") + list(APPEND factory_headers "${PROJECT_SOURCE_DIR}/../schema-205/build/include/${schema_name}_factory.h") + list(APPEND factory_src "${PROJECT_SOURCE_DIR}/../schema-205/build/cpp/${schema_name}_factory.cpp") + endif() endforeach() -list(APPEND lib_headers "${PROJECT_SOURCE_DIR}/../schema-205/build/include/libtk205.h" - "${CMAKE_CURRENT_SOURCE_DIR}/include/typeinfo_205.h" - "${CMAKE_CURRENT_SOURCE_DIR}/include/loadobject_205.h") -list(APPEND lib_src "${PROJECT_SOURCE_DIR}/../schema-205/build/cpp/libtk205.cpp") +list(APPEND lib_headers "${CMAKE_CURRENT_SOURCE_DIR}/include/typeinfo_205.h" + "${CMAKE_CURRENT_SOURCE_DIR}/include/loadobject_205.h" + "${CMAKE_CURRENT_SOURCE_DIR}/include/error_handling_tk205.h") +#list(APPEND lib_src "${PROJECT_SOURCE_DIR}/../schema-205/build/cpp/libtk205.cpp") add_custom_command(OUTPUT ${RS_headers} ${RS_src} ${lib_headers} ${lib_src} COMMAND poetry run doit cpp @@ -39,6 +43,8 @@ add_custom_command(OUTPUT ${RS_headers} ${RS_src} ${lib_headers} ${lib_src} set (SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/error_handling_tk205.cpp" "${RS_headers}" "${RS_src}" + "${factory_headers}" + "${factory_src}" "${lib_headers}" "${lib_src}") diff --git a/libtk205/test/CMakeLists.txt b/libtk205/test/CMakeLists.txt index b43351b..aa3fd3d 100644 --- a/libtk205/test/CMakeLists.txt +++ b/libtk205/test/CMakeLists.txt @@ -5,12 +5,15 @@ include_directories(${PROJECT_SOURCE_DIR}/vendor/json/include) include_directories(${PROJECT_SOURCE_DIR}/include) include_directories(${PROJECT_SOURCE_DIR}/../schema-205/build/include) +include_directories(${PROJECT_SOURCE_DIR}/../schema-205/schema205/src) # rs_instance_factory/base include_directories(${gtest_SOURCE_DIR}/include) include(GoogleTest) set (SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/fixtures_libtk205.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/main_libtk205.cpp) + ${CMAKE_CURRENT_SOURCE_DIR}/main_libtk205.cpp + ${PROJECT_SOURCE_DIR}/../schema-205/schema205/src/rs_instance_factory.h + ${PROJECT_SOURCE_DIR}/../schema-205/schema205/src/rs_instance_factory.cpp) #Does the following command do anything? set_source_files_properties(${SOURCES} PROPERTIES GENERATED TRUE) diff --git a/libtk205/test/fixtures_libtk205.hpp b/libtk205/test/fixtures_libtk205.hpp index 1599866..6923d6d 100644 --- a/libtk205/test/fixtures_libtk205.hpp +++ b/libtk205/test/fixtures_libtk205.hpp @@ -5,7 +5,20 @@ #define FIXTURE_LIBTK205_HPP_ #include "gtest/gtest.h" -#include "libtk205.h" +#include "RS0001.h" +#include "RS0002.h" +#include "RS0003.h" +#include "RS0004.h" +#include "RS0005.h" +#include "RS0006.h" +#include "RS0007.h" +#include "RS0001_factory.h" +#include "RS0002_factory.h" +#include "RS0003_factory.h" +#include "RS0004_factory.h" +#include "RS0005_factory.h" +#include "RS0006_factory.h" +#include "RS0007_factory.h" using namespace tk205; @@ -13,6 +26,7 @@ class RS_fixture : public testing::Test { protected: RS_fixture() {} + std::unique_ptr _rs; }; class RS0001_fixture : public RS_fixture @@ -20,9 +34,9 @@ class RS0001_fixture : public RS_fixture protected: RS0001_fixture() : RS_fixture() { - _rs = Load_RS0001(TEST205_INPUT_EXAMPLES_DIR "/examples/RS0001/Chiller-Constant-Efficiency.RS0001.a205.json"); + rs_instance_factory::Register_factory("RS0001", std::make_shared()); + _rs = rs_instance_factory::Create("RS0001", TEST205_INPUT_EXAMPLES_DIR "/examples/RS0001/Chiller-Constant-Efficiency.RS0001.a205.json"); } - RS0001_NS::RS0001 _rs; }; class RS0002_fixture : public RS_fixture @@ -30,9 +44,9 @@ class RS0002_fixture : public RS_fixture protected: RS0002_fixture() : RS_fixture() { - _rs = Load_RS0002(TEST205_INPUT_EXAMPLES_DIR "/examples/RS0002/Unitary-Constant-Efficiency.RS0002.a205.json"); + rs_instance_factory::Register_factory("RS0002", std::make_shared()); + _rs = rs_instance_factory::Create("RS0002", TEST205_INPUT_EXAMPLES_DIR "/examples/RS0002/Unitary-Constant-Efficiency.RS0002.a205.json"); } - RS0002_NS::RS0002 _rs; }; class RS0003_fixture : public RS_fixture @@ -40,9 +54,9 @@ class RS0003_fixture : public RS_fixture protected: RS0003_fixture() : RS_fixture() { - _rs= Load_RS0003(TEST205_INPUT_EXAMPLES_DIR "/examples/RS0003/Fan-Continuous.RS0003.a205.json"); + rs_instance_factory::Register_factory("RS0003", std::make_shared()); + _rs= rs_instance_factory::Create("RS0003", TEST205_INPUT_EXAMPLES_DIR "/examples/RS0003/Fan-Continuous.RS0003.a205.json"); } - RS0003_NS::RS0003 _rs; }; class RS0004_fixture : public RS_fixture @@ -50,9 +64,9 @@ class RS0004_fixture : public RS_fixture protected: RS0004_fixture() : RS_fixture() { - _rs= Load_RS0004(TEST205_INPUT_EXAMPLES_DIR "/examples/RS0004/DX-Constant-Efficiency.RS0004.a205.json"); + rs_instance_factory::Register_factory("RS0004", std::make_shared()); + _rs= rs_instance_factory::Create("RS0004", TEST205_INPUT_EXAMPLES_DIR "/examples/RS0004/DX-Constant-Efficiency.RS0004.a205.json"); } - RS0004_NS::RS0004 _rs; }; class RS0005_fixture : public RS_fixture @@ -60,9 +74,9 @@ class RS0005_fixture : public RS_fixture protected: RS0005_fixture() : RS_fixture() { - _rs= Load_RS0005(TEST205_INPUT_EXAMPLES_DIR "/examples/RS0005/Motor-Constant-Efficiency.RS0005.a205.json"); + rs_instance_factory::Register_factory("RS0005", std::make_shared()); + _rs= rs_instance_factory::Create("RS0005", TEST205_INPUT_EXAMPLES_DIR "/examples/RS0005/Motor-Constant-Efficiency.RS0005.a205.json"); } - RS0005_NS::RS0005 _rs; }; class RS0006_fixture : public RS_fixture @@ -70,9 +84,9 @@ class RS0006_fixture : public RS_fixture protected: RS0006_fixture() : RS_fixture() { - _rs = Load_RS0006(TEST205_INPUT_EXAMPLES_DIR "/examples/RS0006/Drive-Constant-Efficiency.RS0006.a205.json"); + rs_instance_factory::Register_factory("RS0006", std::make_shared()); + _rs = rs_instance_factory::Create("RS0006", TEST205_INPUT_EXAMPLES_DIR "/examples/RS0006/Drive-Constant-Efficiency.RS0006.a205.json"); } - RS0006_NS::RS0006 _rs; }; class RS0007_fixture : public RS_fixture @@ -80,9 +94,9 @@ class RS0007_fixture : public RS_fixture protected: RS0007_fixture() : RS_fixture() { - _rs = Load_RS0007(TEST205_INPUT_EXAMPLES_DIR "/examples/RS0007/Belt-Drive-Constant-Efficiency.RS0007.a205.json"); + rs_instance_factory::Register_factory("RS0007", std::make_shared()); + _rs = rs_instance_factory::Create("RS0007", TEST205_INPUT_EXAMPLES_DIR "/examples/RS0007/Belt-Drive-Constant-Efficiency.RS0007.a205.json"); } - RS0007_NS::RS0007 _rs; }; #endif // FIXTURE_LIBTK205_HPP_ diff --git a/libtk205/test/main_libtk205.cpp b/libtk205/test/main_libtk205.cpp index a787bcb..fa0fa69 100644 --- a/libtk205/test/main_libtk205.cpp +++ b/libtk205/test/main_libtk205.cpp @@ -5,10 +5,10 @@ #include "gmock/gmock.h" #include "fixtures_libtk205.hpp" -#include "libtk205.h" +//#include "libtk205.h" #include -using namespace tk205; +//using namespace tk205; #if 0 TEST(RS_fixture, Validate_RSes) @@ -24,41 +24,47 @@ TEST(RS_fixture, Validate_RSes) TEST_F(RS0001_fixture, Check_is_set) { - EXPECT_FALSE(_rs.metadata.data_source_is_set); - EXPECT_TRUE(_rs.metadata.description_is_set); + auto rs = dynamic_cast(_rs.get()); + EXPECT_FALSE(rs->metadata.data_source_is_set); + EXPECT_TRUE(rs->metadata.description_is_set); } TEST_F(RS0001_fixture, Calculate_performance_cooling) { + auto rs = dynamic_cast(_rs.get()); std::vector target {0.0755, 280.0, 0.0957, 295.0, 0.5}; //NOLINT : Magic numbers necessary! - auto result = _rs.performance.performance_map_cooling.Calculate_performance(target); + auto result = rs->performance.performance_map_cooling.Calculate_performance(target); EXPECT_EQ(result.size(), 9u); } TEST_F(RS0001_fixture, Calculate_performance_cooling_2) { + auto rs = dynamic_cast(_rs.get()); std::vector target {0.0755, 280.0, 0.0957, 295.0, 0.5}; //NOLINT : Magic numbers necessary! - auto result = _rs.performance.performance_map_cooling.Calculate_performance(target, _rs.performance.performance_map_cooling.lookup_variables.condenser_liquid_leaving_temperature_index); + auto result = rs->performance.performance_map_cooling.Calculate_performance(target, rs->performance.performance_map_cooling.lookup_variables.condenser_liquid_leaving_temperature_index); // 59593.2,351600,411193,281.11,296.03,74400,23600,0,0 EXPECT_NEAR(result, 296.03, 0.001); } TEST_F(RS0001_fixture, Calculate_performance_cooling_3) { - auto result = _rs.performance.performance_map_cooling.Calculate_performance(0.0755, 280.0, 0.0957, 295.0, 0.5).condenser_liquid_leaving_temperature; + auto rs = dynamic_cast(_rs.get()); + auto result = rs->performance.performance_map_cooling.Calculate_performance(0.0755, 280.0, 0.0957, 295.0, 0.5).condenser_liquid_leaving_temperature; EXPECT_NEAR(result, 296.03, 0.001); } TEST_F(RS0005_fixture, Calculate_embedded_RS_performance) { + auto rs = dynamic_cast(_rs.get()); std::vector target {5550.0, 10.0}; //NOLINT - auto result = _rs.performance.drive_representation.performance.performance_map.Calculate_performance(target); + auto result = rs->performance.drive_representation.performance.performance_map.Calculate_performance(target); EXPECT_THAT(result, testing::ElementsAre(testing::DoubleEq(0.985))); } TEST_F(RS0003_fixture, Verify_grid_variable_index) { - auto pm = dynamic_cast(_rs.performance.performance_map.get()); + auto rs = dynamic_cast(_rs.get()); + auto pm = dynamic_cast(rs->performance.performance_map.get()); auto result = pm->grid_variables.static_pressure_difference_index; EXPECT_EQ(result, 1u); } diff --git a/schema-205 b/schema-205 index 55c1c57..6ca7598 160000 --- a/schema-205 +++ b/schema-205 @@ -1 +1 @@ -Subproject commit 55c1c571f69b550ccc80100a8ee8458f54aa79b1 +Subproject commit 6ca7598e5259641be6b0e7e22f98af1d2d447f1c From 1161fb04bc99e6f9b3f059fe18c55934a66c9482 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Wed, 25 May 2022 10:32:58 -0600 Subject: [PATCH 112/154] Update function linkage. --- schema-205 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema-205 b/schema-205 index 6ca7598..4aed1a9 160000 --- a/schema-205 +++ b/schema-205 @@ -1 +1 @@ -Subproject commit 6ca7598e5259641be6b0e7e22f98af1d2d447f1c +Subproject commit 4aed1a9fbe40596af22087d16323432ace4e86af From 856d593eb3dcff98b55cd6449a53219170ed239f Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Wed, 25 May 2022 11:06:27 -0600 Subject: [PATCH 113/154] Add directive to copy the (currently) lone cpp file from schema205/src. --- libtk205/cmake/update_lib_repo.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libtk205/cmake/update_lib_repo.cmake b/libtk205/cmake/update_lib_repo.cmake index 3267fa5..860981f 100644 --- a/libtk205/cmake/update_lib_repo.cmake +++ b/libtk205/cmake/update_lib_repo.cmake @@ -83,6 +83,9 @@ file(COPY "${PROJECT_SOURCE_DIR}/../schema-205/build/cpp/" file(COPY "${PROJECT_SOURCE_DIR}/src/" DESTINATION "${src_dest_dir}" FILES_MATCHING PATTERN *.cpp) +file(COPY "${PROJECT_SOURCE_DIR}/../schema-205/schema205/src/" + DESTINATION "${src_dest_dir}" + FILES_MATCHING PATTERN *.cpp) file(COPY "${PROJECT_SOURCE_DIR}/test" DESTINATION "${clone_dir}") From 964ccc0ef9a83028e565bcb64a0afdae0e743bbc Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Wed, 25 May 2022 11:16:29 -0600 Subject: [PATCH 114/154] Rev cache name. --- .github/workflows/build-and-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index ce77cae..e50a51e 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -32,7 +32,7 @@ jobs: uses: actions/cache@v2 with: path: .venv - key: poetry-cache-v1-${{ matrix.os }}-py${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} + key: poetry-cache-v2-${{ matrix.os }}-py${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} - name: Install dependencies if cache does not exist run: poetry install if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' From e5fc3ed00ad63dcc444a273080bb017573dd04cb Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Wed, 25 May 2022 13:12:10 -0600 Subject: [PATCH 115/154] Divorce test directory from export repo's test directory. --- libtk205/cmake/update_lib_repo.cmake | 7 +++++-- libtk205/test/fixtures_libtk205.hpp | 3 +++ libtk205/test/main_libtk205.cpp | 1 - 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/libtk205/cmake/update_lib_repo.cmake b/libtk205/cmake/update_lib_repo.cmake index 860981f..0fd681b 100644 --- a/libtk205/cmake/update_lib_repo.cmake +++ b/libtk205/cmake/update_lib_repo.cmake @@ -87,8 +87,11 @@ file(COPY "${PROJECT_SOURCE_DIR}/../schema-205/schema205/src/" DESTINATION "${src_dest_dir}" FILES_MATCHING PATTERN *.cpp) -file(COPY "${PROJECT_SOURCE_DIR}/test" - DESTINATION "${clone_dir}") +file(COPY "${PROJECT_SOURCE_DIR}/test/" + DESTINATION "${clone_dir}/test" + FILES_MATCHING + PATTERN *.cpp + PATTERN *.hpp) file(COPY "${PROJECT_SOURCE_DIR}/../schema-205/examples" DESTINATION "${clone_dir}") diff --git a/libtk205/test/fixtures_libtk205.hpp b/libtk205/test/fixtures_libtk205.hpp index 6923d6d..a7dd53e 100644 --- a/libtk205/test/fixtures_libtk205.hpp +++ b/libtk205/test/fixtures_libtk205.hpp @@ -5,6 +5,7 @@ #define FIXTURE_LIBTK205_HPP_ #include "gtest/gtest.h" +// The following headers are necessary to Create an RS instance #include "RS0001.h" #include "RS0002.h" #include "RS0003.h" @@ -12,6 +13,8 @@ #include "RS0005.h" #include "RS0006.h" #include "RS0007.h" +// The following headers are required wherever we register necessary factories; +// it's not required that it be in the same place that RS instances are Created. #include "RS0001_factory.h" #include "RS0002_factory.h" #include "RS0003_factory.h" diff --git a/libtk205/test/main_libtk205.cpp b/libtk205/test/main_libtk205.cpp index fa0fa69..69b7d18 100644 --- a/libtk205/test/main_libtk205.cpp +++ b/libtk205/test/main_libtk205.cpp @@ -5,7 +5,6 @@ #include "gmock/gmock.h" #include "fixtures_libtk205.hpp" -//#include "libtk205.h" #include //using namespace tk205; From 52760798799bfe9ef1e9279bfba36a8c2bcb2382 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Wed, 25 May 2022 13:15:44 -0600 Subject: [PATCH 116/154] Rev cache again; venv on CI appears corrupted. --- .github/workflows/build-and-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index e50a51e..7d96aac 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -32,7 +32,7 @@ jobs: uses: actions/cache@v2 with: path: .venv - key: poetry-cache-v2-${{ matrix.os }}-py${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} + key: poetry-cache-v3-${{ matrix.os }}-py${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} - name: Install dependencies if cache does not exist run: poetry install if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' From c8ea67cba3ddb1af31db0fe75c143cd0f3945af2 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Wed, 25 May 2022 13:38:58 -0600 Subject: [PATCH 117/154] Attempt 1 to git commit through cmake if commit message has semicolon or special character. --- libtk205/cmake/update_lib_repo.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libtk205/cmake/update_lib_repo.cmake b/libtk205/cmake/update_lib_repo.cmake index 0fd681b..7fc3478 100644 --- a/libtk205/cmake/update_lib_repo.cmake +++ b/libtk205/cmake/update_lib_repo.cmake @@ -108,7 +108,7 @@ execute_process(COMMAND ${GIT_EXECUTABLE} add include src test examples WORKING_DIRECTORY ${clone_dir} ) # git commit -execute_process(COMMAND ${GIT_EXECUTABLE} commit -m"${last_commit_msg}" +execute_process(COMMAND ${GIT_EXECUTABLE} commit -m "\"${last_commit_msg}\"" WORKING_DIRECTORY ${clone_dir} ) # git push From 7da769139a620c73b8259ee48e1b0f97a0bee893 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Wed, 25 May 2022 13:43:22 -0600 Subject: [PATCH 118/154] Rev cache again; this time with semicolon for testing commit msg. --- .github/workflows/build-and-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 7d96aac..8ae5b3e 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -32,7 +32,7 @@ jobs: uses: actions/cache@v2 with: path: .venv - key: poetry-cache-v3-${{ matrix.os }}-py${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} + key: poetry-cache-v4-${{ matrix.os }}-py${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} - name: Install dependencies if cache does not exist run: poetry install if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' From e67097ef619d6b9512c1a0c5ec9a077740494855 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Mon, 1 Aug 2022 15:32:24 -0600 Subject: [PATCH 119/154] Update class and file names to match Big Ladder style. --- libtk205/CMakeLists.txt | 13 ++-- libtk205/include/error_handling_tk205.h | 4 +- libtk205/include/loadobject_205.h | 2 +- libtk205/src/error_handling_tk205.cpp | 4 +- libtk205/test/fixtures_libtk205.hpp | 94 ++++++++++++------------- libtk205/test/main_libtk205.cpp | 48 ++++++------- schema-205 | 2 +- 7 files changed, 84 insertions(+), 83 deletions(-) diff --git a/libtk205/CMakeLists.txt b/libtk205/CMakeLists.txt index 736c888..a4191c2 100644 --- a/libtk205/CMakeLists.txt +++ b/libtk205/CMakeLists.txt @@ -21,9 +21,10 @@ file(GLOB RS_schemas "${PROJECT_SOURCE_DIR}/../schema-205/schema-source/*.schema foreach(schema IN LISTS RS_schemas) string(REGEX REPLACE "${PROJECT_SOURCE_DIR}/../schema-205/schema-source/(.*).schema.yaml" "\\1" schema_name "${schema}") - list(APPEND RS_headers "${PROJECT_SOURCE_DIR}/../schema-205/build/include/${schema_name}.h") - list(APPEND RS_src "${PROJECT_SOURCE_DIR}/../schema-205/build/cpp/${schema_name}.cpp") - if (schema_name MATCHES "RS.*") + string(TOLOWER ${schema_name} schema_name) + list(APPEND rs_headers "${PROJECT_SOURCE_DIR}/../schema-205/build/include/${schema_name}.h") + list(APPEND rs_src "${PROJECT_SOURCE_DIR}/../schema-205/build/cpp/${schema_name}.cpp") + if (schema_name MATCHES "rs.*") list(APPEND factory_headers "${PROJECT_SOURCE_DIR}/../schema-205/build/include/${schema_name}_factory.h") list(APPEND factory_src "${PROJECT_SOURCE_DIR}/../schema-205/build/cpp/${schema_name}_factory.cpp") endif() @@ -34,15 +35,15 @@ list(APPEND lib_headers "${CMAKE_CURRENT_SOURCE_DIR}/include/typeinfo_205.h" "${CMAKE_CURRENT_SOURCE_DIR}/include/error_handling_tk205.h") #list(APPEND lib_src "${PROJECT_SOURCE_DIR}/../schema-205/build/cpp/libtk205.cpp") -add_custom_command(OUTPUT ${RS_headers} ${RS_src} ${lib_headers} ${lib_src} +add_custom_command(OUTPUT ${rs_headers} ${rs_src} ${lib_headers} ${lib_src} COMMAND poetry run doit cpp DEPENDS ${RS_schemas} COMMENT "Generate libtk205 files from YAML schema" WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../schema-205") set (SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/error_handling_tk205.cpp" - "${RS_headers}" - "${RS_src}" + "${rs_headers}" + "${rs_src}" "${factory_headers}" "${factory_src}" "${lib_headers}" diff --git a/libtk205/include/error_handling_tk205.h b/libtk205/include/error_handling_tk205.h index 106c694..49ed642 100644 --- a/libtk205/include/error_handling_tk205.h +++ b/libtk205/include/error_handling_tk205.h @@ -17,8 +17,8 @@ namespace tk205 { using msg_handler = std::function; - void Set_error_handler(msg_handler handler); - void Show_message(msg_severity severity, const std::string& message); + void set_error_handler(msg_handler handler); + void show_message(msg_severity severity, const std::string& message); } diff --git a/libtk205/include/loadobject_205.h b/libtk205/include/loadobject_205.h index c92fd16..964d87d 100644 --- a/libtk205/include/loadobject_205.h +++ b/libtk205/include/loadobject_205.h @@ -19,7 +19,7 @@ namespace tk205 { object_is_set = false; if (required) { - Show_message(msg_severity::WARN_205, ex.what()); + show_message(msg_severity::WARN_205, ex.what()); } } } diff --git a/libtk205/src/error_handling_tk205.cpp b/libtk205/src/error_handling_tk205.cpp index 279ebb6..eda08ff 100644 --- a/libtk205/src/error_handling_tk205.cpp +++ b/libtk205/src/error_handling_tk205.cpp @@ -7,12 +7,12 @@ namespace tk205 { msg_handler _error_handler; - void Set_error_handler(msg_handler handler) + void set_error_handler(msg_handler handler) { _error_handler = std::move(handler); } - void Show_message(msg_severity severity, const std::string &message) + void show_message(msg_severity severity, const std::string &message) { static std::map severity_str { {msg_severity::DEBUG_205, "DEBUG"}, diff --git a/libtk205/test/fixtures_libtk205.hpp b/libtk205/test/fixtures_libtk205.hpp index a7dd53e..0e0c24b 100644 --- a/libtk205/test/fixtures_libtk205.hpp +++ b/libtk205/test/fixtures_libtk205.hpp @@ -5,100 +5,100 @@ #define FIXTURE_LIBTK205_HPP_ #include "gtest/gtest.h" -// The following headers are necessary to Create an RS instance -#include "RS0001.h" -#include "RS0002.h" -#include "RS0003.h" -#include "RS0004.h" -#include "RS0005.h" -#include "RS0006.h" -#include "RS0007.h" +// The following headers are necessary to create an RS instance +#include "rs0001.h" +#include "rs0002.h" +#include "rs0003.h" +#include "rs0004.h" +#include "rs0005.h" +#include "rs0006.h" +#include "rs0007.h" // The following headers are required wherever we register necessary factories; -// it's not required that it be in the same place that RS instances are Created. -#include "RS0001_factory.h" -#include "RS0002_factory.h" -#include "RS0003_factory.h" -#include "RS0004_factory.h" -#include "RS0005_factory.h" -#include "RS0006_factory.h" -#include "RS0007_factory.h" +// it's not required that it be in the same place that RS instances are created. +#include "rs0001_factory.h" +#include "rs0002_factory.h" +#include "rs0003_factory.h" +#include "rs0004_factory.h" +#include "rs0005_factory.h" +#include "rs0006_factory.h" +#include "rs0007_factory.h" using namespace tk205; -class RS_fixture : public testing::Test +class RSFixture : public testing::Test { protected: - RS_fixture() {} - std::unique_ptr _rs; + RSFixture() {} + std::unique_ptr rs_; }; -class RS0001_fixture : public RS_fixture +class RS0001Fixture : public RSFixture { protected: - RS0001_fixture() : RS_fixture() + RS0001Fixture() : RSFixture() { - rs_instance_factory::Register_factory("RS0001", std::make_shared()); - _rs = rs_instance_factory::Create("RS0001", TEST205_INPUT_EXAMPLES_DIR "/examples/RS0001/Chiller-Constant-Efficiency.RS0001.a205.json"); + RSInstanceFactory::register_factory("RS0001", std::make_shared()); + rs_ = RSInstanceFactory::create("RS0001", TEST205_INPUT_EXAMPLES_DIR "/examples/RS0001/Chiller-Constant-Efficiency.RS0001.a205.json"); } }; -class RS0002_fixture : public RS_fixture +class RS0002Fixture : public RSFixture { protected: - RS0002_fixture() : RS_fixture() + RS0002Fixture() : RSFixture() { - rs_instance_factory::Register_factory("RS0002", std::make_shared()); - _rs = rs_instance_factory::Create("RS0002", TEST205_INPUT_EXAMPLES_DIR "/examples/RS0002/Unitary-Constant-Efficiency.RS0002.a205.json"); + RSInstanceFactory::register_factory("RS0002", std::make_shared()); + rs_ = RSInstanceFactory::create("RS0002", TEST205_INPUT_EXAMPLES_DIR "/examples/RS0002/Unitary-Constant-Efficiency.RS0002.a205.json"); } }; -class RS0003_fixture : public RS_fixture +class RS0003Fixture : public RSFixture { protected: - RS0003_fixture() : RS_fixture() + RS0003Fixture() : RSFixture() { - rs_instance_factory::Register_factory("RS0003", std::make_shared()); - _rs= rs_instance_factory::Create("RS0003", TEST205_INPUT_EXAMPLES_DIR "/examples/RS0003/Fan-Continuous.RS0003.a205.json"); + RSInstanceFactory::register_factory("RS0003", std::make_shared()); + rs_= RSInstanceFactory::create("RS0003", TEST205_INPUT_EXAMPLES_DIR "/examples/RS0003/Fan-Continuous.RS0003.a205.json"); } }; -class RS0004_fixture : public RS_fixture +class RS0004Fixture : public RSFixture { protected: - RS0004_fixture() : RS_fixture() + RS0004Fixture() : RSFixture() { - rs_instance_factory::Register_factory("RS0004", std::make_shared()); - _rs= rs_instance_factory::Create("RS0004", TEST205_INPUT_EXAMPLES_DIR "/examples/RS0004/DX-Constant-Efficiency.RS0004.a205.json"); + RSInstanceFactory::register_factory("RS0004", std::make_shared()); + rs_= RSInstanceFactory::create("RS0004", TEST205_INPUT_EXAMPLES_DIR "/examples/RS0004/DX-Constant-Efficiency.RS0004.a205.json"); } }; -class RS0005_fixture : public RS_fixture +class RS0005Fixture : public RSFixture { protected: - RS0005_fixture() : RS_fixture() + RS0005Fixture() : RSFixture() { - rs_instance_factory::Register_factory("RS0005", std::make_shared()); - _rs= rs_instance_factory::Create("RS0005", TEST205_INPUT_EXAMPLES_DIR "/examples/RS0005/Motor-Constant-Efficiency.RS0005.a205.json"); + RSInstanceFactory::register_factory("RS0005", std::make_shared()); + rs_= RSInstanceFactory::create("RS0005", TEST205_INPUT_EXAMPLES_DIR "/examples/RS0005/Motor-Constant-Efficiency.RS0005.a205.json"); } }; -class RS0006_fixture : public RS_fixture +class RS0006Fixture : public RSFixture { protected: - RS0006_fixture() : RS_fixture() + RS0006Fixture() : RSFixture() { - rs_instance_factory::Register_factory("RS0006", std::make_shared()); - _rs = rs_instance_factory::Create("RS0006", TEST205_INPUT_EXAMPLES_DIR "/examples/RS0006/Drive-Constant-Efficiency.RS0006.a205.json"); + RSInstanceFactory::register_factory("RS0006", std::make_shared()); + rs_ = RSInstanceFactory::create("RS0006", TEST205_INPUT_EXAMPLES_DIR "/examples/RS0006/Drive-Constant-Efficiency.RS0006.a205.json"); } }; -class RS0007_fixture : public RS_fixture +class RS0007Fixture : public RSFixture { protected: - RS0007_fixture() : RS_fixture() + RS0007Fixture() : RSFixture() { - rs_instance_factory::Register_factory("RS0007", std::make_shared()); - _rs = rs_instance_factory::Create("RS0007", TEST205_INPUT_EXAMPLES_DIR "/examples/RS0007/Belt-Drive-Constant-Efficiency.RS0007.a205.json"); + RSInstanceFactory::register_factory("RS0007", std::make_shared()); + rs_ = RSInstanceFactory::create("RS0007", TEST205_INPUT_EXAMPLES_DIR "/examples/RS0007/Belt-Drive-Constant-Efficiency.RS0007.a205.json"); } }; diff --git a/libtk205/test/main_libtk205.cpp b/libtk205/test/main_libtk205.cpp index 69b7d18..15c3b96 100644 --- a/libtk205/test/main_libtk205.cpp +++ b/libtk205/test/main_libtk205.cpp @@ -10,7 +10,7 @@ //using namespace tk205; #if 0 -TEST(RS_fixture, Validate_RSes) +TEST(RSFixture, Validate_RSes) { EXPECT_TRUE(A205_SDK::Validate_A205(TEST205_INPUT_EXAMPLES_DIR"/schema-205/build/schema/RS0001.schema.json", TEST205_INPUT_EXAMPLES_DIR"/schema-205/examples/RS0001/Chiller-Constant-Efficiency.RS0001.a205.json")); @@ -21,64 +21,64 @@ TEST(RS_fixture, Validate_RSes) } #endif -TEST_F(RS0001_fixture, Check_is_set) +TEST_F(RS0001Fixture, Check_is_set) { - auto rs = dynamic_cast(_rs.get()); + auto rs = dynamic_cast(rs_.get()); EXPECT_FALSE(rs->metadata.data_source_is_set); EXPECT_TRUE(rs->metadata.description_is_set); } -TEST_F(RS0001_fixture, Calculate_performance_cooling) +TEST_F(RS0001Fixture, Calculate_performance_cooling) { - auto rs = dynamic_cast(_rs.get()); + auto rs = dynamic_cast(rs_.get()); std::vector target {0.0755, 280.0, 0.0957, 295.0, 0.5}; //NOLINT : Magic numbers necessary! - auto result = rs->performance.performance_map_cooling.Calculate_performance(target); + auto result = rs->performance.performance_map_cooling.calculate_performance(target); EXPECT_EQ(result.size(), 9u); } -TEST_F(RS0001_fixture, Calculate_performance_cooling_2) +TEST_F(RS0001Fixture, Calculate_performance_cooling_2) { - auto rs = dynamic_cast(_rs.get()); + auto rs = dynamic_cast(rs_.get()); std::vector target {0.0755, 280.0, 0.0957, 295.0, 0.5}; //NOLINT : Magic numbers necessary! - auto result = rs->performance.performance_map_cooling.Calculate_performance(target, rs->performance.performance_map_cooling.lookup_variables.condenser_liquid_leaving_temperature_index); + auto result = rs->performance.performance_map_cooling.calculate_performance(target, rs->performance.performance_map_cooling.lookup_variables.condenser_liquid_leaving_temperature_index); // 59593.2,351600,411193,281.11,296.03,74400,23600,0,0 EXPECT_NEAR(result, 296.03, 0.001); } -TEST_F(RS0001_fixture, Calculate_performance_cooling_3) +TEST_F(RS0001Fixture, Calculate_performance_cooling_3) { - auto rs = dynamic_cast(_rs.get()); - auto result = rs->performance.performance_map_cooling.Calculate_performance(0.0755, 280.0, 0.0957, 295.0, 0.5).condenser_liquid_leaving_temperature; + auto rs = dynamic_cast(rs_.get()); + auto result = rs->performance.performance_map_cooling.calculate_performance(0.0755, 280.0, 0.0957, 295.0, 0.5).condenser_liquid_leaving_temperature; EXPECT_NEAR(result, 296.03, 0.001); } -TEST_F(RS0005_fixture, Calculate_embedded_RS_performance) +TEST_F(RS0005Fixture, Calculate_embedded_RS_performance) { - auto rs = dynamic_cast(_rs.get()); + auto rs = dynamic_cast(rs_.get()); std::vector target {5550.0, 10.0}; //NOLINT - auto result = rs->performance.drive_representation.performance.performance_map.Calculate_performance(target); + auto result = rs->performance.drive_representation.performance.performance_map.calculate_performance(target); EXPECT_THAT(result, testing::ElementsAre(testing::DoubleEq(0.985))); } -TEST_F(RS0003_fixture, Verify_grid_variable_index) +TEST_F(RS0003Fixture, Verify_grid_variable_index) { - auto rs = dynamic_cast(_rs.get()); - auto pm = dynamic_cast(rs->performance.performance_map.get()); + auto rs = dynamic_cast(rs_.get()); + auto pm = dynamic_cast(rs->performance.performance_map.get()); auto result = pm->grid_variables.static_pressure_difference_index; EXPECT_EQ(result, 1u); } -TEST_F(RS0006_fixture, Verify_enum_description) +TEST_F(RS0006Fixture, Verify_enum_description) { - auto result = RS0006_NS::CoolingMethod_info.at(RS0006_NS::CoolingMethod::ACTIVE_AIR_COOLED).description; + auto result = rs0006_ns::CoolingMethod_info.at(rs0006_ns::CoolingMethod::ACTIVE_AIR_COOLED).description; EXPECT_THAT(result, "Drive is cooled using forced air convection within the surrounding environment"); } -TEST_F(RS0001_fixture, Verify_element_metadata) +TEST_F(RS0001Fixture, Verify_element_metadata) { - auto result = RS0001_NS::RatingAHRI550590PartLoadPoint::evaporator_liquid_volumetric_flow_rate_name; + auto result = rs0001_ns::RatingAHRI550590PartLoadPoint::evaporator_liquid_volumetric_flow_rate_name; EXPECT_THAT(result, "evaporator_liquid_volumetric_flow_rate"); - result = RS0001_NS::RatingAHRI550590PartLoadPoint::evaporator_liquid_volumetric_flow_rate_units; + result = rs0001_ns::RatingAHRI550590PartLoadPoint::evaporator_liquid_volumetric_flow_rate_units; EXPECT_THAT(result, "gpm"); } @@ -115,7 +115,7 @@ void Btwxt_message(const Btwxt::MsgLevel messageType, const std::string message, int main(int argc, char **argv) { ::testing::InitGoogleTest(&argc, argv); - tk205::Set_error_handler(Display_message); + tk205::set_error_handler(Display_message); Btwxt::setMessageCallback(Btwxt_message, nullptr); return RUN_ALL_TESTS(); } diff --git a/schema-205 b/schema-205 index 4aed1a9..53e0221 160000 --- a/schema-205 +++ b/schema-205 @@ -1 +1 @@ -Subproject commit 4aed1a9fbe40596af22087d16323432ace4e86af +Subproject commit 53e022162794d6f43d51df64967b726a256e8b96 From ecdbc2abc5dcb9eb0e99472c365197adc5e71740 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Wed, 3 Aug 2022 14:48:06 -0600 Subject: [PATCH 120/154] Remove unused code --- libtk205/CMakeLists.txt | 5 ----- libtk205/test/main_libtk205.cpp | 14 -------------- schema-205 | 2 +- 3 files changed, 1 insertion(+), 20 deletions(-) diff --git a/libtk205/CMakeLists.txt b/libtk205/CMakeLists.txt index a4191c2..63f7cbe 100644 --- a/libtk205/CMakeLists.txt +++ b/libtk205/CMakeLists.txt @@ -9,10 +9,6 @@ set(JSON_BuildTests OFF CACHE INTERNAL "") include_directories(${CMAKE_CURRENT_SOURCE_DIR}/vendor/btwxt/src) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/vendor/json/single_include) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/vendor/json/include) -# Two "deeper" include directories necessary bc Valijson doesn't scope includes the same as everyone else -#include_directories(${CMAKE_CURRENT_SOURCE_DIR}/vendor/json/single_include/nlohmann) -#include_directories(${CMAKE_CURRENT_SOURCE_DIR}/vendor/json/include/nlohmann) -#include_directories(${CMAKE_CURRENT_SOURCE_DIR}/vendor/valijson/include) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../schema-205/build/include) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../schema-205/schema205/src) @@ -33,7 +29,6 @@ endforeach() list(APPEND lib_headers "${CMAKE_CURRENT_SOURCE_DIR}/include/typeinfo_205.h" "${CMAKE_CURRENT_SOURCE_DIR}/include/loadobject_205.h" "${CMAKE_CURRENT_SOURCE_DIR}/include/error_handling_tk205.h") -#list(APPEND lib_src "${PROJECT_SOURCE_DIR}/../schema-205/build/cpp/libtk205.cpp") add_custom_command(OUTPUT ${rs_headers} ${rs_src} ${lib_headers} ${lib_src} COMMAND poetry run doit cpp diff --git a/libtk205/test/main_libtk205.cpp b/libtk205/test/main_libtk205.cpp index 15c3b96..b7e215b 100644 --- a/libtk205/test/main_libtk205.cpp +++ b/libtk205/test/main_libtk205.cpp @@ -7,20 +7,6 @@ #include "fixtures_libtk205.hpp" #include -//using namespace tk205; - -#if 0 -TEST(RSFixture, Validate_RSes) -{ - EXPECT_TRUE(A205_SDK::Validate_A205(TEST205_INPUT_EXAMPLES_DIR"/schema-205/build/schema/RS0001.schema.json", - TEST205_INPUT_EXAMPLES_DIR"/schema-205/examples/RS0001/Chiller-Constant-Efficiency.RS0001.a205.json")); - EXPECT_TRUE(A205_SDK::Validate_A205(TEST205_INPUT_EXAMPLES_DIR"/schema-205/build/schema/RS0002.schema.json", - TEST205_INPUT_EXAMPLES_DIR"/schema-205/examples/RS0002/Unitary-Constant-Efficiency.RS0002.a205.json")); - EXPECT_TRUE(A205_SDK::Validate_A205(TEST205_INPUT_EXAMPLES_DIR"/schema-205/build/schema/RS0003.schema.json", - TEST205_INPUT_EXAMPLES_DIR"/schema-205/examples/RS0003/Fan-Continuous.RS0003.a205.json")); -} -#endif - TEST_F(RS0001Fixture, Check_is_set) { auto rs = dynamic_cast(rs_.get()); diff --git a/schema-205 b/schema-205 index 53e0221..185b5c3 160000 --- a/schema-205 +++ b/schema-205 @@ -1 +1 @@ -Subproject commit 53e022162794d6f43d51df64967b726a256e8b96 +Subproject commit 185b5c343e97e852b861029b1281f7f1be11ef33 From 11b40ce782981b11297a4483fde3269b33040ee5 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Wed, 3 Aug 2022 15:09:46 -0600 Subject: [PATCH 121/154] Refresh cache version. --- .github/workflows/build-and-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 8ae5b3e..ce77cae 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -32,7 +32,7 @@ jobs: uses: actions/cache@v2 with: path: .venv - key: poetry-cache-v4-${{ matrix.os }}-py${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} + key: poetry-cache-v1-${{ matrix.os }}-py${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} - name: Install dependencies if cache does not exist run: poetry install if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' From 601431907f5612e6aa919a379103989b70245da8 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Fri, 5 Aug 2022 13:15:05 -0600 Subject: [PATCH 122/154] Use shared_ptr instead of unique_ptr to RS class. --- libtk205/include/loadobject_205.h | 2 +- libtk205/test/fixtures_libtk205.hpp | 2 +- schema-205 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libtk205/include/loadobject_205.h b/libtk205/include/loadobject_205.h index 964d87d..b8bc3ec 100644 --- a/libtk205/include/loadobject_205.h +++ b/libtk205/include/loadobject_205.h @@ -7,7 +7,7 @@ namespace tk205 { template - void A205_json_get(nlohmann::json j, const char *subnode, T& a205_object, bool& object_is_set, bool required = false) + void a205_json_get(nlohmann::json j, const char *subnode, T& a205_object, bool& object_is_set, bool required = false) { try { diff --git a/libtk205/test/fixtures_libtk205.hpp b/libtk205/test/fixtures_libtk205.hpp index 0e0c24b..e36839c 100644 --- a/libtk205/test/fixtures_libtk205.hpp +++ b/libtk205/test/fixtures_libtk205.hpp @@ -29,7 +29,7 @@ class RSFixture : public testing::Test { protected: RSFixture() {} - std::unique_ptr rs_; + std::shared_ptr rs_; }; class RS0001Fixture : public RSFixture diff --git a/schema-205 b/schema-205 index 185b5c3..c5fdd2f 160000 --- a/schema-205 +++ b/schema-205 @@ -1 +1 @@ -Subproject commit 185b5c343e97e852b861029b1281f7f1be11ef33 +Subproject commit c5fdd2fdd301d6cec4c4505f2495df961121b085 From 247a3d09d6a81e32fabe2ef8a0a05f6dd2b2d263 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Fri, 5 Aug 2022 13:22:44 -0600 Subject: [PATCH 123/154] Rev CI cache. --- .github/workflows/build-and-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index ce77cae..e50a51e 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -32,7 +32,7 @@ jobs: uses: actions/cache@v2 with: path: .venv - key: poetry-cache-v1-${{ matrix.os }}-py${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} + key: poetry-cache-v2-${{ matrix.os }}-py${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} - name: Install dependencies if cache does not exist run: poetry install if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' From 40d12aaf6af73bba90e8255bcbfd79d1fcb176b6 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Mon, 8 Aug 2022 14:37:54 -0600 Subject: [PATCH 124/154] Fix one more naming convention; add missing caller context pointer. --- libtk205/include/error_handling_tk205.h | 8 ++++---- libtk205/include/loadobject_205.h | 2 +- libtk205/src/error_handling_tk205.cpp | 24 ++++++++++++----------- libtk205/test/main_libtk205.cpp | 26 ++++++++++++------------- 4 files changed, 31 insertions(+), 29 deletions(-) diff --git a/libtk205/include/error_handling_tk205.h b/libtk205/include/error_handling_tk205.h index 49ed642..2dcdd4e 100644 --- a/libtk205/include/error_handling_tk205.h +++ b/libtk205/include/error_handling_tk205.h @@ -8,17 +8,17 @@ namespace tk205 { - enum class msg_severity : unsigned int { + enum class MsgSeverity : unsigned int { DEBUG_205, INFO_205, WARN_205, ERR_205 }; - using msg_handler = std::function; + using msg_handler = std::function; - void set_error_handler(msg_handler handler); - void show_message(msg_severity severity, const std::string& message); + void set_error_handler(msg_handler handler, void *caller_info); + void show_message(MsgSeverity severity, const std::string& message); } diff --git a/libtk205/include/loadobject_205.h b/libtk205/include/loadobject_205.h index b8bc3ec..5d1b01a 100644 --- a/libtk205/include/loadobject_205.h +++ b/libtk205/include/loadobject_205.h @@ -19,7 +19,7 @@ namespace tk205 { object_is_set = false; if (required) { - show_message(msg_severity::WARN_205, ex.what()); + show_message(MsgSeverity::WARN_205, ex.what()); } } } diff --git a/libtk205/src/error_handling_tk205.cpp b/libtk205/src/error_handling_tk205.cpp index eda08ff..f3eac0b 100644 --- a/libtk205/src/error_handling_tk205.cpp +++ b/libtk205/src/error_handling_tk205.cpp @@ -5,28 +5,30 @@ namespace tk205 { - msg_handler _error_handler; + msg_handler error_handler_; + void *caller_info_; - void set_error_handler(msg_handler handler) + void set_error_handler(msg_handler handler, void *caller_info) { - _error_handler = std::move(handler); + error_handler_ = std::move(handler); + caller_info_ = caller_info; } - void show_message(msg_severity severity, const std::string &message) + void show_message(MsgSeverity severity, const std::string &message) { - static std::map severity_str { - {msg_severity::DEBUG_205, "DEBUG"}, - {msg_severity::INFO_205, "INFO"}, - {msg_severity::WARN_205, "WARN"}, - {msg_severity::ERR_205, "ERR"} + static std::map severity_str { + {MsgSeverity::DEBUG_205, "DEBUG"}, + {MsgSeverity::INFO_205, "INFO"}, + {MsgSeverity::WARN_205, "WARN"}, + {MsgSeverity::ERR_205, "ERR"} }; - if (!_error_handler) + if (!error_handler_) { //std::cout << severity_str[severity] << ": " << message << std::endl; } else { - _error_handler(severity, message, nullptr); + error_handler_(severity, message, nullptr); } } } diff --git a/libtk205/test/main_libtk205.cpp b/libtk205/test/main_libtk205.cpp index b7e215b..7bc80bb 100644 --- a/libtk205/test/main_libtk205.cpp +++ b/libtk205/test/main_libtk205.cpp @@ -68,15 +68,15 @@ TEST_F(RS0001Fixture, Verify_element_metadata) EXPECT_THAT(result, "gpm"); } -void Display_message(msg_severity severity, const std::string &message, void *) +void Display_message(MsgSeverity severity, const std::string &message, void *) { - static std::map severity_str { - {msg_severity::DEBUG_205, "DEBUG"}, - {msg_severity::INFO_205, "INFO"}, - {msg_severity::WARN_205, "WARN"}, - {msg_severity::ERR_205, "ERR"} + static std::map severity_str { + {MsgSeverity::DEBUG_205, "DEBUG"}, + {MsgSeverity::INFO_205, "INFO"}, + {MsgSeverity::WARN_205, "WARN"}, + {MsgSeverity::ERR_205, "ERR"} }; - if (severity <= msg_severity::WARN_205) + if (severity <= MsgSeverity::WARN_205) { std::cout << severity_str[severity] << ": " << message << std::endl; } @@ -89,11 +89,11 @@ void Display_message(msg_severity severity, const std::string &message, void *) void Btwxt_message(const Btwxt::MsgLevel messageType, const std::string message, void *) { - static std::map severity { - {Btwxt::MsgLevel::MSG_DEBUG, msg_severity::DEBUG_205}, - {Btwxt::MsgLevel::MSG_INFO, msg_severity::INFO_205}, - {Btwxt::MsgLevel::MSG_WARN, msg_severity::WARN_205}, - {Btwxt::MsgLevel::MSG_ERR, msg_severity::ERR_205} + static std::map severity { + {Btwxt::MsgLevel::MSG_DEBUG, MsgSeverity::DEBUG_205}, + {Btwxt::MsgLevel::MSG_INFO, MsgSeverity::INFO_205}, + {Btwxt::MsgLevel::MSG_WARN, MsgSeverity::WARN_205}, + {Btwxt::MsgLevel::MSG_ERR, MsgSeverity::ERR_205} }; Display_message(severity[messageType], message, nullptr); } @@ -101,7 +101,7 @@ void Btwxt_message(const Btwxt::MsgLevel messageType, const std::string message, int main(int argc, char **argv) { ::testing::InitGoogleTest(&argc, argv); - tk205::set_error_handler(Display_message); + tk205::set_error_handler(Display_message, nullptr); Btwxt::setMessageCallback(Btwxt_message, nullptr); return RUN_ALL_TESTS(); } From 2685eb73478d0d1d5b3a831ddd122384bc5a93a4 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Mon, 8 Aug 2022 14:46:28 -0600 Subject: [PATCH 125/154] Sync naming changes. --- schema-205 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema-205 b/schema-205 index c5fdd2f..3d7b66a 160000 --- a/schema-205 +++ b/schema-205 @@ -1 +1 @@ -Subproject commit c5fdd2fdd301d6cec4c4505f2495df961121b085 +Subproject commit 3d7b66a0877201693eb08e1eeb87f5aed41e4805 From 2430934bece8e048453a27b754c6a81a0d28eb79 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Mon, 8 Aug 2022 14:51:12 -0600 Subject: [PATCH 126/154] Rev cache version. --- .github/workflows/build-and-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index e50a51e..7d96aac 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -32,7 +32,7 @@ jobs: uses: actions/cache@v2 with: path: .venv - key: poetry-cache-v2-${{ matrix.os }}-py${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} + key: poetry-cache-v3-${{ matrix.os }}-py${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} - name: Install dependencies if cache does not exist run: poetry install if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' From 4f8a077f61b692f7ef75e5ce693e46b8b98876b3 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Mon, 8 Aug 2022 16:16:44 -0600 Subject: [PATCH 127/154] Return nullptr from create() if initialization fails. --- libtk205/test/fixtures_libtk205.hpp | 10 ++++ libtk205/test/main_libtk205.cpp | 86 ++++++++++++++++------------- schema-205 | 2 +- 3 files changed, 60 insertions(+), 38 deletions(-) diff --git a/libtk205/test/fixtures_libtk205.hpp b/libtk205/test/fixtures_libtk205.hpp index e36839c..afb703e 100644 --- a/libtk205/test/fixtures_libtk205.hpp +++ b/libtk205/test/fixtures_libtk205.hpp @@ -32,6 +32,16 @@ class RSFixture : public testing::Test std::shared_ptr rs_; }; +class RS0001BadFixture : public RSFixture +{ +protected: + RS0001BadFixture() : RSFixture() + { + RSInstanceFactory::register_factory("RS0001", std::make_shared()); + rs_ = RSInstanceFactory::create("RS0001", TEST205_INPUT_EXAMPLES_DIR "/examples/RS0002/Unitary-Constant-Efficiency.RS0002.a205.json"); + } +}; + class RS0001Fixture : public RSFixture { protected: diff --git a/libtk205/test/main_libtk205.cpp b/libtk205/test/main_libtk205.cpp index 7bc80bb..5778dbd 100644 --- a/libtk205/test/main_libtk205.cpp +++ b/libtk205/test/main_libtk205.cpp @@ -7,40 +7,51 @@ #include "fixtures_libtk205.hpp" #include +TEST_F(RS0001BadFixture, Verify_RS_object) +{ + auto rs = dynamic_cast(rs_.get()); + EXPECT_TRUE(rs == nullptr); +} + TEST_F(RS0001Fixture, Check_is_set) { auto rs = dynamic_cast(rs_.get()); + EXPECT_TRUE(rs != nullptr); EXPECT_FALSE(rs->metadata.data_source_is_set); EXPECT_TRUE(rs->metadata.description_is_set); } TEST_F(RS0001Fixture, Calculate_performance_cooling) { - auto rs = dynamic_cast(rs_.get()); - std::vector target {0.0755, 280.0, 0.0957, 295.0, 0.5}; //NOLINT : Magic numbers necessary! - auto result = rs->performance.performance_map_cooling.calculate_performance(target); - EXPECT_EQ(result.size(), 9u); + auto rs = dynamic_cast(rs_.get()); + EXPECT_TRUE(rs != nullptr); + std::vector target {0.0755, 280.0, 0.0957, 295.0, 0.5}; //NOLINT : Magic numbers necessary! + auto result = rs->performance.performance_map_cooling.calculate_performance(target); + EXPECT_EQ(result.size(), 9u); } TEST_F(RS0001Fixture, Calculate_performance_cooling_2) { - auto rs = dynamic_cast(rs_.get()); - std::vector target {0.0755, 280.0, 0.0957, 295.0, 0.5}; //NOLINT : Magic numbers necessary! - auto result = rs->performance.performance_map_cooling.calculate_performance(target, rs->performance.performance_map_cooling.lookup_variables.condenser_liquid_leaving_temperature_index); - // 59593.2,351600,411193,281.11,296.03,74400,23600,0,0 - EXPECT_NEAR(result, 296.03, 0.001); + auto rs = dynamic_cast(rs_.get()); + EXPECT_TRUE(rs != nullptr); + std::vector target {0.0755, 280.0, 0.0957, 295.0, 0.5}; //NOLINT : Magic numbers necessary! + auto result = rs->performance.performance_map_cooling.calculate_performance(target, rs->performance.performance_map_cooling.lookup_variables.condenser_liquid_leaving_temperature_index); + // 59593.2,351600,411193,281.11,296.03,74400,23600,0,0 + EXPECT_NEAR(result, 296.03, 0.001); } TEST_F(RS0001Fixture, Calculate_performance_cooling_3) { - auto rs = dynamic_cast(rs_.get()); - auto result = rs->performance.performance_map_cooling.calculate_performance(0.0755, 280.0, 0.0957, 295.0, 0.5).condenser_liquid_leaving_temperature; - EXPECT_NEAR(result, 296.03, 0.001); + auto rs = dynamic_cast(rs_.get()); + EXPECT_TRUE(rs != nullptr); + auto result = rs->performance.performance_map_cooling.calculate_performance(0.0755, 280.0, 0.0957, 295.0, 0.5).condenser_liquid_leaving_temperature; + EXPECT_NEAR(result, 296.03, 0.001); } TEST_F(RS0005Fixture, Calculate_embedded_RS_performance) { auto rs = dynamic_cast(rs_.get()); + EXPECT_TRUE(rs != nullptr); std::vector target {5550.0, 10.0}; //NOLINT auto result = rs->performance.drive_representation.performance.performance_map.calculate_performance(target); EXPECT_THAT(result, testing::ElementsAre(testing::DoubleEq(0.985))); @@ -49,6 +60,7 @@ TEST_F(RS0005Fixture, Calculate_embedded_RS_performance) TEST_F(RS0003Fixture, Verify_grid_variable_index) { auto rs = dynamic_cast(rs_.get()); + EXPECT_TRUE(rs != nullptr); auto pm = dynamic_cast(rs->performance.performance_map.get()); auto result = pm->grid_variables.static_pressure_difference_index; EXPECT_EQ(result, 1u); @@ -70,38 +82,38 @@ TEST_F(RS0001Fixture, Verify_element_metadata) void Display_message(MsgSeverity severity, const std::string &message, void *) { - static std::map severity_str { - {MsgSeverity::DEBUG_205, "DEBUG"}, - {MsgSeverity::INFO_205, "INFO"}, - {MsgSeverity::WARN_205, "WARN"}, - {MsgSeverity::ERR_205, "ERR"} - }; - if (severity <= MsgSeverity::WARN_205) - { - std::cout << severity_str[severity] << ": " << message << std::endl; - } - else - { - throw std::invalid_argument(message); - } + static std::map severity_str { + {MsgSeverity::DEBUG_205, "DEBUG"}, + {MsgSeverity::INFO_205, "INFO"}, + {MsgSeverity::WARN_205, "WARN"}, + {MsgSeverity::ERR_205, "ERR"} + }; + if (severity <= MsgSeverity::WARN_205) + { + std::cout << severity_str[severity] << ": " << message << std::endl; + } + else + { + throw std::invalid_argument(message); + } } void Btwxt_message(const Btwxt::MsgLevel messageType, const std::string message, void *) { - static std::map severity { - {Btwxt::MsgLevel::MSG_DEBUG, MsgSeverity::DEBUG_205}, - {Btwxt::MsgLevel::MSG_INFO, MsgSeverity::INFO_205}, - {Btwxt::MsgLevel::MSG_WARN, MsgSeverity::WARN_205}, - {Btwxt::MsgLevel::MSG_ERR, MsgSeverity::ERR_205} - }; - Display_message(severity[messageType], message, nullptr); + static std::map severity { + {Btwxt::MsgLevel::MSG_DEBUG, MsgSeverity::DEBUG_205}, + {Btwxt::MsgLevel::MSG_INFO, MsgSeverity::INFO_205}, + {Btwxt::MsgLevel::MSG_WARN, MsgSeverity::WARN_205}, + {Btwxt::MsgLevel::MSG_ERR, MsgSeverity::ERR_205} + }; + Display_message(severity[messageType], message, nullptr); } int main(int argc, char **argv) { - ::testing::InitGoogleTest(&argc, argv); - tk205::set_error_handler(Display_message, nullptr); - Btwxt::setMessageCallback(Btwxt_message, nullptr); - return RUN_ALL_TESTS(); + ::testing::InitGoogleTest(&argc, argv); + tk205::set_error_handler(Display_message, nullptr); + Btwxt::setMessageCallback(Btwxt_message, nullptr); + return RUN_ALL_TESTS(); } diff --git a/schema-205 b/schema-205 index 3d7b66a..d7d6332 160000 --- a/schema-205 +++ b/schema-205 @@ -1 +1 @@ -Subproject commit 3d7b66a0877201693eb08e1eeb87f5aed41e4805 +Subproject commit d7d6332e2891ecfa36f578d0c52e8772d42d8351 From 796226955211494942599f12958b9173cfcc58ca Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Mon, 8 Aug 2022 16:20:50 -0600 Subject: [PATCH 128/154] Rev CI cache. --- .github/workflows/build-and-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 7d96aac..8ae5b3e 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -32,7 +32,7 @@ jobs: uses: actions/cache@v2 with: path: .venv - key: poetry-cache-v3-${{ matrix.os }}-py${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} + key: poetry-cache-v4-${{ matrix.os }}-py${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} - name: Install dependencies if cache does not exist run: poetry install if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' From a34ed48a4a5baac24ce52cf4595fe1329a82685b Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Mon, 8 Aug 2022 16:23:57 -0600 Subject: [PATCH 129/154] Create new CI cache. --- .github/workflows/build-and-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 8ae5b3e..ab6bc35 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -32,7 +32,7 @@ jobs: uses: actions/cache@v2 with: path: .venv - key: poetry-cache-v4-${{ matrix.os }}-py${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} + key: poetry-cache-v5-${{ matrix.os }}-py${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} - name: Install dependencies if cache does not exist run: poetry install if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' From 94f4e8207822592058bc878a884ea229febb48bb Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Tue, 9 Aug 2022 06:57:40 -0600 Subject: [PATCH 130/154] Fix error handler calling bug. --- libtk205/src/error_handling_tk205.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libtk205/src/error_handling_tk205.cpp b/libtk205/src/error_handling_tk205.cpp index f3eac0b..b2b82c3 100644 --- a/libtk205/src/error_handling_tk205.cpp +++ b/libtk205/src/error_handling_tk205.cpp @@ -28,7 +28,7 @@ namespace tk205 { } else { - error_handler_(severity, message, nullptr); + error_handler_(severity, message, caller_info_); } } } From 0cc268d8d25c77d53233525231011241df57b42d Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Tue, 9 Aug 2022 07:03:12 -0600 Subject: [PATCH 131/154] Create new CI cache. --- .github/workflows/build-and-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index ab6bc35..a933316 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -32,7 +32,7 @@ jobs: uses: actions/cache@v2 with: path: .venv - key: poetry-cache-v5-${{ matrix.os }}-py${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} + key: poetry-cache-v6-${{ matrix.os }}-py${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} - name: Install dependencies if cache does not exist run: poetry install if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' From bb6b8af193b60b25e8e91f7d1e3c3d21866fe46e Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Thu, 1 Sep 2022 17:09:10 -0600 Subject: [PATCH 132/154] Add tests for changing interpolation type after RGI construction. --- libtk205/test/fixtures_libtk205.hpp | 10 ++++++++++ libtk205/test/main_libtk205.cpp | 19 +++++++++++-------- libtk205/vendor/btwxt | 2 +- schema-205 | 2 +- 4 files changed, 23 insertions(+), 10 deletions(-) diff --git a/libtk205/test/fixtures_libtk205.hpp b/libtk205/test/fixtures_libtk205.hpp index afb703e..0c2fe5b 100644 --- a/libtk205/test/fixtures_libtk205.hpp +++ b/libtk205/test/fixtures_libtk205.hpp @@ -52,6 +52,16 @@ class RS0001Fixture : public RSFixture } }; +class ASHRAEChillerFixture : public RSFixture +{ +protected: + ASHRAEChillerFixture() : RSFixture() + { + RSInstanceFactory::register_factory("RS0001", std::make_shared()); + rs_ = RSInstanceFactory::create("RS0001", TEST205_INPUT_EXAMPLES_DIR "/examples/RS0001/ASHRAE90-1-2019-bd-Curve-Set-C.RS0001.a205.json"); + } +}; + class RS0002Fixture : public RSFixture { protected: diff --git a/libtk205/test/main_libtk205.cpp b/libtk205/test/main_libtk205.cpp index 5778dbd..1e008af 100644 --- a/libtk205/test/main_libtk205.cpp +++ b/libtk205/test/main_libtk205.cpp @@ -48,6 +48,16 @@ TEST_F(RS0001Fixture, Calculate_performance_cooling_3) EXPECT_NEAR(result, 296.03, 0.001); } +TEST_F(ASHRAEChillerFixture, Calculate_performance_cubic) +{ + auto rs = dynamic_cast(rs_.get()); + EXPECT_TRUE(rs != nullptr); + std::vector target {0.00565, 280.0, 0.00845, 297.0, 1.5}; //NOLINT : Magic numbers necessary! + auto result1 = rs->performance.performance_map_cooling.calculate_performance(target, Btwxt::Method::LINEAR); + auto result2 = rs->performance.performance_map_cooling.calculate_performance(target, Btwxt::Method::CUBIC); + EXPECT_NE(result1, result2); +} + TEST_F(RS0005Fixture, Calculate_embedded_RS_performance) { auto rs = dynamic_cast(rs_.get()); @@ -88,14 +98,7 @@ void Display_message(MsgSeverity severity, const std::string &message, void *) {MsgSeverity::WARN_205, "WARN"}, {MsgSeverity::ERR_205, "ERR"} }; - if (severity <= MsgSeverity::WARN_205) - { - std::cout << severity_str[severity] << ": " << message << std::endl; - } - else - { - throw std::invalid_argument(message); - } + std::cout << severity_str[severity] << ": " << message << std::endl; } void Btwxt_message(const Btwxt::MsgLevel messageType, const std::string message, diff --git a/libtk205/vendor/btwxt b/libtk205/vendor/btwxt index d034772..5a93e5d 160000 --- a/libtk205/vendor/btwxt +++ b/libtk205/vendor/btwxt @@ -1 +1 @@ -Subproject commit d034772fef894750caa95b5d0933bd2434c9abe1 +Subproject commit 5a93e5d7b60815b8ae9d15afc28ce0a1207ca246 diff --git a/schema-205 b/schema-205 index d7d6332..32d1c77 160000 --- a/schema-205 +++ b/schema-205 @@ -1 +1 @@ -Subproject commit d7d6332e2891ecfa36f578d0c52e8772d42d8351 +Subproject commit 32d1c77f7856742aa3e850f995724e6a46d3f070 From 94f3403566fde2ecb0bfc69ea9064fdd3883d7d6 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Tue, 6 Sep 2022 09:41:12 -0600 Subject: [PATCH 133/154] Update poetry installer for Actions CI. --- .github/workflows/build-and-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index a933316..77c25e4 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -23,7 +23,7 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Install Poetry - uses: snok/install-poetry@v1.1.1 + run: curl -sSL https://install.python-poetry.org | python3 - with: virtualenvs-create: true virtualenvs-in-project: true From 06fe70e5fb36ed2c8b400dc2ef571c7ffeec0d91 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Tue, 6 Sep 2022 09:42:28 -0600 Subject: [PATCH 134/154] Remove unused 'with' from actions. --- .github/workflows/build-and-test.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 77c25e4..5ff6bd0 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -24,9 +24,6 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install Poetry run: curl -sSL https://install.python-poetry.org | python3 - - with: - virtualenvs-create: true - virtualenvs-in-project: true - name: Load cached venv if cache exists id: cached-poetry-dependencies uses: actions/cache@v2 From c556a0397121549e4faa49da47866891f5d63dd4 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Tue, 6 Sep 2022 10:00:44 -0600 Subject: [PATCH 135/154] Update poetry path. --- .github/workflows/build-and-test.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 5ff6bd0..9fbf659 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -24,6 +24,12 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install Poetry run: curl -sSL https://install.python-poetry.org | python3 - + - name: Update PATH MacOS/Linux + if: ${{ matrix.os != 'Windows' }} + run: echo "$HOME/.local/bin" >> $GITHUB_PATH + - name: Update PATH for Windows + if: ${{ matrix.os == 'Windows' }} + run: echo "$APPDATA\Python\Scripts" >> $GITHUB_PATH - name: Load cached venv if cache exists id: cached-poetry-dependencies uses: actions/cache@v2 From 641b4ecc4282387056e2cd6782019efcdd865bde Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Tue, 6 Sep 2022 10:28:57 -0600 Subject: [PATCH 136/154] Use poetry version that supports auto-update but may still work alongside virtualenv. --- .github/workflows/build-and-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 9fbf659..920bfcd 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -23,7 +23,7 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Install Poetry - run: curl -sSL https://install.python-poetry.org | python3 - + run: curl -sSL https://install.python-poetry.org | python3 - --version=1.1.7 - name: Update PATH MacOS/Linux if: ${{ matrix.os != 'Windows' }} run: echo "$HOME/.local/bin" >> $GITHUB_PATH From 8d44b96c829499a533e8aba242e175a9d2389b31 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Tue, 6 Sep 2022 16:05:43 -0600 Subject: [PATCH 137/154] Add Calculate_performance overloads with interpolation method. --- .github/workflows/build-and-test.yml | 11 ++++------- libtk205/test/main_libtk205.cpp | 2 +- schema-205 | 2 +- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 920bfcd..a933316 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -23,13 +23,10 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Install Poetry - run: curl -sSL https://install.python-poetry.org | python3 - --version=1.1.7 - - name: Update PATH MacOS/Linux - if: ${{ matrix.os != 'Windows' }} - run: echo "$HOME/.local/bin" >> $GITHUB_PATH - - name: Update PATH for Windows - if: ${{ matrix.os == 'Windows' }} - run: echo "$APPDATA\Python\Scripts" >> $GITHUB_PATH + uses: snok/install-poetry@v1.1.1 + with: + virtualenvs-create: true + virtualenvs-in-project: true - name: Load cached venv if cache exists id: cached-poetry-dependencies uses: actions/cache@v2 diff --git a/libtk205/test/main_libtk205.cpp b/libtk205/test/main_libtk205.cpp index 1e008af..66bd781 100644 --- a/libtk205/test/main_libtk205.cpp +++ b/libtk205/test/main_libtk205.cpp @@ -44,7 +44,7 @@ TEST_F(RS0001Fixture, Calculate_performance_cooling_3) { auto rs = dynamic_cast(rs_.get()); EXPECT_TRUE(rs != nullptr); - auto result = rs->performance.performance_map_cooling.calculate_performance(0.0755, 280.0, 0.0957, 295.0, 0.5).condenser_liquid_leaving_temperature; + auto result = rs->performance.performance_map_cooling.calculate_performance(0.0755, 280.0, 0.0957, 295.0, 0.5, Btwxt::Method::LINEAR).condenser_liquid_leaving_temperature; EXPECT_NEAR(result, 296.03, 0.001); } diff --git a/schema-205 b/schema-205 index 32d1c77..c547d49 160000 --- a/schema-205 +++ b/schema-205 @@ -1 +1 @@ -Subproject commit 32d1c77f7856742aa3e850f995724e6a46d3f070 +Subproject commit c547d49d179d1e28566fc18dd1c377849d15855b From 1aee65fe46d76ff5e8fe94a12ee1592660fc66d7 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Tue, 6 Sep 2022 16:18:55 -0600 Subject: [PATCH 138/154] Change poetry cache. --- .github/workflows/build-and-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index a933316..d564b1c 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -32,7 +32,7 @@ jobs: uses: actions/cache@v2 with: path: .venv - key: poetry-cache-v6-${{ matrix.os }}-py${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} + key: poetry-cache-v0-${{ matrix.os }}-py${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} - name: Install dependencies if cache does not exist run: poetry install if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' From 032c6812403bfac02759e98dcd6c4a6dca46060a Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Fri, 9 Sep 2022 08:44:57 -0600 Subject: [PATCH 139/154] Add test to verify supported schema. --- libtk205/test/fixtures_libtk205.hpp | 10 ++++++++++ libtk205/test/main_libtk205.cpp | 6 ++++++ schema-205 | 2 +- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/libtk205/test/fixtures_libtk205.hpp b/libtk205/test/fixtures_libtk205.hpp index 0c2fe5b..2238749 100644 --- a/libtk205/test/fixtures_libtk205.hpp +++ b/libtk205/test/fixtures_libtk205.hpp @@ -42,6 +42,16 @@ class RS0001BadFixture : public RSFixture } }; +class RS0001UnsupportedFixture : public RSFixture +{ +protected: + RS0001UnsupportedFixture() : RSFixture() + { + RSInstanceFactory::register_factory("RS0001", std::make_shared()); + rs_ = RSInstanceFactory::create("RS0001", TEST205_INPUT_EXAMPLES_DIR "/examples/RS0001/Chiller-Unsupported.RS0001.a205.json"); + } +}; + class RS0001Fixture : public RSFixture { protected: diff --git a/libtk205/test/main_libtk205.cpp b/libtk205/test/main_libtk205.cpp index 66bd781..0917c46 100644 --- a/libtk205/test/main_libtk205.cpp +++ b/libtk205/test/main_libtk205.cpp @@ -13,6 +13,12 @@ TEST_F(RS0001BadFixture, Verify_RS_object) EXPECT_TRUE(rs == nullptr); } +TEST_F(RS0001UnsupportedFixture, Verify_schema_version) +{ + auto rs = dynamic_cast(rs_.get()); + EXPECT_TRUE(rs == nullptr); +} + TEST_F(RS0001Fixture, Check_is_set) { auto rs = dynamic_cast(rs_.get()); diff --git a/schema-205 b/schema-205 index c547d49..acb2d3e 160000 --- a/schema-205 +++ b/schema-205 @@ -1 +1 @@ -Subproject commit c547d49d179d1e28566fc18dd1c377849d15855b +Subproject commit acb2d3e333d486387dcea4ffc0320e5ad53329ea From 104ac849d0994dd65bed690a13bdbb8a68d5805f Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Fri, 9 Sep 2022 08:49:22 -0600 Subject: [PATCH 140/154] Update poetry cache. --- .github/workflows/build-and-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index d564b1c..ce77cae 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -32,7 +32,7 @@ jobs: uses: actions/cache@v2 with: path: .venv - key: poetry-cache-v0-${{ matrix.os }}-py${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} + key: poetry-cache-v1-${{ matrix.os }}-py${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} - name: Install dependencies if cache does not exist run: poetry install if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' From a0531d0ee62da3376c141ae5f42c342f77cb5849 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Wed, 9 Nov 2022 09:35:07 -0700 Subject: [PATCH 141/154] Add test branch with new gtest. --- libtk205/vendor/btwxt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libtk205/vendor/btwxt b/libtk205/vendor/btwxt index 5a93e5d..1b748c9 160000 --- a/libtk205/vendor/btwxt +++ b/libtk205/vendor/btwxt @@ -1 +1 @@ -Subproject commit 5a93e5d7b60815b8ae9d15afc28ce0a1207ca246 +Subproject commit 1b748c9276cc73c0d213fd50025719234713afdd From d2dc38c12895ecc772dc196d018518b5be29f0e1 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Fri, 11 Nov 2022 13:21:24 -0700 Subject: [PATCH 142/154] Remove unused submodules. --- .gitmodules | 9 --------- libtk205/vendor/curlpp | 1 - libtk205/vendor/json-schema-validator | 1 - libtk205/vendor/valijson | 1 - 4 files changed, 12 deletions(-) delete mode 160000 libtk205/vendor/curlpp delete mode 160000 libtk205/vendor/json-schema-validator delete mode 160000 libtk205/vendor/valijson diff --git a/.gitmodules b/.gitmodules index f2b7422..438fbc8 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,12 +7,3 @@ [submodule "libtk205/vendor/btwxt"] path = libtk205/vendor/btwxt url = https://github.com/bigladder/btwxt.git -[submodule "libtk205/vendor/valijson"] - path = libtk205/vendor/valijson - url = https://github.com/tristanpenman/valijson.git -[submodule "libtk205/vendor/curlpp"] - path = libtk205/vendor/curlpp - url = https://github.com/jpbarrette/curlpp.git -[submodule "libtk205/vendor/json-schema-validator"] - path = libtk205/vendor/json-schema-validator - url = https://github.com/pboettch/json-schema-validator.git diff --git a/libtk205/vendor/curlpp b/libtk205/vendor/curlpp deleted file mode 160000 index 5e25a51..0000000 --- a/libtk205/vendor/curlpp +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 5e25a51e8dc75e05b707e08536abee28e0a45738 diff --git a/libtk205/vendor/json-schema-validator b/libtk205/vendor/json-schema-validator deleted file mode 160000 index e1cef0b..0000000 --- a/libtk205/vendor/json-schema-validator +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e1cef0b58b1a89915577ca163fc491c2e84d4b34 diff --git a/libtk205/vendor/valijson b/libtk205/vendor/valijson deleted file mode 160000 index 8a784f2..0000000 --- a/libtk205/vendor/valijson +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 8a784f23bf3ee6a183c450cfb60271b76e0b1b1c From 16225347c53c56e4a112cc9b1143393d5c703e96 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Fri, 11 Nov 2022 13:38:12 -0700 Subject: [PATCH 143/154] Rev cache actions version. --- .github/workflows/build-and-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index ce77cae..cb985c5 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -29,7 +29,7 @@ jobs: virtualenvs-in-project: true - name: Load cached venv if cache exists id: cached-poetry-dependencies - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: .venv key: poetry-cache-v1-${{ matrix.os }}-py${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} From 79aaf17faadc31b7cad58d05ee154f5d8752d3f9 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Tue, 22 Nov 2022 16:04:22 -0700 Subject: [PATCH 144/154] Link to fully-merged schema-205 branch libtk-generator. --- schema-205 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema-205 b/schema-205 index acb2d3e..552faf9 160000 --- a/schema-205 +++ b/schema-205 @@ -1 +1 @@ -Subproject commit acb2d3e333d486387dcea4ffc0320e5ad53329ea +Subproject commit 552faf93df8f225d9d4ca95c6d936cd35b00f151 From 59fc36b72fbf93cbcfa987b4c4c6ac02f1290008 Mon Sep 17 00:00:00 2001 From: Neal Kruis Date: Tue, 22 Nov 2022 16:15:25 -0700 Subject: [PATCH 145/154] Fix for XLSX templates for conditionally required fields. --- poetry.lock | 721 +++++++++++++++++++++++++---------------------- pyproject.toml | 7 +- schema-205 | 2 +- tk205/file_io.py | 4 +- tk205/xlsx.py | 15 +- 5 files changed, 402 insertions(+), 347 deletions(-) diff --git a/poetry.lock b/poetry.lock index 56452a7..2e7b30e 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,131 +1,172 @@ [[package]] name = "astroid" -version = "2.5.3" +version = "2.11.7" description = "An abstract syntax tree for Python with inference support." category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=3.6.2" [package.dependencies] lazy-object-proxy = ">=1.4.0" -typed-ast = {version = ">=1.4.0,<1.5", markers = "implementation_name == \"cpython\" and python_version < \"3.8\""} -wrapt = ">=1.11,<1.13" - -[[package]] -name = "atomicwrites" -version = "1.4.0" -description = "Atomic file writes." -category = "dev" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +typed-ast = {version = ">=1.4.0,<2.0", markers = "implementation_name == \"cpython\" and python_version < \"3.8\""} +typing-extensions = {version = ">=3.10", markers = "python_version < \"3.10\""} +wrapt = ">=1.11,<2" [[package]] name = "attrs" -version = "20.3.0" +version = "22.1.0" description = "Classes Without Boilerplate" category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +python-versions = ">=3.5" [package.extras] -dev = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "zope.interface", "furo", "sphinx", "pre-commit"] -docs = ["furo", "sphinx", "zope.interface"] -tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "zope.interface"] -tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six"] +dev = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "mypy (>=0.900,!=0.940)", "pytest-mypy-plugins", "zope.interface", "furo", "sphinx", "sphinx-notfound-page", "pre-commit", "cloudpickle"] +docs = ["furo", "sphinx", "zope.interface", "sphinx-notfound-page"] +tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "mypy (>=0.900,!=0.940)", "pytest-mypy-plugins", "zope.interface", "cloudpickle"] +tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "mypy (>=0.900,!=0.940)", "pytest-mypy-plugins", "cloudpickle"] [[package]] name = "cbor2" -version = "5.2.0" -description = "Pure Python CBOR (de)serializer with extensive tag support" +version = "5.4.3" +description = "CBOR (de)serializer with extensive tag support" category = "main" optional = false -python-versions = "*" +python-versions = ">=3.7" [package.extras] +doc = ["sphinx-rtd-theme", "sphinx-autodoc-typehints (>=1.2.0)"] test = ["pytest", "pytest-cov"] [[package]] name = "click" -version = "7.1.2" +version = "8.1.3" description = "Composable command line interface toolkit" category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +python-versions = ">=3.7" + +[package.dependencies] +colorama = {version = "*", markers = "platform_system == \"Windows\""} +importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} [[package]] name = "cloudpickle" -version = "1.6.0" +version = "2.2.0" description = "Extended pickling support for Python objects" category = "dev" optional = false -python-versions = ">=3.5" +python-versions = ">=3.6" [[package]] name = "colorama" -version = "0.4.4" +version = "0.4.6" description = "Cross-platform colored terminal text." +category = "main" +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" + +[[package]] +name = "dill" +version = "0.3.6" +description = "serialize all of python" category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +python-versions = ">=3.7" + +[package.extras] +graph = ["objgraph (>=1.7.2)"] [[package]] name = "doit" -version = "0.33.1" +version = "0.34.2" description = "doit - Automation Tool" category = "dev" optional = false -python-versions = ">=3.5" +python-versions = ">=3.6" [package.dependencies] cloudpickle = "*" macfsevents = {version = "*", markers = "sys_platform == \"darwin\""} pyinotify = {version = "*", markers = "sys_platform == \"linux\""} +[package.extras] +plugins = ["setuptools"] +toml = ["toml (>=0.10.1)"] + [[package]] name = "et-xmlfile" -version = "1.0.1" +version = "1.1.0" description = "An implementation of lxml.xmlfile for the standard library" category = "main" optional = false -python-versions = "*" +python-versions = ">=3.6" + +[[package]] +name = "exceptiongroup" +version = "1.0.4" +description = "Backport of PEP 654 (exception groups)" +category = "dev" +optional = false +python-versions = ">=3.7" + +[package.extras] +test = ["pytest (>=6)"] [[package]] name = "gitdb" -version = "4.0.7" +version = "4.0.9" description = "Git Object Database" category = "dev" optional = false -python-versions = ">=3.4" +python-versions = ">=3.6" [package.dependencies] -smmap = ">=3.0.1,<5" +smmap = ">=3.0.1,<6" [[package]] name = "gitpython" -version = "3.1.14" -description = "Python Git Library" +version = "3.1.29" +description = "GitPython is a python library used to interact with Git repositories" category = "dev" optional = false -python-versions = ">=3.4" +python-versions = ">=3.7" [package.dependencies] gitdb = ">=4.0.1,<5" +typing-extensions = {version = ">=3.7.4.3", markers = "python_version < \"3.8\""} [[package]] name = "importlib-metadata" -version = "4.0.0" +version = "5.0.0" description = "Read metadata from Python packages" category = "main" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" [package.dependencies] typing-extensions = {version = ">=3.6.4", markers = "python_version < \"3.8\""} zipp = ">=0.5" [package.extras] -docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] -testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "packaging", "pep517", "pyfakefs", "flufl.flake8", "pytest-black (>=0.3.7)", "pytest-mypy", "importlib-resources (>=1.3)"] +docs = ["sphinx (>=3.5)", "jaraco.packaging (>=9)", "rst.linker (>=1.9)", "furo", "jaraco.tidelift (>=1.4)"] +perf = ["ipython"] +testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "flake8 (<5)", "pytest-cov", "pytest-enabler (>=1.3)", "packaging", "pyfakefs", "flufl.flake8", "pytest-perf (>=0.9.2)", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)", "importlib-resources (>=1.3)"] + +[[package]] +name = "importlib-resources" +version = "5.10.0" +description = "Read resources from Python packages" +category = "main" +optional = false +python-versions = ">=3.7" + +[package.dependencies] +zipp = {version = ">=3.1.0", markers = "python_version < \"3.10\""} + +[package.extras] +docs = ["sphinx (>=3.5)", "jaraco.packaging (>=9)", "rst.linker (>=1.9)", "furo", "jaraco.tidelift (>=1.4)"] +testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "flake8 (<5)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)"] [[package]] name = "iniconfig" @@ -137,56 +178,59 @@ python-versions = "*" [[package]] name = "isort" -version = "5.8.0" +version = "5.10.1" description = "A Python utility / library to sort Python imports." category = "dev" optional = false -python-versions = ">=3.6,<4.0" +python-versions = ">=3.6.1,<4.0" [package.extras] pipfile_deprecated_finder = ["pipreqs", "requirementslib"] requirements_deprecated_finder = ["pipreqs", "pip-api"] colors = ["colorama (>=0.4.3,<0.5.0)"] +plugins = ["setuptools"] [[package]] name = "jinja2" -version = "2.11.3" +version = "3.1.2" description = "A very fast and expressive template engine." category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +python-versions = ">=3.7" [package.dependencies] -MarkupSafe = ">=0.23" +MarkupSafe = ">=2.0" [package.extras] -i18n = ["Babel (>=0.8)"] +i18n = ["Babel (>=2.7)"] [[package]] name = "jsonschema" -version = "3.2.0" +version = "4.17.0" description = "An implementation of JSON Schema validation for Python" category = "main" optional = false -python-versions = "*" +python-versions = ">=3.7" [package.dependencies] attrs = ">=17.4.0" importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} -pyrsistent = ">=0.14.0" -six = ">=1.11.0" +importlib-resources = {version = ">=1.4.0", markers = "python_version < \"3.9\""} +pkgutil-resolve-name = {version = ">=1.3.10", markers = "python_version < \"3.9\""} +pyrsistent = ">=0.14.0,<0.17.0 || >0.17.0,<0.17.1 || >0.17.1,<0.17.2 || >0.17.2" +typing-extensions = {version = "*", markers = "python_version < \"3.8\""} [package.extras] -format = ["idna", "jsonpointer (>1.13)", "rfc3987", "strict-rfc3339", "webcolors"] -format_nongpl = ["idna", "jsonpointer (>1.13)", "webcolors", "rfc3986-validator (>0.1.0)", "rfc3339-validator"] +format = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339-validator", "rfc3987", "uri-template", "webcolors (>=1.11)"] +format-nongpl = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339-validator", "rfc3986-validator (>0.1.0)", "uri-template", "webcolors (>=1.11)"] [[package]] name = "lazy-object-proxy" -version = "1.6.0" +version = "1.8.0" description = "A fast and thorough lazy object proxy." category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" +python-versions = ">=3.7" [[package]] name = "macfsevents" @@ -198,77 +242,90 @@ python-versions = "*" [[package]] name = "markdown" -version = "3.3.4" +version = "3.4.1" description = "Python implementation of Markdown." category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" [package.dependencies] -importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} +importlib-metadata = {version = ">=4.4", markers = "python_version < \"3.10\""} [package.extras] testing = ["coverage", "pyyaml"] [[package]] name = "markupsafe" -version = "1.1.1" +version = "2.1.1" description = "Safely add untrusted strings to HTML/XML markup." category = "main" optional = false -python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*" +python-versions = ">=3.7" [[package]] name = "mccabe" -version = "0.6.1" +version = "0.7.0" description = "McCabe checker, plugin for flake8" category = "dev" optional = false -python-versions = "*" +python-versions = ">=3.6" [[package]] name = "openpyxl" -version = "3.0.7" +version = "3.0.10" description = "A Python library to read/write Excel 2010 xlsx/xlsm files" category = "main" optional = false -python-versions = ">=3.6," +python-versions = ">=3.6" [package.dependencies] et-xmlfile = "*" [[package]] name = "packaging" -version = "20.9" +version = "21.3" description = "Core utilities for Python packages" category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +python-versions = ">=3.6" [package.dependencies] -pyparsing = ">=2.0.2" +pyparsing = ">=2.0.2,<3.0.5 || >3.0.5" + +[[package]] +name = "pkgutil-resolve-name" +version = "1.3.10" +description = "Resolve a name to an object." +category = "main" +optional = false +python-versions = ">=3.6" + +[[package]] +name = "platformdirs" +version = "2.5.4" +description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." +category = "dev" +optional = false +python-versions = ">=3.7" + +[package.extras] +docs = ["furo (>=2022.9.29)", "proselint (>=0.13)", "sphinx-autodoc-typehints (>=1.19.4)", "sphinx (>=5.3)"] +test = ["appdirs (==1.4.4)", "pytest-cov (>=4)", "pytest-mock (>=3.10)", "pytest (>=7.2)"] [[package]] name = "pluggy" -version = "0.13.1" +version = "1.0.0" description = "plugin and hook calling mechanisms for python" category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +python-versions = ">=3.6" [package.dependencies] importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} [package.extras] -dev = ["pre-commit", "tox"] - -[[package]] -name = "py" -version = "1.10.0" -description = "library with cross-python path, ini-parsing, io, code, log facilities" -category = "dev" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +testing = ["pytest-benchmark", "pytest"] +dev = ["tox", "pre-commit"] [[package]] name = "pyinotify" @@ -280,75 +337,80 @@ python-versions = "*" [[package]] name = "pylint" -version = "2.7.4" +version = "2.13.9" description = "python code static checker" category = "dev" optional = false -python-versions = "~=3.6" +python-versions = ">=3.6.2" [package.dependencies] -astroid = ">=2.5.2,<2.7" +astroid = ">=2.11.5,<=2.12.0-dev0" colorama = {version = "*", markers = "sys_platform == \"win32\""} +dill = ">=0.2" isort = ">=4.2.5,<6" -mccabe = ">=0.6,<0.7" -toml = ">=0.7.1" +mccabe = ">=0.6,<0.8" +platformdirs = ">=2.2.0" +tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} +typing-extensions = {version = ">=3.10.0", markers = "python_version < \"3.10\""} [package.extras] -docs = ["sphinx (==3.5.1)", "python-docs-theme (==2020.12)"] +testutil = ["gitpython (>3)"] [[package]] name = "pyparsing" -version = "2.4.7" -description = "Python parsing module" +version = "3.0.9" +description = "pyparsing module - Classes and methods to define and execute parsing grammars" category = "dev" optional = false -python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" +python-versions = ">=3.6.8" + +[package.extras] +diagrams = ["railroad-diagrams", "jinja2"] [[package]] name = "pyrsistent" -version = "0.17.3" +version = "0.19.2" description = "Persistent/Functional/Immutable data structures" category = "main" optional = false -python-versions = ">=3.5" +python-versions = ">=3.7" [[package]] name = "pytest" -version = "6.2.3" +version = "7.2.0" description = "pytest: simple powerful testing with Python" category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" [package.dependencies] -atomicwrites = {version = ">=1.0", markers = "sys_platform == \"win32\""} attrs = ">=19.2.0" colorama = {version = "*", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} iniconfig = "*" packaging = "*" -pluggy = ">=0.12,<1.0.0a1" -py = ">=1.8.2" -toml = "*" +pluggy = ">=0.12,<2.0" +tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xmlschema"] +testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "xmlschema"] [[package]] name = "pyyaml" -version = "5.4.1" +version = "6.0" description = "YAML parser and emitter for Python" category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" +python-versions = ">=3.6" [[package]] name = "schema205" -version = "0.1.0" +version = "1.0.0" description = "" category = "main" optional = false -python-versions = "^3.6" +python-versions = "^3.7" develop = true [package.dependencies] @@ -360,334 +422,325 @@ pyyaml = "*" type = "directory" url = "schema-205" -[[package]] -name = "six" -version = "1.15.0" -description = "Python 2 and 3 compatibility utilities" -category = "main" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" - [[package]] name = "smmap" -version = "4.0.0" +version = "5.0.0" description = "A pure Python implementation of a sliding window memory map manager" category = "dev" optional = false -python-versions = ">=3.5" +python-versions = ">=3.6" [[package]] -name = "toml" -version = "0.10.2" -description = "Python Library for Tom's Obvious, Minimal Language" +name = "tomli" +version = "2.0.1" +description = "A lil' TOML parser" category = "dev" optional = false -python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" +python-versions = ">=3.7" [[package]] name = "typed-ast" -version = "1.4.3" +version = "1.5.4" description = "a fork of Python 2 and 3 ast modules with type comment support" category = "dev" optional = false -python-versions = "*" +python-versions = ">=3.6" [[package]] name = "typing-extensions" -version = "3.7.4.3" -description = "Backported and Experimental Type Hints for Python 3.5+" +version = "4.4.0" +description = "Backported and Experimental Type Hints for Python 3.7+" category = "main" optional = false -python-versions = "*" +python-versions = ">=3.7" [[package]] name = "wrapt" -version = "1.12.1" +version = "1.14.1" description = "Module for decorators, wrappers and monkey patching." category = "dev" optional = false -python-versions = "*" +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" [[package]] name = "zipp" -version = "3.4.1" +version = "3.10.0" description = "Backport of pathlib-compatible object wrapper for zip files" category = "main" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" [package.extras] -docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] -testing = ["pytest (>=4.6)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pytest-cov", "pytest-enabler", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy"] +docs = ["sphinx (>=3.5)", "jaraco.packaging (>=9)", "rst.linker (>=1.9)", "furo", "jaraco.tidelift (>=1.4)"] +testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "flake8 (<5)", "pytest-cov", "pytest-enabler (>=1.3)", "jaraco.itertools", "func-timeout", "jaraco.functools", "more-itertools", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)"] [metadata] lock-version = "1.1" -python-versions = "^3.6" -content-hash = "2c5c9c7a982da68ad32260baf6303898e2c2fd66663f195159e199041e72536f" +python-versions = "^3.7" +content-hash = "511dd41bafe11d1b8ceb322e238b5d6a717127c4c1e04f1b44846842c8e32d17" [metadata.files] -astroid = [ - {file = "astroid-2.5.3-py3-none-any.whl", hash = "sha256:bea3f32799fbb8581f58431c12591bc20ce11cbc90ad82e2ea5717d94f2080d5"}, - {file = "astroid-2.5.3.tar.gz", hash = "sha256:ad63b8552c70939568966811a088ef0bc880f99a24a00834abd0e3681b514f91"}, -] -atomicwrites = [ - {file = "atomicwrites-1.4.0-py2.py3-none-any.whl", hash = "sha256:6d1784dea7c0c8d4a5172b6c620f40b6e4cbfdf96d783691f2e1302a7b88e197"}, - {file = "atomicwrites-1.4.0.tar.gz", hash = "sha256:ae70396ad1a434f9c7046fd2dd196fc04b12f9e91ffb859164193be8b6168a7a"}, -] +astroid = [] attrs = [ - {file = "attrs-20.3.0-py2.py3-none-any.whl", hash = "sha256:31b2eced602aa8423c2aea9c76a724617ed67cf9513173fd3a4f03e3a929c7e6"}, - {file = "attrs-20.3.0.tar.gz", hash = "sha256:832aa3cde19744e49938b91fea06d69ecb9e649c93ba974535d08ad92164f700"}, + {file = "attrs-22.1.0-py2.py3-none-any.whl", hash = "sha256:86efa402f67bf2df34f51a335487cf46b1ec130d02b8d39fd248abfd30da551c"}, + {file = "attrs-22.1.0.tar.gz", hash = "sha256:29adc2665447e5191d0e7c568fde78b21f9672d344281d0c6e1ab085429b22b6"}, ] cbor2 = [ - {file = "cbor2-5.2.0.tar.gz", hash = "sha256:a33aa2e5534fd74401ac95686886e655e3b2ce6383b3f958199b6e70a87c94bf"}, + {file = "cbor2-5.4.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:8a643b19ace1584043bbf4e2d0b4fae8bebd6b6ffab14ea6478d3ff07f58e854"}, + {file = "cbor2-5.4.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e10f2f4fcf5ab6a8b24d22f7109f48cad8143f669795899370170d7b36ed309f"}, + {file = "cbor2-5.4.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2de925608dc6d73cd1aab08800bff38f71f90459c15db3a71a67023b0fc697da"}, + {file = "cbor2-5.4.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:62fc15bfe187e4994c457e6055687514c417d6099de62dd33ae766561f05847e"}, + {file = "cbor2-5.4.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:3843a9bb970343e9c896aa71a34fa80983cd0ddec6eacdb2284b5e83f4ee7511"}, + {file = "cbor2-5.4.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:b35c5d4d14fe804f718d5a5968a528970d2a7046aa87045538f189a98e5c7055"}, + {file = "cbor2-5.4.3-cp310-cp310-win_amd64.whl", hash = "sha256:0a3a1b2f6b83ab4ce806df48360cc16d34cd315f17549dbda9fdd371bea04497"}, + {file = "cbor2-5.4.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:4b09ff6148a8cd529512479a1d6521fb7687fb03b448973933c3b03711d00bfc"}, + {file = "cbor2-5.4.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d21ccd1ec802e88dba1c373724a09538a0237116ab589c5301ca4c59478f7c10"}, + {file = "cbor2-5.4.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c07975f956baddb8dfeca4966f1871fd2482cb36af24c461f763732a44675225"}, + {file = "cbor2-5.4.3-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:9538ab1b4207e76ee02a52362d77e312921ec1dc75b6fb42182887d87d0ca53e"}, + {file = "cbor2-5.4.3-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:cbca58220f52fd50d8985e4079e10c71196d538fb6685f157f608a29253409a4"}, + {file = "cbor2-5.4.3-cp37-cp37m-win_amd64.whl", hash = "sha256:c617c7f94936d65ed9c8e99c6c03e3dc83313d69c6bfea810014ec658e9b1a9d"}, + {file = "cbor2-5.4.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:70789805b9aebd215626188aa05bb09908ed51e3268d4db5ae6a08276efdbcb1"}, + {file = "cbor2-5.4.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:0e4ae67a697c664b579b87c4ef9d60e26c146b95bff443a9a38abb16f6981ff0"}, + {file = "cbor2-5.4.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ab6c934806759d453a9bb5318f2703c831e736be005ac35d5bd5cf2093ba57b1"}, + {file = "cbor2-5.4.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:981b9ffc4f2947a0f030e71ce5eac31334bc81369dd57c6c1273c94c6cdb0b5a"}, + {file = "cbor2-5.4.3-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:cbe7cdeed26cd8ec2dcfed2b8876bc137ad8b9e0abb07aa5fb05770148a4b5c7"}, + {file = "cbor2-5.4.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:6bc8c5606aa0ae510bdb3c7d987f92df39ef87d09e0f0588a4d1daffd3cb0453"}, + {file = "cbor2-5.4.3-cp38-cp38-win_amd64.whl", hash = "sha256:5c50da4702ac5ca3a8e7cb9f34f62b4ea91bc81b76c2fba03888b366da299cd8"}, + {file = "cbor2-5.4.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:37ae0ce5afe864d1a1c5b05becaf8aaca7b7131cb7b0b935d7e79b29fb1cea28"}, + {file = "cbor2-5.4.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:2f30f7ef329ea6ec630ceabe5a539fed407b9c81e27e2322644e3efbbd1b2a76"}, + {file = "cbor2-5.4.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d549abea7115c8a0d7c61a31a895c031f902a7b4c875f9efd8ce41e466baf83a"}, + {file = "cbor2-5.4.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6fab0e00c28305db59f7005150447d08dd13da6a82695a2132c28beba590fd2c"}, + {file = "cbor2-5.4.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:20291dad09cf9c4e5f434d376dd9d60f5ab5e066b308005f50e7c5e22e504214"}, + {file = "cbor2-5.4.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5aaf3406c9d661d11f87e792edb9a38561dba1441afba7fb883d6d963e67f32c"}, + {file = "cbor2-5.4.3-cp39-cp39-win_amd64.whl", hash = "sha256:4e8590193fcbbb9477010ca0f094f6540a5e723965c90eea7a37edbe75f0ec4d"}, + {file = "cbor2-5.4.3.tar.gz", hash = "sha256:62b863c5ee6ced4032afe948f3c1484f375550995d3b8498145237fe28e546c2"}, ] click = [ - {file = "click-7.1.2-py2.py3-none-any.whl", hash = "sha256:dacca89f4bfadd5de3d7489b7c8a566eee0d3676333fbb50030263894c38c0dc"}, - {file = "click-7.1.2.tar.gz", hash = "sha256:d2b5255c7c6349bc1bd1e59e08cd12acbbd63ce649f2588755783aa94dfb6b1a"}, + {file = "click-8.1.3-py3-none-any.whl", hash = "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48"}, + {file = "click-8.1.3.tar.gz", hash = "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e"}, ] cloudpickle = [ - {file = "cloudpickle-1.6.0-py3-none-any.whl", hash = "sha256:3a32d0eb0bc6f4d0c57fbc4f3e3780f7a81e6fee0fa935072884d58ae8e1cc7c"}, - {file = "cloudpickle-1.6.0.tar.gz", hash = "sha256:9bc994f9e9447593bd0a45371f0e7ac7333710fcf64a4eb9834bf149f4ef2f32"}, + {file = "cloudpickle-2.2.0-py3-none-any.whl", hash = "sha256:7428798d5926d8fcbfd092d18d01a2a03daf8237d8fcdc8095d256b8490796f0"}, + {file = "cloudpickle-2.2.0.tar.gz", hash = "sha256:3f4219469c55453cfe4737e564b67c2a149109dabf7f242478948b895f61106f"}, ] colorama = [ - {file = "colorama-0.4.4-py2.py3-none-any.whl", hash = "sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2"}, - {file = "colorama-0.4.4.tar.gz", hash = "sha256:5941b2b48a20143d2267e95b1c2a7603ce057ee39fd88e7329b0c292aa16869b"}, + {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, + {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, +] +dill = [ + {file = "dill-0.3.6-py3-none-any.whl", hash = "sha256:a07ffd2351b8c678dfc4a856a3005f8067aea51d6ba6c700796a4d9e280f39f0"}, + {file = "dill-0.3.6.tar.gz", hash = "sha256:e5db55f3687856d8fbdab002ed78544e1c4559a130302693d839dfe8f93f2373"}, ] doit = [ - {file = "doit-0.33.1-py3-none-any.whl", hash = "sha256:211fc0de3fd9ee31e5c4ccb36bc1a4054b5c4a4a44f915ca413896155b684bfa"}, - {file = "doit-0.33.1.tar.gz", hash = "sha256:37c3b35c2151647b968b2af24481112b2f813c30f695366db0639d529190a143"}, + {file = "doit-0.34.2-py3-none-any.whl", hash = "sha256:a7f414de4c596a96a727890e0792709a103f1af48e8180e27e07862fff781238"}, + {file = "doit-0.34.2.tar.gz", hash = "sha256:388111f8a6a5b3b44620ceeb287d0585927c85d0d6d3f8790d34fbb45c0cf6c3"}, ] et-xmlfile = [ - {file = "et_xmlfile-1.0.1.tar.gz", hash = "sha256:614d9722d572f6246302c4491846d2c393c199cfa4edc9af593437691683335b"}, + {file = "et_xmlfile-1.1.0-py3-none-any.whl", hash = "sha256:a2ba85d1d6a74ef63837eed693bcb89c3f752169b0e3e7ae5b16ca5e1b3deada"}, + {file = "et_xmlfile-1.1.0.tar.gz", hash = "sha256:8eb9e2bc2f8c97e37a2dc85a09ecdcdec9d8a396530a6d5a33b30b9a92da0c5c"}, +] +exceptiongroup = [ + {file = "exceptiongroup-1.0.4-py3-none-any.whl", hash = "sha256:542adf9dea4055530d6e1279602fa5cb11dab2395fa650b8674eaec35fc4a828"}, + {file = "exceptiongroup-1.0.4.tar.gz", hash = "sha256:bd14967b79cd9bdb54d97323216f8fdf533e278df937aa2a90089e7d6e06e5ec"}, ] gitdb = [ - {file = "gitdb-4.0.7-py3-none-any.whl", hash = "sha256:6c4cc71933456991da20917998acbe6cf4fb41eeaab7d6d67fbc05ecd4c865b0"}, - {file = "gitdb-4.0.7.tar.gz", hash = "sha256:96bf5c08b157a666fec41129e6d327235284cca4c81e92109260f353ba138005"}, + {file = "gitdb-4.0.9-py3-none-any.whl", hash = "sha256:8033ad4e853066ba6ca92050b9df2f89301b8fc8bf7e9324d412a63f8bf1a8fd"}, + {file = "gitdb-4.0.9.tar.gz", hash = "sha256:bac2fd45c0a1c9cf619e63a90d62bdc63892ef92387424b855792a6cabe789aa"}, ] gitpython = [ - {file = "GitPython-3.1.14-py3-none-any.whl", hash = "sha256:3283ae2fba31c913d857e12e5ba5f9a7772bbc064ae2bb09efafa71b0dd4939b"}, - {file = "GitPython-3.1.14.tar.gz", hash = "sha256:be27633e7509e58391f10207cd32b2a6cf5b908f92d9cd30da2e514e1137af61"}, + {file = "GitPython-3.1.29-py3-none-any.whl", hash = "sha256:41eea0deec2deea139b459ac03656f0dd28fc4a3387240ec1d3c259a2c47850f"}, + {file = "GitPython-3.1.29.tar.gz", hash = "sha256:cc36bfc4a3f913e66805a28e84703e419d9c264c1077e537b54f0e1af85dbefd"}, ] importlib-metadata = [ - {file = "importlib_metadata-4.0.0-py3-none-any.whl", hash = "sha256:19192b88d959336bfa6bdaaaef99aeafec179eca19c47c804e555703ee5f07ef"}, - {file = "importlib_metadata-4.0.0.tar.gz", hash = "sha256:2e881981c9748d7282b374b68e759c87745c25427b67ecf0cc67fb6637a1bff9"}, + {file = "importlib_metadata-5.0.0-py3-none-any.whl", hash = "sha256:ddb0e35065e8938f867ed4928d0ae5bf2a53b7773871bfe6bcc7e4fcdc7dea43"}, + {file = "importlib_metadata-5.0.0.tar.gz", hash = "sha256:da31db32b304314d044d3c12c79bd59e307889b287ad12ff387b3500835fc2ab"}, +] +importlib-resources = [ + {file = "importlib_resources-5.10.0-py3-none-any.whl", hash = "sha256:ee17ec648f85480d523596ce49eae8ead87d5631ae1551f913c0100b5edd3437"}, + {file = "importlib_resources-5.10.0.tar.gz", hash = "sha256:c01b1b94210d9849f286b86bb51bcea7cd56dde0600d8db721d7b81330711668"}, ] iniconfig = [ {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"}, {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"}, ] -isort = [ - {file = "isort-5.8.0-py3-none-any.whl", hash = "sha256:2bb1680aad211e3c9944dbce1d4ba09a989f04e238296c87fe2139faa26d655d"}, - {file = "isort-5.8.0.tar.gz", hash = "sha256:0a943902919f65c5684ac4e0154b1ad4fac6dcaa5d9f3426b732f1c8b5419be6"}, -] +isort = [] jinja2 = [ - {file = "Jinja2-2.11.3-py2.py3-none-any.whl", hash = "sha256:03e47ad063331dd6a3f04a43eddca8a966a26ba0c5b7207a9a9e4e08f1b29419"}, - {file = "Jinja2-2.11.3.tar.gz", hash = "sha256:a6d58433de0ae800347cab1fa3043cebbabe8baa9d29e668f1c768cb87a333c6"}, + {file = "Jinja2-3.1.2-py3-none-any.whl", hash = "sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61"}, + {file = "Jinja2-3.1.2.tar.gz", hash = "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852"}, ] jsonschema = [ - {file = "jsonschema-3.2.0-py2.py3-none-any.whl", hash = "sha256:4e5b3cf8216f577bee9ce139cbe72eca3ea4f292ec60928ff24758ce626cd163"}, - {file = "jsonschema-3.2.0.tar.gz", hash = "sha256:c8a85b28d377cc7737e46e2d9f2b4f44ee3c0e1deac6bf46ddefc7187d30797a"}, + {file = "jsonschema-4.17.0-py3-none-any.whl", hash = "sha256:f660066c3966db7d6daeaea8a75e0b68237a48e51cf49882087757bb59916248"}, + {file = "jsonschema-4.17.0.tar.gz", hash = "sha256:5bfcf2bca16a087ade17e02b282d34af7ccd749ef76241e7f9bd7c0cb8a9424d"}, ] lazy-object-proxy = [ - {file = "lazy-object-proxy-1.6.0.tar.gz", hash = "sha256:489000d368377571c6f982fba6497f2aa13c6d1facc40660963da62f5c379726"}, - {file = "lazy_object_proxy-1.6.0-cp27-cp27m-macosx_10_14_x86_64.whl", hash = "sha256:c6938967f8528b3668622a9ed3b31d145fab161a32f5891ea7b84f6b790be05b"}, - {file = "lazy_object_proxy-1.6.0-cp27-cp27m-win32.whl", hash = "sha256:ebfd274dcd5133e0afae738e6d9da4323c3eb021b3e13052d8cbd0e457b1256e"}, - {file = "lazy_object_proxy-1.6.0-cp27-cp27m-win_amd64.whl", hash = "sha256:ed361bb83436f117f9917d282a456f9e5009ea12fd6de8742d1a4752c3017e93"}, - {file = "lazy_object_proxy-1.6.0-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:d900d949b707778696fdf01036f58c9876a0d8bfe116e8d220cfd4b15f14e741"}, - {file = "lazy_object_proxy-1.6.0-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:5743a5ab42ae40caa8421b320ebf3a998f89c85cdc8376d6b2e00bd12bd1b587"}, - {file = "lazy_object_proxy-1.6.0-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:bf34e368e8dd976423396555078def5cfc3039ebc6fc06d1ae2c5a65eebbcde4"}, - {file = "lazy_object_proxy-1.6.0-cp36-cp36m-win32.whl", hash = "sha256:b579f8acbf2bdd9ea200b1d5dea36abd93cabf56cf626ab9c744a432e15c815f"}, - {file = "lazy_object_proxy-1.6.0-cp36-cp36m-win_amd64.whl", hash = "sha256:4f60460e9f1eb632584c9685bccea152f4ac2130e299784dbaf9fae9f49891b3"}, - {file = "lazy_object_proxy-1.6.0-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:d7124f52f3bd259f510651450e18e0fd081ed82f3c08541dffc7b94b883aa981"}, - {file = "lazy_object_proxy-1.6.0-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:22ddd618cefe54305df49e4c069fa65715be4ad0e78e8d252a33debf00f6ede2"}, - {file = "lazy_object_proxy-1.6.0-cp37-cp37m-win32.whl", hash = "sha256:9d397bf41caad3f489e10774667310d73cb9c4258e9aed94b9ec734b34b495fd"}, - {file = "lazy_object_proxy-1.6.0-cp37-cp37m-win_amd64.whl", hash = "sha256:24a5045889cc2729033b3e604d496c2b6f588c754f7a62027ad4437a7ecc4837"}, - {file = "lazy_object_proxy-1.6.0-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:17e0967ba374fc24141738c69736da90e94419338fd4c7c7bef01ee26b339653"}, - {file = "lazy_object_proxy-1.6.0-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:410283732af311b51b837894fa2f24f2c0039aa7f220135192b38fcc42bd43d3"}, - {file = "lazy_object_proxy-1.6.0-cp38-cp38-win32.whl", hash = "sha256:85fb7608121fd5621cc4377a8961d0b32ccf84a7285b4f1d21988b2eae2868e8"}, - {file = "lazy_object_proxy-1.6.0-cp38-cp38-win_amd64.whl", hash = "sha256:d1c2676e3d840852a2de7c7d5d76407c772927addff8d742b9808fe0afccebdf"}, - {file = "lazy_object_proxy-1.6.0-cp39-cp39-macosx_10_14_x86_64.whl", hash = "sha256:b865b01a2e7f96db0c5d12cfea590f98d8c5ba64ad222300d93ce6ff9138bcad"}, - {file = "lazy_object_proxy-1.6.0-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:4732c765372bd78a2d6b2150a6e99d00a78ec963375f236979c0626b97ed8e43"}, - {file = "lazy_object_proxy-1.6.0-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:9698110e36e2df951c7c36b6729e96429c9c32b3331989ef19976592c5f3c77a"}, - {file = "lazy_object_proxy-1.6.0-cp39-cp39-win32.whl", hash = "sha256:1fee665d2638491f4d6e55bd483e15ef21f6c8c2095f235fef72601021e64f61"}, - {file = "lazy_object_proxy-1.6.0-cp39-cp39-win_amd64.whl", hash = "sha256:f5144c75445ae3ca2057faac03fda5a902eff196702b0a24daf1d6ce0650514b"}, + {file = "lazy-object-proxy-1.8.0.tar.gz", hash = "sha256:c219a00245af0f6fa4e95901ed28044544f50152840c5b6a3e7b2568db34d156"}, + {file = "lazy_object_proxy-1.8.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:4fd031589121ad46e293629b39604031d354043bb5cdf83da4e93c2d7f3389fe"}, + {file = "lazy_object_proxy-1.8.0-cp310-cp310-win32.whl", hash = "sha256:b70d6e7a332eb0217e7872a73926ad4fdc14f846e85ad6749ad111084e76df25"}, + {file = "lazy_object_proxy-1.8.0-cp310-cp310-win_amd64.whl", hash = "sha256:eb329f8d8145379bf5dbe722182410fe8863d186e51bf034d2075eb8d85ee25b"}, + {file = "lazy_object_proxy-1.8.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:4e2d9f764f1befd8bdc97673261b8bb888764dfdbd7a4d8f55e4fbcabb8c3fb7"}, + {file = "lazy_object_proxy-1.8.0-cp311-cp311-win32.whl", hash = "sha256:e20bfa6db17a39c706d24f82df8352488d2943a3b7ce7d4c22579cb89ca8896e"}, + {file = "lazy_object_proxy-1.8.0-cp311-cp311-win_amd64.whl", hash = "sha256:14010b49a2f56ec4943b6cf925f597b534ee2fe1f0738c84b3bce0c1a11ff10d"}, + {file = "lazy_object_proxy-1.8.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:6850e4aeca6d0df35bb06e05c8b934ff7c533734eb51d0ceb2d63696f1e6030c"}, + {file = "lazy_object_proxy-1.8.0-cp37-cp37m-win32.whl", hash = "sha256:5b51d6f3bfeb289dfd4e95de2ecd464cd51982fe6f00e2be1d0bf94864d58acd"}, + {file = "lazy_object_proxy-1.8.0-cp37-cp37m-win_amd64.whl", hash = "sha256:6f593f26c470a379cf7f5bc6db6b5f1722353e7bf937b8d0d0b3fba911998858"}, + {file = "lazy_object_proxy-1.8.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0c1c7c0433154bb7c54185714c6929acc0ba04ee1b167314a779b9025517eada"}, + {file = "lazy_object_proxy-1.8.0-cp38-cp38-win32.whl", hash = "sha256:d176f392dbbdaacccf15919c77f526edf11a34aece58b55ab58539807b85436f"}, + {file = "lazy_object_proxy-1.8.0-cp38-cp38-win_amd64.whl", hash = "sha256:afcaa24e48bb23b3be31e329deb3f1858f1f1df86aea3d70cb5c8578bfe5261c"}, + {file = "lazy_object_proxy-1.8.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:71d9ae8a82203511a6f60ca5a1b9f8ad201cac0fc75038b2dc5fa519589c9288"}, + {file = "lazy_object_proxy-1.8.0-cp39-cp39-win32.whl", hash = "sha256:8f6ce2118a90efa7f62dd38c7dbfffd42f468b180287b748626293bf12ed468f"}, + {file = "lazy_object_proxy-1.8.0-cp39-cp39-win_amd64.whl", hash = "sha256:eac3a9a5ef13b332c059772fd40b4b1c3d45a3a2b05e33a361dee48e54a4dad0"}, + {file = "lazy_object_proxy-1.8.0-pp37-pypy37_pp73-any.whl", hash = "sha256:ae032743794fba4d171b5b67310d69176287b5bf82a21f588282406a79498891"}, + {file = "lazy_object_proxy-1.8.0-pp38-pypy38_pp73-any.whl", hash = "sha256:7e1561626c49cb394268edd00501b289053a652ed762c58e1081224c8d881cec"}, + {file = "lazy_object_proxy-1.8.0-pp39-pypy39_pp73-any.whl", hash = "sha256:ce58b2b3734c73e68f0e30e4e725264d4d6be95818ec0a0be4bb6bf9a7e79aa8"}, ] macfsevents = [ {file = "MacFSEvents-0.8.1.tar.gz", hash = "sha256:1324b66b356051de662ba87d84f73ada062acd42b047ed1246e60a449f833e10"}, ] markdown = [ - {file = "Markdown-3.3.4-py3-none-any.whl", hash = "sha256:96c3ba1261de2f7547b46a00ea8463832c921d3f9d6aba3f255a6f71386db20c"}, - {file = "Markdown-3.3.4.tar.gz", hash = "sha256:31b5b491868dcc87d6c24b7e3d19a0d730d59d3e46f4eea6430a321bed387a49"}, + {file = "Markdown-3.4.1-py3-none-any.whl", hash = "sha256:08fb8465cffd03d10b9dd34a5c3fea908e20391a2a90b88d66362cb05beed186"}, + {file = "Markdown-3.4.1.tar.gz", hash = "sha256:3b809086bb6efad416156e00a0da66fe47618a5d6918dd688f53f40c8e4cfeff"}, ] markupsafe = [ - {file = "MarkupSafe-1.1.1-cp27-cp27m-macosx_10_6_intel.whl", hash = "sha256:09027a7803a62ca78792ad89403b1b7a73a01c8cb65909cd876f7fcebd79b161"}, - {file = "MarkupSafe-1.1.1-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:e249096428b3ae81b08327a63a485ad0878de3fb939049038579ac0ef61e17e7"}, - {file = "MarkupSafe-1.1.1-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:500d4957e52ddc3351cabf489e79c91c17f6e0899158447047588650b5e69183"}, - {file = "MarkupSafe-1.1.1-cp27-cp27m-win32.whl", hash = "sha256:b2051432115498d3562c084a49bba65d97cf251f5a331c64a12ee7e04dacc51b"}, - {file = "MarkupSafe-1.1.1-cp27-cp27m-win_amd64.whl", hash = "sha256:98c7086708b163d425c67c7a91bad6e466bb99d797aa64f965e9d25c12111a5e"}, - {file = "MarkupSafe-1.1.1-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:cd5df75523866410809ca100dc9681e301e3c27567cf498077e8551b6d20e42f"}, - {file = "MarkupSafe-1.1.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:43a55c2930bbc139570ac2452adf3d70cdbb3cfe5912c71cdce1c2c6bbd9c5d1"}, - {file = "MarkupSafe-1.1.1-cp34-cp34m-macosx_10_6_intel.whl", hash = "sha256:1027c282dad077d0bae18be6794e6b6b8c91d58ed8a8d89a89d59693b9131db5"}, - {file = "MarkupSafe-1.1.1-cp34-cp34m-manylinux1_i686.whl", hash = "sha256:62fe6c95e3ec8a7fad637b7f3d372c15ec1caa01ab47926cfdf7a75b40e0eac1"}, - {file = "MarkupSafe-1.1.1-cp34-cp34m-manylinux1_x86_64.whl", hash = "sha256:88e5fcfb52ee7b911e8bb6d6aa2fd21fbecc674eadd44118a9cc3863f938e735"}, - {file = "MarkupSafe-1.1.1-cp34-cp34m-win32.whl", hash = "sha256:ade5e387d2ad0d7ebf59146cc00c8044acbd863725f887353a10df825fc8ae21"}, - {file = "MarkupSafe-1.1.1-cp34-cp34m-win_amd64.whl", hash = "sha256:09c4b7f37d6c648cb13f9230d847adf22f8171b1ccc4d5682398e77f40309235"}, - {file = "MarkupSafe-1.1.1-cp35-cp35m-macosx_10_6_intel.whl", hash = "sha256:79855e1c5b8da654cf486b830bd42c06e8780cea587384cf6545b7d9ac013a0b"}, - {file = "MarkupSafe-1.1.1-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:c8716a48d94b06bb3b2524c2b77e055fb313aeb4ea620c8dd03a105574ba704f"}, - {file = "MarkupSafe-1.1.1-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:7c1699dfe0cf8ff607dbdcc1e9b9af1755371f92a68f706051cc8c37d447c905"}, - {file = "MarkupSafe-1.1.1-cp35-cp35m-win32.whl", hash = "sha256:6dd73240d2af64df90aa7c4e7481e23825ea70af4b4922f8ede5b9e35f78a3b1"}, - {file = "MarkupSafe-1.1.1-cp35-cp35m-win_amd64.whl", hash = "sha256:9add70b36c5666a2ed02b43b335fe19002ee5235efd4b8a89bfcf9005bebac0d"}, - {file = "MarkupSafe-1.1.1-cp36-cp36m-macosx_10_6_intel.whl", hash = "sha256:24982cc2533820871eba85ba648cd53d8623687ff11cbb805be4ff7b4c971aff"}, - {file = "MarkupSafe-1.1.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:d53bc011414228441014aa71dbec320c66468c1030aae3a6e29778a3382d96e5"}, - {file = "MarkupSafe-1.1.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:00bc623926325b26bb9605ae9eae8a215691f33cae5df11ca5424f06f2d1f473"}, - {file = "MarkupSafe-1.1.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:717ba8fe3ae9cc0006d7c451f0bb265ee07739daf76355d06366154ee68d221e"}, - {file = "MarkupSafe-1.1.1-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:3b8a6499709d29c2e2399569d96719a1b21dcd94410a586a18526b143ec8470f"}, - {file = "MarkupSafe-1.1.1-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:84dee80c15f1b560d55bcfe6d47b27d070b4681c699c572af2e3c7cc90a3b8e0"}, - {file = "MarkupSafe-1.1.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:b1dba4527182c95a0db8b6060cc98ac49b9e2f5e64320e2b56e47cb2831978c7"}, - {file = "MarkupSafe-1.1.1-cp36-cp36m-win32.whl", hash = "sha256:535f6fc4d397c1563d08b88e485c3496cf5784e927af890fb3c3aac7f933ec66"}, - {file = "MarkupSafe-1.1.1-cp36-cp36m-win_amd64.whl", hash = "sha256:b1282f8c00509d99fef04d8ba936b156d419be841854fe901d8ae224c59f0be5"}, - {file = "MarkupSafe-1.1.1-cp37-cp37m-macosx_10_6_intel.whl", hash = "sha256:8defac2f2ccd6805ebf65f5eeb132adcf2ab57aa11fdf4c0dd5169a004710e7d"}, - {file = "MarkupSafe-1.1.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:bf5aa3cbcfdf57fa2ee9cd1822c862ef23037f5c832ad09cfea57fa846dec193"}, - {file = "MarkupSafe-1.1.1-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:46c99d2de99945ec5cb54f23c8cd5689f6d7177305ebff350a58ce5f8de1669e"}, - {file = "MarkupSafe-1.1.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:ba59edeaa2fc6114428f1637ffff42da1e311e29382d81b339c1817d37ec93c6"}, - {file = "MarkupSafe-1.1.1-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:6fffc775d90dcc9aed1b89219549b329a9250d918fd0b8fa8d93d154918422e1"}, - {file = "MarkupSafe-1.1.1-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:a6a744282b7718a2a62d2ed9d993cad6f5f585605ad352c11de459f4108df0a1"}, - {file = "MarkupSafe-1.1.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:195d7d2c4fbb0ee8139a6cf67194f3973a6b3042d742ebe0a9ed36d8b6f0c07f"}, - {file = "MarkupSafe-1.1.1-cp37-cp37m-win32.whl", hash = "sha256:b00c1de48212e4cc9603895652c5c410df699856a2853135b3967591e4beebc2"}, - {file = "MarkupSafe-1.1.1-cp37-cp37m-win_amd64.whl", hash = "sha256:9bf40443012702a1d2070043cb6291650a0841ece432556f784f004937f0f32c"}, - {file = "MarkupSafe-1.1.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6788b695d50a51edb699cb55e35487e430fa21f1ed838122d722e0ff0ac5ba15"}, - {file = "MarkupSafe-1.1.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:cdb132fc825c38e1aeec2c8aa9338310d29d337bebbd7baa06889d09a60a1fa2"}, - {file = "MarkupSafe-1.1.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:13d3144e1e340870b25e7b10b98d779608c02016d5184cfb9927a9f10c689f42"}, - {file = "MarkupSafe-1.1.1-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:acf08ac40292838b3cbbb06cfe9b2cb9ec78fce8baca31ddb87aaac2e2dc3bc2"}, - {file = "MarkupSafe-1.1.1-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:d9be0ba6c527163cbed5e0857c451fcd092ce83947944d6c14bc95441203f032"}, - {file = "MarkupSafe-1.1.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:caabedc8323f1e93231b52fc32bdcde6db817623d33e100708d9a68e1f53b26b"}, - {file = "MarkupSafe-1.1.1-cp38-cp38-win32.whl", hash = "sha256:596510de112c685489095da617b5bcbbac7dd6384aeebeda4df6025d0256a81b"}, - {file = "MarkupSafe-1.1.1-cp38-cp38-win_amd64.whl", hash = "sha256:e8313f01ba26fbbe36c7be1966a7b7424942f670f38e666995b88d012765b9be"}, - {file = "MarkupSafe-1.1.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:d73a845f227b0bfe8a7455ee623525ee656a9e2e749e4742706d80a6065d5e2c"}, - {file = "MarkupSafe-1.1.1-cp39-cp39-manylinux1_i686.whl", hash = "sha256:98bae9582248d6cf62321dcb52aaf5d9adf0bad3b40582925ef7c7f0ed85fceb"}, - {file = "MarkupSafe-1.1.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:2beec1e0de6924ea551859edb9e7679da6e4870d32cb766240ce17e0a0ba2014"}, - {file = "MarkupSafe-1.1.1-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:7fed13866cf14bba33e7176717346713881f56d9d2bcebab207f7a036f41b850"}, - {file = "MarkupSafe-1.1.1-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:6f1e273a344928347c1290119b493a1f0303c52f5a5eae5f16d74f48c15d4a85"}, - {file = "MarkupSafe-1.1.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:feb7b34d6325451ef96bc0e36e1a6c0c1c64bc1fbec4b854f4529e51887b1621"}, - {file = "MarkupSafe-1.1.1-cp39-cp39-win32.whl", hash = "sha256:22c178a091fc6630d0d045bdb5992d2dfe14e3259760e713c490da5323866c39"}, - {file = "MarkupSafe-1.1.1-cp39-cp39-win_amd64.whl", hash = "sha256:b7d644ddb4dbd407d31ffb699f1d140bc35478da613b441c582aeb7c43838dd8"}, - {file = "MarkupSafe-1.1.1.tar.gz", hash = "sha256:29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b"}, -] -mccabe = [ - {file = "mccabe-0.6.1-py2.py3-none-any.whl", hash = "sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42"}, - {file = "mccabe-0.6.1.tar.gz", hash = "sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f"}, -] + {file = "MarkupSafe-2.1.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:86b1f75c4e7c2ac2ccdaec2b9022845dbb81880ca318bb7a0a01fbf7813e3812"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:f121a1420d4e173a5d96e47e9a0c0dcff965afdf1626d28de1460815f7c4ee7a"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a49907dd8420c5685cfa064a1335b6754b74541bbb3706c259c02ed65b644b3e"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:10c1bfff05d95783da83491be968e8fe789263689c02724e0c691933c52994f5"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b7bd98b796e2b6553da7225aeb61f447f80a1ca64f41d83612e6139ca5213aa4"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:b09bf97215625a311f669476f44b8b318b075847b49316d3e28c08e41a7a573f"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:694deca8d702d5db21ec83983ce0bb4b26a578e71fbdbd4fdcd387daa90e4d5e"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:efc1913fd2ca4f334418481c7e595c00aad186563bbc1ec76067848c7ca0a933"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-win32.whl", hash = "sha256:4a33dea2b688b3190ee12bd7cfa29d39c9ed176bda40bfa11099a3ce5d3a7ac6"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-win_amd64.whl", hash = "sha256:dda30ba7e87fbbb7eab1ec9f58678558fd9a6b8b853530e176eabd064da81417"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:671cd1187ed5e62818414afe79ed29da836dde67166a9fac6d435873c44fdd02"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3799351e2336dc91ea70b034983ee71cf2f9533cdff7c14c90ea126bfd95d65a"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e72591e9ecd94d7feb70c1cbd7be7b3ebea3f548870aa91e2732960fa4d57a37"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6fbf47b5d3728c6aea2abb0589b5d30459e369baa772e0f37a0320185e87c980"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:d5ee4f386140395a2c818d149221149c54849dfcfcb9f1debfe07a8b8bd63f9a"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:bcb3ed405ed3222f9904899563d6fc492ff75cce56cba05e32eff40e6acbeaa3"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:e1c0b87e09fa55a220f058d1d49d3fb8df88fbfab58558f1198e08c1e1de842a"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-win32.whl", hash = "sha256:8dc1c72a69aa7e082593c4a203dcf94ddb74bb5c8a731e4e1eb68d031e8498ff"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-win_amd64.whl", hash = "sha256:97a68e6ada378df82bc9f16b800ab77cbf4b2fada0081794318520138c088e4a"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:e8c843bbcda3a2f1e3c2ab25913c80a3c5376cd00c6e8c4a86a89a28c8dc5452"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0212a68688482dc52b2d45013df70d169f542b7394fc744c02a57374a4207003"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8e576a51ad59e4bfaac456023a78f6b5e6e7651dcd383bcc3e18d06f9b55d6d1"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4b9fe39a2ccc108a4accc2676e77da025ce383c108593d65cc909add5c3bd601"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:96e37a3dc86e80bf81758c152fe66dbf60ed5eca3d26305edf01892257049925"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:6d0072fea50feec76a4c418096652f2c3238eaa014b2f94aeb1d56a66b41403f"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:089cf3dbf0cd6c100f02945abeb18484bd1ee57a079aefd52cffd17fba910b88"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:6a074d34ee7a5ce3effbc526b7083ec9731bb3cbf921bbe1d3005d4d2bdb3a63"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-win32.whl", hash = "sha256:421be9fbf0ffe9ffd7a378aafebbf6f4602d564d34be190fc19a193232fd12b1"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-win_amd64.whl", hash = "sha256:fc7b548b17d238737688817ab67deebb30e8073c95749d55538ed473130ec0c7"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:e04e26803c9c3851c931eac40c695602c6295b8d432cbe78609649ad9bd2da8a"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b87db4360013327109564f0e591bd2a3b318547bcef31b468a92ee504d07ae4f"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:99a2a507ed3ac881b975a2976d59f38c19386d128e7a9a18b7df6fff1fd4c1d6"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:56442863ed2b06d19c37f94d999035e15ee982988920e12a5b4ba29b62ad1f77"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3ce11ee3f23f79dbd06fb3d63e2f6af7b12db1d46932fe7bd8afa259a5996603"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:33b74d289bd2f5e527beadcaa3f401e0df0a89927c1559c8566c066fa4248ab7"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:43093fb83d8343aac0b1baa75516da6092f58f41200907ef92448ecab8825135"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:8e3dcf21f367459434c18e71b2a9532d96547aef8a871872a5bd69a715c15f96"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-win32.whl", hash = "sha256:d4306c36ca495956b6d568d276ac11fdd9c30a36f1b6eb928070dc5360b22e1c"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-win_amd64.whl", hash = "sha256:46d00d6cfecdde84d40e572d63735ef81423ad31184100411e6e3388d405e247"}, + {file = "MarkupSafe-2.1.1.tar.gz", hash = "sha256:7f91197cc9e48f989d12e4e6fbc46495c446636dfc81b9ccf50bb0ec74b91d4b"}, +] +mccabe = [] openpyxl = [ - {file = "openpyxl-3.0.7-py2.py3-none-any.whl", hash = "sha256:46af4eaf201a89b610fcca177eed957635f88770a5462fb6aae4a2a52b0ff516"}, - {file = "openpyxl-3.0.7.tar.gz", hash = "sha256:6456a3b472e1ef0facb1129f3c6ef00713cebf62e736cd7a75bcc3247432f251"}, + {file = "openpyxl-3.0.10-py2.py3-none-any.whl", hash = "sha256:0ab6d25d01799f97a9464630abacbb34aafecdcaa0ef3cba6d6b3499867d0355"}, + {file = "openpyxl-3.0.10.tar.gz", hash = "sha256:e47805627aebcf860edb4edf7987b1309c1b3632f3750538ed962bbcc3bd7449"}, ] packaging = [ - {file = "packaging-20.9-py2.py3-none-any.whl", hash = "sha256:67714da7f7bc052e064859c05c595155bd1ee9f69f76557e21f051443c20947a"}, - {file = "packaging-20.9.tar.gz", hash = "sha256:5b327ac1320dc863dca72f4514ecc086f31186744b84a230374cc1fd776feae5"}, + {file = "packaging-21.3-py3-none-any.whl", hash = "sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522"}, + {file = "packaging-21.3.tar.gz", hash = "sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb"}, ] -pluggy = [ - {file = "pluggy-0.13.1-py2.py3-none-any.whl", hash = "sha256:966c145cd83c96502c3c3868f50408687b38434af77734af1e9ca461a4081d2d"}, - {file = "pluggy-0.13.1.tar.gz", hash = "sha256:15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0"}, +pkgutil-resolve-name = [ + {file = "pkgutil_resolve_name-1.3.10-py3-none-any.whl", hash = "sha256:ca27cc078d25c5ad71a9de0a7a330146c4e014c2462d9af19c6b828280649c5e"}, + {file = "pkgutil_resolve_name-1.3.10.tar.gz", hash = "sha256:357d6c9e6a755653cfd78893817c0853af365dd51ec97f3d358a819373bbd174"}, ] -py = [ - {file = "py-1.10.0-py2.py3-none-any.whl", hash = "sha256:3b80836aa6d1feeaa108e046da6423ab8f6ceda6468545ae8d02d9d58d18818a"}, - {file = "py-1.10.0.tar.gz", hash = "sha256:21b81bda15b66ef5e1a777a21c4dcd9c20ad3efd0b3f817e7a809035269e1bd3"}, +platformdirs = [ + {file = "platformdirs-2.5.4-py3-none-any.whl", hash = "sha256:af0276409f9a02373d540bf8480021a048711d572745aef4b7842dad245eba10"}, + {file = "platformdirs-2.5.4.tar.gz", hash = "sha256:1006647646d80f16130f052404c6b901e80ee4ed6bef6792e1f238a8969106f7"}, ] +pluggy = [] pyinotify = [ {file = "pyinotify-0.9.6.tar.gz", hash = "sha256:9c998a5d7606ca835065cdabc013ae6c66eb9ea76a00a1e3bc6e0cfe2b4f71f4"}, ] -pylint = [ - {file = "pylint-2.7.4-py3-none-any.whl", hash = "sha256:209d712ec870a0182df034ae19f347e725c1e615b2269519ab58a35b3fcbbe7a"}, - {file = "pylint-2.7.4.tar.gz", hash = "sha256:bd38914c7731cdc518634a8d3c5585951302b6e2b6de60fbb3f7a0220e21eeee"}, -] -pyparsing = [ - {file = "pyparsing-2.4.7-py2.py3-none-any.whl", hash = "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b"}, - {file = "pyparsing-2.4.7.tar.gz", hash = "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1"}, -] +pylint = [] +pyparsing = [] pyrsistent = [ - {file = "pyrsistent-0.17.3.tar.gz", hash = "sha256:2e636185d9eb976a18a8a8e96efce62f2905fea90041958d8cc2a189756ebf3e"}, + {file = "pyrsistent-0.19.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d6982b5a0237e1b7d876b60265564648a69b14017f3b5f908c5be2de3f9abb7a"}, + {file = "pyrsistent-0.19.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:187d5730b0507d9285a96fca9716310d572e5464cadd19f22b63a6976254d77a"}, + {file = "pyrsistent-0.19.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:055ab45d5911d7cae397dc418808d8802fb95262751872c841c170b0dbf51eed"}, + {file = "pyrsistent-0.19.2-cp310-cp310-win32.whl", hash = "sha256:456cb30ca8bff00596519f2c53e42c245c09e1a4543945703acd4312949bfd41"}, + {file = "pyrsistent-0.19.2-cp310-cp310-win_amd64.whl", hash = "sha256:b39725209e06759217d1ac5fcdb510e98670af9e37223985f330b611f62e7425"}, + {file = "pyrsistent-0.19.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:2aede922a488861de0ad00c7630a6e2d57e8023e4be72d9d7147a9fcd2d30712"}, + {file = "pyrsistent-0.19.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:879b4c2f4d41585c42df4d7654ddffff1239dc4065bc88b745f0341828b83e78"}, + {file = "pyrsistent-0.19.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c43bec251bbd10e3cb58ced80609c5c1eb238da9ca78b964aea410fb820d00d6"}, + {file = "pyrsistent-0.19.2-cp37-cp37m-win32.whl", hash = "sha256:d690b18ac4b3e3cab73b0b7aa7dbe65978a172ff94970ff98d82f2031f8971c2"}, + {file = "pyrsistent-0.19.2-cp37-cp37m-win_amd64.whl", hash = "sha256:3ba4134a3ff0fc7ad225b6b457d1309f4698108fb6b35532d015dca8f5abed73"}, + {file = "pyrsistent-0.19.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:a178209e2df710e3f142cbd05313ba0c5ebed0a55d78d9945ac7a4e09d923308"}, + {file = "pyrsistent-0.19.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e371b844cec09d8dc424d940e54bba8f67a03ebea20ff7b7b0d56f526c71d584"}, + {file = "pyrsistent-0.19.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:111156137b2e71f3a9936baf27cb322e8024dac3dc54ec7fb9f0bcf3249e68bb"}, + {file = "pyrsistent-0.19.2-cp38-cp38-win32.whl", hash = "sha256:e5d8f84d81e3729c3b506657dddfe46e8ba9c330bf1858ee33108f8bb2adb38a"}, + {file = "pyrsistent-0.19.2-cp38-cp38-win_amd64.whl", hash = "sha256:9cd3e9978d12b5d99cbdc727a3022da0430ad007dacf33d0bf554b96427f33ab"}, + {file = "pyrsistent-0.19.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:f1258f4e6c42ad0b20f9cfcc3ada5bd6b83374516cd01c0960e3cb75fdca6770"}, + {file = "pyrsistent-0.19.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:21455e2b16000440e896ab99e8304617151981ed40c29e9507ef1c2e4314ee95"}, + {file = "pyrsistent-0.19.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bfd880614c6237243ff53a0539f1cb26987a6dc8ac6e66e0c5a40617296a045e"}, + {file = "pyrsistent-0.19.2-cp39-cp39-win32.whl", hash = "sha256:71d332b0320642b3261e9fee47ab9e65872c2bd90260e5d225dabeed93cbd42b"}, + {file = "pyrsistent-0.19.2-cp39-cp39-win_amd64.whl", hash = "sha256:dec3eac7549869365fe263831f576c8457f6c833937c68542d08fde73457d291"}, + {file = "pyrsistent-0.19.2-py3-none-any.whl", hash = "sha256:ea6b79a02a28550c98b6ca9c35b9f492beaa54d7c5c9e9949555893c8a9234d0"}, + {file = "pyrsistent-0.19.2.tar.gz", hash = "sha256:bfa0351be89c9fcbcb8c9879b826f4353be10f58f8a677efab0c017bf7137ec2"}, ] pytest = [ - {file = "pytest-6.2.3-py3-none-any.whl", hash = "sha256:6ad9c7bdf517a808242b998ac20063c41532a570d088d77eec1ee12b0b5574bc"}, - {file = "pytest-6.2.3.tar.gz", hash = "sha256:671238a46e4df0f3498d1c3270e5deb9b32d25134c99b7d75370a68cfbe9b634"}, + {file = "pytest-7.2.0-py3-none-any.whl", hash = "sha256:892f933d339f068883b6fd5a459f03d85bfcb355e4981e146d2c7616c21fef71"}, + {file = "pytest-7.2.0.tar.gz", hash = "sha256:c4014eb40e10f11f355ad4e3c2fb2c6c6d1919c73f3b5a433de4708202cade59"}, ] pyyaml = [ - {file = "PyYAML-5.4.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:3b2b1824fe7112845700f815ff6a489360226a5609b96ec2190a45e62a9fc922"}, - {file = "PyYAML-5.4.1-cp27-cp27m-win32.whl", hash = "sha256:129def1b7c1bf22faffd67b8f3724645203b79d8f4cc81f674654d9902cb4393"}, - {file = "PyYAML-5.4.1-cp27-cp27m-win_amd64.whl", hash = "sha256:4465124ef1b18d9ace298060f4eccc64b0850899ac4ac53294547536533800c8"}, - {file = "PyYAML-5.4.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:bb4191dfc9306777bc594117aee052446b3fa88737cd13b7188d0e7aa8162185"}, - {file = "PyYAML-5.4.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:6c78645d400265a062508ae399b60b8c167bf003db364ecb26dcab2bda048253"}, - {file = "PyYAML-5.4.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:4e0583d24c881e14342eaf4ec5fbc97f934b999a6828693a99157fde912540cc"}, - {file = "PyYAML-5.4.1-cp36-cp36m-win32.whl", hash = "sha256:3bd0e463264cf257d1ffd2e40223b197271046d09dadf73a0fe82b9c1fc385a5"}, - {file = "PyYAML-5.4.1-cp36-cp36m-win_amd64.whl", hash = "sha256:e4fac90784481d221a8e4b1162afa7c47ed953be40d31ab4629ae917510051df"}, - {file = "PyYAML-5.4.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:5accb17103e43963b80e6f837831f38d314a0495500067cb25afab2e8d7a4018"}, - {file = "PyYAML-5.4.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:e1d4970ea66be07ae37a3c2e48b5ec63f7ba6804bdddfdbd3cfd954d25a82e63"}, - {file = "PyYAML-5.4.1-cp37-cp37m-win32.whl", hash = "sha256:dd5de0646207f053eb0d6c74ae45ba98c3395a571a2891858e87df7c9b9bd51b"}, - {file = "PyYAML-5.4.1-cp37-cp37m-win_amd64.whl", hash = "sha256:08682f6b72c722394747bddaf0aa62277e02557c0fd1c42cb853016a38f8dedf"}, - {file = "PyYAML-5.4.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d2d9808ea7b4af864f35ea216be506ecec180628aced0704e34aca0b040ffe46"}, - {file = "PyYAML-5.4.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:8c1be557ee92a20f184922c7b6424e8ab6691788e6d86137c5d93c1a6ec1b8fb"}, - {file = "PyYAML-5.4.1-cp38-cp38-win32.whl", hash = "sha256:fa5ae20527d8e831e8230cbffd9f8fe952815b2b7dae6ffec25318803a7528fc"}, - {file = "PyYAML-5.4.1-cp38-cp38-win_amd64.whl", hash = "sha256:0f5f5786c0e09baddcd8b4b45f20a7b5d61a7e7e99846e3c799b05c7c53fa696"}, - {file = "PyYAML-5.4.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:294db365efa064d00b8d1ef65d8ea2c3426ac366c0c4368d930bf1c5fb497f77"}, - {file = "PyYAML-5.4.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:74c1485f7707cf707a7aef42ef6322b8f97921bd89be2ab6317fd782c2d53183"}, - {file = "PyYAML-5.4.1-cp39-cp39-win32.whl", hash = "sha256:49d4cdd9065b9b6e206d0595fee27a96b5dd22618e7520c33204a4a3239d5b10"}, - {file = "PyYAML-5.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:c20cfa2d49991c8b4147af39859b167664f2ad4561704ee74c1de03318e898db"}, - {file = "PyYAML-5.4.1.tar.gz", hash = "sha256:607774cbba28732bfa802b54baa7484215f530991055bb562efbed5b2f20a45e"}, + {file = "PyYAML-6.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d4db7c7aef085872ef65a8fd7d6d09a14ae91f691dec3e87ee5ee0539d516f53"}, + {file = "PyYAML-6.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9df7ed3b3d2e0ecfe09e14741b857df43adb5a3ddadc919a2d94fbdf78fea53c"}, + {file = "PyYAML-6.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:77f396e6ef4c73fdc33a9157446466f1cff553d979bd00ecb64385760c6babdc"}, + {file = "PyYAML-6.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a80a78046a72361de73f8f395f1f1e49f956c6be882eed58505a15f3e430962b"}, + {file = "PyYAML-6.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f84fbc98b019fef2ee9a1cb3ce93e3187a6df0b2538a651bfb890254ba9f90b5"}, + {file = "PyYAML-6.0-cp310-cp310-win32.whl", hash = "sha256:2cd5df3de48857ed0544b34e2d40e9fac445930039f3cfe4bcc592a1f836d513"}, + {file = "PyYAML-6.0-cp310-cp310-win_amd64.whl", hash = "sha256:daf496c58a8c52083df09b80c860005194014c3698698d1a57cbcfa182142a3a"}, + {file = "PyYAML-6.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:897b80890765f037df3403d22bab41627ca8811ae55e9a722fd0392850ec4d86"}, + {file = "PyYAML-6.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:50602afada6d6cbfad699b0c7bb50d5ccffa7e46a3d738092afddc1f9758427f"}, + {file = "PyYAML-6.0-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:48c346915c114f5fdb3ead70312bd042a953a8ce5c7106d5bfb1a5254e47da92"}, + {file = "PyYAML-6.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:98c4d36e99714e55cfbaaee6dd5badbc9a1ec339ebfc3b1f52e293aee6bb71a4"}, + {file = "PyYAML-6.0-cp36-cp36m-win32.whl", hash = "sha256:0283c35a6a9fbf047493e3a0ce8d79ef5030852c51e9d911a27badfde0605293"}, + {file = "PyYAML-6.0-cp36-cp36m-win_amd64.whl", hash = "sha256:07751360502caac1c067a8132d150cf3d61339af5691fe9e87803040dbc5db57"}, + {file = "PyYAML-6.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:819b3830a1543db06c4d4b865e70ded25be52a2e0631ccd2f6a47a2822f2fd7c"}, + {file = "PyYAML-6.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:473f9edb243cb1935ab5a084eb238d842fb8f404ed2193a915d1784b5a6b5fc0"}, + {file = "PyYAML-6.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0ce82d761c532fe4ec3f87fc45688bdd3a4c1dc5e0b4a19814b9009a29baefd4"}, + {file = "PyYAML-6.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:231710d57adfd809ef5d34183b8ed1eeae3f76459c18fb4a0b373ad56bedcdd9"}, + {file = "PyYAML-6.0-cp37-cp37m-win32.whl", hash = "sha256:c5687b8d43cf58545ade1fe3e055f70eac7a5a1a0bf42824308d868289a95737"}, + {file = "PyYAML-6.0-cp37-cp37m-win_amd64.whl", hash = "sha256:d15a181d1ecd0d4270dc32edb46f7cb7733c7c508857278d3d378d14d606db2d"}, + {file = "PyYAML-6.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0b4624f379dab24d3725ffde76559cff63d9ec94e1736b556dacdfebe5ab6d4b"}, + {file = "PyYAML-6.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:213c60cd50106436cc818accf5baa1aba61c0189ff610f64f4a3e8c6726218ba"}, + {file = "PyYAML-6.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9fa600030013c4de8165339db93d182b9431076eb98eb40ee068700c9c813e34"}, + {file = "PyYAML-6.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:277a0ef2981ca40581a47093e9e2d13b3f1fbbeffae064c1d21bfceba2030287"}, + {file = "PyYAML-6.0-cp38-cp38-win32.whl", hash = "sha256:d4eccecf9adf6fbcc6861a38015c2a64f38b9d94838ac1810a9023a0609e1b78"}, + {file = "PyYAML-6.0-cp38-cp38-win_amd64.whl", hash = "sha256:1e4747bc279b4f613a09eb64bba2ba602d8a6664c6ce6396a4d0cd413a50ce07"}, + {file = "PyYAML-6.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:055d937d65826939cb044fc8c9b08889e8c743fdc6a32b33e2390f66013e449b"}, + {file = "PyYAML-6.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e61ceaab6f49fb8bdfaa0f92c4b57bcfbea54c09277b1b4f7ac376bfb7a7c174"}, + {file = "PyYAML-6.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d67d839ede4ed1b28a4e8909735fc992a923cdb84e618544973d7dfc71540803"}, + {file = "PyYAML-6.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cba8c411ef271aa037d7357a2bc8f9ee8b58b9965831d9e51baf703280dc73d3"}, + {file = "PyYAML-6.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:40527857252b61eacd1d9af500c3337ba8deb8fc298940291486c465c8b46ec0"}, + {file = "PyYAML-6.0-cp39-cp39-win32.whl", hash = "sha256:b5b9eccad747aabaaffbc6064800670f0c297e52c12754eb1d976c57e4f74dcb"}, + {file = "PyYAML-6.0-cp39-cp39-win_amd64.whl", hash = "sha256:b3d267842bf12586ba6c734f89d1f5b871df0273157918b0ccefa29deb05c21c"}, + {file = "PyYAML-6.0.tar.gz", hash = "sha256:68fb519c14306fec9720a2a5b45bc9f0c8d1b9c72adf45c37baedfcd949c35a2"}, ] schema205 = [] -six = [ - {file = "six-1.15.0-py2.py3-none-any.whl", hash = "sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced"}, - {file = "six-1.15.0.tar.gz", hash = "sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259"}, -] smmap = [ - {file = "smmap-4.0.0-py2.py3-none-any.whl", hash = "sha256:a9a7479e4c572e2e775c404dcd3080c8dc49f39918c2cf74913d30c4c478e3c2"}, - {file = "smmap-4.0.0.tar.gz", hash = "sha256:7e65386bd122d45405ddf795637b7f7d2b532e7e401d46bbe3fb49b9986d5182"}, -] -toml = [ - {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, - {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, -] -typed-ast = [ - {file = "typed_ast-1.4.3-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:2068531575a125b87a41802130fa7e29f26c09a2833fea68d9a40cf33902eba6"}, - {file = "typed_ast-1.4.3-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:c907f561b1e83e93fad565bac5ba9c22d96a54e7ea0267c708bffe863cbe4075"}, - {file = "typed_ast-1.4.3-cp35-cp35m-manylinux2014_aarch64.whl", hash = "sha256:1b3ead4a96c9101bef08f9f7d1217c096f31667617b58de957f690c92378b528"}, - {file = "typed_ast-1.4.3-cp35-cp35m-win32.whl", hash = "sha256:dde816ca9dac1d9c01dd504ea5967821606f02e510438120091b84e852367428"}, - {file = "typed_ast-1.4.3-cp35-cp35m-win_amd64.whl", hash = "sha256:777a26c84bea6cd934422ac2e3b78863a37017618b6e5c08f92ef69853e765d3"}, - {file = "typed_ast-1.4.3-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:f8afcf15cc511ada719a88e013cec87c11aff7b91f019295eb4530f96fe5ef2f"}, - {file = "typed_ast-1.4.3-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:52b1eb8c83f178ab787f3a4283f68258525f8d70f778a2f6dd54d3b5e5fb4341"}, - {file = "typed_ast-1.4.3-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:01ae5f73431d21eead5015997ab41afa53aa1fbe252f9da060be5dad2c730ace"}, - {file = "typed_ast-1.4.3-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:c190f0899e9f9f8b6b7863debfb739abcb21a5c054f911ca3596d12b8a4c4c7f"}, - {file = "typed_ast-1.4.3-cp36-cp36m-win32.whl", hash = "sha256:398e44cd480f4d2b7ee8d98385ca104e35c81525dd98c519acff1b79bdaac363"}, - {file = "typed_ast-1.4.3-cp36-cp36m-win_amd64.whl", hash = "sha256:bff6ad71c81b3bba8fa35f0f1921fb24ff4476235a6e94a26ada2e54370e6da7"}, - {file = "typed_ast-1.4.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0fb71b8c643187d7492c1f8352f2c15b4c4af3f6338f21681d3681b3dc31a266"}, - {file = "typed_ast-1.4.3-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:760ad187b1041a154f0e4d0f6aae3e40fdb51d6de16e5c99aedadd9246450e9e"}, - {file = "typed_ast-1.4.3-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:5feca99c17af94057417d744607b82dd0a664fd5e4ca98061480fd8b14b18d04"}, - {file = "typed_ast-1.4.3-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:95431a26309a21874005845c21118c83991c63ea800dd44843e42a916aec5899"}, - {file = "typed_ast-1.4.3-cp37-cp37m-win32.whl", hash = "sha256:aee0c1256be6c07bd3e1263ff920c325b59849dc95392a05f258bb9b259cf39c"}, - {file = "typed_ast-1.4.3-cp37-cp37m-win_amd64.whl", hash = "sha256:9ad2c92ec681e02baf81fdfa056fe0d818645efa9af1f1cd5fd6f1bd2bdfd805"}, - {file = "typed_ast-1.4.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:b36b4f3920103a25e1d5d024d155c504080959582b928e91cb608a65c3a49e1a"}, - {file = "typed_ast-1.4.3-cp38-cp38-manylinux1_i686.whl", hash = "sha256:067a74454df670dcaa4e59349a2e5c81e567d8d65458d480a5b3dfecec08c5ff"}, - {file = "typed_ast-1.4.3-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:7538e495704e2ccda9b234b82423a4038f324f3a10c43bc088a1636180f11a41"}, - {file = "typed_ast-1.4.3-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:af3d4a73793725138d6b334d9d247ce7e5f084d96284ed23f22ee626a7b88e39"}, - {file = "typed_ast-1.4.3-cp38-cp38-win32.whl", hash = "sha256:f2362f3cb0f3172c42938946dbc5b7843c2a28aec307c49100c8b38764eb6927"}, - {file = "typed_ast-1.4.3-cp38-cp38-win_amd64.whl", hash = "sha256:dd4a21253f42b8d2b48410cb31fe501d32f8b9fbeb1f55063ad102fe9c425e40"}, - {file = "typed_ast-1.4.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:f328adcfebed9f11301eaedfa48e15bdece9b519fb27e6a8c01aa52a17ec31b3"}, - {file = "typed_ast-1.4.3-cp39-cp39-manylinux1_i686.whl", hash = "sha256:2c726c276d09fc5c414693a2de063f521052d9ea7c240ce553316f70656c84d4"}, - {file = "typed_ast-1.4.3-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:cae53c389825d3b46fb37538441f75d6aecc4174f615d048321b716df2757fb0"}, - {file = "typed_ast-1.4.3-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:b9574c6f03f685070d859e75c7f9eeca02d6933273b5e69572e5ff9d5e3931c3"}, - {file = "typed_ast-1.4.3-cp39-cp39-win32.whl", hash = "sha256:209596a4ec71d990d71d5e0d312ac935d86930e6eecff6ccc7007fe54d703808"}, - {file = "typed_ast-1.4.3-cp39-cp39-win_amd64.whl", hash = "sha256:9c6d1a54552b5330bc657b7ef0eae25d00ba7ffe85d9ea8ae6540d2197a3788c"}, - {file = "typed_ast-1.4.3.tar.gz", hash = "sha256:fb1bbeac803adea29cedd70781399c99138358c26d05fcbd23c13016b7f5ec65"}, + {file = "smmap-5.0.0-py3-none-any.whl", hash = "sha256:2aba19d6a040e78d8b09de5c57e96207b09ed71d8e55ce0959eeee6c8e190d94"}, + {file = "smmap-5.0.0.tar.gz", hash = "sha256:c840e62059cd3be204b0c9c9f74be2c09d5648eddd4580d9314c3ecde0b30936"}, ] +tomli = [] +typed-ast = [] typing-extensions = [ - {file = "typing_extensions-3.7.4.3-py2-none-any.whl", hash = "sha256:dafc7639cde7f1b6e1acc0f457842a83e722ccca8eef5270af2d74792619a89f"}, - {file = "typing_extensions-3.7.4.3-py3-none-any.whl", hash = "sha256:7cb407020f00f7bfc3cb3e7881628838e69d8f3fcab2f64742a5e76b2f841918"}, - {file = "typing_extensions-3.7.4.3.tar.gz", hash = "sha256:99d4073b617d30288f569d3f13d2bd7548c3a7e4c8de87db09a9d29bb3a4a60c"}, -] -wrapt = [ - {file = "wrapt-1.12.1.tar.gz", hash = "sha256:b62ffa81fb85f4332a4f609cab4ac40709470da05643a082ec1eb88e6d9b97d7"}, + {file = "typing_extensions-4.4.0-py3-none-any.whl", hash = "sha256:16fa4864408f655d35ec496218b85f79b3437c829e93320c7c9215ccfd92489e"}, + {file = "typing_extensions-4.4.0.tar.gz", hash = "sha256:1511434bb92bf8dd198c12b1cc812e800d4181cfcb867674e0f8279cc93087aa"}, ] +wrapt = [] zipp = [ - {file = "zipp-3.4.1-py3-none-any.whl", hash = "sha256:51cb66cc54621609dd593d1787f286ee42a5c0adbb4b29abea5a63edc3e03098"}, - {file = "zipp-3.4.1.tar.gz", hash = "sha256:3607921face881ba3e026887d8150cca609d517579abe052ac81fc5aeffdbd76"}, + {file = "zipp-3.10.0-py3-none-any.whl", hash = "sha256:4fcb6f278987a6605757302a6e40e896257570d11c51628968ccb2a47e80c6c1"}, + {file = "zipp-3.10.0.tar.gz", hash = "sha256:7a7262fd930bd3e36c50b9a64897aec3fafff3dfdeec9623ae22b40e93f99bb8"}, ] diff --git a/pyproject.toml b/pyproject.toml index 33e90e3..faa4a32 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,11 +1,11 @@ [tool.poetry] name = "tk205" -version = "0.1.0" +version = "1.0.0" description = "" authors = ["Open205"] [tool.poetry.dependencies] -python = "^3.6" +python = "^3.7" click = "*" jsonschema = "*" cbor2 = "*" @@ -16,9 +16,10 @@ schema205 = { path = "schema-205", develop = true } [tool.poetry.dev-dependencies] pylint = "*" -pytest = "*" +pytest = "^7.1.3" markdown = "*" doit = "*" +tomli = "2.0.1" gitpython = "*" [build-system] diff --git a/schema-205 b/schema-205 index acb2d3e..552faf9 160000 --- a/schema-205 +++ b/schema-205 @@ -1 +1 @@ -Subproject commit acb2d3e333d486387dcea4ffc0320e5ad53329ea +Subproject commit 552faf93df8f225d9d4ca95c6d936cd35b00f151 diff --git a/tk205/file_io.py b/tk205/file_io.py index 4b645d3..33a6e4f 100644 --- a/tk205/file_io.py +++ b/tk205/file_io.py @@ -23,7 +23,7 @@ def load(input_file_path): with open(input_file_path, 'r') as input_file: return yaml.load(input_file, Loader=yaml.FullLoader) else: - raise Exception(f"Unsupported input \"{ext}\".") + raise Exception(f"Unsupported input \"{ext}\" for \"{input_file_path}\".") def dump(content, output_file_path): ext = get_extension(output_file_path).lower() @@ -42,7 +42,7 @@ def dump(content, output_file_path): yaml.dump(content, out_file, sort_keys=False) else: - raise Exception(f"Unsupported output \"{ext}\".") + raise Exception(f"Unsupported output \"{ext}\" for \"{output_file_path}\".") def clear_directory(directory_path): ''' diff --git a/tk205/xlsx.py b/tk205/xlsx.py index c97acf6..268da09 100644 --- a/tk205/xlsx.py +++ b/tk205/xlsx.py @@ -699,13 +699,14 @@ def create_tree_from_schema(self, node): # Handle alternative selectors if 'allOf' in schema_node: for alt in schema_node['allOf']: - for selector_var, selector in alt['if']['properties'].items(): - if selector_var in self.template_args: - if selector['const'] == self.get_template_arg(selector_var): - for property in alt['then']['properties']: - schema_node['properties'][property].update(alt['then']['properties'][property]) - else: - raise Exception(f"No keyword arguments provided to determine template for '{node.name}'.") + if "required" not in alt["then"]: # Make sure it's not a conditional requirement + for selector_var, selector in alt['if']['properties'].items(): + if selector_var in self.template_args: + if selector['const'] == self.get_template_arg(selector_var): + for property in alt['then']['properties']: + schema_node['properties'][property].update(alt['then']['properties'][property]) + else: + raise Exception(f"No keyword arguments provided to determine template for '{node.name}'.") # typical nodes if 'properties' in schema_node: From a07fa59a7fe5c433e67719deccfd9a18ee9b20ff Mon Sep 17 00:00:00 2001 From: Neal Kruis Date: Tue, 22 Nov 2022 16:26:25 -0700 Subject: [PATCH 146/154] Update CI actions. --- .github/workflows/build-and-test.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index cb985c5..81aef0f 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -6,25 +6,27 @@ jobs: build: name: Build strategy: + fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ["3.6", "3.7", "3.8", "3.9"] + python-version: ["3.7", "3.8", "3.9", "3.10"] defaults: run: shell: bash runs-on: ${{ matrix.os }} steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: submodules: recursive - name: Setup python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Install Poetry - uses: snok/install-poetry@v1.1.1 + uses: snok/install-poetry@v1.3.1 with: + version: 1.2.2 virtualenvs-create: true virtualenvs-in-project: true - name: Load cached venv if cache exists @@ -32,12 +34,12 @@ jobs: uses: actions/cache@v3 with: path: .venv - key: poetry-cache-v1-${{ matrix.os }}-py${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} + key: venv-${{ matrix.os }}-py${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} - name: Install dependencies if cache does not exist run: poetry install if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' - name: Build and test run: poetry run doit - name: Export libtk205 source - run: cmake -DPA_TOKEN="${{secrets.CI_PA_TOKEN}}" -DPROJECT_SOURCE_DIR="${{github.workspace}}/libtk205" -P "${{github.workspace}}/libtk205/cmake/update_lib_repo.cmake" + run: cmake -DPA_TOKEN="${{secrets.CI_PA_TOKEN}}" -DPROJECT_SOURCE_DIR="${{github.workspace}}/libtk205" -P "${{github.workspace}}/libtk205/cmake/update_lib_repo.cmake" From e982cce3bc40f5a0a154439a4048424e6a531e36 Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Tue, 22 Nov 2022 20:12:45 -0700 Subject: [PATCH 147/154] Update cpp generator for selector enums in common schema. --- schema-205 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema-205 b/schema-205 index 552faf9..82e1570 160000 --- a/schema-205 +++ b/schema-205 @@ -1 +1 @@ -Subproject commit 552faf93df8f225d9d4ca95c6d936cd35b00f151 +Subproject commit 82e15701d71844ef03fca8dff0e7af852e960108 From a4b0a40abd456545326674c545127631de5e81ec Mon Sep 17 00:00:00 2001 From: tanaya-bigladder <57679220+tanaya-bigladder@users.noreply.github.com> Date: Mon, 28 Nov 2022 09:58:36 -0700 Subject: [PATCH 148/154] Update schema to correctly parse version. --- schema-205 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema-205 b/schema-205 index 82e1570..1b0a9ef 160000 --- a/schema-205 +++ b/schema-205 @@ -1 +1 @@ -Subproject commit 82e15701d71844ef03fca8dff0e7af852e960108 +Subproject commit 1b0a9eff77a420125846601def7d114442b53926 From e0cb8a2c729513443565c49b53c135f792ffdf76 Mon Sep 17 00:00:00 2001 From: Tim McDowell Date: Tue, 29 Nov 2022 10:38:15 -0700 Subject: [PATCH 149/154] change to 205 and SSPC --- README.md | 5 ++--- schema-205 | 2 +- web/markdown-content/about.md | 10 +++++----- web/markdown-content/examples.md | 2 +- web/markdown-content/templates.md | 2 +- web/markdown-content/tk205.md | 2 +- 6 files changed, 11 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 640f9a7..1f8d2c7 100755 --- a/README.md +++ b/README.md @@ -3,16 +3,15 @@ Toolkit 205 =========== -A toolkit to facilitate the adoption of the ASHRAE Standard 205P data exchange specification. +A toolkit to facilitate the adoption of the ASHRAE Standard 205 data exchange specification. **Disclaimer:** While this toolkit is developed in conjunction with the ASHRAE Standard 205 project committee, it is not an official ASHRAE product or a part of the standard. -**Warning!** As the proposed ASHRAE Standard 205P has not yet been published, the content in this repository is subject to change and should be considered unstable for application development. About ASHRAE 205 ---------------- -ASHRAE Standard 205P is "Standard Representation of Performance Simulation Data for HVAC&R and Other Facility Equipment". While the standard is not yet published, public reviews are available at [ASHRAE's online review portal](https://osr.ashrae.org/default.aspx). +ASHRAE Standard 205 is "Standard Representation of Performance Simulation Data for HVAC&R and Other Facility Equipment". The stated purpose of ASHRAE Standard 205 is: diff --git a/schema-205 b/schema-205 index 01795ff..daa6115 160000 --- a/schema-205 +++ b/schema-205 @@ -1 +1 @@ -Subproject commit 01795ffdaeb4d2df4a497b4cf5822f49570db4d3 +Subproject commit daa61158c768eb78e8e114fd99b22aa2870c31b5 diff --git a/web/markdown-content/about.md b/web/markdown-content/about.md index e69d5a8..2bc78d9 100644 --- a/web/markdown-content/about.md +++ b/web/markdown-content/about.md @@ -1,4 +1,4 @@ -# ASHRAE Standard 205P: Representation of Performance Data for HVAC&R and Other Facility Equipment +# ASHRAE Standard 205: Representation of Performance Data for HVAC&R and Other Facility Equipment ## Purpose @@ -8,11 +8,11 @@ To facilitate automated sharing of equipment performance characteristics by defi This standard applies to performance data for any HVAC&R or other facility system, equipment, or component. -## About ASHRAE Standard 205P +## About ASHRAE Standard 205 -ASHRAE Standard 205P defines common data models and serialization formats for facility equipment performance data needed for engineering applications such as energy simulation. The formats allow automated exchange among data sources (manufacturers), simulation models, and other engineering applications. The formats and procedures specified in the standard are developed by SPC (Standard Project Committee) 205 under ASHRAE and ANSI consensus processes. SPC-205 membership includes equipment manufacturers, application software developers, and engineering practitioners. +ASHRAE Standard 205 defines common data models and serialization formats for facility equipment performance data needed for engineering applications such as energy simulation. The formats allow automated exchange among data sources (manufacturers), simulation models, and other engineering applications. The formats and procedures specified in the standard are developed by SSPC (Standing Standard Project Committee) 205 under ASHRAE and ANSI consensus processes. SSPC-205 membership includes equipment manufacturers, application software developers, and engineering practitioners. -Standard 205 defines the term *representation* to mean a Concise Binary Object Representation (CBOR) file conforming to a JSON schema defined by a human-readable (text) document called a *representation specification*. Representation specifications are included in Standard 205P appended as an open-ended set. +Standard 205 defines the term *representation* to mean a Concise Binary Object Representation (CBOR) file conforming to a JSON schema defined by a human-readable (text) document called a *representation specification*. Representation specifications are included in Standard 205 appended as an open-ended set. Standard 205 structure and application can be visualized as follows: @@ -28,4 +28,4 @@ This web site hosts supporting material for each representation specification, i All representations have common structures and elements. An open source project, [open205](https://github.com/open205), is underway to provide software components for use by data publishers and application developers. -SPC 205 is developing representation specifications for additional equipment types. These will be published in future revisions of the standard. \ No newline at end of file +SSPC 205 is developing representation specifications for additional equipment types. These will be published in future revisions of the standard. \ No newline at end of file diff --git a/web/markdown-content/examples.md b/web/markdown-content/examples.md index 6847429..d3c7cc3 100644 --- a/web/markdown-content/examples.md +++ b/web/markdown-content/examples.md @@ -1,4 +1,4 @@ -Examples provided here are for illustrative purposes only. While CBOR is the official representation format defined by ASHRAE Standard 205P, it is sometime convenient to view and edit representation data in other formats. All other file formats must be translated to CBOR for use in application software. Routines for converting between the file formats are included in [Toolkit 205](tk205.html). +Examples provided here are for illustrative purposes only. While CBOR is the official representation format defined by ASHRAE Standard 205, it is sometime convenient to view and edit representation data in other formats. All other file formats must be translated to CBOR for use in application software. Routines for converting between the file formats are included in [Toolkit 205](tk205.html). Each example represntation is provided in four formats: diff --git a/web/markdown-content/templates.md b/web/markdown-content/templates.md index c87d51f..356e730 100644 --- a/web/markdown-content/templates.md +++ b/web/markdown-content/templates.md @@ -1 +1 @@ -Templates set up in the XLSX format for users to generate 205 compliant data. These templates will need to be translated into CBOR, but can be validated directly using [Toolkit 205](tk205.html). \ No newline at end of file +Templates set up in the XLSX format for users to generate Standard 205 compliant data. These templates will need to be translated into CBOR, but can be validated directly using [Toolkit 205](tk205.html). \ No newline at end of file diff --git a/web/markdown-content/tk205.md b/web/markdown-content/tk205.md index 7872bee..dd2ea5a 100644 --- a/web/markdown-content/tk205.md +++ b/web/markdown-content/tk205.md @@ -1 +1 @@ -A software toolkit to facilitate the adoption of the ASHRAE Standard 205P data exchange specification. \ No newline at end of file +A software toolkit to facilitate the adoption of the ASHRAE Standard 205 data exchange specification. \ No newline at end of file From 637a67e0f494e6575eeda06bff9dc1992efba43a Mon Sep 17 00:00:00 2001 From: Neal Kruis Date: Thu, 1 Dec 2022 11:48:13 -0700 Subject: [PATCH 150/154] Add license. --- LICENSE.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 LICENSE.txt diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..6126f4b --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,11 @@ +Copyright (c) 2022 Big Ladder Software, LLC + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. From c9d4cb3aeeb41422c633d03c68409bfe280477c1 Mon Sep 17 00:00:00 2001 From: Neal Kruis Date: Thu, 1 Dec 2022 11:51:18 -0700 Subject: [PATCH 151/154] Change order of web task. --- dodo.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/dodo.py b/dodo.py index 84ac732..a567af2 100644 --- a/dodo.py +++ b/dodo.py @@ -161,6 +161,14 @@ def task_test(): ] } +def task_web(): + '''Generates the web contents for data.ashrae.org''' + return { + 'task_dep': ['build_schema','cbor','yaml','xlsx','json', 'templates'], + 'file_dep': cbor_examples + yaml_examples + xlsx_examples + json_examples + template_files, # Add markdown content + 'actions': ['python web/web-content.py'] + } + def task_libtk205(): '''Build libtk205''' return { @@ -180,11 +188,3 @@ def task_libtk205_tests(): f'cd {LIB_BUILD_PATH} && ctest', ], } - -def task_web(): - '''Generates the web contents for data.ashrae.org''' - return { - 'task_dep': ['build_schema','cbor','yaml','xlsx','json', 'templates'], - 'file_dep': cbor_examples + yaml_examples + xlsx_examples + json_examples + template_files, # Add markdown content - 'actions': ['python web/web-content.py'] - } From 1d39779bdc21271e3faccbc0f85f62910105e806 Mon Sep 17 00:00:00 2001 From: Neal Kruis Date: Thu, 1 Dec 2022 11:52:06 -0700 Subject: [PATCH 152/154] Clean up example files on web. --- schema-205 | 2 +- web/templates/examples_template.html | 4 ++-- web/web-content.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/schema-205 b/schema-205 index 1b0a9ef..e112ceb 160000 --- a/schema-205 +++ b/schema-205 @@ -1 +1 @@ -Subproject commit 1b0a9eff77a420125846601def7d114442b53926 +Subproject commit e112ceb99728a2af11a3fef4973f1eff20be9d3b diff --git a/web/templates/examples_template.html b/web/templates/examples_template.html index 274f788..42370e9 100644 --- a/web/templates/examples_template.html +++ b/web/templates/examples_template.html @@ -10,7 +10,7 @@

{{headline}}


    {% for RS in content %} -
  • +
  • {{RS}}: {{content[RS]['title']}} {% for file in content[RS]['files'] %}
    @@ -44,4 +44,4 @@

    $(this).parent().toggleClass("is-active"); }); -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/web/web-content.py b/web/web-content.py index dad9c63..3e4a57b 100644 --- a/web/web-content.py +++ b/web/web-content.py @@ -170,7 +170,7 @@ def generate(web_dir): for file_type in examples_dictionary: for RS in sorted(examples_dictionary[file_type]): - for file_name in examples_dictionary[file_type][RS]: + for file_name in sorted(examples_dictionary[file_type][RS]): base_name = os.path.splitext(file_name)[0] rs_id, description = get_title_and_description(os.path.join(examples_directory, "json", RS, base_name + '.json')) if rs_id not in examples_page_data: From 1caa19a52832bde8f0fd70228a57554ed8edb481 Mon Sep 17 00:00:00 2001 From: Neal Kruis Date: Thu, 1 Dec 2022 13:48:46 -0700 Subject: [PATCH 153/154] Clean up README. --- README.md | 49 ++++++++----------------------------------------- 1 file changed, 8 insertions(+), 41 deletions(-) diff --git a/README.md b/README.md index b09b622..8fc5e2a 100755 --- a/README.md +++ b/README.md @@ -3,31 +3,10 @@ Toolkit 205 =========== -A toolkit to facilitate the adoption of the ASHRAE Standard 205P data exchange specification. +A toolkit to facilitate the adoption of the ASHRAE Standard 205, "Representation of Performance Data for HVAC&R and Other Facility Equipment", data exchange specification. Learn more about ASHRAE Standard 205 at https://data.ashrae.org/standard205/. **Disclaimer:** While this toolkit is developed in conjunction with the ASHRAE Standard 205 project committee, it is not an official ASHRAE product or a part of the standard. -**Warning!** As the proposed ASHRAE Standard 205P has not yet been published, the content in this repository is subject to change and should be considered unstable for application development. - -About ASHRAE 205 ----------------- - -ASHRAE Standard 205P is "Standard Representation of Performance Simulation Data for HVAC&R and Other Facility Equipment". While the standard is not yet published, public reviews are available at [ASHRAE's online review portal](https://osr.ashrae.org/default.aspx). - -The stated purpose of ASHRAE Standard 205 is: - -> To facilitate sharing of equipment characteristics for performance simulation by defining standard representations such as data models, data formats, and automation interfaces. - -The Standard is intended to support the following use cases: - -- **Data Publication** Data publishers (typically equipment manufacturers) use representation specifications to guide implementation of data writing and validity testing software that produces correctly-formed representation files. - -- **Application Development** Application developers use representation specifications to guide implementation of software that correctly reads representation data. Such implementations may include validity tests and developers may use representation specification example data for testing purposes. - -- **Data Application** Application users use representation specifications to understand and check representation data. Data exchange will generally be automated but the availability of representation specifications facilitates additional data checking when needed. - -Generally, a data publisher (e.g., manufacturer) provides an ASHRAE Standard 205 representation of a specific piece of equipment that the application user can load into compliant performance simulation software. - Building the Toolkit -------------------- @@ -39,26 +18,19 @@ Toolkit 205 uses git submodules. To clone the submodules, you will either have t or -2. do a recursive submodule update after cloneing this repository: +2. do a recursive submodule update after cloning this repository: `git submodule update --init --recursive` -We are currently supporting python 3.x. - -In order to contribute to Toolkit 205, you will need to set up a consistent virtual environment for testing. -This project uses `pipenv` to create a virtual python environment and install the required dependencies. -Install `pipenv` through `pip`: - -`pip install pipenv` +We are currently supporting python 3.7 and higher. -With `pipenv` installed, you may now create the virtual environment (defined in the `Pipfile`) where you will install the project and developer dependencies: +This project uses [Poetry](https://python-poetry.org/docs/#installation) python package management tool. Once you have Poetry installed you can install the dependencies using: -`pipenv install --dev` +`poetry install` +You can test your installation using: -Finally, you can build (generate the schema, translate examples, generate templates, and generate web content) and test the toolkit: - -`pipenv run doit` +`poetry run doit` ### Products @@ -71,7 +43,7 @@ The toolkit can additionally build a C++ library suitable for import into C++ mo To build the library, use -`cmake -B build` +`cmake -B build` to generate build files for an "out-of-source" build directory, then @@ -80,8 +52,3 @@ to generate build files for an "out-of-source" build directory, then to build libtk205. **Note:** Because the tests for libtk205 automatically clean all auto-generated files after the build, the cmake generator must be run fresh each time. This ensures that no Representations are out of date. - -Example Usage -------------- - -TODO \ No newline at end of file From 8bbc55dde8ae3053ff64ae181e30041e6ff7dedc Mon Sep 17 00:00:00 2001 From: Neal Kruis Date: Thu, 1 Dec 2022 13:51:24 -0700 Subject: [PATCH 154/154] Update web content to reflect publication. --- schema-205 | 2 +- web/markdown-content/about.md | 10 +++++----- web/markdown-content/examples.md | 4 ++-- web/markdown-content/tk205.md | 2 +- web/templates/header_template.html | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/schema-205 b/schema-205 index e112ceb..e9a365f 160000 --- a/schema-205 +++ b/schema-205 @@ -1 +1 @@ -Subproject commit e112ceb99728a2af11a3fef4973f1eff20be9d3b +Subproject commit e9a365fa77c0b5873d46579e97f3dfb412f7c56a diff --git a/web/markdown-content/about.md b/web/markdown-content/about.md index e69d5a8..6484d78 100644 --- a/web/markdown-content/about.md +++ b/web/markdown-content/about.md @@ -1,4 +1,4 @@ -# ASHRAE Standard 205P: Representation of Performance Data for HVAC&R and Other Facility Equipment +# ASHRAE Standard 205: Representation of Performance Data for HVAC&R and Other Facility Equipment ## Purpose @@ -8,11 +8,11 @@ To facilitate automated sharing of equipment performance characteristics by defi This standard applies to performance data for any HVAC&R or other facility system, equipment, or component. -## About ASHRAE Standard 205P +## About ASHRAE Standard 205 -ASHRAE Standard 205P defines common data models and serialization formats for facility equipment performance data needed for engineering applications such as energy simulation. The formats allow automated exchange among data sources (manufacturers), simulation models, and other engineering applications. The formats and procedures specified in the standard are developed by SPC (Standard Project Committee) 205 under ASHRAE and ANSI consensus processes. SPC-205 membership includes equipment manufacturers, application software developers, and engineering practitioners. +ASHRAE Standard 205 defines common data models and serialization formats for facility equipment performance data needed for engineering applications such as energy simulation. The formats allow automated exchange among data sources (manufacturers), simulation models, and other engineering applications. The formats and procedures specified in the standard are developed by SSPC (Standing Standard Project Committee) 205 under ASHRAE and ANSI consensus processes. SSPC 205 membership includes equipment manufacturers, application software developers, and engineering practitioners. -Standard 205 defines the term *representation* to mean a Concise Binary Object Representation (CBOR) file conforming to a JSON schema defined by a human-readable (text) document called a *representation specification*. Representation specifications are included in Standard 205P appended as an open-ended set. +Standard 205 defines the term *representation* to mean a Concise Binary Object Representation (CBOR) file conforming to a JSON schema defined by a human-readable (text) document called a *representation specification*. Representation specifications are included in Standard 205 appended as an open-ended set. Standard 205 structure and application can be visualized as follows: @@ -28,4 +28,4 @@ This web site hosts supporting material for each representation specification, i All representations have common structures and elements. An open source project, [open205](https://github.com/open205), is underway to provide software components for use by data publishers and application developers. -SPC 205 is developing representation specifications for additional equipment types. These will be published in future revisions of the standard. \ No newline at end of file +SSPC 205 is developing representation specifications for additional equipment types. These will be published in future revisions of the standard. diff --git a/web/markdown-content/examples.md b/web/markdown-content/examples.md index 6847429..62e4155 100644 --- a/web/markdown-content/examples.md +++ b/web/markdown-content/examples.md @@ -1,8 +1,8 @@ -Examples provided here are for illustrative purposes only. While CBOR is the official representation format defined by ASHRAE Standard 205P, it is sometime convenient to view and edit representation data in other formats. All other file formats must be translated to CBOR for use in application software. Routines for converting between the file formats are included in [Toolkit 205](tk205.html). +Examples provided here are for illustrative purposes only. While CBOR is the official representation format defined by ASHRAE Standard 205, it is sometime convenient to view and edit representation data in other formats. All other file formats must be translated to CBOR for use in application software. Routines for converting between the file formats are included in [Toolkit 205](tk205.html). Each example represntation is provided in four formats: - **[CBOR](https://cbor.io/):** CBOR is machine-readable, but not human-readable. - **[XLSX](https://wiki.fileformat.com/spreadsheet/xlsx/):** Convenient spreadsheet format for viewing and editing representation data (see [XLSX Templates](templates.html) for empty examples for creating new representations). - **[JSON](https://www.json.org/):** A common, human-and-machine-readable data exchange format. -- **[YAML](https://yaml.org/):** An alterntaive common, human-and-machine-readable data exchange format. \ No newline at end of file +- **[YAML](https://yaml.org/):** An alterntaive common, human-and-machine-readable data exchange format. diff --git a/web/markdown-content/tk205.md b/web/markdown-content/tk205.md index 7872bee..1f61ece 100644 --- a/web/markdown-content/tk205.md +++ b/web/markdown-content/tk205.md @@ -1 +1 @@ -A software toolkit to facilitate the adoption of the ASHRAE Standard 205P data exchange specification. \ No newline at end of file +A software toolkit to facilitate the adoption of the ASHRAE Standard 205 data exchange specification. diff --git a/web/templates/header_template.html b/web/templates/header_template.html index 3bfc8a0..c163667 100644 --- a/web/templates/header_template.html +++ b/web/templates/header_template.html @@ -4,7 +4,7 @@ -

    ASHRAE Standard 205P Resource Files

    +

    ASHRAE Standard 205 Resource Files