Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR ensures the sample scripts are removed from built artifacts and that the remaining sample that is still used activates the PDK before creating components, by adding a Make target and wiring it into the release workflow. Sequence diagram for updated get_route_sc sample executionsequenceDiagram
actor User
participant Script_get_route_sc as get_route_sc.py
participant PDK
participant GDSFactory as gdsfactory
participant Cells as cells
User->>Script_get_route_sc: Execute script
Script_get_route_sc->>PDK: activate()
PDK-->>Script_get_route_sc: PDK activated
Script_get_route_sc->>GDSFactory: Component("sample_connect")
GDSFactory-->>Script_get_route_sc: Component c
Script_get_route_sc->>Cells: mmi1x2()
Cells-->>Script_get_route_sc: mmi1
Script_get_route_sc->>Cells: mmi1x2()
Cells-->>Script_get_route_sc: mmi2
Script_get_route_sc->>GDSFactory: route(mmi1, mmi2)
GDSFactory-->>Script_get_route_sc: route_sc
Script_get_route_sc->>GDSFactory: show(c)
GDSFactory-->>User: Rendered layout
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The
rm-samplesMakefile target is quite destructive if run locally (it doesrm -rfon multiple directories); consider scoping it to the release workflow only (e.g., via a more explicit target name or a guard variable) to reduce accidental use by developers. - Instead of hardcoding each samples path in the
rm-samplesrule, consider using a pattern or a single root directory (e.g.,find cspdk -type d -name samples -exec rm -rf {} +) to make it easier to maintain as new PDKs or sample directories are added.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The `rm-samples` Makefile target is quite destructive if run locally (it does `rm -rf` on multiple directories); consider scoping it to the release workflow only (e.g., via a more explicit target name or a guard variable) to reduce accidental use by developers.
- Instead of hardcoding each samples path in the `rm-samples` rule, consider using a pattern or a single root directory (e.g., `find cspdk -type d -name samples -exec rm -rf {} +`) to make it easier to maintain as new PDKs or sample directories are added.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
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.
Summary by Sourcery
Ensure sample files are excluded from release artifacts by removing sample directories during the release workflow.
Enhancements:
Build:
CI: