iroha icon indicating copy to clipboard operation
iroha copied to clipboard

[documentation] #2544: Tutorial doctests

Open appetrosyan opened this issue 3 years ago • 3 comments

Signed-off-by: 6r1d [email protected]

Description of the Change

Adds example that mirrors tutorial examples, so that changes in the API can be propagated by directly taking them from GitHub.

Issue

Addresses #2544

Benefits

Direct connection to tutorial

Possible Drawbacks

More code to test

Usage Examples or Tests [optional]

cargo run --example tutorial

Alternate Designs [optional]

As test

appetrosyan avatar Aug 09 '22 20:08 appetrosyan

Codecov Report

Merging #2603 (5b0264d) into iroha2-dev (a16d9c3) will decrease coverage by 2.06%. The diff coverage is 65.23%.

:exclamation: Current head 5b0264d differs from pull request most recent head 4275583. Consider uploading reports for the commit 4275583 to get more accurate results

@@              Coverage Diff               @@
##           iroha2-dev    #2603      +/-   ##
==============================================
- Coverage       67.61%   65.55%   -2.07%     
==============================================
  Files             140      156      +16     
  Lines           26173    28212    +2039     
==============================================
+ Hits            17696    18493     +797     
- Misses           8477     9719    +1242     
Impacted Files Coverage Δ
cli/derive/src/lib.rs 74.72% <ø> (ø)
cli/src/torii/mod.rs 28.88% <ø> (ø)
cli/src/torii/routing.rs 69.92% <0.00%> (-2.87%) :arrow_down:
client/src/http.rs 47.82% <ø> (ø)
client_cli/src/main.rs 0.26% <ø> (ø)
config/base/src/runtime_upgrades.rs 35.63% <ø> (ø)
core/src/block.rs 70.00% <ø> (ø)
core/src/queue.rs 95.67% <ø> (-0.08%) :arrow_down:
core/src/smartcontracts/isi/asset.rs 54.82% <ø> (ø)
core/src/sumeragi/message.rs 8.20% <0.00%> (ø)
... and 161 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

codecov[bot] avatar Aug 09 '22 20:08 codecov[bot]

TO-DOs:

  • [x] Add a deprecation warning (#[deprecated]) into http.rs's new, since it is being superseded by try_new.
  • [x] #[must_use] is redundant for try_new.
  • [ ] There's some code that should be added to the examples

6r1d avatar Aug 11 '22 10:08 6r1d

Documentation check currently stops, because it sees the ^ character, caused by the example warning:

if cargo doc -q 2>&1 | grep '^'; then exit 1; fi

My first attempt at fixing the code failed, but I'll try more.

6r1d avatar Aug 11 '22 15:08 6r1d

I have to extend expect with actual error messages.

6r1d avatar Aug 17 '22 17:08 6r1d