Skip to content
This repository was archived by the owner on Mar 22, 2023. It is now read-only.

docs: extend docs for Data View group and its classes #1216

Merged

Conversation

lukaszstolarczuk
Copy link
Member

@lukaszstolarczuk lukaszstolarczuk commented Oct 7, 2021

This change is Reviewable

Copy link

@karczex karczex left a comment

Choose a reason for hiding this comment

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

Reviewed 7 of 7 files at r1.
Reviewable status: all files reviewed (commit messages unreviewed), 1 unresolved discussion (waiting on @lukaszstolarczuk)


doc/groups_definitions.dox, line 166 at r1 (raw file):

in this group provide

Classes which provide....

Using "group" word may cause confusion, as it's in "features", and we do not define what is "group" anywhare.

@codecov
Copy link

codecov bot commented Oct 7, 2021

Codecov Report

Merging #1216 (5b4a041) into master (58b7ce7) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1216   +/-   ##
=======================================
  Coverage   93.72%   93.73%           
=======================================
  Files          52       52           
  Lines        4512     4531   +19     
=======================================
+ Hits         4229     4247   +18     
- Misses        283      284    +1     
Flag Coverage Δ
tests_clang_debug_cpp17 93.46% <100.00%> (+0.03%) ⬆️
tests_gcc_debug 90.50% <100.00%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
include/libpmemobj++/container/array.hpp 97.33% <ø> (ø)
include/libpmemobj++/container/basic_string.hpp 98.69% <ø> (ø)
include/libpmemobj++/container/segment_vector.hpp 93.15% <ø> (ø)
include/libpmemobj++/container/vector.hpp 92.43% <ø> (ø)
...nclude/libpmemobj++/experimental/inline_string.hpp 98.82% <ø> (ø)
include/libpmemobj++/string_view.hpp 100.00% <ø> (ø)
include/libpmemobj++/slice.hpp 100.00% <100.00%> (ø)
...libpmemobj++/detail/enumerable_thread_specific.hpp 98.91% <0.00%> (-1.09%) ⬇️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 58b7ce7...5b4a041. Read the comment docs.

Copy link
Contributor

@igchor igchor left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed (commit messages unreviewed), 2 unresolved discussions (waiting on @lukaszstolarczuk)


include/libpmemobj++/slice.hpp, line 51 at r1 (raw file):

 * access to that sequence, with the help of iterators. It's used e.g. in
 * several data structures to deliver `range` methods. As an example please see:
 * pmem::obj::vector::range() .

It might be worth mentioning that slice can be used with any Iterator type which ... fulfills the static_assert in the constructor (you can just copy the condition here or write it in English). ?

@lukaszstolarczuk lukaszstolarczuk force-pushed the extend-data-view-feature-docs branch 2 times, most recently from 137a1cb to 027d6aa Compare October 12, 2021 08:24
Copy link
Member Author

@lukaszstolarczuk lukaszstolarczuk left a comment

Choose a reason for hiding this comment

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

Reviewable status: 5 of 8 files reviewed, 2 unresolved discussions (waiting on @igchor and @karczex)


doc/groups_definitions.dox, line 166 at r1 (raw file):

Previously, karczex (Paweł Karczewski) wrote…
in this group provide

Classes which provide....

Using "group" word may cause confusion, as it's in "features", and we do not define what is "group" anywhare.

Done.


include/libpmemobj++/slice.hpp, line 51 at r1 (raw file):

Previously, igchor (Igor Chorążewicz) wrote…

It might be worth mentioning that slice can be used with any Iterator type which ... fulfills the static_assert in the constructor (you can just copy the condition here or write it in English). ?

Done.

@lukaszstolarczuk lukaszstolarczuk marked this pull request as ready for review October 12, 2021 08:25
Copy link
Contributor

@igchor igchor left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: 5 of 8 files reviewed, 2 unresolved discussions (waiting on @igchor and @karczex)

Copy link

@karczex karczex left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 3 files at r2.
Reviewable status: 6 of 8 files reviewed, 4 unresolved discussions (waiting on @igchor, @karczex, and @lukaszstolarczuk)


include/libpmemobj++/slice.hpp, line 118 at r3 (raw file):

	/**
	 * @return reverse_iterator to the end of the slice's range.

Isn't is reverse iterator to the beginning of the slice range?

In cppreference they are calling it "reverse-beginning". I'm not sure it it's best name :)

Maybe add some ascii-art similar to picture on https://en.cppreference.com/w/cpp/iterator/rbegin
https://asciiflow.com/#/ this diagram editor may be useful
...


include/libpmemobj++/slice.hpp, line 127 at r3 (raw file):

	/**
	 * @return reverse_iterator to the beginning of the slice's range.

... end?


include/libpmemobj++/slice.hpp, line 154 at r3 (raw file):

Access operator

Formally, the name is Subscript Operator
https://docs.microsoft.com/en-us/cpp/cpp/subscript-operator?view=msvc-160

Copy link
Contributor

@KFilipek KFilipek left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 3 files at r2, 1 of 1 files at r3, all commit messages.
Reviewable status: all files reviewed, 5 unresolved discussions (waiting on @lukaszstolarczuk)


include/libpmemobj++/slice.hpp, line 48 at r3 (raw file):

"view"

view in database and C++ terminology is a construct that points to memory or data and don't own data (just aggregates), so typing around "" forces reader to think that it's a metaphor, but it's not.

See: https://en.cppreference.com/w/cpp/ranges


include/libpmemobj++/slice.hpp, line 69 at r3 (raw file):

define

Constructor defines or define?

@lukaszstolarczuk lukaszstolarczuk force-pushed the extend-data-view-feature-docs branch from 027d6aa to 7d9129c Compare October 19, 2021 08:30
Copy link
Member Author

@lukaszstolarczuk lukaszstolarczuk left a comment

Choose a reason for hiding this comment

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

Reviewable status: 6 of 8 files reviewed, 5 unresolved discussions (waiting on @karczex and @KFilipek)


include/libpmemobj++/slice.hpp, line 48 at r3 (raw file):

Previously, KFilipek (Krzysztof Filipek) wrote…
"view"

view in database and C++ terminology is a construct that points to memory or data and don't own data (just aggregates), so typing around "" forces reader to think that it's a metaphor, but it's not.

See: https://en.cppreference.com/w/cpp/ranges

Done.


include/libpmemobj++/slice.hpp, line 69 at r3 (raw file):

Previously, KFilipek (Krzysztof Filipek) wrote…
define

Constructor defines or define?

iterators define a range

"which" describing ctor will be placed like this:
ctor, which defines ..., takes ...


include/libpmemobj++/slice.hpp, line 118 at r3 (raw file):

Previously, karczex (Paweł Karczewski) wrote…

Isn't is reverse iterator to the beginning of the slice range?

In cppreference they are calling it "reverse-beginning". I'm not sure it it's best name :)

Maybe add some ascii-art similar to picture on https://en.cppreference.com/w/cpp/iterator/rbegin
https://asciiflow.com/#/ this diagram editor may be useful
...

Actually, I like the "reverse beginning". I'll merge this naming with the extended description (based on pmem::obj::string_view descriptions)


include/libpmemobj++/slice.hpp, line 127 at r3 (raw file):

Previously, karczex (Paweł Karczewski) wrote…

... end?

Done.


include/libpmemobj++/slice.hpp, line 154 at r3 (raw file):

Previously, karczex (Paweł Karczewski) wrote…
Access operator

Formally, the name is Subscript Operator
https://docs.microsoft.com/en-us/cpp/cpp/subscript-operator?view=msvc-160

och, nice. Done.

Copy link

@karczex karczex left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: 6 of 8 files reviewed, 2 unresolved discussions (waiting on @KFilipek)

@lukaszstolarczuk lukaszstolarczuk force-pushed the extend-data-view-feature-docs branch from 7d9129c to 5b4a041 Compare October 20, 2021 12:55
@lukaszstolarczuk
Copy link
Member Author

rebased to the latest master

Copy link
Contributor

@KFilipek KFilipek left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 1 of 2 files at r4, 4 of 4 files at r5, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @lukaszstolarczuk)

@KFilipek KFilipek merged commit 9f819d6 into pmem:master Oct 20, 2021
@lukaszstolarczuk lukaszstolarczuk deleted the extend-data-view-feature-docs branch October 20, 2021 15:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants