Skip to content

Releases: BrianPugh/cyclopts

v2.8.0

28 Jun 12:22
35950e1
Compare
Choose a tag to compare

What's Changed

  • Introduced new attribute, App.version_format. The verstion string was previously printed as-is, but is now formatted with the specified format, falling back to help_format if not specified. By @BrianPugh in #188

Full Changelog: v2.7.1...v2.8.0

v2.7.1

20 Jun 00:17
Compare
Choose a tag to compare

Bug Fixes

  • Have meta apps inherit their parenting config. by @BrianPugh in #184

Misc

Full Changelog: v2.7.0...v2.7.1

v2.7.0

10 Jun 00:27
b1e7883
Compare
Choose a tag to compare

Features

  • New App.config field, that allows the loading of defaults from files.
    • cyclopts.config.Json - Load defaults from a json file.
    • cyclopts.config.Yaml - Load defaults from a yaml file.
    • cyclopts.config.Toml - Load defaults from a toml file.
    • cyclopts.config.Env - Load defaults from environment variables.
  • New Parameter.env_var_split attribute. Defaults to cyclopts.env_var_split, which behaviors similarly to Click's multiple values from environment values.

Full Changelog: v2.6.2...v2.7.0

v2.6.2

16 May 12:46
c76368c
Compare
Choose a tag to compare

Features

  • New App.help_format="rich" option.

Bug Fixes

  • Consistent help formatting (that respects help_format) across the different sections of the generated help-page. by @BrianPugh in #166
  • help_format is now keyword only. by @BrianPugh in #164
  • Improve type inference when using decorators with pyright by @breathe in #172

New Contributors

Full Changelog: v2.6.1...v2.6.2

v2.6.1 - Faster Importing

16 Apr 22:37
Compare
Choose a tag to compare

Significantly improve cyclopts import speed by lazy loading dependencies.

What's Changed

Full Changelog: v2.6.0...v2.6.1

v2.6.0

10 Apr 23:33
09320d1
Compare
Choose a tag to compare

Features

This release adds two new fields: App.name_transform and Parameter.name_transform. The function's responsibility is to convert python identifiers to their CLI counterparts and has signature:

def name_transform(s: str) -> str:
    ...

These name transforms can be set at a global level for your app:

app = App(
    name_transform=lambda name: name,  # don't modify the name at all. This applies to command names.
    default_parameter=Parameter(name_transform=lambda name: name),  # This applies to parameter names.
)

They can also be set in individual subapps (subapps inherit name_transform from their parent), or in individual Annotated[...., Parameter(name_transform=my_custom_transform)] definitions.

Full Changelog: v2.5.1...v2.6.0

v2.5.1

09 Apr 03:36
Compare
Choose a tag to compare

Bug Fixes

  • Fix displaying default if required=True and no default is present. by @BrianPugh in #146

Full Changelog: v2.5.0...v2.5.1

v2.5.0

25 Mar 20:36
Compare
Choose a tag to compare

What's Changed

  • Added support for Postponed Evaluation of types annotations (PEP-563) by @OrHayat in #138
  • Move special-flag parsing logic from parse_args into parse_known_args by @BrianPugh in #130

Full Changelog: v2.4.2...v2.5.0

v2.4.2

10 Mar 19:31
cdbb28d
Compare
Choose a tag to compare

Bug Fixes

  • Unfreeze help_flags and version_flags; create/delete commands on set/get by @BrianPugh in #127. Addresses #126

Full Changelog: v2.4.1...v2.4.2

v2.4.1

07 Mar 06:05
f95622b
Compare
Choose a tag to compare

Bug Fixes

  • fixed showing choices of list,tuples and set type annotations by @OrHayat in #123
  • Handle bare tuple annotation; more robust union logic. by @BrianPugh in #125

New Contributors

Full Changelog: v2.4.0...v2.4.1