Skip to content

Commit

Permalink
docs: update roxygen documentation and pkgdown site files
Browse files Browse the repository at this point in the history
- Add roxygen documentation for .onLoad function
- Update pkgdown configuration and reference pages
- Generate package documentation HTML files
- Update quickstart guide and vignettes
- Update NAMESPACE and DESCRIPTION files
  • Loading branch information
davidycliao committed Jan 5, 2025
1 parent f9f40e8 commit 6ad48ba
Show file tree
Hide file tree
Showing 19 changed files with 149 additions and 38 deletions.
2 changes: 1 addition & 1 deletion .Rproj.user/763C8F27/pcs/files-pane.pper
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
"ascending": true
}
],
"path": "~/Dropbox/My Packages/legisTaiwan/vignettes"
"path": "~/Dropbox/My Packages/legisTaiwan/R"
}
2 changes: 1 addition & 1 deletion .Rproj.user/763C8F27/pcs/source-pane.pper
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"activeTab": 1
"activeTab": 4
}
4 changes: 2 additions & 2 deletions .Rproj.user/763C8F27/sources/prop/70BF7A76
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"source_window_id": "",
"Source": "Source",
"cursorPosition": "38,7",
"scrollLine": "26"
"cursorPosition": "8,1",
"scrollLine": "0"
}
4 changes: 2 additions & 2 deletions .Rproj.user/763C8F27/sources/prop/A6FC25F9
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"source_window_id": "",
"Source": "Source",
"cursorPosition": "30,11",
"scrollLine": "0"
"cursorPosition": "27,10",
"scrollLine": "6"
}
4 changes: 2 additions & 2 deletions .Rproj.user/763C8F27/sources/prop/DFE1904A
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"source_window_id": "",
"Source": "Source",
"cursorPosition": "51,101",
"scrollLine": "40",
"cursorPosition": "82,107",
"scrollLine": "69",
"docOutlineVisible": "1",
"docOutlineSize": "286"
}
2 changes: 2 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ Imports:
rvest,
withr,
httr,
pillar,
vctrs,
utils,
readr,
dplyr,
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export(get_public_debates)
export(get_speech_video)
export(get_tly_stat)
export(get_variable_info)
export(type_sum.accel)
import(ggplot2)
import(utils)
importFrom(attempt,stop_if_all)
Expand Down
16 changes: 16 additions & 0 deletions R/zzz.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@

#' Register S3 methods and set up package
#' @keywords internal
.onLoad <- function(libname, pkgname) {
# 檢查並註冊 S3 方法
if (requireNamespace("vctrs", quietly = TRUE)) {
vctrs::s3_register("pillar::type_sum", "accel")

Check warning on line 7 in R/zzz.R

View check run for this annotation

Codecov / codecov/patch

R/zzz.R#L6-L7

Added lines #L6 - L7 were not covered by tests
}
}


#' On package attach, display a startup message
#'
#' @keywords internal
Expand Down Expand Up @@ -40,3 +51,8 @@
packageStartupMessage(message1)
packageStartupMessage(message2)
}

#' @export
type_sum.accel <- function(x) {
"accel"

Check warning on line 57 in R/zzz.R

View check run for this annotation

Codecov / codecov/patch

R/zzz.R#L57

Added line #L57 was not covered by tests
}
33 changes: 17 additions & 16 deletions docs/articles/quickstart.html

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

2 changes: 1 addition & 1 deletion docs/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pkgdown: 2.1.1
pkgdown_sha: ~
articles:
quickstart: quickstart.html
last_built: 2025-01-05T00:27Z
last_built: 2025-01-05T00:41Z
urls:
reference: https://davidycliao.github.io/legisTaiwan/reference
article: https://davidycliao.github.io/legisTaiwan/articles
79 changes: 79 additions & 0 deletions docs/reference/dot-onLoad.html

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

2 changes: 1 addition & 1 deletion docs/reference/get_caucus_meetings.html

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

2 changes: 1 addition & 1 deletion docs/reference/get_executive_response.html

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

2 changes: 1 addition & 1 deletion docs/reference/get_legislators.html

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

4 changes: 2 additions & 2 deletions docs/reference/get_meetings.html

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

4 changes: 2 additions & 2 deletions docs/reference/get_parlquestions.html

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

2 changes: 1 addition & 1 deletion docs/search.json

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions man/dot-onLoad.Rd

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

10 changes: 5 additions & 5 deletions vignettes/quickstart.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -70,21 +70,21 @@ The Legislative Yuan API is transitioning from `https://ly.govapi.tw` to `https:

### Bill

- [`get_ly_bills()`](): Fetch and Parse Legislative Yuan Bills
- [`get_ly_bills()`](#docs/reference/get_ly_bills.html): Fetch and Parse Legislative Yuan Bills

### Committees

- [`get_ly_committee_meets()`](): Fetch Legislative Yuan Committee Meetings
- [`get_ly_committee_meets()`](#docs/reference/get_ly_committee_meets.html): Fetch Legislative Yuan Committee Meetings

- [`get_ly_committees_type()`](): Fetch and Parse Legislative Yuan Committee Details, Jurisdiction and Codes
- [`get_ly_committees_type()`](#docs/reference/get_ly_committees_type.html): Fetch and Parse Legislative Yuan Committee Details, Jurisdiction and Codes

### Interpellation

- [`get_ly_interpellations()`](): Get Legislative Yuan Interpellation Records
- [`get_ly_interpellations()`](#docs/reference/get_ly_interpellations.html): Get Legislative Yuan Interpellation Records

### IVOD

- [`get_ly_ivod()`](): Get Legislative Yuan IVOD Records
- [`get_ly_ivod()`](#docs/reference/get_ly_ivod.html): Get Legislative Yuan IVOD Records

<br>

Expand Down

0 comments on commit 6ad48ba

Please sign in to comment.