Code Monkey home page Code Monkey logo

changes's Introduction

changes

Project Status: Abandoned

This repository has been archived. The former README is now in README-NOT.md.

changes's People

Contributors

anikobtoth avatar dbarneche avatar dfalster avatar dvukcevic avatar goldingn avatar maelle avatar smbache avatar smwindecker avatar timchurches avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

changes's Issues

Fill out help files

Most of the exported functions are pretty simple, so we don't need a lot of words. But plain-language and consistent descriptions would be great.

We also need examples!

render a file diff

currently, running changes() on a file just repeats the same minimal information about line changes as when running it for the whole repo. Ideally, it would give the user a diff for that file.

git2r does return diffs for each file, but they're in some obscure format and it doesn't have a way of rendering them. It looks like that's something we'll have to do.

Decide package name

  • Figure out package name
  • Change the name of this remote repo
  • change it in DESCRIPTION

sync() for github

suggestion from the QAECO presentation of changes:

enable syncing with existing github repo.

Motivation in readme file

  • Describe motivation for the package
  • Describe common pitfalls for beginners that this package tries to overcome

Creating a repo (new and existing)

Need two functions -- one which clones a repo from existing online source and another which creates a new repo.

Suggested structures are as follows:

download_repo(remote="git@...")

Downloads an existing git repo from specified (existing remote) -- e.g. github.com:ropenscilabs/ozrepro.git

Alternative names for download are clone and fetch.

And

create_repo(path = getwd(), create_structure =TRUE)

initliases an entirely new repo at the specified path, with default the current working directory.
The create_structure argument determines whether we add some default structure to the project, including

  • file .gitignore (and basic ignores
  • X.Rproj (Rstudio project file)
  • folders R, data, output and ignore (and in each a basic readme)

Alternative names for create are initialise and start.

revise previous record message

suggestion from the QAECO presentation of changes:

enable you to either change completely or add to an old record message.

add message option to retrieve()

Nick and I presented the current version to our group, and got lots of feedback.

People suggested that it would be useful to be able to add a message to retrieve, to record why you went back in time.

functions for looking at different versions

rollback() ?
rollforward()
go_to()

retrieve()

the roll functions will just let you look at different points, the retrieve function will go back to a particular point and make it the new head (equivalent of checkout, branch, commit).

Retreive function

We want function to reinstate the status of project at previous commit - taking that and placing it on top of current state. This is one way of achieving it, via a branch and merge.

First go back in time

git checkout 7c71ab1

Then make some changes. When you try to commit we discovered we're in detahced head
Then

git branch -b reinstate
git add --all
git commit -m "Message" 
git merge master -s ours -m "XXXX"
git checkout master
git merge --ff-only reinstate
git branch -d reinstate

Logging it to GitHub for new users

For the sync() function to be usable, users need to have a github account and be able to log into it from Rstudio. We may want a git_setup() function that allows them to input their username and password.

Why require the user to cut and paste or type a SHA?

https://github.com/ropenscilabs/ozrepro/blob/0d1b9b3913e9425071a337573149032d6e1addad/R/go_to.R#L11

To check out a commit that was n commits ago you can just use git checkout branch-name@{n}

That way the user only needs to specify how far they wish to go back, and doesn’t have to fuss with SHAs at all. Or am I overlooking something that makes the need to specify a SHA essential?

I think the same may apply to the revert() function? Much better if the user can just specify an integer index of how far back the wish to go.

make sure git is available

We need to make sure git is available for the package to use.

I think git2r includes the libgit2 source, so should be standalone (though we'd need to check this).
However the current code makes a number of system calls to git, which will only work if git is installed and visible at the command line.

We could either automate installation of command line git or (preferably) implement the functionality we need in git2r and remove the system calls.

error: working directory on windows

Created a new Project called Rtest (just for testing). And initialized with changes

create_repo("C:/Users/jonathan/Documents/Code/Rtest")

started version control project at C:/Users/jonathan/Documents/Code/Rtest
Error: The current working directory (C:/Users/jonathan/Documents/Code/Rtest) is not in the directory of this version control project.
You could do setwd("C:/Users/jonathan/Documents/Code/Rtest") to move back into the directory and rerun this function.

Then I did:

setwd("C:/Users/jonathan/Documents/Code/Rtest")

All seems ok and then created a new file and added to source control with:

record("added Rpres")

Error: The current working directory (C:/Users/jonathan/Documents/Code/Rtest) is not in the directory of this version control project.
You could do setwd("C:/Users/jonathan/Documents/Code/Rtest") to move back into the directory and rerun this function.

Then I do:

setwd("C:/Users/jonathan/Documents/Code/Rtest")

but keep gettinq the same error again, and again, and again.......

Adding the "cache"

  • checkRepo function
  • get_repo() decision and possibly implementation.
  • .cache environment
  • ready function: does it exist?
  • ...

Transfer to personal account?

@goldingn 👋 according to our recently created package curation policy this repo should now be transferred to either one of your personal accounts, or the ropensci-archive organization.

If you don't answer within one month, I'll transfer the repository to ropensci-archive, after which you could still email me to transfer the repo to a personal account.

Thank you!

remind_me error

If you navigate out of your repo, and remind_me is triggered, it throws an error.

improve DESCRIPTION

  • Improve description of what package does
  • Decide who's author, who's creator (currently includes Diego Barneche, Daniel Falster, Nick Golding)
  • Compile people's names and their emails

git tag type feature

Suggestion from QAECO meeting.

Enable you to tag a record as especially important, and also searchable in the timeline.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.