Skip to content

Commit f224141

Browse files
authored
Merge pull request #108 from IFRCGo/fix/pdc-episode-num
Fix(PDC): Set the episode number to 1
2 parents 5037209 + 57e3266 commit f224141

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

pystac_monty/sources/pdc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,9 @@ def __init__(self, pdc_data_src: PDCDataSource, geocoder: MontyGeoCoder):
127127
self.exposure_detail = pdc_data_src.get_exposure_detail_data()
128128
self.geojson_path = pdc_data_src.geojson_path
129129

130-
# NOTE Assigning -1 to episode_number incase of failure just to ignore the item formation (see make_items method)
130+
# NOTE Setting 1 to the episode_number as it is missing in the source data.
131131

132-
self.episode_number = -1
132+
self.episode_number = 1
133133
self.hazard_data = self._get_hazard_data()
134134

135135
def _get_hazard_data(self):

tests/extensions/cassettes/test_pdc/PDCTest.test_transformer_0.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ interactions:
77
Host:
88
- ifrcgo.org
99
User-Agent:
10-
- Python-urllib/3.13
10+
- Python-urllib/3.12
1111
method: GET
1212
uri: https://ifrcgo.org/monty-stac-extension/v1.0.0/schema.json
1313
response:
@@ -147,7 +147,7 @@ interactions:
147147
Content-Type:
148148
- application/json; charset=utf-8
149149
Date:
150-
- Fri, 20 Jun 2025 05:28:29 GMT
150+
- Mon, 13 Oct 2025 10:05:16 GMT
151151
ETag:
152152
- '"68362515-231e"'
153153
Last-Modified:
@@ -163,15 +163,15 @@ interactions:
163163
X-Cache-Hits:
164164
- '0'
165165
X-Fastly-Request-ID:
166-
- de23d8c8a122141971216fb495b2fc60ed762ea2
166+
- 2f6809248f77e57d92f50e3028dbbeb3251c432e
167167
X-GitHub-Request-Id:
168-
- 674C:381396:A3FF8:C3B4B:6854F17C
168+
- A373:135D5D:1E67B0:24F1BF:68ECCED8
169169
X-Served-By:
170-
- cache-maa10225-MAA
170+
- cache-bom-vanm7210025-BOM
171171
X-Timer:
172-
- S1750397309.817887,VS0,VE244
172+
- S1760349916.126627,VS0,VE298
173173
expires:
174-
- Fri, 20 Jun 2025 05:38:28 GMT
174+
- Mon, 13 Oct 2025 10:15:16 GMT
175175
x-proxy-cache:
176176
- MISS
177177
status:

0 commit comments

Comments
 (0)