Skip to content
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

Turn Groebner.jl into an extension #1035

Merged
merged 5 commits into from
Jan 6, 2024

Conversation

sumiya11
Copy link
Contributor

@sumiya11 sumiya11 commented Jan 6, 2024

Implements dispatch for calling groebner_basis/is_groebner_basis on Vector{Num}.

Also fixes some deprecation warnings.
Note that Groebner.jl v0.6.0+ is licensed under GNU GPL v2.

using Symbolics
@variables x1 x2 x3

groebner_basis([x1 + x2 + x3, x1*x2 + x1*x3 + x2*x3, x1*x2*x3 - 1])
# Throws
ERROR: "Groebner bases engine is required. Execute `using Groebner` to enable this functionality."

using Groebner
groebner_basis([x1 + x2 + x3, x1*x2 + x1*x3 + x2*x3, x1*x2*x3 - 1])
# Returns
3-element Vector{PolyForm{Real}}:
 x3 + x2 + x1
 (x3^2) + x2*x3 + (x2^2)
 -1 + (x3^3)

We can maybe wrap the resulting polynomials so that it returns Num..

src/Symbolics.jl Outdated Show resolved Hide resolved
test/runtests.jl Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Jan 6, 2024

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (5806b2b) 77.61% compared to head (add3319) 9.77%.

Files Patch % Lines
src/Symbolics.jl 0.00% 2 Missing ⚠️
src/groebner_basis.jl 60.00% 2 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #1035       +/-   ##
==========================================
- Coverage   77.61%   9.77%   -67.85%     
==========================================
  Files          29      30        +1     
  Lines        3422    3366       -56     
==========================================
- Hits         2656     329     -2327     
- Misses        766    3037     +2271     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

test/runtests.jl Outdated Show resolved Hide resolved
@ChrisRackauckas ChrisRackauckas merged commit 4b24d32 into JuliaSymbolics:master Jan 6, 2024
8 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants