bdcdata 0.0.9__tar.gz → 0.0.10__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bdcdata
3
- Version: 0.0.9
3
+ Version: 0.0.10
4
4
  Summary: A tool to work with BDC data from the FCC.
5
5
  Project-URL: Homepage, https://github.com/npappin-wsu/bdc
6
6
  Project-URL: Issues, https://github.com/npappin-wsu/bdc/issues
@@ -156,12 +156,19 @@ class availability:
156
156
  if response.status_code == 200 and cache:
157
157
  bdcCache.save(item["file_name"], response.content)
158
158
  data = response.content
159
- if response.status_code != 200:
159
+ if response.status_code == 422:
160
160
  logger.error(
161
- f"Failed to retrieve availability data for {item['state_name']} and {item['technology_code']} in {r}."
161
+ f"(422) Unprocessable Entity for {item['state_name']} and {item['technology_code']} in {r}."
162
162
  )
163
163
  raise Exception(
164
- f"Failed to retrieve availability data for {item['state_name']} and {item['technology_code']} in {r}."
164
+ f"(422) Unprocessable Entity for {item['state_name']} and {item['technology_code']} in {r}."
165
+ )
166
+ elif response.status_code != 200:
167
+ logger.error(
168
+ f"(Error Code: {response.status_code}) Failed to retrieve availability data for {item['state_name']} and {item['technology_code']} in {r}."
169
+ )
170
+ raise Exception(
171
+ f"(Error Code: {response.status_code})Failed to retrieve availability data for {item['state_name']} and {item['technology_code']} in {r}."
165
172
  )
166
173
  else:
167
174
  zip = zipfile.ZipFile(io.BytesIO(data))
@@ -170,6 +177,7 @@ class availability:
170
177
  dtype=columnHints,
171
178
  dtype_backend="pyarrow",
172
179
  )
180
+ localdf['release'] = r
173
181
  df = pd.concat([df, localdf], ignore_index=True)
174
182
  # logger.info(
175
183
  # f"df memory size (hinted): {df.memory_usage(deep=True).sum()/1000000} MB"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes