1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-05-07 10:30:05 +00:00
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
crc32.py
dict.py
dict_kv.py
from_csv.py
from_ini.py
groupby_as_dict.py
hashids.py
hashids_decode.yml
hashids_encode.yml
jc.py
json_query.py
keep_keys.py
lists.py
lists_difference.yml
lists_intersect.yml
lists_mergeby.py
lists_symmetric_difference.yml
lists_union.yml
random_mac.py
remove_keys.py
replace_keys.py
reveal_ansible_type.py
time.py
to_days.yml
to_hours.yml
to_ini.py
to_milliseconds.yml
to_minutes.yml
to_months.yml
to_seconds.yml
to_time_unit.yml
to_weeks.yml
to_years.yml
unicode_normalize.py
version_sort.py