pak icon indicating copy to clipboard operation
pak copied to clipboard

Magic `pak()` function

Open gaborcsardi opened this issue 3 years ago • 4 comments

  • Only works interactively.
  • Automatically detects if you are developing a package / project / etc.
  • Shows the status of your library / package / project.
  • Offers some actions to do, depending on the status.
  • Has one argument, which is a ref or list of refs, to install or update and/or add to the package.

If the current directory is not in a package

Status:

  • pak version, whether there is an update (?).
  • Summary of libraries (?).
  • Cache summary (?).
  • Summary of main (first) library.
  • Packages that can be updated in the main library.

Actions:

  • Update all packages.
  • List all packages.

If the current directory is in a package

  • pak version, whether there is an update (?).
  • Dependency tree of the package, first level only, annotated.
  • Whether the local package is up to date in the main library.
  • Dependencies that are missing from the main library.
  • Dependencies that are outdated in the main library.
  • Summary of "extra" packages, that are not needed for the local package.
  • Potential version conflicts of dependencies.

Actions:

  • Install/update package.
  • Install/update dependencies.
  • Install/update dev-dependencies.

gaborcsardi avatar Jul 20 '20 15:07 gaborcsardi

I first though this magic pak function is a cli function that can be used like pip or npm. Is that on the roadmap?

psolymos avatar Dec 14 '20 22:12 psolymos

I first though this magic pak function is a cli function that can be used like pip or npm. Is that on the roadmap?

@psolymos would love this feature as well.

jimbrig avatar Jan 19 '21 02:01 jimbrig

@jimbrig Yeah, I agree. The difficulty is that R packages do not have a standard way to "install" executables, so we would need to work that out first.

gaborcsardi avatar Jan 25 '21 08:01 gaborcsardi

The only thing that comes to mind for me would be to utilize the littler scripts as a form of executables (similar to how most people install R packages within Docker image builds) or an alternative via the docopt package. But good point @gaborcsardi

jimbrig avatar Jan 26 '21 04:01 jimbrig