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.2.tar.gz (11.1 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.2-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

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

Hashes for spyder_autojudge-0.1.2.tar.gz
Algorithm Hash digest
SHA256 5d4bcabeeff21f78a6f785a045243d9df51d23fec829cf71eb5e946c22ee2c00
MD5 06b3de2c7f604def3a08a72aa001f55b
BLAKE2b-256 cfe1b005eef7948a100efd07251a5b31951adcf72b54034786ebc5649c55c8f0

See more details on using hashes here.

Provenance

The following attestation bundles were made for spyder_autojudge-0.1.2.tar.gz:

Publisher: publish-pypi.yml on ArnavSharma2908/spyder-autojudge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for spyder_autojudge-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 901ff90a7a20f5298c0471856ed22633590e90e4574386052d6d32c8c03c1dbc
MD5 a29812bef90015c53905946a059a29cc
BLAKE2b-256 ab5afff78494796abe336d13762eab96d024f96128ce9c17e82080564310f958

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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