GithubHelp home page GithubHelp logo

natmanager's Introduction

natverse

natverse GitHub Docs Travis build status Coveralls test coverage

The natverse package is a wrapper for all of the commonly used NeuroAnatomy Toolbox packages. This is convenient both for package installation and for loading/attaching these packages without many calls to library().

See http://natverse.org for more details.

Installation

The recommended approach to install the full natverse is to use a helper package natmanager, which is available on CRAN. You can therefore do:

install.packages("natmanager")
natmanager::install("natverse")

See http://natverse.org/install for more details.

Use

Once installed, you can load the natverse package:

library(natverse)
#> Loading required package: elmr
#> Loading required package: catmaid
#> Loading required package: httr
#> Warning: package 'httr' was built under R version 3.6.2
#> Loading required package: nat
#> Loading required package: rgl
#> Warning: package 'rgl' was built under R version 3.6.2
#> Registered S3 method overwritten by 'nat':
#>   method             from
#>   as.mesh3d.ashape3d rgl
#> 
#> Attaching package: 'nat'
#> The following object is masked from 'package:rgl':
#> 
#>     wire3d
#> The following objects are masked from 'package:base':
#> 
#>     intersect, setdiff, union
#> Loading required package: nat.flybrains
#> Loading required package: nat.templatebrains
#> Loading required package: nat.nblast
# example 3D plot of some neurons
plot(kcs20, col=type)

Installation Details

Conflicts and Dependencies

The natverse package contains many packages and it is possible that there could be conflicts where functions in the natverse have the same name as another package.

natverse_conflicts()
#> ── Conflicts ─────────────────────────────────────────────────────────────── natverse_conflicts() ──
#> x nat::intersect() masks base::intersect()
#> x nat::setdiff()   masks base::setdiff()
#> x nat::union()     masks base::union()
#> x nat::wire3d()    masks rgl::wire3d()

You can always choose the correct version by prepending the specific package name e.g. nat::flip() will select the nat version rather than any other.

Updates

Once installed, you check the status of all natverse packages and their dependencies like so:

natverse_update()
#> 
#> The following packages are either locally installed or information about them is missing!
#> 
#>   blob, formattable, import, mockr, nycflights13, pingr, fafbsegdata, reticulate, nat
#> 
#> Please install them manually from their appropriate source locations
#> 
#> The following natverse dependencies are out-of-date, see details below:
#> 
#> We recommend updating them by running:
#> natverse_update(update=TRUE)
#> 
#> package         remote         local          source   repo                        status 
#> --------------  -------------  -------------  -------  --------------------------  -------
#> bit64           0.9-7.1        0.9-7          CRAN     https://cran.rstudio.com/   x      
#> data.table      1.13.0         1.12.8         CRAN     https://cran.rstudio.com/   x      
#> elmr            deb0e27df...   7a2be4537...   GitHub   natverse                    x      
#> ff              2.2-14.2       2.2-14         CRAN     https://cran.rstudio.com/   x      
#> flycircuit      1b7b48e29...   cc4594f47...   GitHub   natverse                    x      
#> git2r           0.27.1         0.26.1         CRAN     https://cran.rstudio.com/   x      
#> insectbrainr    6331b4df6...   8fef94a05...   GitHub   natverse                    x      
#> mouselightr     9c2ce1c31...   8e26b7702...   GitHub   natverse                    x      
#> nat.flybrains   28ff33213...   36c622a15...   GitHub   natverse                    x      
#> nat.jrcbrains   85ed4a791...   44c95667e...   GitHub   natverse                    x      
#> neuprintr       7403d3ce2...   8ab03b744...   GitHub   natverse                    x      
#> RCurl           1.98-1.2       1.98-1.1       CRAN     https://cran.rstudio.com/   x      
#> tibble          b4eec19dd...   3f4e5dfae...   GitHub   tidyverse                   x      
#> tidyr           1.1.0          1.0.3          CRAN     https://cran.rstudio.com/   x      
#> xfun            0.16           0.15           CRAN     https://cran.rstudio.com/   x      
#> XML             NA             3.99-0.3       CRAN     https://cran.rstudio.com/   x

You can then update like so:

natverse_update(update = TRUE)

However, if you are in a hurry and want to save time from the questions use like below:

natverse_update(update=TRUE, upgrade = 'always')

If want to upgrade the natverse package itself:

remotes::update_packages('natverse')

natmanager's People

Contributors

jefferis avatar sridharjagannathan avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

natmanager's Issues

Test cases related to install fail in travis with older r versions (<4.0)

To reproduce this issue, uncomments the following line, and bump to travis

#- oldrel

This will result in an error in travis, see below for an example:
https://travis-ci.org/github/natverse/natmanager/jobs/749700874
If you look further, you can see that this is because

ERROR: dependency ‘rgl’ is not available for package ‘nat’

on further investigation, I found that rgl requires a minimum r version of 4.0.0.
It would be good to think about migrating to 4.0.0 in the upcoming releases.

handle missing Xquartz

On systems using mac OS: rgl package is primarily used in nat for visualisation purposes. This needs Xquartz installed as well (display server).
Whenver a user tries to install under such a config, provide a warning to the user if the Xquartz is missing.

github_token() deprecated in usethis 2.0.0

Hi,

I recently uploaded R and all the packages and realized that natmanager::install gives me an error due to the change in how usethis manages GitHub token.

natmanager::install("natverse") gives me the following error (R 4.0.3; usethis 2.0.0; natmanager 0.4.6)

Error: `github_token()` was deprecated in usethis 2.0.0 and is now defunct.
Call `gh::gh_token()` to retrieve a GitHub personal access token
Call `gh_token_help()` if you need help getting or configuring your token

Thank you!
Tatsuo

github_token() defunct

Hi Sridhar and Greg,

natmanager::install('natverse') returns an error

Error: github_token() was deprecated in usethis 2.0.0 and is now defunct.
Call gh::gh_token() to retrieve a GitHub personal access token
Call gh_token_help() if you need help getting or configuring your token

CRAN build fails for natmanager v0.4.8

The CRAN build is failing for natmanager v0.4.8 (see below):
https://www.stats.ox.ac.uk/pub/bdr/donttest/natmanager.out

The primary cause is that tests marked with \donttest in examples seem to run on CRAN triggering an error due to GitHub API error (rate limiting issue) as there is no GITHUB_PAT set in the CRAN environment.

A similar issue has been noted here:

  1. r-lib/devtools#2216
  2. dankelley/oce#1798

Primarily the solution seems to involve changing the \donttest in examples that use the GitHub API to \dontrun
See here: r-lib/devtools#2216 (comment)

Issue installing fafbseg using natmanager

if (!requireNamespace("natmanager")) install.packages("natmanager")

natmanager::install(pkgs="fafbseg")
Error: github_token() was deprecated in usethis 2.0.0 and is now defunct.
Call gh::gh_token() to retrieve a GitHub personal access token
Call gh_token_help() if you need help getting or configuring your token

I haven't changed anything and my GitHub PAT is located in my environ file

make it possible to install non-natverse packages from github

There are unfortunately various gotchas with installing packages from github including

  • on windows, updating loaded packages or packages required by remotes (e.g. Xincheng install issues)
  • updates on any platform where warnings are generated and turned into errors e.g. because packages were built by an older version of R. (lisa)
  • PAT rate limiting issues

It would be good to ensure that any package could be installed using its github remote specification e.g.

natmanager::install(pkgs='flyconnectome/hemibrainr')

@SridharJagannathan might you be able to pick this up? i.e. to add "natverse" when no github user is supplied, but otherwise to use the supplied one.

selfupdate doesn't recognise new version

The scenario is as follows:

  1. In your local version of natmanager change the version number in the DESCRIPTION file to say something like Version: 0.2.9
  2. Now run the selfupdate function after using load all in r-studio
  3. This will force a new install of the natmanager which is currently at Version: 0.3.0
  4. Now here: https://github.com/natverse/natmanager/blob/master/R/update.R#L33 it should return the new version as 0.3.0 and should force a restart of the r
  5. However it doesn't do that because the newVersion=utils::packageVersion('natmanager') still retains the old version (as the version numbers are taken from the attached environment which hasn't changed).
    The logic should be changed in such a way that the newversion is taken after install directly from GitHub or CRAN and not dependent on the attached environment.

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.