bdcdata 0.0.8__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.8
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
@@ -13,6 +13,7 @@ Classifier: Intended Audience :: Science/Research
13
13
  Classifier: Operating System :: OS Independent
14
14
  Requires-Python: >=3.10
15
15
  Requires-Dist: pandas>=2
16
+ Requires-Dist: pyarrow
16
17
  Requires-Dist: python-dotenv
17
18
  Requires-Dist: requests-ratelimiter
18
19
  Description-Content-Type: text/markdown
@@ -18,6 +18,7 @@ dependencies = [
18
18
  "requests-ratelimiter",
19
19
  "python-dotenv",
20
20
  "pandas>=2",
21
+ "pyarrow",
21
22
  ]
22
23
  classifiers = [
23
24
  "Development Status :: 2 - Pre-Alpha",
@@ -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,11 +177,12 @@ 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
- logger.info(
175
- f"df memory size (hinted): {df.memory_usage(deep=True).sum()/1000000} MB"
176
- )
177
- logger.info(f"df shape: {df.shape}")
182
+ # logger.info(
183
+ # f"df memory size (hinted): {df.memory_usage(deep=True).sum()/1000000} MB"
184
+ # )
185
+ # logger.info(f"df shape: {df.shape}")
178
186
  logger.debug(f"State: {states}, Technology: {technology}, Release: {release}")
179
187
  return df
180
188
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes