You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+67-10Lines changed: 67 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,14 @@
6
6
The reporting service generates .pdf reports based on information present in datasets.\
7
7
These datasets are required to conform to the OCSM (OpenAgri Common Semantic Model) as well as be JSON-LD compliant.
8
8
9
+
# Roadmap
10
+
11
+
High-level next steps for the Reporting Service:
12
+
13
+
-[ ] Implement PDF reports for irrigation fertilization
14
+
-[ ] Integrate with additional 3rd party Open Street Maps API for satelite images
15
+
-[ ] Update PDF reports design and tables to be more adaptive for different use cases
16
+
9
17
# Requirements
10
18
<ul>
11
19
<li>git</li>
@@ -52,7 +60,7 @@ docker compose up
52
60
53
61
The application will be served on http://127.0.0.1:8009 (I.E. typing localhost/docs in your browser will load the swagger documentation)
54
62
55
-
Full list of APIs available you can check [here](https://editor-next.swagger.io/?url=https://gist.githubusercontent.com/JoleVLF/b1bcdd77ac82aeb115a6c94fb3dadbdc/raw/32df1d94947b67dcc70f730a629d7c91161e532f/api.json)
63
+
Full list of APIs available you can check [here](https://editor-next.swagger.io/?url=https://gist.githubusercontent.com/JoleVLF/c29adf44808a683149426912383c75eb/raw/7b57a845ab37954424c0ef2108962fd248c6966f/api_v4.json)
56
64
# Documentation
57
65
<h3>GET</h3>
58
66
@@ -79,12 +87,26 @@ Response is generated PDF file.
79
87
80
88
## Request Params
81
89
90
+
### irrigation_id
91
+
-**Type**: `uudi str`
92
+
-**Description**: ID of irrigation operation for which PDF is generated (optional)
93
+
82
94
### data
83
95
-**Type**: `UploadFile`
84
96
-**Description**: API processes the data directly to generate the report if data passed. This parameter is not required and when it is, must be provided as an `UploadFile`.
85
97
98
+
-### from_date
99
+
-**Type**: `date`
100
+
-**Description**: Optional date filter (from which data is filtered)
86
101
102
+
-### to_date
103
+
-**Type**: `date`
104
+
-**Description**: AOptional date filter (until which data is filtered)
87
105
106
+
-### parcel_id
107
+
-**Type**: `str`
108
+
-**Description**: Optional parcel filter.
109
+
-
88
110
## Response
89
111
90
112
Response is uuid of generated PDF file.
@@ -97,14 +119,26 @@ Response is uuid of generated PDF file.
97
119
98
120
## Request Params
99
121
100
-
### observation_type_name
122
+
### calendar_activity_type
123
+
-**Type**: `str`
124
+
-**Description**: All Farm Calendar Observation Type values are possible as input (optional). If operation_id provided not used.
125
+
126
+
### operation_id
127
+
-**Type**: `uudi str`
128
+
-**Description**: ID of operation for which PDF is generated (optional)
129
+
130
+
-### from_date
131
+
-**Type**: `date`
132
+
-**Description**: Optional date filter (from which data is filtered). If operation_id provided not used.
133
+
134
+
-### to_date
135
+
-**Type**: `date`
136
+
-**Description**: Optional date filter (until which data is filtered). If operation_id provided not used.
137
+
138
+
-### parcel_id
101
139
-**Type**: `str`
102
-
-**Description**: The name of the observation type for the report. The value of this parameter must be one of the following options:
103
-
- "Pesticides"
104
-
- "Irrigation"
105
-
- "Fertilization"
106
-
- "CropStressIndicator"
107
-
- "CropGrowthObservation"
140
+
-**Description**: Optional parcel filter (When operation id not used).
141
+
108
142
109
143
### data
110
144
-**Type**: `UploadFile`
@@ -129,6 +163,10 @@ When service is run without Gatekeeper data must be provided in .json file forma
129
163
130
164
## Request Params
131
165
166
+
### farm_animal_id
167
+
-**Type**: `uudi str`
168
+
-**Description**: ID of FarmAnimal record for which PDF is generated (optional)
169
+
132
170
### animal_group
133
171
-**Type**: `Optional[str]`
134
172
-**Description**: The group or category the animal belongs to. This is an optional string field, and it can be left as `None` if not applicable.
@@ -145,6 +183,18 @@ When service is run without Gatekeeper data must be provided in .json file forma
145
183
-**Type**: `Optional[int]`
146
184
-**Description**: The status code associated with the animal or the transaction. It is an optional integer field. If not specified, it defaults to `None`.
147
185
186
+
-### from_date
187
+
-**Type**: `date`
188
+
-**Description**: Optional date filter (from which data is filtered)
189
+
190
+
-### to_date
191
+
-**Type**: `date`
192
+
-**Description**: AOptional date filter (until which data is filtered)
193
+
194
+
-### parcel_id
195
+
-**Type**: `str`
196
+
-**Description**: Optional parcel filter.
197
+
148
198
### data
149
199
-**Type**: `UploadFile`
150
200
-**Description**: API processes the data directly to generate the report if data passed. This parameter is not required and when it is, must be provided as an `UploadFile`.
@@ -172,8 +222,15 @@ This will run the tests and return success values for each api tested in the ter
172
222
173
223
<h3>These tests will NOT result in generated .pdf files.</h3>
174
224
175
-
# Contribution
176
-
Please contact the maintainer of this repository.
225
+
## Contributing
226
+
227
+
We welcome first-time contributions!
228
+
229
+
See our [Contributing Guide](CONTRIBUTE.md)
230
+
231
+
You can also open an issue to discuss ideas.
232
+
233
+
Reporting Service is part of OpenAgri project, building tools for agriculture & climate data. Your contribution helps farmers and researchers.
177
234
178
235
# License
179
236
This project code is licensed under the EUPL 1.2 license, see the [LICENSE](https://github.com/agstack/OpenAgri-ReportingService/blob/main/LICENSE) file for more details.
0 commit comments