Skip to content

Commit 4f982df

Browse files
authored
Merge pull request #3 from FujitsuResearch/feature/pypi
Set up PyPI publishing with Trusted Publishers and GitHub Actions
2 parents 4c43e7c + 2b9dde9 commit 4f982df

6 files changed

Lines changed: 141 additions & 82 deletions

File tree

.github/workflows/publish.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
13+
- name: Install uv
14+
uses: astral-sh/setup-uv@v4
15+
16+
- name: Build sdist and wheel
17+
run: uv build
18+
19+
- name: Upload build artifacts
20+
uses: actions/upload-artifact@v4
21+
with:
22+
name: dist
23+
path: dist/
24+
25+
publish:
26+
needs: build
27+
runs-on: ubuntu-latest
28+
environment: pypi
29+
permissions:
30+
id-token: write
31+
steps:
32+
- name: Download build artifacts
33+
uses: actions/download-artifact@v4
34+
with:
35+
name: dist
36+
path: dist/
37+
38+
- name: Publish to PyPI
39+
uses: pypa/gh-action-pypi-publish@release/v1

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
*.swp
22
__pycache__
33
*.egg-info
4+
dist/
5+
build/
46
models
57
.vscode/
68
.cursor/rules/benchmark-directory.mdc

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
## [v1.0.0] 2026-03-31
44

5+
### PyPI Publishing Setup
6+
7+
- Added PyPI metadata to `pyproject.toml`: `keywords`, `classifiers`, and `project.urls` (Homepage, Documentation, Repository, Bug Tracker, Changelog)
8+
- Removed `gemlite` optional-dependency extra that used direct git URLs (PEP 440 violation); equivalent packages are already in main `dependencies`
9+
- Added `.github/workflows/publish.yml`: automated PyPI publishing via Trusted Publishers (OIDC) on GitHub Release
10+
- Updated `README.md`: installation command changed from `pip install git+<URL>` to `pip install onecomp`
11+
- Added `dist/` and `build/` to `.gitignore`
12+
- Updated `uv.lock`
13+
514
### Default Parameter Changes
615

716
- Changed `Runner.__init__` default values for calibration parameters:

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ print(torch.cuda.is_available())
7474
Once PyTorch is installed, you can install `onecomp`:
7575

7676
```bash
77-
pip install git+<git repository URL>
77+
pip install onecomp
7878
```
7979

8080
### for developers (uv : recommended)
@@ -90,7 +90,7 @@ With its Rust-based dependency resolver and the `uv.lock` lockfile, uv provides
9090
curl -LsSf https://astral.sh/uv/install.sh | sh
9191

9292
git clone <git repository URL>
93-
cd onecomp
93+
cd OneCompression
9494
uv sync --extra cu128 --extra dev
9595
```
9696

@@ -135,8 +135,8 @@ black --check onecomp/
135135

136136
```bash
137137
git clone <git repository URL>
138+
cd OneCompression
138139

139-
cd onecomp
140140
# First, install PyTorch with CUDA support for your environment
141141
pip install torch --index-url https://download.pytorch.org/whl/cu128
142142
# Then install onecomp with development dependencies

pyproject.toml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,16 @@ authors = [
1212
{name = "Keiji Kimura"},
1313
]
1414
requires-python = ">=3.12, <3.14"
15+
keywords = ["llm", "quantization", "compression", "post-training-quantization", "gptq"]
16+
classifiers = [
17+
"Development Status :: 4 - Beta",
18+
"License :: OSI Approved :: MIT License",
19+
"Programming Language :: Python :: 3",
20+
"Programming Language :: Python :: 3.12",
21+
"Programming Language :: Python :: 3.13",
22+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
23+
"Intended Audience :: Science/Research",
24+
]
1525
dependencies = [
1626
"transformers >= 5.3.0",
1727
"accelerate",
@@ -25,6 +35,13 @@ dependencies = [
2535
"ortools>=9.15.6755",
2636
]
2737

38+
[project.urls]
39+
Homepage = "https://github.com/FujitsuResearch/OneCompression"
40+
Documentation = "https://FujitsuResearch.github.io/OneCompression/"
41+
Repository = "https://github.com/FujitsuResearch/OneCompression"
42+
"Bug Tracker" = "https://github.com/FujitsuResearch/OneCompression/issues"
43+
Changelog = "https://github.com/FujitsuResearch/OneCompression/blob/main/CHANGELOG.md"
44+
2845
[project.scripts]
2946
onecomp = "onecomp.cli:main"
3047

@@ -41,10 +58,6 @@ dev = [
4158
"pylint",
4259
"pytest",
4360
]
44-
gemlite = [
45-
"gemlite @ git+https://github.com/mobiusml/gemlite.git",
46-
"hqq @ git+https://github.com/mobiusml/hqq.git",
47-
]
4861
vllm = ["vllm"]
4962
docs = [
5063
"mkdocs-material",

0 commit comments

Comments
 (0)