Initial release implementation#17
Merged
Merged
Conversation
- Ship a PEP 561 py.typed marker so downstream users type-check against the package's annotations. - Add src/call_report/_dependencies.py: lazy-import / optional-dependency helpers (import_optional, _lazy_import, _LazyModule, ModuleUpgradeRequiredError) modeled on polars' _dependencies.py, so any dependency beyond narwhals stays optional. Covered by tests/test_dependencies.py. - Rework tests/test_version.py into a release tripwire: an EXPECTED_VERSION fixture that must be bumped in lockstep with __version__, plus PEP 440 format validation via packaging (added to the dev extra). - Update CLAUDE.md working-style guidance: precise type hints over Any, and dependency management (narwhals is the only hard runtime import; use the lazy helpers for everything else; ask before adding any dependency). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
| def test_constructor_is_keyword_only() -> None: | ||
| """FCACallReport takes no positional arguments.""" | ||
| with pytest.raises(TypeError): | ||
| FCACallReport("2024-03-31") # type: ignore[call-arg] |
| def test_build_frame_and_finalize_are_keyword_only() -> None: | ||
| """build_frame and finalize take no positional arguments.""" | ||
| with pytest.raises(TypeError): | ||
| build_frame({"UNINUM": [1]}) # type: ignore[call-arg] |
| """construct_fca_download_url takes no positional arguments.""" | ||
| period = ReportingPeriod.from_period_end(value="2026-03-31") | ||
| with pytest.raises(TypeError): | ||
| construct_fca_download_url(period) # type: ignore[call-arg] |
| def test_config_functions_are_keyword_only() -> None: | ||
| """set_config takes no positional arguments.""" | ||
| with pytest.raises(TypeError): | ||
| set_config("pandas") # type: ignore[call-arg] |
| def test_coerce_fca_call_report_schedule_is_keyword_only() -> None: | ||
| """coerce_fca_call_report_schedule takes no positional arguments.""" | ||
| with pytest.raises(TypeError): | ||
| coerce_fca_call_report_schedule("RCB") # type: ignore[call-arg] |
| def test_from_period_end_is_keyword_only() -> None: | ||
| """from_period_end takes no positional args.""" | ||
| with pytest.raises(TypeError): | ||
| ReportingPeriod.from_period_end("2026-03-31") # type: ignore[call-arg] |
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
| def test_period_range_is_keyword_only() -> None: | ||
| """PeriodRange takes no positional arguments.""" | ||
| with pytest.raises(TypeError): | ||
| PeriodRange("2025-03-31", "2026-03-31") # type: ignore[call-arg] |
| build_frame({"UNINUM": [1]}) # type: ignore[call-arg] | ||
| frame = build_frame(data={"UNINUM": [1]}) | ||
| with pytest.raises(TypeError): | ||
| finalize(frame) # type: ignore[call-arg] |
| rows=['6,10,0,3,2026,610000,"X","TX"'], | ||
| ) | ||
| with pytest.raises(TypeError): | ||
| read_institutions(tmp_path) # type: ignore[call-arg] |
| ) | ||
| layout = parse_layout(path=layout_path) | ||
| with pytest.raises(TypeError): | ||
| read_schedule_file(data_path, layout) # type: ignore[call-arg] |
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.
No description provided.