Skip to main content

Makefile CI

argparse_action

argparse_action aims to be a minimalistic extension of argparse and creates cli options from the function signature given by inspect.signature.

import argparse
import argparse_action

parser = argparse.ArgumentParser()
action = argparse_action.Action(parser)

@action.add("e")
def echo(word, upper=False):
    print(word.upper() if upper else word)

namespace = parser.parse_args()
namespace.action(namespace)

Asumes that the code above is saved as my_script.py:

$ python3 my_script.py echo hello
hello

$ python3 my_script.py e hello
hello

$ python3 my_script.py echo --upper hello
HELLO

Installation

pip install argparse_action

Configuration

make dev

CI check

The check make target collects the targets which are run by the CI server.

make check

Testing

The test target requires a virtulenv where argparse_action is installed. The dev target creates that virtualenv under .venv directory.

make test

Formatting

The argparse_action project is formatted with black. The CI check invokes the check-format target to ensure that the python files are formatted with black.

make check-format

black can be run with the format make target.

make format

Linter

The lint target runs pylint over the argparse_action project.

make lint

Documentation

Documentation can be build with the doc make target. To ensure the documentation build tools the make dev has to be executed once before make doc.

make doc

Online version can be read at readthedocs.org.

Release files for argparse-action 0.5.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for argparse-action 0.5.2
File Size Uploaded
argparse_action-0.5.2.tar.gz 8.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for argparse-action 0.5.2
File Interpreter ABI Platform
argparse_action-0.5.2-py3-none-any.whl Python 3 none any Details

Total release size: 18.6 kB

Release files / argparse_action-0.5.2.tar.gz

Download URL argparse_action-0.5.2.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
ea1504b2175a512101a81daccbac0b2328584392e89a64afbd5a5eaca92f77e8
BLAKE2b-256 checksum
How to use checksums
5ff0540d51b09ab29f54832fe54175aeb5d4fdc3f47febaa811693e8741faa2d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.12

Release files / argparse_action-0.5.2-py3-none-any.whl

Download URL argparse_action-0.5.2-py3-none-any.whl
Size 9.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
847998ccb4e6b65de3d989b1e45dbf34d251643f2bc6d9e3adfd3626bd2d4221
BLAKE2b-256 checksum
How to use checksums
4a98f7f74906feaf16792ce2a6e331a5f6517d0ea43ccd0b24985d32b935f87a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.12

Release history Release notifications | RSS feed

This release

0.5.2 This release

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.3

1 release file

0.3.2

1 release file

0.3.1

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.1

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page