ThinkR-open / ThinkR-open/datadiff
[API] equal_mode « normalized » est un bouton sans effet (4 paramètres *_equal_mode inertes dans write_rules_template)
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 6
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Contexte
Le champ YAML equal_mode n'est lu qu'à un seul endroit (R/preprocessing.R:49-54), où identical(eq_mode, "normalized") active une branche qui appelle normalize_text(case_insensitive = FALSE, trim = FALSE) — c'est-à-dire l'identité. Et pour date/datetime/logical, le garde is.character() court-circuite de toute façon. La normalisation ne dépend en réalité que de case_insensitive et trim.
Conséquences :
character_equal_mode,date_equal_mode,datetime_equal_mode,logical_equal_modedewrite_rules_template()sont des paramètres sans aucun effet sur le verdict ;- un utilisateur écrivant
equal_mode: normalizedseul dans son YAML croit activer une normalisation et n'obtient rien — comportement même verrouillé par un test (test-utils.R:50-59) ; - la doc laisse croire que
equal_modepilote quelque chose.
Reprex
library(datadiff)
ref <- data.frame(id = 1:2, s = c("A", " b"))
cand <- data.frame(id = 1:2, s = c("a", "b"))
path <- tempfile(fileext = ".yaml")
writeLines('
version: 1
defaults: {keys: [id], na_equal: true}
row_validation: {check_count: false}
by_type:
character: {equal_mode: normalized} # "normalized" seul
', path)
res <- compare_datasets_from_yaml(ref, cand, key = "id", path = path)
res$all_passed # FALSE : aucune normalisation appliquée malgré equal_mode: normalized
Critères de succès
- Décision tranchée : soit
equal_mode: normalizedimplique des défauts documentés (ex.trim = TRUE, case_insensitive = TRUEsauf override), soit le champ et les 4 paramètres*_equal_modesont supprimés (avec dépréciation et migration du template). - Le reprex a un comportement documenté et intuitif.
- test-utils.R:50-59 mis à jour pour verrouiller le nouveau comportement (et non plus l'inertie).
- Vignette et template YAML générés cohérents avec la décision.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read R/preprocessing.R:49-54 and test-utils.R:50-59 first, then inspect the generated YAML template and related vignette. Decide and document whether normalized mode applies defaults or is removed with migration, update the reprex behavior, and make the test, vignette, and template agree.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- backend-api-design, documentation, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100