Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
133 commits
Select commit Hold shift + click to select a range
e1b5dd1
Added library version validator
polischuks Apr 5, 2023
a4285eb
Added instruction for upgrade library
polischuks Apr 26, 2023
2603133
Merge pull request #41 from polischuks/HSPC-50
polischuks Apr 26, 2023
d4d1c5e
Added INSIDE_DOCKER parameter from ENV (#42)
polischuks Oct 9, 2023
f824160
Update setup.py
polischuks Oct 9, 2023
3915a24
remove lib validator
polischuks Oct 9, 2023
2485356
added cpp executor and cpp searcher (#44)
polischuks Nov 13, 2023
8ebf017
Update setup.py
polischuks Nov 13, 2023
d91e1b3
Merge branch 'release' into master
polischuks Nov 13, 2023
713e41d
Update cpp_executor.py
polischuks Nov 16, 2023
a0b23d8
Merge branch 'release' into master
polischuks Nov 16, 2023
5300951
Update Python version and refactor CI/CD pipeline
meanmail Jan 25, 2024
e2ade20
Refactor codebase to use pathlib and type annotations
meanmail May 20, 2024
f525391
Update workflow configurations for Github Actions
meanmail May 20, 2024
9f8ec79
Update Poetry install command in CI config
meanmail May 20, 2024
048b9cc
Update poetry install command in workflow files
meanmail May 20, 2024
69e8ea0
Bump actions/checkout from 3 to 4 in the all-actions group (#47)
dependabot[bot] May 20, 2024
c795a92
Bump ruff from 0.4.4 to 0.4.8 (#52)
dependabot[bot] Jun 6, 2024
7511549
Bump ruff from 0.4.8 to 0.4.10 (#54)
dependabot[bot] Jun 21, 2024
5b38e73
Bump mypy from 1.10.0 to 1.10.1 (#56)
dependabot[bot] Jun 25, 2024
6dea5de
Bump ruff from 0.4.10 to 0.5.0 (#57)
dependabot[bot] Jun 28, 2024
da32e1a
Backend: Auto format
github-actions[bot] Jun 28, 2024
707a39c
Bump toshimaru/auto-author-assign in the all-actions group (#58)
dependabot[bot] Jul 1, 2024
67c894c
Bump matplotlib from 3.9.0 to 3.9.1 (#59)
dependabot[bot] Jul 5, 2024
3d81366
Bump matplotlib from 3.9.1 to 3.9.2 (#70)
dependabot[bot] Aug 14, 2024
14955f2
Bump ruff from 0.5.0 to 0.6.0 (#71)
dependabot[bot] Aug 16, 2024
077b355
feat: add cibuildwheel configuration for automated wheel building (#92)
polischuks Jan 31, 2025
5e32e2b
fix: switch to pure Python wheel building
polischuks Jan 31, 2025
ea64dda
feat: configure platform-dependent wheel building
polischuks Jan 31, 2025
260dd31
feat: configure wheel building with dependencies
polischuks Jan 31, 2025
f89f0fc
fix: correct pip wheel command syntax
polischuks Jan 31, 2025
f28114f
fix: improve cross-platform compatibility in wheel building
polischuks Jan 31, 2025
b326b79
fix: improve build matrix for better control
polischuks Jan 31, 2025
e1f731e
feat: build single wheel with all dependencies included
polischuks Jan 31, 2025
e40d656
feat: switch to cibuildwheel
polischuks Jan 31, 2025
dea33c2
fix: correct Python version format for cibuildwheel
polischuks Jan 31, 2025
2bd4d9d
feat: build single wheel with all dependencies included
polischuks Jan 31, 2025
9eb86fc
chore: update poetry.lock after moving dependencies
polischuks Jan 31, 2025
f7f7583
fix: correct pip wheel command for dependencies
polischuks Jan 31, 2025
5b8109c
feat: switch to python -m build for wheel creation
polischuks Jan 31, 2025
6e00664
feat: switch to PDM for wheel building
polischuks Jan 31, 2025
d3d0f46
fix: correct pdm import command format
polischuks Jan 31, 2025
b0bc957
fix: correct PDM build commands
polischuks Feb 3, 2025
a8993b8
feat: add PDM distribution setting to pyproject.toml
polischuks Feb 3, 2025
d015298
fix: use pdm config to set distribution setting
polischuks Feb 3, 2025
a97317b
feat: switch to pip wheel for building
polischuks Feb 3, 2025
176408c
fix: use pip wheel for all wheel building
polischuks Feb 3, 2025
0f995b8
feat: use pre-built psutil wheels from our release
polischuks Feb 3, 2025
11e5dec
fix: use latest tag for psutil wheels URLs
polischuks Feb 3, 2025
3d71696
fix: use platform-specific psutil wheels in requirements.txt
polischuks Feb 6, 2025
9065bee
fix: update psutil dependency configuration
polischuks Feb 7, 2025
d4cd7db
fix: correct Linux wheel filenames in requirements.txt
polischuks Feb 7, 2025
628cf88
fix: handle WindowsPath object correctly in BaseSearcher._parse_source
polischuks Feb 7, 2025
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
f892485
ci: simplify wheels build workflow
polischuks Feb 25, 2025
c144d6d
Merge branch 'release' into master
polischuks May 5, 2025
f20e7d9
fix: update runner configuration to use arc-runners-small
polischuks May 5, 2025
85b8f5e
fix: add setup PATH step to multiple workflow files
polischuks May 5, 2025
ace9a08
fix: update psutil dependency to version 7.0.0 and simplify requirements
polischuks May 5, 2025
c1aa95e
Backend: Auto format
github-actions[bot] May 5, 2025
4d1d834
fix: update ruff command in CI configuration to use 'check' before fi…
polischuks May 5, 2025
5204a1e
fix: improve type checking and documentation across multiple files
polischuks May 5, 2025
fab0162
Merge remote-tracking branch 'refs/remotes/origin/master' into pre-re…
polischuks May 6, 2025
458f421
Revert "fix: improve type checking and documentation across multiple …
polischuks May 6, 2025
1d1d55a
Revert "fix: update ruff command in CI configuration to use 'check' b…
polischuks May 6, 2025
bc5a4bc
Revert "Backend: Auto format"
polischuks May 6, 2025
e586233
Revert "fix: update psutil dependency to version 7.0.0 and simplify r…
polischuks May 6, 2025
3eca45a
Revert "fix: add setup PATH step to multiple workflow files"
polischuks May 6, 2025
d5b2fb5
Revert "fix: update runner configuration to use arc-runners-small"
polischuks May 6, 2025
89933fc
fix: update psutil dependency to version 7.0.0 and simplify requirements
polischuks May 5, 2025
022b66b
Backend: Auto format
github-actions[bot] May 6, 2025
2bf7a4b
Removed unused build-wheels.yml
polischuks May 6, 2025
f792a95
refactor:
polischuks Feb 24, 2025
136776a
Refactor python_executor to use is_windows utility for OS checks
polischuks Feb 15, 2025
d07c12f
refactor: add return type annotation to _execution_command method
polischuks May 6, 2025
adacd1f
Merge remote-tracking branch 'origin/pre-release' into release-052025
polischuks May 7, 2025
049bfc8
fix: update CI workflows to use arc-runners-small for consistency
polischuks May 7, 2025
c3321de
fix: update ruff command in CI workflow to use 'check' before 'fix'
polischuks May 7, 2025
6a52376
refactor: improve type checks and error handling in various modules
polischuks May 7, 2025
57d062b
Backend: Auto format
github-actions[bot] May 7, 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
23 changes: 0 additions & 23 deletions .flake8

This file was deleted.

6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*.yml text eol=lf
*.yaml text eol=lf
*.py text eol=lf
*.toml text eol=lf
*.md text eol=lf
*.txt text eol=lf
17 changes: 17 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
time: "00:00"
groups:
all-actions:
patterns: [ "*" ]

- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"
time: "00:00"
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: '.'
82 changes: 82 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
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
- uses: ./.github/workflows/actions/prepare
with:
python-version: "3.11"
- name: Check files using the ruff formatter
run: poetry run ruff check --fix --unsafe-fixes --preview .
shell: bash

mypy:
name: Static Type Checking
runs-on: arc-runners-small
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: ./.github/workflows/actions/prepare
with:
python-version: "3.11"
- name: Mypy
run: poetry run mypy .
shell: bash

test:
name: Run unit test on ${{ matrix.os }} with Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
# Self-hosted runner
- os: arc-runners-small
python-version: "3.10"
- os: arc-runners-small
python-version: "3.11"
- os: arc-runners-small
python-version: "3.12"
- os: arc-runners-small
python-version: "3.13"

# Windows
- os: windows-latest
python-version: "3.10.11"
- os: windows-latest
python-version: "3.11"
- os: windows-latest
python-version: "3.12"
- os: windows-latest
python-version: "3.13"

# macOS (arm64)
- os: macos-14
python-version: "3.11"
- os: macos-14
python-version: "3.12"
- os: macos-14
python-version: "3.13"
steps:
- uses: actions/checkout@v4
- uses: ./.github/workflows/actions/prepare
with:
python-version: ${{ matrix.python-version }}
- name: Run Tests
run: poetry run python tests/testing.py
shell: bash
59 changes: 0 additions & 59 deletions .github/workflows/main.yml

This file was deleted.

1 change: 1 addition & 0 deletions .poetry-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.0.1
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.10.13
25 changes: 24 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,33 @@
# hs-test-python

Python testing library for Hyperskill projects

It is a framework that simplifies testing educational projects for [Hyperskill](https://hyperskill.org).

It is required to use for Hyperskill projects. The main features are:
The main features are:
* black box testing
* multiple types of tests in a simple unified way (without stdin, with stdin, files, Django, Flask, Matplotlib)
* generating learner-friendly feedback (filtering stack-traces, hints)

## Installation

Install the package directly from GitHub:

```bash
pip install https://github.com/hyperskill/hs-test-python/archive/release.tar.gz
```

The package includes pre-built wheels for psutil, so you don't need a C++ compiler to install it.

## Development

To contribute to the project:

1. Clone the repository
2. Install dependencies with poetry:
```bash
poetry install
```

To learn how to use this library you can go here:
https://github.com/hyperskill/hs-test-python/wiki
Loading