Skip to content

Commit cbb2f27

Browse files
gdevenyiclaude
andcommitted
Update GitHub Actions to use uv for building
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 1941ff1 commit cbb2f27

File tree

2 files changed

+16
-30
lines changed

2 files changed

+16
-30
lines changed

.github/workflows/publish.yml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,11 @@ jobs:
1616
id-token: write
1717
steps:
1818
- uses: actions/checkout@v4
19-
- name: Set up Python
20-
uses: actions/setup-python@v4
19+
- name: Install uv
20+
uses: astral-sh/setup-uv@v4
2121
with:
22-
python-version: "3.x"
23-
- name: Install dependencies
24-
run: |
25-
python -m pip install --upgrade pip
26-
pip install setuptools wheel
22+
enable-cache: true
2723
- name: Build package
28-
run: |
29-
python setup.py sdist bdist_wheel # Could also be python -m build
24+
run: uv build
3025
- name: Publish package distributions to PyPI
3126
uses: pypa/gh-action-pypi-publish@release/v1

CLAUDE.md

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,31 +11,31 @@ qbatch is a command-line tool and Python library for executing shell commands in
1111
### Testing
1212
```bash
1313
# Run all tests
14-
nosetests test/test_qbatch.py
14+
pytest test/test_qbatch.py
1515

1616
# Run a specific test
17-
nosetests test/test_qbatch.py:test_run_qbatch_local_piped_commands
17+
pytest test/test_qbatch.py::test_run_qbatch_local_piped_commands
1818

1919
# Run with verbose output
20-
nosetests -v test/test_qbatch.py
20+
pytest -v test/test_qbatch.py
2121
```
2222

2323
### Building
2424
```bash
25-
# Build source distribution and wheel
26-
python setup.py sdist bdist_wheel
25+
# Build source distribution and wheel using uv
26+
uv build
2727

2828
# Build for local testing
29-
pip install -e .
29+
uv pip install -e .
3030
```
3131

3232
### Installation
3333
```bash
3434
# Install from source
3535
pip install .
3636

37-
# Install with testing dependencies
38-
pip install -r requirements-testing.txt
37+
# Install with uv
38+
uv pip install .
3939
```
4040

4141
## Architecture
@@ -100,24 +100,15 @@ All defaults can be overridden via environment variables (prefix `QBATCH_`):
100100

101101
## Testing Notes
102102

103-
Tests use `nosetests` and rely on:
103+
Tests use `pytest` and rely on:
104104
- Setting `QBATCH_SCRIPT_FOLDER` to a temp directory
105105
- Testing dry-run mode (`-n`) to avoid actual job submission
106106
- Simulating scheduler environment variables (e.g., `SGE_TASK_ID`, `PBS_ARRAYID`)
107-
- Using Python 2/3 compatibility via `future` library
108107

109108
Tests are integration-style, generating actual job scripts and verifying they produce expected output when executed.
110109

111-
## Python 2/3 Compatibility
112-
113-
The codebase maintains Python 2.7+ compatibility using:
114-
- `future` library for standard library aliases
115-
- Custom `_EnvironDict` class for UTF-8 environment variable handling on Python 2
116-
- `io.open()` for UTF-8 file handling
117-
- Careful string/unicode handling
118-
119110
## Version Management
120111

121-
- Version is defined in `setup.py` (line 14)
122-
- Uses `importlib.metadata` for version retrieval at runtime (line 9)
123-
- GitHub Actions workflow publishes releases to PyPI when a release is created
112+
- Version is defined in `pyproject.toml` (line 7)
113+
- Uses `importlib.metadata` for version retrieval at runtime
114+
- GitHub Actions workflow uses `uv` to build and publish releases to PyPI when a release is created

0 commit comments

Comments
 (0)