-
-
Notifications
You must be signed in to change notification settings - Fork 35
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
format with JuliaFormatter attempt 87 br #383
Conversation
mathengine = MathJax3( | ||
Dict( | ||
:loader => Dict("load" => ["[tex]/require", "[tex]/mathtools"]), | ||
:tex => Dict( | ||
"inlineMath" => [["\$", "\$"], ["\\(", "\\)"]], | ||
"packages" => [ | ||
"base", | ||
"ams", | ||
"autoload", | ||
"mathtools", | ||
"require", | ||
], | ||
), | ||
)) | ||
|
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.
expanding to more lines than needed
clean = true, | ||
doctest = false, | ||
linkcheck = true, | ||
warnonly = [:missing_docs], |
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.
same
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.
makedocs(
sitename = "JumpProcesses.jl",
authors = "Chris Rackauckas",
modules = [JumpProcesses],
clean = true, doctest = false, linkcheck = true, warnonly = [:missing_docs],
format = Documenter.HTML(;
assets = ["assets/favicon.ico"],
canonical = "https://docs.sciml.ai/JumpProcesses/",
prettyurls = (get(ENV, "CI", nothing) == "true"),
mathengine,
),
pages = pages,
)
in the most recent commit
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.
the unnesting could still be a little better though
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.
That is looking better! I think if you can get it to not add the initial and final new lines so both parentheses are kept as originally placed it would be good.
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.
mathengine = MathJax3(
Dict(:loader => Dict("load" => ["[tex]/require", "[tex]/mathtools"]),
:tex => Dict("inlineMath" => [["\$", "\$"], ["\\(", "\\)"]],
"packages" => [
"base",
"ams",
"autoload",
"mathtools",
"require",
])))
makedocs(sitename = "JumpProcesses.jl",
authors = "Chris Rackauckas",
modules = [JumpProcesses],
clean = true, doctest = false, linkcheck = true, warnonly = [:missing_docs],
format = Documenter.HTML(; assets = ["assets/favicon.ico"],
canonical = "https://docs.sciml.ai/JumpProcesses/",
prettyurls = (get(ENV, "CI", nothing) == "true"),
mathengine),
pages = pages)
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.
mathengine = MathJax3(Dict(:loader => Dict("load" => ["[tex]/require", "[tex]/mathtools"]), could still be 1 line so might be the calc is slightly off but it's much better now regardless
function reset_aggregated_jumps!(integrator, uprev = nothing; | ||
update_jump_params = true, | ||
kwargs...) |
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.
same
function reset_aggregated_jumps!(integrator, uprev, cb::DiscreteCallback, | ||
cbs...; | ||
update_jump_params = true, kwargs...) |
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.
same
const JUMP_AGGREGATORS = (Direct(), DirectFW(), DirectCR(), SortingDirect(), RSSA(), | ||
FRM(), | ||
FRMFW(), NRM(), RSSACR(), RDirect(), Coevolve()) |
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.
same
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.
so with a lot of these it's because it's fighting with join_lines_based_on_source=true
on this line in particular
const JUMP_AGGREGATORS = (Direct(), DirectFW(), DirectCR(), SortingDirect(), RSSA(), FRM(), FRMFW(), NRM(), RSSACR(), RDirect(), Coevolve())
would be output with =false
in the original source FRM() has a newline after it which is why it's kept. So I have to make the algo aware of that.
But I'd be curious to see what the format would be like in you do join_lines_based_on_source=false at least for the initial format and then once you get a split you're ok with turn it back on or something
function cat_problems( | ||
prob::DiffEqBase.AbstractSDEProblem, | ||
prob_control::DiffEqBase.AbstractSDEProblem, | ||
) |
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.
This seems to be putting the )
on a new line and leaving it unindented when the discussion in that long issue was that it should just stay at the end of the last argument and sub-lines of the function signature should be double indented always.
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.
solved in most recent commit
Pull Request Test Coverage Report for Build 7261713574
💛 - Coveralls |
@isaacsas i think most of the issues are solved now - aside from some off by one by 1 errors |
Ok, cool thanks for letting me know. If I have a chance I’ll try to check it out tomorrow morning before I head on holiday for a while and give you an update. |
@domluna I tested your pr domluna/JuliaFormatter.jl#792
There still seem to be some issues with moving args that fit on one line across many lines, and with sub-lines of function signatures not getting indented. I'll tag them below.