Code Monkey home page Code Monkey logo

Comments (8)

annakrystalli avatar annakrystalli commented on August 26, 2024

So initially they were one function, put when I tried to run them, the call had started cloning the package from github before the project could be launched (and the working directory changed) so did not end up in the right location relative to the review directory. So I split it up to ensure pkgreview_init was launched from the review project root. I'd be much nicer to be one function though, agreed.

Any ideas on how this could be handled? When the review proj is created it even launches a new session so quite a bit to handle.

from pkgreviewr.

maelle avatar maelle commented on August 26, 2024

ah ok it makes sense! I'm not sure 🤔 I have never started a project from the command line actually, I always click on "New Project" in RStudio.

from pkgreviewr.

maelle avatar maelle commented on August 26, 2024

I'm looking into an RStudio project template could help.

What seems "easy":

  • Having that template create the structure and set the working directory to it.

  • Creating the template by clicking

What I do not know yet

  • How to create a project from the command line (the usethis::create_project function doesn't have a template argument)

  • How the template could be updated (cf #7 )

  • How the template could use info about the name of the review (apart from the folder created by hand with the right name)

So we might still end up having two functions...

  • init blank review project which creates a review where the user says.

  • setup review which would need the username/package and would then clone the package, and fill out the parts of the template such as package name.

Not sure it's easier?

from pkgreviewr.

annakrystalli avatar annakrystalli commented on August 26, 2024

You know I think this might be a useful model: from the workflowr package https://jdblischak.github.io/workflowr/reference/wflow_start.html

Code here:

from pkgreviewr.

maelle avatar maelle commented on August 26, 2024

Nice!

I also want to look at https://github.com/ijlyttle/ghentr and https://github.com/lockedata/pRojects for inspiration

from pkgreviewr.

maelle avatar maelle commented on August 26, 2024

Here are my notes about workflowr::wflow_start "Start a new workflowr project.".

  • It has the name of the project as an argument, although otherwise it'd use the name of the directory.

  • It does a lot of checks of RStudio (cf #11 ) and of git.

  • It checks overwriting as well. (doesn't sound urgent to implement, but nice)

  • The way it initiates the project is by copying files from a model folder that includes an Rproj file. This Rproj file is simply renamed by this function.

  • It makes the first git commit. Honestly here I don't think it's needed, it's fine to "just" intialize git.

  • I'm not 100% sure because I haven't tested the function but I don't think it opens the project in the end? Which in my opinion should happen.

All of this happens by writing the name and arguments of the function. If I were a reviewer I know I'd love to just click to start the project, but both solutions are important?

from pkgreviewr.

maelle avatar maelle commented on August 26, 2024

Could the pkg_repo argument of the initialisation step disappear? One expects this function to be called in an RProj already created using the argument so it could be deduced from something?

from pkgreviewr.

maelle avatar maelle commented on August 26, 2024

maybe a flowchart would help by the way? am obsessed with http://rich-iannone.github.io/DiagrammeR/

from pkgreviewr.

Related Issues (20)

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.