Skip to content

Commit a8263e3

Browse files
dpilger26GitLab RunnerPilger, David
authored
Release candidate v2.11.0 (#199)
* starting a new release candidate branch * fixed clang tidy target, fixed some warnings * fix some clang-tidy warnigns * minor cleanup * changing seed for functions unit tests * formatting unit test code * still fiddling with unit tests * adding some utils to develop * still fiddling with unit tests * still fiddling with unit tests * still fiddling with unit tests * still messing with unit tests * incrementing version in building docs * removed boost/filesystem from readme example in support of PR #190 * added Poly1D operator() and eval() methods for evaluating arrays of values per PR #192. * made reshape() documentation more clear for Issue #193 * removing unncessary throw exception from ndarray constIterator in support of Issue #191 * fixed some clang build errors from last commit * append() now works with empty input arrays for Issue #194 * intermediate commit of new functionality, still some cleanups and alot of tests to write * added unit tests for wrap and wrap2Pi * adding some unit tests to incorporate * intermediate commit * another intermidiate commit * intermediate commit, still lots of tests to write for the new functionality * fixed some build errors * fixed a build error * added unit tests for cartesian * added tests for new Vec3 constructor, normalize * added unit tests for rows() and columns() * cleanup/organized the tests a bit * added gtests for Logger and BinaryLogger * makeing ctest work * don't build the logger gtests if NO_USE_BOOST is defined * added tests for new celestial constructors * added unit tests for new reference_frames * added tests for euler and orientation * completed bindings for new transforms * added test stubs for transforms * test stubs for all transforms * completed alot of transforms unit tests * missed some files from last commit * cleanup of transforms tests * add pymap3d to python requirements * added AzElToECEF and AzElToLLA transforms * added geocentricToGeodetic and vice versa to transforms * renamed AzEl to AER and added range field, still need to populate * making some functions lower case * started adding range to some transforms * adding more range calculations * renamed some transforms for uniformity * more transforms cleanup * all transforms now have passing unit tests * added vector overloads to various stack functions * regenerated the docs --------- Co-authored-by: = <=> Co-authored-by: GitLab Runner <[email protected]> Co-authored-by: Pilger, David <[email protected]>
1 parent 7c118e0 commit a8263e3

File tree

1,719 files changed

+69805
-20591
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,719 files changed

+69805
-20591
lines changed

Diff for: .github/actions/BuildTestInstall/action.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,16 @@ runs:
3535
shell: ${{inputs.shell}}
3636
run: cmake --build ${{github.workspace}}/build --config Release -j8
3737

38-
- name: Test
38+
- name: pytest
3939
shell: ${{inputs.shell}}
4040
working-directory: ${{github.workspace}}/test/pytest
4141
run: pytest
4242

43+
- name: gtest
44+
shell: ${{inputs.shell}}
45+
working-directory: ${{github.workspace}}/build
46+
run: ctest
47+
4348
- name: Install
4449
shell: ${{inputs.shell}}
4550
working-directory: ${{github.workspace}}

Diff for: CMakeLists.txt

+22-5
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,16 @@ project("NumCpp"
1313
LANGUAGES CXX
1414
)
1515

16+
enable_testing()
17+
1618
message(STATUS "Building ${PROJECT_NAME} version ${VERSION_STRING}")
1719

1820
if(NOT CMAKE_BUILD_TYPE)
19-
set(CMAKE_BUILD_TYPE Release)
21+
set(CMAKE_BUILD_TYPE Release)
2022
endif()
2123

2224
if(NOT CMAKE_CXX_STANDARD)
23-
set(CMAKE_CXX_STANDARD 17)
25+
set(CMAKE_CXX_STANDARD 17)
2426
endif()
2527
message(STATUS "Compiling with C++ standard: ${CMAKE_CXX_STANDARD}")
2628

@@ -66,10 +68,15 @@ else()
6668
find_package(Boost 1.68.0 REQUIRED
6769
COMPONENTS
6870
date_time
71+
log
72+
log_setup
6973
)
74+
set(Boost_USE_STATIC_LIBS ON)
7075
target_link_libraries(${ALL_INTERFACE_TARGET} INTERFACE
7176
Boost::boost
72-
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:GNU>>:Boost::date_time>
77+
Boost::date_time
78+
Boost::log
79+
Boost::log_setup
7380
)
7481
endif()
7582

@@ -134,8 +141,12 @@ add_subdirectory(examples)
134141
add_library(${PROJECT_NAME} INTERFACE)
135142
add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME})
136143

144+
if(NOT PROJECT_IS_TOP_LEVEL)
145+
set(WARNING_GUARD SYSTEM)
146+
endif()
147+
137148
include(GNUInstallDirs)
138-
target_include_directories(${PROJECT_NAME} INTERFACE
149+
target_include_directories(${PROJECT_NAME} ${WARNING_GUARD} INTERFACE
139150
$<BUILD_INTERFACE:${${PROJECT_NAME}_SOURCE_DIR}/include>
140151
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
141152
)
@@ -155,7 +166,7 @@ if (BUILD_DOCS)
155166

156167
configure_file(${DOXYFILE_IN} ${DOXYFILE_OUT} @ONLY)
157168

158-
add_custom_target( docs ALL
169+
add_custom_target( docs
159170
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYFILE_OUT}
160171
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
161172
COMMENT "Generating API documentation with Doxygen"
@@ -173,6 +184,12 @@ install(TARGETS ${PROJECT_NAME}
173184
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
174185
)
175186

187+
add_custom_target(format
188+
COMMAND clang-format -i -style=file:${CMAKE_CURRENT_SOURCE_DIR}/.clang-format `git ls-files *.hpp`
189+
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
190+
191+
add_custom_target(tidy COMMAND run-clang-tidy -p ${CMAKE_BINARY_DIR} -extra-arg=-std=c++${CMAKE_CXX_STANDARD})
192+
176193
include(CMakePackageConfigHelpers)
177194
write_basic_package_version_file("${PROJECT_NAME}ConfigVersion.cmake"
178195
VERSION ${PROJECT_VERSION}

Diff for: develop/NdArray/NdArrayCore.hpp

-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
#include <string>
4747
#include <type_traits>
4848

49-
5049
namespace nc_develop
5150
{
5251
//================================================================================

Diff for: develop/NdArray/TypeTraits.hpp

100755100644
+48-34
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,29 @@
11
#pragma once
22

3-
#include "NumCpp/Core/Internal/TypeTraits.hpp"
4-
53
#include <initializer_list>
64
#include <type_traits>
75

6+
#include "NumCpp/Core/Internal/TypeTraits.hpp"
7+
88
namespace nc_develop
99
{
1010
//============================================================================
1111
// Class Description:
1212
/// Template class for determining if type is std::initializer_list<>
1313
///
1414
template<class T>
15-
struct is_initializer_list : public std::false_type {};
15+
struct is_initializer_list : public std::false_type
16+
{
17+
};
1618

1719
//============================================================================
1820
// Class Description:
1921
/// Template class specialization for determining if type is std::initializer_list<>
2022
///
2123
template<class T>
22-
struct is_initializer_list<std::initializer_list<T>> : public std::true_type {};
24+
struct is_initializer_list<std::initializer_list<T>> : public std::true_type
25+
{
26+
};
2327

2428
//============================================================================
2529
// Class Description:
@@ -33,20 +37,14 @@ namespace nc_develop
3337
/// Template class for determining if dtype is a valid dtype for NdArray
3438
///
3539
template<typename dtype>
36-
struct is_valid_dtype
40+
struct is_valid_dtype
3741
{
38-
static constexpr bool value = std::is_default_constructible<dtype>::value &&
39-
std::is_nothrow_copy_constructible<dtype>::value &&
40-
std::is_nothrow_move_constructible<dtype>::value &&
41-
std::is_nothrow_copy_assignable<dtype>::value &&
42-
std::is_nothrow_move_assignable<dtype>::value &&
43-
std::is_nothrow_destructible<dtype>::value &&
44-
!std::is_void<dtype>::value &&
45-
!std::is_pointer<dtype>::value &&
46-
!is_initializer_list_v<dtype> &&
47-
!std::is_array<dtype>::value &&
48-
!std::is_union<dtype>::value &&
49-
!std::is_function<dtype>::value &&
42+
static constexpr bool value =
43+
std::is_default_constructible<dtype>::value && std::is_nothrow_copy_constructible<dtype>::value &&
44+
std::is_nothrow_move_constructible<dtype>::value && std::is_nothrow_copy_assignable<dtype>::value &&
45+
std::is_nothrow_move_assignable<dtype>::value && std::is_nothrow_destructible<dtype>::value &&
46+
!std::is_void<dtype>::value && !std::is_pointer<dtype>::value && !is_initializer_list_v<dtype> &&
47+
!std::is_array<dtype>::value && !std::is_union<dtype>::value && !std::is_function<dtype>::value &&
5048
!std::is_abstract<dtype>::value;
5149
};
5250

@@ -61,14 +59,14 @@ namespace nc_develop
6159
// Class Description:
6260
/// Template class for determining if all of the types are convertable to a type
6361
///
64-
template <typename ToType, typename... Ts>
62+
template<typename ToType, typename... Ts>
6563
struct all_convertable;
6664

6765
//============================================================================
6866
// Class Description:
6967
/// Template class specialization for determining if all of the types are convertable to std::size_t
7068
///
71-
template <typename ToType, typename Head, typename... Tail>
69+
template<typename ToType, typename Head, typename... Tail>
7270
struct all_convertable<ToType, Head, Tail...>
7371
{
7472
static constexpr bool value = std::is_convertible_v<Head, ToType> && all_convertable<ToType, Tail...>::value;
@@ -78,7 +76,7 @@ namespace nc_develop
7876
// Class Description:
7977
/// Template class specialization for determining if all of the types are convertable to std::size_t
8078
///
81-
template <typename ToType, typename T>
79+
template<typename ToType, typename T>
8280
struct all_convertable<ToType, T>
8381
{
8482
static constexpr bool value = std::is_convertible_v<T, ToType>;
@@ -102,25 +100,41 @@ namespace nc_develop
102100
// Class Description:
103101
/// Checks if container is an STL conforming container
104102
///
105-
template <typename ContainerType>
103+
template<typename ContainerType>
106104
class is_conforming_container
107105
{
108-
struct no {};
109-
struct yes {};
110-
111-
template <typename T,
112-
std::enable_if_t<std::is_convertible_v<typename T::value_type, std::size_t>, int> = 0,
113-
std::enable_if_t<std::is_same_v<typename T::const_iterator, decltype(std::declval<const T>().begin())>, int> = 0,
114-
std::enable_if_t<std::is_same_v<typename T::const_iterator, decltype(std::declval<const T>().end())>, int> = 0>
115-
static yes test(int) { return yes{}; }
116-
117-
template <typename T>
118-
static no test(...) { return no{}; }
106+
struct no
107+
{
108+
};
109+
110+
struct yes
111+
{
112+
};
113+
114+
template<typename T,
115+
std::enable_if_t<std::is_convertible_v<typename T::value_type, std::size_t>, int> = 0,
116+
std::enable_if_t<std::is_same_v<typename T::const_iterator, decltype(std::declval<const T>().begin())>,
117+
int> = 0,
118+
std::enable_if_t<std::is_same_v<typename T::const_iterator, decltype(std::declval<const T>().end())>,
119+
int> = 0>
120+
static yes test(int)
121+
{
122+
return yes{};
123+
}
124+
125+
template<typename T>
126+
static no test(...)
127+
{
128+
return no{};
129+
}
119130

120131
public:
121-
enum { value = std::is_same<yes, decltype(test<ContainerType>(0))>::value };
132+
enum
133+
{
134+
value = std::is_same<yes, decltype(test<ContainerType>(0))>::value
135+
};
122136
};
123137

124138
template<typename ContainerType>
125139
inline constexpr bool is_conforming_container_v = is_conforming_container<ContainerType>::value;
126-
}
140+
} // namespace nc_develop

Diff for: develop/NdArray/Types.hpp

100755100644
+4-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#pragma once
22

3-
#include "NumCpp/Core/Types.hpp"
4-
53
#include <vector>
64

5+
#include "NumCpp/Core/Types.hpp"
6+
77
namespace nc_develop
88
{
9-
using shape_t = std::vector<std::size_t>;
9+
using shape_t = std::vector<std::size_t>;
1010
using strides_t = std::vector<std::size_t>;
11-
}
11+
} // namespace nc_develop

Diff for: develop/NdArray/Utils.hpp

100755100644
+10-15
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,23 @@
11
#pragma once
22

3-
#include "NumCpp/Utils.hpp"
43
#include "TypeTraits.hpp"
54

65
#include <algorithm>
76
#include <iostream>
87
#include <string>
98

9+
#include "NumCpp/Utils.hpp"
10+
1011
namespace nc_develop
1112
{
1213
namespace utils
1314
{
1415
template<typename ContainerType>
1516
void printContainer(const ContainerType& container)
1617
{
17-
std::for_each(container.begin(), container.end(),
18-
[](const auto value) -> void
19-
{
20-
std::cout << value << ' ';
21-
}
22-
);
18+
std::for_each(container.begin(),
19+
container.end(),
20+
[](const auto value) -> void { std::cout << value << ' '; });
2321

2422
std::cout << '\n';
2523
}
@@ -28,14 +26,11 @@ namespace nc_develop
2826
std::string stringifyContainer(const ContainerType& container)
2927
{
3028
std::string returnStr = "[";
31-
std::for_each(container.begin(), container.end(),
32-
[&returnStr](const auto value) -> void
33-
{
34-
returnStr += std::to_string(value) + ", ";
35-
}
36-
);
29+
std::for_each(container.begin(),
30+
container.end(),
31+
[&returnStr](const auto value) -> void { returnStr += std::to_string(value) + ", "; });
3732
returnStr += ']';
3833
return returnStr;
3934
}
40-
}
41-
}
35+
} // namespace utils
36+
} // namespace nc_develop

Diff for: develop/ToDo.md

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# TODO
22

3-
## Version 2.11.0
3+
## Version 2.12.0
44

5-
* run clang-tidy
6-
* run cppcheck
7-
* rebuild documentation
8-
* merge to main / tag / create release
5+
* `ImageProcessing`
6+
* adaptive cfar
7+
* `Filters`
8+
* mean filter
9+
* complementary mean filter

0 commit comments

Comments
 (0)