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

Refactor ExampleCollector #67

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

Commits on Feb 4, 2016

  1. ExampleCollector: renames to make expicit the nature of the paths inv…

    …olved
    Ángel Sanz committed Feb 4, 2016
    Configuration menu
    Copy the full SHA
    1f92987 View commit details
    Browse the repository at this point in the history
  2. ExampleCollector: extract _is_name_of_spec_file method

    Ángel Sanz committed Feb 4, 2016
    Configuration menu
    Copy the full SHA
    f5299cd View commit details
    Browse the repository at this point in the history

Commits on Feb 5, 2016

  1. ExampleCollector: refactor _collect_spec_files_in_directory

    Rename some variables to make explicit that they are file names,
    not files, and paths, not directories.
    
    Extract a method for creating path to spec files.
    
    Ignore the second item in the tuples returned by os.walk.
    
    Adjust indendation
    Ángel Sanz committed Feb 5, 2016
    Configuration menu
    Copy the full SHA
    e3e38e7 View commit details
    Browse the repository at this point in the history
  2. ExampleCollector: extract _dump_file_extension method

    Ángel Sanz committed Feb 5, 2016
    Configuration menu
    Copy the full SHA
    dff7c98 View commit details
    Browse the repository at this point in the history
  3. ExampleCollector: extract a constant

    Ángel Sanz committed Feb 5, 2016
    Configuration menu
    Copy the full SHA
    0532bf6 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3683344 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    40f8d3b View commit details
    Browse the repository at this point in the history
  6. ExampleCollector: narrow the scope of a try-except clause

    Only the call to __import__ can throw. So we can use a for-else
    to make explicit what should be done in case it doesn't throw.
    Ángel Sanz committed Feb 5, 2016
    Configuration menu
    Copy the full SHA
    dbd040f View commit details
    Browse the repository at this point in the history
  7. ExampleCollector: use a context manager for allowing

    the importing of local non-installed modules
    Ángel Sanz committed Feb 5, 2016
    Configuration menu
    Copy the full SHA
    a3542a2 View commit details
    Browse the repository at this point in the history
  8. ExampleCollector: extract two methods providing higher-level descript…

    …ions
    Ángel Sanz committed Feb 5, 2016
    Configuration menu
    Copy the full SHA
    79a0d7a View commit details
    Browse the repository at this point in the history
  9. ExampleCollector: narrow the scope of a with statement

    Ángel Sanz committed Feb 5, 2016
    Configuration menu
    Copy the full SHA
    d55b140 View commit details
    Browse the repository at this point in the history
  10. ExampleCollector: inline a variable

    Ángel Sanz committed Feb 5, 2016
    Configuration menu
    Copy the full SHA
    d993032 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    8eda791 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    eb469f1 View commit details
    Browse the repository at this point in the history
  13. ExampleCollector: simplify _load_module_from - no need to use a con…

    …text manager
    
    There is no real setup/teardown work needing to be done
    in that method, it just prepares the module name and delegates
    to another method. So using a context manager adds little
    benefit. This also simplifies the implementation of
    ExampleCollector#modules a bit more.
    Ángel Sanz committed Feb 5, 2016
    Configuration menu
    Copy the full SHA
    8ce6e66 View commit details
    Browse the repository at this point in the history
  14. ExampleCollector: enhance names

    - Give more information about the code object.
    - Decouple _create_module_object from its particular usage
    in the class.
    Ángel Sanz committed Feb 5, 2016
    Configuration menu
    Copy the full SHA
    64cebe1 View commit details
    Browse the repository at this point in the history
  15. ExampleCollector: _parse_and_transform_ast -> _transform_ast_of_sourc…

    …e_code_at
    Ángel Sanz committed Feb 5, 2016
    Configuration menu
    Copy the full SHA
    c2fd033 View commit details
    Browse the repository at this point in the history
  16. ExampleCollector: split _transform_ast_of_source_code_at in smaller m…

    …ethods
    Ángel Sanz committed Feb 5, 2016
    Configuration menu
    Copy the full SHA
    0c1069e View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    01ac426 View commit details
    Browse the repository at this point in the history

Commits on Apr 10, 2016

  1. spec: minor clean up

    - Remove unnecessary conversion to list
    - Remove old unused variable binding in with statement
    Ángel Sanz committed Apr 10, 2016
    Configuration menu
    Copy the full SHA
    7226184 View commit details
    Browse the repository at this point in the history