Skip to content

Commit fb6ef7c

Browse files
polischuksmeanmailgithub-actions[bot]
authored
Release 052025 (#100)
* Update Python version and refactor CI/CD pipeline Upgraded Python version to 3.10.13. Refactored GitHub Actions workflows, renamed 'main.yml' to 'ci.yml', introduced new workflows for auto-formatter, and author assignment. Moreover, the 'requirements.txt' and 'setup.py' files have been removed as dependencies are managed by Poetry. (cherry picked from commit 5300951) * Refactor codebase to use pathlib and type annotations The codebase has been refactored to use the pathlib module for file handling operations, replacing the os module. Additionally, type annotations have been added throughout the codebase to improve readability and facilitate static type checking. These changes aim to enhance both the maintainability and reliability of the code. (cherry picked from commit e2ade20) * Update workflow configurations for Github Actions Modified the `.github/workflows/ci.yml` and `.github/workflows/auto-format.yml` files to streamline operations. Added a concurrency control which allows concurrent jobs to run in the workflow, and updated the names of the listed branches by removing unnecessary quotes. Also renamed `test-ubuntu` to `test` while improving its descriptor in the CI workflow. (cherry picked from commit f525391) * Update Poetry install command in CI config Updated the poetry install command in the continuous integration configuration (".github/workflows/ci.yml"). Removed the other flags and just added the "--sync" option for the Poetry install command to enforce a correct and complete installation of dependencies. (cherry picked from commit 9f8ec79) * Update poetry install command in workflow files The poetry install command in both '.github/workflows/actions/prepare/action.yml' and '.github/workflows/ci.yml' workflow files has been updated. The new command now includes '--no-root' option for better control of the installation process and removed the '--only main,dev' options to ensure all necessary dependencies are installed. (cherry picked from commit 048b9cc) * Refactor base_searcher and stage_test for improved exception handling and type annotations * Refactor base_searcher to improve path handling and enhance readability * Refactor base_searcher to simplify source path handling and improve clarity * Improve syntax error messages in eval tests * Refactor error messages in test cases for clarity and consistency * Update GitHub Actions workflow to use Python 3.12 and latest action versions * Add CI workflow for linting, type checking, and testing with multiple Python versions * Migrate project to Poetry for dependency management and update Python version requirements * Backend: Auto format * Update CI workflow to use arc-runners-small for Python versions 3.10, 3.11, and 3.12 * Enhance CI workflow to support Poetry installation on both Unix and Windows environments * Refactor graph type handling and update requirements for cross-platform compatibility * Add type hints to test files for improved clarity and type checking * Add type hints to test files for improved clarity and type checking * Add type hints to test file for improved clarity and type checking * Add type hints to test file for improved clarity and type checking * Add CheckResult import to test files for enhanced result checking * Add type hints to test files for improved clarity and type checking * Refactor CI workflow and add type hint for OutcomeError in stage_test.py * Refactor matplotlib_handler to use direct import for Axes and improve exception handling in stage_test * Backend: Auto format * Enhance error message normalization in ExpectedFailTest for improved feedback clarity * Backend: Auto format * Update CI workflow to use latest Ubuntu and Windows runners with multiple Python versions * Enhance error handling and platform-specific command execution in Python executor * Backend: Auto format * Enhance error handling and platform-specific command execution in Python executor * Enhance error handling and platform-specific command execution in Python executor * Backend: Auto format * Refactor python_executor to use is_windows utility for OS checks * Enhance error handling and Windows compatibility in failure handler and process wrapper * Enhance traceback formatting in failure handler and update CI workflow for Windows compatibility * Backend: Auto format * Enhance input handling in process wrapper to ensure newline termination and improve error handling * Backend: Auto format * Enhance CI workflow to include Python 3.11 and 3.12 for Windows compatibility * Enhance CI workflow to configure environment variables for Windows compatibility * Enhance CI workflow to uncomment Python versions for Ubuntu and macOS * Add GitHub Actions workflow for automatic code formatting with ruff * Enhance CI workflow to update wheel URLs and manage releases automatically * Refactor CI workflows to improve job names and streamline formatting steps * Update CI workflow to rename lint job and streamline ruff formatting steps * fix: * fix: * Update dependencies: bump psutil to 7.0.0, mypy to 1.13.0, pandas to 2.2.3, scipy to 1.15.3, and ruff to 0.7.3 * Backend: Auto format * Add .go-version and .node-version files; update action.yml to dynamically set Node.js and Go versions * Add support for Python 3.13 in CI workflow * Add Go version 1.21 to .go-version file * Fix: dynamically import PlottingTest and update __all__ list * Fix: dynamically import PlottingTest and update __all__ list * Backend: Auto format --------- Co-authored-by: meanmail <meanmail@meanmail.ru> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 152bdbb commit fb6ef7c

164 files changed

Lines changed: 3539 additions & 1760 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.flake8

Lines changed: 0 additions & 23 deletions
This file was deleted.

.github/dependabot.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
day: "monday"
8+
time: "00:00"
9+
groups:
10+
all-actions:
11+
patterns: [ "*" ]
12+
13+
- package-ecosystem: "pip"
14+
directory: "/"
15+
schedule:
16+
interval: "daily"
17+
time: "00:00"
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
name: 'Prepare environment'
2+
description: 'Prepare environment'
3+
4+
inputs:
5+
python-version:
6+
description: 'Python version to use'
7+
required: true
8+
9+
runs:
10+
using: "composite"
11+
steps:
12+
- name: Set up Python paths (Unix)
13+
if: runner.os != 'Windows'
14+
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
15+
shell: bash
16+
17+
- name: Set up Python paths (Windows)
18+
if: runner.os == 'Windows'
19+
run: echo "$env:APPDATA\Python\Scripts" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
20+
shell: pwsh
21+
22+
- name: Get Poetry version
23+
id: poetry-version
24+
run: |
25+
if [ -f .poetry-version ]; then
26+
echo "version=$(head -n 1 .poetry-version)" >> $GITHUB_OUTPUT
27+
else
28+
echo "version=2.0.1" >> $GITHUB_OUTPUT
29+
fi
30+
shell: bash
31+
32+
- name: Install Poetry (Unix)
33+
if: runner.os != 'Windows'
34+
run: pipx install poetry==${{ steps.poetry-version.outputs.version }}
35+
shell: bash
36+
37+
- name: Install Poetry (Windows)
38+
if: runner.os == 'Windows'
39+
run: pipx install poetry==${{ steps.poetry-version.outputs.version }}
40+
shell: pwsh
41+
42+
- uses: actions/setup-python@v5
43+
with:
44+
python-version: ${{ inputs.python-version }}
45+
cache: 'poetry'
46+
47+
- name: Clear Poetry cache (Unix)
48+
if: runner.os != 'Windows'
49+
run: poetry cache clear --all pypi
50+
shell: bash
51+
52+
- name: Clear Poetry cache (Windows)
53+
if: runner.os == 'Windows'
54+
run: poetry cache clear --all pypi
55+
shell: pwsh
56+
57+
- name: Install dependencies and package (Unix)
58+
if: runner.os != 'Windows'
59+
run: poetry install --no-interaction --no-ansi
60+
shell: bash
61+
62+
- name: Install dependencies and package (Windows)
63+
if: runner.os == 'Windows'
64+
run: poetry install --no-interaction --no-ansi
65+
shell: pwsh
66+
67+
# Setup Node.js for JavaScript tests
68+
- name: Get Node.js version
69+
id: node-version
70+
run: |
71+
if [ -f .node-version ]; then
72+
echo "version=$(head -n 1 .node-version)" >> $GITHUB_OUTPUT
73+
else
74+
echo "version=20" >> $GITHUB_OUTPUT
75+
fi
76+
shell: bash
77+
- uses: actions/setup-node@v4
78+
with:
79+
node-version: ${{ steps.node-version.outputs.version }}
80+
81+
# Install Node.js dependencies
82+
- name: Install Node.js dependencies
83+
run: npm install
84+
shell: bash
85+
86+
# Setup Go for Go language tests
87+
- name: Get Go version
88+
id: go-version
89+
run: |
90+
if [ -f .go-version ]; then
91+
echo "version=$(head -n 1 .go-version)" >> $GITHUB_OUTPUT
92+
else
93+
echo "version=1.21" >> $GITHUB_OUTPUT
94+
fi
95+
shell: bash
96+
97+
- uses: actions/setup-go@v5
98+
with:
99+
go-version: ${{ steps.go-version.outputs.version }}
100+
cache: 'false'
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Auto Author Assign
2+
3+
on:
4+
pull_request_target:
5+
types: [ opened, reopened ]
6+
7+
permissions:
8+
pull-requests: write
9+
10+
jobs:
11+
assign-author:
12+
runs-on: arc-runners-small
13+
timeout-minutes: 30
14+
if: ${{ !github.event.pull_request.assignee }}
15+
steps:
16+
- uses: toshimaru/auto-author-assign@v2.1.0

.github/workflows/build-wheels.yml

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
name: Build Wheels
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
workflow_dispatch:
8+
9+
jobs:
10+
build_wheels:
11+
name: Build psutil wheels on ${{ matrix.os }}
12+
runs-on: ${{ matrix.os }}
13+
permissions:
14+
contents: write
15+
strategy:
16+
matrix:
17+
include:
18+
# Linux builds
19+
- os: ubuntu-latest
20+
python-version: '3.10'
21+
- os: ubuntu-latest
22+
python-version: '3.11'
23+
- os: ubuntu-latest
24+
python-version: '3.12'
25+
26+
# Windows builds
27+
- os: windows-latest
28+
python-version: '3.10'
29+
- os: windows-latest
30+
python-version: '3.11'
31+
- os: windows-latest
32+
python-version: '3.12'
33+
34+
# macOS builds
35+
- os: macos-latest
36+
python-version: '3.10'
37+
- os: macos-latest
38+
python-version: '3.11'
39+
- os: macos-latest
40+
python-version: '3.12'
41+
42+
steps:
43+
- uses: actions/checkout@v4
44+
45+
- name: Set up Python
46+
uses: actions/setup-python@v5
47+
with:
48+
python-version: ${{ matrix.python-version }}
49+
50+
- name: Install build dependencies
51+
run: |
52+
python -m pip install pip wheel
53+
shell: bash
54+
55+
- name: Build psutil wheel
56+
run: |
57+
# Create dist directory
58+
mkdir -p dist
59+
60+
# Build psutil wheel
61+
pip wheel psutil==5.8.0 --wheel-dir dist/
62+
shell: bash
63+
64+
- name: Upload to GitHub Actions
65+
uses: actions/upload-artifact@v4
66+
with:
67+
name: dist-${{ matrix.os }}-py${{ matrix.python-version }}
68+
path: dist/*
69+
70+
release:
71+
needs: build_wheels
72+
runs-on: ubuntu-latest
73+
if: startsWith(github.ref, 'refs/tags/')
74+
permissions:
75+
contents: write
76+
steps:
77+
- uses: actions/checkout@v4
78+
with:
79+
fetch-depth: 0
80+
ref: release
81+
82+
- name: Download all artifacts
83+
uses: actions/download-artifact@v4
84+
with:
85+
pattern: dist-*
86+
path: dist
87+
merge-multiple: true
88+
89+
- name: Get tag version
90+
id: get_version
91+
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
92+
shell: bash
93+
94+
- name: Update wheel URLs in pyproject.toml
95+
run: |
96+
# Get the version without the 'v' prefix
97+
VERSION="${{ steps.get_version.outputs.VERSION }}"
98+
99+
# Update URLs in pyproject.toml
100+
sed -i "s|/releases/download/v[0-9]\+\.[0-9]\+\.[0-9]\+/|/releases/download/${VERSION}/|g" pyproject.toml
101+
102+
# Update poetry.lock
103+
poetry lock --no-update
104+
105+
# Commit changes
106+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
107+
git config --global user.name "github-actions[bot]"
108+
git add pyproject.toml poetry.lock
109+
git commit -m "Update wheel URLs to ${VERSION}"
110+
111+
# Force update the release branch
112+
git push origin release --force
113+
114+
# Create/update tag to point to the new commit
115+
git tag -f "${VERSION}"
116+
git push origin "${VERSION}" --force
117+
shell: bash
118+
119+
- name: Create Release
120+
uses: softprops/action-gh-release@v2
121+
with:
122+
files: |
123+
dist/*
124+
pyproject.toml
125+
body: |
126+
Release ${{ steps.get_version.outputs.VERSION }}
127+
128+
This release includes:
129+
- Updated wheel builds for Python 3.10, 3.11, and 3.12
130+
- Updated pyproject.toml with correct wheel URLs
131+
draft: false
132+
prerelease: false
133+
target_commitish: release
134+
135+
- name: Merge release into master
136+
run: |
137+
git checkout master
138+
git pull origin master
139+
git merge release --no-ff -m "Merge release ${VERSION} into master"
140+
git push origin master
141+
shell: bash

0 commit comments

Comments
 (0)