• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rero / rero-ils / 26760651405
91%

Build:
DEFAULT BRANCH: staging
Ran 02 Jun 2026 12:14PM UTC
Jobs 1
Files 610
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

01 Jun 2026 02:18PM UTC coverage: 91.333% (+0.02%) from 91.312%
26760651405

push

github

PascalRepond
feat(patrons): add task for automatic deletion of inactive patrons

Add a monthly Celery task that deletes inactive patron profiles per
organisation based on configurable criteria: expiration date, last login
date, patron type exclusion list.

- Add patron_cleanup config to organisation schema and ES mapping
- Register task in CELERY_BEAT_SCHEDULE
- Add ptrn to operation log record type enum
- Fix circular import: move current_librarian to local import in
  operation_logs/extensions.py
- Skip operation log creation when the record has no pid (e.g. hard
  delete of a soft-deleted record whose data dict has been cleared)
- Use timezone-aware datetimes in the cleanup task to compare safely
  with user.current_login_at (UTC-aware from PostgreSQL)
- Update test_stats_librarian and test_stats_pricing mocks to target
  rero_ils.modules.patrons.api.current_librarian after the import move
- Refactor test_unpaid_subscription: replace setdefault (which left
  the limit at its fixture value of False) with direct assignment,
  wrap the test in try/finally to restore the module-scoped
  patron_type, fix the response check to assert res.status_code, and
  document a re-login workaround for the babel-triggered _load_user
- Add tests for task_delete_inactive_patrons covering each deletion
  criterion (expiration, inactivity, blocked, excluded type, active
  loans/transactions/ILL requests, never-logged-in user, dry-run,
  end-to-end)
- Add test for ill_requests in Patron.get_links_to_me
- Also adds Claude behavioural guidelines for implementation.

Closes US#2802

Co-Authored-by: Pascal Repond <pascal.repond@rero.ch>

49 of 51 new or added lines in 2 files covered. (96.08%)

9 existing lines in 1 file now uncovered.

24133 of 26423 relevant lines covered (91.33%)

0.91 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
96.2
-0.94% rero_ils/modules/patrons/tasks.py

Coverage Regressions

Lines Coverage ∆ File
9
97.96
0.72% rero_ils/modules/patrons/api.py
Jobs
ID Job ID Ran Files Coverage
1 26760651405.1 02 Jun 2026 12:14PM UTC 610
91.33
GitHub Action Run
Source Files on build 26760651405
  • Tree
  • List 610
  • Changed 4
  • Source Changed 4
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26760651405
  • 2711e028 on github
  • Prev Build on staging (#26567620794)
  • Next Build on staging (#26821541889)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc