From 16be0a61d9238b191f9e285bc7b409261b3e57fd Mon Sep 17 00:00:00 2001 From: Harlan D Heilman <73567020+HarlanHeilman@users.noreply.github.com> Date: Mon, 9 Nov 2026 11:14:08 -0800 Subject: [PATCH 1/3] ci: add CI and version-driven PyPI release workflows Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci.yml | 68 +++++++++++++++++ .github/workflows/release.yml | 136 ++++++++++++++++++++++++++++++++++ 2 files changed, 204 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..83f5469 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,68 @@ +# Checks that gate a pull request and run again on main. The Release workflow reuses this file +# (workflow_call) so nothing ships on a red tree. +name: CI + +on: + pull_request: + push: + branches: [main] + workflow_call: + +permissions: + contents: read + +concurrency: + group: ci-${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} + cancel-in-progress: true + +env: + FORCE_COLOR: "1" + +jobs: + lint: + name: lint, format, types + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@v7 + - uses: astral-sh/setup-uv@v10 + with: + python-version: "3.10" + enable-cache: true + - run: uv sync --frozen + - name: ruff lint + run: uv run --frozen ruff check . + - name: ruff format + run: uv run --frozen ruff format --check . + - name: mypy + run: uv run --frozen mypy src + + test: + name: python ${{ matrix.python }} + runs-on: ubuntu-latest + timeout-minutes: 15 + strategy: + fail-fast: false + matrix: + python: ["3.10", "3.11", "3.12", "3.13", "3.14"] + steps: + - uses: actions/checkout@v7 + - uses: astral-sh/setup-uv@v10 + with: + python-version: ${{ matrix.python }} + enable-cache: true + - run: uv sync --frozen + - name: pytest + run: uv run --frozen pytest -q + + package: + name: package checks + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@v7 + - uses: astral-sh/setup-uv@v10 + - name: build wheel and sdist + run: uv build --out-dir dist + - name: check metadata + run: uvx twine check --strict dist/* diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..d55ce6e --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,136 @@ +# Release: when a push to main touches the package and the version in pyproject.toml has no git +# tag yet, run CI, build the wheel and sdist, publish to PyPI, then create the tag `vX.Y.Z` and a +# GitHub release. To release, bump `version` in pyproject.toml (`uv version --bump patch|minor|major` +# also refreshes uv.lock) in a normal PR and merge it. Pushes that do not change the version find +# the tag already present and skip. +# +# One-time setup: on PyPI, add a trusted publisher for project `xrayatlas` with owner +# `WSU-Carbon-Lab`, repository `atlas-python`, workflow `release.yml`, environment `pypi`; and +# create the `pypi` environment in this repository's settings. No API token is stored. +name: Release + +on: + push: + branches: [main] + paths: + - pyproject.toml + - uv.lock + - src/** + - .github/workflows/release.yml + workflow_dispatch: + inputs: + dry_run: + description: Build everything but do not publish or tag + type: boolean + default: false + +permissions: + contents: read + +concurrency: + group: release + cancel-in-progress: false + +jobs: + check: + name: decide whether to release + runs-on: ubuntu-latest + timeout-minutes: 5 + outputs: + release: ${{ steps.v.outputs.release }} + version: ${{ steps.v.outputs.version }} + steps: + - uses: actions/checkout@v7 + - uses: astral-sh/setup-uv@v10 + - id: v + run: | + version="$(uv version --short)" + if git ls-remote --exit-code --tags origin "refs/tags/v$version" >/dev/null 2>&1; then + echo "Tag v$version already exists: nothing to release." + release=false + else + echo "New version v$version: releasing." + release=true + fi + echo "version=$version" >> "$GITHUB_OUTPUT" + echo "release=$release" >> "$GITHUB_OUTPUT" + + ci: + name: tests + needs: check + if: needs.check.outputs.release == 'true' || inputs.dry_run + uses: ./.github/workflows/ci.yml + + build: + name: build wheel and sdist + needs: [check, ci] + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@v7 + - uses: astral-sh/setup-uv@v10 + - name: build + run: uv build --out-dir dist + - name: assert artifact names match the release version + env: + VERSION: ${{ needs.check.outputs.version }} + run: | + test -f "dist/xrayatlas-$VERSION-py3-none-any.whl" + test -f "dist/xrayatlas-$VERSION.tar.gz" + - name: check metadata + run: uvx twine check --strict dist/* + - name: smoke import from the built wheel + run: | + uv venv --python 3.10 /tmp/smoke + uv pip install --python /tmp/smoke/bin/python dist/*.whl + /tmp/smoke/bin/python -c "import xrayatlas, importlib.metadata as m; print('ok', m.version('xrayatlas'))" + - uses: actions/upload-artifact@v7 + with: + name: dist + path: dist/* + if-no-files-found: error + + publish-pypi: + name: publish to PyPI + needs: [check, build] + if: ${{ !inputs.dry_run }} + runs-on: ubuntu-latest + timeout-minutes: 10 + environment: + name: pypi + url: https://pypi.org/p/xrayatlas + permissions: + id-token: write # PyPI trusted publishing (OIDC); no API token needed + steps: + - uses: actions/download-artifact@v8 + with: + name: dist + path: dist + - uses: pypa/gh-action-pypi-publish@release/v1 + with: + packages-dir: dist + skip-existing: true + + github-release: + name: tag and GitHub release + needs: [check, publish-pypi] + if: ${{ !inputs.dry_run }} + runs-on: ubuntu-latest + timeout-minutes: 5 + permissions: + contents: write + steps: + - uses: actions/checkout@v7 + - uses: actions/download-artifact@v8 + with: + name: dist + path: dist + - name: create tag and release + env: + GH_TOKEN: ${{ github.token }} + VERSION: ${{ needs.check.outputs.version }} + run: | + gh release create "v$VERSION" dist/* \ + --target "$GITHUB_SHA" \ + --title "v$VERSION" \ + --generate-notes From 7c5cac4d529796dce78d209416b12f9b8f013699 Mon Sep 17 00:00:00 2001 From: Harlan D Heilman <73567020+HarlanHeilman@users.noreply.github.com> Date: Mon, 9 Nov 2026 11:14:08 -0800 Subject: [PATCH 2/3] build: prepare xrayatlas 0.1.0 for PyPI with BSD-3-Clause license and project metadata Co-Authored-By: Claude Opus 5.5 --- LICENSE | 28 +++++ README.md | 261 ++++++++++----------------------------------- examples/README.md | 4 +- pyproject.toml | 37 ++++++- 4 files changed, 121 insertions(+), 209 deletions(-) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..5a1cac8 --- /dev/null +++ b/LICENSE @@ -0,0 +1,28 @@ +BSD 3-Clause License + +Copyright (c) 2026, WSU Carbon Lab + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/README.md b/README.md index 0f51e0b..16340ef 100644 --- a/README.md +++ b/README.md @@ -1,236 +1,85 @@ -# xrayatlas — Python client for X-ray Atlas +# xrayatlas -The `xrayatlas` package pulls NEXAFS datasets, metadata, auxiliary files, and optical models from -an X-ray Atlas deployment, and builds, publishes, shares, forks, reviews, compares, cites, and -locks optical models. The client never fits peaks, never computes optical constants, and never -normalizes spectra itself: normalization is always computed by the server, and the peaks and -tensor payloads you send come from your own analysis code. +Python client for [X-ray Atlas](https://xrayatlas.wsu.edu), the collaborative database of +Near-Edge X-ray Absorption Fine Structure (NEXAFS) spectra. -## Install and login +`xrayatlas` pulls NEXAFS datasets, metadata, auxiliary files, and optical models from an Atlas +deployment, and builds, publishes, shares, forks, reviews, compares, cites, and locks optical +models. The client never fits peaks, never computes optical constants, and never normalizes +spectra itself: normalization is computed by the server, and the peaks and tensor payloads you +upload come from your own analysis code. -```bash -uv pip install xrayatlas # from an Atlas checkout; not on PyPI yet -``` +**Documentation:** -The package lives in the `extensions/python` submodule of the Atlas repository. It requires Python -3.10+ and depends on numpy, pandas, httpx, and pydantic. - -Login with the Atlas CLI, which writes a credential file shared with this client: +## Install ```bash -xatlas login -``` - -The client reads `$XDG_CONFIG_HOME/xatlas/credentials.json` (default -`~/.config/xatlas/credentials.json`). The environment variables `XRAYATLAS_TOKEN` and -`XRAYATLAS_HOST` override the file; a token is attached only for the host it was issued for, so a -token stored for one Atlas deployment is never sent to another. The token is never printed and is -never written into the HTTP cache or a lockfile. - -## Examples - -Runnable scripts live in [`examples/`](examples/README.md) and cover pulling a dataset, reading a -model, building and publishing a draft, comparing models, and recording or restoring a lockfile. - -## Pull a dataset - -```python -import xrayatlas as xa - -ds = xa.datasets.get("d/abcd2345") # the current version, pinned and cached by version +pip install xrayatlas +# or +uv add xrayatlas ``` -References accept an Atlas id (`abcd2345`, `d/abcd2345`) or an experiment UUID. A dataset may -also be pinned explicitly: +Requires Python 3.10 or newer. Dependencies: numpy, pandas, httpx, and pydantic. -```python -old = xa.datasets.get("d/abcd2345", "1.0.2") -``` +## Sign in -A pinned version is served from the cache even after the server moves on; a version that is -neither current nor cached raises `ConflictError` rather than silently substituting another -version. +Public datasets and public models read anonymously. Writes need a token, which the +[`xatlas` CLI](https://xrayatlas.wsu.edu/docs/cli) issues and stores in a credential file this +client shares: -```python -frame = ds.spectra() # derived channels: od, mass_absorption, beta, delta where present -raw = ds.spectra(raw=True) # only the uploaded raw channel and I0 -geometries = ds.geometries() # distinct (theta_deg, phi_deg) pairs, sorted; (90, 45) != (45, 90) -files = ds.aux_files.download("aux/", kind="sample") # sample-aux/ files of the dataset bundle -text = ds.bibtex() # BibTeX record for the dataset +```bash +xatlas login ``` -Export requests carry at most 100,000 rows (the server's cap). When the result may be incomplete, -`ds.spectra()` raises `AtlasError` instead of returning a silently partial spectrum; pass -`allow_truncated=True` to accept the capped export. The dataset bundle endpoint carries the full -spectrum, but this client's `aux_files.download` extracts only the auxiliary files -(`experiment-aux/` and `sample-aux/`), so a capped dataset has no full-spectrum download yet. -Searching lists lightweight summaries; spectra load only on request: - -```python -for summary in xa.datasets.search(molecule_id=""): - frame = summary.load().spectra() -``` +`xa.login()` runs the same command from Python. The client reads +`$XDG_CONFIG_HOME/xatlas/credentials.json` (default `~/.config/xatlas/credentials.json`); +`XRAYATLAS_TOKEN` and `XRAYATLAS_HOST` override the file. A token is attached only for the host it +was issued for, and is never printed or written into the HTTP cache or a lockfile. -## Read models +## Quickstart ```python import xrayatlas as xa -m = xa.models.get("m/k7m2xq4n") # the latest published version -v2 = xa.models.get("m/k7m2xq4n", 2) # a specific published version -``` +ds = xa.datasets.get("d/abcd2345") # current version, pinned and cached +frame = ds.spectra() # pandas DataFrame of the derived channels the dataset has +geometries = ds.geometries() # distinct (theta_deg, phi_deg) pairs; (90, 45) != (45, 90) -```python -peaks = m.peaks # pandas DataFrame, one row per peak in stored order -norm = m.normalization # the version's normalization (server-defined) -links = m.datasets # linked datasets, each pinned to a dataset version -source = links[0].load() # that dataset at exactly the pinned version -raw = links[0].spectra(raw=True) # the raw channel of the linked dataset -lineage = m.lineage() # visible ancestors of this version, newest first -channels = m.normalized(ds) # server-computed normalized channels for a linked dataset -bibtex = m.cite() # BibTeX of this published version -``` +model = xa.models.get("m/k7m2xq4n") # latest published version +peaks = model.peaks # one row per stored peak +channels = model.normalized(ds) # server-computed normalized channels for a linked dataset -`m.tensor.load()` resolves a fresh signed URL, verifies the SHA-256 digest and size on every -read, and returns a NumPy array with dtype `float64` or `complex128` (a narrow `float16`, -`float32`, or `complex64` payload published by another client widens losslessly on load). Read that -array as named parameter columns, not as a physical tensor: axis 1 follows the stored `components`, -and the values you work with are `delta` and `beta` as separate series on the shared energy axis. A -complex payload carries delta in the real part and beta in the imaginary part as a storage -convenience. A full physics tensor is future work. `m.fork()` applies to published versions — -forking a draft raises `ValidationError`. - -## Build and publish - -The `xa.model(...)` builder reads its source (the first dataset's default model, or the model -named by `from_model=`) on entry and writes only on a clean exit: - -```python -import numpy as np -import pandas as pd -import xrayatlas as xa - -ds = xa.datasets.get("d/abcd2345") -energy = np.linspace(280.0, 340.0, 61) # strictly increasing eV grid, >= 2 points -delta = np.linspace(0.0010, 0.0030, 61) # delta parameter column -beta = np.linspace(0.0000, 0.0020, 61) # beta parameter column -values = np.stack([delta, beta], axis=1) # shape (61, 2): one column per component - -with xa.model(datasets=[ds], title="My model") as builder: - builder.normalization = xa.Normalization(pre=(280.0, 283.0), post=(325.0, 340.0)) - builder.peaks = pd.DataFrame( - {"center_ev": [285.4, 288.2], "kind": ["pi-star", "sigma-star"], "chi2": [1.1, 1.3]} - ) - builder.tensor = xa.Tensor.from_array( - values, - energy_ev=energy, - components=["delta", "beta"], - frame="lab", - units="1", - ) - builder.save() # optional; the block also saves once on a clean exit - -published = builder.publish() # always explicit, never retried +xa.lock("analysis.lock") # pin every dataset and model version this session read ``` -* Nothing is written until the `with` block exits cleanly; an exception inside the block writes - nothing. -* The builder saves once even if you call `save()` or `publish()` inside the block. -* `peaks` is a DataFrame validated like `xa.validate_peaks`; extra columns such as `chi2` become - each peak's `params`. -* `xa.Tensor.from_array` accepts float or complex arrays (`float16`/`float32` widen to - `float64`, `complex64` to `complex128`, exactly) and rejects integer arrays on purpose — cast - them yourself with `.astype(...)`. The payload is a container for named parameter columns: store - `delta` and `beta` as two real columns, or one complex column with delta in the real part and - beta in the imaginary part. It is not a physical tensor with a contracted basis; that is future - work. -* Publishing is a separate explicit step (`builder.publish()` or - `xa.models.Model.publish()`) and is never retried automatically. - -After publishing: +## Guides -```python -published.set_visibility("public") # private, shared, or public (owner only) -published.share(["0000-0002-1825-0097"]) # share with ORCID iDs (owner only) -published.unshare("0000-0002-1825-0097") -published.review(ds, "approved", note="Checked against the reference spectrum.") -``` - -Forking a published version returns a new builder prefilled from exactly that version: - -```python -with published.fork(title="My model v2") as builder: - builder.peaks = pd.DataFrame({"center_ev": [285.4, 288.2]}) - builder.save() # optional; saves once on a clean exit - -published_v2 = builder.publish() # publish the forked draft as its next version -``` - -An unpublished draft (for example one a builder saved) can still be removed: - -```python -with xa.model(datasets=[ds]) as scratch: - scratch.peaks = pd.DataFrame({"center_ev": [285.4]}) - scratch.save() # a draft that is never published - -scratch.model.delete() # delete that draft (owner only; set once the builder saves) -``` - -## Compare models - -```python -import xrayatlas as xa - -m1 = xa.models.get("m/k7m2xq4n") -m2 = xa.models.get("m/p8q9r2s3") -ds = xa.datasets.get("d/abcd2345") # a dataset both models link -comparison = xa.compare([m1, m2], tolerance_ev=0.2) # at least two models - -peaks = comparison.peaks # aligned peak groups: center_ev, count, one column per model -frames = comparison.spectra(ds) # normalized channels on shared axes + differences from m1 -``` - -`peaks` is a pandas DataFrame with one row per aligned peak group (centers chain into a group -while each next center is at most the tolerance past the widest), and `spectra` aligns the -server-computed channel (`mass_absorption` by default, or `od`/`beta`) on exact keys, holding -`NaN` where a model lacks a value. - -## Reproduce a session - -Every dataset and published model pulled through `xa.datasets.get` and `xa.models.get` is -recorded in an in-memory session registry, and `xa.lock` serializes it: - -```python -import xrayatlas as xa +| Topic | What it covers | +| --- | --- | +| [Datasets](https://xrayatlas.wsu.edu/docs/python/datasets) | Load by Atlas id or UUID, version pins, search, spectra, auxiliary files, BibTeX | +| [Models](https://xrayatlas.wsu.edu/docs/python/models) | Read published models: normalization, peaks, linked datasets, lineage, tensors | +| [Build and publish](https://xrayatlas.wsu.edu/docs/python/build) | The `xa.model(...)` builder, drafts, publishing, sharing, forking, reviews | +| [Compare](https://xrayatlas.wsu.edu/docs/python/compare) | Align peaks and normalized channels across models | +| [Reproduce](https://xrayatlas.wsu.edu/docs/python/reproduce) | Lockfiles with `xa.lock` and `xa.restore` | +| [Concepts](https://xrayatlas.wsu.edu/docs/python/concepts) | Datasets, versions, models, and what the server computes | +| [Errors](https://xrayatlas.wsu.edu/docs/python/errors) | The `AtlasError` hierarchy and when each error is raised | +| [Reference](https://xrayatlas.wsu.edu/docs/python/reference) | Full API reference | -xa.lock("analysis.lock") # writes ./analysis.lock; returns the Path written -``` +Runnable scripts for each workflow live in +[`examples/`](https://github.com/WSU-Carbon-Lab/atlas-python/tree/main/examples). -The lockfile pins one Atlas host, the dataset versions, and the model versions with their -checksums — no tokens, no ORCID. Dataset pins are version strings rather than content digests, so a -restore proves the revision, not byte-for-byte dataset content; model pins additionally carry the -version checksum. The registry is per process: `lock()` refuses to mix entries from two hosts, and -`from xrayatlas.lock import reset` clears it. Re-run the session later at exactly those revisions: +## Development -```python -xa.restore("analysis.lock") +```bash +uv sync +uv run pytest +uv run ruff check . && uv run ruff format --check . && uv run mypy src ``` -`restore` re-fetches each pin at exactly its recorded version and re-registers what it fetched. A -restore fails with `ConflictError` when a pinned dataset version is unavailable (neither current -nor cached) or when a model's content checksum no longer matches the pinned one. - -## Errors +Releases publish to PyPI automatically when a merge to `main` changes `version` in +`pyproject.toml` (`uv version --bump patch|minor|major`); see +[`.github/workflows/release.yml`](https://github.com/WSU-Carbon-Lab/atlas-python/blob/main/.github/workflows/release.yml). -All client errors derive from `AtlasError`: +## License -| Error | Raised when | -| --- | --- | -| `AtlasError` | Anything unexpected: a malformed server response, an unsafe archive path, a tensor digest mismatch, a truncated export, or citing a draft. Carries only a message. | -| `ApiError` | Base of the HTTP failures; carries `status`, `code`, and `app_code`. | -| `NetworkError` | The server could not be reached (connection failure or timeout, after retries). | -| `AuthError` | HTTP 401: the token is missing, expired, or revoked. | -| `ForbiddenError` | HTTP 403: the token lacks a scope or the action is not allowed for you. | -| `NotFoundError` | HTTP 404: the object does not exist or is not visible to the caller. | -| `ConflictError` | HTTP 409: the object changed or another request won a race — a stale draft publish, a pinned version that is neither current nor cached, or a lockfile checksum mismatch. | -| `ValidationError` | HTTP 400 or 422 from the server, or input the client rejected before sending anything. | +BSD-3-Clause. See [LICENSE](https://github.com/WSU-Carbon-Lab/atlas-python/blob/main/LICENSE). diff --git a/examples/README.md b/examples/README.md index 7c2ae78..c8eeb79 100644 --- a/examples/README.md +++ b/examples/README.md @@ -1,7 +1,7 @@ # Example scripts -Run these from `extensions/python` after `uv pip install ./extensions/python` (or `uv sync`), and -log in once with `xatlas login` (the [CLI](../README.md#install-and-login) is `extensions/cli`). +Run these from a checkout of this repository after `uv sync` (or with `pip install xrayatlas`), and +log in once with `xatlas login` (see the [CLI guide](https://xrayatlas.wsu.edu/docs/cli)). Public datasets and public models also read anonymously; writes need a token. | Script | What it shows | diff --git a/pyproject.toml b/pyproject.toml index 35c4d35..4d5cbea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,32 @@ readme = "README.md" authors = [ { name = "Harlan D Heilman", email = "73567020+HarlanHeilman@users.noreply.github.com" } ] +license = "BSD-3-Clause" +license-files = ["LICENSE"] requires-python = ">=3.10" +keywords = [ + "nexafs", + "xanes", + "x-ray absorption", + "spectroscopy", + "optical constants", + "synchrotron", +] +classifiers = [ + "Development Status :: 3 - Alpha", + "Intended Audience :: Science/Research", + "Operating System :: OS Independent", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", + "Topic :: Scientific/Engineering :: Chemistry", + "Topic :: Scientific/Engineering :: Physics", + "Typing :: Typed", +] dependencies = [ "httpx>=0.28.1", "numpy>=2.2.6", @@ -14,8 +39,15 @@ dependencies = [ "pydantic>=2", ] +[project.urls] +Homepage = "https://xrayatlas.wsu.edu" +Documentation = "https://xrayatlas.wsu.edu/docs/python" +Source = "https://github.com/WSU-Carbon-Lab/atlas-python" +Issues = "https://github.com/WSU-Carbon-Lab/atlas-python/issues" +Releases = "https://github.com/WSU-Carbon-Lab/atlas-python/releases" + [build-system] -requires = ["hatchling"] +requires = ["hatchling>=1.27"] build-backend = "hatchling.build" [dependency-groups] @@ -43,3 +75,6 @@ known-first-party = ["xrayatlas", "_shared"] [tool.mypy] strict = true python_version = "3.10" + +[tool.hatch.build.targets.sdist] +exclude = [".github", ".python-version", "uv.lock"] From 0b7d6d345dd38a94550ec85631d7a1410e2f8ba9 Mon Sep 17 00:00:00 2001 From: Harlan D Heilman <73567020+HarlanHeilman@users.noreply.github.com> Date: Mon, 9 Nov 2026 11:15:22 -0800 Subject: [PATCH 3/3] ci: pin setup-uv to v10.3.3 Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci.yml | 6 +++--- .github/workflows/release.yml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 83f5469..7424d8a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,7 @@ jobs: timeout-minutes: 10 steps: - uses: actions/checkout@v7 - - uses: astral-sh/setup-uv@v10 + - uses: astral-sh/setup-uv@v10.3.3 with: python-version: "3.10" enable-cache: true @@ -47,7 +47,7 @@ jobs: python: ["3.10", "3.11", "3.12", "3.13", "3.14"] steps: - uses: actions/checkout@v7 - - uses: astral-sh/setup-uv@v10 + - uses: astral-sh/setup-uv@v10.3.3 with: python-version: ${{ matrix.python }} enable-cache: true @@ -61,7 +61,7 @@ jobs: timeout-minutes: 10 steps: - uses: actions/checkout@v7 - - uses: astral-sh/setup-uv@v10 + - uses: astral-sh/setup-uv@v10.3.3 - name: build wheel and sdist run: uv build --out-dir dist - name: check metadata diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d55ce6e..6569597 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -41,7 +41,7 @@ jobs: version: ${{ steps.v.outputs.version }} steps: - uses: actions/checkout@v7 - - uses: astral-sh/setup-uv@v10 + - uses: astral-sh/setup-uv@v10.3.3 - id: v run: | version="$(uv version --short)" @@ -68,7 +68,7 @@ jobs: timeout-minutes: 10 steps: - uses: actions/checkout@v7 - - uses: astral-sh/setup-uv@v10 + - uses: astral-sh/setup-uv@v10.3.3 - name: build run: uv build --out-dir dist - name: assert artifact names match the release version