Skip to content

Commit

Permalink
First draft of package.
Browse files Browse the repository at this point in the history
  • Loading branch information
dereckmezquita committed Aug 3, 2024
1 parent 19bfe6d commit 68d7c6e
Show file tree
Hide file tree
Showing 14 changed files with 905 additions and 18 deletions.
7 changes: 7 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# jira ticket

https://dereckmezquita.atlassian.net/browse/<TICKET-ID>

# todo list

- [ ] Version bump
36 changes: 36 additions & 0 deletions .github/workflows/pkgdown.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: pkgdown
on: push
permissions:
contents: write
jobs:
main:
name: Build and publish website
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout repository
uses: actions/checkout@v3

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

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

- name: Install R package dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::pkgdown, local::.

- name: Configure git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Deploy to branch
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
shell: Rscript {0}
run: pkgdown::deploy_to_branch(branch = "bot/github-pages")
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Package: rlogger
Package: Logger
Type: Package
Title: Flexible and Customisable Logging System for R
Version: 0.0.1
Expand Down
5 changes: 5 additions & 0 deletions DEV.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
```bash
Rscript -e "devtools::document()"
Rscript -e "devtools::check()"
Rscript -e "devtools::install()"
```
4 changes: 4 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Generated by roxygen2: do not edit by hand

export(LogLevel)
export(Logger)
20 changes: 11 additions & 9 deletions R/Logger.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
#' Log Levels
#'
#' Defines the available log levels for the Logger class.
#'
#' @export
LogLevel <- list(
ERROR = 0L,
WARNING = 1L,
INFO = 2L
)

#' @title Logger
#' @description An R6 class for flexible logging with customizable output.
#'
#' @export
#' @examples
#' # Create a basic logger
#' logger <- Logger$new()
Expand All @@ -22,14 +32,6 @@
#' # Change log level
#' custom_logger$set_level(LogLevel$INFO)
#' custom_logger$info("Now this will be logged")

#' @export
LogLevel <- list(
ERROR = 0L,
WARNING = 1L,
INFO = 2L
)

#' @export
Logger <- R6::R6Class(
"Logger",
Expand Down
16 changes: 16 additions & 0 deletions man/LogLevel.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

244 changes: 244 additions & 0 deletions man/Logger.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added man/figures/BITCOIN.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added man/figures/MONERO.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 38 additions & 0 deletions pkgdown/_pkgdown.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
template:
bootstrap: 5

url: https://dereckmezquita.github.io/R-Logger/

authors:
Dereck Mezquita:
href: https://derecksnotes.com

navbar:
structure:
left: [home, reference, articles, donate]
right: [github, youtube, search, website, website2]
components:
articles:
text: Articles
menu:
- text: "Getting Started with Logger"
href: articles/getting-started-Logger.html
donate:
text: Donate
href: articles/donate.html
github:
icon: fa-github fa-lg
href: https://github.com/dereckmezquita/R-Logger
target: _blank
youtube:
icon: fa-youtube fa-lg
href: https://www.youtube.com/@derecksyoutube
target: _blank
website:
text: derecksprojects.com
href: https://derecksprojects.com
target: _blank
website2:
text: derecksnotes.com
href: https://derecksnotes.com
target: _blank
Loading

0 comments on commit 68d7c6e

Please sign in to comment.