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

Extended build examples #118

Merged
merged 7 commits into from
Jul 27, 2020
Merged

Commits on Jul 26, 2020

  1. Refactor build_examples.py

    - Use `pathlib.Path` instead of `os.path`
    - Fix order of files while building
    - Consolidate code for building demos, examples and tutorial
    - Change argument from `tutorials` to `tutorial` to remain consistent
    - Add some indentation in console output for better readability
    formatc1702 authored and kvid committed Jul 26, 2020
    Configuration menu
    Copy the full SHA
    6dcf16c View commit details
    Browse the repository at this point in the history
  2. Add actions to compare against and restore from the latest commit

    Add new actions:
    - 'compare' action to compare generated files (except those
      generated by Graphviz) against the latest commit, and
    - 'restore' action to restore generated files from the latest commit.
    
    This is a squash rebase of these commits:
    - p 9ad3e13 Reduce code duplication by moving common code into a generic function
    - s d4feae6 Add action to restore generated files from git repository
    - s 64f6507 Add action to compare generated files against git repository
    - s 099c202 Simplify code
    kvid committed Jul 26, 2020
    Configuration menu
    Copy the full SHA
    aeadd75 View commit details
    Browse the repository at this point in the history
  3. Make all actions honor the optional argument -g or --group

    This make it possible to append '-g' or '--groups' followed by
    space separated group names to any CLI action command, and the
    set of generated files affected by the command will be limited
    to the selected groups ('examples', 'tutorial', and 'demos').
    Default is all groups. A simple help text is added for each of
    the arguments (action and groups) to improve the autogenerated
    CLI help output.
    
    This is a squash rebase of these commits:
    - p ec29076 Make all actions honor the optional argument -generate
    - s e3ad11a Move open_file_append() outside the if to avoid re-open
    - s ba4b900 Avoid including readme in all file groups
    - s 1ca8bd1 Simplify code
    - s a9e7337 Rename some variables to better reflect their contents and relations
    - s 58a54b2 Move test to include readme inside collect_filenames() function
    - s f2a0db0 Improve status output by adding group name
    - s d3b299b Rename -generate option to -g/--groups and add argument help
    kvid committed Jul 26, 2020
    Configuration menu
    Copy the full SHA
    1d7ed6f View commit details
    Browse the repository at this point in the history
  4. Restructure the group dict initialization

    By putting all value entries on separate lines with a trailing comma,
    it becomes easier to read the diff when later inserting or deleting
    the first or last value entry in any dict.
    kvid committed Jul 26, 2020
    Configuration menu
    Copy the full SHA
    21fcd4c View commit details
    Browse the repository at this point in the history
  5. Move group loop into build_generated() for consistency

    Now, all action functions are called with a group list as argument.
    kvid committed Jul 26, 2020
    Configuration menu
    Copy the full SHA
    add227d View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    45122b1 View commit details
    Browse the repository at this point in the history
  7. Fix change requests from owner as descibed in PR wireviz#118

    - Add double quotes around path string in `os.system()` call and
      status output to handle any spaces in the path.
    - Split the `generated_extensions` list into the two lists
      `extensions_not_containing_graphviz_output` and
      `extensions_containing_graphviz_output` for readability.
    kvid committed Jul 26, 2020
    Configuration menu
    Copy the full SHA
    39487ca View commit details
    Browse the repository at this point in the history