-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ANTsR: towards CRAN & standardization of development #8
Comments
I thought the major issue with CRAN was the size of the package. Did you On 26 January 2015 at 10:32, stnava notifications@github.com wrote:
|
Brian, this is an excellent idea, and really essential for the whole community. I know R and Cpp both very well, but I have been involved only in ANTs development, and not ANTsR and would appreciate if you could give me pointers where you need help. |
Perhaps by assigning something (more specifically) |
cran policies are here 100MB is the limit which ANTsR just sneaks under (last i checked) after R the package must pass on 2 platforms ( e.g. linux , osx ) for CRAN compile time might be an issue but this can likely be resolved by making i still see install_github or R CMD INSTALL being the way we employ ANTsR ref issue thin ants brian On Mon, Jan 26, 2015 at 10:43 AM, bkandel notifications@github.com wrote:
|
oops - just checked latest R CMD Build & it's quite large ... easy to brian On Mon, Jan 26, 2015 at 11:12 AM, brian avants stnava@gmail.com wrote:
|
100 MB sounds ambitious to me if we're going to include ITK build--in my On 26 January 2015 at 11:16, stnava notifications@github.com wrote:
|
ANTsR.so is the main indicator and it's currently around 77MB brian On Mon, Jan 26, 2015 at 11:24 AM, bkandel notifications@github.com wrote:
|
http://cran.r-project.org/doc/manuals/r-release/R-exts.html#Configure-and-cleanup brian On Mon, Jan 26, 2015 at 11:28 AM, brian avants stnava@gmail.com wrote:
|
Would be happy to see this on CRAN. Would there be any sense in producing an ITK only package. Could be useful for others and could help re space. Of course you could rely on system ITK but that would somewhat defeat the ease of use advantage of a CRAN package (on OS X one can have binary installs, which is convenient for many). Best, Gregory Jefferis On 26 Jan 2015, at 08:24, bkandel notifications@github.com wrote:
|
yes - we have talked about that ... i do believe the right way to do this the primary obstacle is not so much technical but more so the burden of i cannot volunteer to make such a package but would be happy to assist / brian On Mon, Jan 26, 2015 at 11:41 AM, Gregory Jefferis <notifications@github.com
|
am working on R cmd check ... here is the procedure that i am using (likely to be refined in the future)
after this passes (does not yet) will try vanilla and as-cran flags this procedure lets you build the c++ once and then check the documentation / R examples - several issues arise at this stage which need to be dealt with manually. here you iterate this procedure:
until R CMD check issues are eliminated .... one way to speed up checking examples is to directly run .R file called ANTsR-Ex.R that is generated by R cmd check .... |
@ntustison , @bkandel , @dorianps, @jeffduda , @cookpa substantial progress towards passing R cmd check ... it's not there yet but i eliminated several "mysterious" warnings, notes and the like and fixed many documentation issues. also removed what i thought was dead code. in the future, it would be very helpful if we could adhere to documenting everything that goes into the main branch of antsr. if you want to do some test development, please do so on a repository branch. by doing this, we can avoid getting into the current situation described below. the current R cmd check produces 2 warnings. one is for undocumented functions (mostly helper functions and dead code) and one for inconsistent documentation (should be resolvable with roxygen2's help but must be done manually). the list of issues is below - i will whittle away at these and would appreciate if you would help with any of these as you get time: undocumented functions - will remove these when possible‘ExtractDenseNetwork’ ‘LabelClustersUniquely’ ‘LabelGeometryMeasures’ undocumented arguments - will also remove these when possible or fix by hand00check.log:Undocumented arguments in documentation object 'Atropos' |
for vignettes: will follow http://stackoverflow.com/questions/24861970/using-rmarkdown-as-a-vignette-engine |
I'll try to cover most or all of the ASL-related functions. One note on style: It looks like a lot of the undocumented functions were I know that naming is a big mess now, but maybe we can decide on a system Ben On 2 February 2015 at 18:20, stnava notifications@github.com wrote:
|
I would recommend allowing roxygen2 to generate your NAMESPACE file (a build option in rstudio if you are using that). The normal approach would be to have a file #' Access to ANTs routines in R
#'
#' R package \bold{ANTsR} provides functions to do ...
#'
#' @name ANTsR-package
#' @aliases ANTsR
#' @useDynLib ANTsR
#' @import Rcpp methods
#' @references some ref
#' @seealso \code{\link{useful_func1}}, \code{\link{useful_func2}}
NULL Then you would tag all functions that you want exported with
in NAMESPACE is generally not recommended (see http://cran.r-project.org/doc/manuals/r-release/R-exts.html#Specifying-imports-and-exports), but you can prefix all private functions with a period as an alternative to using the approach mentioned above.
That seems reasonable to me, although you may want to keep an eye out for functions from popular extension packages (e.g. the hadleyverse) |
I assume this is related: I'm now getting errors building ANTsR because I'm On 2 February 2015 at 17:51, stnava notifications@github.com wrote:
|
Yes. For cran check, we must list all dependencies ... we know how to
|
Another useful resource: http://r-pkgs.had.co.nz/description.html Regarding suggests, imports, etc ... we could do a better job of these ...
|
Explanation of current dev/check system:
then call
on a clean version of ANTsR - e.g. a fresh clone or git pull w/o any extra files related to installation ... this creates ANTsR_1.0.tar.gz then point R CMD check to a library version of ANTsR
will check that code and not run examples
will check the code and run examples
will install, check the code and run examples this last call is the one that we must ultimately pass. |
Currently, there are a few undocumented code bits that @jeffduda will contribute. There are many more inconsistent documentation and usage functions. This is where the most help is currently needed in order to get over the first major barrier to submitting to CRAN. They are here ( note: i reduced this list by a third with about 2 hours' work it's still over 300 lines)
Undocumented arguments in documentation object 'antsApplyTransforms' Undocumented arguments in documentation object 'antsGetNeighborhood' Undocumented arguments in documentation object 'antsImage-class' Undocumented arguments in documentation object 'antsMatrix-class' Undocumented arguments in documentation object 'antsMotionCorr' Undocumented arguments in documentation object 'antsPreprocessfMRI' Undocumented arguments in documentation object 'antsRegistration' Undocumented arguments in documentation object 'as.antsImage' Undocumented arguments in documentation object 'as.antsMatrix' Undocumented arguments in documentation object 'aslDenoiseR' Undocumented arguments in documentation object 'aslPerfusion' Undocumented arguments in documentation object 'eigSeg' Undocumented arguments in documentation object 'fastwhiten' Undocumented arguments in documentation object 'filterfMRIforNetworkAnalysis' Undocumented arguments in documentation object 'frequencyFilterfMRI' Undocumented arguments in documentation object 'getAverageOfTimeSeries' Undocumented arguments in documentation object 'getCentroids' Undocumented arguments in documentation object 'getMultivariateTemplateCoordinates' Undocumented arguments in documentation object 'getROIValues' Undocumented arguments in documentation object 'getTemplateCoordinates' Undocumented arguments in documentation object 'getfMRInuisanceVariables' Undocumented arguments in documentation object 'icawhiten' Undocumented arguments in documentation object 'image2ClusterImages' Undocumented arguments in documentation object 'imageFileNames2ImageList' Undocumented arguments in documentation object 'initializeEigenanatomy' Undocumented arguments in documentation object 'interleaveMatrixWithItself' Undocumented arguments in documentation object 'invariantImageSimilarity' Undocumented arguments in documentation object 'kmeansSegmentation' Undocumented arguments in documentation object 'labelClusters' Undocumented arguments in documentation object 'lappend' Undocumented arguments in documentation object 'makeImage' Documented arguments not in \usage in documentation object 'matrixToImages': Undocumented arguments in documentation object 'mni2tal' Undocumented arguments in documentation object 'networkEiganat' Undocumented arguments in documentation object 'pairwiseImageDistanceMatrix' Undocumented arguments in documentation object 'perfusionregression' Undocumented arguments in documentation object 'plot.antsImage' Undocumented arguments in documentation object 'plotBasicNetwork' Undocumented arguments in documentation object 'plotPrettyGraph' Undocumented arguments in documentation object 'projectImageAlongAxis' Undocumented arguments in documentation object 'quantifyCBF' Undocumented arguments in documentation object 'regressionNetworkViz' Undocumented arguments in documentation object 'renderImageLabels' Undocumented arguments in documentation object 'renderNetwork' Undocumented arguments in documentation object 'renderSurfaceFunction' Undocumented arguments in documentation object 'reorientImage' Undocumented arguments in documentation object 'rfSegmentation' Undocumented arguments in documentation object 'rsfDenoise' Undocumented arguments in documentation object 'sparseDecom2' Undocumented arguments in documentation object 'sparseDecom2boot' Undocumented arguments in documentation object 'subgradientL1Regression' Undocumented arguments in documentation object 'taskFMRI' Undocumented arguments in documentation object 'timeseriesN3' Bad \usage lines found in documentation object 'combineNuisancePredictors': Functions with \usage entries need to have the appropriate \alias |
I am having trouble with updating ANTsR in cluster. This is what happens when loading the package: Error in dyn.load(file, DLLpath = DLLpath, ...) : Is this related to the problems described above? Do you advise to start over with a clean build? Dorian |
Unrelated ... probably just need clean build.
|
@jeffduda Not sure what the status of the undocumented get/set antsImage On 4 February 2015 at 14:16, stnava notifications@github.com wrote:
|
@stnava Thanks, a clean install resolved the problem. |
@bkandel https://github.com/bkandel, I haven't had a chance to work on On Thu, Feb 5, 2015 at 1:04 PM, dorianps notifications@github.com wrote:
|
We crushed it over the last few days. Here is the new R CMD check result:
Undocumented arguments in documentation object 'antsMatrix-class' Undocumented arguments in documentation object 'as.antsImage' Undocumented arguments in documentation object 'as.antsMatrix' Functions with \usage entries need to have the appropriate \alias
|
Current state on OSX Yosemite:
that's all i can think of at the moment re:cran... other design issues include
am ultimately hopeful these issues may be overcome .... but if not, perhaps install_github isnt so bad .... esp if we have well-documented code with use-cases etc readily available. |
ok - major progress: no documentation inconsistencies for the first time ... but still some undocumented code: Undocumented code objects: am reading through the antsr manual and correcting typos etc though this will probably take several iterations to get right.
so we are down to 1 warning ... |
will work on adding in that documentation now. On Fri, Feb 6, 2015 at 12:24 PM, stnava notifications@github.com wrote:
|
re STYLE: have mostly eliminated calls of the form FunctionName(dim, img, ... ) and replaced with functionName( img , ... ) stragglers include:
for the latter, i will implement antsImageMath with usage similar to: output<-iMath( img,"operationName", ... ) and (maybe) where you will be able to do ops<-iMath("GetOperations") to see its possible uses ... will keep ImageMath(...) around but replace with iMath in documentation examples .... any suggestions welcome before i start this .... |
Continuing conversation I started with Brian here to get broader feedback: One critical point for us is to make sure that we can link ITKR and ANTsR 2015-03-23 14:50 GMT-04:00 stnava notifications@github.com:
|
it's true that the only solution i know is a manual one ... or we brian On Tue, Mar 24, 2015 at 9:56 AM, bkandel notifications@github.com wrote:
|
The travis build is now running R CMD check. We should be better off from here on out wrt detecting documentation or example code issues. |
updated the website http://stnava.github.io/ANTsR/ with CRAN like links / structure |
First of all, thumbs up for all your efforts and that great software (and especially bringing ANTs to R). Here is some further info: http://dirk.eddelbuettel.com/blog/2015/03/13/ |
Yes, CRAN is very frustrating. We tried drat, but couldn't get it to If you have gotten drat to work successfully on your projects, I'd be very 2015-04-17 15:48 GMT-04:00 Stefan Schlager notifications@github.com:
|
No, I only read the posts about drat, but thought of playing with it, if I find the time. Maybe I can have a look at it next week and report back if I succeeded (or not). |
OK, I just set up a quick and dirty repo for ANTsR and it seems to work (though I had to set the drat::addRepo("zarquon42b")
install.packages("ANTsR") You do not need to fork the drat repo, simply a gh-pages branch (https://github.com/zarquon42b/drat/tree/gh-pages/src/contrib) with a similar folder layout and register the new tarballs with drat::insertPackage locally in your local github repo and then push it. EDIT: renamed repo drattest to drat as it actually worked now and simplified the addRepo step. |
On 17 Apr 2015, at 21:44, Stefan Schlager notifications@github.com wrote:
Good stuff @zarquon42b. I did a bit more mucking around here if it’s of interest: https://jefferis.github.io/drattest/ Best, Greg. |
looks excellent @jefferis . Best |
Great! Thanks for doing this. I'll check it out--this would be a huge 2015-04-17 17:54 GMT-04:00 Stefan Schlager notifications@github.com:
|
Maybe it would be useful to create a github organization called "ANTsR" with a repo named drats, where you put the tarballs. Best |
Hi everybody, I initialized a drat repo at https://github.com/ANTs-R/drat and added the latest snapshots of ANTsR, ITKR and cmaker (to be found in the gh-pages branch. To install ANTsR simply do: drat::addRepo("ANTs-R")
install.packages("ANTsR") I also wrote a (still somewhat messy) bash script to bump package version and options to build and add tarballs to a drat repo (you simply have to commit the changes and push them afterwards). Best |
@zarquon42b - i made a note of drat installation instructions in README/homepage. thank you for this. |
Just tested this out using packrat--works great! Easiest way I've seen to 2015-04-20 11:04 GMT-04:00 Stefan Schlager notifications@github.com:
|
i could probably finish up the iMath revision by the end of next week On Thu, May 7, 2015 at 5:32 PM, stnava notifications@github.com wrote:
|
All the ASL processing functions are already implemented. Although I don't 2015-05-07 17:34 GMT-04:00 Jeffrey Duda notifications@github.com:
|
If you want me to update the drat repo, please nudge me (BTW: I put some occasional"nightly builds" of ANTsR in my own drat repo at https://github.com/zarquon42b/drat/tree/gh-pages/src/contrib) |
@jeffduda i am trying to update the ANTsR manual online and found that it failed to build ... there could be a few possibilities but it would be great if you could address these first issues:
i found this simply via:
which is fairly fast to run ... you might also (temporarily) edit the
to this:
to avoid any wasted time recompiling c++. |
Thanks for the tip on avoid the recompiling. That makes doing the check On Thu, Jan 7, 2016 at 11:04 AM, stnava notifications@github.com wrote:
|
Can I also suggest devtools::check_doc for rapid documentation checks. Best, Greg. |
yes! just tried and works beautifully. some prior version choked on antsr but this is now the clearly better brian On Thu, Jan 7, 2016 at 3:37 PM, Gregory Jefferis notifications@github.com
|
just found this nifty trick on stackoverflow to build the pdf manual for a package from inside R:
more discussion here |
Relevant discussion about CMake that happened today: https://stat.ethz.ch/pipermail/r-package-devel/2016q3/001036.html, seems like Uwes says it'd be fine in SystemRequirements: https://stat.ethz.ch/pipermail/r-package-devel/2016q2/000903.html. |
that's fantastic. would make the cmaker package much easier to get in brian On Thu, Aug 11, 2016 at 2:04 PM, John Muschelli notifications@github.com
|
Closed due to 8 years of inactivity :) Please create a new issue to discuss, as this is an important topic. |
@ntustison , @bkandel , @dorianps, @jeffduda , @cookpa , @armaneshaghi, @muschellij2
hoping to work toward a CRAN submission for ANTsR - some updates on this topic:
i ran rd2roxygen and dealt with most of the issues. hopefully wont have
to do that again ... so, in the future, we should write documentation
using the roxygen2 style and just roxygenize() regularly.
a couple other changes
@muschellij2 - would appreciate any advice / help on this ....
some advice from wickham: http://www.rstudio.com/products/rpackages/devtools/
it's a very good page with strategies that will help with most of the issues we've had in the past ...
any thoughts appreciated.
The text was updated successfully, but these errors were encountered: