aws-cqc / aws-cqc/DeviceLayout.jl

Explicitly reject or ignore invalid render! -> place! keywords

Open
#275 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Julia
Stars
67
Forks
14
Avg merge
1d 16h
Merged PRs (30d)
21

Description

Brought up in #268, related to #7 --- `render!` forwards keyword arguments to `place!`, which doesn't take keyword arguments. This throws an error like `MethodError: place!(::CoordinateSystem, ::CurvilinearRegion, ::SemanticMeta) got unsupported keyword argument "atol"`. We need to decide whether or not this is the correct behavior. If it is, we should throw a clearer error in that `render!` method.

The main alternative is just to drop the keyword arguments and continue, either silently or with a warning. One could imagine an `AbstractCoordinateSystem`-subtype-agnostic function that calls `render!` and uses keywords for the `Cell` case but not otherwise, like `round_layer!`, but it's hard to back out a case where the user is actually calling such a function on an unknown mix of CoordinateSystems and Cells. So I lean towards throwing an error.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the render! method that forwards keyword arguments to place!, then compare the behavior for CoordinateSystems and Cells with the round_layer! use case described here. Decide whether invalid keywords should be rejected or ignored, and consider the issue complete when the chosen behavior is explicit and covered by a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.