Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MatchingRule ¶
type MatchingRule struct {
// Path specifies a pyproject.toml path pattern. The pattern must match the full path,
// not just a substring. Wildcards accepted by filepath.Match are supported.
Path string `yaml:",omitempty"`
// Packages specifies the list of Python packages to match, keyed by package name.
// The value is a PEP 440 version specifier (e.g. ">=2.0,<3.0") or empty to match any version.
Packages map[string]string `yaml:",omitempty"`
}
MatchingRule specifies a rule to include or exclude pyproject.toml dependencies.
type MatchingRules ¶
type MatchingRules []MatchingRule
MatchingRules is a slice of MatchingRule.
func (MatchingRules) Validate ¶
func (m MatchingRules) Validate() error
Validate checks that every rule has at least one non-empty field.
type Pyproject ¶
type Pyproject struct {
// contains filtered or unexported fields
}
Pyproject holds all state needed to discover pyproject.toml dependency manifests.
func (Pyproject) DiscoverManifests ¶
DiscoverManifests returns updatecli manifests for all Python dependencies found under rootDir.
type Spec ¶
type Spec struct {
// RootDir defines the root directory used to recursively search for pyproject.toml files.
RootDir string `yaml:",omitempty"`
// Ignore specifies rules to exclude pyproject.toml dependencies from autodiscovery.
Ignore MatchingRules `yaml:",omitempty"`
// Only specifies rules to restrict autodiscovery to matching pyproject.toml dependencies.
Only MatchingRules `yaml:",omitempty"`
/*
versionfilter provides parameters to specify the version pattern used when generating manifests.
kind - pep440 (default)
versionfilter of kind `pep440` uses PEP 440 version specifiers natively.
pattern accepts a PEP 440 version specifier such as `>=2.28`, `>=1.0,<3.0`, or `*` (any).
kind - semver
versionfilter of kind `semver` uses semantic versioning as version filtering.
pattern accepts one of:
`patch` - update patch version only
`minor` - update minor version only
`major` - update major versions only
`a version constraint` such as `>= 1.0.0`
kind - regex
versionfilter of kind `regex` uses regular expression as version filtering.
pattern accepts a valid regular expression.
example:
“`
versionfilter:
kind: pep440
pattern: ">=2.28"
“`
*/
VersionFilter version.Filter `yaml:",omitempty"`
// IndexURL specifies a custom PyPI index URL propagated to all generated source specs.
IndexURL string `yaml:",omitempty"`
}
Spec defines the pyproject autodiscovery parameters.
Click to show internal directories.
Click to hide internal directories.