diff --git a/.clang-format b/.clang-format index 1c27bb27..a9b82591 100644 --- a/.clang-format +++ b/.clang-format @@ -34,7 +34,7 @@ AlwaysBreakBeforeMultilineStrings: false AlwaysBreakTemplateDeclarations: true BinPackArguments: true BinPackParameters: true -BraceWrapping: +BraceWrapping: AfterClass: false AfterControlStatement: false AfterEnum: false @@ -65,7 +65,7 @@ DisableFormat: false ExperimentalAutoDetectBinPacking: false FixNamespaceComments: true ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ] -IncludeCategories: +IncludeCategories: - Regex: '^"' Priority: 1 - Regex: '^<' diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index bf0540f3..cabedd9d 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -24,7 +24,7 @@ jobs: check_formatting: uses: NWChemEx/.github/.github/workflows/check_formatting.yaml@master with: - license_config: ".github/.licenserc.yaml" + license_config: ".licenserc.yaml" test_nwx_docs: uses: NWChemEx/.github/.github/workflows/test_nwx_docs.yaml@master diff --git a/.github/.licenserc.yaml b/.licenserc.yaml similarity index 94% rename from .github/.licenserc.yaml rename to .licenserc.yaml index 46a9ddae..87c2fcca 100644 --- a/.github/.licenserc.yaml +++ b/.licenserc.yaml @@ -22,6 +22,7 @@ header: - docs/Makefile - LICENSE - docs/requirements.txt - - version.txt + - version.txt + - build/ - comment: never \ No newline at end of file + comment: never diff --git a/CMakeLists.txt b/CMakeLists.txt index 5f0bdd88..e2b80205 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,7 +39,7 @@ cmaize_option_list( BUILD_PYBIND11_PYBINDINGS ON "Should we build pybind11 python bindings?" BUILD_CPP_JOULES OFF "Enable energy usage tracking with CPP Joules library?" BUILD_CUDA_BINDINGS OFF "Enable CUDA Bindings" - BUILD_HIP_BINDINGS OFF "Enable HIP Bindings" + BUILD_HIP_BINDINGS OFF "Enable HIP Bindings" BUILD_SYCL_BINDINGS OFF "Enable SYCL Bindings" BUILD_PAPI_BINDINGS OFF "Enable PAPI Bindings" ) diff --git a/LICENSE b/LICENSE index 4947287f..f433b1a5 100644 --- a/LICENSE +++ b/LICENSE @@ -174,4 +174,4 @@ incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - END OF TERMS AND CONDITIONS \ No newline at end of file + END OF TERMS AND CONDITIONS diff --git a/cmake/build_device.cmake b/cmake/build_device.cmake index b8109674..9cda512b 100644 --- a/cmake/build_device.cmake +++ b/cmake/build_device.cmake @@ -38,7 +38,7 @@ function(build_device) set(CMAKE_CXX_STANDARD 17) endif() -endfunction() +endfunction() # Call the function we just wrote to get CMakePP build_device() diff --git a/docs/source/conf.py b/docs/source/conf.py index 7043aacb..8bc39998 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -21,13 +21,14 @@ # http://www.sphinx-doc.org/en/master/config import os -import subprocess + +# import subprocess # -- Project information ----------------------------------------------------- -project = u'parallelzone' -copyright = u'2021, NWChemEx Team' -author = u'NWChemEx Team' +project = "parallelzone" +copyright = "2021, NWChemEx Team" +author = "NWChemEx Team" # Get the version from the git tag # git_cmd = ['git', 'describe', '--tags', '--abbrev=0'] @@ -50,32 +51,37 @@ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ - 'sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx', - 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.mathjax', - 'sphinx.ext.githubpages', 'sphinx_tabs.tabs' + "sphinx.ext.autodoc", + "sphinx.ext.doctest", + "sphinx.ext.intersphinx", + "sphinx.ext.todo", + "sphinx.ext.coverage", + "sphinx.ext.mathjax", + "sphinx.ext.githubpages", + "sphinx_tabs.tabs", ] dir_path = os.path.dirname(os.path.realpath(__file__)) doc_path = os.path.dirname(dir_path) root_path = os.path.dirname(doc_path) # Add any paths that contain templates here, relative to this directory. -#templates_path = ['_templates'] +# templates_path = ['_templates'] # The suffix(es) of source filenames. # You can specify multiple suffix as a list of string: # # source_suffix = ['.rst', '.md'] -source_suffix = '.rst' +source_suffix = ".rst" # The master toctree document. -master_doc = 'index' +master_doc = "index" # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. -language = 'en' +language = "en" # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. @@ -83,7 +89,7 @@ exclude_patterns = [] # The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' +pygments_style = "sphinx" numfig = True numfig_secnum_depth = 0 @@ -93,7 +99,7 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_theme = 'sphinx_rtd_theme' +html_theme = "sphinx_rtd_theme" # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the @@ -104,7 +110,7 @@ # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -#html_static_path = ['_static'] +# html_static_path = ['_static'] # Custom sidebar templates, must be a dictionary that maps document names # to template names. @@ -119,7 +125,7 @@ # -- Options for HTMLHelp output --------------------------------------------- # Output file base name for HTML help builder. -htmlhelp_basename = project + 'doc' +htmlhelp_basename = project + "doc" # -- Options for LaTeX output ------------------------------------------------ @@ -127,15 +133,12 @@ # The paper size ('letterpaper' or 'a4paper'). # # 'papersize': 'letterpaper', - # The font size ('10pt', '11pt' or '12pt'). # # 'pointsize': '10pt', - # Additional stuff for the LaTeX preamble. # # 'preamble': '', - # Latex figure (float) alignment # # 'figure_align': 'htbp', @@ -145,16 +148,22 @@ # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - (master_doc, project + '.tex', project + ' Documentation', author, - 'manual'), + ( + master_doc, + project + ".tex", + project + " Documentation", + author, + "manual", + ), ] # -- Options for manual page output ------------------------------------------ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). -man_pages = [(master_doc, project.lower(), project + ' Documentation', - [author], 1)] +man_pages = [ + (master_doc, project.lower(), project + " Documentation", [author], 1) +] # -- Options for Texinfo output ---------------------------------------------- @@ -162,8 +171,15 @@ # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ - (master_doc, project, project + ' Documentation', author, project, - 'One line description of project.', 'Miscellaneous'), + ( + master_doc, + project, + project + " Documentation", + author, + project, + "One line description of project.", + "Miscellaneous", + ), ] # -- Extension configuration ------------------------------------------------- @@ -171,7 +187,7 @@ # -- Options for intersphinx extension --------------------------------------- # Example configuration for intersphinx: refer to the Python standard library. -intersphinx_mapping = {'python': ('https://docs.python.org/3', None)} +intersphinx_mapping = {"python": ("https://docs.python.org/3", None)} # -- Options for todo extension ---------------------------------------------- diff --git a/docs/source/developer/design/compp.rst b/docs/source/developer/design/compp.rst index 5c1d18a1..81b391f3 100644 --- a/docs/source/developer/design/compp.rst +++ b/docs/source/developer/design/compp.rst @@ -26,10 +26,10 @@ discuss the design of the ``CommPP`` class. Why Do We Need CommPP? ********************** -ParallelZone needs access to MPI. ParallelZone is object-oriented and needs -something to bridge the gap between objects and types recognized by MPI. At a -high-level this leads to serialization, but naive application of serializaiton -in an MPI context can lead to inefficiencies. CommPP should automate the +ParallelZone needs access to MPI. ParallelZone is object-oriented and needs +something to bridge the gap between objects and types recognized by MPI. At a +high-level this leads to serialization, but naive application of serializaiton +in an MPI context can lead to inefficiencies. CommPP should automate the conversion from objects to MPI data types in the most efficient manner possible. ********************* diff --git a/docs/source/developer/design/logger.rst b/docs/source/developer/design/logger.rst index 50ced826..80f50e92 100644 --- a/docs/source/developer/design/logger.rst +++ b/docs/source/developer/design/logger.rst @@ -28,7 +28,7 @@ What is the Logger Class? The ``Logger`` class is the user-facing API of ParallelZone's logging component. The ``Logger`` class is used by users of ParallelZone to log -events, *i.e.*, errors, warnings, progress, etc. +events, *i.e.*, errors, warnings, progress, etc. ******************************** Why do we need the Logger Class? @@ -36,7 +36,7 @@ Why do we need the Logger Class? As summarized in :ref:`logging_design`, we are not aware of any existing logging solutions that do everything we need. We have thus chosen to implement the -missing features, to our liking, within the ``Logger`` class. The +missing features, to our liking, within the ``Logger`` class. The ``Logger`` class also provides a stable API for ParallelZone users in the event we should need to add additional logging capabilities or switch out the backend. The ``Logger`` class also separates the concern of "what to log" from "how to @@ -74,8 +74,8 @@ Existing Logger Solutions ************************* :ref:`existing_logging_solutions` covered the existing logging solutions in -detail and will not be replicated here. Instead we point out that of the -available choices, Spdlog has most of the features we want and is heavily +detail and will not be replicated here. Instead we point out that of the +available choices, Spdlog has most of the features we want and is heavily supported. As seen in the next section we have opted to build our ``Logger`` infrastructure around Spdlog. @@ -92,22 +92,22 @@ Logger Design For the first implementation of the logging component we adopted the simple architecture shown in Figure :numref:`logger_arch`. Users of ParallelZone see -one class, ``Logger``. As a first pass, ``Logger`` simply provides APIs +one class, ``Logger``. As a first pass, ``Logger`` simply provides APIs for printing arbitrary data, already in a ``std::string`` (or implicitly -convertible to a ``std::string``) at various severity levels. Eventually, this +convertible to a ``std::string``) at various severity levels. Eventually, this may be expanded to support more fine-grained control over the log formatting. Internally ``Logger`` is implemented by a ``LoggerPIMPL`` object. The literal -``LoggerPIMPL`` object is an abstract base class which defines the API for -actual implementations. Our Spdlog-based implementation derives the +``LoggerPIMPL`` object is an abstract base class which defines the API for +actual implementations. Our Spdlog-based implementation derives the ``SpdlogPIMPL`` class from ``LoggerPIMPL`` to implement the parts of the PIMPL API common to all Spdlog-based implementations. For now we have two sinks, and they are implemented by further specializing the ``SpdlogPIMPL``. The sinks, ``StdoutSpdlog`` and ``FileSpdlog`` respectively -output logs to standard out and a specified file. +output logs to standard out and a specified file. -This design addresses the considerations remaining from +This design addresses the considerations remaining from :ref:`logging_design` by: 1. Multiple logging levels. @@ -143,4 +143,4 @@ particular we note: we ultimately need to print strings so supporting of other types is simply a convenience mechanism for channeling them into the string paths. - Can add wide-character support. Spdlog already supports it so it's just a - matter of exposing it. \ No newline at end of file + matter of exposing it. diff --git a/docs/source/developer/design/logging.rst b/docs/source/developer/design/logging.rst index 9fa157eb..3c56a8c6 100644 --- a/docs/source/developer/design/logging.rst +++ b/docs/source/developer/design/logging.rst @@ -18,7 +18,7 @@ Designing the Logging Component ############################### -ParallelZone provides a ``Logger`` class to facilitate recording of events, +ParallelZone provides a ``Logger`` class to facilitate recording of events, i.e., print statements. The high-level design is summarized on this page. ***************** @@ -261,7 +261,7 @@ Logging Design Software architecture of ParallelZone's Logging component. Ultimately none of the widely available logging solutions do everything we want -and we have chosen to have the user-facing logger be written by us. This +and we have chosen to have the user-facing logger be written by us. This provides a stable API to users of ParallelZone, while allowing ParallelZone developers to graft the missing features onto existing logging libraries. @@ -312,7 +312,7 @@ This architecture addresses the considerations raised above by: 1. Multiple loggers. - - We can have multiple logger instances. Each instance is configured + - We can have multiple logger instances. Each instance is configured for a specific scope (global vs. process-local). - Thread-safety should avoid the need for a "thread-local" logger. @@ -324,7 +324,7 @@ This architecture addresses the considerations raised above by: The remaining issues, including the thread-safety requirement of consideration 3, are punted to the ``Logger`` class, which is the class actually -implementing the global and process-local loggers. The design of ``Logger`` +implementing the global and process-local loggers. The design of ``Logger`` is provided here: :ref:`logger_design`. ********************* @@ -338,7 +338,6 @@ if/when users want to customize logging more. In particular: for specific instances. Turning on/off such loggers makes it easier to track what's going on with the class and instances. - Realistically we probably want a factory, or similar mechanism, for - setting up the initial loggers. Since our initialization choices are + setting up the initial loggers. Since our initialization choices are presently very limited we punt on the factory until more choices become available. - diff --git a/include/parallelzone/archive_wrapper.hpp b/include/parallelzone/archive_wrapper.hpp index 33a1f900..61ba1e43 100644 --- a/include/parallelzone/archive_wrapper.hpp +++ b/include/parallelzone/archive_wrapper.hpp @@ -64,4 +64,4 @@ class ArchiveWrapper { using Serializer = ArchiveWrapper; using Deserializer = ArchiveWrapper; -} // namespace parallelzone \ No newline at end of file +} // namespace parallelzone diff --git a/include/parallelzone/hardware/cpu/cpu.hpp b/include/parallelzone/hardware/cpu/cpu.hpp index 0adb2382..9159adb6 100644 --- a/include/parallelzone/hardware/cpu/cpu.hpp +++ b/include/parallelzone/hardware/cpu/cpu.hpp @@ -92,4 +92,4 @@ class CPU { profile_return_type profile_it_(task_type&& task) const; }; -} // namespace parallelzone::hardware \ No newline at end of file +} // namespace parallelzone::hardware diff --git a/include/parallelzone/logging/logging.hpp b/include/parallelzone/logging/logging.hpp index ca0b97c8..8f5bdefc 100644 --- a/include/parallelzone/logging/logging.hpp +++ b/include/parallelzone/logging/logging.hpp @@ -16,4 +16,4 @@ #pragma once #include -#include \ No newline at end of file +#include diff --git a/include/parallelzone/serialization.hpp b/include/parallelzone/serialization.hpp index fd70b9bb..831c0958 100644 --- a/include/parallelzone/serialization.hpp +++ b/include/parallelzone/serialization.hpp @@ -58,4 +58,4 @@ template using is_deserializable = cereal::traits::is_input_serializable; using cereal::traits::detail::get_input_from_output; using cereal::traits::detail::get_output_from_input; -} // namespace parallelzone \ No newline at end of file +} // namespace parallelzone diff --git a/include/parallelzone/task/argument_traits.hpp b/include/parallelzone/task/argument_traits.hpp index 616849e6..42cb5ab0 100644 --- a/include/parallelzone/task/argument_traits.hpp +++ b/include/parallelzone/task/argument_traits.hpp @@ -66,4 +66,4 @@ struct ArgumentTraits { std::is_same_v; }; -} // namespace parallelzone::task \ No newline at end of file +} // namespace parallelzone::task diff --git a/include/parallelzone/task/argument_wrapper.hpp b/include/parallelzone/task/argument_wrapper.hpp index 9f932d31..2000cbda 100644 --- a/include/parallelzone/task/argument_wrapper.hpp +++ b/include/parallelzone/task/argument_wrapper.hpp @@ -124,4 +124,4 @@ class ArgumentWrapper { holder_type m_value_; }; -} // namespace parallelzone::task \ No newline at end of file +} // namespace parallelzone::task diff --git a/include/parallelzone/task/detail_/task_wrapper_.hpp b/include/parallelzone/task/detail_/task_wrapper_.hpp index 7f5c6953..5912c2be 100644 --- a/include/parallelzone/task/detail_/task_wrapper_.hpp +++ b/include/parallelzone/task/detail_/task_wrapper_.hpp @@ -134,4 +134,4 @@ static auto make_outer_lambda_(FxnType&& fxn, Args&&... args) { } } -} // namespace parallelzone::task::detail_ \ No newline at end of file +} // namespace parallelzone::task::detail_ diff --git a/include/parallelzone/task/task.hpp b/include/parallelzone/task/task.hpp index 3ae5d8a6..8d9be73b 100644 --- a/include/parallelzone/task/task.hpp +++ b/include/parallelzone/task/task.hpp @@ -16,4 +16,4 @@ #pragma once #include -#include \ No newline at end of file +#include diff --git a/include/parallelzone/task/task_wrapper.hpp b/include/parallelzone/task/task_wrapper.hpp index 0a8f2f89..b2a0b2b8 100644 --- a/include/parallelzone/task/task_wrapper.hpp +++ b/include/parallelzone/task/task_wrapper.hpp @@ -165,7 +165,7 @@ class TaskWrapper { private: /// Deleted because there can only be one instance of a task. - TaskWrapper(const TaskWrapper&) = delete; + TaskWrapper(const TaskWrapper&) = delete; TaskWrapper& operator=(const TaskWrapper&) = delete; /// Type *this will use to hold the task @@ -209,4 +209,4 @@ auto make_task(FxnType&& fxn, Args&&... args) { return std::make_pair(std::move(t), std::move(unwrapper)); } -} // namespace parallelzone::task \ No newline at end of file +} // namespace parallelzone::task diff --git a/src/parallelzone/hardware/cpu/cpu.cpp b/src/parallelzone/hardware/cpu/cpu.cpp index e39b5e75..c1c5fcf0 100644 --- a/src/parallelzone/hardware/cpu/cpu.cpp +++ b/src/parallelzone/hardware/cpu/cpu.cpp @@ -30,4 +30,4 @@ typename CPU::profile_return_type CPU::profile_it_(task_type&& task) const { return std::make_pair(std::move(result), std::move(i)); } -} // namespace parallelzone::hardware \ No newline at end of file +} // namespace parallelzone::hardware diff --git a/src/parallelzone/hardware/cpu/energy_monitor.hpp b/src/parallelzone/hardware/cpu/energy_monitor.hpp index 3053bcaa..829c23e8 100644 --- a/src/parallelzone/hardware/cpu/energy_monitor.hpp +++ b/src/parallelzone/hardware/cpu/energy_monitor.hpp @@ -50,4 +50,4 @@ class EnergyMonitor { } // namespace parallelzone::hardware -#endif \ No newline at end of file +#endif diff --git a/src/parallelzone/logging/detail_/logger_pimpl.hpp b/src/parallelzone/logging/detail_/logger_pimpl.hpp index f3d887f2..d854eb80 100644 --- a/src/parallelzone/logging/detail_/logger_pimpl.hpp +++ b/src/parallelzone/logging/detail_/logger_pimpl.hpp @@ -128,10 +128,10 @@ class LoggerPIMPL { protected: // Protected to avoid slicing - LoggerPIMPL(const LoggerPIMPL&) = default; + LoggerPIMPL(const LoggerPIMPL&) = default; LoggerPIMPL& operator=(const LoggerPIMPL&) = default; LoggerPIMPL(LoggerPIMPL&&) = default; - LoggerPIMPL& operator=(LoggerPIMPL&&) = default; + LoggerPIMPL& operator=(LoggerPIMPL&&) = default; /** @brief Hook for polymorphic deep copy * diff --git a/src/parallelzone/logging/detail_/spdlog/file.cpp b/src/parallelzone/logging/detail_/spdlog/file.cpp index c26e9042..922342dd 100644 --- a/src/parallelzone/logging/detail_/spdlog/file.cpp +++ b/src/parallelzone/logging/detail_/spdlog/file.cpp @@ -37,4 +37,4 @@ bool FileSpdlog::are_equal_(const LoggerPIMPL& other) const noexcept { return SpdlogPIMPL::are_equal_(other); } -} // namespace parallelzone::detail_ \ No newline at end of file +} // namespace parallelzone::detail_ diff --git a/src/parallelzone/logging/detail_/spdlog/file.hpp b/src/parallelzone/logging/detail_/spdlog/file.hpp index 9a2c1693..fa351b55 100644 --- a/src/parallelzone/logging/detail_/spdlog/file.hpp +++ b/src/parallelzone/logging/detail_/spdlog/file.hpp @@ -45,10 +45,10 @@ class FileSpdlog : public SpdlogPIMPL { FileSpdlog(const_string_reference id, const_string_reference file_name); protected: - FileSpdlog(const FileSpdlog&) = default; + FileSpdlog(const FileSpdlog&) = default; FileSpdlog& operator=(const FileSpdlog&) = default; FileSpdlog(FileSpdlog&&) = default; - FileSpdlog& operator=(FileSpdlog&&) = default; + FileSpdlog& operator=(FileSpdlog&&) = default; /// Implemented by calling the copy ctor on *this pimpl_ptr clone_() const override; diff --git a/src/parallelzone/logging/detail_/spdlog/spdlog.hpp b/src/parallelzone/logging/detail_/spdlog/spdlog.hpp index ed1eb1d5..83071eaa 100644 --- a/src/parallelzone/logging/detail_/spdlog/spdlog.hpp +++ b/src/parallelzone/logging/detail_/spdlog/spdlog.hpp @@ -49,10 +49,10 @@ class SpdlogPIMPL : public LoggerPIMPL { explicit SpdlogPIMPL(spdlog_type logger); protected: - SpdlogPIMPL(const SpdlogPIMPL&) = default; + SpdlogPIMPL(const SpdlogPIMPL&) = default; SpdlogPIMPL& operator=(const SpdlogPIMPL&) = default; SpdlogPIMPL(SpdlogPIMPL&&) = default; - SpdlogPIMPL& operator=(SpdlogPIMPL&&) = default; + SpdlogPIMPL& operator=(SpdlogPIMPL&&) = default; /// Calls the copy ctor on *this, derived classes must override too pimpl_ptr clone_() const override; diff --git a/src/parallelzone/logging/detail_/spdlog/stdout.cpp b/src/parallelzone/logging/detail_/spdlog/stdout.cpp index a1a566e3..e4afca0d 100644 --- a/src/parallelzone/logging/detail_/spdlog/stdout.cpp +++ b/src/parallelzone/logging/detail_/spdlog/stdout.cpp @@ -33,4 +33,4 @@ bool StdoutSpdlog::are_equal_(const LoggerPIMPL& other) const noexcept { return SpdlogPIMPL::are_equal_(other); } -} // namespace parallelzone::detail_ \ No newline at end of file +} // namespace parallelzone::detail_ diff --git a/src/parallelzone/logging/detail_/spdlog/stdout.hpp b/src/parallelzone/logging/detail_/spdlog/stdout.hpp index 01462f89..d1cee4d2 100644 --- a/src/parallelzone/logging/detail_/spdlog/stdout.hpp +++ b/src/parallelzone/logging/detail_/spdlog/stdout.hpp @@ -39,10 +39,10 @@ class StdoutSpdlog : public SpdlogPIMPL { explicit StdoutSpdlog(const_string_reference id); protected: - StdoutSpdlog(const StdoutSpdlog&) = default; + StdoutSpdlog(const StdoutSpdlog&) = default; StdoutSpdlog& operator=(const StdoutSpdlog&) = default; StdoutSpdlog(StdoutSpdlog&&) = default; - StdoutSpdlog& operator=(StdoutSpdlog&&) = default; + StdoutSpdlog& operator=(StdoutSpdlog&&) = default; /// Implements clone() by calling copy ctor on *this pimpl_ptr clone_() const override; @@ -51,4 +51,4 @@ class StdoutSpdlog : public SpdlogPIMPL { bool are_equal_(const LoggerPIMPL& other) const noexcept override; }; -} // namespace parallelzone::detail_ \ No newline at end of file +} // namespace parallelzone::detail_ diff --git a/src/parallelzone/logging/logger.cpp b/src/parallelzone/logging/logger.cpp index 1254d113..3b3f3f1a 100644 --- a/src/parallelzone/logging/logger.cpp +++ b/src/parallelzone/logging/logger.cpp @@ -28,7 +28,7 @@ Logger::Logger() noexcept : Logger(nullptr) {} Logger::Logger(pimpl_ptr&& p) noexcept : m_pimpl_(std::move(p)) {} Logger::~Logger() noexcept = default; -Logger::Logger(Logger&&) noexcept = default; +Logger::Logger(Logger&&) noexcept = default; Logger& Logger::operator=(Logger&&) noexcept = default; Logger::Logger(const Logger& other) : diff --git a/tests/cxx/doc_snippets/catch.hpp b/tests/cxx/doc_snippets/catch.hpp index 40b6c761..d994956f 100644 --- a/tests/cxx/doc_snippets/catch.hpp +++ b/tests/cxx/doc_snippets/catch.hpp @@ -18,4 +18,4 @@ #include #include #include -#include \ No newline at end of file +#include diff --git a/tests/cxx/unit_tests/parallelzone/catch.hpp b/tests/cxx/unit_tests/parallelzone/catch.hpp index 40b6c761..d994956f 100644 --- a/tests/cxx/unit_tests/parallelzone/catch.hpp +++ b/tests/cxx/unit_tests/parallelzone/catch.hpp @@ -18,4 +18,4 @@ #include #include #include -#include \ No newline at end of file +#include diff --git a/tests/cxx/unit_tests/parallelzone/hardware/cpu/cpu.cpp b/tests/cxx/unit_tests/parallelzone/hardware/cpu/cpu.cpp index d4022340..60f05c51 100644 --- a/tests/cxx/unit_tests/parallelzone/hardware/cpu/cpu.cpp +++ b/tests/cxx/unit_tests/parallelzone/hardware/cpu/cpu.cpp @@ -49,4 +49,4 @@ TEST_CASE("CPU") { REQUIRE(info.wall_time.count() > 0); // Should have taken time... } } -} \ No newline at end of file +} diff --git a/tests/cxx/unit_tests/parallelzone/serialization.cpp b/tests/cxx/unit_tests/parallelzone/serialization.cpp index 39a61806..29953acc 100644 --- a/tests/cxx/unit_tests/parallelzone/serialization.cpp +++ b/tests/cxx/unit_tests/parallelzone/serialization.cpp @@ -63,4 +63,4 @@ TEMPLATE_TEST_CASE("Serialization with Cereal wrapper", REQUIRE(v2 == v); REQUIRE(m2 == m); } -} \ No newline at end of file +} diff --git a/tests/cxx/unit_tests/parallelzone/task/argument_traits.cpp b/tests/cxx/unit_tests/parallelzone/task/argument_traits.cpp index 3ca2c391..666282f7 100644 --- a/tests/cxx/unit_tests/parallelzone/task/argument_traits.cpp +++ b/tests/cxx/unit_tests/parallelzone/task/argument_traits.cpp @@ -121,4 +121,4 @@ TEST_CASE("ArgumentTraits") { STATIC_REQUIRE_FALSE(traits_t::is_const_reference_v); STATIC_REQUIRE(traits_t::is_rvalue_reference_v); } -} \ No newline at end of file +} diff --git a/tests/cxx/unit_tests/parallelzone/task/task_wrapper.cpp b/tests/cxx/unit_tests/parallelzone/task/task_wrapper.cpp index 8fd599e8..f070f117 100644 --- a/tests/cxx/unit_tests/parallelzone/task/task_wrapper.cpp +++ b/tests/cxx/unit_tests/parallelzone/task/task_wrapper.cpp @@ -147,4 +147,4 @@ TEST_CASE("TaskWrapper") { auto task = make_task(return_free2, pa_vector, std::move(a_vector)); std::apply(tester, std::move(task)); } -} \ No newline at end of file +} diff --git a/tests/python/doc_snippets/test_doc_snippets.py b/tests/python/doc_snippets/test_doc_snippets.py index 1e1f47b6..c8a3f4c0 100644 --- a/tests/python/doc_snippets/test_doc_snippets.py +++ b/tests/python/doc_snippets/test_doc_snippets.py @@ -14,11 +14,12 @@ # limitations under the License. # import os -import parallelzone as pz import sys import unittest -if __name__ == '__main__': +import parallelzone as pz + +if __name__ == "__main__": # Make a RuntimeView and hold it until all tests run so MPI isn't shut # down rv = pz.runtime.RuntimeView() diff --git a/tests/python/doc_snippets/test_quickstart.py b/tests/python/doc_snippets/test_quickstart.py index cdcfa2a2..d66360d8 100644 --- a/tests/python/doc_snippets/test_quickstart.py +++ b/tests/python/doc_snippets/test_quickstart.py @@ -13,16 +13,16 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import parallelzone as pz import unittest +import parallelzone as pz + def get_runtime(): return pz.runtime.RuntimeView() class TestQuickstartTestCase(unittest.TestCase): - def test_quickstart(self): # 99.9% of the time you will be using an existing RuntimeView rt = get_runtime() diff --git a/tests/python/doc_snippets/test_ram.py b/tests/python/doc_snippets/test_ram.py index 328a3a97..cfcf7e32 100644 --- a/tests/python/doc_snippets/test_ram.py +++ b/tests/python/doc_snippets/test_ram.py @@ -13,12 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import parallelzone as pz import unittest +import parallelzone as pz + class TestRAMTestCase(unittest.TestCase): - def test_ram(self): rv = pz.runtime.RuntimeView() diff --git a/tests/python/doc_snippets/test_resource_set.py b/tests/python/doc_snippets/test_resource_set.py index 16c0c868..1d68806e 100644 --- a/tests/python/doc_snippets/test_resource_set.py +++ b/tests/python/doc_snippets/test_resource_set.py @@ -13,12 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import parallelzone as pz import unittest +import parallelzone as pz + class TestResourceSetTestCase(unittest.TestCase): - def test_resourceset(self): rv = pz.runtime.RuntimeView() @@ -44,7 +44,7 @@ def test_resourceset(self): does_0_have_ram = rank_0_rs.has_ram() # Have each resource set print whether it's rank 0 or not - my_rs.logger().debug('Am I rank 0: ' + str(is_local)) + my_rs.logger().debug("Am I rank 0: " + str(is_local)) # TODO: Better tests self.assertIsNotNone(rank_0_rs) diff --git a/tests/python/doc_snippets/test_runtime_view.py b/tests/python/doc_snippets/test_runtime_view.py index 0f169ff7..38d6d6c4 100644 --- a/tests/python/doc_snippets/test_runtime_view.py +++ b/tests/python/doc_snippets/test_runtime_view.py @@ -13,12 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import parallelzone as pz import unittest +import parallelzone as pz + class TestRuntimeViewTestCase(unittest.TestCase): - def test_runtimeview(self): rv = pz.runtime.RuntimeView() result = [0, 1, 2] diff --git a/tests/python/unit_tests/hardware/test_ram.py b/tests/python/unit_tests/hardware/test_ram.py index 77bec2b6..cc002057 100644 --- a/tests/python/unit_tests/hardware/test_ram.py +++ b/tests/python/unit_tests/hardware/test_ram.py @@ -13,12 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import parallelzone as pz import unittest +import parallelzone as pz + class RAMTestCase(unittest.TestCase): - def setUp(self): """ For unit testing purposes we "create" two RAM instances: diff --git a/tests/python/unit_tests/runtime/test_resource_set.py b/tests/python/unit_tests/runtime/test_resource_set.py index 9d6c68e7..ed8696cf 100644 --- a/tests/python/unit_tests/runtime/test_resource_set.py +++ b/tests/python/unit_tests/runtime/test_resource_set.py @@ -13,12 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import parallelzone as pz import unittest +import parallelzone as pz + class ResourceSetTestCase(unittest.TestCase): - def test_default_ctor(self): self.assertTrue(self.defaulted.empty()) self.assertFalse(self.defaulted.is_mine()) diff --git a/tests/python/unit_tests/runtime/test_runtime_view.py b/tests/python/unit_tests/runtime/test_runtime_view.py index 8065aaac..e2d5585d 100644 --- a/tests/python/unit_tests/runtime/test_runtime_view.py +++ b/tests/python/unit_tests/runtime/test_runtime_view.py @@ -13,12 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import parallelzone as pz import unittest +import parallelzone as pz + class RuntimeViewTestCase(unittest.TestCase): - def test_default_ctor(self): self.assertGreater(self.defaulted.size(), 0) self.assertFalse(self.defaulted.did_i_start_mpi()) diff --git a/tests/python/unit_tests/test_logging/test_logger.py b/tests/python/unit_tests/test_logging/test_logger.py index e544391d..da4d5359 100644 --- a/tests/python/unit_tests/test_logging/test_logger.py +++ b/tests/python/unit_tests/test_logging/test_logger.py @@ -14,9 +14,10 @@ # limitations under the License. # -import parallelzone as pz import unittest +import parallelzone as pz + class LoggerTestCase(unittest.TestCase): """ @@ -33,8 +34,12 @@ def setUp(self): self.defaulted = pz.Logger() self.log = pz.runtime.RuntimeView().logger() self.severities = [ - severity.trace, severity.debug, severity.info, severity.warn, - severity.error, severity.critical + severity.trace, + severity.debug, + severity.info, + severity.warn, + severity.error, + severity.critical, ] def test_set_severity(self): diff --git a/tests/python/unit_tests/test_parallelzone.py b/tests/python/unit_tests/test_parallelzone.py index f7efd028..aa281e36 100644 --- a/tests/python/unit_tests/test_parallelzone.py +++ b/tests/python/unit_tests/test_parallelzone.py @@ -15,11 +15,12 @@ # import os -import parallelzone as pz import sys import unittest -if __name__ == '__main__': +import parallelzone as pz + +if __name__ == "__main__": # Make a RuntimeView and hold it until all tests run so MPI isn't shut # down rv = pz.runtime.RuntimeView()