Should we set -J and -B defaults in modern mode (after `gmtbegin`)?
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- julia
调研方向
从 src/common_options.jl 和 src/psbasemap.jl 开始,以 gmtbegin()、gmtend() 和 basemap() 的示例及堆栈跟踪作为切入点。跟踪 classic 模式相对于 modern 模式如何提供隐式的 -J 和 -B 值,然后验证 modern 模式在各函数中收到等效的默认值,同时显式的投影和框架选项仍会覆盖这些默认值。
由索引模型根据 Issue 内容生成。
描述
Currently, when using modern mode the defaults for projection (-J) and frame (-B) are not set, for example:
julia> basemap(region = :g, show = true) # Works because it sets implicit defaults for -J and -B
julia> gmtbegin()
julia> basemap(region = :g)
basemap [ERROR]: Must specify at least one of -A, -B, -D, -L, -T
ERROR: Something went wrong when calling the module. GMT error number = 71
Stacktrace:
[1] gmt(cmd::String, args::Nothing)
@ GMT ~/.julia/packages/GMT/lcweZ/src/gmt_main.jl:283
[2] finish_PS_module(d::Dict{Symbol, Any}, cmd::Vector{String}, opt_extra::String, K::Bool, O::Bool, finish::Bool, args::Nothing)
@ GMT ~/.julia/packages/GMT/lcweZ/src/common_options.jl:3399
[3] basemap(cmd0::String, arg1::Nothing; first::Bool, kwargs::Base.Iterators.Pairs{Symbol, Symbol, Tuple{Symbol}, NamedTuple{(:region,), Tuple{Symbol}}})
@ GMT ~/.julia/packages/GMT/lcweZ/src/psbasemap.jl:67
[4] top-level scope
@ REPL[43]:1
julia> gmtend()
julia> basemap(region = :g, Vd = 2)
"psbasemap -Rg -JX14c/0 -Baf -BWSen -P -K > /tmp/GMTjl_tmp.ps"
julia> gmtbegin()
julia> basemap(region = :g, Vd = 2)
"basemap -Rg"
julia> gmtend()
It happens with the other functions as well of course (not just basemap). I think the defaults that are set in classic mode are quite nice, so maybe it wouldn't hurt to use them in modern mode as well? I'm not sure anything is lost by doing this: if the user wants a different projection/frame, they can still override the defaults. Also, the behaviour becomes more consistent with classic mode.
I can have a go at a patch (probably not before the weekend) if you're short on time. Just thought I'd raise the point.
Cheers
- 主要语言
- Julia
- 星标
- 223
- 派生
- 35
- 平均合并
- 8 小时 1 分钟
- 30 天内合并 PR
- 9
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
GenericMappingTools/GMT.jl 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 35/100
GenericMappingTools/GMT.jl#2071 · 1 条评论 ·
-
难度 1/5 1 小时以内 新手友好度 5/100
GenericMappingTools/GMT.jl#2066 · 3 条评论 ·
-
难度 4/5 3-5 天 新手友好度 55/100
GenericMappingTools/GMT.jl#2030 · 14 条评论 ·
-
难度 3/5 1-2 天 新手友好度 55/100
GenericMappingTools/GMT.jl#2023 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 48/100
GenericMappingTools/GMT.jl#1893 · 11 条评论 ·
查看 GenericMappingTools/GMT.jl 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 66/100
-
Bump ODEInterface_jll to rebuilt 0.0.2+2 (execstack fix) in 8 benchmark folder Manifests可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 64/100
SciML/SciMLBenchmarks.jl#2044 · 2 条评论 ·
维护者通常 2 天内回复
-
难度 1/5 1 小时以内 新手友好度 84/100
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 65/100
oscar-system/Oscar.jl#6572 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
JuliaLang/LinearAlgebra.jl#2002 · 2 条评论 ·
维护者通常 1 天内回复