Skip to content

Commit

Permalink
Rename to olga_scheduler (#10)
Browse files Browse the repository at this point in the history
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Project name updated from "olg_scheduler" to "olga_scheduler" across
the application.
	- Test executables and associated files renamed accordingly.

- **Documentation**
	- Updated project references in the README to reflect the new name.
	- Added an image of "Olga of Kiev" in the README.

- **Bug Fixes**
- Ensured consistent namespace usage throughout the codebase,
maintaining functionality.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
maksimdrachov authored Dec 4, 2024
1 parent 9a63e04 commit d4eab58
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 25 deletions.
14 changes: 7 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Copyright (c) 2024 Zubax Robotics <[email protected]>

cmake_minimum_required(VERSION 3.12)
project(olg_scheduler_tests C CXX)
project(olga_scheduler_tests C CXX)
enable_testing()

set(CTEST_OUTPUT_ON_FAILURE ON)
Expand Down Expand Up @@ -47,14 +47,14 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wsign-conversion -Wcast-align -Wmissing
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wtype-limits -Wnon-virtual-dtor -Woverloaded-virtual")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-attributes")

add_executable(test_olg_scheduler_cpp20 ${CMAKE_CURRENT_SOURCE_DIR}/tests/test_olg_scheduler.cpp)
set_target_properties(test_olg_scheduler_cpp20 PROPERTIES CXX_STANDARD 20)
target_include_directories(test_olg_scheduler_cpp20 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include/olg_scheduler)
target_include_directories(test_olg_scheduler_cpp20 SYSTEM PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/lib/cavl)
target_link_libraries(test_olg_scheduler_cpp20
add_executable(test_olga_scheduler_cpp20 ${CMAKE_CURRENT_SOURCE_DIR}/tests/test_olga_scheduler.cpp)
set_target_properties(test_olga_scheduler_cpp20 PROPERTIES CXX_STANDARD 20)
target_include_directories(test_olga_scheduler_cpp20 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include/olga_scheduler)
target_include_directories(test_olga_scheduler_cpp20 SYSTEM PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/lib/cavl)
target_link_libraries(test_olga_scheduler_cpp20
PRIVATE
GTest::gmock_main
)

include(GoogleTest)
gtest_discover_tests(test_olg_scheduler_cpp20)
gtest_discover_tests(test_olga_scheduler_cpp20)
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# olg_scheduler
# olga_scheduler

[![Main Workflow](https://github.com/zubax/olg_scheduler/actions/workflows/main.yml/badge.svg)](https://github.com/zubax/olg_scheduler/actions/workflows/main.yml)
[![Main Workflow](https://github.com/zubax/olga_scheduler/actions/workflows/main.yml/badge.svg)](https://github.com/zubax/olga_scheduler/actions/workflows/main.yml)

Generic single-file implementation of scheduler suitable for deeply embedded systems.
"OLG" happens to be an abbreviation of [Okay Let's Go](https://www.youtube.com/watch?v=Jo6fKboqfMs)
and also a reference to the fact that it has a logarithmic asymptotic complexity.
**Simply copy `olg_scheduler.hpp` into your project tree and you are ready to roll.**
"OLGa" is a reference to the fact that it has a logarithmic asymptotic complexity.
**Simply copy `olga_scheduler.hpp` into your project tree and you are ready to roll.**
The only dependency is the CAVL (`cavl.hpp`) header-only library
(>= [v3.1.0](https://github.com/pavel-kirienko/cavl/tree/3.1.0)).

Expand All @@ -14,3 +13,8 @@ The code is fully covered by manual tests with full state space exploration.

For development-related instructions please refer to the CI configuration files.
To release a new version, simply create a new tag.

<!--suppress CheckImageSize, HtmlDeprecatedAttribute -->
<p align="center">
<img src="/docs/St_Olga_by_Nesterov_in_1892_(cropped).jpg" alt="Olga of Kiev" width=256>
</p>
Binary file added docs/St_Olga_by_Nesterov_in_1892_(cropped).jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/// Source: https://github.com/zubax/olg_scheduler
/// Source: https://github.com/zubax/olga_scheduler
///
/// Copyright (c) 2024 Zubax Robotics <[email protected]>
///
Expand Down Expand Up @@ -26,7 +26,7 @@
#include <utility>
#include <variant>

namespace olg_scheduler
namespace olga_scheduler
{

template <typename TimePoint>
Expand Down Expand Up @@ -362,4 +362,4 @@ class EventLoop final

}; // EventLoop

} // namespace olg_scheduler
} // namespace olga_scheduler
20 changes: 10 additions & 10 deletions tests/test_olg_scheduler.cpp → tests/test_olga_scheduler.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/// Source: https://github.com/zubax/olg_scheduler
/// Source: https://github.com/zubax/olga_scheduler
///
/// Copyright (c) 2024 Zubax Robotics <[email protected]>
///
Expand All @@ -15,7 +15,7 @@
/// OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
/// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

#include "olg_scheduler.hpp"
#include "olga_scheduler.hpp"

#include <gmock/gmock.h>
#include <gtest/gtest.h>
Expand Down Expand Up @@ -75,10 +75,10 @@ class SteadyClockMock final

} // namespace

namespace olg_scheduler::verification
namespace olga_scheduler::verification
{

TEST(TestOlgScheduler, EventLoopBasic)
TEST(TestOlgaScheduler, EventLoopBasic)
{
using std::chrono_literals::operator""ms;

Expand Down Expand Up @@ -227,7 +227,7 @@ TEST(TestOlgScheduler, EventLoopBasic)
EXPECT_FALSE(d);
}

TEST(TestOlgScheduler, EventLoopTotalOrdering)
TEST(TestOlgaScheduler, EventLoopTotalOrdering)
{
using std::chrono_literals::operator""ms;

Expand Down Expand Up @@ -258,7 +258,7 @@ TEST(TestOlgScheduler, EventLoopTotalOrdering)
EXPECT_THAT(c, 5);
}

TEST(TestOlgScheduler, EventLoopPoll)
TEST(TestOlgaScheduler, EventLoopPoll)
{
using time_point = SteadyClockMock::time_point;
using std::chrono_literals::operator""ms;
Expand Down Expand Up @@ -294,7 +294,7 @@ TEST(TestOlgScheduler, EventLoopPoll)
EXPECT_THAT(evl.getTree()[0U]->getDeadline().value().time_since_epoch(), 210ms); // Skipped ahead!
}

TEST(TestOlgScheduler, EventLoopDefer_single_overdue)
TEST(TestOlgaScheduler, EventLoopDefer_single_overdue)
{
using time_point = SteadyClockMock::time_point;
using std::chrono_literals::operator""ms;
Expand All @@ -316,7 +316,7 @@ TEST(TestOlgScheduler, EventLoopDefer_single_overdue)
EXPECT_THAT(out.approx_now.time_since_epoch(), 1030ms);
}

TEST(TestOlgScheduler, EventLoopDefer_long_running_callback)
TEST(TestOlgaScheduler, EventLoopDefer_long_running_callback)
{
using duration = SteadyClockMock::duration;
using std::chrono_literals::operator""ms;
Expand Down Expand Up @@ -345,7 +345,7 @@ TEST(TestOlgScheduler, EventLoopDefer_long_running_callback)
std::make_tuple("b", 20ms, 100ms)));
}

TEST(TestOlgScheduler, HandleMovement)
TEST(TestOlgaScheduler, HandleMovement)
{
using duration = SteadyClockMock::duration;
using std::chrono_literals::operator""ms;
Expand Down Expand Up @@ -417,7 +417,7 @@ TEST(TestOlgScheduler, HandleMovement)
EXPECT_THAT(calls, IsEmpty());
}

} // namespace olg_scheduler::verification
} // namespace olga_scheduler::verification

// NOLINTEND(cppcoreguidelines-avoid-magic-numbers, readability-magic-numbers)
// NOLINTEND(readability-function-cognitive-complexity, misc-const-correctness)
Expand Down

0 comments on commit d4eab58

Please sign in to comment.