Versions follow Semantic Versioning (<major>.<minor>.<patch>).
Backward incompatible (breaking) changes will only be introduced in major versions with advance notice in the Deprecations section of releases.
.. towncrier-draft-entries::
Change the path for lock files
Fix the poetry support. Added a lockfile while setting up the virtual environments. This is specially important when using the tools as a pre-commit hook since on a clean system, we just one on of the invocations to setup the virtual environment, not all concurrent invocations.
No significant changes.
No significant changes.
Added poetry as an extra, ie, python -m pip install python-tools-scripts[poetry]. Do note however that, if poetry is in path, the extra does not need to be provided.
No significant changes.
No significant changes.
No significant changes.
Added support for using poetry and it's requirements groups.
THIS IS A BREAKING CHANGE AND ALL OLD CODE MUST BE UPDATED (#43)
No significant changes.
No significant changes.
No significant changes.
No significant changes.
No significant changes.
- Switch to RawDescriptionHelpFormatter as the formatter class. This will help to include properly indented examples. (#42)
- Fix traceback thrown during install reqs for virtualenv(changelog) (#40)
- Add support for just default requirements configs (#39)
- Don't force the default virtualenv to system_site_packages=True (#38)
- Properly handle non relative paths (#37)
- Switch to [ruff](https://github.com/charliermarsh/ruff) (#36)
- VirtualEnvConfig now additionally accepts pip_args which is a list of strings to pass to pip when installing the virtualenv's requirements. (#35)
- Remove virtualenv site-packages from sys.path in context manager exit (#34)
- Set DefaultVirtualenvConfig.venv_config to None when creating the class instance. (#33)
- Handle -d/--debug and -q/--quiet as early as possible (#32)
- Fixed bug where venv_config defined in command_group was getting ignored (#31)
- Don't set context.vent to a nullcontext (#30)
- Improved some type definitions (#29)
- Add py.typed to the source code (#28)
- Allow importing the virtualenv's dependencies into the python running
tools
. This will allow maintaining a lightertools.txt
requirements file, and install additional dependencies only for the commands that really need them. (#25) - Add support for a default Virtualenv. The default virtualenv site-packages will be added to the running python as an extra site dir. (#26)
- Allow passing virtualenv configuration when calling
ptscripts.register_tools_module
(#27)
- Allow passing a string or list of strings as the parent to avoid circular imports. (#22)
- Take the TOOLS_VIRTUALENV_CACHE_SEED environmental variable into account when calculating the virtual environments cache hash. (#23)
- Catch NotImplementedError exception when setting up signal handling. Windows, for example, does not support signal handling with asyncio. (#24)
- Properly handle subprocess.CalledProcessError. Catch the exception, print the error, and exit with the .returncode attribute value. (#21)
- The ctx now has a web attribute, a requests.Session instance which can be used to make web requests. (#19)
- Improve the user experience when an ImportError occurs while instantiating tools. Instead of relying on direct imports, users can now call, pyscripts.register_tools_module('tools.<whatever>'). Python tools scripts will then import them one by one, catching and reporting any ImportErrors occurring. Due to these errors, some of the commands might be unavailable, but most likely not all, while providing a clue as to why that is. (#20)
- The filename on console logs is now only shown when debug output is enabled. (#18)
- The parser CLI logs now show the right file making the call (#17)
- Allow passing parent to command_group (#16)
- Update pre-commit hooks versions (#16)
- Allow creating the virtual environments with venv as a fallback if virtualenv is not available. (#15)
Add virtualenv support.
Any python requirements that must be imported in the tools scripts cannot use this virtualenv support. This support is for when shelling out to binaries/scripts that get installed with the requirements. (#13)
- Forward ctx.run(..., **kwargs) to the underlying subprocess call. (#14)
- Cleanup conflicting parser CLI options (#12)
- Allow passing a maximum timeout for commands executed through ctx.run() (#11)
- Allow tools to report it's version (#10)
- Repeated caught signals now kill the process (#9)
- Fixed process interaction (#9)
- Properly handle SIGINT and SIGTERM on spawed subprocesses (#7)
- Provide helper chdir method on the context object. (#6)
- When a function has a keyword argument with a boolean default, the parser now automatically creates the store_true or store_false action(if not action was provided in the arguments keyword definition. (#5)
- Provide a run() method to ctx to run subprocesses. (#4)
- Several improvements with logging (#3)
- Fix typo in keyword argument (#2)
- Properly handle CI environment terminals (#1)
First minimally working release.