Skip to content

API refactoring #438

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 106 commits into
base: master
Choose a base branch
from
Open

API refactoring #438

wants to merge 106 commits into from

Conversation

allnes
Copy link
Member

@allnes allnes commented Jun 8, 2025

No description provided.

allnes added 30 commits May 18, 2025 00:24
…_programming_course into an/unite-tests

# Conflicts:
#	.github/workflows/codeql.yml
#	.github/workflows/main.yml
#	.github/workflows/static-analysis-pr.yml
#	modules/core/task/src/task.cpp
Refactored test parameter structs and macros to enhance readability and flexibility, including the addition of `FuncTestParam` and `PerfTestParam` types. Updated test case naming conventions with custom functions for better identification. Simplified utility functions and macros for improved code maintainability.
Updated functional tests and scripts to support dynamically filtering tasks by type. Refactored execution logic to reduce redundancy and improve maintainability. Adjusted macros and utility functions for better namespace resolution.
Standardized line formatting in test definitions and Python scripts. Adjustments enhance code readability without altering functionality or behavior.
Simplify `ExecuteTest` by encapsulating parameters into a single struct. This reduces redundancy and improves code readability across test execution functions. Updated affected test cases to align with the new parameter structure.
Replaced direct handling of task pointers with BaseRunFuncTests for cleaner and reusable test logic. Renamed kAddParams to kTestParams for better semantic clarity. Improved test output validation by overriding CheckTestOutputData in derived test classes.
Extracted data preparation logic into a dedicated function for better readability and modularization. Introduced a new input member in the base test class to streamline test input management. Adjusted lambda and tuple type naming for consistency and clarity.
Refactored the `BaseRunFuncTests` class to simplify and improve test execution and data handling. Replaced `GetTestInput` and `GetTaskPtr` with `GetTestInputData` and `CheckTestOutputData` for cleaner abstraction. Updated error handling and validation logic for better test reliability and maintainability.
Replaced hardcoded task tuples with dynamic generation using templates for better scalability and reusability. Added utility functions to simplify tuple expansion for test parameterization, improving code maintainability.
Replaced inline TestParamInfo definitions with the GTestFuncParam alias to improve readability and maintainability. This ensures consistent usage of type aliases across the codebase and reduces redundancy in test parameter handling.
Renamed `DEFINE_GEN_TASK_TUPLES` to `DEFINE_GEN_TASK` and updated associated functions to streamline task generation. Simplified code structure by adjusting macro usage and wrapping test cases in an anonymous namespace for better encapsulation.
Updated task class names across all modules to follow the NesterovATestTask* naming convention. Renamed the `FuncTestParamIndex` enum to `TestParamIndex` for consistency. Adjusted related function definitions and testing suits accordingly.
Simplified the `FuncTestParam` type usage by removing redundant namespace prefixes and updated the test name generation logic for better reuse. Introduced a static interface requirement and concept check to ensure derived classes implement `PrintTestParam`. These changes improve code readability and enforce clearer contracts for test classes.
Copy link

codecov bot commented Jun 8, 2025

Codecov Report

Attention: Patch coverage is 90.17341% with 34 lines in your changes missing coverage. Please review.

Project coverage is 89.80%. Comparing base (6bec4c2) to head (149f0e0).

Files with missing lines Patch % Lines
modules/core/task/include/task.hpp 84.28% 5 Missing and 6 partials ⚠️
modules/core/perf/include/perf.hpp 86.79% 6 Missing and 1 partial ⚠️
tasks/example_processes/mpi/src/ops_mpi.cpp 81.25% 4 Missing and 2 partials ⚠️
modules/core/util/include/util.hpp 72.72% 3 Missing ⚠️
tasks/example_processes/seq/src/ops_seq.cpp 92.30% 0 Missing and 2 partials ⚠️
tasks/example_threads/all/src/ops_all.cpp 95.12% 1 Missing and 1 partial ⚠️
tasks/example_threads/seq/src/ops_seq.cpp 92.30% 0 Missing and 2 partials ⚠️
modules/core/util/src/util.cpp 90.90% 0 Missing and 1 partial ⚠️

❗ There is a different number of reports uploaded between BASE (6bec4c2) and HEAD (149f0e0). Click for more details.

HEAD has 8 uploads less than BASE
Flag BASE (6bec4c2) HEAD (149f0e0)
9 1
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #438      +/-   ##
==========================================
- Coverage   95.78%   89.80%   -5.99%     
==========================================
  Files          16       11       -5     
  Lines         261      353      +92     
  Branches       87      121      +34     
==========================================
+ Hits          250      317      +67     
- Misses          4       19      +15     
- Partials        7       17      +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…le modules and tasks

Standardized header imports, removed unused includes, and introduced a shared JSON pointer initialization method (`InitJSONPtr`) for improved code reusability. Adjusted related logic in task handling for consistency and robustness.
@allnes allnes marked this pull request as draft June 8, 2025 17:22
@allnes allnes marked this pull request as ready for review June 10, 2025 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant