It is worth noting that the trade-off (or perk, however you see it) with the new dict approach is that you can not stack entries and have them all append to one another. With the dict approach, the last defined entry prevails:
For example:
# duplicate group tags with the same name stack:
groups:
- group: tagB, tagC
- group: tagA
# At this point, group == tagA, tagB and tagC
The new supported dict version behaves differently:
# duplicate group tags with the same name stack:
groups:
group: tagB, tagC
group: tagA
# At this point, group == tagA (because it was the last entry defined and replaces
# the previous value)
Checklist
[ ] The code change is tested and works locally.
[ ] There is no commented out code in this PR.
[ ] No lint errors (use flake8)
[ ] 100% test coverage
Testing
Anyone can help test this source code as follows:
# Create a virtual environment to work in as follows:
python3 -m venv apprise
# Change into our new directory
cd apprise
# Activate our virtual environment
source bin/activate
# Install the branch
pip install git+https://github.com/caronc/apprise.git@952-group-handling-fix
# Test out the changes with the following command:
apprise -t "Test Title" -b "Test Message" \
<apprise url related to ticket>
Description:
Related issue (if applicable): #952, and apprise-api/146
Current design of Tag Group handling works great as long as YAML definitions are in a list format only. e.g:
However the following is not supported (until this PR):
It is worth noting that the trade-off (or perk, however you see it) with the new
dict
approach is that you can not stack entries and have them all append to one another. With thedict
approach, the last defined entry prevails:For example:
The new supported
dict
version behaves differently:Checklist
flake8
)Testing
Anyone can help test this source code as follows: