Make tests less specific to a particular model

Aperta
#1,174 6 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

@anurag-mds ci sta già lavorando.

Dal 3/3/2026.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
julia
Ambito
testing-qa

Direzione di ricerca

Inizia esaminando le modifiche in #1173 e la configurazione dei test in TestUtils.Models, in particolare logprior_true e varnames. Trova i test rimanenti che assumono DEMO_MODELS, una variabile denominata x o un’osservazione, e generalizzali in base ai metadati del modello. Il lavoro è completato quando i test non dipendono più da quella particolare raccolta di modelli e l’intera suite di test ha esito positivo.

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

Descrizione

enhancement

#1173 improves our test coverage by changing a lot of tests that used only the models that implement

    s ~ InverseGamma(2, 3)
    m ~ Normal(0, √s)
    1.5 ~ Normal(m, √s)
    2.0 ~ Normal(m, √s)

in various ways, to use a more general collection of models. However, many other tests remain that still have a hard-coded assumption that we are using that particular set of DEMO_MODELS. For instance, some tests assume that there is a variable called x and that it's an observation, or that there is at least one observe statement in a model. We should clean these up and make them all fully generic, making full use of the (excellent) setup in TestUtils.Models with logprior_true and varnames and other such functions used to implement the ground truth of what we expect from any given model.

Lingua principale
Julia
Stelle
291
Fork
43
Merge medio
1g 23h
PR unite (30g)
15

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 TuringLang/DynamicPPL.jl

Tutte le issue di TuringLang/DynamicPPL.jl

Issue simili

Altre issue su Julia

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.