-
Notifications
You must be signed in to change notification settings - Fork 11
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
chore: Clean version header parsing #610
Conversation
tests/testthat/_snaps/fledgling.md
Outdated
@@ -12,7 +12,7 @@ | |||
}, | |||
"section_state": "keep", | |||
"title": "fledge v2.0.0", | |||
"version": "2.0.0", | |||
"version": "v2.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we actually want to clean this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@krlmlr what did you expect here, should the version stored by fledgeling keep the v or not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No preference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fledgeling object should be opaque, the behavior of its API is more interesting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rethinking this. There's reason to leave the "v"
out because then it can be easier converted to a numeric version.
base::numeric_version("v1.2.3")
#> Error: invalid version specification 'v1.2.3'
base::numeric_version("1.2.3")
#> [1] '1.2.3'
Created on 2023-05-27 with reprex v2.0.2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. PRs on top of PRs are difficult to reason about. Can we get parts of the "big" PR merged quickly?
@@ -1,6 +1,6 @@ | |||
<!-- NEWS.md is maintained by https://cynkra.github.io/fledge, do not edit --> | |||
|
|||
# fledge 0.0.1 (2023-01-23) | |||
# fledge 0.0.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes! otherwise it varies every day, it was a mistake from earlier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use a fixed date?
tests/testthat/_snaps/fledgling.md
Outdated
@@ -12,7 +12,7 @@ | |||
}, | |||
"section_state": "keep", | |||
"title": "fledge v2.0.0", | |||
"version": "2.0.0", | |||
"version": "v2.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rethinking this. There's reason to leave the "v"
out because then it can be easier converted to a numeric version.
base::numeric_version("v1.2.3")
#> Error: invalid version specification 'v1.2.3'
base::numeric_version("1.2.3")
#> [1] '1.2.3'
Created on 2023-05-27 with reprex v2.0.2
tests/testthat/_snaps/fledgling.md
Outdated
@@ -26,7 +26,7 @@ | |||
}, | |||
"section_state": "keep", | |||
"title": "fledge v1.0.0", | |||
"version": "1.0.0", | |||
"version": "v1.0.0", | |||
"date": "NA", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just leaving those out, or setting them to an explicit NULL
, would be more idiomatic? What are the upsides of storing NA
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, if we make them null, it makes this line fail
fledge/R/utils-parse-version.R
Line 3 in 40e192a
do.call(rbind, list) |
Thanks! In the future, please don't let me block your progress in this repo. I'm happy to review "after the fact" as needed, or if you have specific questions regarding the code. |
No description provided.