community.general/plugins/filter
patchback[bot] 459b9f3f9a
[PR #9133/a789bd12 backport][stable-10] Add the accumulate filter (#9220)
Add the accumulate filter (#9133)

* Add the accumulate filter

- Add myself as a maintainer for it.
- Some integration tests.

* accumulate: fix documentation and add test aliases

The aliases file was copied over from
tests/integrations/targets/filter_dict/aliases as the documentation[1]
suggests to use the same group as existing similar tests.

[1]: https://docs.ansible.com/ansible/latest/dev_guide/testing/sanity/integration-aliases.html

Suggested-by: Felix Fontein <felix@fontein.de>

* accumulate: documentation: markup consistency with other plugins

Suggested-by: Felix Fontein <felix@fontein.de>
Suggested-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

* filter/accumulate: Validate input is a Sequence

Accepting arbitrary iterables might lead to surprising behavior so we
are stricter on what we accept in the filter.
Relaxing those requirements is easier than retrofitting them, in terms
of backwards compatibility.

Suggested-by: Felix Fontein <felix@fontein.de>
Signed-off-by: Max Gautier <mg@max.gautier.name>

* filter/accumulate: Document the behavior with a string

Signed-off-by: Max Gautier <mg@max.gautier.name>

---------

Signed-off-by: Max Gautier <mg@max.gautier.name>
(cherry picked from commit a789bd128f)

Co-authored-by: Max Gautier <mg@max.gautier.name>
2024-12-02 20:35:15 +01:00
..
accumulate.py [PR #9133/a789bd12 backport][stable-10] Add the accumulate filter (#9220) 2024-12-02 20:35:15 +01:00
counter.py Move licenses to LICENSES/, run add-license.py, add LICENSES/MIT.txt (#5065) 2022-08-05 12:28:29 +02:00
crc32.py feat: Add crc32 filter (#5062) 2022-08-21 12:10:31 +02:00
dict.py [PR #9145/dc856ab6 backport][stable-10] filters/dict: document the correct return value (#9151) 2024-11-18 20:58:50 +01:00
dict_kv.py Move licenses to LICENSES/, run add-license.py, add LICENSES/MIT.txt (#5065) 2022-08-05 12:28:29 +02:00
from_csv.py Update from_csv.py docs (#7296) 2023-09-20 22:02:54 +02:00
from_ini.py fix: Ensuring interpolation is disabled for ConfigParser (#8185) 2024-04-09 08:01:44 +02:00
groupby_as_dict.py groupby_as_dict: mention Jinja2's groupby filter (#9040) 2024-10-19 22:07:56 +02:00
hashids.py Use dict comprehension in plugins (#8814) 2024-09-01 20:22:53 +02:00
hashids_decode.yml Add default license header to files which have no copyright or license header yet (#5074) 2022-08-05 14:03:38 +02:00
hashids_encode.yml Add default license header to files which have no copyright or license header yet (#5074) 2022-08-05 14:03:38 +02:00
jc.py Start using semantic markup (#6627) 2023-06-10 09:28:40 +02:00
json_query.py Add more license statements (#5079) 2022-08-07 13:37:23 +02:00
keep_keys.py Use dict comprehension in plugins (#8814) 2024-09-01 20:22:53 +02:00
lists.py New filters to calculate the union, intersection, difference and symmetric difference of lists by preserving the items order (#7985) 2024-02-23 20:35:09 +01:00
lists_difference.yml New filters to calculate the union, intersection, difference and symmetric difference of lists by preserving the items order (#7985) 2024-02-23 20:35:09 +01:00
lists_intersect.yml New filters to calculate the union, intersection, difference and symmetric difference of lists by preserving the items order (#7985) 2024-02-23 20:35:09 +01:00
lists_mergeby.py Update docs lists_mergeby (#8475) 2024-06-13 07:35:32 +02:00
lists_symmetric_difference.yml New filters to calculate the union, intersection, difference and symmetric difference of lists by preserving the items order (#7985) 2024-02-23 20:35:09 +01:00
lists_union.yml New filters to calculate the union, intersection, difference and symmetric difference of lists by preserving the items order (#7985) 2024-02-23 20:35:09 +01:00
random_mac.py Add more license statements (#5079) 2022-08-07 13:37:23 +02:00
remove_keys.py Use dict comprehension in plugins (#8814) 2024-09-01 20:22:53 +02:00
replace_keys.py Use dict comprehension in plugins (#8814) 2024-09-01 20:22:53 +02:00
reveal_ansible_type.py New Plugins #8594 (#8595) 2024-07-13 13:32:36 +02:00
time.py Move licenses to LICENSES/, run add-license.py, add LICENSES/MIT.txt (#5065) 2022-08-05 12:28:29 +02:00
to_days.yml Start using semantic markup (#6627) 2023-06-10 09:28:40 +02:00
to_hours.yml Start using semantic markup (#6627) 2023-06-10 09:28:40 +02:00
to_ini.py fix: Ensuring interpolation is disabled for ConfigParser (#8185) 2024-04-09 08:01:44 +02:00
to_milliseconds.yml Start using semantic markup (#6627) 2023-06-10 09:28:40 +02:00
to_minutes.yml Start using semantic markup (#6627) 2023-06-10 09:28:40 +02:00
to_months.yml Start using semantic markup (#6627) 2023-06-10 09:28:40 +02:00
to_seconds.yml Start using semantic markup (#6627) 2023-06-10 09:28:40 +02:00
to_time_unit.yml Start using semantic markup (#6627) 2023-06-10 09:28:40 +02:00
to_weeks.yml Start using semantic markup (#6627) 2023-06-10 09:28:40 +02:00
to_years.yml Start using semantic markup (#6627) 2023-06-10 09:28:40 +02:00
unicode_normalize.py Move licenses to LICENSES/, run add-license.py, add LICENSES/MIT.txt (#5065) 2022-08-05 12:28:29 +02:00
version_sort.py Move licenses to LICENSES/, run add-license.py, add LICENSES/MIT.txt (#5065) 2022-08-05 12:28:29 +02:00