Browse Source

letting Travis have a go

delete
boB Rudis 7 years ago
parent
commit
2a5de9ad15
No known key found for this signature in database GPG Key ID: 2A514A4997464560
  1. 1
      .Rbuildignore
  2. 4
      .travis.yml
  3. 4
      DESCRIPTION
  4. 2
      NAMESPACE
  5. 4
      NEWS.md
  6. 4
      R/RcppExports.R
  7. 2
      R/mgrs-package.R
  8. 1
      codecov.yml
  9. 2
      man/mgrs_to_ups.Rd
  10. 2
      man/mgrs_to_utm.Rd
  11. 32
      src/init.c
  12. 4
      src/main.cpp

1
.Rbuildignore

@ -9,3 +9,4 @@
^README_files$
^doc$
^CONDUCT\.md$
^codecov\.yml$

4
.travis.yml

@ -11,10 +11,6 @@ r:
- release
- devel
apt_packages:
- libv8-dev
- xclip
env:
global:
- CRAN: http://cran.rstudio.com

4
DESCRIPTION

@ -5,8 +5,8 @@ Version: 0.1.0
Date: 2017-04-09
Author: Bob Rudis (bob@rud.is), Howard Butler
Maintainer: Bob Rudis <bob@rud.is>
Description: Convert 'MGRS' ('Military Grid Reference System') Coordinates To and From
Other Coordinate Systems
Description: Convert 'MGRS' ('Military Grid Reference System') coordinates to and from
other coordinate systems.
URL: https://github.com/hrbrmstr/mgrs
BugReports: https://github.com/hrbrmstr/mgrs/issues
License: AGPL

2
NAMESPACE

@ -9,4 +9,4 @@ export(ups_to_mgrs)
export(utm_to_latlng)
export(utm_to_mgrs)
importFrom(Rcpp,sourceCpp)
useDynLib(mgrs)
useDynLib(mgrs, .registration=TRUE)

4
NEWS.md

@ -1,2 +1,6 @@
0.1.0
* Basic wrapper complete
* Basic tests complete
* Tested on Windows via rhub
* Initial release

4
R/RcppExports.R

@ -43,7 +43,7 @@ utm_to_mgrs <- function(zone, hemisphere, easting, northing, precision = 5L) {
#' Convert MGRS to UTM
#'
#' @md
#' @param MGRS an MGRS string
#' @param mgrs_string an MGRS string
#' @return `data.frame`
#' @export
#' @examples
@ -68,7 +68,7 @@ ups_to_mgrs <- function(hemisphere, easting, northing, precision = 5L) {
#' Convert MGRS to UPS
#'
#' @md
#' @param MGRS an MGRS string
#' @param mgrs_string an MGRS string
#' @return `data.frame`
#' @export
#' @examples

2
R/mgrs-package.R

@ -3,6 +3,6 @@
#' @name mgrs
#' @docType package
#' @author Bob Rudis (bob@@rud.is)
#' @useDynLib mgrs
#' @useDynLib mgrs, .registration=TRUE
#' @importFrom Rcpp sourceCpp
NULL

1
codecov.yml

@ -0,0 +1 @@
comment: false

2
man/mgrs_to_ups.Rd

@ -7,7 +7,7 @@
mgrs_to_ups(mgrs_string)
}
\arguments{
\item{MGRS}{an MGRS string}
\item{mgrs_string}{an MGRS string}
}
\value{
\code{data.frame}

2
man/mgrs_to_utm.Rd

@ -7,7 +7,7 @@
mgrs_to_utm(mgrs_string)
}
\arguments{
\item{MGRS}{an MGRS string}
\item{mgrs_string}{an MGRS string}
}
\value{
\code{data.frame}

32
src/init.c

@ -0,0 +1,32 @@
#include <R.h>
#include <Rinternals.h>
#include <stdlib.h> // for NULL
#include <R_ext/Rdynload.h>
/* .Call calls */
extern SEXP mgrs_latlng_to_mgrs(SEXP, SEXP, SEXP, SEXP);
extern SEXP mgrs_mgrs_to_latlng(SEXP, SEXP);
extern SEXP mgrs_mgrs_to_ups(SEXP);
extern SEXP mgrs_mgrs_to_utm(SEXP);
extern SEXP mgrs_ups_to_latlng(SEXP, SEXP, SEXP, SEXP);
extern SEXP mgrs_ups_to_mgrs(SEXP, SEXP, SEXP, SEXP);
extern SEXP mgrs_utm_to_latlng(SEXP, SEXP, SEXP, SEXP, SEXP);
extern SEXP mgrs_utm_to_mgrs(SEXP, SEXP, SEXP, SEXP, SEXP);
static const R_CallMethodDef CallEntries[] = {
{"mgrs_latlng_to_mgrs", (DL_FUNC) &mgrs_latlng_to_mgrs, 4},
{"mgrs_mgrs_to_latlng", (DL_FUNC) &mgrs_mgrs_to_latlng, 2},
{"mgrs_mgrs_to_ups", (DL_FUNC) &mgrs_mgrs_to_ups, 1},
{"mgrs_mgrs_to_utm", (DL_FUNC) &mgrs_mgrs_to_utm, 1},
{"mgrs_ups_to_latlng", (DL_FUNC) &mgrs_ups_to_latlng, 4},
{"mgrs_ups_to_mgrs", (DL_FUNC) &mgrs_ups_to_mgrs, 4},
{"mgrs_utm_to_latlng", (DL_FUNC) &mgrs_utm_to_latlng, 5},
{"mgrs_utm_to_mgrs", (DL_FUNC) &mgrs_utm_to_mgrs, 5},
{NULL, NULL, 0}
};
void R_init_mgrs(DllInfo *dll)
{
R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
R_useDynamicSymbols(dll, FALSE);
}

4
src/main.cpp

@ -106,7 +106,7 @@ String utm_to_mgrs(long zone, std::string hemisphere,
//' Convert MGRS to UTM
//'
//' @md
//' @param MGRS an MGRS string
//' @param mgrs_string an MGRS string
//' @return `data.frame`
//' @export
//' @examples
@ -172,7 +172,7 @@ String ups_to_mgrs(std::string hemisphere,
//' Convert MGRS to UPS
//'
//' @md
//' @param MGRS an MGRS string
//' @param mgrs_string an MGRS string
//' @return `data.frame`
//' @export
//' @examples

Loading…
Cancel
Save