"""Journal-quality scoring system.

This package owns the academic reference data used by the journal
reputation filter and the journal-quality dashboard. It contains:

- `data_sources/`: registry of upstream sources (OpenAlex, DOAJ, JabRef,
  Stop Predatory Journals, OpenAlex Institutions). Each source declares
  its metadata and implements `fetch()`. The registry is the single
  declarative source of truth for the bulk download flow.
- `downloader.py`: orchestrates the bulk download into the user data
  directory and triggers the SQLite reference DB rebuild on completion.
- `db.py`: read-only SQLAlchemy accessor over the compiled
  `journal_quality.db`, plus the `build_db()` function that compiles it
  from the freshly-downloaded gzipped JSON snapshots.
- `models.py`: SQLAlchemy declarative models for the compiled DB.
- `scoring.py`: pure-function quality scoring helpers shared by the
  build phase and the runtime filter.

The runtime DB is opened with SQLite URI flags `mode=ro&immutable=1`
and the file is `chmod 0o444` after every build. The only writer is
`build_db()` itself.
"""
