Skip to content

Commit f78937e

Browse files
committed
initial reorg of shared SDK
Signed-off-by: Lance Drane <dranelt@ornl.gov>
0 parents  commit f78937e

45 files changed

Lines changed: 5159 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- candidate-*
8+
pull_request:
9+
types: [opened, synchronize, reopened]
10+
branches:
11+
- main
12+
- candidate-*
13+
workflow_dispatch:
14+
15+
permissions:
16+
contents: read
17+
18+
jobs:
19+
lint:
20+
name: Ruff linting, formating, MyPy
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v6
24+
- name: Setup UV
25+
uses: astral-sh/setup-uv@v7
26+
with:
27+
python-version: "3.12"
28+
- name: Install dependencies
29+
run: |
30+
uv sync --locked --all-extras --all-groups
31+
- name: Run linters and type checks
32+
run: |
33+
uv run ruff format --check
34+
uv run ruff check
35+
uv run mypy src/intersect_sdk_common/
36+
37+
# Run unit tests only on Windows/MacOS, we can run the full test suite on Linux
38+
test-unit:
39+
name: Windows/MacOS unit tests
40+
strategy:
41+
matrix:
42+
python-version: ["3.10", "3.11", "3.12", "3.13"]
43+
os:
44+
- linux-latest
45+
- macos-latest
46+
- windows-latest
47+
runs-on: ${{ matrix.os }}
48+
steps:
49+
- uses: actions/checkout@v4
50+
- name: Setup UV
51+
uses: astral-sh/setup-uv@v7
52+
with:
53+
python-version: ${{ matrix.python-version }}
54+
- name: Install dependencies
55+
run: |
56+
uv sync --locked --all-extras --all-groups
57+
- name: Run tests
58+
run: uv run pytest tests/ --cov=src/intersect_sdk_common/ --cov-report=html:reports/htmlcov/ --cov-report=xml:reports/coverage_report.xml --junitxml=reports/junit.xml

.github/workflows/codespell.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Codespell configuration is within pyproject.toml
2+
---
3+
name: Codespell
4+
5+
on:
6+
push:
7+
branches: [main]
8+
pull_request:
9+
branches: [main]
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
codespell:
16+
name: Check for spelling errors
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
- name: Annotate locations with typos
23+
uses: codespell-project/codespell-problem-matcher@v1
24+
- name: Codespell
25+
uses: codespell-project/actions-codespell@v2

.github/workflows/publish.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Release to PyPi
2+
3+
on:
4+
push:
5+
tags:
6+
- "v[0-9]+.[0-9]+.[0-9]+*"
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: write
11+
id-token: write
12+
13+
jobs:
14+
build:
15+
if: startsWith(github.ref, 'refs/tags/')
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
- name: Setup UV
20+
uses: astral-sh/setup-uv@v7
21+
with:
22+
python-version: "3.12"
23+
- name: "Build package"
24+
run: uv build
25+
- name: Publish package to PyPI
26+
env:
27+
UV_PUBLISH_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
28+
run: uv publish --username __token__ --publish-url https://upload.pypi.org/legacy/
29+
- name: upload to github release
30+
uses: docker://antonyurchenko/git-release:v5
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
# assume any version with "a" (gets "ALPHA") or "b" (gets BETA) or "rc" (release candidates) will be a prerelease
34+
PRE_RELEASE: "${{ contains(github.ref_name, 'a') || contains(github.ref_name, 'b') || contains(github.ref_name, 'rc') }}"
35+
with:
36+
args: dist/*

0 commit comments

Comments
 (0)