Skip to content

Commit 44aa792

Browse files
authored
Merge pull request #11 from PurcellLab/rewrite/modern-pip-pixi
HLA-PepClust: src/ packaging, numba engine, fetch-based reference, standalone report and class II
2 parents 50026a3 + f6c468c commit 44aa792

594 files changed

Lines changed: 9657 additions & 3680470 deletions

File tree

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: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: ["**"]
6+
pull_request:
7+
8+
jobs:
9+
test:
10+
name: test (linux)
11+
runs-on: ubuntu-latest
12+
# The pixi workspace targets linux-64 only (the dev `seq2logo` env needs
13+
# Python 2.7, which has no macOS-arm64/Windows conda builds), so CI runs on
14+
# Linux. The published wheel is pure-Python; cross-platform behaviour of the
15+
# numba engine / pyarrow is covered by their upstream wheels.
16+
steps:
17+
- uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0 # hatch-vcs derives the version from tags/history
20+
21+
- name: Set up pixi
22+
uses: prefix-dev/setup-pixi@v0.8.1
23+
with:
24+
pixi-version: latest
25+
environments: default
26+
27+
- name: Install package (editable)
28+
# Build isolation pulls the build backend (hatchling + hatch-vcs) from
29+
# build-system.requires; hatch-vcs needs the git history fetched above.
30+
run: pixi run pip install -e .
31+
32+
- name: Lint (ruff)
33+
run: pixi run ruff check src tests
34+
35+
- name: Format check (black)
36+
run: pixi run black --check src tests
37+
38+
- name: Tests (pytest)
39+
run: pixi run pytest -q

.github/workflows/matrix.yml

Lines changed: 0 additions & 77 deletions
This file was deleted.

.github/workflows/python-package.yml

Lines changed: 0 additions & 178 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Release
2+
3+
# Publishing a GitHub Release builds the package and uploads it to PyPI.
4+
# Mark the Release as a "pre-release" to route it to TestPyPI instead, so you
5+
# can `pip install -i https://test.pypi.org/simple/ hla-pepclust` and verify
6+
# before cutting the real thing. The version comes from the release tag via
7+
# hatch-vcs, so tag final releases like `v2.0.0` and pre-releases like
8+
# `v2.0.0rc1`.
9+
10+
on:
11+
release:
12+
types: [published]
13+
14+
jobs:
15+
build:
16+
name: Build sdist + wheel
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0 # hatch-vcs derives the version from tags/history
22+
23+
- uses: actions/setup-python@v5
24+
with:
25+
python-version: "3.11"
26+
27+
- name: Build
28+
run: |
29+
python -m pip install --upgrade build twine
30+
python -m build
31+
twine check dist/*
32+
33+
- uses: actions/upload-artifact@v4
34+
with:
35+
name: dist
36+
path: dist/
37+
38+
publish-testpypi:
39+
name: Publish to TestPyPI (pre-releases)
40+
needs: build
41+
if: github.event.release.prerelease
42+
runs-on: ubuntu-latest
43+
steps:
44+
- uses: actions/download-artifact@v4
45+
with:
46+
name: dist
47+
path: dist/
48+
- uses: pypa/gh-action-pypi-publish@release/v1
49+
with:
50+
repository-url: https://test.pypi.org/legacy/
51+
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
52+
53+
publish-pypi:
54+
name: Publish to PyPI
55+
needs: build
56+
if: ${{ ! github.event.release.prerelease }}
57+
runs-on: ubuntu-latest
58+
steps:
59+
- uses: actions/download-artifact@v4
60+
with:
61+
name: dist
62+
path: dist/
63+
- uses: pypa/gh-action-pypi-publish@release/v1
64+
with:
65+
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)