Skip to main content

A tool for test-driven teaching.

Project description

tanco

A test-driven teaching environment for programmers.

This is a work in progress. There are videos about it on:

https://www.youtube.com/@tangentstream

Installation

# eventually:
# pip install tanco

# but for now, this is still very alpha stage, so:
git clone https://github.com/tangentstorm/tanco.git
cd tanco
pip install -e .

setting up the database

Currently expects tanco.sdb in the current directory.

You need one copy for the server, and one copy for each challenge attempt. (So these should run in separate directories.)

(Eventually on the client side, there will only be one global database shared by all attempts on your machine, but because tanco still expects the database to be in the current directory, you need multiple copies.)

For now, you have to do this manually, by running the following commands:

cd /path/to/tanco-repo
echo '.read tanco/sql/init.sql' | sqlite3 tanco.sdb 

Using the Client

tanco login
cd /path/to/your/project
tanco init
tanco test     # keep doing this until it passes
git commit    # once the test passes
tanco next     # to fetch the next test

Running the Server

First set up a private key, then run quart.

Private Key

The tanco login command lets the command-line client log into the server in a multi-user setup.

In this setup, the server uses a private key to sign a json web token.

To set up the private key, do this:

cd /path/to/tanco-server
ssh-keygen -t rsa -b 4096 -m PEM -f tanco_auth_key.pem

This will also create a public key in tanco_auth_key.pem.pub. This is not currently used for anything.

Quart server

bash QUART_APP=tanco.app:app quart run # --reload

Note that the above runs the standard asgiref server, and as the message will say:

Please use an ASGI server (e.g. Hypercorn) directly in production 

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

tanco-0.0.1.tar.gz (18.5 kB view details)

Uploaded Source

Built Distribution

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

tanco-0.0.1-py3-none-any.whl (19.9 kB view details)

Uploaded Python 3

File details

Details for the file tanco-0.0.1.tar.gz.

File metadata

  • Download URL: tanco-0.0.1.tar.gz
  • Upload date:
  • Size: 18.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for tanco-0.0.1.tar.gz
Algorithm Hash digest
SHA256 218093b92878f4198e6ce6ddb7a910d31e895713fc5bbf804610bf802aabef37
MD5 997446ea832154a5ce175465cf42e6d3
BLAKE2b-256 16206d8ae8fe4ba86385478315930918988488917bde1ddafd07f5eaa486fbcc

See more details on using hashes here.

File details

Details for the file tanco-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: tanco-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 19.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for tanco-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2e9a345b2883186aef1e6a39290267c75f2dcded9e4d111acb2cdb39bb56d6bd
MD5 889a89951b9c2c1817bf9cef85f22daa
BLAKE2b-256 b3e7ed02eba81173f9415effa140240c07849f60b74e03da98c706b1d549120e

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