Skip to content

Vertopal CLI v2.0.0

Choose a tag to compare

@vertonim vertonim released this 01 Sep 14:36
· 27 commits to main since this release
v2.0.0
f2748ff

Note

This version was published to PyPI but no binary build using GitHub Actions was created.
2.0.3 is the latest patch release and should be preferred.

📦 Migration Guide (from 1.x to 2.0.0)

If you are upgrading from Vertopal CLI 1.x, please review and apply the following changes to ensure a smooth transition:

  1. Reconfigure private credentials

    • The configuration key for the application ID has changed from api.appid to api.app.

    • You must update your stored credentials; otherwise, the program will raise an InvalidCredentialError exception.

    • New syntax (v2.0.0+):

      vertopal config api.app "your-app-id" api.token "your-security-token"
    • Old syntax (pre‑2.0.0):

      vertopal config --app "your-app-id" --token "your-security-token"
  2. Note the new public default credential

    • Vertopal CLI now ships with a built‑in, non‑authenticated credential (app: free, token: FREE-TOKEN) so you can start using it immediately after installation.
    • This credential is free but subject to daily rate limits. For production workloads, configure your private credentials as shown above.

For full details, see the Breaking Changes and Added sections below.

🚨 Removed (Breaking Changes)

  • Dropped support for Python 3.7 and 3.8 — the package now requires Python 3.9 or later (see pyproject.toml).

  • Removed support for legacy import/layout patterns; the project now uses the src/ package layout as the canonical layout.

  • Removed several legacy public symbols previously exported from the package root to provide a smaller, stable public surface (see vertopal/__init__.py).

  • Removed the top-level re-export of internal API classes. Consumers should import low-level clients directly from their modules (for example vertopal.api.v1.API).

  • Removed several command-line flags from the vertopal command: --app, --token, --overwrite, and --silent.

  • Configuration key changed — the application ID is now stored under the INI-style key api.app in the user configuration file (previously api.appid).
    Users upgrading from earlier versions must reconfigure their private credentials to continue using them.

    New syntax (v2.0.0+):

    vertopal config api.app "your-app-id" api.token "your-security-token"

    Old syntax (pre‑2.0.0):

    vertopal config --app "your-app-id" --token "your-security-token"

    The old flags are no longer supported. See also the new public default credential in the Added section.

✨ Added

  • Improvements to the vertopal CLI (see vertopal convert --help):
    • Bulk conversion support: accept files, directories, globs and brace/range patterns (e.g. {a,b}, {1..5}, **/*).
    • Read from stdin by using - as an input source.
    • Write to stdout by passing --output -.
    • Accept a file list as input and override output filename or output directory per invocation.
    • Recursive directory traversal and exclude-by-pattern support.
    • Filter inputs by modification date using an ISO 8601 --modified-since filter.
  • Added credential management to centralize application ID and security token handling (see vertopal/api/credential.py).
  • Introduced a new cli subpackage and refactored command managers for clearer separation of concerns (see vertopal/cli).
  • Reworked the CLI entry point and argument parser for clearer help, subcommands, and argument validation (see vertopal/vertopal.py).
  • Added Readable and Writable I/O protocols and three adapter modules: file, in-memory, and stdio for consistent I/O abstractions (see vertopal/io/protocols.py, and vertopal/io/__init__.py).
  • Added structured API response wrappers and richer helpers to the v1 client to simplify caller code (vertopal/api/v1.py).
  • Added a centralized settings module, enums, types, and Prism terminal styling helper for consistency across the codebase (see vertopal/settings.py, vertopal/enums.py, vertopal/types.py, and vertopal.utils.prism).
  • Added a public default credential to simplify first-run experience: the CLI ships with a non-authenticated, limited credential (app: free, token: FREE-TOKEN) so users can try the service without creating an account. This credential is intended for personal testing and evaluation and is subject to daily rate limits; production workloads should configure a private credential in the user config.

🛠 Changed

  • Moved terminal and CLI internals into the new cli subpackage; command registration and adapter responsibilities were reorganized into dedicated manager modules (see vertopal/cli).
  • Converted API client methods to return lightweight, structured response wrappers rather than raw dicts/tuples to improve ergonomics and error handling (see vertopal/api/v1.py, and vertopal/utils/data_wrappers.py).
  • Stabilized packaging and metadata to the src/ layout and modern build metadata (see pyproject.toml, and setup.py).
  • Moved API exception types into the top-level vertopal.exceptions module and simplified exception usage across modules.
  • Relocated the build helper into tools/build.py for clearer separation of tooling code.
  • Reworked the configuration module to use a singleton Config and safer load/write semantics (see vertopal/utils/config.py).
  • Redesigned vertopal.api.v1.API to be an instantiable client object rather than a module-level static; this enables per-instance configuration and better testability.
  • Updated the vertopal config subcommand: the command's interface and behavior for modifying the user configuration file has been redesigned. It now exposes clearer interactive and non-interactive options, safer write semantics, and explicit flags for common keys (see vertopal config --help).

🐛 Fixed

  • Fixed multiple resource leaks and inconsistent timeout usages in HTTP calls; timeouts are now applied uniformly for requests, uploads, and downloads.

Full Changelog: v1.1.0...v2.0.0