Skip to content

Remove Python packaging, integrate as DNLP submodule#37

Merged
dance858 merged 8 commits intomainfrom
cleanup-python
Jan 30, 2026
Merged

Remove Python packaging, integrate as DNLP submodule#37
dance858 merged 8 commits intomainfrom
cleanup-python

Conversation

@Transurgeon
Copy link
Collaborator

Summary

  • Remove pyproject.toml - Python packaging now handled by CVXPY build system
  • Remove src/dnlp_diff_engine/ Python wrapper - no longer needed
  • Add Apache 2.0 LICENSE file
  • Rename Python module from _core to _diffengine for CVXPY integration
  • Update CLAUDE.md to reflect pure C library setup
  • Add diag_vec atom implementation

Context

This prepares diff-engine to be used as a git submodule in CVXPY. The C extension is now
built directly by CVXPY's setup.py, eliminating the need for separate Python packaging.

Test plan

  • cmake -B build && cmake --build build && ./build/all_tests passes
  • CVXPY builds with pip install -e .
  • All 317 NLP tests pass in DNLP

Transurgeon and others added 8 commits January 23, 2026 23:18
- Remove pyproject.toml (Python packaging now handled by CVXPY)
- Remove src/dnlp_diff_engine/ Python wrapper (no longer needed)
- Add Apache 2.0 LICENSE file

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Update module name to _diffengine for integration with CVXPY
build system.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Document the new workflow where Python packaging is handled by CVXPY.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implements diag_vec which converts a vector of size n into an n×n diagonal
matrix. Includes forward pass, Jacobian, and Hessian computations.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Use standard CSR building pattern (J->p[row] = nnz)
- Use next_diag counter instead of checking row == child_row * (n+1)
- Simplify eval_jacobian to O(n) loop computing out_row directly

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@dance858
Copy link
Collaborator

Very clean. Nice.

@dance858 dance858 closed this Jan 30, 2026
@dance858 dance858 reopened this Jan 30, 2026
@dance858 dance858 merged commit d180c7f into main Jan 30, 2026
0 of 17 checks passed
@dance858 dance858 deleted the cleanup-python branch February 1, 2026 23:16
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.

2 participants