Systeme d'entrainement
Project description
Trainer — CLI Exercise Trainer
Trainer is a command-line exercise training tool to manage, run and validate programming exercises. It supports importing repositories, installing exercises into a working directory, running an interactive sandboxed session, and validating solutions.
Installation
Install the package in editable/development mode:
pip install -e .
This will install the package and its runtime dependencies (for example
PyYAML). After installation the trainer command (the CLI) is
available.
Available Commands
The CLI supports the following subcommands (see trainer <cmd> -h
for full options):
-
import <git-url>— Import an exercises repository into the local trainer base directory.- Options:
--base-dir(default:~/.trainer)
- Options:
-
ls— List exercises available in the base directory.- Options:
--base-dir,--tag,-d/--done(show already completed),-r/--repo(filter by repository name)
- Options:
-
install <exs>— Install an exercise into a (usually empty) target directory.- Options:
--base-dir(where exercises are stored),--user-dir
- Options:
-
exec <exs>— Create a temporary working directory for the exercise, install it there and launch an interactive shell (with timer support).- Options:
--base-dir
- Options:
-
check— Run the exercise validation command defined in the exerciseconfig.ymlin the current or provided directory.- Options:
--base-dir,--user-dir
- Options:
-
update— Pull updates for repositories in the base directory (uses git).- Options:
--base-dir,--repo(optional specific repo)
- Options:
-
stats— Show history statistics (done/failed exercises).- Options:
--filter
- Options:
-
recommend <reference_alias>— Recommend similar exercises based on tags and difficulty.- Options:
--base-dir,--top-k,--include-done,--allow-lower-difficulty,--min-common-tags
- Options:
Note: some internal code paths reference a time action for reporting
timer state, but time is not defined as a top-level subcommand in the
CLI argument parser. Use check and the timer mechanisms that run with
exec and install workflows.
Typical workflow
- Import repositories that contain exercises:
trainer import https://github.com/your-org/exercises.git
- List available exercises:
trainer ls --base-dir ~/.trainer
- Run an exercise in a sandboxed shell (creates a temporary working directory):
trainer exec min_1
- Work on the exercise in the interactive shell and then validate the solution from within the working directory (or from your user dir):
trainer check --user-dir /path/to/your/workdir
- Optionally install an exercise into a user directory (useful for sharing or persistent workspaces):
trainer install min_1 --user-dir ~/workspace/min_1
Configuration
Exercises may include a config.yml with fields such as commands,
timeout, tags, and description. The check command runs the
commands.validate command (if defined) from the merged configuration
(repository config.yml + exercise config.yml).
The trainer stores an index file .trainer_index.yml in the base
directory (default ~/.trainer) and history in ~/.trainer/history.yml.
Help
General help:
trainer -h
Help for a specific command, e.g.:
trainer import -h
trainer ls -h
trainer install -h
trainer exec -h
trainer check -h
Repository
Source repository :
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
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 code_trainer-0.0.6.tar.gz.
File metadata
- Download URL: code_trainer-0.0.6.tar.gz
- Upload date:
- Size: 18.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2575f3f2d92e114460159a87c7afc984b388f9eef2ad5f36e1880c5ff8ed68e6
|
|
| MD5 |
4fb58008bcfaafe243f39e1059e6ef7b
|
|
| BLAKE2b-256 |
db800e1164967476d4cfca7259de2a84cc439694a8a4923f620d8397cb62596b
|
Provenance
The following attestation bundles were made for code_trainer-0.0.6.tar.gz:
Publisher:
publish.yml on RomainGueninchault/pfa_systeme
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
code_trainer-0.0.6.tar.gz -
Subject digest:
2575f3f2d92e114460159a87c7afc984b388f9eef2ad5f36e1880c5ff8ed68e6 - Sigstore transparency entry: 1448308550
- Sigstore integration time:
-
Permalink:
RomainGueninchault/pfa_systeme@77b5bb249e867ed91327ac4894412bd833b68788 -
Branch / Tag:
refs/tags/v0.0.6 - Owner: https://github.com/RomainGueninchault
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@77b5bb249e867ed91327ac4894412bd833b68788 -
Trigger Event:
push
-
Statement type:
File details
Details for the file code_trainer-0.0.6-py3-none-any.whl.
File metadata
- Download URL: code_trainer-0.0.6-py3-none-any.whl
- Upload date:
- Size: 23.2 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 |
65fca4c7c1c9bcb003a1120c3044bb18cb97349afa21ae0faca6a9aefff9e79b
|
|
| MD5 |
7e12a5ccf9a1dc0ed4cf44e6d613af44
|
|
| BLAKE2b-256 |
3d3cf8161bccb5b43a8102dd3e16abe31df53bc124cc8b07624294408e1ff600
|
Provenance
The following attestation bundles were made for code_trainer-0.0.6-py3-none-any.whl:
Publisher:
publish.yml on RomainGueninchault/pfa_systeme
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
code_trainer-0.0.6-py3-none-any.whl -
Subject digest:
65fca4c7c1c9bcb003a1120c3044bb18cb97349afa21ae0faca6a9aefff9e79b - Sigstore transparency entry: 1448308618
- Sigstore integration time:
-
Permalink:
RomainGueninchault/pfa_systeme@77b5bb249e867ed91327ac4894412bd833b68788 -
Branch / Tag:
refs/tags/v0.0.6 - Owner: https://github.com/RomainGueninchault
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@77b5bb249e867ed91327ac4894412bd833b68788 -
Trigger Event:
push
-
Statement type: