-
-
Notifications
You must be signed in to change notification settings - Fork 487
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
sage.{algebras,combinat,matroids}: Replace imports from sage.*.all for namespace packages #35090
Conversation
…Q/;s/ Z as ZZ/ ZZ/;'
…ce_imports_from_sage___all_for_namespace_packages SageMath version 9.8, Release Date: 2023-02-11
Codecov ReportBase: 88.60% // Head: 88.58% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## develop #35090 +/- ##
===========================================
- Coverage 88.60% 88.58% -0.02%
===========================================
Files 2140 2140
Lines 397273 397287 +14
===========================================
- Hits 352004 351950 -54
- Misses 45269 45337 +68
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
…__replace_imports_from_sage___all_for_namespace_packages SageMath version 10.0.beta0, Release Date: 2023-02-12
…__replace_imports_from_sage___all_for_namespace_packages
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.
Two basically trivially things if you want to do them:
- The imports
from sage.arith.misc import GCD as gcd
are somewhat unnecessary (like theQ as QQ
). - The
FiniteField as GF
in the matroids, similarly. I am wondering if we should just replace theGF
withFiniteField
.
…gebras_combinat_matroids___replace_imports_from_sage___all_for_namespace_packages
…s sed -i.bak 's/GCD as gcd/gcd/'
Thanks, indeed
I'll not do this one here; importing it as GF seems like a convenient abbreviation |
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.
Fair enough. LGTM.
Thank you! |
src/sage/matroids/linear_matroid.pyx
Outdated
from sage.rings.finite_rings.finite_field_constructor import FiniteField | ||
from sage.rings.finite_rings.finite_field_constructor import FiniteField as GF |
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.
These imports seem to be duplicates
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.
Yes, and the first one was not even used. I've cleaned it up now
…gebras_combinat_matroids___replace_imports_from_sage___all_for_namespace_packages
Documentation preview for this PR is ready! 🎉 |
…ages <!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes #1234" use "Introduce new method to calculate 1+1" --> ### 📚 Description Fixes #34201 <!-- Describe your changes here in detail --> <!-- Why is this change required? What problem does it solve? --> <!-- If it resolves an open issue, please link to the issue here. For example "Closes #1337" --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> - [x] I have made sure that the title is self-explanatory and the description concisely explains the PR. - [x] I have linked an issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open pull requests that this PR logically depends on --> <!-- - #xyz: short description why this is a dependency - #abc: ... --> - Depends on #35090 - Depends on #35098 - Depends on #35099 - Depends on #35105 - Depends on #35106 - Depends on #35107 URL: #35110 Reported by: Matthias Köppe Reviewer(s): Dima Pasechnik
📚 Description
Fixes #34946
📝 Checklist
⌛ Dependencies