Skip to content

📦 polars 패키지 배포/릴리스 파이프라인 정리#5

Merged
mingi3314 merged 10 commits intomainfrom
feat/polars-release-packaging
Apr 13, 2026
Merged

📦 polars 패키지 배포/릴리스 파이프라인 정리#5
mingi3314 merged 10 commits intomainfrom
feat/polars-release-packaging

Conversation

@mingi3314
Copy link
Copy Markdown
Contributor

@mingi3314 mingi3314 commented Apr 8, 2026

작업 배경

polars-techr를 현재 레이아웃 그대로 유지하면서 실제 배포 가능한 상태로 정리했습니다.
이번 PR의 목적은 다음 세 가지입니다.

  • wheel/sdist를 안정적으로 만들 수 있게 패키징 메타데이터를 보강
  • GitHub Actions에서 빌드/검증/배포 흐름을 자동화
  • 버전 관리와 CI 트리거 정책을 단순하게 유지

주요 변경 사항

패키징/메타데이터

  • polars/pyproject.toml
    • PEP 621 메타데이터 보강
    • polars>=1.39,<2로 런타임 의존성 범위 조정
    • dynamic = ["version"]로 변경해서 Python 패키지 버전을 Cargo.toml에서 가져오도록 변경
    • 불필요한 cache 파일이 wheel에 포함되지 않도록 maturin exclude 설정 추가
  • polars/Cargo.toml
    • 패키지 설명/라이선스/리포지토리 정보 추가
    • abi3-py310으로 ABI 기준 정렬
  • core/Cargo.toml
    • sdist 생성 시 경고가 나지 않도록 메타데이터 추가

검증 스크립트

  • polars/scripts/check_artifacts.py
    • wheel/sdist 내부 파일 구성 검사
    • __pycache__, *.pyc 같은 불필요 파일 포함 여부 검사
  • polars/scripts/smoke_import.py
    • 빌드된 wheel 설치 후 import polars_techr 및 기본 expression 호출 확인
  • 별도 버전 검증 스크립트는 제거했습니다.
    • 버전 소스는 Cargo.toml 하나로만 관리합니다.

CI / 릴리스 워크플로우

  • .github/workflows/polars-ci.yml
    • review_requested, ready_for_review 시점에만 실행
    • concurrency로 같은 ref의 중복 실행 취소
    • Rust 테스트, pytest, wheel/sdist 빌드, artifact 검사, smoke install 수행
  • .github/workflows/polars-release.yml
    • polars-vX.Y.Z 태그 시 PyPI 배포
    • workflow_dispatch 시 TestPyPI 배포
    • Linux/macOS/Windows wheel + sdist 빌드 포함

개발 흐름 정리

  • Makefile
    • test-polars 전에 maturin develop --uv 수행
    • build-prod-polars가 wheel + sdist를 함께 생성하도록 조정
  • polars/README.md
    • 개발/로컬 빌드/릴리스 절차 문서화
    • 버전 변경 지점을 Cargo.toml 기준으로 정리

리뷰 포인트

  • pyproject.toml의 dynamic version 구성이 현재 배포 정책과 맞는지
  • release workflow의 플랫폼 범위와 smoke test 수준이 적절한지
  • polars-ci 트리거를 review 시점으로 늦춘 정책이 팀 운영 방식과 맞는지
  • artifact 검사 기준이 과하게 빡빡하지 않은지

검증

  • cargo test -p techr-core
  • cd polars && uv run pytest
  • cd polars && uv run maturin build --release --sdist --out dist
  • cd polars && uv run python scripts/check_artifacts.py dist
  • uv run --isolated --python 3.13 --with .../polars_techr-0.1.0-...whl python .../smoke_import.py

후속 작업

이 PR이 머지되면 main 기준으로 Polars Release workflow를 수동 실행해서 TestPyPI 업로드를 먼저 검증한 뒤, 이상 없으면 polars-vX.Y.Z 태그로 PyPI 정식 배포를 진행하면 됩니다.

@mingi3314 mingi3314 changed the title Set up polars package release packaging and CI 📦 polars 패키지 배포/릴리스 파이프라인 정리 Apr 8, 2026
@mingi3314 mingi3314 requested a review from sjquant April 8, 2026 09:11
@mingi3314 mingi3314 self-assigned this Apr 8, 2026
@alphaprime-dev-discord
Copy link
Copy Markdown

- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.13"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

전체적으로 python-version을 3.13으로 쓰고 있는거 같습니다.

지원 범위가 >=3.10이고 ABI 기준도 abi3-py310이면 단일 버전만 유지할 경우 최소 지원 버전인 3.10을 쓰는 편이 더 보수적일거 같습니다.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

찾아보니까, setup-python은 host runner의 python 버전을 지정하는데,
maturin-action은 호스트 내에 별도로 띄운 컨테이너에서 maturin build를 돌리나봐요. 그래서 setup-python의 python 버전이 영향을 미치지 않는다고 합니다! (참고)

image

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uv run pytest 등도 여향을 받기 때문에 python 3.10으로 잡는게 보수적일거 같습니다!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

448ecad 넵 반영해서 수정해뒀습니다~!

@mingi3314 mingi3314 requested a review from sjquant April 13, 2026 04:21
Copy link
Copy Markdown
Collaborator

@sjquant sjquant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 👍 👍

@mingi3314 mingi3314 marked this pull request as draft April 13, 2026 04:30
@mingi3314 mingi3314 marked this pull request as ready for review April 13, 2026 04:30
@mingi3314 mingi3314 marked this pull request as draft April 13, 2026 04:33
@mingi3314 mingi3314 marked this pull request as ready for review April 13, 2026 04:33
@mingi3314 mingi3314 merged commit d1449d7 into main Apr 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants