Updates and improved testing - #7
Open
cardano-apexpool wants to merge 4 commits into
Open
Conversation
Bug fixes: - Fix set instead of int bug in library.py exception handlers (line 70, 129) - Add KeyError handling in get_error_message() for missing JSON keys - Fix submit_tx to properly handle CBOR data with new koios_post_request_raw() - Add missing pagination to get_credential_txs() in address.py - Fix docstring parameter name mismatch in get_asset_txs() (block -> block_height) Improvements: - Add MAX_RETRIES (10) constant to prevent infinite retry loops - Add MaxRetriesExceeded exception for better error handling - Create paginated_get() and paginated_post() helper functions to reduce code duplication - Replace wildcard imports with explicit imports in all modules - Add specific type hints (list[dict[str, Any]] instead of list) - Add deprecation warnings to get_asset_address_list() and get_asset_policy_info() - Remove commented-out code in transactions.py - Add __all__ export list in __init__.py for cleaner API surface
- Add pytest-cov, pytest-mock, and responses to requirements.txt - Configure pytest with coverage reporting and test markers (unit/integration) - Create tests/conftest.py with shared fixtures and test data constants - Add unit tests for library.py with mocking (no network required) - Update all existing tests with @pytest.mark.integration markers - Refactor tests into class-based structure with better organization - Add parametrized tests for limit/pagination testing - Add negative test cases for empty inputs and edge cases - Add response validation tests checking expected fields - Update tox.ini with separate unit, integration, and coverage environments - Update CI workflow with Python 3.10-3.12 matrix and coverage reporting - Separate unit tests (fast, offline) from integration tests (network required)
- Remove parametrized tests for functions without limit params (get_pool_list, get_pool_relays) - Use specific epoch for get_totals() instead of fetching all epochs - Use logo=False for get_asset_token_registry to reduce response size - Consolidate duplicate test methods that made same API calls - Remove redundant parametrized epoch tests
- Remove unnecessary pass statement and else-after-return in library.py - Update test pool ID and expected values to match current blockchain state - Simplify parameterized tests to reduce API calls - Add pylint disable comments for small test classes - Remove unused imports across test files - Improve code formatting (multi-line lists, import grouping)
cardano-apexpool
force-pushed
the
updates
branch
from
February 21, 2026 09:04
57449ce to
425214e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Improve test quality and code formatting.
Optimize integration tests to reduce API calls and avoid rate limits.
Implement comprehensive testing improvements.
Fix bugs and implement code quality improvements.