Skip to content

Fix missing array dimensions in QUBin sparse constructor calls#58

Open
Copilot wants to merge 3 commits intomainfrom
copilot/fix-sparse-constructor-dimensions
Open

Fix missing array dimensions in QUBin sparse constructor calls#58
Copilot wants to merge 3 commits intomainfrom
copilot/fix-sparse-constructor-dimensions

Conversation

Copy link

Copilot AI commented Dec 3, 2025

  • Understand the issue: sparse(I, J, V) call at line 47 in src/library/format/qubin/parser.jl is missing the array dimensions m, n, and similarly sparsevec(li, lv) at line 41 is missing the dimension n
  • Verify existing tests pass
  • Fix the issue by adding dimension n to both sparsevec and sparse calls in the parser
  • Add a test case that specifically validates the fix (model with 3 variables where variable 3 has no linear/quadratic terms)
  • Run tests to verify the fix works correctly (610 tests pass)
  • Run code review (no issues found)
  • Run CodeQL security check (no issues - Julia not analyzed)
  • Add julia-actions/cache to CI workflow to speed up builds
Original prompt

This section details on the original issue you should resolve

<issue_title>Array dimensions missing in sparse(I, J, V, [m, n]) constructor</issue_title>
<issue_description>https://github.com/JuliaQUBO/QUBOTools.jl/blob/46493c498b70e94f2fa49daf0e38a278fea33d09/src/library/format/qubin/parser.jl#L47C1-L47C48</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI self-assigned this Dec 3, 2025
Co-authored-by: bernalde <8647329+bernalde@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix array dimensions in sparse constructor Fix missing array dimensions in QUBin sparse constructor calls Dec 3, 2025
Copilot AI requested a review from bernalde December 3, 2025 20:13
@bernalde bernalde marked this pull request as ready for review December 4, 2025 01:02
@bernalde
Copy link
Collaborator

bernalde commented Dec 4, 2025

@copilot Address this:
[julia-buildpkg] Caching of the julia depot was not detected
Consider using julia-actions/cache to speed up runs https://github.com/julia-actions/cache To ignore, set input ignore-no-cache: true

Co-authored-by: bernalde <8647329+bernalde@users.noreply.github.com>
Copy link
Author

Copilot AI commented Dec 4, 2025

@copilot Address this:
[julia-buildpkg] Caching of the julia depot was not detected
Consider using `ju...

Added julia-actions/cache@v2 to the CI workflow in commit 831547f. This will cache the Julia depot to speed up subsequent workflow runs.

Copilot AI requested a review from bernalde December 4, 2025 01:07
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.

Array dimensions missing in sparse(I, J, V, [m, n]) constructor

2 participants