Skip to main content

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.

Project on PyPI

What it does

  • Finds the most recently modified .py file in the selected folder.
  • Runs that file against test cases from input.txt and compares output with expected.txt when you click Run 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

  1. Open Spyder.
  2. Open the AutoJudge pane.
  3. Choose the folder containing your solution and test files.
  4. Make sure the folder has these files:
    • one or more Python files
    • input.txt
    • expected.txt
  5. 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

Spyder AutoJudge 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spyder_autojudge-0.1.1.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spyder_autojudge-0.1.1-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file spyder_autojudge-0.1.1.tar.gz.

File metadata

  • Download URL: spyder_autojudge-0.1.1.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for spyder_autojudge-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e177c0e504ca8835e05cee0f993d1a3455d443fdaf8f843a356440de09946a34
MD5 bc228d716ab77a1c5ea5e3491cb00dd1
BLAKE2b-256 7e3784e95c2933f8ce27e2bd0611850d0492be8b2725a2fcf9d027b7ed8b975a

See more details on using hashes here.

File details

Details for the file spyder_autojudge-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for spyder_autojudge-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8f0f81a32fe2939b679d4549ab1f921216077f83efd7b0dea975e85544cae001
MD5 40f2e4cf1429a5a883739b193e9a5a09
BLAKE2b-256 eeeedc85caec9bf1136c07bfff3ff66eca7bf7ac9d92af744b9e7f451c300d05

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page