github nmcassa/letterboxdpy v6.6.1

3 hours ago

What's Changed

Bug Fixes & Core Improvements

  • Comma-Separated Number Parsing in Network Lists (@fastfingertips in 680b38f)

    • Fixed an issue in user_network.py where follower, following, watched, lists, and likes counts containing commas (e.g. "1,250") resulted in string truncation or parsing failures when converting to integers.
    • Ensured complete numeric extraction across high-volume accounts with thousands of followers or logged films.
  • Standardized Number Extraction & Fallback Robustness (@fastfingertips in 7b2a79d)

    • Standardized integer extraction and edge-case handling across page scrapers (user_films.py, user_list.py, user_network.py, user_tags.py) using extract_number_from_text.
    • Enhanced extract_and_convert_shorthand in utils_parser.py to support uppercase and lowercase suffixes (K/k, M/m), decimal values, and both BeautifulSoup Tag and raw string inputs.
    • Refactored get_movie_count_from_meta to robustly parse counts from list page meta descriptions with safe fallback defaults.

Testing & CI Modernization

  • Deterministic Unit Test Suite (@fastfingertips in fd8a440, 513dc2f)

    • Added 36 comprehensive, deterministic offline unit tests in tests/test_parsers_unit.py covering HTML extraction, shorthand numbers, ISO date parsing, URL normalization, and tag counting.
    • Added unit tests in tests/test_models_unit.py verifying MovieJSON dataclass serialization, optional field handling, and round-trip consistency.
  • Pytest Smoke Marker Separation (@fastfingertips in 5b31bde, 0a06473)

    • Categorized all live network integration tests (test_user, test_movie, test_list, test_scraper, test_search) under the @pytest.mark.smoke() marker.
    • Configured pyproject.toml with default addopts = "-m 'not smoke'" to execute the fast offline suite in ~0.5 seconds, eliminating flaky test runs and Letterboxd rate limiting in standard CI steps.
  • CI Workflows & Ruff Linter Compatibility (@fastfingertips in f362764, 4d94d1b, 22a0b69, 71b796b)

    • Updated daily DOM health check workflow to execute live smoke tests explicitly using --smoke via tests/run_tests.py.
    • Resolved Ruff linter compatibility across versions for S105 (hardcoded passwords false positive) and PT023 (marker parentheses) in pyproject.toml.
    • Cleaned up formatting and unused # noqa comments across core modules.
  • Commit Standards & Pre-commit Hook (@fastfingertips in 2ff69a4)

    • Configured a native Python commit-msg hook in .pre-commit-config.yaml enforcing a strict 62-character commit subject limit.
    • Documented commit title constraints and project contribution guidelines in CONTRIBUTING.md.

Example Tools & CLI Updates

  • Compare Watchlists (compare_watchlists.py v0.1.6) (@fastfingertips in 4a59094)

    • Enhanced report layout with updated styling, improved poster grid and table views, and optimized comparison filtering.
  • Network Balance Analyzer (network_balance.py v0.1.2) (@fastfingertips in f5f470c)

    • Optimized mutual follower calculations and added user avatar image rendering alongside usernames.
    • Improved summary badge hierarchy and table sorting.
  • Follow Stats Reporter (follow_stats.py v0.1.4) (@fastfingertips in 4082ccc)

    • Added avatar rendering, multi-column sorting, and responsive table layout in generated HTML follow statistics reports.

Commit Details

  • 140ac48 chore: bump version to 6.6.1 by @fastfingertips
  • 2ff69a4 ci: enforce 62 chars commit title limit via pre-commit by @fastfingertips
  • 22a0b69 ci: fix ruff format compatibility by @fastfingertips
  • 4d94d1b ci: resolve ruff version compatibility for s105 and pt023 by @fastfingertips
  • f362764 ci: run smoke tests in health check and update test runner script by @fastfingertips
  • 71b796b style: format code and remove unused noqa comments by @fastfingertips
  • 0a06473 test: mark live integration tests with smoke marker by @fastfingertips
  • 513dc2f test: add unit tests for MovieJSON data model by @fastfingertips
  • 5b31bde test: configure pytest smoke marker and mark test_user by @fastfingertips
  • fd8a440 test: add unit tests for parser utils by @fastfingertips
  • 4a59094 feat(examples): update compare watchlists (v0.1.6) by @fastfingertips
  • f5f470c feat(examples): optimize network balance and display avatars with names (v0.1.2) by @fastfingertips
  • 7b2a79d fix: standardize number extraction and handle edge cases across pages and utils by @fastfingertips
  • 680b38f fix(user_network): handle comma-separated numbers in network member counts by @fastfingertips
  • 4082ccc feat(examples): improve follow stats report with avatars and sorting (v0.1.4) by @fastfingertips

Full Changelog: v6.6.0...v6.6.1

Don't miss a new letterboxdpy release

NewReleases is sending notifications on new releases.