Skip to content

feature request: add "alias information to var meta" #3

Description

@behrica

I was thinking about potential re-use of "examples" in other contexts,

The current var metadata of a symbol with attahced example-seesion, returns:

  • original example code as "string"
  • each "line" of the exampl-session as a fn, ready to execute

maybe in some contexts it would be nice to know the aliases as well.
So that when having:

:metadoc/examples [(example-session
                       "Train random-forest on iris data"
                       (def training-data
                         (->
                          (scicloj.metamorph.ml.rdatasets/datasets-iris)
                          (ds/drop-columns [:rownames])
                          (ds-mod/set-inference-target [:species])))
                       (def model
                         (scicloj.metamorph.ml/train training-data {:model-type :metamorph.ml/random-forest}))
                       (comment "forest with hundred trees created")
                       (-> model :model-data :forest :trees count)
                       )
                      ]

we can now that alias "ds" aliases to tech.v3.dataset

I think your code could discover this at runtime

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions