Skip to content

Conversation

mkoeppe
Copy link
Contributor

@mkoeppe mkoeppe commented Feb 13, 2023

📚 Description

Fixes #34890

Authors: @mkoeppe, @mantepse

📝 Checklist

  • I have made sure that the title is self-explanatory and the description concisely explains the PR.
  • I have linked an issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation accordingly.

⌛ Dependencies

@codecov-commenter
Copy link

codecov-commenter commented Feb 13, 2023

Codecov Report

Base: 88.58% // Head: 88.58% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (fd00880) compared to base (293dd72).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #35103   +/-   ##
========================================
  Coverage    88.58%   88.58%           
========================================
  Files         2140     2140           
  Lines       396961   396961           
========================================
+ Hits        351655   351665   +10     
+ Misses       45306    45296   -10     
Impacted Files Coverage Δ
src/sage/quadratic_forms/random_quadraticform.py 90.00% <0.00%> (-6.00%) ⬇️
src/sage/interfaces/qsieve.py 71.30% <0.00%> (-2.61%) ⬇️
src/sage/cpython/_py2_random.py 74.79% <0.00%> (-1.24%) ⬇️
src/sage/graphs/generators/random.py 91.26% <0.00%> (-1.03%) ⬇️
src/sage/modular/modform/numerical.py 94.19% <0.00%> (-0.65%) ⬇️
src/sage/quadratic_forms/ternary_qf.py 66.73% <0.00%> (-0.59%) ⬇️
src/sage/sets/integer_range.py 91.41% <0.00%> (-0.51%) ⬇️
src/sage/graphs/generic_graph.py 89.12% <0.00%> (-0.40%) ⬇️
src/sage/schemes/elliptic_curves/cardinality.py 87.00% <0.00%> (-0.40%) ⬇️
src/sage/modular/arithgroup/arithgroup_perm.py 92.57% <0.00%> (-0.38%) ⬇️
... and 18 more

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.
📢 Do you have feedback about the report comment? Let us know in this issue.

Comment on lines +852 to +848
if self.constraints is None:
return self.model.getNConss()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a doctest showing this code path?

1
sage: p.add_linear_constraint([(0, 2), (1, 3)], None, 6)
sage: p.add_linear_constraint([(0, 3), (1, 2)], None, 6)
sage: p.remove_constraints([0, 1])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you extend this doctest to show the constraints have been removed?

It would also be good to have another doctest showing particular constraints (or just one) have been removed and the remaining are properly set.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, I'll add these tests

@tscrim
Copy link
Collaborator

tscrim commented Aug 24, 2023

Ready for another review?

@mantepse
Copy link
Contributor

What is the status of this PR?

Copy link

Documentation preview for this PR (built with commit cc55c9e; changes) is ready! 🎉

@mantepse
Copy link
Contributor

Since, apparently, only very few people are using scip, I'll set this to positive review even though I have added some doctests myself.

Copy link
Contributor

@mantepse mantepse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you!

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Feb 19, 2024

Positive review for your changes from my side. Thank you!

@vbraun vbraun merged commit be3a116 into sagemath:develop Feb 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SCIPBackend: Faster copy, remove_constraint methods
5 participants