Skip to main content

A program for testing kattis solutions with input and output.

Project description

nekontrol - Control your kattis solutions

This is a simple program that compiles, runs and tests your kattis solutions against local and sample input and output.

Demo

Demo

Features

  • Automatically downloads sample input and output
  • Discovers local sample input and output
  • Compiles your source code and runs it with local and sample input and output
  • Ignores debug messages - ignores lines starting with "dbg" or "debug" and inline messages "(dbg...)" and "(debug...)". If debug lines are discovered then you are notified in the output so that you don't submit something that is incorrect.

The current supported languages are:

  • C++ (requires c++ in your path)
  • Rust (requirest rustc in your path)
  • Python (requires python in your path)
  • Haskell (requires ghc in your path)
  • Lua (requires lua in your path)
  • JavaScript (Node) (requires node in your path)

Note Nekontrol will try to find a way to run your program, but it is not guranteed that the program it uses matches the version that kattis has. For instance kattis runs python with pypy 3.8. Nekontrol will try to run it with pypy 3.8, but will fall back to other versions if it cannot be found.

Adding more languages is left as an exercise for the reader.

Usage

Simply run nk <source file> and it should hopefully compile (if needed) and run!

  • nk assumes that the name of the source files matches the name of the problem (found in the url, ex. https://open.kattis.com/problems/hello). If this assumption is incorrect, you can specify the problem with --problem <problem name>. Local files are still matched with the filename regardless of the problem specified.
  • Input and output files should follow the format <filename>.in or <filename>.<number>.in and corresponding outputs are named <filename>.ans etc. where <filename> comes from nk <filename>.cpp for instance.

Note Multiple files are not supported as of yet

Requirements

  • The requirements of this program is only having python 3.10 or newer as well pip
  • A half decent terminal, almost anything other than cmd.exe on windows will work

Install or update

To install or update, run the following.

pip install -U nekontrol

Now it should hopefully work, enjoy!

Nix

There is a flake for Nix users, but if you use Nix I trust you know how to use flakes.

Other

  • If you are thinking "nekontrol is a kinda weeby name", I ask you: have you ever tried coming up with an original name?

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

nekontrol-0.2.5.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

nekontrol-0.2.5-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file nekontrol-0.2.5.tar.gz.

File metadata

  • Download URL: nekontrol-0.2.5.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.10.12 Linux/6.5.5

File hashes

Hashes for nekontrol-0.2.5.tar.gz
Algorithm Hash digest
SHA256 aa99df77c6db4f6330ef4be0904b5c658560790e2e099bb26af1c84822bc46cd
MD5 8848558d0c0155ea628f632bc60f24ae
BLAKE2b-256 a3e7e07f8f591d8fffb281436a771c3585d2573df502f35cb173223e789a5b23

See more details on using hashes here.

File details

Details for the file nekontrol-0.2.5-py3-none-any.whl.

File metadata

  • Download URL: nekontrol-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 11.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.10.12 Linux/6.5.5

File hashes

Hashes for nekontrol-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 4525b52f18acaf6a410e4ba3314cb61ea9d60369cf7ba8221090f67a58ae589d
MD5 5912851926f36640369059e4b9574902
BLAKE2b-256 306aff76b93ec54bfab7be96826bb1443194e0aa3b8d9657a4e222ec8e8d6dd5

See more details on using hashes here.

Supported by

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