Runcommands

Latest version: v1.0a71

Safety actively analyzes 631310 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 13

1.0a66

NOTE: This release contains a breaking change. See below for details.

- Added simplistic make-like functionality. Commands can now specify
`sources` (as glob patterns) and `creates`. Commands that specify the
latter will only be run if all the targets are newer than all the
sources.
- Improved `bool_or` so it can be used without specifying a type. This
supports the common case of `bool_or(str)` with less typing.
- Added support for using `bool_or` with container args.
- BREAKING: Switched to TOML for config. TOML is nicer than YAML. This
also allows config to be specified in `pyproject.toml` without having
to use a different config language.
- Added option to specify config in `pyproject.toml`. This should be the
preferred location for RunCommands config IMO. `commands.toml` or
`runcommands.toml` can also be used for projects that don't use
`pyproject.toml`.
- Added the option to define commands in `runcommands.py` instead of
`commands.py`.
- Improved discovery of commands module and config, primarily so that
commands can be run from project subdirectories. Discovery starts in
the current directory and precedes upward until a project root or the
file system root is reached. Care has to be taken in commands to
ensure they're operating in/on the correct path, especially commands
that assume they're being run from the project root.
- Made a handful of internal improvements.

1.0a65

- Fixed color setup for printer utility when `TERM` isn't set.

1.0a64

- Switched to `make_release` package for making releases (`make_release`
is based on the RunCommand `release` command)
- Removed `release` command
- Switched to `cached_property` package for `cached_property`
- Removed `cached_property`
- Fixed some things relating to poetry and new package layout
- Made `argv` required when calling `Command.run()`
- Added a mechanism for specifying default args in either
`pyproject.toml` or `setup.cfg`; this is mainly intended for use with
standalone console scripts, providing an easy way for end users to
configure such scripts without needing to know anything about
RunCommands
- When creating subcommand's use the base command's class by default
rather than `Command`
- BREAKING: `Command.console_script()` now `sys.exit()`s at the end
rather than returning the exit code so standalone console scripts will
exit with the correct return code; this can be "disabled" by wrapping
calls to `console_script` in a try/except that catches `SystemExit`

1.0a63.post1

Fixed project configuration with regard to README file. Poetry requires
the README file to be specified as the `readme` or it won't render it as
the long description in the package or on PyPI.

1.0a63

- Switched to poetry for package setup
- Moved package into `src/`
- Moved tests into `tests/`
- Added `format-code` command; reformatted all code
- Improved `release` command; in particular, it now looks for
`pyproject.toml` and updates the version there if found
- Improved color printer utility
- Disabled color printing on non-posix platforms (instead of printing
gibberish)
- Improved "string meaning inversion" logic for automatically inverting
boolean option help strings
- Wrapped arg type constructors so that when empty strings are passed
via the command they'll be converted to `None`

1.0a62

- Drop support for Python 3.5 since it's no longer supported.
- Add support for Python 3.9. For now, this just means adding Python 3.9
to the list of supported version and the list of versions tested via
tox.
- When possible, set type from default value for container args that
don't specifiy a type.

Page 2 of 13

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.