Skip to content

Commit

Permalink
Merge pull request #80 from cynkra/f-add-news-file
Browse files Browse the repository at this point in the history
Add news file
  • Loading branch information
moodymudskipper authored Nov 4, 2022
2 parents 7333bc5 + 94b72c7 commit cde0c16
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: constructive
Title: Display Idiomatic Code to Construct Most R Objects
Version: 0.0.0.9000
Version: 0.0.1
Authors@R:
person("Antoine", "Fabri", , "antoine.fabri@gmail.com", role = c("aut", "cre"))
Description: Display idiomatic code to construct most R objects.
Expand Down
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# constructive 0.0.1

* {constructive} produces code that can be used to recreate R objects. In a sense it
is similar to `base::dput()` or `base::deparse()` but {constructive} strives to use "natural" constructors
(`factor` for factors, `as.Date()` for dates, `data.frame()` for data frames etc),
in order to get output readable by humans.
5 changes: 0 additions & 5 deletions R/constructive.R
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,6 @@ try_eval <- function(styled_code, data) {
)
}

# FIXME: we might not be identical and still have waldo not find any difference
# we should print something in those cases.
# FIXME: we should be able to set the ignore_* args from `construct()`, `identical()`
# itself has args `ignore.bytecode`, `ignore.environment` and `ignore.srcref`
# that we can use. We might sometimes have to do the comparison using `waldo()` directly though.
check_round_trip <- function(x, styled_code, data, check, ignore_srcref, ignore_attr, ignore_function_env, ignore_formula_env) {
if (isFALSE(check)) return(NULL)
evaled <- try_eval(styled_code, data)
Expand Down

0 comments on commit cde0c16

Please sign in to comment.