-
-
Notifications
You must be signed in to change notification settings - Fork 10.6k
feat: add pypi_packages
formula DSL
#20864
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good so far!
Signed-off-by: botantony <[email protected]>
2c83756
to
22c41d3
Compare
pypi_packages
formula DSLpypi_packages
formula DSL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds a new pypi_packages DSL to formulas to declaratively specify PyPI package mapping (primary package name, extras, exclusions, dependencies, or manual-update flag) and refactors resource update logic to use a new typed helper class.
- Introduces PypiPackages helper class with typed accessors
- Adds Formula#pypi_packages DSL plus integration in update_python_resources!
- Updates AST constants and adds initial test coverage for PypiPackages.from_json_file
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
utils/pypi.rb | Refactors PyPI resource update logic to use PypiPackages instance instead of raw tap JSON |
pypi_packages.rb | Adds new typed helper class encapsulating PyPI mapping data |
formula.rb | Adds DSL method, attribute, and documentation for pypi_packages |
ast_constants.rb | Registers pypi_packages in allowable AST method calls |
test/pypi_packages_spec.rb | Adds tests for constructing PypiPackages from tap JSON |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
eedde5c
to
faa6630
Compare
Signed-off-by: botantony <[email protected]>
faa6630
to
7342141
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Converting this to draft to prevent merging. Sorry for noticing it too late, but for some reason
|
Signed-off-by: botantony <[email protected]>
Well, the problem was way more trivial than I thought. Need to pay more attention to what I'm doing next time 😅 |
brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?Draft PR that implements
pypi_packages
DSL support. Maybe creating a new class is an overkill, but I do not want to use simpleHash
for better typesTODO: add tests and documentationCloses #20832