Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Document the sparse expression path (CSRLinearExpression, sparse=True, sparse_groupby)

Cerrado
#971 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Ya se ha fusionado un pull request relacionado.

  • #1017 de @FabianHofmann — fusionado

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
68/100
Tipo de issue
Documentación
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python

Línea de trabajo

Start with the CSRConstraint entries in doc/api.rst and doc/user-guide.rst, then read the linopy/csr.py module docstring and the sparse references in doc/release_notes.rst. Document CSRLinearExpression, the sparse opt-ins, preserving operations, and the v1 term-layout contract in the relevant guide, API stubs, and examples. Done means the sparse expression path is discoverable beyond the release notes.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

documentation sparse

[!NOTE]
The following content was generated by AI.

Describe the feature you'd like to see

Document the sparse expression path. It is currently undiscoverable.

CSRLinearExpression, groupby(...).sum(sparse=True) and options["sparse_groupby"] appear only in doc/release_notes.rst (lines 46, 55, 56, 94, 96, 202). They are absent from doc/api.rst, the user guide, the generated API stubs and every example notebook. A grep over doc/ and examples/ for sparse=True or sparse_groupby returns release notes only.

By contrast CSRConstraint is documented, in doc/api.rst:410-451 and one clause of doc/user-guide.rst:28. So the export half of the sparse story is visible and the build half is not.

A user who wants the memory win has to read release notes or the linopy/csr.py module docstring to find out the feature exists.

Implementation ideas

  • An doc/api.rst entry plus generated stubs for CSRLinearExpression, matching the existing CSRConstraint entries.
  • A short user-guide section covering: what the sparse path is for, the three opt-ins needed end to end (semantics="v1", sparse_groupby/sparse=True, freeze_constraints=True), which operations preserve the backing and which drop it, and the v1-only term-layout contract (#925).
  • Documenting the current preserving set is valuable even while it is small, because the failure mode is silent.
Lenguaje dominante
Python
Estrellas
259
Forks
89
Merge medio
1 d 18 h
PR fusionados (30 d)
26

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de PyPSA/linopy

Todos los issues de PyPSA/linopy

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.