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

YAML extended configuration support for 'include' keyword #284

Merged
merged 1 commit into from
Aug 28, 2020

Conversation

caronc
Copy link
Owner

@caronc caronc commented Aug 28, 2020

Description:

Related issue (if applicable): #226

Just adding extended support to allow for comma separated include entries for YAML files only. To keep TEXT configuration files clean, they should still only have one include URL per statement.

This new Pull Request extends the existing YAML include support to additionally allows this:

# comma separated
include: http://localhost:8080/notify/apprise, http://localhost/apprise/cfg

... and this:

# new entry, but not bulleted (which is already supported)
# entries are still honoured and parsed accordingly to avoid end user
# confusion.
include:
   http://localhost:8080/notify/apprise
   http://localhost/apprise/cfg01
   http://localhost/apprise/cfg02
   http://localhost/apprise/cfg03

... and finally this too:

# a mix of supported bullets and comma separated URLs.  This
# looks unclean for what the intentions are, but there is no need to
# yell at a user to change it when it's still very parse-able.
include:
   - http://localhost:8080/notify/apprise, http://localhost/apprise/cfg01
     http://localhost/apprise/cfg02
   - http://localhost/apprise/cfg03

This merge request contains test cases to support the 3 examples above.

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

@caronc caronc changed the title configuration 'include' extended support YAML extened configuration support for 'include' keyword Aug 28, 2020
@caronc caronc changed the title YAML extened configuration support for 'include' keyword YAML extended configuration support for 'include' keyword Aug 28, 2020
@codecov-commenter
Copy link

codecov-commenter commented Aug 28, 2020

Codecov Report

Merging #284 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #284   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           83        83           
  Lines         9927      9928    +1     
  Branches      1611      1611           
=========================================
+ Hits          9927      9928    +1     
Impacted Files Coverage Δ
apprise/config/ConfigBase.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 66d285a...0e6a87e. Read the comment docs.

@caronc caronc merged commit cba8599 into master Aug 28, 2020
@caronc caronc deleted the 226-config-include-smart-url-parsing branch September 2, 2020 02:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants