Skip to content
This repository has been archived by the owner on May 19, 2021. It is now read-only.

Summarize change of packages since previous versions #31

Open
czeildi opened this issue Apr 19, 2018 · 3 comments
Open

Summarize change of packages since previous versions #31

czeildi opened this issue Apr 19, 2018 · 3 comments

Comments

@czeildi
Copy link

czeildi commented Apr 19, 2018

In a bigger project or if you take up a project after some period you may want to update your packages and after such an update you may need to make several changes to your code. This can happen without any package management system or with packrat / checkpoint / docker etc. Even if you use packrat / checkpoint / docker in order to ensure reproducibility you would like to update dependencies from time to time: either you need somehing specific from a newer version or you just know that sooner or later you have to update and the longer you wait the more difficult it will be. However, you should be able to assess beforehand the amount of work needed after an update.

I propose a package which could generate a digestible summary of all the changes in the dependencies of your project between current state and newest versions. It would ideally work with or without an existing depedency manager.

  • identify current versions of dependencies and their newest versions
  • collect news from cran (+github) (+ any other repository)
  • create an html / web page from these, ideally organized by breaking changes / new features / fixes

Improvement possibilities:

  • work for subset of packages
  • work for cran newest and dev versions as well
  • idetify usages in your code
  • propose how to change your code: copy pastable code / functions to reformat if possible (ie only rename)
  • parse changes from code instead of news.md: would be more accurate

related:

  • generate news.md skeleton based on code changes since last package version

I believe we could build on several existing packages: possibly containerit to identify dependencies, gh to pull news from github

related:
https://twitter.com/noamross/status/989904927093936128

@czeildi
Copy link
Author

czeildi commented May 19, 2018

Summary: generate a digestible summary of all the changes in the r package dependencies of your project between current state and newest versions. Parse news or code, possibly advise on how/ where to update project code.

@karthik
Copy link
Member

karthik commented May 21, 2018

generate news.md skeleton based on code changes since last package version

This feature is available in the fledge package: https://github.com/krlmlr/fledge (in early development)

@zachary-foster
Copy link

identify usages in your code

Maybe this could be done with something like:

  1. Get list of all functions used by a project (project could be an R package or code snippet).
  2. Derive list of all functions that are called by those functions recursively, creating a function dependency tree. This could be done by examining source code for those functions or by running the users code (tests/examples in the case of packages) and keeping track of every function visited, as is done in continuous integration software, like covr.
  3. Check if any of those functions have been changed in a potential update by comparing the source code, perhaps ignoring formatting differences and documentation changes.
  4. Report which functions used in the project might have changed.

I think this strategy would work without installing the updates, which would be convenient.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants