1. One line description
A library to present all the arguments your script accepts in a TUI (terminal user interface, using ncurses, that can be navigated with the arrow keys), so that users can easily figure out what all of them are and do.
2. Information for users
2.1. Installation
You don't want to use this repository directly. Instead you should "install" the latest released version by running this command:
$ python -m pip install tuiargs
2.2. User guide
Check this file for the full guide.
You can also access this same information from python itself:
import tuiargs
help(tuiargs)
All public classes and functions are fully documented:
import tuiargs
help(tuiargs.Build)
...
3. Information for developers
3.1. Development environment
Make sure you have all python modules listed in "dependencies" section found inside the pyproject.toml file already installed, if not, use your distro package manager to install them:
$ cat pyproject.toml | awk '/dependencies/,/]/'
$ pacman -S ...
NOTE: This (installing dependencies through the global package manager) is
preferred to creating a virtual environment and using "python -m pip
install" inside of it because it makes it simpler to run the examples.
If you insist on using a virtual environment, this is what you need to do:
$ python -m venv .venv
$ source .venv/bin/activate
$ python -m pip install .
Next, update the value of PYTHONPATH to make sure it searches for "tuiargs" in the current folder (where the source code is) instead of in system paths (in case you had already "pip install"ed it in the past):
$ export PYTHONPATH=`pwd`:$PYTHONPATH
You can now run the different included examples like this:
$ python examples/hello_world.py
$ python examples/git_wrapper.py
3.2. Running the code linter
Before merging new changes you must also check that the following command returns an empty list of warnings:
$ ruff check .
NOTE: You might need to install "ruff" first. If so, use your distro's package manager.
3.3. Distribution
The source code in this repository is meant to be distributed as a python package that can be "pip install"ed.
Once you are ready to make a release:
-
Increase the "version" number in file "pyproject.toml"
-
Run the next command:
$ python -m pip install --upgrade build $ python -m build
-
Publish the contents of the "dist" folder to a remote package repository such as PyPi (see here)
-
Tell your users that a new version is available and that they can install it by running this command:
$ python -m pip install tuiargs
NOTE: If "python -m build" returns an error, you probably have to install the "python-build" package first, either using your package manager (preferred) or inside a virtual environment. If you choose the latter, make sure you use the "--copies" flag when creating the virtual environment or else you will later get errors about symbolic links when creating the package:
$ python -m venv --copies .my_venv
Metadata
Release files for tuiargs 0.9.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tuiargs-0.9.0.tar.gz | 36.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tuiargs-0.9.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 63.8 kB
Release files / tuiargs-0.9.0.tar.gz
| Download URL | tuiargs-0.9.0.tar.gz |
|---|---|
| Size | 36.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
88568ddddb13b9dbcec98386d76b0f90928198fac4dcc3313b805b5824f33ac6
|
|
BLAKE2b-256 checksum How to use checksums |
09a0c5639b64a21419e34739d7533faa722f0a61bd1a09e9c43aa7fa79a9e158
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Release files / tuiargs-0.9.0-py3-none-any.whl
| Download URL | tuiargs-0.9.0-py3-none-any.whl |
|---|---|
| Size | 27.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4ee4658802f2c3eae278278a9270a1d444c59a846d8fc39e80d4439ccec90b26
|
|
BLAKE2b-256 checksum How to use checksums |
648d7e56f787d998bb19c421582fd3bbb347b7a1cd5a68596b06389cc7609d4f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|