|
1 | 1 | # Changelog |
2 | 2 |
|
3 | | -## [Unreleased] |
| 3 | +## [0.3.6] - 2026-03-26 |
4 | 4 |
|
5 | 5 | ### Added |
6 | 6 | - **Async API Support** — All modules now have async counterparts: `sgs.async_get()`, `sgs.async_get_json()`, `currency.async_get()`, `ODataQuery.async_text()`, `ODataQuery.async_collect()`, `Endpoint.async_get()` for concurrent data fetching with `asyncio.gather()` |
7 | 7 | - **Logging Infrastructure** — Debug-level logging for all HTTP requests/responses (URL, status, response length) and warning-level logging for connection retry attempts across currency, sgs, and odata modules |
8 | 8 | - **Comprehensive Test Coverage** — Added 36 new tests: 12 negative tests for currency API (404/429/500 errors, malformed CSV), 15 negative tests for SGS API (malformed JSON, invalid inputs), 9 async tests; total 103 unit tests with proper mock isolation |
9 | | -- **Example Scripts** — Added `examples/` directory with 4 comprehensive usage examples: SGS time series, currency exchange rates, OData queries with filters/sorting, and async API usage |
| 9 | +- **Example Scripts** — Added `examples/` directory with 4 comprehensive usage examples: SGS time series, currency exchange rates, OData queries with filters/sorting, and async API usage (all translated to Portuguese) |
| 10 | +- **Async Documentation** — New `docs/async.rst` with comprehensive guide to async APIs, examples with `asyncio.gather()`, performance comparisons, and semaphore patterns |
| 11 | +- **Portuguese Documentation** — Translated README.md and all example scripts to Portuguese (docstrings and comments) |
10 | 12 | - **Enhanced Documentation** — Added "Which Module to Use?" decision table and FAQ section to README covering module differences, data coverage, async usage, error handling, logging setup, caching, and long-running applications |
11 | 13 | - **Factory Functions** in tests/conftest.py — Parameterizable mock data generators: `make_currency_id_list_html()`, `make_currency_list_csv()`, `make_currency_rate_csv()`, `make_sgs_response()`, `make_odata_metadata_xml()`, `make_odata_query_response()` |
12 | 14 | - **Cache Clearing Fixtures** — Added automatic OData metadata cache clearing between tests to prevent pytest-httpx mock assertion errors |
| 15 | +- **Sidebar Navigation** — Configured Furo theme with global sidebar navigation appearing on all documentation pages |
13 | 16 |
|
14 | 17 | ### Changed |
15 | 18 | - **Exception Handling** — Updated `bcb/currency.py` `get()` function to wrap `_get_symbol()` calls in try-except, allowing skipping of missing currencies while maintaining fail-fast for internal errors (per Phase 2 architecture) |
|
19 | 22 | ### Fixed |
20 | 23 | - **Cache State Issues** — Resolved pytest-httpx unused mock assertions by implementing `clear_odata_cache` fixture that clears global `_METADATA_CACHE` between tests |
21 | 24 | - **Test Failures** — Fixed 2 failing tests (`test_clear_cache`, `test_get_symbol_unknown_currency_returns_none`) to work with Phase 2 architecture changes and Phase 3 cache refactor |
| 25 | +- **Example API Constraints** — Updated examples to respect API limits: `last=20` (not 30) for SGS; fixed OData filter syntax and `select()` variadic arguments |
22 | 26 |
|
23 | 27 | ## [0.3.5] - 2026-02-27 |
24 | 28 | - Added `output="text"` parameter to `sgs.get()`, `currency.get()`, `EndpointQuery.collect()`, and `Endpoint.get()` — returns raw API response text (JSON for SGS and OData, CSV for currency) instead of a DataFrame; multi-code/symbol calls return `dict[key, str]`; default behavior unchanged |
|
0 commit comments