Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
15f5224
Improve syntax error messages in eval tests
polischuks Feb 13, 2025
9012664
Refactor error messages in test cases for clarity and consistency
polischuks Feb 14, 2025
d4e0614
Update GitHub Actions workflow to use Python 3.12 and latest action v…
polischuks Feb 14, 2025
7327f65
Add CI workflow for linting, type checking, and testing with multiple…
polischuks Feb 14, 2025
79f8c87
Migrate project to Poetry for dependency management and update Python…
polischuks Feb 14, 2025
43ebc7a
Backend: Auto format
github-actions[bot] Feb 14, 2025
3a793d8
Update CI workflow to use arc-runners-small for Python versions 3.10,…
polischuks Feb 14, 2025
0899a41
Enhance CI workflow to support Poetry installation on both Unix and W…
polischuks Feb 14, 2025
1b8878e
Refactor graph type handling and update requirements for cross-platfo…
polischuks Feb 14, 2025
0734b78
Add type hints to test files for improved clarity and type checking
polischuks Feb 14, 2025
2ab6df1
Add type hints to test files for improved clarity and type checking
polischuks Feb 14, 2025
7151fef
Add mypy configuration for type checking and numpy support
polischuks Feb 14, 2025
93ec52f
Add type hints to test file for improved clarity and type checking
polischuks Feb 14, 2025
faac723
Add type hints to test file for improved clarity and type checking
polischuks Feb 14, 2025
652e586
Add CheckResult import to test files for enhanced result checking
polischuks Feb 15, 2025
f25e8cb
Add type hints to test files for improved clarity and type checking
polischuks Feb 15, 2025
7121c10
Refactor CI workflow and add type hint for OutcomeError in stage_test.py
polischuks Feb 15, 2025
f59edb2
Refactor matplotlib_handler to use direct import for Axes and improve…
polischuks Feb 15, 2025
d84440b
Backend: Auto format
github-actions[bot] Feb 15, 2025
19303af
Enhance error message normalization in ExpectedFailTest for improved …
polischuks Feb 15, 2025
b09696c
Backend: Auto format
github-actions[bot] Feb 15, 2025
1eba272
Update CI workflow to use latest Ubuntu and Windows runners with mult…
polischuks Feb 15, 2025
8c1e2fe
Merge remote-tracking branch 'origin/pre-release' into pre-release
polischuks Feb 15, 2025
5ee2496
Enhance error handling and platform-specific command execution in Pyt…
polischuks Feb 15, 2025
e24cd3a
Backend: Auto format
github-actions[bot] Feb 15, 2025
e33bd7a
Enhance error handling and platform-specific command execution in Pyt…
polischuks Feb 15, 2025
fe5aa52
Backend: Auto format
github-actions[bot] Feb 15, 2025
6984a1d
Refactor python_executor to use is_windows utility for OS checks
polischuks Feb 15, 2025
f38f7db
Enhance error handling and Windows compatibility in failure handler a…
polischuks Feb 15, 2025
3cdc3e9
Enhance traceback formatting in failure handler and update CI workflo…
polischuks Feb 15, 2025
4d2469c
Backend: Auto format
github-actions[bot] Feb 15, 2025
f82e68f
Enhance input handling in process wrapper to ensure newline terminati…
polischuks Feb 15, 2025
60f6d93
Backend: Auto format
github-actions[bot] Feb 15, 2025
18eda9f
Enhance CI workflow to include Python 3.11 and 3.12 for Windows compa…
polischuks Feb 15, 2025
8c96438
Enhance CI workflow to configure environment variables for Windows co…
polischuks Feb 15, 2025
217fb5c
Enhance CI workflow to uncomment Python versions for Ubuntu and macOS
polischuks Feb 15, 2025
a3e24f4
Add GitHub Actions workflow for automatic author assignment on pull r…
polischuks Feb 15, 2025
5a85ad5
Add GitHub Actions workflow for automatic code formatting with ruff
polischuks Feb 15, 2025
d4239d8
Enhance CI workflow to update wheel URLs and manage releases automati…
polischuks Feb 15, 2025
d04f39d
Refactor CI workflows to improve job names and streamline formatting …
polischuks Feb 15, 2025
efe79d4
Update CI workflow to rename lint job and streamline ruff formatting …
polischuks Feb 15, 2025
4b90a55
fix:
polischuks Feb 24, 2025
37fd695
fix:
polischuks Feb 24, 2025
c89e6ab
ci: make ruff checks stricter by removing --exit-zero flag
polischuks Feb 24, 2025
beca51e
ci: simplify test matrix configuration
polischuks Feb 24, 2025
dc0a8f6
ci: create reusable action for reading Python version
polischuks Feb 24, 2025
534354d
refactor: removed main.yaml
polischuks Feb 24, 2025
1a2ca40
refactor: removed unused files
polischuks Feb 24, 2025
fbbae3c
refactor:
polischuks Feb 24, 2025
c0ace61
ci: simplify Python and Poetry version handling
polischuks Feb 24, 2025
5ae166f
style: update ruff configuration
polischuks Feb 25, 2025
17de012
style: update ruff configuration
polischuks Feb 25, 2025
3acb3f7
refactor: deleted unused mypy.ini
polischuks Feb 25, 2025
a91af1b
feat: added python 3.13 to testing flow
polischuks Feb 25, 2025
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
77 changes: 77 additions & 0 deletions .github/workflows/actions/prepare/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: 'Prepare environment'
description: 'Prepare environment'

inputs:
python-version:
description: 'Python version to use'
required: true

runs:
using: "composite"
steps:
- name: Set up Python paths (Unix)
if: runner.os != 'Windows'
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
shell: bash

- name: Set up Python paths (Windows)
if: runner.os == 'Windows'
run: echo "$env:APPDATA\Python\Scripts" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
shell: pwsh

- name: Get Poetry version
id: poetry-version
run: |
[ -f .poetry-version ] && echo "version=$(head -n 1 .poetry-version)" >> $GITHUB_OUTPUT
shell: bash

- name: Install Poetry (Unix)
if: runner.os != 'Windows'
run: pipx install poetry==${{ steps.poetry-version.outputs.version }}
shell: bash

- name: Install Poetry (Windows)
if: runner.os == 'Windows'
run: pipx install poetry==${{ steps.poetry-version.outputs.version }}
shell: pwsh

- uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
cache: 'poetry'

- name: Clear Poetry cache (Unix)
if: runner.os != 'Windows'
run: poetry cache clear --all pypi
shell: bash

- name: Clear Poetry cache (Windows)
if: runner.os == 'Windows'
run: poetry cache clear --all pypi
shell: pwsh

- name: Install dependencies and package (Unix)
if: runner.os != 'Windows'
run: poetry install --no-interaction --no-ansi
shell: bash

- name: Install dependencies and package (Windows)
if: runner.os == 'Windows'
run: poetry install --no-interaction --no-ansi
shell: pwsh

# Setup Node.js for JavaScript tests
- uses: actions/setup-node@v4
with:
node-version: '20'

# Install Node.js dependencies
- name: Install Node.js dependencies
run: npm install
shell: bash

# Setup Go for Go language tests
- uses: actions/setup-go@v5
with:
go-version: '1.21'
cache: false
16 changes: 16 additions & 0 deletions .github/workflows/auto-author-assign.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Auto Author Assign

on:
pull_request_target:
types: [ opened, reopened ]

permissions:
pull-requests: write

jobs:
assign-author:
runs-on: arc-runners-small
timeout-minutes: 30
if: ${{ !github.event.pull_request.assignee }}
steps:
- uses: toshimaru/auto-author-assign@v2.1.0
46 changes: 46 additions & 0 deletions .github/workflows/auto-format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Auto format

on:
push:
branches:
- master
- release
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true

jobs:
auto_format:
name: Auto format with ruff
runs-on: arc-runners-small
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}

- name: Get Python version
id: python_version
run: echo "python_version=$(head -n 1 .python-version)" >> $GITHUB_OUTPUT
shell: bash

- uses: ./.github/workflows/actions/prepare
with:
python-version: ${{ steps.python_version.outputs.python_version }}

- name: Check files using the ruff formatter
run: |
poetry run ruff check --fix --unsafe-fixes --preview --exit-zero .
poetry run ruff format .
shell: bash

- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
fetch: false
default_author: github_actions
message: 'Backend: Auto format'
add: '.'
118 changes: 118 additions & 0 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
name: Build Wheels

on:
push:
tags:
- 'v*'
workflow_dispatch:

jobs:
build_wheels:
name: Build psutil wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
permissions:
contents: write
strategy:
matrix:
os: [ "ubuntu-latest", "windows-latest", "macos-14" ]
python-version: [ "3.10", "3.11", "3.12" ]
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install build dependencies
run: |
python -m pip install pip wheel
shell: bash

- name: Build psutil wheel
run: |
# Create dist directory
mkdir -p dist

# Build psutil wheel
pip wheel psutil==5.8.0 --wheel-dir dist/
shell: bash

- name: Upload to GitHub Actions
uses: actions/upload-artifact@v4
with:
name: dist-${{ matrix.os }}-py${{ matrix.python-version }}
path: dist/*

release:
needs: build_wheels
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: release

- name: Download all artifacts
uses: actions/download-artifact@v4
with:
pattern: dist-*
path: dist
merge-multiple: true

- name: Get tag version
id: get_version
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
shell: bash

- name: Update wheel URLs in pyproject.toml
run: |
# Get the version without the 'v' prefix
VERSION="${{ steps.get_version.outputs.VERSION }}"

# Update URLs in pyproject.toml
sed -i "s|/releases/download/v[0-9]\+\.[0-9]\+\.[0-9]\+/|/releases/download/${VERSION}/|g" pyproject.toml

# Update poetry.lock
poetry lock --no-update

# Commit changes
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git add pyproject.toml poetry.lock
git commit -m "Update wheel URLs to ${VERSION}"

# Force update the release branch
git push origin release --force

# Create/update tag to point to the new commit
git tag -f "${VERSION}"
git push origin "${VERSION}" --force
shell: bash

- name: Create Release
uses: softprops/action-gh-release@v2
with:
files: |
dist/*
pyproject.toml
body: |
Release ${{ steps.get_version.outputs.VERSION }}

This release includes:
- Updated wheel builds for Python 3.10, 3.11, and 3.12
- Updated pyproject.toml with correct wheel URLs
draft: false
prerelease: false
target_commitish: release

- name: Merge release into master
run: |
git checkout master
git pull origin master
git merge release --no-ff -m "Merge release ${VERSION} into master"
git push origin master
shell: bash
97 changes: 97 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
name: CI

on:
push:
branches:
- master
- release
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true

jobs:
lint:
name: Lint with ruff
runs-on: arc-runners-small
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}

- name: Get Python version
id: python_version
run: echo "python_version=$(head -n 1 .python-version)" >> $GITHUB_OUTPUT
shell: bash

- uses: ./.github/workflows/actions/prepare
with:
python-version: ${{ steps.python_version.outputs.python_version }}

- name: Check files using the ruff formatter
run: |
poetry run ruff check --fix --unsafe-fixes --preview .
shell: bash
- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
fetch: false
default_author: github_actions
message: 'Backend: Auto format'
add: '.'

mypy:
name: Static Type Checking
needs: lint
runs-on: arc-runners-small
timeout-minutes: 30
steps:
- uses: actions/checkout@v4

- name: Get Python version
id: python_version
run: echo "python_version=$(head -n 1 .python-version)" >> $GITHUB_OUTPUT
shell: bash

- uses: ./.github/workflows/actions/prepare
with:
python-version: ${{ steps.python_version.outputs.python_version }}

- name: Mypy
run: poetry run mypy .
shell: bash

test:
name: Run unit test on ${{ matrix.os }} with Python ${{ matrix.python-version }}
needs: lint
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ "ubuntu-latest", "windows-latest", "macos-14" ]
python-version: [ "3.10", "3.11", "3.12", "3.13" ]
steps:
- uses: actions/checkout@v4

- uses: ./.github/workflows/actions/prepare
with:
python-version: ${{ matrix.python-version }}

# Set environment variables for Windows
- name: Configure Windows environment
if: runner.os == 'Windows'
run: |
echo "PYTHONIOENCODING=utf-8" >> $GITHUB_ENV
echo "PYTHONUTF8=1" >> $GITHUB_ENV
echo "PYTHONLEGACYWINDOWSSTDIO=0" >> $GITHUB_ENV
shell: bash
- name: Run Tests
run: poetry run python tests/testing.py
shell: bash
env:
PYTHONIOENCODING: utf-8
PYTHONUTF8: 1
PYTHONLEGACYWINDOWSSTDIO: 0
Loading
Loading