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

Watcher include directive #1123

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Commits on Mar 14, 2020

  1. Add support for watcher include directive - configs and tests

    This is an attempt to implement circus-tent#1119. For now only configs and tests
    are added and some drafts in the config loader. This is still work in
    progress.
    biozz committed Mar 14, 2020
    Configuration menu
    Copy the full SHA
    7c83d33 View commit details
    Browse the repository at this point in the history
  2. Add simple solution, which still needs some optimizations

    - rename config in tests
    - rename test case
    - add setting of config option from include
    biozz committed Mar 14, 2020
    Configuration menu
    Copy the full SHA
    665cc1f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    75684ef View commit details
    Browse the repository at this point in the history

Commits on Mar 17, 2020

  1. Improve watcher include directive handling

    - Refactor read_config method with two new local methods
    
      This was necessary to avoid code duplication, because include directive
      in `[watcher]` is basically the same as in `[circus]`. This allowed the reuse of `_scan` method. I also added underscores to
      arguments names, because they were shadowed.
    
      - `_init_config` - takes config path, has a parser option with default value
        and return parsed config from the path
      - `_get_includes` - takes config object and section name and returns a
        list of paths to read options from
    
    - Add a required section name for watcher includes to avoid usage of a
      fake `[tmp]` section from previous commits
      according to [documentation](https://docs.python.org/3/library/configparser.html)
      sections are required and in my opinion should be used going forward
    
    -  Expand test case to ensure included configs can be loaded from folders
       and using wildcards
    biozz committed Mar 17, 2020
    Configuration menu
    Copy the full SHA
    6a5802b View commit details
    Browse the repository at this point in the history
  2. fix flake8 error (line length)

    biozz committed Mar 17, 2020
    Configuration menu
    Copy the full SHA
    28ba922 View commit details
    Browse the repository at this point in the history