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

READMEs docs #99

Merged
merged 7 commits into from
Sep 4, 2024
Merged

READMEs docs #99

merged 7 commits into from
Sep 4, 2024

Conversation

lealobanov
Copy link
Collaborator

@lealobanov lealobanov commented Sep 3, 2024

Description

Update main repo READMEs and add general documentation of SDK functionality.


For contributor use:

  • Targeted PR against master branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the standards mentioned here.
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

Summary by CodeRabbit

  • Documentation
    • Enhanced and reorganized documentation across multiple README files for improved clarity and usability.
    • Added detailed sections on installation, key generation, account creation, and transaction signing for the Flow JVM SDK.
    • Introduced "Table of Contents" in Java and Kotlin examples for easier navigation.
    • Updated links and corrected typographical errors to enhance accessibility and accuracy.

Copy link
Contributor

coderabbitai bot commented Sep 3, 2024

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

The changes encompass textual updates and structural reorganizations across several README files and a Kotlin source file. Enhancements include corrected typographical errors, expanded sections for clarity, and improved navigation features. Notably, the documentation now provides detailed guidance on SDK functionalities, while code examples and integration instructions have been elaborated. The updates aim to enhance usability and accessibility for developers using the Flow JVM SDK.

Changes

Files Change Summary
README.md, java-example/README.md, kotlin-example/README.md, sdk/README.md Textual updates, structural reorganization, expanded sections, corrected errors, and improved navigation.
kotlin-example/src/main/kotlin/org/onflow/examples/kotlin/getEvent/GetEventAccessAPIConnector.kt Modified getTransactionResult function for improved readability by integrating API call within the when expression.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant FlowSDK
    participant FlowEmulator
    participant API

    User->>FlowSDK: Request transaction result
    FlowSDK->>API: Get transaction result by ID
    API-->>FlowSDK: Return transaction result
    FlowSDK-->>User: Provide transaction result
Loading

🐰 In the meadow, changes bloom,
With clearer paths, dispelling gloom.
Code examples dance, a joyful sight,
Guiding developers, shining bright!
Hops of progress, leaps of cheer,
Flow SDK's magic, now more clear! 🌼


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@lealobanov lealobanov changed the title Readmes docs READMEs docs Sep 3, 2024
@lealobanov lealobanov changed the base branch from main to examples-readmes September 3, 2024 16:46
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Caution

Inline review comments failed to post

Actionable comments posted: 2

Outside diff range, codebase verification and nitpick comments (2)
java-example/README.md (1)

35-112: LGTM!

The new "Examples summary" section is a valuable addition that enhances the usability and accessibility of the documentation. The categorization and links to the code files make it easier for users to understand and implement specific functionalities.

Consider addressing the following minor issues to further improve the documentation:

  1. The heading level for "Get Blocks" (line 39) should be changed from h4 to h3 to maintain consistent heading increments throughout the document.

  2. The phrases "Get transaction" (line 75), "Send transaction" (line 82), and "Multiple parties" (line 110) are duplicated. Consider rewording these lines to avoid repetition.

  3. The sentences starting with "Get" (lines 43, 51, 59) and "Execute" (line 89) are repeated three times in succession. Consider rewording these sentences or using synonyms to improve readability.

Tools
LanguageTool

[style] ~43-~43: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ock/GetBlockAccessAPIConnector.java) - Get the latest sealed block - Get block by ...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~51-~51: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...t/GetAccountAccessAPIConnector.java) - Get account balance - Get account from the ...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~59-~59: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ent/GetEventAccessAPIConnector.java) - Get events for height range - Get events fo...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~67-~67: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ollectionAccessAPIConnector.java) #### Get Network Parameters [Get the current ne...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[grammar] ~75-~75: This phrase is duplicated. You should probably use “Get transaction” only once.
Context: ...tTransactionAccessAPIConnector.java) - Get transaction - Get transaction result #### Sending Transactions [Sen...

(PHRASE_REPETITION)


[grammar] ~82-~82: This phrase is duplicated. You should probably use “Send transaction” only once.
Context: ...saction/SendTransactionExample.java) - Send transaction - Send transaction with arguments #### Execute Script [E...

(PHRASE_REPETITION)


[style] ~89-~89: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...xecuteScriptAccessAPIConnector.java) - Execute a simple Cadence script - Execute a mor...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[grammar] ~110-~110: This phrase is duplicated. You should probably use “Multiple parties” only once.
Context: ...e - Single party, multiple signatures - Multiple parties - Multiple parties, 2 authorizers - Multiple parties, mult...

(PHRASE_REPETITION)

Markdownlint

39-39: Expected: h3; Actual: h4
Heading levels should only increment by one level at a time

(MD001, heading-increment)

README.md (1)

31-33: Suggestion: Use the conventional spelling "submodules".

The static analysis tool LanguageTool correctly points out that "sub-modules" is normally spelled as one word.

Consider applying this change:

-The common utils module contains resources shared across all 3 above sub-modules, such as Cadence scripts and testing infrastructure.
+The common utils module contains resources shared across all 3 above submodules, such as Cadence scripts and testing infrastructure.
Tools
LanguageTool

[misspelling] ~32-~32: This word is normally spelled as one.
Context: ...ins resources shared across all 3 above sub-modules, such as Cadence scripts and testing in...

(EN_COMPOUNDS_SUB_MODULES)

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 52724b0 and 9cdc60a.

Files selected for processing (5)
  • README.md (2 hunks)
  • java-example/README.md (1 hunks)
  • kotlin-example/README.md (1 hunks)
  • kotlin-example/src/main/kotlin/org/onflow/examples/kotlin/getEvent/GetEventAccessAPIConnector.kt (1 hunks)
  • sdk/README.md (2 hunks)
Files skipped from review due to trivial changes (1)
  • kotlin-example/src/main/kotlin/org/onflow/examples/kotlin/getEvent/GetEventAccessAPIConnector.kt
Additional context used
LanguageTool
java-example/README.md

[duplication] ~8-~8: Possible typo: you repeated a word
Context: ...allation](#installation) - Running the examples - Examples summary - [Get bl...

(ENGLISH_WORD_REPEAT_RULE)


[style] ~43-~43: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ock/GetBlockAccessAPIConnector.java) - Get the latest sealed block - Get block by ...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~51-~51: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...t/GetAccountAccessAPIConnector.java) - Get account balance - Get account from the ...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~59-~59: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ent/GetEventAccessAPIConnector.java) - Get events for height range - Get events fo...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~67-~67: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ollectionAccessAPIConnector.java) #### Get Network Parameters [Get the current ne...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[grammar] ~75-~75: This phrase is duplicated. You should probably use “Get transaction” only once.
Context: ...tTransactionAccessAPIConnector.java) - Get transaction - Get transaction result #### Sending Transactions [Sen...

(PHRASE_REPETITION)


[grammar] ~82-~82: This phrase is duplicated. You should probably use “Send transaction” only once.
Context: ...saction/SendTransactionExample.java) - Send transaction - Send transaction with arguments #### Execute Script [E...

(PHRASE_REPETITION)


[style] ~89-~89: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...xecuteScriptAccessAPIConnector.java) - Execute a simple Cadence script - Execute a mor...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[grammar] ~110-~110: This phrase is duplicated. You should probably use “Multiple parties” only once.
Context: ...e - Single party, multiple signatures - Multiple parties - Multiple parties, 2 authorizers - Multiple parties, mult...

(PHRASE_REPETITION)

sdk/README.md

[style] ~155-~155: Style-wise, it’s not ideal to insert an adverb (‘automatically’) in the middle of an infinitive construction (‘to create’). Try moving the adverb to avoid split infinitives.
Context: ...ount credentials - @FlowTestAccount - used to automatically create an account in the emulator and inject a `TestAccou...

(SPLIT_INFINITIVE)

kotlin-example/README.md

[duplication] ~8-~8: Possible typo: you repeated a word
Context: ...allation](#installation) - Running the examples - Examples summary - [Get ...

(ENGLISH_WORD_REPEAT_RULE)


[style] ~43-~43: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...Block/GetBlockAccessAPIConnector.kt) - Get the latest sealed block - Get block by ...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~51-~51: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...unt/GetAccountAccessAPIConnector.kt) - Get account balance - Get account from the ...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~59-~59: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...Event/GetEventAccessAPIConnector.kt) - Get events for height range - Get events fo...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~67-~67: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tCollectionAccessAPIConnector.kt) #### Get Network Parameters [Get the current ne...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[grammar] ~75-~75: This phrase is duplicated. You should probably use “Get transaction” only once.
Context: ...GetTransactionAccessAPIConnector.kt) - Get transaction - Get transaction result #### Sending Transactions [Sen...

(PHRASE_REPETITION)


[grammar] ~82-~82: This phrase is duplicated. You should probably use “Send transaction” only once.
Context: ...ansaction/SendTransactionExample.kt) - Send transaction - Send transaction with arguments #### Execute Script [E...

(PHRASE_REPETITION)


[style] ~89-~89: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: .../ExecuteScriptAccessAPIConnector.kt) - Execute a simple Cadence script - Execute a mor...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[grammar] ~110-~110: This phrase is duplicated. You should probably use “Multiple parties” only once.
Context: ...e - Single party, multiple signatures - Multiple parties - Multiple parties, 2 authorizers - Multiple parties, mult...

(PHRASE_REPETITION)

README.md

[misspelling] ~32-~32: This word is normally spelled as one.
Context: ...ins resources shared across all 3 above sub-modules, such as Cadence scripts and testing in...

(EN_COMPOUNDS_SUB_MODULES)


[grammar] ~137-~137: This phrase is duplicated. You should probably use “Multiple parties” only once.
Context: ...e - Single party, multiple signatures - Multiple parties - Multiple parties, 2 authorizers - Multiple parties, mult...

(PHRASE_REPETITION)


[uncategorized] ~170-~170: Use a comma before ‘but’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...TED- The transaction has been executed but the result has not yet been sealed.SE...

(COMMA_COMPOUND_SENTENCE_2)


[uncategorized] ~171-~171: Use a comma before “and” if it connects two independent clauses (unless they are closely connected and short).
Context: ...LED` - The transaction has been executed and the result is sealed in a block. ```ko...

(COMMA_COMPOUND_SENTENCE_2)


[uncategorized] ~234-~234: Loose punctuation mark.
Context: ...ontains the following fields: address: FlowAddress - The account address. `b...

(UNLIKELY_OPENING_PUNCTUATION)

Markdownlint
java-example/README.md

39-39: Expected: h3; Actual: h4
Heading levels should only increment by one level at a time

(MD001, heading-increment)

kotlin-example/README.md

39-39: Expected: h3; Actual: h4
Heading levels should only increment by one level at a time

(MD001, heading-increment)


7-7: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


10-10: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


11-11: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


12-12: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


13-13: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


14-14: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


15-15: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


16-16: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


17-17: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


18-18: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


19-19: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


20-20: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


21-21: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


22-22: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

Additional comments not posted (17)
java-example/README.md (4)

1-3: LGTM!

The changes to the title and introduction improve clarity and accuracy.


5-21: LGTM!

The new "Table of Contents" section enhances the organization and navigation of the document. The links to the subsections are correctly formatted.

Tools
LanguageTool

[duplication] ~8-~8: Possible typo: you repeated a word
Context: ...allation](#installation) - Running the examples - Examples summary - [Get bl...

(ENGLISH_WORD_REPEAT_RULE)


23-29: LGTM!

The "Running the emulator with the Flow CLI" section provides more detailed and relevant information compared to the previous "Usage" section. The installation instructions for the Cadence 1.0 CLI are a helpful addition.


31-33: LGTM!

The expanded section on running examples, including information about test files, IntelliJ IDEA recommendations, and command-line instructions, enhances the clarity and usability of the documentation.

sdk/README.md (3)

71-71: LGTM!

The change to the section header is approved as it better reflects the content that follows.


73-74: LGTM!

The change to the phrase is approved as it reinforces the focus on practical coding demonstrations.


78-80: LGTM!

The changes are approved as they enhance clarity and provide useful information for users.

kotlin-example/README.md (4)

1-1: LGTM!

The title change from "Kotlin Example" to "Kotlin Examples" is appropriate as it indicates a broader scope of multiple examples.


3-3: LGTM!

The rewritten introduction provides a clear and concise overview of the package and its purpose.


27-29: LGTM!

The expanded installation instructions provide useful information about the Cadence 1.0 CLI, which is necessary for running the examples.


31-34: LGTM!

The expanded section on running the examples provides useful information for developers new to the SDK by explaining how to execute tests using Gradle and suggesting the use of IntelliJ IDEA for development.

README.md (6)

8-8: LGTM!

The change to use a relative path for the BREAKING_CHANGES.md link is approved.


17-23: LGTM!

The change from "Repository modules" to "Repository structure" enhances the clarity and accuracy of the documentation. This modification is also highlighted in the AI-generated summary.


38-241: Excellent work on expanding the documentation! The new sections with code examples are a significant improvement.

The newly added sections provide detailed guidance on various SDK functionalities, including installation instructions, key generation, account creation, transaction signing, and querying capabilities. The included Kotlin code snippets offer practical examples that greatly enhance the documentation's usability and facilitate developers' understanding and implementation.

These additions are also prominently highlighted in the AI-generated summary as a key enhancement in this PR.

The static analysis tool LanguageTool flagged a few potential issues in these segments, but upon closer examination, they appear to be false positives in this context and can be safely ignored.

Overall, these changes represent a substantial improvement in the documentation quality and developer experience.

Tools
LanguageTool

[grammar] ~137-~137: This phrase is duplicated. You should probably use “Multiple parties” only once.
Context: ...e - Single party, multiple signatures - Multiple parties - Multiple parties, 2 authorizers - Multiple parties, mult...

(PHRASE_REPETITION)


[uncategorized] ~170-~170: Use a comma before ‘but’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...TED- The transaction has been executed but the result has not yet been sealed.SE...

(COMMA_COMPOUND_SENTENCE_2)


[uncategorized] ~171-~171: Use a comma before “and” if it connects two independent clauses (unless they are closely connected and short).
Context: ...LED` - The transaction has been executed and the result is sealed in a block. ```ko...

(COMMA_COMPOUND_SENTENCE_2)


[uncategorized] ~234-~234: Loose punctuation mark.
Context: ...ontains the following fields: address: FlowAddress - The account address. `b...

(UNLIKELY_OPENING_PUNCTUATION)


234-234: Disregard the static analysis hint. The use of the colon is appropriate here.

The static analysis tool LanguageTool incorrectly flags the colon after "address" as an unlikely opening punctuation. However, in this context, the colon is used appropriately to introduce the type and description of the "address" field.

This suggestion can be safely ignored as a false positive.

Tools
LanguageTool

[uncategorized] ~234-~234: Loose punctuation mark.
Context: ...ontains the following fields: address: FlowAddress - The account address. `b...

(UNLIKELY_OPENING_PUNCTUATION)


239-241: LGTM!

The addition of the Examples Summary section is a helpful improvement. It enhances the discoverability of the available examples and provides a convenient reference for users to explore the various use cases demonstrated in the repository.

Linking to the kotlin-example module's README is an effective way to direct users to the comprehensive list of supported examples.


242-242: LGTM!

Adding a newline at the end of the file is a best practice and adheres to the POSIX standard. This change is approved.

Comments failed to post (2)
kotlin-example/README.md (2)

5-22: Great addition of the "Table of Contents" section!

The "Table of Contents" section is a great addition that improves the documentation's structure and navigation by organizing the content into easily navigable sections and providing a brief description and link for each example.

However, there are some indentation issues in the list that should be fixed.

Please apply the following changes to fix the indentation issues:

 ## Table of Contents
-- [Running the emulator with the Flow CLI](#running-the-emulator-with-the-flow-cli)
-    - [Installation](#installation)
+  - [Running the emulator with the Flow CLI](#running-the-emulator-with-the-flow-cli)
+      - [Installation](#installation)
-- [Running the examples](#running-the-examples)
-- [Examples summary](#examples-summary)
-    - [Get blocks](#get-blocks)
-    - [Get accounts](#get-accounts)
-    - [Get events](#get-events)
-    - [Get collection](#get-collection)
-    - [Get network parameters](#get-network-parameters)
-    - [Get transactions](#get-transactions)
-    - [Sending transactions](#sending-transactions)
-    - [Execute script](#execute-script)
-    - [Create account](#create-account)
-    - [Add account key](#add-account-key)
-    - [Deploy contract](#deploy-contract)
-    - [Transaction signing](#transaction-signing)
-    - 
+  - [Running the examples](#running-the-examples)
+  - [Examples summary](#examples-summary)
+      - [Get blocks](#get-blocks)
+      - [Get accounts](#get-accounts)
+      - [Get events](#get-events)
+      - [Get collection](#get-collection)
+      - [Get network parameters](#get-network-parameters)
+      - [Get transactions](#get-transactions)
+      - [Sending transactions](#sending-transactions)
+      - [Execute script](#execute-script)
+      - [Create account](#create-account)
+      - [Add account key](#add-account-key)
+      - [Deploy contract](#deploy-contract)
+      - [Transaction signing](#transaction-signing)
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

## Table of Contents
  - [Running the emulator with the Flow CLI](#running-the-emulator-with-the-flow-cli)
      - [Installation](#installation)
  - [Running the examples](#running-the-examples)
  - [Examples summary](#examples-summary)
      - [Get blocks](#get-blocks)
      - [Get accounts](#get-accounts)
      - [Get events](#get-events)
      - [Get collection](#get-collection)
      - [Get network parameters](#get-network-parameters)
      - [Get transactions](#get-transactions)
      - [Sending transactions](#sending-transactions)
      - [Execute script](#execute-script)
      - [Create account](#create-account)
      - [Add account key](#add-account-key)
      - [Deploy contract](#deploy-contract)
      - [Transaction signing](#transaction-signing)
Tools
LanguageTool

[duplication] ~8-~8: Possible typo: you repeated a word
Context: ...allation](#installation) - Running the examples - Examples summary - [Get ...

(ENGLISH_WORD_REPEAT_RULE)

Markdownlint

7-7: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


10-10: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


11-11: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


12-12: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


13-13: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


14-14: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


15-15: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


16-16: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


17-17: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


18-18: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


19-19: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


20-20: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


21-21: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


22-22: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


35-112: Great addition of the "Examples summary" section!

The "Examples summary" section is a great addition that provides a comprehensive overview of the available examples and their functionalities by listing all Kotlin code examples currently supported in the repo, along with a brief description and a link to the corresponding source file for each example.

However, there are some issues flagged by the static analysis tool that should be fixed:

  • The heading levels should only increment by one level at a time. Please change the heading level of "Get Blocks" and the subsequent headings from h4 to h3.
  • The phrases "Get transaction", "Send transaction", and "Multiple parties" are duplicated. Please remove the duplicates.

Please apply the following changes to fix the issues:

-#### Get Blocks
+### Get Blocks

-#### Get Accounts
+### Get Accounts

-#### Get Events
+### Get Events

-#### Get Collection
+### Get Collection

-#### Get Network Parameters
+### Get Network Parameters

-#### Get Transactions
+### Get Transactions

-- Get transaction 
+- Get transaction
-- Get transaction result
+- Get transaction result

-#### Sending Transactions
+### Sending Transactions

-- Send transaction
+- Send transaction
-- Send transaction with arguments
+- Send transaction with arguments

-#### Execute Script
+### Execute Script

-#### Create Account
+### Create Account

-#### Add Account Key
+### Add Account Key

-#### Deploy Contract
+### Deploy Contract

-#### Transaction Signing
+### Transaction Signing

-- Multiple parties
+- Multiple parties
-- Multiple parties, 2 authorizers
+- Multiple parties, 2 authorizers
-- Multiple parties, multiple signatures
+- Multiple parties, multiple signatures
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

## Examples summary

Below is a list of all Kotlin code examples currently supported in this repo:

### Get Blocks

[Get blocks by ID, height, or latest sealed.](src/main/kotlin/org/onflow/examples/kotlin/getBlock/GetBlockAccessAPIConnector.kt)

- Get the latest sealed block
- Get block by ID
- Get block by height

### Get Accounts

[Get accounts by address.](src/main/kotlin/org/onflow/examples/kotlin/getAccount/GetAccountAccessAPIConnector.kt)

- Get account balance
- Get account from the latest block
- Get account from block by height

### Get Events

[Get events emitted by transactions.](src/main/kotlin/org/onflow/examples/kotlin/getEvent/GetEventAccessAPIConnector.kt)

- Get events for height range
- Get events for block IDs
- Get events directly from transaction result

### Get Collection

[Get collections by ID.](src/main/kotlin/org/onflow/examples/kotlin/getCollection/GetCollectionAccessAPIConnector.kt)

### Get Network Parameters

[Get the current network parameters.](src/main/kotlin/org/onflow/examples/kotlin/getNetworkParams/GetNetworkParametersAccessAPIConnector.kt)

### Get Transactions

[Get transactions.](src/main/kotlin/org/onflow/examples/kotlin/getTransaction/GetTransactionAccessAPIConnector.kt)

- Get transaction
- Get transaction result

### Sending Transactions

[Sending transactions.](src/main/kotlin/org/onflow/examples/kotlin/sendTransaction/SendTransactionExample.kt)

- Send transaction
- Send transaction with arguments

### Execute Script

[Execute a Cadence script.](src/main/kotlin/org/onflow/examples/kotlin/executeScript/ExecuteScriptAccessAPIConnector.kt)

- Execute a simple Cadence script
- Execute a more complex Cadence script with arguments

### Create Account

[Create a new account on Flow.](src/main/kotlin/org/onflow/examples/kotlin/createAccount/CreateAccountExample.kt)

### Add Account Key

[Add a key to an existing account.](src/main/kotlin/org/onflow/examples/kotlin/addKey/AddAccountKeyExample.kt)

### Deploy Contract

[Deploy a Cadence smart contract.](src/main/kotlin/org/onflow/examples/kotlin/deployContract/DeployContractExample.kt)

### Transaction Signing

[Common paradigms for signing transactions.](src/main/kotlin/org/onflow/examples/kotlin/signTransaction/SignTransactionExample.kt)

- Single party, single signature
- Single party, multiple signatures
- Multiple parties
- Multiple parties, 2 authorizers
- Multiple parties, multiple signatures
Tools
LanguageTool

[style] ~43-~43: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...Block/GetBlockAccessAPIConnector.kt) - Get the latest sealed block - Get block by ...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~51-~51: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...unt/GetAccountAccessAPIConnector.kt) - Get account balance - Get account from the ...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~59-~59: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...Event/GetEventAccessAPIConnector.kt) - Get events for height range - Get events fo...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~67-~67: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tCollectionAccessAPIConnector.kt) #### Get Network Parameters [Get the current ne...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[grammar] ~75-~75: This phrase is duplicated. You should probably use “Get transaction” only once.
Context: ...GetTransactionAccessAPIConnector.kt) - Get transaction - Get transaction result #### Sending Transactions [Sen...

(PHRASE_REPETITION)


[grammar] ~82-~82: This phrase is duplicated. You should probably use “Send transaction” only once.
Context: ...ansaction/SendTransactionExample.kt) - Send transaction - Send transaction with arguments #### Execute Script [E...

(PHRASE_REPETITION)


[style] ~89-~89: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: .../ExecuteScriptAccessAPIConnector.kt) - Execute a simple Cadence script - Execute a mor...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[grammar] ~110-~110: This phrase is duplicated. You should probably use “Multiple parties” only once.
Context: ...e - Single party, multiple signatures - Multiple parties - Multiple parties, 2 authorizers - Multiple parties, mult...

(PHRASE_REPETITION)

Markdownlint

39-39: Expected: h3; Actual: h4
Heading levels should only increment by one level at a time

(MD001, heading-increment)

Copy link

github-actions bot commented Sep 3, 2024

SDK Examples Unit Test Results

26 files  ±0  26 suites  ±0   5m 4s ⏱️ ±0s
59 tests ±0  58 ✔️ ±0  0 💤 ±0  1 ❌ ±0 

For more details on these failures, see this check.

Results for commit d13384b. ± Comparison against base commit 703ae4a.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Sep 3, 2024

Common Integration Test Results

0 files  ±0  0 suites  ±0   0s ⏱️ ±0s
0 tests ±0  0 ✔️ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit d13384b. ± Comparison against base commit 703ae4a.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Sep 3, 2024

Unit Test Results

  53 files  ±0    53 suites  ±0   23s ⏱️ ±0s
310 tests ±0  310 ✔️ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit d13384b. ± Comparison against base commit 703ae4a.

Copy link

github-actions bot commented Sep 3, 2024

Integration Test Results

  6 files  ±0    6 suites  ±0   2m 34s ⏱️ ±0s
30 tests ±0  30 ✔️ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit d13384b. ± Comparison against base commit 703ae4a.

README.md Outdated Show resolved Hide resolved
- [Querying Accounts](#querying-accounts)
- [Examples Summary](#examples-summary)
- [Credit](#credit)

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's add a section below called 'Unsupported features'. We can summarize the missing support for Websockets and Event streaming APIs for now.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
lealobanov and others added 3 commits September 4, 2024 13:39
Co-authored-by: j pimmel <frankly.watson@gmail.com>
Co-authored-by: j pimmel <frankly.watson@gmail.com>
Co-authored-by: j pimmel <frankly.watson@gmail.com>
@lealobanov lealobanov merged commit 4684515 into examples-readmes Sep 4, 2024
2 checks passed
@lealobanov lealobanov deleted the readmes-docs branch September 5, 2024 15:00
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