Skip to content

Commit

Permalink
Fix Incorrect docstring in mrc.core.coro (#503)
Browse files Browse the repository at this point in the history
* Include MRC libs with quotes not <>
* Add MRC version string to coro module (all the other Python modules have this)
* Fix spelling mistake in a comment in `python/mrc/core/executor.cpp`

Closes [#492](#492)

Authors:
  - David Gardner (https:/dagardner-nv)

Approvers:
  - Michael Demoret (https:/mdemoret-nv)

URL: #503
  • Loading branch information
dagardner-nv authored Oct 16, 2024
1 parent 43f200e commit 4f23470
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
3 changes: 1 addition & 2 deletions python/mrc/_pymrc/include/pymrc/coro.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-FileCopyrightText: Copyright (c) 2023-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -22,7 +22,6 @@
#include <mrc/coroutines/task.hpp>
#include <mrc/utils/string_utils.hpp>
#include <pybind11/cast.h>
#include <pybind11/detail/descr.h>
#include <pybind11/gil.h>
#include <pybind11/pybind11.h>
#include <pybind11/pytypes.h>
Expand Down
12 changes: 7 additions & 5 deletions python/mrc/core/coro.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-FileCopyrightText: Copyright (c) 2023-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -16,8 +16,10 @@
*/
#include "pymrc/coro.hpp"

#include "mrc/coroutines/task.hpp"
#include "mrc/version.hpp"

#include <glog/logging.h>
#include <mrc/coroutines/task.hpp>
#include <pybind11/gil.h>
#include <pybind11/pybind11.h>
#include <pybind11/pytypes.h>
Expand All @@ -36,7 +38,7 @@ PYBIND11_MODULE(coro, _module)
{
_module.doc() = R"pbdoc(
-----------------------
.. currentmodule:: morpheus.llm
.. currentmodule:: coro
.. autosummary::
:toctree: _generate
Expand All @@ -61,7 +63,7 @@ PYBIND11_MODULE(coro, _module)
co_return strings[0];
});

// _module.attr("__version__") =
// MRC_CONCAT_STR(morpheus_VERSION_MAJOR << "." << morpheus_VERSION_MINOR << "." << morpheus_VERSION_PATCH);
_module.attr("__version__") = MRC_CONCAT_STR(mrc_VERSION_MAJOR << "." << mrc_VERSION_MINOR << "."
<< mrc_VERSION_PATCH);
}
} // namespace mrc::pymrc::coro
4 changes: 2 additions & 2 deletions python/mrc/core/executor.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: Copyright (c) 2021-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-FileCopyrightText: Copyright (c) 2021-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -32,7 +32,7 @@
#include <sstream>
#include <utility> // for move

// IWYU thinks we need vectir for py::class_<Executor, std::shared_ptr<Executor>>
// IWYU thinks we need vector for py::class_<Executor, std::shared_ptr<Executor>>
// IWYU pragma: no_include <vector>

namespace mrc::pymrc {
Expand Down

0 comments on commit 4f23470

Please sign in to comment.