Repository navigation
feat(py): add save(evolution_exclude) to skip tables from evolution tracking (0.9.4) - #131
Merged
Merged
Conversation
…racking (0.9.4) New optional `evolution_exclude: set[str] | None` kwarg on `Jsonjsdb.save()`, forwarded to `compare_datasets()`. Listed tables are still exported normally (json + json.js) but produce no add/update/delete evolution entries. Default `None` keeps existing behaviour identical. The closure also short-circuits before reading the old table from disk for excluded tables, avoiding wasted I/O on large tables such as `frequency`. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
bassim-matar
force-pushed
the
feat-evolution-exclude
branch
from
July 15, 2026 09:13
b9061cc to
c8db80a
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contexte
Un consommateur (datannurpy) expose une table
frequencyportant les comptages de modalités. À chaque re-scan, une distribution qui bouge génère une ligne d'évolution par modalité, ce qui pollue l'évolution de milliers de lignes sans intérêt fonctionnel. Aujourd'hui le seul levier esttrack_evolution(tout-ou-rien) ; les tables__*sont skippées maisfrequencyne peut pas être renommée sans casser l'app.Changement
Nouveau kwarg optionnel
evolution_exclude: set[str] | None = NonesurJsonjsdb.save(), transmis àcompare_datasets(). Les tables listées :update, niadd, nidelete).Défaut
None⇒ comportement strictement identique à aujourd'hui.Détails
compare_datasets(): early-return juste après le skip__existant.track_table_evolutioncourt-circuite avant_get_old_table, évitant le read disque inutile de l'ancienne table pour les tables exclues (gain sur les grosses tables typefrequency).0.9.3 → 0.9.4+ CHANGELOG +uv.lock.Tests
Nouvelle classe
TestEvolutionExclude:compare_datasets(exclue = 0 entrée, non-exclue = entrées normales) ;save():frequencysubit update + add + delete → aucune ligne d'évolution, mais export à jour ; une tablevariablemodifiée en parallèle génère bien son update (pas de sur-filtrage).Vérifs : 352 passed / 1 xfailed · ruff clean · pyright 0 error.
🤖 Generated with Claude Code