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

Property tree #1389

Merged
merged 1 commit into from
Apr 13, 2024
Merged

Property tree #1389

merged 1 commit into from
Apr 13, 2024

Conversation

yhmtsai
Copy link
Member

@yhmtsai yhmtsai commented Aug 15, 2023

This is the property tree again because I can not reopen the old pull request #1295
Note. we consider the internal structure again because it might be easy as a bridge when we port to another language.

  • pnode -> ptree? or name suggestion
  • parser place. The parser is quite short in the header, so we can keep them in ginkgo public header folder, but don't include them in ginkgo.hpp. Users include them if they need. move to another pr
  • parser can be another pr.

@yhmtsai yhmtsai requested review from a team August 15, 2023 14:42
@yhmtsai yhmtsai self-assigned this Aug 15, 2023
@ginkgo-bot ginkgo-bot added reg:build This is related to the build system. reg:testing This is related to testing. reg:ci-cd This is related to the continuous integration system. mod:core This is related to the core module. reg:helper-scripts This issue/PR is related to the helper scripts mainly concerned with development of Ginkgo. labels Aug 15, 2023
.gitlab/scripts.yml Outdated Show resolved Hide resolved
include/ginkgo/core/config/data.hpp Outdated Show resolved Hide resolved
include/ginkgo/core/config/data.hpp Outdated Show resolved Hide resolved
include/ginkgo/core/config/property_tree.hpp Outdated Show resolved Hide resolved
include/ginkgo/core/config/property_tree.hpp Outdated Show resolved Hide resolved
include/ginkgo/core/config/property_tree.hpp Outdated Show resolved Hide resolved
core/test/config/utils.hpp Outdated Show resolved Hide resolved
@upsj
Copy link
Member

upsj commented Aug 16, 2023

Looks really good already, I just had a few nits to simplify the setup and shrink the headers.

return list_.at(path);
}

const pnode& at(const std::string& path) const
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this (and the other at functions) should allow returning an empty pnode, if it doesn't contain the object. This, together with either bool empty() or a bool conversion operator, can allow easier code:

if(auto child = pt.at("name"){
  parse(child);
}

instead of repeating pt.contains(...) and pt.at(...).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I add bool() and get additionally.
I would like to keep the same behavior between const and non-const at.
Thus, I add additional get const version to do that.

if(auto child = pt.at("name"){
// if pt.at("name") is not empty or name is not existed.
  parse(child);
}

I do not distinguish whether the empty is from user or it is not existed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TBH. I've not commented on that yet, but I would prefer only const access.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps instead of get, adding a default return value to at, in case the string is not found, would be better. get and at do nearly the same thing, so it might be confusing which one to use.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

currently, I return pnode& from at() and const pnode& from at() const. (For less copy in auto& temp = pnode.at())
Return the empty node in at() is weird because it should not be modified and the modification does not change the content of property tree.
If only make it available in at() const, we need to cast it to const first for const at. However, it also introduces different non-found behavior.

@yhmtsai yhmtsai force-pushed the property_tree branch 2 times, most recently from f8b2bd7 to f672957 Compare August 21, 2023 14:25
Copy link
Member

@MarcelKoch MarcelKoch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some first thoughts.

CMakeLists.txt Outdated Show resolved Hide resolved
template <>
inline long long int data::get<long long int>() const
{
assert(tag_ == data::tag_type::int_t);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these should actually throw. I don't think we need to care about performance for our configuration.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ping

// Get the content of node
data_type& get_data()
{
assert(status_ == status_t::data);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, we should throw.

operator bool() const noexcept { return status_ != status_t::empty; }

// Get the content of node
data_type& get_data()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need mutable accessors? I would really prefer it to be const.

return list_.at(path);
}

const pnode& at(const std::string& path) const
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps instead of get, adding a default return value to at, in case the string is not found, would be better. get and at do nearly the same thing, so it might be confusing which one to use.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regarding the placement of the files, I would suggest putting the headers into ginkgo/extension/.... I think that should make these functions easier available for users.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have made them install into the ginkgo/extensions.
I am thinking of making the extension self-contained (create folder structure ginkgo/extensions in /extensions/include)or reusing the ginkgo structure (putting the headers in /include/ginkgo/extensions/ directly.)

@MarcelKoch MarcelKoch mentioned this pull request Aug 25, 2023
@sonarcloud
Copy link

sonarcloud bot commented Aug 30, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 25 Code Smells

92.4% 92.4% Coverage
0.0% 0.0% Duplication

warning The version of Java (11.0.3) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
Read more here

@upsj upsj requested a review from thoasm September 18, 2023 12:35
@yhmtsai
Copy link
Member Author

yhmtsai commented Oct 10, 2023

rebase!

@ginkgo-bot
Copy link
Member

Error: Rebase failed, see the related Action for details

@sonarcloud
Copy link

sonarcloud bot commented Oct 11, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 25 Code Smells

92.4% 92.4% Coverage
0.0% 0.0% Duplication

warning The version of Java (11.0.3) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
Read more here

@yhmtsai yhmtsai added the 1:ST:ready-for-review This PR is ready for review label Oct 12, 2023
@github-actions github-actions bot deleted a comment from ginkgo-bot Nov 27, 2023
Copy link

Error: The following files need to be formatted:

core/config/property_tree.cpp
core/test/config/data.cpp
core/test/config/property_tree.cpp
core/test/config/utils.hpp
extension/property_tree/include/property_tree/json_parser.hpp
extension/property_tree/test/json_parser.cpp
include/ginkgo/core/config/data.hpp
include/ginkgo/core/config/property_tree.hpp

You can find a formatting patch under Artifacts here or run format! if you have write access to Ginkgo

upsj
upsj previously requested changes Nov 27, 2023
Copy link
Member

@upsj upsj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this could use a bit of a clean-up, but functionality-wise it looks good.

  • Headers should not contain implementations
  • data and property_tree can be merged
  • We need a lot of boiler-plate to make extension work for a single file, I think we can do that with an optionally compiled source file instead, like some of our loggers and MPI.

CMakeLists.txt Outdated Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
dev_tools/scripts/format_header.sh Outdated Show resolved Hide resolved
extension/property_tree/CMakeLists.txt Outdated Show resolved Hide resolved
extension/property_tree/test/CMakeLists.txt Outdated Show resolved Hide resolved
include/ginkgo/core/config/data.hpp Outdated Show resolved Hide resolved
@MarcelKoch
Copy link
Member

Since c++17 comes up here, maybe this is a good point to start considering enabling optional components that require c++17. We are right after a release, so users will have plenty of time to adapt if we use c++17 in the next release. This would go hand-in-hand with raising the compiler version requirements, which we also discussed a bit.

I'm strongly in favor of allowing components to use c++. I would suggest making the use of c++17 only optional, i.e. disabling those components if c++17 is not available.

@yhmtsai yhmtsai force-pushed the property_tree branch 2 times, most recently from 514b7fa to acf99d1 Compare November 29, 2023 00:43
@yhmtsai
Copy link
Member Author

yhmtsai commented Dec 5, 2023

@upsj For the extension, the idea is that user can use it without recompile ginkgo itself. when they need it, include it with json header and ready to go. I agree that it requires more cmake setup to make it work, but for me it more fit the purposes (plug it only when need)
For the data structure, does flatten design give benefit? the current design shows the structure(map, array, data) and underlying data additionally.
for implmentation in the header, it is the template function in theory, so it needs to be in header.
I know it can be replaced by one template + the additional specialization/overload. does it still help reducing the number of symbols because there's still a default template in the header? I am not familar with the symbols. Doesn't inline function expand directly in the code without symbol?
@MarcelKoch Although C++17 is powerful, we still need to somehow provide C++14 interface at least. Some applications using it prefer staying C++14 especially when main ginkgo still uses C++14. I do not know whether we can push them to update version. They use resource manager for two years I think.

Copy link
Member

@MarcelKoch MarcelKoch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I try to summarize some of my key points here:

pnode interface:

  • only const access should be provided
  • remove get for array and map, only keep at (possibly with default value)
  • no get_data, get_map, get_array, maybe add a size method if necessary

In general I think we can model our interface a lot like the nlohmann interface.

data type:

  • doesn't need to be part of the public interface
  • compatibility with STL (i.e. config::get, config::holds_alternative) are not necessary

I agree with Tobias, that the json_parser.hpp can be part of our public headers. Also, by not relying on the nlohmann type, we can remove the link time dependency and use the normal pre-processor approach.

return data_;
}

std::vector<pnode>& get_array()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the CLI parser was removed, I think there is no need for mutable access anymore.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might still be necessary later on if we want to allow building configs from existing objects.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That goes quite a bit further than the scope that is discussed here. And even then I don't think it would be strictly necessary.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it would probably be sufficient to provide an vector<pnode> constructor. Just wanted to mention it, because I think it will be useful for people to quickly move to the config model from the factory model.

}

// Return the object if it is found. Otherwise, return empty object.
const pnode& get(const std::string& path) const
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there should only be the at function. Having both at and get at the same time is confusing to me. I would that the at doesn't throw, but instead returns the empty_node if the name is not found. And of course, there should only be the const version of at

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at to me is trying to access the existing data. If there is no data, should throw not return a fake object.
get can return some empty node.
I need to leave the non-const access such that parser can create property tree.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My point is to have only one of them. But I think you are right, maybe it's better to keep only get.
We can use std::vector and/or std::map to create the property tree, no need to keep mutable access.

// bool conversion. It's true if and only if it contains data.
operator bool() const noexcept { return status_ != status_t::empty; }

const data_type& get_data() const
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this needed? We also have the get_data<T> version, which IMO is more useful.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, if we remove this function, then we don't need to expose data publicly. This would allow us to switch to std::variant more easily in the future.

include/ginkgo/core/config/data.hpp Outdated Show resolved Hide resolved
* The base data type for property tree. It only handles std::string,
* double, long long int, bool, monostate(empty).
*/
class data {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

final

namespace extension {


inline void json_parser(gko::config::pnode& ptree, const nlohmann::json& dom)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
inline void json_parser(gko::config::pnode& ptree, const nlohmann::json& dom)
inline void parse_json(gko::config::pnode& ptree, const nlohmann::json& dom)

to make the function name a verb

// bool conversion. It's true if and only if it contains data.
operator bool() const noexcept { return status_ != status_t::empty; }

const data_type& get_data() const
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are the get_data, get_array, get_map accessors necessary?
IMO, we should mainly access the data via the get<T> or get(key|i) methods.
The only additional information, the get_* method have is that the size of the array/map is also available. So maybe a size method would be enough.

CMakeLists.txt Outdated Show resolved Hide resolved
template <typename T>
inline T get(const data& d)
{
static_assert(std::is_same<T, std::string>::value ||
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the get function needs to support more types.
Otherwise we would have to do things like

auto i = static_cast<int32>(config::get<long long int>(data));

instead of just config::get<int32>(...).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is to provide the same rule as std::variant.
I did the get with different type in the config helper.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I mentioned before, I don't think we should aim for std::variant compatability here. This type should not be exposed to the user, so we can easily replace it later on.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An alternative would be having get_string, get_int, get_double functions next to get_array, that would also get rid of the need to use templates. I don't think we need these in a generic context anyways, a solver would always query specific properties by type and name.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that is a good option. But I wouldn't use int or double in the name, since at least int is just wrong. So perhaps we could have get_integer and get_real instead. Then it would be a bit clearer that additional static_cast are necessary.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me, the template already did the same thing. You get what you require if it is legal. Query specific properties without the template may make the following pr a bit messy. I can try these first to see what changes necessary in the following pr.

template <>
inline long long int data::get<long long int>() const
{
assert(tag_ == data::tag_type::int_t);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ping

CMakeLists.txt Outdated
@@ -255,6 +256,9 @@ if(GINKGO_BUILD_BENCHMARKS)
find_package(gflags 2.2.2 QUIET)
find_package(nlohmann_json 3.9.1 QUIET)
endif()
if(GINKGO_BUILD_CONFIG_PARSER)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The option is not documented in our cmake log.

Copy link
Member

@upsj upsj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are still a handful of comments unaddressed, and the implementation exposes a few things to the user that can stay hidden.

third_party/nlohmann_json/CMakeLists.txt Outdated Show resolved Hide resolved
include/ginkgo/core/config/data.hpp Outdated Show resolved Hide resolved
template <typename T>
inline T get(const data& d)
{
static_assert(std::is_same<T, std::string>::value ||
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An alternative would be having get_string, get_int, get_double functions next to get_array, that would also get rid of the need to use templates. I don't think we need these in a generic context anyways, a solver would always query specific properties by type and name.

return data_;
}

std::vector<pnode>& get_array()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might still be necessary later on if we want to allow building configs from existing objects.

CMakeLists.txt Outdated Show resolved Hide resolved
dev_tools/scripts/format_header.sh Outdated Show resolved Hide resolved
extension/property_tree/CMakeLists.txt Outdated Show resolved Hide resolved
extension/property_tree/test/CMakeLists.txt Outdated Show resolved Hide resolved
@yhmtsai yhmtsai force-pushed the property_tree branch 3 times, most recently from f26fa2e to b3c12d7 Compare March 27, 2024 23:03
@yhmtsai
Copy link
Member Author

yhmtsai commented Mar 28, 2024

Because we go for get_integer, get_real, ..., I will just copy paste these functions from data to property_tree which is not good for me (no reduced code in property tree by having data). Thus, I change my mind to the flatten design. I also only allow const access now. note. only get(key) will return empty node when key is not there. get(i) will still give out of bound. I also move the parser to another branch.

@yhmtsai yhmtsai requested review from upsj and MarcelKoch March 28, 2024 14:08
Copy link
Member

@MarcelKoch MarcelKoch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, all my previous comments were addressed. I left only some smaller nits.

TBH, I really like the clean header file. For me this seems like the right direction to go.

include/ginkgo/core/config/property_tree.hpp Outdated Show resolved Hide resolved
include/ginkgo/core/config/property_tree.hpp Outdated Show resolved Hide resolved
include/ginkgo/core/config/property_tree.hpp Outdated Show resolved Hide resolved
include/ginkgo/core/config/property_tree.hpp Outdated Show resolved Hide resolved
include/ginkgo/core/config/property_tree.hpp Outdated Show resolved Hide resolved
* @param path the key of the map
*
* @return node const reference. If the map does not have the path, return
* an empty node.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know I brougt the empty node as default return value up, but I could also imagine to have to versions, one with a single argument which throws for invalid access, and a two argument version with a default value.

For me it's fine as it is, just in case others want to change this,

Copy link
Member Author

@yhmtsai yhmtsai Mar 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it can be one with bool, like this?

auto get(key, bool throw_error = false) {
  // not-found
  if (throw_error) {throw;}
  else {return empty;}
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure how much value this would add. A two parameter version would allow us to use default values for our factories quite easily.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

like this?

factory.with_reduction_factor(get_value<type>(config.get("reduction_factor", factory.reduction_factor)));

I am not sure. it may be useful in integer or real value, but other complex or pointer will be a bit long code

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but I guess it's not important.

Copy link
Member

@upsj upsj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only have minor comments related to explicit-ness of functions and documentation, but it looks really good in general. I'll approve once these suggestions were addressed or discussed.

include/ginkgo/core/config/property_tree.hpp Outdated Show resolved Hide resolved
*
* @param boolean the bool type value
*/
pnode(bool boolean);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would probably be safer to make all of these single-argument constructors explicit

Suggested change
pnode(bool boolean);
explicit pnode(bool boolean);

/**
* bool conversion. It's true if and only if it is not empty.
*/
operator bool() const noexcept;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see #650 for an in-depth discussion of explicit vs. implicit conversion to bool

Suggested change
operator bool() const noexcept;
explicit operator bool() const noexcept;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still needs to be adressed

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, sorry. I miss this one. will do it

status_t get_status() const;

/**
* Get the array. It will throw error if the current node does not hold an
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would reword this slightly, same for the other access functions

Suggested change
* Get the array. It will throw error if the current node does not hold an
* Access the array stored in this property node, throws `gko::ExceptionName` if the property node does not store an array.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternative wording could be retrieve, I just feel like get the array doesn't properly that the object is a sum type and doesn't always contain an array.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think get maybe okay which is similar to variant get

include/ginkgo/core/config/property_tree.hpp Outdated Show resolved Hide resolved
*
* @return the string
*/
std::string get_string() const;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for consistency

Suggested change
std::string get_string() const;
const std::string& get_string() const;

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is cheap here, so I put this like the other bool, double, int.
Or, do you think they all should be returned const reference?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's both const-correctness semantics and performance - the latter shouldn't matter though. For semantics, consider https://godbolt.org/z/71aKxGG39

#include <string>

std::string foo();

const std::string& bar();

void baz() {
    foo().clear();
    bar().clear();
}

because the second interface returns a const reference, it doesn't allow modifications, so it prevents users doing non-sensical things. Just a very minor thing though, so I don't want to hold this up.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one has not been addressed yet

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I prefer just return it as value as the other integer/bool now. If that user changes the value from the return does not change the property tree itself, it is what user wants to do in my mind.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is what user wants to do in my mind

This operation does not make any sense though, since it creates a temporary copy, clears it and then does not give the user any way to access it. I can see users making the assumption that you can modify the object that way and being surprised - a compiler error is a clear message that it's not possible.
The same is also not possible with the return values from the primitive value access functions (e.g. get_integer()++ fails to compile).

Copy link
Member Author

@yhmtsai yhmtsai Apr 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense.
I originally thought the case auto a = get_string();. I thought it will be const std::string&, which is inconsistent with the others.
However, type of a is actually std::string unless using auto& a = get_string().
will change it

include/ginkgo/core/config/property_tree.hpp Outdated Show resolved Hide resolved
include/ginkgo/core/config/property_tree.hpp Outdated Show resolved Hide resolved
include/ginkgo/core/config/property_tree.hpp Outdated Show resolved Hide resolved
@upsj upsj dismissed their stale review April 1, 2024 13:13

addressed

@MarcelKoch MarcelKoch added this to the Ginkgo 1.8.0 milestone Apr 5, 2024
@yhmtsai yhmtsai requested a review from upsj April 11, 2024 12:14
Copy link
Member

@upsj upsj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM except for the return type/explicit bool discussions, but I'll approve already

@yhmtsai yhmtsai force-pushed the property_tree branch 2 times, most recently from d545850 to 107937e Compare April 12, 2024 12:01
@yhmtsai yhmtsai added 1:ST:ready-to-merge This PR is ready to merge. and removed 1:ST:ready-for-review This PR is ready for review labels Apr 12, 2024
Co-authored-by: Marcel Koch <[email protected]>
Co-authored-by: Tobias Ribizel <[email protected]>
@yhmtsai yhmtsai merged commit 577caef into develop Apr 13, 2024
11 of 15 checks passed
@yhmtsai yhmtsai deleted the property_tree branch April 13, 2024 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1:ST:ready-to-merge This PR is ready to merge. mod:core This is related to the core module. reg:build This is related to the build system. reg:ci-cd This is related to the continuous integration system. reg:helper-scripts This issue/PR is related to the helper scripts mainly concerned with development of Ginkgo. reg:testing This is related to testing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants