CropGuardian.SoilMetrics
2.0.0
The CropGuardian.SoilMetric packages have been deprecated. We are moving into a more user-friendly naming convention. Our core package is the CropGuardian.Core package.
dotnet add package CropGuardian.SoilMetrics --version 2.0.0
NuGet\Install-Package CropGuardian.SoilMetrics -Version 2.0.0
<PackageReference Include="CropGuardian.SoilMetrics" Version="2.0.0" />
paket add CropGuardian.SoilMetrics --version 2.0.0
#r "nuget: CropGuardian.SoilMetrics, 2.0.0"
// Install CropGuardian.SoilMetrics as a Cake Addin #addin nuget:?package=CropGuardian.SoilMetrics&version=2.0.0 // Install CropGuardian.SoilMetrics as a Cake Tool #tool nuget:?package=CropGuardian.SoilMetrics&version=2.0.0
CropGuardian.SoilMetrics v2.0.0 - Release Notes
Overview
Version 2.0.0 introduces significant new features, optimizations, and structural improvements for better flexibility, functionality, and performance. This update enhances soil analysis accuracy, adds support for customizable data providers, and improves soil moisture and nutrient analysis. Below are the key changes.
Major Features and Enhancements:
Customizable Crop Data Providers:
- Added support for external data providers via the
ICropNutrientSufficiencyProvider
interface. - Developers can now plug in their own crop nutrient sufficiency data or retrieve data dynamically from external databases or APIs.
- Added support for external data providers via the
Detailed Fertilizer Recommendations:
- The analysis service now provides detailed recommendations for fertilizer application based on the deficiency level.
- The system calculates and suggests the amount of fertilizer to apply for each nutrient deficiency (e.g., "Apply 1.09 kg/ha of Urea").
Enhanced Soil Moisture Analysis:
- Soil moisture levels are now incorporated into nutrient recommendations.
- The system provides recommendations for irrigation or drainage based on real-time soil moisture levels.
Simulated Soil Data Generator:
- Updated the SimulatedDataService to generate random soil nutrient data based on predefined or purely random ranges.
- The generated data helps in testing and simulating different soil conditions for multiple crops.
Refined Exception Handling:
- Introduced robust exception handling to ensure clearer error messages during soil analysis.
- Added validation logic for both soil and crop data, raising appropriate exceptions if any data is missing or invalid.
API Changes:
Renamed
Range
toNutrientRange
:- This improves clarity in the data model to represent nutrient sufficiency ranges for different crops.
- Affects all references to crop nutrient ranges.
Refactored
AnalyzeSoil
Method:- The
AnalyzeSoil
method now acceptsICropNutrientSufficiencyProvider
to allow for flexible nutrient sufficiency data retrieval. - Improved return types and structured exception handling for missing data.
- The
New Helper Functions:
CheckAndRecommend
: A new utility method for checking nutrient levels and providing fertilizer recommendations.CalculateFertilizerAmount
: Computes the specific fertilizer application rate based on the deficiency.
Bug Fixes:
- Fixed incorrect handling of empty or null crop and soil data by enforcing the use of
option
types. - Resolved type mismatch issues when handling F# lists and .NET lists, ensuring proper collection conversions.
- Corrected issues with tests failing due to partial string matches in recommendations by introducing substring matching in test assertions.
Performance Improvements:
- Optimized data flow and nutrient analysis logic for better performance when handling large sets of crop and soil data.
- Improved random data generation performance for simulations, reducing computation time.
Breaking Changes:
- API Structure: The introduction of
ICropNutrientSufficiencyProvider
and related interfaces requires updates to existing implementations.- Developers must now provide crop data via this interface or use the new
StaticCropProvider
.
- Developers must now provide crop data via this interface or use the new
- Renaming of
Range
: If you relied on theRange
type in previous versions, you’ll need to update your code to useNutrientRange
.
Deprecations:
- The use of direct nutrient sufficiency data without a provider is deprecated. Developers are encouraged to implement or inject their own crop data providers for better flexibility.
Testing and Quality Improvements:
- Expanded unit test coverage for all core services, including soil analysis, simulated data generation, and soil moisture recommendations.
- Improved tests with detailed assertions for fertilizer and moisture recommendations.
These release notes provide a comprehensive overview of the new features, improvements, and breaking changes introduced in version 2.0.0.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net8.0
- FSharp.Core (>= 8.0.400)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|