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
added documentation for categories #2028
Conversation
These haven't been exported, so users still need the fully qualified |
Codecov Report
@@ Coverage Diff @@
## master #2028 +/- ##
======================================
Coverage 91.5% 91.5%
======================================
Files 33 33
Lines 4215 4215
======================================
Hits 3857 3857
Misses 358 358
Continue to review full report at Codecov.
|
1 similar comment
Codecov Report
@@ Coverage Diff @@
## master #2028 +/- ##
======================================
Coverage 91.5% 91.5%
======================================
Files 33 33
Lines 4215 4215
======================================
Hits 3857 3857
Misses 358 358
Continue to review full report at Codecov.
|
|
||
Binary variable category, used in the `@variable` macro. | ||
""" | ||
Bin |
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.
I didn't know you could declare variables like this!
But, maybe we should make it a type? Because it still has this:
julia> JuMP.Bin
ERROR: UndefVarError: Bin not defined
We also don't really want to declare an Int
JuMP-local variable. It would get exported and might cause all sorts of issues.
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.
It's a bizarre trickery, it's documented, but not an identifier. You get it in REPL auto-completion, but raises UndefVar
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.
We can make them types indeed
I agree that the use of
All symbols without preceding underscores are exported from JuMP: I've thought about |
I would say symbols are less confusing, they can experiment with them in the REPL, get The fact that Int is among the categories is even more confusing in the current state, because users might think the last argument passed is a type |
|
So what should do here? |
The problem with |
This may be personal but I find it less of a problem than |
bump here? |
I think we're going to punt on this until we come up with a better solution. Exporting a symbol for |
Closing until we come up with a better solution in the future. |
JuMP
@variable
can be odd for newcomers because there seems to be bindings that don't exist:This allows having a short docstring for these categories