From 87fbe2e41872020134f2f51c46340aca34448bef Mon Sep 17 00:00:00 2001 From: Trevor Davis Date: Fri, 22 Mar 2019 11:59:12 -0700 Subject: [PATCH] chore: Get ready for 1.20.3 CRAN release --- .appveyor.yml | 7 +++++++ DESCRIPTION | 2 +- NEWS.md | 4 ++-- README.rst | 37 +++++++++++++++++++++---------------- 4 files changed, 31 insertions(+), 19 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index d40fe4c..7efd4fa 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -14,6 +14,13 @@ cache: - C:\RLibrary # Adapt as necessary starting from here +environment: + global: + USE_RTOOLS: true + matrix: + - R_VERSION: devel + + - R_VERSION: release build_script: - travis-tool.sh install_deps diff --git a/DESCRIPTION b/DESCRIPTION index 5112859..7fff069 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: getopt Type: Package Title: C-Like 'getopt' Behavior -Version: 1.20.3-2 +Version: 1.20.3-3 Authors@R: c(person("Trevor L", "Davis", role=c("aut", "cre"), email="trevor.l.davis@gmail.com"), person("Allen", "Day", role="aut", comment="Original package author"), person("Roman", "Zenka", role="ctb")) diff --git a/NEWS.md b/NEWS.md index ef2cd56..abecfec 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,7 +1,7 @@ getopt 1.20.3 ============= -* Now by default ``getopt`` won't override a user specified ``spec`` if ``argv`` is in the global environment. - Will continue to use ``argv`` as a default for ``spec`` if it is in the global environment (for ``littler`` compatibility). +* Now by default ``getopt`` won't override a user specified ``opt`` argument if ``argv`` is in the global environment. + Will continue to use ``argv`` as a default for ``opt`` if it is in the global environment and the user does not specify an ``opt`` argument (for ``littler`` compatibility). getopt 1.20.2 ============= diff --git a/README.rst b/README.rst index 0dd5792..c3deff1 100644 --- a/README.rst +++ b/README.rst @@ -21,23 +21,28 @@ getopt :target: https://cran.r-project.org/package=getopt :alt: RStudio CRAN mirror downloads -.. image:: http://www.repostatus.org/badges/latest/active.svg - :alt: Project Status: Active – The project has reached a stable, usable state and is being actively developed. - :target: http://www.repostatus.org/#active +.. image:: http://www.repostatus.org/badges/latest/inactive.svg + :alt: Project Status: Active – The project has reached a stable, usable state but is no longer being actively developed; support/maintenance will be provided as time allows. + :target: http://www.repostatus.org/#inactive ``getopt`` is an R package designed to be used with ``Rscript`` to write "#!"-shebang scripts that accept short and long flags/options. Many users will -prefer using instead the package `optparse `_ +prefer using instead the package `optparse `_ which adds extra features (automatically generated help option and usage, support for default values, basic positional argument support). -To install the last version released on CRAN use the following command:: +To install the last version released on CRAN use the following command: - > install.packages("getopt") +.. code:: r -To install the development version use the following command:: + install.packages("getopt") - > remotes:install_github("trevorld/r-getopt") +To install the development version use the following command: + +.. code:: r + + install.packages("remotes") + remotes:install_github("trevorld/r-getopt") example ------- @@ -46,8 +51,8 @@ An example Rscript using ``getopt``:: #!/path/to/Rscript library('getopt') - #get options, using the spec as defined by the enclosed list. - #we read the options from the default: commandArgs(TRUE). + # get options, using the spec as defined by the enclosed list. + # we read the options from the default: commandArgs(TRUE). spec = matrix(c( 'verbose', 'v', 2, "integer", 'help' , 'h', 0, "logical", @@ -64,19 +69,19 @@ An example Rscript using ``getopt``:: q(status=1) } - #set some reasonable defaults for the options that are needed, - #but were not specified. + # set some reasonable defaults for the options that are needed, + # but were not specified. if ( is.null(opt$mean ) ) { opt$mean = 0 } if ( is.null(opt$sd ) ) { opt$sd = 1 } if ( is.null(opt$count ) ) { opt$count = 10 } if ( is.null(opt$verbose ) ) { opt$verbose = FALSE } - #print some progress messages to stderr, if requested. + # print some progress messages to stderr, if requested. if ( opt$verbose ) { write("writing...",stderr()) } - #do some operation based on user input. + # do some operation based on user input. cat(paste(rnorm(opt$count,mean=opt$mean,sd=opt$sd),collapse="\n")) cat("\n") - #signal success and exit. - #q(status=0) + # signal success and exit. + # q(status=0)