# daves-dev-tools
[![test](https://github.com/enorganic/daves-dev-tools/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/enorganic/daves-dev-tools/actions/workflows/test.yml)
[![CodeQL](https://github.com/enorganic/daves-dev-tools/actions/workflows/codeql-analysis.yml/badge.svg?branch=main)](https://github.com/enorganic/daves-dev-tools/actions/workflows/codeql-analysis.yml)
[![distribute](https://github.com/enorganic/daves-dev-tools/actions/workflows/distribute.yml/badge.svg?branch=main)](https://github.com/enorganic/daves-dev-tools/actions/workflows/distribute.yml)
This project provides command line utilities for performing common python
development tasks.
## Installation
You can install daves-dev-tools with pip:
```shell
pip3 install daves-dev-tools
```
## Usage
### Command Line Interface
```console
$ daves-dev-tools -h
Usage:
daves-dev-tools <command> [options]
Commands:
git Tools for interacting with git repos.
requirements Tools for managing requirement versions.
install-editable Auto-discover and install packages in "develop"
mode used by the current environment or by one or
more specified packages/projects.
make-typed Configure your project to indicate to `mypy` that
the contents are type-hinted.
uninstall-all Uninstall all distributions from the current
python environment except for those explicitly
specified (and their dependencies).
clean Delete files from your project which are ignored
by `git`, excepting files matching specified
exclusion patterns.
distribute Build and distribute to PYPI (or other indexes)
with one command.
```
#### daves-dev-tools requirements update
See the documentation for
[dependence update](https://github.com/enorganic/dependence#dependence-update).
This command is now part of the `dependence` distribution/project.
`daves-dev-tools` wraps `dependence` for backwards compatibility,
however future major versions of `daves-dev-tools` may drop this command,
since it is now redundant.
#### daves-dev-tools requirements freeze
See the documentation for
[dependence freeze](https://github.com/enorganic/dependence#dependence-update).
This command is now part of the `dependence` distribution/project.
`daves-dev-tools` wraps `dependence` for backwards compatibility,
however future major versions of `daves-dev-tools` may drop this command,
since it is now redundant.
#### daves-dev-tools install-editable
```console
$ daves-dev-tools install-editable -h
usage: daves-dev-tools install-editable [-h] [-r REQUIREMENT] [-d DIRECTORY]
[-e EXCLUDE] [-ed EXCLUDE_DIRECTORY]
[-edre EXCLUDE_DIRECTORY_REGULAR_EXPRESSION]
[-dr] [-ie]
This command will attempt to find and install, in develop (editable) mode, all
packages which are installed in the current python environment. If one or more
`requirement` file paths or specifiers are provided, installation will be
limited to the dependencies identified (recursively) by these requirements.
Exclusions can be specified using the `-e` parameter. Directories can be
excluded by passing regular expressions to the `-edre` parameter. Any
arguments passed not matching those specified below will be passed on to `pip
install` (see `pip install -h` for additionally available arguments).
optional arguments:
-h, --help show this help message and exit
-r REQUIREMENT, --requirement REQUIREMENT
One or more requirement specifiers, requirement file
paths, or configuration file paths (setup.cfg,
setup.py, pyproject.toml, tox.ini, etc.). If provided,
only dependencies of these requirements will be
installed.
-d DIRECTORY, --directory DIRECTORY
A directory in which to search for requirements. By
default, the directory above the current directory is
searched. This argument may be passed more than once
to include multiple locations.
-e EXCLUDE, --exclude EXCLUDE
A comma-separated list of distribution names to
exclude
-ed EXCLUDE_DIRECTORY, --exclude-directory EXCLUDE_DIRECTORY
One or more glob patterns indicating directories to
exclude. This argument may be expressed as a path
relative to the current.
-edre EXCLUDE_DIRECTORY_REGULAR_EXPRESSION, --exclude-directory-regular-expression EXCLUDE_DIRECTORY_REGULAR_EXPRESSION
Directories matching this regular expression will be
excluded when searching for setup locations This
argument may be passed more than once to exclude
directories matching more than one regular expression.
The default for this argument is equivalent to `-edre
'^[.~].*$' -edre '^venv$' -edre '^site-packages$'`.
Unlike for *--exclude-directory*, these expressions
apply only to the directory *name*, and no attempt to
resolve relative paths is made.
-dr, --dry-run Print, but do not execute, all `pip install` commands
-ie, --include-extras
Install all extras for all discovered distributions
```
#### daves-dev-tools make-typed
```console
$ daves-dev-tools make-typed -h
usage: daves-dev-tools make-typed [-h] path
Add **/py.typed files and alter the setup.cfg such that a distribution's packages will be identifiable as fully type-hinted
positional arguments:
path A project directory (where the setup.py and/or setup.cfg file are located)
optional arguments:
-h, --help show this help message and exit
```
#### daves-dev-tools uninstall-all
```console
$ daves-dev-tools uninstall-all -h
usage: daves-dev-tools uninstall-all [-h] [-e EXCLUDE] [-dr]
This command will uninstall all distributions installed in the same environment as that from which this command is executed,
excluding any specified by `-e EXCLUDE`.
optional arguments:
-h, --help show this help message and exit
-e EXCLUDE, --exclude EXCLUDE
One or more distribution specifiers, requirement files, setup.cfg files, pyproject.toml files, or
tox.ini files denoting packages to exclude (along with all of their requirements) from those
distributions to be uninstalled
-dr, --dry-run Print, but do not execute, the assembled `pip uninstall` command which, absent this flag, would be
executed
```
#### daves-dev-tools git download
```console
$ daves-dev-tools git download -h
usage: daves-dev-tools git download [-h] [-b BRANCH] [-d DIRECTORY] [-e]
repo [file [file ...]]
Download files from a git repository matching one or more specified file names
or glob patterns
positional arguments:
repo Reference repository
file One or more `glob` pattern(s) indicating a specific
file or files to include. If not provided, all files
in the repository will be included.
optional arguments:
-h, --help show this help message and exit
-b BRANCH, --branch BRANCH
Retrieve files from BRANCH instead of the remote's
HEAD
-d DIRECTORY, --directory DIRECTORY
The directory under which to save matched files. If
not provided, files will be saved under the current
directory.
-e, --echo Print the downloaded file paths
```
#### daves-dev-tools git tag-version
```console
$ daves-dev-tools git tag-version -h
usage: daves-dev-tools git tag-version [-h] [-m MESSAGE] [directory]
Tag your repo with the python package version, if a tag for that version
doesn't already exist.
positional arguments:
directory Your project directory. If not provided, the current
directory will be used.
optional arguments:
-h, --help show this help message and exit
-m MESSAGE, --message MESSAGE
The tag message. If not provided, the new version
number is used.
```
#### daves-dev-tools clean
```console
$ daves-dev-tools clean -h
usage: daves-dev-tools clean [-h] [-e EXCLUDE] [-dr] [directory]
This command removes all files from your project directory which are ignored
by git, unless matching one of the EXCLUDE glob patterns.
positional arguments:
directory The root directory for the project.
optional arguments:
-h, --help show this help message and exit
-e EXCLUDE, --exclude EXCLUDE
One or more glob patterns indicating files/directories
to exclude from cleanup. The default values are: `-e
.idea -e .vscode -e .git -e venv`.
-dr, --dry-run Instead of executing the cleanup, just print the shell
commands (a list of `rm FILE` commands).
```
#### daves-dev-tools distribute
```console
$ daves-dev-tools distribute -h
usage: daves-dev-tools distribute [-h]
[-r REPOSITORY] [--repository-url REPOSITORY_URL]
[-s] [--sign-with SIGN_WITH] [-i IDENTITY] [-u USERNAME]
[-p PASSWORD] [--non-interactive] [-c COMMENT]
[--config-file CONFIG_FILE] [--skip-existing]
[--cert path] [--client-cert path] [--verbose]
[--disable-progress-bar]
[directory]
positional arguments:
directory The root directory path for the project.
optional arguments:
-h, --help show this help message and exit
-r REPOSITORY, --repository REPOSITORY
The repository (package index) to upload the package
to. Should be a section in the config file (default:
pypi). (Can also be set via TWINE_REPOSITORY
environment variable.)
--repository-url REPOSITORY_URL
The repository (package index) URL to upload the
package to. This overrides --repository. (Can also be
set via TWINE_REPOSITORY_URL environment variable.)
-s, --sign Sign files to upload using GPG.
--sign-with SIGN_WITH
GPG program used to sign uploads (default: gpg).
-i IDENTITY, --identity IDENTITY
GPG identity used to sign files.
-u USERNAME, --username USERNAME
The username to authenticate to the repository
(package index) as. (Can also be set via
TWINE_USERNAME environment variable.)
-p PASSWORD, --password PASSWORD
The password to authenticate to the repository
(package index) with. (Can also be set via
TWINE_PASSWORD environment variable.)
--non-interactive Do not interactively prompt for username/password if
the required credentials are missing. (Can also be set
via TWINE_NON_INTERACTIVE environment variable.)
-c COMMENT, --comment COMMENT
The comment to include with the distribution file.
--config-file CONFIG_FILE
The .pypirc config file to use.
--skip-existing Continue uploading files if one already exists. (Only
valid when uploading to PyPI. Other implementations
may not support this.)
--cert path Path to alternate CA bundle (can also be set via
TWINE_CERT environment variable).
--client-cert path Path to SSL client certificate, a single file
containing the private key and the certificate in PEM
format.
--verbose Show verbose output.
--disable-progress-bar
Disable the progress bar.
```
Raw data
{
"_id": null,
"home_page": "https://github.com/enorganic/daves-dev-tools",
"name": "daves-dev-tools",
"maintainer": null,
"docs_url": null,
"requires_python": "~=3.8",
"maintainer_email": null,
"keywords": "dave, dev, tools",
"author": null,
"author_email": "david@belais.me",
"download_url": "https://files.pythonhosted.org/packages/06/43/8d48a1433b701395da7228d14eff2e5ff4c3da359192df23f400a3f93d98/daves_dev_tools-2.1.4.tar.gz",
"platform": null,
"description": "# daves-dev-tools\n\n[![test](https://github.com/enorganic/daves-dev-tools/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/enorganic/daves-dev-tools/actions/workflows/test.yml)\n[![CodeQL](https://github.com/enorganic/daves-dev-tools/actions/workflows/codeql-analysis.yml/badge.svg?branch=main)](https://github.com/enorganic/daves-dev-tools/actions/workflows/codeql-analysis.yml)\n[![distribute](https://github.com/enorganic/daves-dev-tools/actions/workflows/distribute.yml/badge.svg?branch=main)](https://github.com/enorganic/daves-dev-tools/actions/workflows/distribute.yml)\n\n\nThis project provides command line utilities for performing common python\ndevelopment tasks.\n\n## Installation\n\nYou can install daves-dev-tools with pip:\n\n```shell\npip3 install daves-dev-tools\n```\n\n## Usage\n\n### Command Line Interface\n\n```console\n$ daves-dev-tools -h\nUsage:\n daves-dev-tools <command> [options]\n\nCommands:\n git Tools for interacting with git repos.\n requirements Tools for managing requirement versions.\n install-editable Auto-discover and install packages in \"develop\"\n mode used by the current environment or by one or\n more specified packages/projects.\n make-typed Configure your project to indicate to `mypy` that\n the contents are type-hinted.\n uninstall-all Uninstall all distributions from the current\n python environment except for those explicitly\n specified (and their dependencies).\n clean Delete files from your project which are ignored\n by `git`, excepting files matching specified\n exclusion patterns.\n distribute Build and distribute to PYPI (or other indexes)\n with one command.\n```\n\n#### daves-dev-tools requirements update\n\nSee the documentation for\n[dependence update](https://github.com/enorganic/dependence#dependence-update).\nThis command is now part of the `dependence` distribution/project.\n`daves-dev-tools` wraps `dependence` for backwards compatibility,\nhowever future major versions of `daves-dev-tools` may drop this command,\nsince it is now redundant.\n\n#### daves-dev-tools requirements freeze\n\nSee the documentation for\n[dependence freeze](https://github.com/enorganic/dependence#dependence-update).\nThis command is now part of the `dependence` distribution/project.\n`daves-dev-tools` wraps `dependence` for backwards compatibility,\nhowever future major versions of `daves-dev-tools` may drop this command,\nsince it is now redundant.\n\n#### daves-dev-tools install-editable\n\n```console\n$ daves-dev-tools install-editable -h\nusage: daves-dev-tools install-editable [-h] [-r REQUIREMENT] [-d DIRECTORY]\n [-e EXCLUDE] [-ed EXCLUDE_DIRECTORY]\n [-edre EXCLUDE_DIRECTORY_REGULAR_EXPRESSION]\n [-dr] [-ie]\n\nThis command will attempt to find and install, in develop (editable) mode, all\npackages which are installed in the current python environment. If one or more\n`requirement` file paths or specifiers are provided, installation will be\nlimited to the dependencies identified (recursively) by these requirements.\nExclusions can be specified using the `-e` parameter. Directories can be\nexcluded by passing regular expressions to the `-edre` parameter. Any\narguments passed not matching those specified below will be passed on to `pip\ninstall` (see `pip install -h` for additionally available arguments).\n\noptional arguments:\n -h, --help show this help message and exit\n -r REQUIREMENT, --requirement REQUIREMENT\n One or more requirement specifiers, requirement file\n paths, or configuration file paths (setup.cfg,\n setup.py, pyproject.toml, tox.ini, etc.). If provided,\n only dependencies of these requirements will be\n installed.\n -d DIRECTORY, --directory DIRECTORY\n A directory in which to search for requirements. By\n default, the directory above the current directory is\n searched. This argument may be passed more than once\n to include multiple locations.\n -e EXCLUDE, --exclude EXCLUDE\n A comma-separated list of distribution names to\n exclude\n -ed EXCLUDE_DIRECTORY, --exclude-directory EXCLUDE_DIRECTORY\n One or more glob patterns indicating directories to\n exclude. This argument may be expressed as a path\n relative to the current.\n -edre EXCLUDE_DIRECTORY_REGULAR_EXPRESSION, --exclude-directory-regular-expression EXCLUDE_DIRECTORY_REGULAR_EXPRESSION\n Directories matching this regular expression will be\n excluded when searching for setup locations This\n argument may be passed more than once to exclude\n directories matching more than one regular expression.\n The default for this argument is equivalent to `-edre\n '^[.~].*$' -edre '^venv$' -edre '^site-packages$'`.\n Unlike for *--exclude-directory*, these expressions\n apply only to the directory *name*, and no attempt to\n resolve relative paths is made.\n -dr, --dry-run Print, but do not execute, all `pip install` commands\n -ie, --include-extras\n Install all extras for all discovered distributions\n```\n\n#### daves-dev-tools make-typed\n\n```console\n$ daves-dev-tools make-typed -h\nusage: daves-dev-tools make-typed [-h] path\n\nAdd **/py.typed files and alter the setup.cfg such that a distribution's packages will be identifiable as fully type-hinted\n\npositional arguments:\n path A project directory (where the setup.py and/or setup.cfg file are located)\n\noptional arguments:\n -h, --help show this help message and exit\n```\n\n#### daves-dev-tools uninstall-all\n\n```console\n$ daves-dev-tools uninstall-all -h\nusage: daves-dev-tools uninstall-all [-h] [-e EXCLUDE] [-dr]\n\nThis command will uninstall all distributions installed in the same environment as that from which this command is executed,\nexcluding any specified by `-e EXCLUDE`.\n\noptional arguments:\n -h, --help show this help message and exit\n -e EXCLUDE, --exclude EXCLUDE\n One or more distribution specifiers, requirement files, setup.cfg files, pyproject.toml files, or\n tox.ini files denoting packages to exclude (along with all of their requirements) from those\n distributions to be uninstalled\n -dr, --dry-run Print, but do not execute, the assembled `pip uninstall` command which, absent this flag, would be\n executed\n```\n\n#### daves-dev-tools git download\n\n```console\n$ daves-dev-tools git download -h\nusage: daves-dev-tools git download [-h] [-b BRANCH] [-d DIRECTORY] [-e]\n repo [file [file ...]]\n\nDownload files from a git repository matching one or more specified file names\nor glob patterns\n\npositional arguments:\n repo Reference repository\n file One or more `glob` pattern(s) indicating a specific\n file or files to include. If not provided, all files\n in the repository will be included.\n\noptional arguments:\n -h, --help show this help message and exit\n -b BRANCH, --branch BRANCH\n Retrieve files from BRANCH instead of the remote's\n HEAD\n -d DIRECTORY, --directory DIRECTORY\n The directory under which to save matched files. If\n not provided, files will be saved under the current\n directory.\n -e, --echo Print the downloaded file paths\n```\n\n#### daves-dev-tools git tag-version\n\n```console\n$ daves-dev-tools git tag-version -h\nusage: daves-dev-tools git tag-version [-h] [-m MESSAGE] [directory]\n\nTag your repo with the python package version, if a tag for that version\ndoesn't already exist.\n\npositional arguments:\n directory Your project directory. If not provided, the current\n directory will be used.\n\noptional arguments:\n -h, --help show this help message and exit\n -m MESSAGE, --message MESSAGE\n The tag message. If not provided, the new version\n number is used.\n```\n\n#### daves-dev-tools clean\n\n```console\n$ daves-dev-tools clean -h\nusage: daves-dev-tools clean [-h] [-e EXCLUDE] [-dr] [directory]\n\nThis command removes all files from your project directory which are ignored\nby git, unless matching one of the EXCLUDE glob patterns.\n\npositional arguments:\n directory The root directory for the project.\n\noptional arguments:\n -h, --help show this help message and exit\n -e EXCLUDE, --exclude EXCLUDE\n One or more glob patterns indicating files/directories\n to exclude from cleanup. The default values are: `-e\n .idea -e .vscode -e .git -e venv`.\n -dr, --dry-run Instead of executing the cleanup, just print the shell\n commands (a list of `rm FILE` commands).\n```\n\n#### daves-dev-tools distribute\n\n```console\n$ daves-dev-tools distribute -h\nusage: daves-dev-tools distribute [-h]\n [-r REPOSITORY] [--repository-url REPOSITORY_URL]\n [-s] [--sign-with SIGN_WITH] [-i IDENTITY] [-u USERNAME]\n [-p PASSWORD] [--non-interactive] [-c COMMENT]\n [--config-file CONFIG_FILE] [--skip-existing]\n [--cert path] [--client-cert path] [--verbose]\n [--disable-progress-bar]\n [directory]\n\npositional arguments:\n directory The root directory path for the project.\n\noptional arguments:\n -h, --help show this help message and exit\n -r REPOSITORY, --repository REPOSITORY\n The repository (package index) to upload the package\n to. Should be a section in the config file (default:\n pypi). (Can also be set via TWINE_REPOSITORY\n environment variable.)\n --repository-url REPOSITORY_URL\n The repository (package index) URL to upload the\n package to. This overrides --repository. (Can also be\n set via TWINE_REPOSITORY_URL environment variable.)\n -s, --sign Sign files to upload using GPG.\n --sign-with SIGN_WITH\n GPG program used to sign uploads (default: gpg).\n -i IDENTITY, --identity IDENTITY\n GPG identity used to sign files.\n -u USERNAME, --username USERNAME\n The username to authenticate to the repository\n (package index) as. (Can also be set via\n TWINE_USERNAME environment variable.)\n -p PASSWORD, --password PASSWORD\n The password to authenticate to the repository\n (package index) with. (Can also be set via\n TWINE_PASSWORD environment variable.)\n --non-interactive Do not interactively prompt for username/password if\n the required credentials are missing. (Can also be set\n via TWINE_NON_INTERACTIVE environment variable.)\n -c COMMENT, --comment COMMENT\n The comment to include with the distribution file.\n --config-file CONFIG_FILE\n The .pypirc config file to use.\n --skip-existing Continue uploading files if one already exists. (Only\n valid when uploading to PyPI. Other implementations\n may not support this.)\n --cert path Path to alternate CA bundle (can also be set via\n TWINE_CERT environment variable).\n --client-cert path Path to SSL client certificate, a single file\n containing the private key and the certificate in PEM\n format.\n --verbose Show verbose output.\n --disable-progress-bar\n Disable the progress bar.\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Dave's developer tools",
"version": "2.1.4",
"project_urls": {
"Homepage": "https://github.com/enorganic/daves-dev-tools"
},
"split_keywords": [
"dave",
" dev",
" tools"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "9346140d1af90a3ddad64c093cb0add4578aabfccd87de26ffaa9dbefebb3088",
"md5": "a08beec0c59b889c663f09a2a7ff0250",
"sha256": "7a3dc813c4914817b1c803f9b6b77c11a525d391d21fcfa45833a96a236d8730"
},
"downloads": -1,
"filename": "daves_dev_tools-2.1.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a08beec0c59b889c663f09a2a7ff0250",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "~=3.8",
"size": 28057,
"upload_time": "2024-10-18T02:14:49",
"upload_time_iso_8601": "2024-10-18T02:14:49.947474Z",
"url": "https://files.pythonhosted.org/packages/93/46/140d1af90a3ddad64c093cb0add4578aabfccd87de26ffaa9dbefebb3088/daves_dev_tools-2.1.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "06438d48a1433b701395da7228d14eff2e5ff4c3da359192df23f400a3f93d98",
"md5": "498eb5ddf20ce48ce85d2f8a430e64ed",
"sha256": "36df811d463fe818bae20ab70b58306aaf3d80a3fed1b84b768fca8638934426"
},
"downloads": -1,
"filename": "daves_dev_tools-2.1.4.tar.gz",
"has_sig": false,
"md5_digest": "498eb5ddf20ce48ce85d2f8a430e64ed",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "~=3.8",
"size": 26613,
"upload_time": "2024-10-18T02:14:51",
"upload_time_iso_8601": "2024-10-18T02:14:51.132114Z",
"url": "https://files.pythonhosted.org/packages/06/43/8d48a1433b701395da7228d14eff2e5ff4c3da359192df23f400a3f93d98/daves_dev_tools-2.1.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-18 02:14:51",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "enorganic",
"github_project": "daves-dev-tools",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"tox": true,
"lcname": "daves-dev-tools"
}