Analysers Guide¶
Analysers inspect different facets of your project to detect API changes. Bumpwright ships optional analysers for the CLI, gRPC services, web routes, database migrations, OpenAPI documents and GraphQL schemas. The table below lists each analyser, the key used to configure it, and the CLI flag to enable it for a single run.
Analyser |
Configuration key |
CLI flag |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Enable analysers in bumpwright.toml
:
[analysers]
cli = true # enable CLI analysis
grpc = true # enable gRPC analysis
web_routes = true # enable web route analysis
migrations = true # enable migrations analysis
openapi = true # enable OpenAPI analysis
graphql = true # enable GraphQL analysis
[migrations]
paths = ["migrations"] # directories with Alembic scripts
[openapi]
paths = ["openapi.yaml"]
You can also toggle analysers per invocation with the command-line flags
--enable-analyser
and --disable-analyser
.
Python API analyser¶
The default analyser inspects Python modules to track changes to the public
API. If a module defines __all__
, those names form the public interface.
Otherwise, all module- or class-level members whose names do not start with
_
are considered public. Names with leading underscores, including dunder
methods, are ignored.
__all__ = ["foo", "Bar"]
def foo(): ...
def _hidden(): ...
class Bar:
def baz(self): ...
def _private(self): ...
The analyser includes foo
and Bar.baz
in the public API, while
_hidden
and Bar._private
are excluded.
Analysers
CLI Analyser – Track command-line interface changes.
gRPC Analyser – Detect gRPC service or method updates.
Web Route Analyser – Monitor HTTP route and parameter changes.
Migrations Analyser – Scan database migrations for schema impacts.
OpenAPI Analyser – Compare OpenAPI specs for endpoint drift.
GraphQL Analyser – Flag GraphQL schema alterations.