-
Notifications
You must be signed in to change notification settings - Fork 63
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
Introduce VarName
#1291
Introduce VarName
#1291
Conversation
It seems, like where I now wrote @add_var_name_method foo Generic.foo (a, s::VarName=var(a), b) to provide foo(a, s::Symbol, b) = Generic.foo(a, s, b)
foo(a, s::VarName=var(a), b) = foo(a, Symbol(s), b) With a similar interface for lists of variable names. That way, I could remove some more noise from the files. In the case of variable name lists, this approach could further help, if we later decide on adding more flexibility there. |
Codecov Report
@@ Coverage Diff @@
## master #1291 +/- ##
==========================================
+ Coverage 85.51% 85.77% +0.26%
==========================================
Files 102 102
Lines 27987 27855 -132
==========================================
- Hits 23932 23893 -39
+ Misses 4055 3962 -93
... and 4 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
The missing test coverage is unrelated to this issue. We could improve the coverage by factoring out parts of the code instead of having it copied all around. But, as said, this is unrelated. |
I like it. OscarCI is failing, though? Seems to be related to some Singular stuff? Meta question: do we really want/need that Regarding |
Yes, people are using |
@@ -1155,27 +1156,11 @@ function YoungTableau(part::Generic.Partition, fill::Vector{Int}=collect(1:part. | |||
Generic.YoungTableau(part, fill) | |||
end | |||
|
|||
function number_field(a::Generic.Poly{Rational{BigInt}}, s::AbstractString, t = "\$"; cached = true) | |||
function number_field(a::Generic.Poly{Rational{BigInt}}, s::VarName, t = "\$"; cached = true) |
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.
Stupid question, but: what is t
here? Is this another "symbol"?
The documentation says:
The string fields are currently ignored, but are reserved for future use.
But what's the point of that?! The arguments are completely unspecified, after all. Maybe they are matching something in Nemo or Hecke? But I don't see an argument t
in the OSCAR docstrings for these functions either?
(This is of course not a blocker for this PR, I just noticed it while reviewing the PR)
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 function will never be called in OSCAR/Nemo/Hecke :)
Co-authored-by: Max Horn <[email protected]>
The test failure seems unrelated. Here is a new issue for that #1293. |
As discussed in #1282 (comment), this introduces
Hopefully I found all places, where this should be used. In some places I use
VarNameNonSymbol
instead to prohibit infinite recursion.In a separate PR, we can care for different ways to provide lists of variable names. For now, they are changed to
AbstractVector{<:VarName}
.