-
-
Notifications
You must be signed in to change notification settings - Fork 393
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
Improved Raw Expression NLP API #2672
Conversation
Note that the additions have been formatted via Moreover, the doc test fails since a forked repo doesn't have writing permissions. |
Codecov Report
@@ Coverage Diff @@
## master #2672 +/- ##
==========================================
+ Coverage 93.51% 93.54% +0.03%
==========================================
Files 44 44
Lines 5551 5578 +27
==========================================
+ Hits 5191 5218 +27
Misses 360 360
Continue to review full report at Codecov.
|
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.
Not sure what happened to the formatter? Doc failure isn't your fault.
Ya this appears to be affecting the master branch and the other pending pull requests as well. |
The latest formatting run on |
Can you run the formatter locally and see what happens? |
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.
LGTM, contingent on the formatting failure.
Docs pass but fail to deploy due to the bug in documenter.
This also closes #2506? |
I believe it does!
It reproduces locally as well. After trying each source, I deduced the problem lies with checking julia> format("./src/lp_sensitivity.jl")
ERROR: Parsing error for input occurred on line 419, offset: 79
Stacktrace:
[1] error(s::String)
@ Base .\error.jl:33
[2] format_text(text::String, style::DefaultStyle, opts::JuliaFormatter.Options)
@ JuliaFormatter C:\Users\pulsipher\.julia\packages\JuliaFormatter\FlpTt\src\JuliaFormatter.jl:322
[3] #format_text#161
@ C:\Users\pulsipher\.julia\packages\JuliaFormatter\FlpTt\src\JuliaFormatter.jl:316 [inlined]
[4] #format_text#160
@ C:\Users\pulsipher\.julia\packages\JuliaFormatter\FlpTt\src\JuliaFormatter.jl:310 [inlined]
[5] format_file(filename::String; overwrite::Bool, verbose::Bool, format_markdown::Bool, format_options::Base.Iterators.Pairs{Symbol, Integer, NTuple{5, Symbol}, NamedTuple{(:short_to_long_function_def, :remove_extra_newlines, :margin, :always_for_in, :always_use_return), Tuple{Bool, Bool, Int64, Bool, Bool}}})
@ JuliaFormatter C:\Users\pulsipher\.julia\packages\JuliaFormatter\FlpTt\src\JuliaFormatter.jl:421
[6] format(paths::Tuple{String}; options::Base.Iterators.Pairs{Union{}, Union{}, Tuple{},
NamedTuple{(), Tuple{}}})
@ JuliaFormatter C:\Users\pulsipher\.julia\packages\JuliaFormatter\FlpTt\src\JuliaFormatter.jl:528
[7] format
@ C:\Users\pulsipher\.julia\packages\JuliaFormatter\FlpTt\src\JuliaFormatter.jl:504 [inlined]
[8] #format#170
@ C:\Users\pulsipher\.julia\packages\JuliaFormatter\FlpTt\src\JuliaFormatter.jl:553 [inlined]
[9] format(path::String)
@ JuliaFormatter C:\Users\pulsipher\.julia\packages\JuliaFormatter\FlpTt\src\JuliaFormatter.jl:553
[10] top-level scope
@ REPL[7]:1 Moreover, I don't see anything wrong with that line of code: https://github.com/pulsipher/JuMP.jl/blob/afcc8bd0f46a3fce28508e316a6d4a037b1ad5a0/src/lp_sensitivity.jl#L419 |
I can't reproduce this on Mac (@v1.6) pkg> st JuliaFormatter
Status `~/.julia/environments/v1.6/Project.toml`
[98e50ef6] JuliaFormatter v0.13.2
julia> using JuliaFormatter
julia> format("src/lp_sensitivity.jl")
true
julia> format("src"; verbose = true)
Formatting src/JuMP.jl
Formatting src/aff_expr.jl
Formatting src/callbacks.jl
Formatting src/complement.jl
Formatting src/constraints.jl
Formatting src/copy.jl
Formatting src/feasibility_checker.jl
Formatting src/file_formats.jl
Formatting src/indicator.jl
Formatting src/lp_sensitivity.jl
Formatting src/lp_sensitivity2.jl
Formatting src/macros.jl
Formatting src/mutable_arithmetics.jl
Formatting src/nlp.jl
Formatting src/objective.jl
Formatting src/operators.jl
Formatting src/optimizer_interface.jl
Formatting src/parse_nlp.jl
Formatting src/precompile.jl
Formatting src/print.jl
Formatting src/quad_expr.jl
Formatting src/sd.jl
Formatting src/sets.jl
Formatting src/shapes.jl
Formatting src/utils.jl
Formatting src/variables.jl
Formatting src/Containers/Containers.jl
Formatting src/Containers/DenseAxisArray.jl
Formatting src/Containers/SparseAxisArray.jl
Formatting src/Containers/container.jl
Formatting src/Containers/generate_container.jl
Formatting src/Containers/macro.jl
Formatting src/Containers/nested_iterator.jl
Formatting src/Containers/no_duplicate_dict.jl
Formatting src/Containers/vectorized_product_iterator.jl
Formatting src/_Derivatives/_Derivatives.jl
Formatting src/_Derivatives/coloring.jl
Formatting src/_Derivatives/conversion.jl
Formatting src/_Derivatives/forward.jl
Formatting src/_Derivatives/linearity.jl
Formatting src/_Derivatives/reverse.jl
Formatting src/_Derivatives/sparsity.jl
Formatting src/_Derivatives/subexpressions.jl
Formatting src/_Derivatives/topological_sort.jl
Formatting src/_Derivatives/types.jl
true |
I'm going to merge this since I've tested locally. If it passes on |
Hmm, this seems to propagate to |
I can reproduce this on linux. I'll take a look |
This closes #2671. This adds
add_NL_expression
which serves as an alternative to@NLexpression
in like manner to howset_NL_objective
andadd_NL_constraint
serve as alternatives to their macro counterparts. This also adds the capability for these to acceptGenericAffExpr
s andGenericQuadExpr
s.Edit (odow):
Closes #2506
Closes #2671