Skip to content

Commit

Permalink
Merge pull request #1782 from infotroph/remove-deprecated
Browse files Browse the repository at this point in the history
remove deprecated functions in PEcAn.utils. Closes #1719
  • Loading branch information
mdietze committed Nov 21, 2017
2 parents 6157ff5 + d22ee98 commit 11d4153
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 302 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,18 @@ For more information about this file see also [Keep a Changelog](http://keepacha

## [Unreleased]

### Fixes

### Added

### Removed
- Removed deprecated copies of PEcAn.utils::SafeList, PEcAn.utils::listToXml (both moved to PEcAn.settings in v 1.5.2), and PEcAn.utils::fqdn (moved to PEcAn.remote in 1.5.2). This fixes the masses of deprecation warnings in otherwise normal run logs (#1719).

### Changed


## [1.5.2] - 2017-??-??

### Fixes
- Updated models/ed/data/pftmapping.csv to include two new BETYdb PFTs
- Simple fix to models/ed/R/write.configs.ed.R to properly align pss and css file prefix
Expand Down
7 changes: 0 additions & 7 deletions base/utils/NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# Generated by roxygen2: do not edit by hand

S3method("$",SafeList)
S3method(listToXml,default)
export(SafeList)
export(arrhenius.scaling)
export(as.SafeList)
export(as.sequence)
export(bugs.rdist)
export(clear.scratch)
Expand All @@ -20,7 +16,6 @@ export(do_conversions)
export(download.file)
export(download.url)
export(ensemble.filename)
export(fqdn)
export(full.path)
export(get.ensemble.inputs)
export(get.ensemble.samples)
Expand All @@ -32,10 +27,8 @@ export(get.results)
export(get.run.id)
export(get.sa.sample.list)
export(get.sa.samples)
export(is.SafeList)
export(left.pad.zeros)
export(listToArgString)
export(listToXml)
export(load.modelpkg)
export(logger.debug)
export(logger.error)
Expand Down
78 changes: 0 additions & 78 deletions base/utils/R/SafeList.R

This file was deleted.

27 changes: 0 additions & 27 deletions base/utils/R/fqdn.R

This file was deleted.

58 changes: 0 additions & 58 deletions base/utils/R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -170,64 +170,6 @@ get.run.id <- function(run.type, index, trait = NULL, pft.name = NULL) {
return(result)
} # get.run.id


##' @export
listToXml <- function(x, ...) {
.Deprecated("PEcAn.settings::listToXml")
UseMethod("listToXml")
} # listToXml


#--------------------------------------------------------------------------------------------------#
##' Convert List to XML
##'
##' DEPRECATED. Use \code{\link[PEcAn.settings:listToXml.default]{PEcAn.settings::listToXml.default}} instead.
##' Can convert list or other object to an xml object using xmlNode
##' @title List to XML
##' @param item object to be converted. Despite the function name, need not actually be a list
##' @param tag xml tag
##' @return xmlNode
##' @export
##' @author David LeBauer, Carl Davidson, Rob Kooper
listToXml.default <- function(item, tag) {
.Deprecated("PEcAn.settings::listToXml.default")

# just a textnode, or empty node with attributes
if (typeof(item) != "list") {
if (length(item) > 1) {
xml <- XML::xmlNode(tag)
for (name in names(item)) {
XML::xmlAttrs(xml)[[name]] <- item[[name]]
}
return(xml)
} else {
return(XML::xmlNode(tag, item))
}
}

# create the node
if (identical(names(item), c("text", ".attrs"))) {
# special case a node with text and attributes
xml <- XML::xmlNode(tag, item[["text"]])
} else {
# node with child nodes
xml <- XML::xmlNode(tag)
for (i in seq_along(item)) {
if (is.null(names(item)) || names(item)[i] != ".attrs") {
xml <- XML::append.xmlNode(xml, listToXml(item[[i]], names(item)[i]))
}
}
}

# add attributes to node
attrs <- item[[".attrs"]]
for (name in names(attrs)) {
XML::xmlAttrs(xml)[[name]] <- attrs[[name]]
}
return(xml)
} # listToXml.default


#--------------------------------------------------------------------------------------------------#
##' Zero bounded density using log density transform
##'
Expand Down
54 changes: 0 additions & 54 deletions base/utils/man/SafeList.Rd

This file was deleted.

26 changes: 0 additions & 26 deletions base/utils/man/cash-.SafeList.Rd

This file was deleted.

26 changes: 0 additions & 26 deletions base/utils/man/fqdn-deprecated.Rd

This file was deleted.

26 changes: 0 additions & 26 deletions base/utils/man/listToXml.default.Rd

This file was deleted.

0 comments on commit 11d4153

Please sign in to comment.