new

improved

fixed

Client Library

API

`onecodex` client library v1.1.0

New
  • Added
    updated_at
    to
    Analyses
    schema
  • onecodex.models.Workflows
    (a type of
    onecodex.models.Analyses
    ) for Custom Workflows (https://docs.onecodex.com/en/collections/9673389-your-authored-workflows-on-one-codex)
  • Added
    Jobs.run()
    for running analyses including Workflows
  • onecodex.models.Assets
    for querying and creating Workflow assets
  • Analyses.await_completion()
    blocks until an analysis reaches a terminal state using adaptive polling.
  • onecodex analyses await <analysis_id>
    CLI command, with
    --timeout
    ,
    --initial-interval
    , and
    --max-interval
    options. Also available as
    onecodex await <analysis_id>
    for backward compatibility.
  • Analyses.logs()
    fetches the job run logs for an analysis, with an optional
    tail
    parameter to limit the output to the last N lines.
  • onecodex analyses logs <analysis_id>
    CLI command, with
    --tail
    to limit the number of log lines returned (defaults to 1000). Only available for custom workflow runs.
  • Jobs.create()
    and
    Jobs.update()
    for creating and updating custom jobs from the Python client.
    assets=[...]
    accepts
    Assets
    instances directly;
    dependencies=[{"job": parent_job, "output_dir": "..."}]
    accepts
    Jobs
    instances directly.
  • onecodex jobs create
    and
    onecodex jobs update <job_id>
    CLI commands.
  • onecodex download samples
    accepts
    -s
    /
    --sample
    (repeatable) to download specific samples by ID. Mutually exclusive with
    --project
    and
    --tags
    .
  • onecodex jobs run
    accepts
    --args-json
    to pass runtime arguments as a JSON object, preserving non-string types (integers, floats, booleans, arrays, objects).
    -a
    /
    --arg
    only supports string values; use
    --args-json
    when a job argument expects another type. Mutually exclusive with
    -a
    /
    --arg
    .
  • ocx.Jobs.get("...").details()
    for retrieving CPU/memory/script/etc for Custom Workflows.
Changed
  • ApiRef
    now accepts any object with a
    field_uri
    attribute (e.g. resource model instances), in addition to the existing
    $ref
    /
    $uri
    dict shapes. This lets users pass fetched resources directly into create/update calls.
  • OneCodexBase.create()
    now validates kwargs against the schema declared in
    _allowed_methods["create"]
    (when one is set), mirroring how
    update()
    already worked. Surfaces server error messages instead of failing on response parsing.
Fixed
  • plot_pcoa
    no longer flips axis orientation between runs; PCoA eigenvector signs are now pinned so the entry with the largest absolute value on each axis is positive.
  • CLI commands that take One Codex IDs (
    onecodex samples
    ,
    analyses
    ,
    classifications
    ,
    panels
    ,
    workflows
    ,
    documents download
    ,
    jobs run
    /
    update
    ,
    upload --sample-id
    ,
    download samples --sample
    ) now validate the format up front and fail with a helpful error instead of an opaque 404.