Skip to content
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

Add news file #80

Merged
merged 2 commits into from
Nov 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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