Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Python uv Release

on:
push:
tags:
- "v*.*.*"

permissions:
contents: write # required for GitHub Release
id-token: write # required for PyPI Trusted Publishing
actions: write # required for tag deletion

jobs:
release:
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
Copy link

Copilot AI Jul 11, 2025

Choose a reason for hiding this comment

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

Piping a remote script directly into shell can pose a security risk; consider pinning to a known version, verifying a checksum, or downloading the script separately for review before execution.

Suggested change
curl -LsSf https://astral.sh/uv/install.sh | sh
curl -LsSf -o install.sh https://astral.sh/uv/install.sh
echo "Expected checksum: <INSERT_CHECKSUM_HERE>"
echo "<INSERT_CHECKSUM_HERE> install.sh" | sha256sum --check --status
if [ $? -ne 0 ]; then
echo "Checksum verification failed! Exiting..."
exit 1
fi
sh install.sh

Copilot uses AI. Check for mistakes.
echo "$HOME/.cargo/bin" >> $GITHUB_PATH

- name: Sync dependencies
run: uv sync

- name: Run tests
id: test
continue-on-error: true
run: uv run pytest

- name: Delete tag on failure
if: steps.test.conclusion == 'failure'
run: |
echo "Tests failed. Deleting tag ${GITHUB_REF#refs/tags/}..."
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git push --delete origin ${GITHUB_REF#refs/tags/}
exit 1

- name: Build package
run: uv build

- name: Build changelog
id: gen_changelog
uses: mikepenz/release-changelog-builder-action@v5
with:
failOnError: "true"
configuration: .github/workflows/release_config.json
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Publish release on GitHub
uses: softprops/action-gh-release@v1
with:
files: dist/*
body: ${{ steps.gen_changelog.outputs.changelog }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Publish to PyPI via Trusted Publishing
run: uv publish
65 changes: 65 additions & 0 deletions .github/workflows/release_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"categories": [
{
"title": "## ✨ Release",
"labels": [
"release"
]
},
{
"title": "## 🚀 Features",
"labels": [
"kind/feature",
"enhancement"
]
},
{
"title": "## 🐛 Fixes",
"labels": [
"fix",
"bug"
]
},
{
"title": "## ♻️ Refactoring",
"labels": [
"refactoring"
]
},
{
"title": "## ⚡️ Performance Improvements",
"labels": [
"performance"
]
},
{
"title": "## \uD83D\uDCDA Documentation",
"labels": [
"documentation",
"doc"
]
},
{
"title": "## \uD83D\uDEA6 Tests",
"labels": [
"test"
]
},
{
"title": "## \uD83D\uDEE0 Other Updates",
Comment on lines +36 to +49
Copy link

Copilot AI Jul 11, 2025

Choose a reason for hiding this comment

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

[nitpick] Using Unicode escape sequences in the JSON reduces readability; consider using the actual emoji character (📚) for clarity and easier editing.

Suggested change
"title": "## \uD83D\uDCDA Documentation",
"labels": [
"documentation",
"doc"
]
},
{
"title": "## \uD83D\uDEA6 Tests",
"labels": [
"test"
]
},
{
"title": "## \uD83D\uDEE0 Other Updates",
"title": "## 📚 Documentation",
"labels": [
"documentation",
"doc"
]
},
{
"title": "## 🚦 Tests",
"labels": [
"test"
]
},
{
"title": "## 🛠 Other Updates",

Copilot uses AI. Check for mistakes.
"labels": [
"other",
"kind/dependency-change"
]
},
{
"title": "## 🚨 Breaking Changes",
"labels": [
"breaking"
]
}
],
"ignore_labels": [
"ignore"
]
}
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Input path validation in CLI main function to check if the provided input path exists
- Logger import for better error handling and logging capabilities
- Comprehensive system package requirements documentation in README.md
- Platform-specific installation instructions for Ubuntu/Debian, Fedora/RHEL/CentOS, and macOS
- Enhanced error reporting in command execution helper with detailed error output logging
- Support for multiple Python version managers (pyenv, conda, asdf) in base interpreter detection

### Changed
- Improved CLI error handling with proper logging when input path does not exist
- Test configuration updates:
- Removed unused app import from conftest.py
- Updated test_cli_call_symbol_table to use verbose flag (-v) instead of --quiet flag
- Improved virtual environment creation error handling with informative error messages
- Enhanced `_get_base_interpreter()` method with robust Python interpreter detection across different environments
- Updated README.md with detailed prerequisite packages including development tools and Python headers

### Fixed
- CLI now properly exits with error code 1 when input path doesn't exist instead of proceeding with invalid path
- Virtual environment creation issues on systems missing python3-venv package
- Type safety issues in subprocess command execution by ensuring all arguments are strings
- Cross-platform compatibility for Python interpreter detection

## [0.1.0] - Initial Release

Expand All @@ -32,4 +42,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Caching system with configurable cache directory
- Output artifacts in JSON format
- Verbosity controls for logging
- Eager/lazy analysis modes
- Eager/lazy analysis modes
Loading