Spyder dockable pane to run input/expected test cases for the latest Python file.
Project description
Spyder AutoJudge
Spyder AutoJudge is a lightweight Spyder plugin for quickly checking the latest Python file in a folder against input.txt and expected.txt test cases.
What it does
- Finds the most recently modified
.pyfile in the selected folder. - Runs that file against test cases from
input.txtand compares output withexpected.txtwhen you clickRun Latest. - Shows a clear summary for success, wrong output, and runtime error cases.
- Draws a pie chart using
matplotlib(installed with this package).
Why Spyder AutoJudge exists
If you like building small competitive-programming style workflows inside Spyder, this plugin keeps the feedback loop simple:
- write code
- save the file
- run the latest version
- see results immediately
It is intentionally minimal, so it feels close to the workflow used by small Python tools in the wild: one clear task, one short path to test it, and a straightforward result panel.
Requirements
- Python 3.9 or newer
- Spyder 5.4 or newer
matplotlib is installed automatically as a dependency of spyder-autojudge.
Install
Install from PyPI:
pip install spyder-autojudge
If Spyder is already open, restart it after installation so the plugin is discovered.
To verify the package is installed:
python -m pip show spyder-autojudge
Use
- Open Spyder.
- Open the AutoJudge pane.
- Choose the folder containing your solution and test files.
- Make sure the folder has these files:
- one or more Python files
input.txtexpected.txt
- Click
Run Latest.
AutoJudge picks the newest .py file in that folder and runs it case by case.
Folder example
your-problem-folder/
solution.py
scratch.py
input.txt
expected.txt
Test file format
Use blank lines to separate cases in both files. The number of cases must match.
input.txt example:
2
3
10
20
expected.txt example:
5
30
Output states
- Success means the program output matched the expected output.
- Wrong output means the program ran but did not match.
- Error means the program hit a runtime error, timeout, or execution problem.
Chart view
When matplotlib is installed, the results panel shows a pie chart for:
- success
- wrong
- error
If there are no test results yet, the chart area shows a placeholder message instead.
Working screenshot
Contributing
Contributions are welcome. If you would like to report an issue, suggest an improvement, or send a pull request, start with CONTRIBUTING.md.
Good first contributions usually include:
- documentation improvements
- small UI polish
- test file handling edge cases
- clearer error messages
Release
Publishing is handled from GitHub Actions using the release workflows in this repository.
License
MIT License. See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file spyder_autojudge-0.1.2.tar.gz.
File metadata
- Download URL: spyder_autojudge-0.1.2.tar.gz
- Upload date:
- Size: 11.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d4bcabeeff21f78a6f785a045243d9df51d23fec829cf71eb5e946c22ee2c00
|
|
| MD5 |
06b3de2c7f604def3a08a72aa001f55b
|
|
| BLAKE2b-256 |
cfe1b005eef7948a100efd07251a5b31951adcf72b54034786ebc5649c55c8f0
|
Provenance
The following attestation bundles were made for spyder_autojudge-0.1.2.tar.gz:
Publisher:
publish-pypi.yml on ArnavSharma2908/spyder-autojudge
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
spyder_autojudge-0.1.2.tar.gz -
Subject digest:
5d4bcabeeff21f78a6f785a045243d9df51d23fec829cf71eb5e946c22ee2c00 - Sigstore transparency entry: 1342786339
- Sigstore integration time:
-
Permalink:
ArnavSharma2908/spyder-autojudge@9d50b1cc05da3dcefc58c907b0bd792c13d23dbe -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/ArnavSharma2908
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@9d50b1cc05da3dcefc58c907b0bd792c13d23dbe -
Trigger Event:
release
-
Statement type:
File details
Details for the file spyder_autojudge-0.1.2-py3-none-any.whl.
File metadata
- Download URL: spyder_autojudge-0.1.2-py3-none-any.whl
- Upload date:
- Size: 10.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
901ff90a7a20f5298c0471856ed22633590e90e4574386052d6d32c8c03c1dbc
|
|
| MD5 |
a29812bef90015c53905946a059a29cc
|
|
| BLAKE2b-256 |
ab5afff78494796abe336d13762eab96d024f96128ce9c17e82080564310f958
|
Provenance
The following attestation bundles were made for spyder_autojudge-0.1.2-py3-none-any.whl:
Publisher:
publish-pypi.yml on ArnavSharma2908/spyder-autojudge
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
spyder_autojudge-0.1.2-py3-none-any.whl -
Subject digest:
901ff90a7a20f5298c0471856ed22633590e90e4574386052d6d32c8c03c1dbc - Sigstore transparency entry: 1342786345
- Sigstore integration time:
-
Permalink:
ArnavSharma2908/spyder-autojudge@9d50b1cc05da3dcefc58c907b0bd792c13d23dbe -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/ArnavSharma2908
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@9d50b1cc05da3dcefc58c907b0bd792c13d23dbe -
Trigger Event:
release
-
Statement type: