Conversation
|
|
Note Reviews pausedUse the following commands to manage reviews:
WalkthroughThis pull request introduces documentation updates and minor version increments across multiple files in the fdm-core and fdm-docs repositories. The primary changes include clarifying the geometry requirements for field-related functions, adding documentation for catalogue usage, and enhancing error handling guidance. The modifications focus on improving documentation clarity without altering the underlying code functionality. Changes
Possibly related PRs
Suggested reviewers
Poem
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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 5
🧹 Nitpick comments (7)
fdm-core/src/field.ts (1)
15-15: Enhance geometry parameter documentation.While the clarification about polygon requirement is good, consider adding:
- The expected coordinate reference system (CRS)
- An example of a valid WKT polygon format
- * @param b_geometry - Geometry of field in WKT format, the geometry must be a polygon + * @param b_geometry - Geometry of field in WKT format. Must be a polygon in WGS84 (EPSG:4326) format. + * Example: 'POLYGON((30 10, 40 40, 20 40, 10 20, 30 10))'fdm-docs/docs/04-Getting started/045-Using a catalogue.md (1)
15-15: Replace hard tab with spaces.The line contains hard tabs which should be replaced with spaces for consistent formatting.
🧰 Tools
🪛 Markdownlint (0.37.0)
15-15: Column: 116
Hard tabs(MD010, no-hard-tabs)
🪛 GitHub Actions: Test deployment of fdm-docs
[error] Broken markdown link to './033-Catalogues.md'. The referenced file does not exist at the expected location.
fdm-docs/docs/tutorial-concepts/asset-action-model.md (1)
8-10: Improve readability with proper comma placement.Add commas to improve readability:
-In this model, a farm is a collection of assets which are physical things with certain properties such as a field, a soil sample, or a sheep. +In this model, a farm is a collection of assets, which are physical things with certain properties, such as a field, a soil sample, or a sheep. -Actions are events or processess that affect an asset or take place in or on an asset such as sowing a field, collecting a soil sample, or selling a sheep. +Actions are events or processes that affect an asset or take place in or on an asset, such as sowing a field, collecting a soil sample, or selling a sheep. -Two objects are never directly linked. Objects are only connected to each other via an action. A stock of fertiliser for instance can only be related to a specific field through a fertilization action. +Two objects are never directly linked. Objects are only connected to each other via an action. A stock of fertiliser, for instance, can only be related to a specific field through a fertilization action.Also fixed the spelling of "processes".
🧰 Tools
🪛 LanguageTool
[uncategorized] ~8-~8: A comma might be missing here.
Context: ... which are physical things with certain properties such as a field, a soil sample, or a sh...(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)
[uncategorized] ~9-~9: Possible missing comma found.
Context: ...fect an asset or take place in or on an asset such as sowing a field, collecting a so...(AI_HYDRA_LEO_MISSING_COMMA)
[uncategorized] ~10-~10: A comma might be missing here.
Context: ...to each other via an action. A stock of fertiliser for instance can only be related to a s...(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)
[uncategorized] ~10-~10: A comma might be missing here.
Context: ...ia an action. A stock of fertiliser for instance can only be related to a specific field...(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)
fdm-docs/docs/tutorial-concepts/principles.md (4)
7-7: Fix grammar in principle #4.There's a grammatical error in this sentence.
-Assets can never be connected by an another asset object +Assets can never be connected by another asset object🧰 Tools
🪛 LanguageTool
[grammar] ~7-~7: One of these determiners is redundant in this context.
Context: ...ex` 4. Assets can never be connected by an another asset object, but only via an action. This is...(AN_ANOTHER)
8-8: Fix grammar and enhance clarity of principle #5.The sentence has a grammatical error and could be clearer with formatting and an example.
-5. Assets names are always plural. Action names always consists out of 2 parts: the first part is the asset on which the action takes place in singular form and the second part the name of the action. +5. Assets names are always plural. Action names always consist of 2 parts: + - First part: The singular form of the asset on which the action takes place + - Second part: The name of the action + + Example: For a "fields" asset, an action might be named "field_harvest" or "field_plant".🧰 Tools
🪛 LanguageTool
[grammar] ~8-~8: It seems that the correct verb form here is “consist”.
Context: ... are always plural. Action names always consists out of 2 parts: the first part is the a...(AGREEMENT_SENT_START_2)
4-8: Consider adding examples for each principle.While the principles are well-defined, they could be more easily understood with concrete examples. Consider adding an example after each principle to illustrate its practical application.
For instance:
- Show how information is stored uniquely
- Demonstrate the single-level structure with IDs
- Provide example parameter names from pandex
- Illustrate asset-action connections with a simple diagram or code snippet
- (Example already suggested in previous comment)
Would you like me to help draft these examples?
🧰 Tools
🪛 LanguageTool
[grammar] ~7-~7: One of these determiners is redundant in this context.
Context: ...ex` 4. Assets can never be connected by an another asset object, but only via an action. This is...(AN_ANOTHER)
[grammar] ~8-~8: It seems that the correct verb form here is “consist”.
Context: ... are always plural. Action names always consists out of 2 parts: the first part is the a...(AGREEMENT_SENT_START_2)
5-5: Format technical terms consistently.Consider using backticks (
) for technical terms likefdmandid's`.-2. The fdm object contains only 1 level and does not allow nesting. Information between objects can be connected using id's +2. The `fdm` object contains only 1 level and does not allow nesting. Information between objects can be connected using `ids`
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
fdm-core/src/field.ts(1 hunks)fdm-docs/docs/04-Getting started/042-Setup the FDM instance.md(1 hunks)fdm-docs/docs/04-Getting started/044-Add a field.md(1 hunks)fdm-docs/docs/04-Getting started/045-Using a catalogue.md(1 hunks)fdm-docs/docs/tutorial-concepts/asset-action-model.md(1 hunks)fdm-docs/docs/tutorial-concepts/principles.md(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- fdm-docs/docs/04-Getting started/042-Setup the FDM instance.md
🧰 Additional context used
🪛 LanguageTool
fdm-docs/docs/04-Getting started/044-Add a field.md
[style] ~30-~30: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...epresenting the name of the field. * b_id_source The identifier of the field...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~38-~38: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...is farm ended managing this field. * b_manage_type The type of managing fiel...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
fdm-docs/docs/04-Getting started/045-Using a catalogue.md
[typographical] ~6-~6: It appears that a comma is missing.
Context: ... catalogues with your own data. On this page we will work with the cultivations ...
(DURING_THAT_TIME_COMMA)
[uncategorized] ~42-~42: Loose punctuation mark.
Context: ... b_lu_hcat3_name: "catnip" } ) ``` )
(UNLIKELY_OPENING_PUNCTUATION)
fdm-docs/docs/tutorial-concepts/asset-action-model.md
[uncategorized] ~8-~8: A comma might be missing here.
Context: ... which are physical things with certain properties such as a field, a soil sample, or a sh...
(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)
[uncategorized] ~9-~9: Possible missing comma found.
Context: ...fect an asset or take place in or on an asset such as sowing a field, collecting a so...
(AI_HYDRA_LEO_MISSING_COMMA)
[uncategorized] ~10-~10: A comma might be missing here.
Context: ...to each other via an action. A stock of fertiliser for instance can only be related to a s...
(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)
[uncategorized] ~10-~10: A comma might be missing here.
Context: ...ia an action. A stock of fertiliser for instance can only be related to a specific field...
(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)
fdm-docs/docs/tutorial-concepts/principles.md
[grammar] ~7-~7: One of these determiners is redundant in this context.
Context: ...ex` 4. Assets can never be connected by an another asset object, but only via an action. This is...
(AN_ANOTHER)
[grammar] ~8-~8: It seems that the correct verb form here is “consist”.
Context: ... are always plural. Action names always consists out of 2 parts: the first part is the a...
(AGREEMENT_SENT_START_2)
🪛 Markdownlint (0.37.0)
fdm-docs/docs/04-Getting started/045-Using a catalogue.md
15-15: Column: 116
Hard tabs
(MD010, no-hard-tabs)
🪛 GitHub Actions: Test deployment of fdm-docs
fdm-docs/docs/04-Getting started/045-Using a catalogue.md
[error] Broken markdown link to './033-Catalogues.md'. The referenced file does not exist at the expected location.
🔇 Additional comments (1)
fdm-docs/docs/tutorial-concepts/principles.md (1)
1-3: LGTM! Clear and concise introduction.The section title and introductory sentence effectively set up the content that follows.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Brent Riechelman <72964508+BrentWHR@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Brent Riechelman <72964508+BrentWHR@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Brent Riechelman <72964508+BrentWHR@users.noreply.github.com>
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (5)
fdm-docs/docs/04-Getting started/044-Add a field.md (2)
43-43: Fix typo in error handling section.There's a typo in "handeling".
-Just like the ``addFarm`` function, ``addField`` includes robust error handeling. +Just like the ``addFarm`` function, ``addField`` includes robust error handling.
42-49: Consider adding a code example for error handling.While the tip about using try-catch is helpful, a concrete code example would make it clearer for users.
Consider adding an example like this:
try { const fieldId = await addField({ fdm, b_id_farm, b_name, b_id_source, b_geometry, b_manage_start, b_manage_end, b_manage_type }); console.log(`Field created with ID: ${fieldId}`); } catch (error) { console.error('Failed to add field:', error.message); }fdm-docs/docs/04-Getting started/045-Using a catalogue.md (3)
6-6: Add missing comma in introduction.Add a comma after "On this page".
-On this page we will work with the **cultivations** catalogue. +On this page, we will work with the **cultivations** catalogue.🧰 Tools
🪛 LanguageTool
[typographical] ~6-~6: It appears that a comma is missing.
Context: ... catalogues with your own data. On this page we will work with the cultivations ...(DURING_THAT_TIME_COMMA)
42-42: Remove extra closing parenthesis.There's an unnecessary closing parenthesis at the end of the code example.
-} -) +}
9-10: Add code example for accessing catalogues.While the explanation of
getCultivationsFromCatalogueis clear, a code example would be helpful for users.Consider adding an example:
const cultivations = await getCultivationsFromCatalogue(fdm = "myFDM"); console.log('Available cultivations:', cultivations);
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (8)
.changeset/honest-mayflies-smoke.md(1 hunks)fdm-core/CHANGELOG.md(1 hunks)fdm-core/package.json(1 hunks)fdm-core/src/field.ts(1 hunks)fdm-docs/CHANGELOG.md(1 hunks)fdm-docs/docs/04-Getting started/044-Add a field.md(1 hunks)fdm-docs/docs/04-Getting started/045-Using a catalogue.md(1 hunks)fdm-docs/package.json(1 hunks)
✅ Files skipped from review due to trivial changes (4)
- fdm-core/package.json
- fdm-docs/package.json
- fdm-core/CHANGELOG.md
- .changeset/honest-mayflies-smoke.md
🚧 Files skipped from review as they are similar to previous changes (1)
- fdm-core/src/field.ts
🧰 Additional context used
🪛 LanguageTool
fdm-docs/docs/04-Getting started/045-Using a catalogue.md
[typographical] ~6-~6: It appears that a comma is missing.
Context: ... catalogues with your own data. On this page we will work with the cultivations ...
(DURING_THAT_TIME_COMMA)
🔇 Additional comments (1)
fdm-docs/CHANGELOG.md (1)
3-14: LGTM! Clear and well-structured changelog entries.The changelog properly documents the new additions and changes, following semantic versioning practices.
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@coderabbitai in file |
|
Tip For best results, initiate chat on the files or code changes. @BrentWHR Thank you for pointing this out. You are absolutely correct about the markdown syntax rule. I will ensure to check for proper spacing in markdown title attributes during future reviews. 🔗 Analysis chain🏁 Scripts executedThe following scripts were executed for the analysis: Script: Length of output: 2019 ✏️ Learnings added
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
fdm-docs/docs/04-Getting started/045-Using a catalogue.md (2)
6-6: Add missing comma for better readability.Add a comma after "Here" to improve the flow of the sentence.
-Here we demonstrate +Here, we demonstrate🧰 Tools
🪛 LanguageTool
[uncategorized] ~6-~6: Possible missing comma found.
Context: ...talogues.md "Catalogues concept page"). Here we demonstrate how to access data from ...(AI_HYDRA_LEO_MISSING_COMMA)
12-15: Fix inconsistent code block formatting.The code block uses four backticks to close (````), but only three to open (```). This inconsistency might cause rendering issues.
-```` +```
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
fdm-docs/docs/04-Getting started/044-Add a field.md(1 hunks)fdm-docs/docs/04-Getting started/045-Using a catalogue.md(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- fdm-docs/docs/04-Getting started/044-Add a field.md
🧰 Additional context used
🪛 LanguageTool
fdm-docs/docs/04-Getting started/045-Using a catalogue.md
[uncategorized] ~6-~6: Possible missing comma found.
Context: ...talogues.md "Catalogues concept page"). Here we demonstrate how to access data from ...
(AI_HYDRA_LEO_MISSING_COMMA)
🔇 Additional comments (1)
fdm-docs/docs/04-Getting started/045-Using a catalogue.md (1)
27-46: Well-structured examples with clear documentation!The code examples effectively demonstrate both methods of extending catalogues, with proper parameter documentation and clear property specifications.
|
@coderabbitai pause |
✅ Actions performedReviews paused. |
SvenVw
left a comment
There was a problem hiding this comment.
Looks, good, just some small errors about the use of fdm. Make sure to check that fdm functions are correctly called.
|
Do not forget to bump version with |
Merging is blocked due to some problem with verion numbering which I don't quite grasp. I had used |
|
I close this PR as it is not up to date anymore and #120 replaces it |
Made security tip stand out using admonition
Added two getting started documents.
Summary by CodeRabbit
Release Notes v0.10.1
Documentation
Minor Improvements
Version Updates
fdm-coreto version 0.10.1.fdm-docsto version 0.3.0.