Skip to main content

Contributor CLI for Stratum Commons executable notebooks and tool walkthroughs.

Project description

geotech-cli

geotech-cli is the contributor-facing scaffold for Stratum Commons executable notebooks and tool walkthroughs.

This in-repo scaffold currently supports a narrow Phase 2 contract:

  • parse and validate the published YAML front-matter schema
  • run a local Python run(runtime_inputs) function after the front-matter block
  • persist a recorded output bundle under .geotech/output/
  • submit the bundle to POST /api/cli/submit using a bearer token or browser-session-equivalent API token

Source file contract

The CLI expects a source file that starts with a fenced YAML block and then defines Python source code.

---
schema: 1
standard_id: geo.spt.n60_correction
version: 1.0.0
runtime:
  target: browser
  pyodide: "0.29.4"
inputs:
  - id: raw_blow_count
    label: Raw blow count
    quantity_kind: blow_count
    unit: blows/0.3m
outputs:
  - id: n60
    label: Corrected N60
    kind: scalar
    quantity_kind: blow_count
    unit: blows/0.3m
licence:
  code: MIT
audience: practitioner
domain_tags:
  - foundations
known_limitations:
  - Demonstration scaffold only.
required_packages:
  - numpy
lockfile: uv.lock
---

DEFAULT_INPUTS = {
    "raw_blow_count": 18,
}

def run(runtime_inputs):
    return {
        "summary": "Executed local scaffold.",
        "scalarOutputs": [
            {"id": "n60", "label": "Corrected N60", "value": runtime_inputs["raw_blow_count"], "unit": "blows/0.3m"},
        ],
    }

DEFAULT_INPUTS is optional. The CLI merges repeated --input key=value arguments over those defaults.

Commands

geotech validate notebook.py
geotech run notebook.py --input raw_blow_count=18
geotech submit notebook.py --title "SPT demo" --summary "Demo executable post"
geotech checklist notebook.py
geotech auth save-token stc_pat_...

Notes

  • validate checks uv.lock, the manifest schema, runtime hints, optional marimo check, and the canonical /standards/<id>/v/<version> route when online.
  • run executes the local run(runtime_inputs) function and writes .geotech/output/<stem>.run.json.
  • submit synthesizes a minimal publishable markdown body around the validated front-matter and uploads the recorded output bundle to the current platform route.
  • checklist currently prints a declaration shell from the manifest metadata; the full standards-bound assumption sync remains a later slice.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

geotech_cli-0.2.0.tar.gz (16.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

geotech_cli-0.2.0-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

Details for the file geotech_cli-0.2.0.tar.gz.

File metadata

  • Download URL: geotech_cli-0.2.0.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for geotech_cli-0.2.0.tar.gz
Algorithm Hash digest
SHA256 40842686e61f73d321bcfb74e76df6e0c0579113a7672405175dab968c735dc0
MD5 eceef078e647fd85e35967562726a682
BLAKE2b-256 fdd6bf8be080d6ea3debbaf3139dd44670033a10dc2e6726b61a5878395680fb

See more details on using hashes here.

Provenance

The following attestation bundles were made for geotech_cli-0.2.0.tar.gz:

Publisher: geotech-cli-release.yml on stratum-commons-stack/stratum_commons

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file geotech_cli-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: geotech_cli-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 13.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for geotech_cli-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 586ef3e87a46c108c9d21c93387884ce964ff26bcc0bd4c429bdbf83c7bcc6d6
MD5 a825def8292f2276f35f54000824fd69
BLAKE2b-256 8734961942c15f9a255a2a8a172ad9c1a9de8aa6b3e749e24421efb1203acdb6

See more details on using hashes here.

Provenance

The following attestation bundles were made for geotech_cli-0.2.0-py3-none-any.whl:

Publisher: geotech-cli-release.yml on stratum-commons-stack/stratum_commons

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page