diff --git a/.Rbuildignore b/.Rbuildignore index dc32489..9f208b4 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -20,3 +20,4 @@ ^\.github$ ^CRAN-SUBMISSION$ ^LICENSE\.md$ +^_pkgdown\.yml$ diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml new file mode 100644 index 0000000..4bbce75 --- /dev/null +++ b/.github/workflows/pkgdown.yaml @@ -0,0 +1,50 @@ +# 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] + release: + types: [published] + workflow_dispatch: + +name: pkgdown.yaml + +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@v4 + + - uses: r-lib/actions/setup-pandoc@v2 + + - uses: r-lib/actions/setup-r@v2 + with: + use-public-rspm: true + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: any::pkgdown, local::. + needs: website + + - name: Build site + run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE) + shell: Rscript {0} + + - name: Deploy to GitHub pages 🚀 + if: github.event_name != 'pull_request' + uses: JamesIves/github-pages-deploy-action@v4.5.0 + with: + clean: false + branch: gh-pages + folder: docs diff --git a/.gitignore b/.gitignore index edc9c2d..d8f22de 100644 --- a/.gitignore +++ b/.gitignore @@ -51,3 +51,4 @@ po/*~ # RStudio Connect folder rsconnect/ .Rproj.user +docs diff --git a/DESCRIPTION b/DESCRIPTION index e1f949d..ccc4be1 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,14 +1,14 @@ Package: easylayout -Title: What the Package Does (One Line, Title Case) +Title: An R package for interactive force-directed layouts within RStudio Version: 0.0.0.9000 Authors@R: - person("First", "Last", , "first.last@example.com", role = c("aut", "cre"), - comment = c(ORCID = "YOUR-ORCID-ID")) -Description: What the package does (one paragraph). + person("Danilo", "Imparato", email= "first.last@example.com", role = c("aut", "cre"), + comment = c(ORCID = "0000-0001-6979-4951")) +Description: easylayout is an R package that seamlessly bridges manipulation and visualization by leveraging the user’s IDE itself (e.g., RStudio, VSCode). License: MIT + file LICENSE Encoding: UTF-8 Roxygen: list(markdown = TRUE) -RoxygenNote: 7.3.2 +RoxygenNote: 7.3.2.9000 Imports: digest, dplyr, @@ -18,3 +18,5 @@ Imports: Suggests: testthat (>= 3.0.0) Config/testthat/edition: 3 +URL: https://dalmolingroup.github.io/easylayout/ +BugReports: https://github.com/dalmolingroup/easylayout/issues diff --git a/R/easylayout-package.R b/R/easylayout-package.R index 5444c7d..c74d9ed 100644 --- a/R/easylayout-package.R +++ b/R/easylayout-package.R @@ -15,7 +15,7 @@ #' itself. #' #' @docType package -#' @name easylayout +#' @name easylayout-package #' @keywords internal "_PACKAGE" diff --git a/_pkgdown.yml b/_pkgdown.yml new file mode 100644 index 0000000..ef73310 --- /dev/null +++ b/_pkgdown.yml @@ -0,0 +1,8 @@ +url: https://dalmolingroup.github.io/easylayout/ +template: + bootstrap: 5 + bslib: + primary: "#0054AD" + border-radius: 0.5rem + btn-border-radius: 0.25rem + danger: "#A6081A" diff --git a/easylayout.Rproj b/easylayout.Rproj index 38b9011..69fafd4 100644 --- a/easylayout.Rproj +++ b/easylayout.Rproj @@ -1,22 +1,22 @@ -Version: 1.0 - -RestoreWorkspace: No -SaveWorkspace: No -AlwaysSaveHistory: Default - -EnableCodeIndexing: Yes -UseSpacesForTab: Yes -NumSpacesForTab: 2 -Encoding: UTF-8 - -RnwWeave: Sweave -LaTeX: pdfLaTeX - -AutoAppendNewline: Yes -StripTrailingWhitespace: Yes -LineEndingConversion: Posix - -BuildType: Package -PackageUseDevtools: Yes -PackageInstallArgs: --no-multiarch --with-keep.source -PackageRoxygenize: rd,collate,namespace +Version: 1.0 + +RestoreWorkspace: No +SaveWorkspace: No +AlwaysSaveHistory: Default + +EnableCodeIndexing: Yes +UseSpacesForTab: Yes +NumSpacesForTab: 2 +Encoding: UTF-8 + +RnwWeave: Sweave +LaTeX: pdfLaTeX + +AutoAppendNewline: Yes +StripTrailingWhitespace: Yes +LineEndingConversion: Posix + +BuildType: Package +PackageUseDevtools: Yes +PackageInstallArgs: --no-multiarch --with-keep.source +PackageRoxygenize: rd,collate,namespace diff --git a/man/easylayout-package.Rd b/man/easylayout-package.Rd new file mode 100644 index 0000000..06e21c2 --- /dev/null +++ b/man/easylayout-package.Rd @@ -0,0 +1,33 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/easylayout-package.R +\docType{package} +\name{easylayout-package} +\alias{easylayout-package} +\title{easylayout: Publication-Ready Networks Directly in your IDE} +\description{ +The \code{easylayout} package seamlessly bridges manipulation and visualization +by leveraging the user’s IDE itself (e.g., RStudio, VSCode). It is not yet +another visualization library, but instead aims to interconnect existing +libraries and streamline their usage into the R ecosystem. Easylayout takes +an igraph object and serializes it into a web application integrated with +the IDE’s interface through a Shiny server. The web application lays out the +network by simulating attraction and repulsion forces. Simulation parameters +can be adjusted in real-time. An editing mode allows moving and rotating +nodes. The implementation aims for performance, so that even lower-end +devices are able to work with relatively large networks. Once the user +finishes tinkering the layout, it is sent back to the R session to be +plotted through popular libraries like ggplot2 or even the base package +itself. +} +\seealso{ +Useful links: +\itemize{ + \item \url{https://dalmolingroup.github.io/easylayout/} +} + +} +\author{ +\strong{Maintainer}: Danilo Imparato \email{first.last@example.com} (\href{https://orcid.org/0000-0001-6979-4951}{ORCID}) + +} +\keyword{internal} diff --git a/man/easylayout.Rd b/man/easylayout.Rd index f240618..eed7a2b 100644 --- a/man/easylayout.Rd +++ b/man/easylayout.Rd @@ -1,8 +1,6 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/app.R, R/easylayout-package.R -\docType{package} +% Please edit documentation in R/app.R \name{easylayout} -\alias{easylayout-package} \alias{easylayout} \title{Layout an igraph object using easylayout's web application.} \usage{ @@ -24,20 +22,6 @@ can be adjusted in real-time. An editing mode allows moving and rotating nodes. Once the user finishes tinkering the layout, it is sent back to the R session to be plotted through popular libraries like ggplot2 or even the base package itself. - -The \code{easylayout} package seamlessly bridges manipulation and visualization -by leveraging the user’s IDE itself (e.g., RStudio, VSCode). It is not yet -another visualization library, but instead aims to interconnect existing -libraries and streamline their usage into the R ecosystem. Easylayout takes -an igraph object and serializes it into a web application integrated with -the IDE’s interface through a Shiny server. The web application lays out the -network by simulating attraction and repulsion forces. Simulation parameters -can be adjusted in real-time. An editing mode allows moving and rotating -nodes. The implementation aims for performance, so that even lower-end -devices are able to work with relatively large networks. Once the user -finishes tinkering the layout, it is sent back to the R session to be -plotted through popular libraries like ggplot2 or even the base package -itself. } \examples{ \dontrun{ @@ -47,8 +31,3 @@ g <- easylayout(g) plot(g) } } -\author{ -\strong{Maintainer}: First Last \email{first.last@example.com} (\href{https://orcid.org/YOUR-ORCID-ID}{ORCID}) - -} -\keyword{internal}