Avoid [x;;] notation in formatted code
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
Research direction
Start by inspecting .dev/climaformat.jl and searching the repository for [x;;]-style one-by-one matrix literals. Replace affected cases with the suggested fill(x, 1, 1) form, then run the formatter and the tests that currently break to confirm the result remains a 1×1 matrix.
Written by the indexing model from the issue text.
Description
Issue
It appears that the following fails the julia-formatter .dev/climaformat.jl
x = 3.0
one_by_one_mat = [x;;]
Instead, julia formatter will convert this to
x = 3.0
one_by_one_mat = [x] # <- no longer a matrix!
Which breaks tests.
Temporary solution
As this seems to be a funk in the JuliaFormatter package rather than the wrapper, I'd advise replacing it with
x = 3.0
one_by_one_mat = fill(x,1,1)
- Dominant language
- Julia
- Stars
- 90
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from CliMA/CalibrateEmulateSample.jl
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
All issues in CliMA/CalibrateEmulateSample.jl
Similar issues
-
bug 🐞 distributed 🕸️
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
CliMA/Oceananigans.jl#6049 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
JuliaGPU/GPUArrays.jl#780 ·
-
Difficulty 2/5 Half a day Newbie friendliness 76/100
epiforecasts/EpiBranch.jl#304 ·