CORE-000510 fires on every unsplit two-letter dataset (DM, TS, AE ...)

Aperta Adatta ai principianti
#1,891 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
66/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python
Ambito
data

Direzione di ricerca

Inizia dalla definizione della regola CORE-000510, il cui blocco domains usa include_split_datasets: true senza limitare l'ambito, e da DATASET_PROPERTY_KEYWORDS in RuleProcessor, che definisce già “SPLIT DATASETS”. Limita la regola ai dataset suddivisi e verifica se resources/cache/rules.pkl debba essere rigenerato. È completato quando -r CORE-000510 sui dati DM e TS allegati non segnala problemi e un dataset suddiviso con un nome errato invece sì.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Standard

CDISC SDTM/SDTMIG

Reference Rule ID(s)

CG0017

Conformance Rule ID(s) (if published in CORE)

CORE-000510

JIRA Ticket

https://jira.cdisc.org/projects/CORERULES/issues/CORERULES-

CLI Command Used (if applicable)

python core.py validate -s sdtmig -v 3-4 -d issue9_data -dxp issue9_data/define.xml -r CORE-000510 -of JSON

Rule YAML
core_id: CORE-000510
description: Split datasets (excluding supplemental qualifiers) is expected to have a have a length of 3 or 4 characters
rule_type: Dataset Metadata Check
sensitivity: Record
classes:
  Include:
  - ALL
domains:
  Exclude:
  - SUPP--
  - AP--
  include_split_datasets: true
conditions:
  any:
  - name: get_dataset
    operator: shorter_than
    value:
      comparator: 3
      target: dataset_name
  - name: get_dataset
    operator: longer_than
    value:
      comparator: 4
      target: dataset_name
actions:
- name: generate_dataset_error_objects
  params:
    message: Split dataset name is not 3 or 4 characters in length
Attach any sample test data file(s)

CORE-000510 checks that a split dataset name has 3 or 4 characters, but in the rules cache shipped in the repository (resources/cache/rules.pkl at commit 22ce7a7) it runs on every dataset, not only split ones. Every two-letter domain fails. None of the datasets in the attached example are split, yet each one gets an issue; in a full SDTM submission this gives one false issue per dataset.

The rule's scope is domains: {Exclude: [SUPP--, AP--], include_split_datasets: true} with classes: {Include: [ALL]}. include_split_datasets adds split datasets to the scope; it does not limit the scope to them. The engine already has a keyword for that: "SPLIT DATASETS" in RuleProcessor.DATASET_PROPERTY_KEYWORDS.

Suggested fix: scope the rule to split datasets, e.g. domains: {Include: ["SPLIT DATASETS"]}, keeping the SUPP-- and AP-- exclusions if needed.

issue9_data.zip: DM and TS (Dataset-JSON 1.1) and their define.xml, from a fictional study.
Environment: CORE 0.17.1 (GitHub main, commit 22ce7a7, 29 October 2026), Python 3.12, Linux.

issue9_data.zip

Attach any output report and/or log file(s)

Expected: no issue, as DM and TS are not split datasets.
Actual: one issue per dataset (DM, TS): "Split dataset name is not 3 or 4 characters in length".

issue9_output.txt

Expected output

Expected: no issue, as DM and TS are not split datasets.
Actual: one issue per dataset (DM, TS): "Split dataset name is not 3 or 4 characters in length".

Any Additional Information

No response

Lingua principale
Python
Stelle
125
Fork
50
Merge medio
7h 40m
PR unite (30g)
14

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di cdisc-org/cdisc-rules-engine

Tutte le issue di cdisc-org/cdisc-rules-engine

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.