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

Improve sov_schema_db documentation #463

Merged
merged 1 commit into from
Jul 5, 2023
Merged

Conversation

neysofu
Copy link
Member

@neysofu neysofu commented Jul 5, 2023

Description

I added doc comments and two doc tests for sov_schema_db, while focusing on documenting the correct usage for seeking, which can be quite bug-prone as we've seen recently.

Linked Issues

Testing

#![deny(missing_docs)] and doc tests.

@citizen-stig
Copy link
Member

@neysofu , do you know why doctests are ignored in our test CI step:

https://github.com/Sovereign-Labs/sovereign-sdk/actions/runs/5465623913/jobs/9949332002#step:6:685

   Doc-tests sov-db

running 2 tests
test src/schema/tables.rs - schema::tables::define_table_with_default_codec (line 124) ... ignored
test src/schema/tables.rs - schema::tables::define_table_without_codec (line 54) ... ignored

@codecov
Copy link

codecov bot commented Jul 5, 2023

Codecov Report

Merging #463 (55a6611) into main (71dd233) will decrease coverage by 0.1%.
The diff coverage is 95.2%.

Impacted Files Coverage Δ
full-node/db/sov-db/src/ledger_db/mod.rs 91.2% <ø> (ø)
full-node/db/sov-schema-db/src/iterator.rs 100.0% <ø> (ø)
full-node/db/sov-schema-db/src/schema.rs 0.0% <ø> (ø)
full-node/db/sov-db/src/schema/tables.rs 85.0% <90.0%> (ø)
full-node/db/sov-schema-db/src/lib.rs 90.7% <96.7%> (+0.2%) ⬆️
full-node/db/sov-db/src/lib.rs 100.0% <100.0%> (ø)

... and 1 file with indirect coverage changes

@neysofu
Copy link
Member Author

neysofu commented Jul 5, 2023

@citizen-stig those two doc tests were previously marked as ignore, they're not the ones I added in this PR. I'll fix those too though, good catch

@neysofu
Copy link
Member Author

neysofu commented Jul 5, 2023

Nevermind, those doc tests rely on private components so ignore was a good call. Merging.

@neysofu neysofu merged commit 6ab7625 into main Jul 5, 2023
@neysofu neysofu deleted the filippo/seekable-schema branch July 5, 2023 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants