-
Notifications
You must be signed in to change notification settings - Fork 14
Reorganize shinychat
into a monorepo
#56
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
Conversation
```r links <- c( "https://posit-dev.github.io/shinychat/authors.html", "https://posit-dev.github.io/shinychat/LICENSE-text.html", "https://posit-dev.github.io/shinychat/LICENSE.html", "https://posit-dev.github.io/shinychat/news/index.html", "https://posit-dev.github.io/shinychat/reference/chat_append.html", "https://posit-dev.github.io/shinychat/reference/chat_ui.html", "https://posit-dev.github.io/shinychat/reference/index.html" ) links <- sub("https://posit-dev.github.io/shinychat/", "", links) template <- r"---( <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Redirect</title> <script type="text/javascript"> var redirects = {"":"{{redirect}}"}; var hash = window.location.hash.startsWith('#') ? window.location.hash.slice(1) : window.location.hash; var redirect = redirects[hash] || redirects[""] || "/"; window.document.title = 'Redirect to ' + redirect; window.location.replace(redirect); </script> </head> <body> </body> </html> )---" dirs <- fs::path_dir(links) dirs <- unique(dirs[dirs != "."]) dirs <- fs::path("docs", dirs) fs::dir_create(dirs) htmls <- glue::glue( template, redirect = file.path("r", links), .open = "{{", .close = "}}" ) purrr::walk2(links, htmls, function(from, html) { writeLines(html, fs::path("docs", from)) }) ```
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.
Sorry for the delayed comments...
"jsx", | ||
"tsx" | ||
], | ||
"quarto.path": "~/.local/share/qvm/versions/v1.7.31/bin/quarto", |
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.
This feels off
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.
Yeah this is tricky because qvm
is the best thing around but also isn't being developed or maintained.
The idea here is that the Quarto version used in the project is controlled with the QUARTO_VERSION
string in the Makefile
. To update the Quarto version, you change that string and call make install-quarto
, which uses qvm
to install the desired version of Quarto and updates the GitHub Actions files AND the VS Code settings so that everyone uses the same version of Quarto.
Unfortunately, qvm
doesn't give you a way to control where the quarto
binary is installed, or we'd use a local folder. I also don't really want to go write code to download and install quarto since that's basically covered by qvm
, so we're kind of stuck here.
It also means that in CI, we install quarto
but can't use make docs
and have to rely on quarto render ...
, which is annoying but not the worst thing ever.
* main: chore(r): Fix readme logo chore: Update new R package link chore: add recommended extensions chore: fix logo chore: Add a README chore: remove unused scripts ci(quartodoc): Builds API docs in CI docs: metadata on index/404 pages docs: Add custom 404 page docs: Remove redirects docs: Fixup redirects ci(pkgdown): Run when `pkgdown.yaml` changes ci(docs): Need `contents: write` permissions ci(quartodoc): Needs read permissions ci(quartodoc): Use `quarto` binary to render quarto in CI ci(verify-js-built): Only check if JS files change ci(quartodoc): Just install all extras here too Reorganize `shinychat` into a monorepo (#56)
Collecting the web assets, R & Python packages, and docs into a single repo
The scope of this PR is to bring everything together in one place. That encompasses:
pkg-r/
js/
pkg-py/
shiny.ui.Chat
→shinychat.Chat
shiny.ui.chat_ui()
→shinychat.chat_ui()
shiny.express.ui.Chat
→shinychat.express.Chat
shiny.playwright.controller.Chat
→shinychat.playwright.ChatController
docs/r
with pkgdowndocs/py
with quartodocdocs/index.html
is a static splash page for shinychat that directs people to the right docs page.In follow-up PRs we'll work on paring down features of shinychat for Python.
TODO