Commit Graph

3 Commits

Author SHA1 Message Date
Arsham Mirehvandi
d45e4de40b Refactor assemble.py and disease.py for clarity and functionality
- Moved the assignment of `phenology_phase` in assemble.py to ensure it is included only for valid days.
- Updated the docstring in disease.py to clarify the rounding behavior of decimal values, enhancing the understanding of the formatting logic.
- Removed unnecessary checks in the decimal formatting function to streamline the code.
2026-09-16 22:40:14 +02:00
Arsham Mirehvandi
d8273b5cd1 Enhance advice context and treatment handling
- Updated README.md to clarify the conditions for including `last_applied_treatment` in the advice JSON structure.
- Modified job.py to pass `as_of` and `field_id` to the advice generation function.
- Enhanced advice_context.py to conditionally add `last_applied_treatment` based on recent treatment history and allowed products.
- Introduced new functions in treatments.py to group treatments by day and load the last treatment before the recent window.
- Updated _output_format.md to specify the conditions under which `last_applied_treatment` is included in the advisory.
2026-09-09 16:00:23 +02:00
Arsham Mirehvandi
8a6d48e5a1 Enhance advice generation and context handling
- Updated README.md to reflect changes in the `json_for_advice_generation` structure, including the addition of `date_of_today` and clarification of `last_advice` fields.
- Modified job.py to load and pass the issuance date of the last advice.
- Enhanced advice_context.py to include the issuance date in the last advice retrieval.
- Updated assemble.py to include `date_of_today` in the JSON assembly for advice generation.
- Improved advice.py to sanitize the `advice_summary` by removing relative date references and ensuring compliance with new guidelines.
2026-09-08 09:40:34 +02:00