Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edit rezconfig docstrings for package_filter to reflect python form rather than YAML #1377

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 21 additions & 20 deletions src/rez/rezconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,42 +362,43 @@
# during a resolve, and if any filter excludes a package, that package is not
# included in the resolve. Here is a simple example:
#
# package_filter:
# excludes:
# - glob(*.beta)
# includes:
# - glob(foo-*)
# package_filter = {
# 'excludes': 'glob(*.beta)',
# 'includes': 'glob(foo-*)',
# }
#
# This is an example of a single filter with one exclusion rule and one inclusion
# rule. The filter will ignore all packages with versions ending in '.beta',
# except for package 'foo' (which it will accept all versions of). A filter will
# only exclude a package iff that package matches at least one exclusion rule,
# only exclude a package if that package matches at least one exclusion rule,
# and does not match any inclusion rule.
#
# Here is another example, which excludes all beta packages, and all packages
# except 'foo' that are released after a certain date. Note that in order to
# use multiple filters, you need to supply a list of dicts, rather than just a
# dict:
# Here is another example, which excludes all beta and dev packages, and all
# packages except 'foo' that are released after a certain date. Note that in
# order to use multiple filters, you need to supply a list of dicts, rather
# than just a dict:
#
# package_filter:
# - excludes:
# - glob(*.beta)
# - excludes:
# - after(1429830188)
# includes:
# - foo # same as range(foo), same as glob(foo-*)
# package_filter = [
# {
# 'excludes': ['glob(*.beta)', 'glob(*.dev)']
# },
# {
# 'excludes': ['after(1429830188)'],
# 'includes': ['foo'], # same as range(foo), same as glob(foo-*)
# }
# ]
#
# This example shows why multiple filters are supported - with only one filter,
# it would not be possible to exclude all beta packages (including foo), but also
# exclude all packages after a certain date, except for foo.
# it would not be possible to exclude all beta and dev packages (including foo),
# but also exclude all packages after a certain date, except for foo.
#
# Following are examples of all the possible rules:
#
# example | description
# --------------------|----------------------------------------------------
# glob(*.beta) | Matches packages matching the glob pattern.
# regex(.*-\\.beta) | Matches packages matching re-style regex.
# requirement(foo-5+) | Matches packages within the given requirement.
# range(foo-5+) | Matches packages within the given requirement.
# before(1429830188) | Matches packages released before the given date.
# after(1429830188) | Matches packages released after the given date.
# *.beta | Same as glob(*.beta)
Expand Down