Skip to content

Commit 75aae34

Browse files
committed
Merge branch 'alpha'
2 parents a7c7aa9 + fc7a3a0 commit 75aae34

41 files changed

Lines changed: 6336 additions & 2343 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 34 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
All notable changes to this project will be documented in this file.
44

5-
## [0.1.7] - 2025-04-07
5+
## [0.1.8] - 2025-04-14
66

77
### 🚀 Features
88

@@ -12,10 +12,14 @@ All notable changes to this project will be documented in this file.
1212
- Added the `Channel` enum to represent valid keys for the Channel parameter of the IntlServSTA dataset.
1313
- Added the `IipIndustry` enum to represent valid keys for the Industry parameter of the IntlServSTA dataset.
1414
- Added the `NaicsSector`, `NaicsSubsector` and `NaicsCategory` enums to represent different levels of NAICS code categories.
15+
- The NaicsSector::from_key method is now NaicsSector::from_code.
16+
- Added the `NaicsSubcategory` type to represent Naics industry codes with a length of five digits.
1517

1618
### 🐛 Bug Fixes
1719

1820
- Explicit version numbers added to workspace members.
21+
- NaicsSubcategory variants and method values corrected in response to unit testing.
22+
- `NaicsCategory` variants and methods corrected in response to unit testing.
1923

2024
### 🚜 Refactor
2125

@@ -29,6 +33,10 @@ All notable changes to this project will be documented in this file.
2933
- ApiMetada moved to the key_sets module of the bears_species crate.
3034
- InputOutput key set moved to the key_sets module of the bears_ecology crate.
3135
- `IntlServSta`, `IntlServTrade` and `Regional` key sets moved to the key_sets module of the bears_species crate.
36+
- Naics.rs and naics_codes.csv removed.
37+
- Naics codes by classification added to the `cave` directory of `bears_health`.
38+
- NaicsItem moved to the `keys` module of `bears_species`.
39+
- Data module updated to use the new name for NaicsItems.
3240

3341
### 📚 Documentation
3442

@@ -38,13 +46,18 @@ All notable changes to this project will be documented in this file.
3846

3947
- Unused tests for json removed.
4048
- Tests added for `Component` and `AocSta` types validating enum variants against the BEA response.
49+
- Verification testings for Naics types added validating variant names, description and codes against the .csv files in the cave.
4150

4251
### ⚙️ Miscellaneous Tasks
4352

4453
- Version incremented to 0.1.7.
4554
- Patch update to the `clap` dependency.
4655
- Unused json and validate modules removed.
4756
- Patch update to the `tokio` dependency.
57+
- Increment version to 0.1.8.
58+
- Rust fmt changes.
59+
- Naics types added to mod and lib files.
60+
- Clippy corrected `manual implementation of ok` corrected to use the ok method.
4861

4962
## [0.1.6] - 2025-03-31
5063

@@ -122,32 +135,52 @@ All notable changes to this project will be documented in this file.
122135

123136
### 🚀 Features
124137

138+
- Methods `initial_load`, `initial_load_continued`, `retry_load` and `download_with_history` added to the `Dataset` type.
139+
- Method variants for `with_events` added to the Queue and History types to facilitate benchmarking.
140+
- GdpDatum type added to represent return values for the `Dataset::GDPbyIndustry` variant.
141+
- Download support added to GdpByIndustry via the GdpByIndustryIterator type.
125142
- 'Style' type added to facilitate progress bars drawn to the console.
126143
- Method `from_value` added to `Frequency` to provide a canonical means of interpreting BEA parameter values.
127144
- Added the `roman_numeral_quarter` function mapping Roman Numeral values in the `Quarter` field to the `jiff::civil::Date` type.
128145
- `GdpData` type added for the GDPbyIndustry dataset. Companion variant `Data::GdpData` added.
129146
- Progress bar added to `Queue` file loading.
130147
- Progress bars added to `History` load and download methods.
131148

149+
### 🐛 Bug Fixes
150+
151+
- Note variant added to the Addendum type.
152+
- The MneError type now recognizes multiple error codes returned in an array.
153+
- The size limiting check no longer prevents users from requesting files larger than the 100MB limit.
154+
- Logical bug patched in the impl for `Chunks` from `History`. The inner vector will now include the final `Chunk`.
155+
- Off-by-one logical error fixed for generating frequency parameters from a list.
156+
132157
### 🚜 Refactor
133158

159+
- The Error cap has been raised to 29, and the Call cap to 89, since size tracking is now enabled.
160+
- The History::contains method has been removed in favor of calling `contains_key` directly on the inner BTreeMap.
161+
- Streamlined error handling for JsonParseError variants.
134162
- Various console logs lowered from Info to Trace, now that the functions of interest are more stable.
135163
- `MneDiData` and `FixedAssetsData` added to the root namespace following the library convention.
136164

137165
### 📚 Documentation
138166

167+
- Method descriptions added to the `dataset` module.
168+
- Descriptions added for `History` methods.
139169
- Description added for the `roman_numeral_quarter` function.
140170
- Descriptions added to `Frequency` methods.
141171
- Module and function level descriptions added the `check` module.
142172
- Progress statistics updated in the root `README.md`.
143173

144174
### 🧪 Testing
145175

176+
- Coverage added for the `History` methods `initial_load`, `initial_load_continued`, `retry_load` and `download_with_history`.
177+
- Benchmarking added to the `with_event` family of methods for the Queue and Chunks types.
146178
- Additional troubleshooting tests added for loading GDPbyIndustry files.
147179
- Duplicate test removed.
148180

149181
### ⚙️ Miscellaneous Tasks
150182

183+
- Increment version to 0.1.3 in Cargo.toml.
151184
- Changelog updated for version 0.1.3.
152185
- Version incremented to 0.1.4 in Cargo.toml.
153186
- Changelog action added to justfile.
@@ -158,43 +191,6 @@ All notable changes to this project will be documented in this file.
158191
- Deletion of dead legacy code.
159192
- Changelog updated for version 0.1.4.
160193

161-
## [0.1.3] - 2025-03-03
162-
163-
### 🚀 Features
164-
165-
- Methods `initial_load`, `initial_load_continued`, `retry_load` and `download_with_history` added to the `Dataset` type.
166-
- Method variants for `with_events` added to the Queue and History types to facilitate benchmarking.
167-
- GdpDatum type added to represent return values for the `Dataset::GDPbyIndustry` variant.
168-
- Download support added to GdpByIndustry via the GdpByIndustryIterator type.
169-
170-
### 🐛 Bug Fixes
171-
172-
- Note variant added to the Addendum type.
173-
- The MneError type now recognizes multiple error codes returned in an array.
174-
- The size limiting check no longer prevents users from requesting files larger than the 100MB limit.
175-
- Logical bug patched in the impl for `Chunks` from `History`. The inner vector will now include the final `Chunk`.
176-
- Off-by-one logical error fixed for generating frequency parameters from a list.
177-
178-
### 🚜 Refactor
179-
180-
- The Error cap has been raised to 29, and the Call cap to 89, since size tracking is now enabled.
181-
- The History::contains method has been removed in favor of calling `contains_key` directly on the inner BTreeMap.
182-
- Streamlined error handling for JsonParseError variants.
183-
184-
### 📚 Documentation
185-
186-
- Method descriptions added to the `dataset` module.
187-
- Descriptions added for `History` methods.
188-
189-
### 🧪 Testing
190-
191-
- Coverage added for the `History` methods `initial_load`, `initial_load_continued`, `retry_load` and `download_with_history`.
192-
- Benchmarking added to the `with_event` family of methods for the Queue and Chunks types.
193-
194-
### ⚙️ Miscellaneous Tasks
195-
196-
- Increment version to 0.1.3 in Cargo.toml.
197-
198194
## [0.1.2] - 2025-02-23
199195

200196
### 🐛 Bug Fixes

Cargo.lock

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ resolver = "2"
33
members = ["bears_ecology", "bears_health", "bears", "bears_species"]
44

55
[workspace.package]
6-
version = "0.1.7"
6+
version = "0.1.8"
77
edition = "2024"
88
authors = ["Erik Rose <erik.w.rose@gmail.com>"]
99
description = "A Rust wrapper for the Bureau of Economic Analysis (BEA) REST API."
@@ -14,13 +14,13 @@ keywords = ["economics", "finance", "rest"]
1414
categories = ["asynchronous", "finance"]
1515

1616
[workspace.dependencies]
17-
bears_ecology = { version = "0.1.7", path = "./bears_ecology" }
18-
bears_health = { version = "0.1.7", path = "./bears_health" }
19-
bears = { version = "0.1.7", path = "./bears" }
20-
bears_species = { version = "0.1.7", path = "./bears_species" }
17+
bears_ecology = { version = "0.1.8", path = "./bears_ecology" }
18+
bears_health = { version = "0.1.8", path = "./bears_health" }
19+
bears = { version = "0.1.8", path = "./bears" }
20+
bears_species = { version = "0.1.8", path = "./bears_species" }
2121
assert-json-diff = "2.0.2"
2222
bytesize = { version = "2.0.1", features = ["serde"] }
23-
clap = { version = "4.5.35", features = ["derive"] }
23+
clap = { version = "4.5.36", features = ["derive"] }
2424
console = "0.15.11"
2525
convert_case = "0.8.0"
2626
csv = "1.3.1"
@@ -30,7 +30,7 @@ derive_more = { version = "2.0.1", features = ["full"] }
3030
derive_setters = "0.1.6"
3131
dotenvy = "0.15.7"
3232
indicatif = { version = "0.17.11", features = ["rayon", "tokio"] }
33-
jiff = { version = "0.2.5", features = ["serde"] }
33+
jiff = { version = "0.2.8", features = ["serde"] }
3434
nom = "8.0.0"
3535
rayon = "1.10.0"
3636
reqwest = { version = "0.12.15", features = ["json"] }

bears/src/command.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
use nom::character::complete::alphanumeric1;
21
use nom::IResult;
2+
use nom::character::complete::alphanumeric1;
33

44
/// Variants of the `Action` enum encapsulate the different actions a user can select, exposing the
55
/// different capabilities of the library.

bears_ecology/src/app.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::{bea_data, Options, ParameterKind};
1+
use crate::{Options, ParameterKind, bea_data};
22
use bears_species::{
33
BTreeKeyMissing, BeaErr, BeaResponse, Dataset, DeriveFromStr, IoError, JsonParseError,
44
JsonParseErrorKind, KeyMissing, Method, MillionsOptions, ParameterName, RateLimit,

bears_ecology/src/free.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use crate::{App, Options};
22
use bears_species::{BeaErr, EnvError, IoError, UrlParseError};
3-
use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt, Layer};
3+
use tracing_subscriber::{Layer, layer::SubscriberExt, util::SubscriberInitExt};
44

55
pub fn bea_data() -> Result<std::path::PathBuf, EnvError> {
66
let key = "BEA_DATA".to_string();

bears_ecology/src/history.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::{bea_data, App, Event, Mode, Queue, ResultStatus};
1+
use crate::{App, Event, Mode, Queue, ResultStatus, bea_data};
22
use bears_species::{BeaErr, Data, Dataset, IoError, SerdeJson};
33
use indicatif::{ParallelProgressIterator, ProgressIterator};
44
use rayon::prelude::{IntoParallelRefIterator, ParallelIterator};

bears_ecology/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ pub use history::{Chunk, Chunks, History};
1414
pub use progress::Style;
1515
pub use queue::{Mode, Queue};
1616
pub use request::{
17-
download_with_history, get_datasets, init_queue, initial_download, initial_load,
17+
Request, download_with_history, get_datasets, init_queue, initial_download, initial_load,
1818
parameter_values, parameters, retry_load, values, values_gdp, values_subset, values_ugdp,
19-
Request,
2019
};
2120
pub use tracker::{Event, SizeEvent, Tracker};

bears_ecology/src/queue.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::{file_size, App, Event, History, ResultStatus, SizeEvent, Tracker};
1+
use crate::{App, Event, History, ResultStatus, SizeEvent, Tracker, file_size};
22
use bears_species::{BeaErr, Data};
33
use indicatif::ProgressIterator;
44
use rayon::prelude::{IntoParallelRefIterator, IntoParallelRefMutIterator, ParallelIterator};

bears_ecology/src/request.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::{bea_data, init, App, History, Mode, Options, Queue};
1+
use crate::{App, History, Mode, Options, Queue, bea_data, init};
22
use bears_species::{
33
BeaErr, BeaResponse, Data, Dataset, DatasetMissing, FixedAssets, GdpByIndustry, IoError, Ita,
44
Method, Mne, NiUnderlyingDetail, Nipa, ParameterName, ReqwestError, Results, SerdeJson,

0 commit comments

Comments
 (0)