Skip to content

feat(reports): add author-shares-control report command#85

Open
torbjokv wants to merge 1 commit into
mainfrom
add-author-shares-control-report
Open

feat(reports): add author-shares-control report command#85
torbjokv wants to merge 1 commit into
mainfrom
add-author-shares-control-report

Conversation

@torbjokv

Copy link
Copy Markdown
Contributor

Adds a new author-shares-control report command alongside the existing author-shares report.

  • Add author-shares-control CLI command that fetches the control variant of the all-institutions report
  • Add get_all_institutions_report_control using the author-shares-control Accept profile header
  • Extract shared _fetch_institutions_report (polling logic) and _run_report (CLI handling) to avoid duplication between the two report commands
  • Add tests for the scientific index API (Accept header routing, polling, error propagation) and the reports CLI (command routing, filename generation, --output override)

- add author-shares-control CLI command reusing shared _run_report helper
- add get_all_institutions_report_control with control Accept header
- extract _fetch_institutions_report to share polling logic
- add tests for scientific index api and reports CLI
@torbjokv
torbjokv requested review from LarsV123 and brinxmat June 15, 2026 13:10
Comment thread commands/reports.py
year: int,
output: str | None,
report_name: str,
fetch,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should have type annotation. I'm guessing something like this:

from collections.abc import Callable

fetch: Callable[[ApiClient, int], bytes]

@LarsV123 LarsV123 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks fine, but what is this report and why do we need it here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants