drain-swamp¶
Entrypoint which updates: changelog, NOTICE.txt and docs?/conf.py
- drain_swamp.cli_igor._logger: logging.Logger¶
Module level logger
- drain_swamp.cli_igor.main()¶
drain-swamp --help, prints help
drain-swamp COMMAND --help, prints help for a command
Table 13 Commands¶ command
desc
status
Updates changelog, CHANGES.rst, creating placeholder
doc?/conf.py, NOTICE.txt, and CHANGES.rst
list snippets in doc?/conf.py
Print the sanitized semantic version str
Get scm version str
Get version str from version file
Get useful notes to aid in kitting and publishing
Build package
depreciated
Given kind, write version str to version_file
depreciated
- drain_swamp.cli_igor.seed(*args: Any, **kwargs: Any) Any ¶
Updates changelog,
CHANGES.rst
, creating placeholderIf file [path]/CHANGES.rst does not exist, a warning is logged, need to capture that log entry
- Parameters:
path¶ (pathlib.Path) – path to the current working directory containing pyproject.toml
- drain_swamp.cli_igor.edit(*args: Any, **kwargs: Any) Any ¶
Edits: doc?/conf.py, NOTICE.txt, and CHANGES.rst
- Parameters:
- drain_swamp.cli_igor.snippets_list(*args: Any, **kwargs: Any) Any ¶
In Sphinx doc?/conf.py, list snippets
path is the package base folder. Searches for
doc?/conf.py
- Parameters:
path¶ (pathlib.Path) – Default current working directory. package root folder. Must contain
pyproject.toml
- drain_swamp.cli_igor.validate_tag(*args: Any, **kwargs: Any) Any ¶
Print the sanitized semantic version str
Normal cli usage
drain-swamp pretag “0.0.1”
Usage when package is not installed
python src/drain_swamp/cli_igor.py pretag “0.0.1”
Usage if package is installed
python -m drain_swamp.cli_igor pretag “0.0.1”
- drain_swamp.cli_igor.current_version(*args: Any, **kwargs: Any) Any ¶
Get scm version str
python src/drain_swamp/cli_igor.py current
or
drain-swamp current
- Parameters:
path¶ (pathlib.Path) – current working directory
- drain_swamp.cli_igor.tag_version(*args: Any, **kwargs: Any) Any ¶
Get semantic version str from version_file. Fall back to current version
python src/drain_swamp/cli_igor.py tag
or
drain-swamp tag
- Parameters:
path¶ (pathlib.Path) – current working directory
- drain_swamp.cli_igor.do_cheats(*args: Any, **kwargs: Any) Any ¶
Get useful notes to aid in kitting and publishing
python src/drain_swamp/cli_igor.py cheats
or
drain-swamp cheats
- Parameters:
path¶ (pathlib.Path) – current working directory
kind¶ (str) – semantic version str or “current” or “now” or “tag”. Side effect changes
src/[app name]/_version.py
- drain_swamp.cli_igor.semantic_version_aware_build(*args: Any, **kwargs: Any) Any ¶
Build package
- Parameters:
path¶ (pathlib.Path) – current working directory
kind¶ (str) – semantic version str or “current” or “now” or “tag”. Side effect changes
src/[app name]/_version.py
- drain_swamp.cli_igor.setuptools_scm_key_value_pair(*args: Any, **kwargs: Any) Any ¶
Given kind, write version str to version_file
- Parameters:
path¶ (pathlib.Path) – current working directory
kind¶ (str) – semantic version str or “current” or “now” or “tag”. Side effect changes
src/[app name]/_version.py
Deprecated since version 0.5.1: Version file written by plugin, ds_scm_version, during sdist build. Might remain relevent only to initially create the version file