Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .vscode/cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
"sdk/anomalydetector/azure-ai-anomalydetector/**",
"sdk/applicationinsights/azure-applicationinsights/**",
"sdk/appconfiguration/azure-appconfiguration/**",
"sdk/agrifood/azure-agrifood-farming/**",
"sdk/attestation/azure-security-attestation/**",
"sdk/batch/azure-batch/**",
"sdk/cognitiveservices/azure-cognitiveservices-search-autosuggest/**",
Expand Down Expand Up @@ -674,6 +673,13 @@
]
},
{
"filename": "sdk/agrifood/azure-agrifood-farming/**",
"words": [
"NDVI",
"Unhandleable"
]
},
{
"filename": "sdk/storage/azure-storage-file-share/**",
"words": [
"XSMB",
Expand Down
8 changes: 4 additions & 4 deletions sdk/agrifood/azure-agrifood-farming/samples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ urlFragment: farmbeats-samples

# Azure FarmBeats samples for Python client

The following sample programs demonstrate some common use case scenairos for the [FarmBeats Python client library][python_sdk].
The following sample programs demonstrate some common use case scenarios for the [FarmBeats Python client library][python_sdk].

| Files | Description |
| ------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [sample_hello_world.py][hello_world_sample] | This sample demonstrates the most basic operation that can be performed - creation of a Farmer. Use this to understand how to create the client object, how to authenticate it, and make sure your client is set up correctly to call into your FarmBeats endpoint. |
| [sample_farm_hierarchy.py][farm_hierarchy_sample] | This sample demonstrates how to create a simple [farm hierarchy][farm_hierarchy_docs], comprising of Farmer, Farm, Field and Boundary. |
| [sample_farm_hierarchy_complete.py][farm_hierarchy_complete_sample] | This builds on the previous sample to add to the previous sample, and demonstrate the relationships between Crops, Crop Varities, Seasons and Seasonal Fields and the other farm hierarchy objects. |
| [sample_farm_hierarchy_complete.py][farm_hierarchy_complete_sample] | This builds on the previous sample to add to the previous sample, and demonstrate the relationships between Crops, Crop Varieties, Seasons and Seasonal Fields and the other farm hierarchy objects. |
| [sample_satellite_download.py][satellite_download_sample] | This sample demonstrates FarmBeats' satellite integrations and how to ingest satellite imagery into the platform, and then download them onto a local directory. This demonstrates key concepts of how to create a job in FarmBeats, and how to poll on the completion of the job using the SDK. In the [corresponding async sample][satellite_download_async_sample] we demonstrate how to handle concurrent download of potentially hundreds of files by limiting the max concurrency using semaphores. |
| [sample_attachments.py][attachments_sample] | This sample demonstrates FarmBeats' capabaility of storing arbitrary files in context to the various farm hierarchy objects. We first attach some files onto a farmer and a farm, and then download all existing attachments for the farmer onto a local directory. |
| [sample_attachments.py][attachments_sample] | This sample demonstrates FarmBeats' capability of storing arbitrary files in context to the various farm hierarchy objects. We first attach some files onto a farmer and a farm, and then download all existing attachments for the farmer onto a local directory. |
| [sample_cascade_delete.py][cascade_delete_sample] | This sample demonstrates the usage of cascade delete jobs to perform cleanup of farm hierarchy objects. A cascade delete job handles the recursive deletion of all dependent data for the given parent resource. Use this to clean up the sample resources that you create in the other samples. |

Additionally, for each sample, there are corresponding files in the [`samples/async`][async_samples] directory that demonstrate the same scenarios using the async FarmBeats client. Using the async approach will offer much better performance when parts of the code can be executed concurrentlly. This is especially important when downloading files, such as in the satellite data download sample, and in the attachments sample.
Additionally, for each sample, there are corresponding files in the [`samples/async`][async_samples] directory that demonstrate the same scenarios using the async FarmBeats client. Using the async approach will offer much better performance when parts of the code can be executed concurrently. This is especially important when downloading files, such as in the satellite data download sample, and in the attachments sample.


## Prerequisites
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
FILE: sample_attachments_async.py

DESCRIPTION:
This sample demonstrates FarmBeats' capabaility of storing arbitrary files
This sample demonstrates FarmBeats' capability of storing arbitrary files
in context to the various farm hierarchy objects.
We first attach some files onto a farmer and a farm, and then download all
existing attachments for the farmer onto a local directory.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

DESCRIPTION:
This sample demonstrates
- Getting a filterd list of farmers based on last modified timestamp
- Getting a filtered list of farmers based on last modified timestamp
- Queuing a cascade delete job on a farmer, and polling for it to complete

USAGE:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
FILE: sample_attachments.py

DESCRIPTION:
This sample demonstrates FarmBeats' capabaility of storing arbitrary files
This sample demonstrates FarmBeats' capability of storing arbitrary files
in context to the various farm hierarchy objects.
We first attach some files onto a farmer and a farm, and then download all
existing attachments for the farmer onto a local directory.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

DESCRIPTION:
This sample demonstrates
- Getting a filterd list of farmers based on last modified timestamp
- Getting a filtered list of farmers based on last modified timestamp
- Queuing a cascade delete job on a farmer, and polling for it to complete

USAGE:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from testcase import FarmBeatsPowerShellPreparer, FarmBeatsTest


class FarmHeirarchyTestCase(FarmBeatsTest):
class FarmHierarchyTestCase(FarmBeatsTest):

@FarmBeatsPowerShellPreparer()
def test_farmer_operations(self, agrifood_endpoint):
Expand Down
2 changes: 1 addition & 1 deletion sdk/agrifood/azure-agrifood-farming/tests/testcase.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def create_boundary(self, client, farmer_id, boundary_id):
)
)
except Exception as e:
print("!!! Unhandlable error in boundary creation")
print("!!! Unhandleable error in boundary creation")
print(e)
print(dir(e))
print(e.response.body())
Expand Down