atlas-rust 0.10.0

Directory-based store for thousands of N-dimensional datasets local or remote using object storage.
Documentation
name: atlas-python-docs
on:
    workflow_dispatch:
        inputs:
            version:
                description: "Docs version to publish (e.g. 1.2.3). Leave blank to publish as 'dev'."
                required: false
                type: string
            alias:
                description: "Alias to update (e.g. latest)."
                required: false
                default: dev
                type: string
    release:
        types: [published]
    push:
        tags:
            - "v*" # triggers on tags like v1.0.0, v2.3, etc.
permissions:
    contents: write
jobs:
    deploy:
        runs-on: ubuntu-latest
        steps:
            - uses: actions/checkout@v4
            - name: Configure Git Credentials
              run: |
                  git config user.name github-actions[bot]
                  git config user.email 41898282+github-actions[bot]@users.noreply.github.com

            - name: Extract version
              id: vars
              env:
                  INPUT_VERSION: ${{ github.event.inputs.version }}
                  INPUT_ALIAS: ${{ github.event.inputs.alias }}
              run: |
                  if [[ "$GITHUB_REF" == refs/tags/v* ]]; then
                      # Tag push or release: refs/tags/v1.2.3 -> version=1.2.3, alias=latest
                      VERSION="${GITHUB_REF#refs/tags/v}"
                      ALIAS=latest
                  else
                      # Manual run: use provided inputs, falling back to 'dev'
                      VERSION="${INPUT_VERSION:-dev}"
                      ALIAS="${INPUT_ALIAS:-dev}"
                  fi
                  echo "version=$VERSION" >> $GITHUB_OUTPUT
                  echo "alias=$ALIAS" >> $GITHUB_OUTPUT

            - name: Show version
              run: |
                  echo "Deploying docs version '${{ steps.vars.outputs.version }}' (alias '${{ steps.vars.outputs.alias }}')"

            - uses: actions/setup-python@v6
              with:
                  python-version: "3.12"
            - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
            - uses: actions/cache@v4
              with:
                  key: mkdocs-material-${{ env.cache_id }}
                  path: ~/.cache
                  restore-keys: |
                      mkdocs-material-
            - run: pip install mkdocs-material mkdocstrings[python] mike
              # Build & install the package so the compiled `atlas._atlas` extension is
              # importable — mkdocstrings preloads it to resolve the re-exported API.
              # Editable (-e) so maturin places the compiled `_atlas.*.so` into the
              # python-source tree (atlas-python/python/atlas/), which is where griffe's
              # `paths: ["python"]` search path looks for it. A plain install puts it in
              # site-packages, outside that search path, and the alias fails to resolve.
              # ubuntu-latest ships a Rust toolchain, so maturin can build from source.
            - run: pip install -e ./atlas-python
            - env:
                  VERSION: ${{ steps.vars.outputs.version }}
                  ALIAS: ${{ steps.vars.outputs.alias }}
              run: |
                  git fetch origin gh-pages --depth=1 || true
                  # mike rejects an alias identical to the version, so only pass it when it differs
                  if [[ "$ALIAS" == "$VERSION" ]]; then
                      mike deploy --push --update-aliases -F atlas-python/mkdocs.yml "$VERSION"
                  else
                      mike deploy --push --update-aliases -F atlas-python/mkdocs.yml "$VERSION" "$ALIAS"
                  fi
                  # The site root must always redirect to `latest`, so only (re)write the
                  # root index.html when this run deploys the `latest` alias (releases).
                  # Manual `dev` runs are published at /dev/ but never touch the root.
                  if [[ "$ALIAS" == "latest" ]]; then
                      mike set-default --push -F atlas-python/mkdocs.yml latest
                  fi