infer_salmon_datapackage_artifacts

infer_salmon_datapackage_artifacts(
    resources,
    dataset_id='dataset-1',
    table_id='table-1',
    guess_types=True,
    seed_semantics=True,
    semantic_sources=None,
    semantic_max_per_role=1,
    seed_verbose=True,
    seed_codes=None,
    seed_table_meta=None,
    seed_dataset_meta=None,
    semantic_code_scope='factor',
    llm_assess=False,
    llm_provider='openai',
    llm_model=None,
    llm_api_key=None,
    llm_base_url=None,
    llm_reasoning_effort=None,
    llm_top_n=5,
    llm_context_files=None,
    llm_context_text=None,
    llm_timeout_seconds=60,
    llm_request_fn=None,
)

Infer the in-memory artifacts needed to write a Salmon Data Package.

This is the inspect-before-write entry point behind :func:create_sdp. It normalizes one DataFrame or a named resource mapping, infers dataset, table, dictionary, and code metadata, and optionally attaches deterministic or opt-in LLM semantic review output.

Parameters

Name Type Description Default
resources A DataFrame or named mapping of DataFrames. required
seed_semantics bool Retrieve semantic candidates when True. True
semantic_sources Optional[Sequence[str]] None uses role-aware source defaults. Explicit values form a strict retrieval allowlist. None
llm_assess bool Enable LLM review. It has no effect when seed_semantics=False. False
llm_context_files Local context paths used only when both semantic seeding and LLM review are enabled. None

Returns

Name Type Description
dict Resource and metadata DataFrames plus semantic_suggestions and semantic_llm_assessments when available.
Back to top