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

[pull] master from daroczig:master #34

Merged
merged 75 commits into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
9fcc700
ability to pass session to log_shiny_input_changes to detect Testing …
m7pr May 14, 2024
101f869
remove session parameter
m7pr May 16, 2024
4e3600a
move session definition before statement verification
m7pr Jun 19, 2024
9799245
simplify message creation
m7pr Jun 19, 2024
93a2c3c
one more session class to omit
m7pr Jun 20, 2024
40534d0
single quotes
daroczig Jul 31, 2024
4a12bc9
WIP: Check inputs of `log_` config setters
hadley Aug 2, 2024
46fe710
`use_tidy_github_actions()`
hadley Aug 2, 2024
6d92b26
Use dev pak to work around buglet
hadley Aug 5, 2024
537ad8d
Improve glue error message
hadley Aug 5, 2024
3f0da4f
Merge commit '8d83a35d90cec6e1d2cdd6918dd6d7b9061bfb11'
hadley Aug 5, 2024
4a91d0e
Test in current process
hadley Aug 5, 2024
2570a78
Fix error and add test
hadley Aug 5, 2024
5a70496
Convert more external tests to snapshot tests
hadley Aug 5, 2024
6f2840d
Skip tests that can't work on windows
hadley Aug 5, 2024
8a3813f
Add some missing skips
hadley Aug 5, 2024
8d988f8
Make it just work on windows?
hadley Aug 5, 2024
c268aa7
Needs a path
hadley Aug 5, 2024
742b5b6
Fix path
hadley Aug 5, 2024
06d1bec
Use snapshots to make it more clear what's being produced
hadley Aug 5, 2024
9e8492a
Drop system() example since it doesn't work on windows
hadley Aug 5, 2024
bb5794a
Improvements to use of `eval()`
hadley Aug 5, 2024
ab6ef3f
Update snapshot & normalize path
hadley Aug 5, 2024
d371db2
Create the temporary files
hadley Aug 6, 2024
dab03cb
Reset output back to stdout
hadley Aug 6, 2024
6272f86
Include some hopefully diagnostic output
hadley Aug 6, 2024
0850cc6
Always use stdout in vignettes
hadley Aug 6, 2024
0dd13fb
More diagnostics
hadley Aug 6, 2024
31cb2b5
More debugging
hadley Aug 6, 2024
c97d34e
Add missing namespace
hadley Aug 6, 2024
6ccad56
More comprehensive logging reset in vignettes
hadley Aug 6, 2024
384fbe4
Remove debugging code
hadley Aug 6, 2024
a648108
Didn't use processx
hadley Aug 6, 2024
fe2eccf
fix tests
m7pr Aug 6, 2024
746997b
Diagnostics for windows
hadley Aug 6, 2024
15922a5
doh
hadley Aug 6, 2024
38dcb23
Remove debugging hooks; move more code to individual tests; simplify …
hadley Aug 6, 2024
2cb71b8
Merged upstream/master into hadley-actions
hadley Aug 6, 2024
a99a097
Now requires R 4.0.0
hadley Aug 6, 2024
151a73b
Merged upstream/master into hadley-check-inputs
hadley Aug 6, 2024
87b02d5
Complete implementation; add tests + news
hadley Aug 6, 2024
66b0f6f
Tweak `log_config_setter` arguments
hadley Aug 6, 2024
f0ba810
Merge pull request #171 from hadley/actions
daroczig Aug 6, 2024
37d2db0
Merge pull request #181 from hadley/log-config-setter-args
daroczig Aug 6, 2024
1951ea8
Merge branch 'master' into pr155
daroczig Aug 6, 2024
d1c7642
update with shiny namespace prefix and related updates
daroczig Aug 6, 2024
42fce7e
Merge branch 'shiny_extensions_alternative' of github.com:m7pr/logger…
daroczig Aug 6, 2024
3ef4b65
Merge pull request #155 from m7pr/shiny_extensions_alternative
daroczig Aug 7, 2024
55bbe80
fix #174 restyle with styler::style_dir
daroczig Aug 7, 2024
7c83c53
transform to md
daroczig Aug 7, 2024
952f7db
split long lines
daroczig Aug 7, 2024
72819f4
disable fn complexity checker
daroczig Aug 7, 2024
57711d6
best practices
daroczig Aug 7, 2024
c901773
long lines
daroczig Aug 7, 2024
ed7ed42
best practices &&
daroczig Aug 7, 2024
20749bd
disable linter on as.loglevel to be consistent with base R naming
daroczig Aug 7, 2024
cee37da
roxygenize test pkg
daroczig Aug 7, 2024
801b88b
rerun roxygen2 after linter updates
daroczig Aug 7, 2024
1ee04a9
set up linter
daroczig Aug 7, 2024
992eb7e
Merge commit '3ef4b650503ac4d1fa2844bfdc15fe373662bf61'
hadley Aug 7, 2024
f6d2b9f
Merged upstream/master into hadley-eval-improvements
hadley Aug 7, 2024
94c068f
Fix bug I introduced in `%except%`
hadley Aug 7, 2024
8d54980
Handle all consistently and test
hadley Aug 7, 2024
e907364
`use_tidy_description()`
hadley Aug 7, 2024
b4b9d92
Merge pull request #186 from daroczig/lint
daroczig Aug 7, 2024
b9d1244
fix lines merged during restyling
daroczig Aug 7, 2024
7a1998c
Merge pull request #189 from hadley/description
daroczig Aug 7, 2024
d00f0ed
Merge pull request #185 from daroczig/restyle
daroczig Aug 7, 2024
f305cab
Merge branch 'master' into pr178
daroczig Aug 7, 2024
a63774a
lint
daroczig Aug 7, 2024
50691dd
double hash for comments on their own line
daroczig Aug 7, 2024
f8855cf
Merge pull request #178 from hadley/eval-improvements
daroczig Aug 7, 2024
c9e0058
Merge branch 'master' into pr170
daroczig Aug 7, 2024
389d660
lint
daroczig Aug 7, 2024
e9d37c2
Merge pull request #170 from hadley/check-inputs
daroczig Aug 7, 2024
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
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ dev-resources
^pkgdown$
^\.github$
revdep
^codecov\.yml$
^README\.Rmd$
31 changes: 23 additions & 8 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
#
# NOTE: This workflow is overkill for most R packages and
# check-standard.yaml is likely a better choice.
# usethis::use_github_action("check-standard") will install it.
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

name: R-CMD-check
name: R-CMD-check.yaml

permissions: read-all

jobs:
R-CMD-check:
Expand All @@ -18,18 +24,25 @@ jobs:
fail-fast: false
matrix:
config:
# - {os: macos-latest, r: 'release'}
# - {os: windows-latest, r: 'release'}
# - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
# - {os: ubuntu-latest, r: 'oldrel-1'}
- {os: macos-latest, r: 'release'}

- {os: windows-latest, r: 'release'}
# use 4.0 or 4.1 to check with rtools40's older compiler
- {os: windows-latest, r: 'oldrel-4'}

- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}
- {os: ubuntu-latest, r: 'oldrel-2'}
- {os: ubuntu-latest, r: 'oldrel-3'}
- {os: ubuntu-latest, r: 'oldrel-4'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

Expand All @@ -43,7 +56,9 @@ jobs:
with:
extra-packages: any::rcmdcheck
needs: check
pak-version: devel # can remove once pak 0.7.3 is released

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'
34 changes: 34 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

name: lint.yaml

permissions: read-all

jobs:
lint:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::lintr, local::.
needs: lint

- name: Lint
run: lintr::lint_package()
shell: Rscript {0}
env:
LINTR_ERROR_ON_LINT: true
20 changes: 15 additions & 5 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,30 @@
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
tags: ['*']
pull_request:
branches: [main, master]
release:
types: [published]
workflow_dispatch:

name: pkgdown.yaml

name: pkgdown
permissions: read-all

jobs:
pkgdown:
runs-on: ubuntu-latest
# Only restrict concurrency for non-PR jobs
concurrency:
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

Expand All @@ -33,7 +42,8 @@ jobs:
shell: Rscript {0}

- name: Deploy to GitHub pages 🚀
uses: JamesIves/[email protected]
if: github.event_name != 'pull_request'
uses: JamesIves/[email protected]
with:
clean: false
branch: gh-pages
Expand Down
25 changes: 18 additions & 7 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

name: test-coverage
name: test-coverage.yaml

permissions: read-all

jobs:
test-coverage:
Expand All @@ -15,36 +17,45 @@ jobs:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::covr
extra-packages: any::covr, any::xml2
needs: coverage

- name: Test coverage
run: |
covr::codecov(
cov <- covr::package_coverage(
quiet = FALSE,
clean = FALSE,
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
)
covr::to_cobertura(cov)
shell: Rscript {0}

- uses: codecov/codecov-action@v4
with:
fail_ci_if_error: ${{ github.event_name != 'pull_request' && true || false }}
file: ./cobertura.xml
plugin: noop
disable_search: true
token: ${{ secrets.CODECOV_TOKEN }}

- name: Show testthat output
if: always()
run: |
## --------------------------------------------------------------------
find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Upload test results
if: failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package
12 changes: 12 additions & 0 deletions .lintr
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
linters: linters_with_defaults(
line_length_linter(120),
object_usage_linter(interpret_glue = TRUE),
object_name_linter(styles = c("snake_case", "symbols", "UPPERCASE"))
)
exclude: '# nolint'
exclude_start: '# nolint start'
exclude_end: '# nolint end'
exclusions: list(
"inst/demo-packages/logger-tester-package/R/tester.R",
"vignettes/migration.Rmd"
)
77 changes: 41 additions & 36 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,49 +1,54 @@
Type: Package
Package: logger
Authors@R: c(
person("Gergely", "Daróczi", , "[email protected]", role = c("aut", "cre"), comment = c(ORCID = "0000-0003-3149-8537")),
person("System1", role = c("fnd"))
)
Title: A Lightweight, Modern and Flexible Logging Utility
Description: Inspired by the the 'futile.logger' R package and 'logging' Python module, this utility provides a flexible and extensible way of formatting and delivering log messages with low overhead.
Version: 0.3.0.9000
Date: 2024-03-03
Authors@R: c(
person("Gergely", "Daróczi", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0003-3149-8537")),
person("System1", role = "fnd")
)
Description: Inspired by the the 'futile.logger' R package and 'logging'
Python module, this utility provides a flexible and extensible way of
formatting and delivering log messages with low overhead.
License: AGPL-3
URL: https://daroczig.github.io/logger/
BugReports: https://github.com/daroczig/logger/issues
Encoding: UTF-8
RoxygenNote: 7.3.2
License: AGPL-3
Depends:
R (>= 4.0.0)
Imports:
utils
Depends: R (>= 4.0.0)
utils
Suggests:
glue,
pander,
jsonlite,
crayon,
slackr (>= 1.4.1),
RPushbullet,
telegram,
testthat (>= 3.0.0),
covr,
knitr,
rmarkdown,
devtools,
roxygen2,
parallel,
rsyslog,
shiny,
callr,
txtq,
botor,
R.utils,
syslognet,
withr
botor,
callr,
covr,
crayon,
devtools,
glue,
jsonlite,
knitr,
pander,
parallel,
R.utils,
rmarkdown,
roxygen2,
RPushbullet,
rsyslog,
shiny,
slackr (>= 1.4.1),
syslognet,
telegram,
testthat (>= 3.0.0),
txtq,
withr
Enhances:
logging,
futile.logger,
log4r
VignetteBuilder: knitr
futile.logger,
log4r,
logging
VignetteBuilder:
knitr
Config/testthat/edition: 3
Config/testthat/parallel: TRUE
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.2
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# logger (development version)

* `log_appender()`, `log_layout()` and `log_formatter()` now check that you are calling them with a function, and return the previously set value.

# logger 0.3.0 (2024-03-03)

Many unrelated small features, fixes and documentation updates collected over 2+ years.
Expand Down
Loading
Loading