Skip to content

Renaming #16

Closed
Closed

Description

@lorenzwalthert

Naming of data

At the moment, for the parse table returned by utils::getParseData and
processed through various functions, we use many different names in different
functions for essentially this (flat) table:

  • pd (all rules in rules.R)
  • parse_data (serialize_parse_data)
  • parse_data_with_ws (serialize_parse_data_flat)
  • data (create_filler)

I think it would simplify things to just use one variable name throughout. I
suggest parse_data. We could use parse_data_flt for the flat version and and
parse_data_nstd for the nested version for situations where the processing
differs.

Naming of functions

As far as I understand, the terminology around ws is more of a legacy thing, i.e. in the functions compute_parse_data_flat_with_ws or add_ws_to_parse_data since it is not really just white space information that is affected by these functions, but rather a bunch of preprocessing Hence, I would suggest to rename the latter to pre_process_parse_data and the former to compute_parse_data_flt for now.

Activity

  1. krlmlr commented on Jun 1, 2017

    @krlmlr
    Member

    A consistent name is a good idea. Can we simply use nested and flat, or perhaps standardize on pd for parse data and use this as a prefix or suffix?

  2. lorenzwalthert commented on Jun 1, 2017

    @lorenzwalthert
    CollaboratorAuthor

    Ok yes, let us just use pd then and use flat and nested as suffix.

  3. added a commit that references this issue on Jun 8, 2017
    d4e9813
  4. lorenzwalthert commented on Aug 23, 2017

    @lorenzwalthert
    CollaboratorAuthor

    So as stated in https://github.com/krlmlr/styler/pull/146#discussion_r134675202, should we use nest for "a parse table at one level of nesting, which always represents a complete expression", and pd_nested for the whole nested structure, i.e. the parse table at the top level of nesting?

  5. lorenzwalthert commented on Aug 23, 2017

    @lorenzwalthert
    CollaboratorAuthor

    This includes documentation also obviously.

  6. krlmlr commented on Aug 23, 2017

    @krlmlr
    Member

    Yes, we can keep the terms "parse data" and "nested parse data" for simplicity. The latter consists of multiple interlinked nests, this is the only new term.

  7. lorenzwalthert commented on Sep 8, 2017

    @lorenzwalthert
    CollaboratorAuthor

    Reference: #132.

  8. lorenzwalthert commented on Sep 30, 2017

    @lorenzwalthert
    CollaboratorAuthor

    Renaming of files

    • modify_pd.R -> indent.R
    • nested.R -> nest.R
    • ws.R -> ui.R
    • style_md.R -> transform-code.R.
    • transform.R -> transform-files.R
  9. krlmlr commented on Oct 23, 2017

    @krlmlr
    Member

    Do we need to change anything here, short of renaming the files as you suggested?

  10. lorenzwalthert commented on Oct 29, 2017

    @lorenzwalthert
    CollaboratorAuthor

    Seems no, if we want to leave the rest (pd, pd_flat, pd_nested etc.) as is. However, I think we should change it too for consistency. Not all of it though, e.g. flattened_pd is not a nest anymore.

  11. added this to the milestone on Nov 2, 2017
  12. added a commit that references this issue on Nov 2, 2017
  13. lorenzwalthert commented on Nov 26, 2017

    @lorenzwalthert
    CollaboratorAuthor
    • serialized_tests.R to serialized-tests.R
    • style_guides.R to style-guides.R
    • move stop_insufficient_r_version() to communicate.
    • dplyr.R to compat-dplyr.R
    • consistency: is_fun_dec() or pd_is_fun_dec() in expr-is.R
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions