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

Add commit message merge functionality #193

Merged
merged 43 commits into from
Feb 3, 2021
Merged

Add commit message merge functionality #193

merged 43 commits into from
Feb 3, 2021

Commits on Jan 2, 2021

  1. Add test commit message data

    In order to test new functionality (i.e. the read.commit.messages
    function) new files containing test commit data were needed.
    Add two files containing messages corresponding to the test commit data that
    already exists.
    
    See se-sic#180
    
    Signed-off-by: Niklas Schneider <[email protected]>
    nlschn committed Jan 2, 2021
    Configuration menu
    Copy the full SHA
    9589e52 View commit details
    Browse the repository at this point in the history
  2. Add new function to read commit messages

    Add the read.commit.messages and create.empty.commits.list functions
    to util-read.R as well as a unit test to test the new functions.
    This allows to read 'commitMessages.list' files and return the commit
    data separated into message title and body.
    
    See se-sic#180
    
    Signed-off-by: Niklas Schneider <[email protected]>
    nlschn committed Jan 2, 2021
    Configuration menu
    Copy the full SHA
    85b1d05 View commit details
    Browse the repository at this point in the history

Commits on Jan 7, 2021

  1. Change commitMessages.list test files to have for the right line breaks

    Discussion has shown that codeface separates lines with five spaces, not four.
    So the two test files have been modified to account for that fact.
    
    See discussion in se-sic#180
    
    Signed-off-by: Niklas Schneider <[email protected]>
    nlschn committed Jan 7, 2021
    Configuration menu
    Copy the full SHA
    61618db View commit details
    Browse the repository at this point in the history
  2. Adapt commit message read test to new test files

    Change the line breaks in the expected output to \n's.
    
    See se-sic#180
    
    Signed-off-by: Niklas Schneider <[email protected]>
    nlschn committed Jan 7, 2021
    Configuration menu
    Copy the full SHA
    17a61ed View commit details
    Browse the repository at this point in the history
  3. Adapt read.commit.messages to handle line breaks correctly

    Replace five spaces with \n, remove any white space at the beginning and
    the end of a commit message.
    
    See se-sic#180
    
    Signed-off-by: Niklas Schneider <[email protected]>
    nlschn committed Jan 7, 2021
    Configuration menu
    Copy the full SHA
    c624c90 View commit details
    Browse the repository at this point in the history
  4. Add functions that enable merging commit messages into data

    Get the commit messsage data using the new read function and merge either nothing, the
    title or message and title into the commit.data of the proj.conf instance.
    
    See se-sic#180
    
    Signed-off-by: Niklas Schneider <[email protected]>
    nlschn committed Jan 7, 2021
    Configuration menu
    Copy the full SHA
    fdc414a View commit details
    Browse the repository at this point in the history
  5. Add new configuration option for commit messages

    Add the new attribute "commit.messages" to the project configuration class with options "none",
    "title" and "message" to make it possible to specify what exactly of the commit message data
    is to be merged to the commit data.
    
    See se-sic#180
    
    Signed-off-by: Niklas Schneider <[email protected]>
    nlschn committed Jan 7, 2021
    Configuration menu
    Copy the full SHA
    5db90d8 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    f80b24b View commit details
    Browse the repository at this point in the history
  7. Add tests for merging and fix bug when merging only titles

    Add two tests for testing the merge functionality for both full commit messages and
    titles only. Fix bug that merges message body instead of title when selecting
    option "title"
    
    See se-sic#180
    
    Signed-off-by: Niklas Schneider <[email protected]>
    nlschn committed Jan 7, 2021
    Configuration menu
    Copy the full SHA
    9414357 View commit details
    Browse the repository at this point in the history
  8. Add description of changes to unversioned section of NEWS.md

    Signed-off-by: Niklas Schneider <[email protected]>
    nlschn committed Jan 7, 2021
    Configuration menu
    Copy the full SHA
    359b12c View commit details
    Browse the repository at this point in the history
  9. Remove unnecessary empty lines from several files

    Also exchange the merge attribute when merging data frames of commit
    messages from commit.id to hash.
    
    Signed-off-by: Niklas Schneider <[email protected]>
    nlschn committed Jan 7, 2021
    Configuration menu
    Copy the full SHA
    70c8395 View commit details
    Browse the repository at this point in the history
  10. Fix a syntax error in util-read

    Signed-off-by: Niklas Schneider <[email protected]>
    nlschn committed Jan 7, 2021
    Configuration menu
    Copy the full SHA
    89a6ea6 View commit details
    Browse the repository at this point in the history

Commits on Jan 8, 2021

  1. Fix merging by hash instead of commit.id

    As commit.id was the first column of the data frame anyway,
    merging has not changed the order. But when using the hash column
    it is taken as the first colum of the resulting data frame.
    Change the order of the columns in order to not break anything
    that relies on the order.
    
    See se-sic#180
    
    Signed-off-by: Niklas Schneider <[email protected]>
    nlschn committed Jan 8, 2021
    Configuration menu
    Copy the full SHA
    6e9147e View commit details
    Browse the repository at this point in the history

Commits on Jan 13, 2021

  1. Modify README and NEWS

    Follow the review suggestions of @clhunsen.
    
    See se-sic#180
    
    Signed-off-by: Niklas Schneider <[email protected]>
    nlschn committed Jan 13, 2021
    Configuration menu
    Copy the full SHA
    c9c7ff7 View commit details
    Browse the repository at this point in the history
  2. Rename "message.body" column to "message" everywhere

    Following the review of se-sic#193
    
    Signed-off-by: Niklas Schneider <[email protected]>
    nlschn committed Jan 13, 2021
    Configuration menu
    Copy the full SHA
    0457dd5 View commit details
    Browse the repository at this point in the history
  3. Fix style issues and improve message processing

    Remove some empty lines and indent some lines.
    Also remove commit.message.data.unprocessed variable and use the
    commit.message.data variable from the beginning. Add column names
    beforehand in order to enable access without indices.
    
    See se-sic#193
    
    Signed-off-by: Niklas Schneider <[email protected]>
    nlschn committed Jan 13, 2021
    Configuration menu
    Copy the full SHA
    7e61dcb View commit details
    Browse the repository at this point in the history
  4. Put merge functionality into own function

    Create private function update.commit.message.data in util-data.R
    which handles the merge and change the location where it is
    called in set.commits.
    
    See se-sic#193
    
    Signed-off-by: Niklas Schneider <[email protected]>
    nlschn committed Jan 13, 2021
    Configuration menu
    Copy the full SHA
    8e28a1f View commit details
    Browse the repository at this point in the history
  5. Fix error when returning a variable that is not defined

    Fix an error where the value of a variable that is defined
    in an if block is returned outside that if block.
    
    See se-sic#193
    
    Signed-off-by: Niklas Schneider <[email protected]>
    nlschn committed Jan 13, 2021
    Configuration menu
    Copy the full SHA
    703ab3e View commit details
    Browse the repository at this point in the history

Commits on Jan 15, 2021

  1. Simplify data frame creation in read.commit.messages

    Replaced a loop with a conversion from a list of vectors
    in a data frame and access its columns directly
    
    See se-sic#193
    
    Signed-off-by: Niklas Schneider <[email protected]>
    nlschn committed Jan 15, 2021
    Configuration menu
    Copy the full SHA
    7caaa8d View commit details
    Browse the repository at this point in the history
  2. Reorder functions in util read and replace special functions

    Move functions concerning reading commit messages and the constants used
    by them to a new section in util.read.
    Replace subset with proper indexing and minor comment fixes.
    
    See se-sic#193
    
    Signed-off-by: Niklas Schneider <[email protected]>
    nlschn committed Jan 15, 2021
    Configuration menu
    Copy the full SHA
    8dd410c View commit details
    Browse the repository at this point in the history
  3. Fix comments in and change order in 'set.commits'

    Also adapt 'update.commit.messages' to better match the implementation
    of similar methods.
    Add 'set.commit.messages' in order to be able to set the commit messages
    to NULL.
    
    See se-sic#193.
    
    Signed-off-by: Niklas Schneider <[email protected]>
    nlschn committed Jan 15, 2021
    Configuration menu
    Copy the full SHA
    eb1cec8 View commit details
    Browse the repository at this point in the history
  4. Add helper function to format 'commit.id' column

    Introduce new function 'format.commit.ids' in along with new section in
    util-read.R. Also put format "<commit-%s>" into a constant.
    
    See se-sic#193
    
    Signed-off-by: Niklas Schneider <[email protected]>
    nlschn committed Jan 15, 2021
    Configuration menu
    Copy the full SHA
    d5c8c78 View commit details
    Browse the repository at this point in the history
  5. Change commit message merge process

    Take advice by @clhunsen to replace if else cascade for rearranging columns with
    better merge call.
    Also modify test-data tests regarding commit messages: Row names are no longer
    ignored.
    
    See se-sic#193
    
    Signed-off-by: Niklas Schneider <[email protected]>
    nlschn committed Jan 15, 2021
    Configuration menu
    Copy the full SHA
    43e1894 View commit details
    Browse the repository at this point in the history

Commits on Jan 16, 2021

  1. Change order of data sources to be alphabetical

    Change order in 'README.md', 'util-conf.R' and 'util-data.R'
    Also fix table of contents in the readme.
    
    See se-sic#193
    
    Signed-off-by: Niklas Schneider <[email protected]>
    nlschn committed Jan 16, 2021
    Configuration menu
    Copy the full SHA
    70b3cb6 View commit details
    Browse the repository at this point in the history
  2. Update 'NEWS.md' with commit hashes

    See se-sic#193
    
    Signed-off-by: Niklas Schneider <[email protected]>
    nlschn committed Jan 16, 2021
    Configuration menu
    Copy the full SHA
    31e0f85 View commit details
    Browse the repository at this point in the history

Commits on Jan 20, 2021

  1. Add package 'data.table' to coronet and refactor README

    Add the package in 'install.R' and a description in the 'README.md'.
    Also rearrange the parameter descriptions of 'ProjectConf' to be sorted
    alphabetically.
    
    See se-sic#193
    
    Signed-off-by: Niklas Schneider <[email protected]>
    nlschn committed Jan 20, 2021
    Configuration menu
    Copy the full SHA
    a0d5e32 View commit details
    Browse the repository at this point in the history
  2. Increase perfomance of commit message read

    Use the new data.table package to replace do.call with data.table::rbindlist
    which is faster in processing data.frames.
    
    See se-sic#193
    
    Signed-off-by: Niklas Schneider <[email protected]>
    nlschn committed Jan 20, 2021
    Configuration menu
    Copy the full SHA
    4c49269 View commit details
    Browse the repository at this point in the history
  3. Update my copyright notices

    Signed-off-by: Niklas Schneider <[email protected]>
    nlschn committed Jan 20, 2021
    Configuration menu
    Copy the full SHA
    19655dd View commit details
    Browse the repository at this point in the history
  4. Fix spelling errors in 'README.md' and 'util-conf.R'

    See se-sic#193
    
    Signed-off-by: Niklas Schneider <[email protected]>
    nlschn committed Jan 20, 2021
    Configuration menu
    Copy the full SHA
    a36bde4 View commit details
    Browse the repository at this point in the history

Commits on Jan 25, 2021

  1. Use new helper function in tests to format commit ids

    Remove hardcoded string formatting and replace it in tests for creating
    expected data using the new function 'format.commit.ids'.
    
    See se-sic#193
    
    Signed-off-by: Niklas Schneider <[email protected]>
    nlschn committed Jan 25, 2021
    Configuration menu
    Copy the full SHA
    aab0751 View commit details
    Browse the repository at this point in the history
  2. Replace for-loop with lapply call in function to read commit messages

    Follow @clhunsen's advice to create commit message data with an
    lapply to avoid having a for-loop and an additional lapply call
    afterwards
    
    See se-sic#193
    
    Signed-off-by: Niklas Schneider <[email protected]>
    nlschn committed Jan 25, 2021
    Configuration menu
    Copy the full SHA
    0859b9a View commit details
    Browse the repository at this point in the history
  3. Fix minor comment issues and add checks before updating commit messages

    Add check for the ProjectConf attribute 'commit.messages' before
    calling 'update.commit.messages'.
    Also fix a few errors in comments as well as one if condition where
    the wrong attribute was checked.
    
    See se-sic#193
    
    Signed-off-by: Niklas Schneider <[email protected]>
    nlschn committed Jan 25, 2021
    Configuration menu
    Copy the full SHA
    fc5d20f View commit details
    Browse the repository at this point in the history
  4. Initialize commit message data on RangeData-objects in 'util-split.R'

    Add the getter call to the 'additional.data' list.
    
    See se-sic#193
    
    Signed-off-by: Niklas Schneider <[email protected]>
    nlschn committed Jan 25, 2021
    Configuration menu
    Copy the full SHA
    686459e View commit details
    Browse the repository at this point in the history
  5. Fix minor spelling errors

    See se-sic#193
    
    Signed-off-by: Niklas Schneider <[email protected]>
    nlschn committed Jan 25, 2021
    Configuration menu
    Copy the full SHA
    613a773 View commit details
    Browse the repository at this point in the history
  6. Change all data split tests to include commit message data

    Add (empty) commit message data to all data split tests in 'tests-split.R'.
    Also sor the additional data sources alphabetically in the tests.
    
    See se-sic#193
    
    Signed-off-by: Niklas Schneider <[email protected]>
    nlschn committed Jan 25, 2021
    Configuration menu
    Copy the full SHA
    98e83b0 View commit details
    Browse the repository at this point in the history
  7. Change all sliding window data tests to include commit message data

    Add (empty) commit message data to all data split tests in
    'test-split-sliding-window.R'.
    Also sort the additional data sources alphabetically in the tests.
    
    See se-sic#193
    
    Signed-off-by: Niklas Schneider <[email protected]>
    nlschn committed Jan 25, 2021
    Configuration menu
    Copy the full SHA
    2e42fca View commit details
    Browse the repository at this point in the history

Commits on Jan 26, 2021

  1. Fix minor comment issue in 'test-split-sliding-window.R'

    See se-sic#193
    
    Signed-off-by: Niklas Schneider <[email protected]>
    nlschn committed Jan 26, 2021
    Configuration menu
    Copy the full SHA
    c052dfb View commit details
    Browse the repository at this point in the history

Commits on Jan 30, 2021

  1. Add new cleanup functions for commit messages and synchronicity

    These functions act like cleanup.pasta, they remove rows from the data
    that are not part of a range data object anymore.
    
    See se-sic#193
    
    Signed-off-by: Niklas Schneider <[email protected]>
    nlschn committed Jan 30, 2021
    Configuration menu
    Copy the full SHA
    d3bbae0 View commit details
    Browse the repository at this point in the history
  2. Fix wrong variable name in 'cleanup.synchronicity'

    Fix a copy-paste-error where a varibale name was not changed from a
    prior code snippet.
    
    See se-sic#193
    
    Signed-off-by: Niklas Schneider <[email protected]>
    nlschn committed Jan 30, 2021
    Configuration menu
    Copy the full SHA
    9385084 View commit details
    Browse the repository at this point in the history

Commits on Feb 1, 2021

  1. Add cleanup functions to NEWS.md

    See se-sic#193
    
    Signed-off-by: Niklas Schneider <[email protected]>
    nlschn committed Feb 1, 2021
    Configuration menu
    Copy the full SHA
    63b6f79 View commit details
    Browse the repository at this point in the history
  2. Remove unnecassary function calls and add logging output

    Warn user when updating commit messages or synchronicity that they should
    call the corresponding cleanup method.
    Remove calls to unlist in those cleanup functions.
    Fix copy-pasted comments.
    
    See se-sic#193
    
    Signed-off-by: Niklas Schneider <[email protected]>
    nlschn committed Feb 1, 2021
    Configuration menu
    Copy the full SHA
    c63a25a View commit details
    Browse the repository at this point in the history
  3. Fix regex when filtering out spaces and change data frame assignment

    Fix the regex that removes spaces at the end of a commit message.
    Change the assignment of the 'commit.message.data' data frame such that
    no new data frame is instantiated anymore.
    
    See se-sic#193
    
    Signed-off-by: Niklas Schneider <[email protected]>
    nlschn committed Feb 1, 2021
    Configuration menu
    Copy the full SHA
    e1e1ba8 View commit details
    Browse the repository at this point in the history

Commits on Feb 3, 2021

  1. Fix problems in CI pipeline for R-3.3

    Our CI pipeline does currently not work for "R-3.3" (but for all the other
    R versions in the pipeline). The reason for that is the following:
    As of 2021-01-26, there is a new version of package `memoise` (2.0.0),
    which is imported by `RSQLite`, which in turn is imported by `sqldf`.
    The new version of `memoise` imports package `cachem`, which in turn
    imports package `fastmap`. Using all these packages is not a problem per
    se, they are compatible with R 3.3.3. However, the docker container
    `r-base:3.3.3`, which we use in our pipeline "R-3.3", uses g++ version
    6.3.0-9, which contains a bug. Due to the bug in the compiler, `fastmap`
    cannot be compiled and installed in tje `r-base:3.3.3` docker container,
    letting the CI pipeline fail.
    
    To circumvent this problem but still keep "R-3.3" in our CI pipeline, we
    now use docker image `r-base:3.3.2` instead, as there is another g++
    version installed in this docker image. With that, the CI pipeline should
    succeed for "R-3.3" again.
    
    Signed-off-by: Thomas Bock <[email protected]>
    bockthom authored and nlschn committed Feb 3, 2021
    Configuration menu
    Copy the full SHA
    18843a8 View commit details
    Browse the repository at this point in the history