Repository navigation
Add Reservoir manifest fetcher to aggregator subpackage - #6
Merged
Merged
Conversation
- Pass a 60s timeout to urlopen so a stalled connection cannot hang the CLI. - Default --output to cache/manifest.json and gitignore cache/ so the 53 MB Reservoir file does not land at the repo root.
- Rename abbreviated locals (pkg/p/f) to package/output_file per the no-abbreviations naming rule. - Add tests for fetch_manifest (mocked urlopen) and save_manifest (round-trip to disk) under python/tests/.
Match the no-print convention used in reservoir.py: route the manifest summary and top-stars listing through a module logger so the CLI uses one output channel.
Move test_reservoir.py into tests/aggregator/ so the test tree mirrors lean_pool/aggregator/. Adds tests/aggregator/__init__.py.
The aggregator CLI now just fetches the manifest and writes it to disk; the summary stats and top-stars listing are gone. Replace argparse with click for option parsing and add click as a runtime dependency.
- Define ReservoirManifest TypedDict for fetch_manifest / save_manifest signatures instead of dict[str, Any]. - Echo "Saved N packages to <path>" once on success so users see what landed without the previous verbose summary.
Replace the loose ReservoirManifest with a full hierarchy that matches Reservoir's own type definitions in scripts/utils/ (package.py, manifest.py, toolchain.py): Package, PackageVersion, PackageSource, Build / BuildResult, Dependency / Dependent, Toolchain. The decoded manifest is now statically typed end to end instead of relying on dict[str, Any] for nested structures.
justincasher
force-pushed
the
justin/aggregator-draft
branch
from
May 9, 2026 18:29
e160511 to
e5eb7f6
Compare
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.
Adds
python/lean_pool/aggregator/with a stdlib-only draft that fetches the Reservoir manifest fromhttps://reservoir.lean-lang.org/index/manifest.json, saves it, and prints a summary plus the top 10 packages by stars. Run withuv run python -m lean_pool.aggregatorfrompython/. Filtering logic comes next. Related: #2