Tutorial edition framework
Project description
Gepetuto
Tutorial edition framework
This project contains some tools to help authoring and maintaing python tutorials presented on notebooks.
Install
Add gepetuto in your pip / PyPI dependencies
Usage
- create a (eg.
tp1) directory (tp0can be used to check prerequisites) - write python scripts (eg.
example_script.py) in this directory - delimit snippets inside those scripts between
# %jupyter_snippet example_snippetand# %end_jupyter_snippet - create a (eg.
1-example_notebook.ipynb) notebook, containingimport gepetuto.magic - run
gepetuto -a generate: this will create atp{i}/generateddirectory with eg.example_script_example_snippet - cells can contain either eg.
%load tp1/generated/example_script_example_snippetto display some code to students, or their%do_not_loadversion to let the student write the code themself - run
gepetuto -a testto check all python scripts in tp directories - run
gepetuto -a lintto ensure the coding standards are respected in all python scripts in tp directories - add
gepetuto -a testin your CI, andgepetuto -a lint+gepetuto -a generatein your pre-commit
Command line
$ gepetuto -h
usage: gepetuto [-h] [-q] [-v] [-a [{lint,test,generate,all}]] [-f [FILE ...]] [-F [FILTER ...]]
[-p PYTHON] [-c] [-C DIRECTORY] [--version] [tp_id ...]
Tutorial edition framework
positional arguments:
tp_id choose which tp to process. Default to all.
options:
-h, --help show this help message and exit
-q, --quiet decrement verbosity level
-v, --verbose increment verbosity level
-a, --action [{lint,test,generate,all}]
choose what to do. Default to 'generate'.
-f, --file [FILE ...]
choose which files to process.
-F, --filter [FILTER ...]
filter files to process.
-p, --python PYTHON choose python interpreter to use.
-c, --check check if linters change files.
-C, --directory DIRECTORY
choose directory to run action on.
--version Get gepetuto version.
CI Example
example of CI using all gepetuto actions on tests folder here :
Pre commit example
- repo: https://github.com/Gepetto/gepetuto
rev: v2.0.3
hooks:
- id: generate-action
- id: lint-action
- id: test-action
Examples
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 gepetuto-2.0.3.tar.gz.
File metadata
- Download URL: gepetuto-2.0.3.tar.gz
- Upload date:
- Size: 83.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0d4c8082467c1912f74658b48ef48f0af742318ae0ab28c6c39822d66cebe50
|
|
| MD5 |
c53b796a300de6fabfa211d2b404ea08
|
|
| BLAKE2b-256 |
cd040fd02b9f3a0c56e55d3a4ae782241b1a8e61324c981db9c40d83217b3f5b
|
Provenance
The following attestation bundles were made for gepetuto-2.0.3.tar.gz:
Publisher:
release.yml on Gepetto/gepetuto
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gepetuto-2.0.3.tar.gz -
Subject digest:
f0d4c8082467c1912f74658b48ef48f0af742318ae0ab28c6c39822d66cebe50 - Sigstore transparency entry: 259915505
- Sigstore integration time:
-
Permalink:
Gepetto/gepetuto@cac218ed24de7d077bab2c1fb1e3c66852f938ec -
Branch / Tag:
refs/tags/v2.0.3 - Owner: https://github.com/Gepetto
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@cac218ed24de7d077bab2c1fb1e3c66852f938ec -
Trigger Event:
push
-
Statement type:
File details
Details for the file gepetuto-2.0.3-py3-none-any.whl.
File metadata
- Download URL: gepetuto-2.0.3-py3-none-any.whl
- Upload date:
- Size: 9.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dce5ed4da305aad65149296d9379b462ac6187fc260dfbd7f29927de3ce9c427
|
|
| MD5 |
1eb136d0136f295623b7bf7cd1c405c9
|
|
| BLAKE2b-256 |
4bfb70d71ac626ae4cf5bae070c7752d648c36790282337d4905a7b7a04b5873
|
Provenance
The following attestation bundles were made for gepetuto-2.0.3-py3-none-any.whl:
Publisher:
release.yml on Gepetto/gepetuto
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gepetuto-2.0.3-py3-none-any.whl -
Subject digest:
dce5ed4da305aad65149296d9379b462ac6187fc260dfbd7f29927de3ce9c427 - Sigstore transparency entry: 259915518
- Sigstore integration time:
-
Permalink:
Gepetto/gepetuto@cac218ed24de7d077bab2c1fb1e3c66852f938ec -
Branch / Tag:
refs/tags/v2.0.3 - Owner: https://github.com/Gepetto
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@cac218ed24de7d077bab2c1fb1e3c66852f938ec -
Trigger Event:
push
-
Statement type: