Skip to content

refactor(deps): Core-Abhängigkeiten verschlanken (9 → 4)#36

Merged
lepy merged 1 commit into
masterfrom
refactor/lean-core-deps
Jun 26, 2026
Merged

refactor(deps): Core-Abhängigkeiten verschlanken (9 → 4)#36
lepy merged 1 commit into
masterfrom
refactor/lean-core-deps

Conversation

@lepy

@lepy lepy commented Jun 26, 2026

Copy link
Copy Markdown
Owner

Verschlankt REQUIRES von 9 auf 4 Pakete. Kern ist jetzt nur noch numpy, pandas, pytz, suuid; Excel-/Bild-/Legacy-Abhängigkeiten werden optional.

Audit (aktiver, gemessener Code)

Dep Nutzung Aktion
xlrd nirgends ersatzlos entfernt
Pillow nur transitiv via openpyxl (das PIL try/except-guarded) entfernt
openpyxl guarded Import in __init__ + pandas-Excel-Engine [excel]
xlsxwriter nur deprecated Data.to_xlsx (Laufzeit) [excel]
tabulate nur deprecated HTML-Repr (war Modulebene-Import!) lazy + [excel]
pytz echt im Kern (Zeitzonen) bleibt

Änderungen

  • setup.py: REQUIRES = [numpy, pandas, pytz, suuid]; neues Extra [excel] = [openpyxl, xlsxwriter, tabulate].
  • deprecated/data.py: from tabulate import tabulate von Modulebene in die nutzende Methode → import sdata läuft ohne tabulate.
  • Tests mit optionalem Backend überspringen sich sauber via importorskip: test_image (PIL), test_io::test_data_to_html & test_table::to_xlsx (xlsxwriter) — analog zu den bestehenden HDF5/sql-Skips.

Installationsmodell

pip install sdata           # schlanker Kern
pip install sdata[excel]    # Excel-I/O + HTML-Repr

Verifikation

Mit nur den Kern-Deps (ohne tabulate/xlrd/openpyxl/xlsxwriter/Pillow): import sdata OK, 379 passed, 8 skipped, Coverage 100 %.

REQUIRES enthält nur noch numpy, pandas, pytz, suuid. Excel-/Bild-/Legacy-
Abhängigkeiten werden optional:

- xlrd: ersatzlos entfernt (nirgends genutzt).
- Pillow: entfernt; wurde nur transitiv über openpyxl gezogen (das PIL selbst
  guarded). Bild-Funktionen (sclass.image, experimentell) bleiben optional.
- openpyxl, xlsxwriter, tabulate: ausgelagert ins neue Extra [excel]
  (Excel-I/O via pandas, HTML-Repr der deprecated Data-Klasse).
- deprecated/data.py: 'from tabulate import tabulate' von Modulebene in die
  nutzende Methode verschoben (sonst bricht 'import sdata' ohne tabulate).

Tests, die optionale Backends benötigen, überspringen sich nun sauber
(importorskip): test_image (PIL), test_io::test_data_to_html und
test_table::to_xlsx (xlsxwriter) – analog zu den HDF5/sql-Tests.

Verifiziert mit nur den Kern-Deps (ohne tabulate/xlrd/openpyxl/xlsxwriter/
Pillow): 'import sdata' OK, 379 passed, 8 skipped, Coverage 100%.
@lepy lepy merged commit 9a7fb97 into master Jun 26, 2026
1 of 2 checks passed
@lepy lepy deleted the refactor/lean-core-deps branch June 26, 2026 07:32
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

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.

1 participant