Skip to content
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

ign -> gz Namespace Migration : gz-utils #61

Merged
merged 22 commits into from
May 28, 2022
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
See the [Ignition Robotics contributing guide](https://ignitionrobotics.org/docs/all/contributing).
See the [Gazebo Robotics contributing guide](https://ignitionrobotics.org/docs/all/contributing).
66 changes: 33 additions & 33 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,77 +1,77 @@
## Ignition Utils 2.x
## Gazebo Utils 2.x

## Ignition Utils 2.0.0 (20XX-XX-XX)
## Gazebo Utils 2.0.0 (20XX-XX-XX)

## Ignition Utils 1.x
## Gazebo Utils 1.x

## Ignition Utils 1.4.0 (2022-03-29)
## Gazebo Utils 1.4.0 (2022-03-29)

1. Enable cpplint
* [Pull request #41](https://github.com/ignitionrobotics/ign-utils/pull/41)
* [Pull request #41](https://github.com/gazebosim/gz-utils/pull/41)

1. Add doxygen linters
* [Pull request #44](https://github.com/ignitionrobotics/ign-utils/pull/44)
* [Pull request #44](https://github.com/gazebosim/gz-utils/pull/44)

1. Custom Ignition CLI11 formatter
* [Pull request #42](https://github.com/ignitionrobotics/ign-utils/pull/42)
1. Custom Gazebo CLI11 formatter
* [Pull request #42](https://github.com/gazebosim/gz-utils/pull/42)

1. Drop all main functions from gtest files
* [Pull request #45](https://github.com/ignitionrobotics/ign-utils/pull/45)
* [Pull request #45](https://github.com/gazebosim/gz-utils/pull/45)

1. Improvements to enable "-Wconversion"
* [Pull request #46](https://github.com/ignitionrobotics/ign-utils/pull/46)
* [Pull request #46](https://github.com/gazebosim/gz-utils/pull/46)

## Ignition Utils 1.3.0 (2022-02-24)
## Gazebo Utils 1.3.0 (2022-02-24)

1. Fix inline namespace issue with clang6
* [Pull request #39](https://github.com/ignitionrobotics/ign-utils/pull/39)
* [Pull request #39](https://github.com/gazebosim/gz-utils/pull/39)

1. Move ExtraTestMacros from ign-cmake
* [Pull request #37](https://github.com/ignitionrobotics/ign-utils/pull/37)
* [Pull request #37](https://github.com/gazebosim/gz-utils/pull/37)

## Ignition Utils 1.2.0 (2022-01-28)
## Gazebo Utils 1.2.0 (2022-01-28)

1. Enable cpplint on focal
* [Pull request #32](https://github.com/ignitionrobotics/ign-utils/pull/32)
* [Pull request #32](https://github.com/gazebosim/gz-utils/pull/32)

1. Add NeverDestroyed utility class
* [Pull request #31](https://github.com/ignitionrobotics/ign-utils/pull/31)
* [Pull request #31](https://github.com/gazebosim/gz-utils/pull/31)

1. Move environment functionality to utils
* [Pull request #30](https://github.com/ignitionrobotics/ign-utils/pull/30)
* [Pull request #30](https://github.com/gazebosim/gz-utils/pull/30)

1. ImplPtr Get method
* [Pull request #27](https://github.com/ignitionrobotics/ign-utils/pull/27)
* [Pull request #27](https://github.com/gazebosim/gz-utils/pull/27)

## Ignition Utils 1.1.0 (2021-09-02)
## Gazebo Utils 1.1.0 (2021-09-02)

1. More complete bazel implementation
* [Pull request #21](https://github.com/ignitionrobotics/ign-utils/pull/21)
* [Pull request #21](https://github.com/gazebosim/gz-utils/pull/21)

1. Add IGN_UTILS_VENDOR_CLI11 CMake option to optionally use external CLI11
* [Pull request #19](https://github.com/ignitionrobotics/ign-utils/pull/19)
* [Pull request #19](https://github.com/gazebosim/gz-utils/pull/19)

1. Add an example program using CLI11
* [Pull request #23](https://github.com/ignitionrobotics/ign-utils/pull/23)
* [Pull request #23](https://github.com/gazebosim/gz-utils/pull/23)

## Ignition Utils 1.0.0 (2021-03-30)
## Gazebo Utils 1.0.0 (2021-03-30)

1. Add basic support for bazel build system.
* [Pull request #14](https://github.com/ignitionrobotics/ign-utils/pull/14)
* [Pull request #14](https://github.com/gazebosim/gz-utils/pull/14)

1. Ignition ImplPtr
* [Pull request 1](https://github.com/ignitionrobotics/ign-utils/pull/1)
* [Pull request 4](https://github.com/ignitionrobotics/ign-utils/pull/4)
1. Gazebo ImplPtr
* [Pull request 1](https://github.com/gazebosim/gz-utils/pull/1)
* [Pull request 4](https://github.com/gazebosim/gz-utils/pull/4)

1. Vendor CLI11 library inside ignition-utils
* [Pull request 2](https://github.com/ignitionrobotics/ign-utils/pull/2)
* [Pull request 2](https://github.com/gazebosim/gz-utils/pull/2)

1. Update warning suppression macros
* [Pull request 5](https://github.com/ignitionrobotics/ign-utils/pull/5)
* [Pull request 10](https://github.com/ignitionrobotics/ign-utils/pull/10)
* [Pull request 11](https://github.com/ignitionrobotics/ign-utils/pull/11)
* [Pull request 5](https://github.com/gazebosim/gz-utils/pull/5)
* [Pull request 10](https://github.com/gazebosim/gz-utils/pull/10)
* [Pull request 11](https://github.com/gazebosim/gz-utils/pull/11)

1. Pre-release cleanup
* [Pull request #16](https://github.com/ignitionrobotics/ign-utils/pull/16)
* [Pull request #15](https://github.com/ignitionrobotics/ign-utils/pull/15)
* [Pull request #16](https://github.com/gazebosim/gz-utils/pull/16)
* [Pull request #15](https://github.com/gazebosim/gz-utils/pull/15)

12 changes: 10 additions & 2 deletions Migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,20 @@ Deprecated code produces compile-time warnings. These warning serve as
notification to users that their code should be upgraded. The next major
release will remove the deprecated code.

## Ignition Utils 1.2 to 1.3
## Gazebo Utils 1.X to 2.X

* The `ignition` namespace is deprecated and will be removed in future versions.
Use `gz` instead.

* Header files under `ignition/...` are deprecated and will be removed in future versions.
Use `gz/...` instead.

## Gazebo Utils 1.2 to 1.3

Recommended migration:
Utils 1.3.0 introduces the `ExtraTestMacros.hh` headers that are also in ign-cmake.
This is an effort to remove all headers from ign-cmake and locate them in ign-utils.
To update, replace all instances of `ignition/utilities/ExtraTestMacros.hh` with `ignition/utils/ExtraTestMacros.hh`
In the future, `ignition/utilities/ExtraTestMacros.hh` will be removed from ign-cmake.

## Ignition Utils 0.X to 1.X
## Gazebo Utils 0.X to 1.X
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# Ignition Utils : Classes and functions for robot applications
# Gazebo Utils : Classes and functions for robot applications

**Maintainer:** addisu AT openrobotics DOT org

[![GitHub open issues](https://img.shields.io/github/issues-raw/ignitionrobotics/ign-utils.svg)](https://github.com/ignitionrobotics/ign-utils/issues)
[![GitHub open pull requests](https://img.shields.io/github/issues-pr-raw/ignitionrobotics/ign-utils.svg)](https://github.com/ignitionrobotics/ign-utils/pulls)
[![GitHub open issues](https://img.shields.io/github/issues-raw/gazebosim/gz-utils.svg)](https://github.com/gazebosim/gz-utils/issues)
[![GitHub open pull requests](https://img.shields.io/github/issues-pr-raw/gazebosim/gz-utils.svg)](https://github.com/gazebosim/gz-utils/pulls)
[![Discourse topics](https://img.shields.io/discourse/https/community.gazebosim.org/topics.svg)](https://community.gazebosim.org)
[![Hex.pm](https://img.shields.io/hexpm/l/plug.svg)](https://www.apache.org/licenses/LICENSE-2.0)

Build | Status
-- | --
Test coverage | [![codecov](https://codecov.io/gh/ignitionrobotics/ign-utils/branch/main/graph/badge.svg)](https://codecov.io/gh/ignitionrobotics/ign-utils)
Test coverage | [![codecov](https://codecov.io/gh/gazebosim/gz-utils/branch/main/graph/badge.svg)](https://codecov.io/gh/gazebosim/gz-utils)
Ubuntu Focal | [![Build Status](https://build.osrfoundation.org/buildStatus/icon?job=ignition_utils-ci-main-focal-amd64)](https://build.osrfoundation.org/job/ignition_utils-ci-main-focal-amd64)
Homebrew | [![Build Status](https://build.osrfoundation.org/buildStatus/icon?job=ignition_utils-ci-main-homebrew-amd64)](https://build.osrfoundation.org/job/ignition_utils-ci-main-homebrew-amd64)
Windows | [![Build Status](https://build.osrfoundation.org/job/ign_utils-ci-win/badge/icon)](https://build.osrfoundation.org/job/ign_utils-ci-win/)

Ignition Utils, a component of [Ignition
Gazebo Utils, a component of [Ignition
Robotics](https://ignitionrobotics.org), provides general purpose
classes and functions designed for robotic applications.

Expand Down Expand Up @@ -42,7 +42,7 @@ classes and functions designed for robotic applications.

# Features

Ignition Utils provides a wide range of functionality, including:
Gazebo Utils provides a wide range of functionality, including:

* A helper class to implement the PIMPL pattern
* A command line parsing utility (vendored [CLI11](https://github.com/CLIUtils/CLI11/))
Expand All @@ -54,7 +54,7 @@ See the [installation tutorial](https://ignitionrobotics.org/api/utils/0.1/insta

# Usage

Please refer to the [examples directory](https://github.com/ignitionrobotics/ign-utils/blob/main/examples/).
Please refer to the [examples directory](https://github.com/gazebosim/gz-utils/blob/main/examples/).

# Documentation

Expand All @@ -71,7 +71,7 @@ You can also generate the documentation from a clone of this repository by follo
2. Clone the repository

```
git clone https://github.com/ignitionrobotics/ign-utils
git clone https://github.com/gazebosim/gz-utils
```

3. Configure and build the documentation.
Expand Down Expand Up @@ -129,7 +129,7 @@ Please see
# Code of Conduct

Please see
[CODE_OF_CONDUCT.md](https://github.com/ignitionrobotics/ign-utils/blob/main/CODE_OF_CONDUCT.md)
[CODE_OF_CONDUCT.md](https://github.com/gazebosim/gz-utils/blob/main/CODE_OF_CONDUCT.md)

# Versioning

Expand All @@ -145,6 +145,6 @@ release information.
This library is licensed under
[Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0).
See also the
[LICENSE](https://github.com/ignitionrobotics/ign-utils/blob/main/LICENSE)
[LICENSE](https://github.com/gazebosim/gz-utils/blob/main/LICENSE)
file.

2 changes: 1 addition & 1 deletion api.md.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Ignition @IGN_DESIGNATION_CAP@

Ignition @IGN_DESIGNATION_CAP@ is a component in Ignition Robotics, a set of
Ignition @IGN_DESIGNATION_CAP@ is a component in Gazebo Robotics, a set of
libraries designed to rapidly develop robot and simulation applications.
This library defines a general set of utilities with an eye toward simulation
and robotics.
Expand Down
2 changes: 1 addition & 1 deletion cli/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Ignition CLI component
Gazebo CLI component

Vendored from https://github.com/CLIUtils/CLI11/

Expand Down
1 change: 1 addition & 0 deletions cli/include/ignition/utils/cli.hh
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@
*/

#include <gz/utils/cli.hh>
#include <ignition/utils/config.hh>
2 changes: 1 addition & 1 deletion examples/using_cli/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
project(ignition-utils-cli-demo)

# Find the Ignition Libraries used directly by the example
# Find the Gazebo Libraries used directly by the example
find_package(ignition-utils2 REQUIRED COMPONENTS cli)
set(IGN_UTILS_VER ${ignition-utils2_VERSION_MAJOR})

Expand Down
5 changes: 2 additions & 3 deletions include/gz/utils/Environment.hh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#include <string>

namespace ignition
namespace gz
{
namespace utils
{
Expand Down Expand Up @@ -68,7 +68,6 @@ bool GZ_UTILS_VISIBLE unsetenv(const std::string &_name);

}
} // namespace utils
} // namespace ignition
} // namespace gz

#endif // GZ_UTILS_ENVIRONMENT_HH_

6 changes: 3 additions & 3 deletions include/gz/utils/ExtraTestMacros.hh
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,22 @@
/// by googletest. See
/// https://chromium.googlesource.com/external/github.com/google/googletest/+/HEAD/googletest/docs/advanced.md
#define IGN_UTILS_TEST_DISABLED_ON_WIN32(TestName) \
DETAIL_IGN_UTILS_TEST_DISABLED_ON_WIN32(TestName)
DETAIL_GZ_UTILS_TEST_DISABLED_ON_WIN32(TestName)

/// \brief Restrict the execution of the test for the Mac platform.
/// The test will be compiled on Windows too but will never be run as
/// part of the test suite. The macro uses the Disabled_ prefix provided
/// by googletest. See
/// https://chromium.googlesource.com/external/github.com/google/googletest/+/HEAD/googletest/docs/advanced.md
#define IGN_UTILS_TEST_DISABLED_ON_MAC(TestName) \
DETAIL_IGN_UTILS_TEST_DISABLED_ON_MAC(TestName)
DETAIL_GZ_UTILS_TEST_DISABLED_ON_MAC(TestName)

/// \brief Restrict the execution of the test to just the Linux platform
/// Other platforms will get the test compiled but it won't be run
/// as part of the test suite execution.
/// The macro uses the Disabled_ prefix provided by googletest. See
/// https://chromium.googlesource.com/external/github.com/google/googletest/+/HEAD/googletest/docs/advanced.md
#define IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(TestName) \
DETAIL_IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(TestName)
DETAIL_GZ_UTILS_TEST_ENABLED_ONLY_ON_LINUX(TestName)

#endif // GZ_UTILS_EXTRATESTMACROS_HH
8 changes: 4 additions & 4 deletions include/gz/utils/ImplPtr.hh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <gz/utils/SuppressWarning.hh>
#include <gz/utils/Export.hh>

namespace ignition
namespace gz
{
namespace utils
{
Expand Down Expand Up @@ -226,20 +226,20 @@ namespace ignition
template <class T, typename... Args>
UniqueImplPtr<T> MakeUniqueImpl(Args &&..._args);
} // namespace utils
} // namespace ignition
} // namespace gz

/// \brief Add a private ImplPtr to a class as dataPtr.
/// This variant takes a forward-declared ImplementationClass as the impl.
#define IGN_UTILS_IMPL_PTR_FWD(ImplementationClass, memberName) \
IGN_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING \
private: ::ignition::utils::ImplPtr<ImplementationClass> memberName; \
private: ::gz::utils::ImplPtr<ImplementationClass> memberName; \
IGN_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING

/// \brief Add a private UniqueImplPtr to a class as dataPtr.
/// This variant takes a forward-declared ImplementationClass as the impl.
#define IGN_UTILS_UNIQUE_IMPL_PTR_FWD(ImplementationClass, memberName) \
IGN_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING \
private: ::ignition::utils::UniqueImplPtr<ImplementationClass> memberName; \
private: ::gz::utils::UniqueImplPtr<ImplementationClass> memberName; \
IGN_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING

/// \brief Add a private ImplPtr to a class as dataPtr.
Expand Down
16 changes: 7 additions & 9 deletions include/gz/utils/NeverDestroyed.hh
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,14 @@
#include <type_traits>
#include <utility>

namespace ignition
namespace gz
{
namespace utils
{

/// Originally copied from https://github.com/RobotLocomotion/drake/blob/v0.36.0/common/never_destroyed.h
/// Originally licensed BSD 3-Clause (https://github.com/RobotLocomotion/drake/blob/v0.36.0/LICENSE.TXT)
/// Re-licensed Apache-2.0 with permission from:
/// jwnimmer-tri (https://github.com/ignitionrobotics/ign-utils/pull/31#issuecomment-989173512)
/// jwnimmer-tri (https://github.com/gazebosim/ign-utils/pull/31#issuecomment-989173512)
///
/// Wraps an underlying type T such that its storage is a direct member field
/// of this object (i.e., without any indirection into the heap), but *unlike*
Expand Down Expand Up @@ -62,11 +61,11 @@ namespace utils
///
/// static Singleton& getInstance()
/// {
/// static ignition::utils::NeverDestroyed<Singleton> instance;
/// static gz::utils::NeverDestroyed<Singleton> instance;
/// return instance.access();
/// }
/// private:
/// friend ignition::utils::NeverDestroyed<Singleton>;
/// friend gz::utils::NeverDestroyed<Singleton>;
/// Singleton() = default;
/// };
/// @endcode
Expand All @@ -78,7 +77,7 @@ namespace utils
/// Foo ParseFoo(const std::string& foo_string)
/// {
/// using Dict = std::unordered_map<std::string, Foo>;
/// static const ignition::utils::NeverDestroyed<Dict> string_to_enum
/// static const gz::utils::NeverDestroyed<Dict> string_to_enum
/// {
/// std::initializer_list<Dict::value_type>
/// {
Expand All @@ -95,7 +94,7 @@ namespace utils
/// @code
/// const std::vector<double>& GetConstantMagicNumbers()
/// {
/// static const ignition::utils::NeverDestroyed<std::vector<double>> result
/// static const gz::utils::NeverDestroyed<std::vector<double>> result
/// {
/// []()
/// {
Expand Down Expand Up @@ -155,8 +154,7 @@ class NeverDestroyed

private: typename std::aligned_storage<sizeof(T), alignof(T)>::type storage;
};

} // namespace utils
} // namespace ignition
} // namespace gz

#endif // GZ_UTILS_NEVERDESTROYED_HH_
Loading