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

style: use glue for line-wrapping in cache warnings #191

Merged
merged 2 commits into from
Oct 2, 2023

Conversation

dshemetov
Copy link
Contributor

No description provided.

@dsweber2 dsweber2 merged commit c3daeb5 into dev Oct 2, 2023
9 checks passed
@dsweber2 dsweber2 deleted the ds/format-cache-messages branch October 2, 2023 17:58
Copy link
Contributor

@brookslogan brookslogan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very minor tweak + requests.

"i" = "disabling the cache for this session with `disable_cache` or
permanently with environmental variable `EPIDATR_USE_CACHE=FALSE`",
"i" = "setting `EPIDATR_CACHE_MAX_AGE_DAYS={Sys.getenv('EPIDATR_CACHE_MAX_AGE_DAYS
', unset = 1)}` to e.g. `3/24` (3 hours)."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

todo: This rendered as ℹ setting `EPIDATR_CACHE_MAX_AGE_DAYS=1` to e.g. `3/24` (3 hours). for me. Tweak to remove or reword the =1. [hopefully fixed the GitHub formatting]

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that was intended, to show the current value? though it does look like github is treating the ` strangely.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we reword it for clarity?

setting `EPIDATR_CACHE_MAX_AGE_DAYS` (currently {Sys.getenv('EPIDATR_CACHE_MAX_AGE_DAYS'
, unset = 1)}) to e.g. `3/24` (3 hours)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

slight tweak, maybe
setting environment variable `EPIDATR_CACHE_MAX_AGE_DAYS` (currently {Sys.getenv('EPIDATR_CACHE_MAX_AGE_DAYS', unset = 1)}) to e.g. `3/24` (3 hours)

(btw, Sys.getenv's unset parameter will be stringified. Don't think it matters here but I thought I saw some hints of surprise due to this somewhere in the code.)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it might also benefit from some extra explanation what it's doing, making sure that they receive any new versions of versions quickly (but with better wording)

R/cache.R Show resolved Hide resolved
" to e.g. `3/24` (3 hours)."
"Using cached results with `as_of` within the past week (or the future!).
This will likely result in an invalid cache. Consider",
"i" = "disabling the cache for this session with `disable_cache` or
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment: "i" = is "info item", not numbered list, if that was what you were expecting. Here it might look prettier to use "*" for a bulleted list. (Not sure how to do an actual enumeration, but here just an unordered list seems more suitable.)

@dsweber2 dsweber2 restored the ds/format-cache-messages branch October 2, 2023 21:28
@dshemetov dshemetov deleted the ds/format-cache-messages branch October 7, 2023 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants