build(deps): migrate to hatchling, enforce strict typing, and optimize config#72
Merged
JacksonFergusonDev merged 6 commits intomainfrom Feb 17, 2026
Merged
build(deps): migrate to hatchling, enforce strict typing, and optimize config#72JacksonFergusonDev merged 6 commits intomainfrom
JacksonFergusonDev merged 6 commits intomainfrom
Conversation
Migrates build backend to hatchling, enables strict mypy configuration (with overrides for app/tests), and adds stricter ruff rules (T20, PT, C4). Adds tests/__init__.py to fix namespace package issues.
Updates codebase to pass strict mypy checks. Fixes implicit string casting in preset generation and parser tests, and ensures type safety in core library modules.
Resolves Ruff C414 and C401 errors by removing unnecessary list() calls within sorted() and converting generator expressions to set comprehensions.
Updates deployment dependencies to match the latest lockfile versions. Generated via uv export to ensure Streamlit environment matches local dev environment.
Configures git to treat PDFs and lockfiles as binary to prevent textual diff corruption. Enforces LF line endings for text files to ensure cross-platform consistency.
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.
Summary
This PR overhauls the build system and developer tooling to improve reliability and code quality. It migrates the build backend to Hatchling, enforces strict Mypy type checking, and prevents repository bloat via
.gitattributes.Key Changes
🛠 Build & Configuration
.gitattributesto treat PDFs (*.pdf) anduv.lockas binary files, preventing corrupted text diffs and merge conflicts.requirements.txtwithuv.lockto ensure Streamlit Cloud deployments match the local dev environment.🛡 Code Quality & Linting
check_untyped_defs = trueglobally.tests/*andapp.py(UI layer).tests/__init__.pyto resolve namespace package discovery issues.T20(No print statements in core lib).PT(Pytest style best practices).C4(List/Set comprehension optimizations).🧹 Refactoring
src/bom_libandsrc/exporters.pyto fix type narrowing errors found by the new Mypy rules.app.pyandpresets.pyto remove redundantlist()calls insidesorted()(Ruff C414/C401).tools/scripts from the "no print" rule to allow CLI output.Testing
uv run mypy .now passes with zero errors.uv run ruff check .passes with zero errors.tests/suite passes successfully.