Skip to main content

Simplify project workflows by standardizing use of GNU Make.

Project description

vmklib (0.5.1)

python Build Status codecov

Simplify project workflows by standardizing use of GNU Make.

This tool integrates with existing Makefile's with zero additional content or bootstrapping required.

There are many choices in technology or products for performing static analysis on source code, building test infrastructure, or managing local development environments. These are only a small subset of common, developer tasks when building software. This package intends to aggregate recipes (and their dependency relationships) for these tasks so that they can be integrated into a project without re-building this infrastructure. Lessons learned and improvements in each project can be back-propagated everywhere else with simple package updates.

Quick Links

Command-line Options

$ ./venv3.8/bin/mk -h

usage: mk [-h] [--version] [-v] [-C DIR] [-p PREFIX] [-f FILE] [-P PROJ]
          [targets [targets ...]]

Simplify project workflows by standardizing use of GNU Make.

positional arguments:
  targets               targets to execute

optional arguments:
  -h, --help            show this help message and exit
  --version             show program's version number and exit
  -v, --verbose         set to increase logging verbosity
  -C DIR, --dir DIR     execute from a specific directory
  -p PREFIX, --prefix PREFIX
                        a prefix to apply to all targets
  -f FILE, --file FILE  file to source user-provided recipes from
  -P PROJ, --proj PROJ  project name for internal variable use

Targets

Note that the full invocation for a target's command is:

mk [options] <prefix>-<command> [ARG1=val1 ARG2=val2]

datazen

Targets for use with the datazen package.

Prefix: dz-

Optional Arguments

DZ_DIR - Optionally override the -C argument.

DZ_MANIFEST - Optionally provide a non-default manifest file to -m.

DZ_VERBOSE - Setting this passes -v as an additional argument.

Commands

sync - Run dz, executing the default target.

clean - Run dz with -c to clean the cache.

describe - Run dz with -d to describe cache contents.

install - Install datazen in the resolved virtual environment (with pip). This depends on a "concrete" underlying target that allows it to be installed only once.

upgrade - Upgrade datazen in the resolved virtual environment (with pip).

grip

Targets for rendering GitHub Markdown with grip.

Prefix: grip-

Optional Arguments

SECRETHUB_GRIP_PATH - The full path for the secrethub read command to source a GitHub personal access token from, requires secrethub.

GRIP_PORT - The host:port String to serve the rendered results on.

GRIP_ENV - Output file to write to for sourcing credentials.

GRIP_FILE - The file to render, path is relative to project root.

Commands

check-env - Checks that GRIP_TOKEN is set in the environment, errors if not.

render - Serve README.md with grip.

pypi

Targets for uploading packages to PyPI.

Prefix: pypi-

Optional Arguments

UPLOAD_ENV - Output file to write to for sourcing credentials.

SECRETHUB_PYPI_PATH - The full path for the secrethub read command to source a PyPI API token from, requires secrethub.

Commands

check-env - Enforces that TWINE_USERNAME and TWINE_PASSWORD are set in the environment, errors if not.

upload - Attempt to upload everything in dist to PyPI.

python

Targets for executing common, Python workflow tasks.

Prefix: python-

Optional Arguments

PY_LINT_ARGS - Set to override the default, adds the tests directory and PY_LINT_EXTRA_ARGS.

PY_LINT_EXTRA_ARGS - Set to add additional linting arguments.

PYTEST_ARGS - Set to override the default, additional pytest arguments.

PYTEST_EXTRA_ARGS - Add additional arguments to the default set.

PYTHON_COV_PORT - Port to host test-coverage HTML on (using http.server).

Commands

lint - Run pylint and flake8 against a project's package sources.

sa - Run mypy against a project's package sources.

sa-types - Run mypy without checking the result and attempt to install missing type/stub packages.

stubs - Run stubgen against a project's package sources.

format - Run black against a project's package sources.

format-check - Run black with the --check argument.

tags - Create a tags file for the project using ctags (must be installed).

test - Run all of a project's tests with pytest.

test-% - Run project tests based on a search pattern (i.e. the -k option).

view - Attempt to open the test-coverage HTML with $BROWSER (environment variable).

host-coverage - Host test-coverage HTML locally, with the port specified by PYTHON_COV_PORT.

all - Run lint, sa and test in sequence.

clean - Remove compiled and cached files, test coverage, built package artifacts and other caches.

dist - Build sdist and bdist_wheel with setup.py in the project root.

upload - Use twine to upload the built package to PyPI.

editable - Install the project's package in editable mode (-e option) to the virtual environment.

venv

Targets for managing Python virtual environments.

Prefix: (no prefix)

Optional Arguments

PYTHON_VERSION - The version of Python to create a virtual environment for. (default: 3.8)

REQUIREMENTS_DIR - The location of the directory containing requirements files. (default: requirements in the project root)

REQ_FILES - Text files to install requirements from (using -r), in the requirements directory. (default: requirements.txt and dev_requirements.txt)

Commands

venv - Create or update the resolved virtual environment, if necessary.

venv-clean - Remove any virtual environments from the project root (or sub-directories).

vmklib

Targets related to this package, itself.

Prefix: mk-

Commands

upgrade - Upgrade (or install) vmklib in the resolved virtual environment.

sys-upgrade - Upgrade (or install) vmklib as a system or user package.

header - Print the Makefile header that should be used when integrating this package.

todo - Perform a case-insensitive search for todo in project directories.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vmklib-0.5.1.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

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

vmklib-0.5.1-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

Details for the file vmklib-0.5.1.tar.gz.

File metadata

  • Download URL: vmklib-0.5.1.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.10

File hashes

Hashes for vmklib-0.5.1.tar.gz
Algorithm Hash digest
SHA256 86a0d96a000b475f3a20aa5c1ffd398bbac0a03b5051269026de2cc99e415c1b
MD5 f9cc5bafd48a3b4c7d3027e22a5ec575
BLAKE2b-256 f57e29eb37415d56db446a76201c03355f8d0b0da5c9b4896ce48c8bfc70bc56

See more details on using hashes here.

File details

Details for the file vmklib-0.5.1-py3-none-any.whl.

File metadata

  • Download URL: vmklib-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 16.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.10

File hashes

Hashes for vmklib-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 24a5aa9a9f9e9f1b4b6c17f4b99c198a9b7220a58375b326aaa179b6f42e88dc
MD5 9f6e8001d38e6f2410b79270e3442583
BLAKE2b-256 e65ec2b4e355ab973700e3768fdee8de6cf1b5200e9a48738ccfcff98f18e322

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