Skip to content

Commit 6bc7a16

Browse files
WIP Add package and release workflow
1 parent 602eec2 commit 6bc7a16

3 files changed

Lines changed: 89 additions & 2 deletions

File tree

.github/workflows/package.yaml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Package
2+
on:
3+
workflow_dispatch:
4+
pull_request:
5+
6+
# Cancel any ongoing run of this workflow on the same PR or ref
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
9+
cancel-in-progress: true
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout sources
16+
uses: actions/checkout@v4
17+
- name: Setup uv
18+
uses: astral-sh/setup-uv@v6
19+
with:
20+
python-version: '3.14'
21+
enable-cache: true
22+
- name: Build Package
23+
run: |
24+
uv build --sdist
25+
- name: Upload package artifact
26+
uses: actions/upload-artifact@v6
27+
with:
28+
name: pip-package
29+
path: dist/
30+
publish-pypi:
31+
if: github.ref_type == 'tag'
32+
needs: [build]
33+
runs-on: ubuntu-latest
34+
environment:
35+
name: pypi
36+
url: https://pypi.org/p/khalib
37+
permissions:
38+
id-token: write
39+
steps:
40+
- name: Download package artifact
41+
uses: actions/download-artifact@v6
42+
with:
43+
name: pip-package
44+
path: dist/
45+
- name: Publish to PyPI
46+
uses: pypa/gh-action-pypi-publish@release/v1
47+
publish-testpypi:
48+
needs: [build]
49+
runs-on: ubuntu-latest
50+
environment:
51+
name: testpypi
52+
url: https://test.pypi.org/p/khalib
53+
permissions:
54+
id-token: write
55+
steps:
56+
- name: Download package artifact
57+
uses: actions/download-artifact@v6
58+
with:
59+
name: pip-package
60+
path: dist/
61+
- name: Publish to TestPyPI
62+
uses: pypa/gh-action-pypi-publish@release/v1
63+
with:
64+
repository-url: https://test.pypi.org/legacy/

pyproject.toml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "khalib"
7-
version = "0.1"
7+
version = "0.2rc2"
88
description = "Classifier Calibration with Khiops"
99
authors = [{ name = "Felipe Olmos", email = "luisfelipe.olmosmarchant@orange.com" }]
1010
requires-python = ">=3.11"
@@ -14,8 +14,31 @@ dependencies = [
1414
"scikit-learn>=1.5.0",
1515
"matplotlib>=3.9.0",
1616
]
17+
readme = "README.md"
1718
license = "BSD-3-Clause"
1819
license-files = ["LICENSE.md"]
20+
classifiers=[
21+
"Intended Audience :: Science/Research",
22+
"Intended Audience :: Developers",
23+
"Programming Language :: Python",
24+
"Topic :: Software Development",
25+
"Topic :: Scientific/Engineering",
26+
"Development Status :: 5 - Production/Stable",
27+
"Operating System :: Microsoft :: Windows",
28+
"Operating System :: POSIX",
29+
"Operating System :: Unix",
30+
"Operating System :: MacOS",
31+
"Programming Language :: Python :: 3",
32+
"Programming Language :: Python :: 3.11",
33+
"Programming Language :: Python :: 3.12",
34+
"Programming Language :: Python :: 3.13",
35+
"Programming Language :: Python :: 3.14",
36+
]
37+
[project.urls]
38+
homepage = "https://khiopslab.github.io/khalib"
39+
source = "https://github.com/KhiopsLab/khalib"
40+
tracker = "https://github.com/KhiopsLab/khalib/issues"
41+
changelog = "https://github.com/KhiopsLab/khalib/blob/main/CHANGELOG.md"
1942

2043

2144
[tool.setuptools.packages.find]

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)