From 90be3de7ebf142cb4065c797f56cc2ea437409a6 Mon Sep 17 00:00:00 2001 From: Gregory Jefferis Date: Sat, 13 Jul 2024 18:34:13 +0100 Subject: [PATCH 1/2] roxygenise --- man/geom_neuron.Rd | 6 +++--- man/ggneuron.Rd | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/man/geom_neuron.Rd b/man/geom_neuron.Rd index 2fd4fa1..391e3b7 100644 --- a/man/geom_neuron.Rd +++ b/man/geom_neuron.Rd @@ -127,9 +127,9 @@ It supports 'neuron', 'neuronlist', and 'mesh3d' objects. \examples{ \dontrun{ library(ggplot2) -ggplot() + geom_neuron(my_neuron) -ggplot() + geom_neuron(my_neuronlist) -ggplot() + geom_neuron(my_mesh) +ggplot() + geom_neuron(nat::Cell07PNs[[1]], root = 10) +ggplot() + geom_neuron(nat::Cell07PNs) +ggplot() + geom_neuron(nat::MBL.surf) } } diff --git a/man/ggneuron.Rd b/man/ggneuron.Rd index e616742..24c16d2 100644 --- a/man/ggneuron.Rd +++ b/man/ggneuron.Rd @@ -57,6 +57,10 @@ ggneuron(banc_neuropil.surf, banc.surf) # Visualize the banc brain neuropil ggneuron(banc_neuropil.surf, rotation_matrix = bancr:::banc_rotation_matrices[["front"]]) + +# See constituents of a neuronlist +ggneuron(nat::Cell07PNs, volume = nat::MBL.surf, +root = 10, high = "red", low = "black") } } From e503d4911abed94e03d58383d40c075b84d79e14 Mon Sep 17 00:00:00 2001 From: Gregory Jefferis Date: Sat, 13 Jul 2024 18:37:22 +0100 Subject: [PATCH 2/2] implement pkgdown --- .github/workflows/pkgdown.yaml | 67 ++++++++++++++++++++++++++++++++++ DESCRIPTION | 5 +-- _pkgdown.yml | 2 + 3 files changed, 71 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/pkgdown.yaml diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml new file mode 100644 index 0000000..d25f876 --- /dev/null +++ b/.github/workflows/pkgdown.yaml @@ -0,0 +1,67 @@ +# 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 + +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 }} + CHUNKEDGRAPH_SECRET: ${{ secrets.CHUNKEDGRAPH_SECRET }} + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + FLYTABLE_TOKEN: ${{ secrets.FLYTABLE_TOKEN }} + RETICULATE_MINICONDA_PYTHON_VERSION: 3.8 + RGL_USE_NULL: TRUE + 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::., catmaid=natverse/rcatmaid + needs: website + + - name: Install fafbseg + python + run: | + pak::local_install() + library(fafbseg) + simple_python() + dr_fafbseg() + shell: Rscript {0} + + - name: writetoken + run: fafbseg::flywire_set_token(token=Sys.getenv("CHUNKEDGRAPH_SECRET")) + shell: Rscript {0} + + - 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/DESCRIPTION b/DESCRIPTION index 04c41f6..0dc9863 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -18,7 +18,7 @@ Description: Access to the BANC 'righty' EM dataset, focussing on support for BANC autosegmentation. Organised as a wrapper around the fafbseg package. License: GPL-3 -URL: https://github.com/flyconnectome/bancr +URL: https://github.com/flyconnectome/bancr, https://flyconnectome.github.io/bancr/ BugReports: https://github.com/flyconnectome/bancr/issues Depends: R (>= 3.5.0), @@ -70,10 +70,9 @@ Remotes: tidyverse/ggplot2, eliocamp/ggnewscale Config/testthat/edition: 3 -LazyDataCompression:xz +LazyDataCompression: xz Encoding: UTF-8 Language: en-GB LazyData: true Roxygen: list(markdown = TRUE) RoxygenNote: 7.3.2 - diff --git a/_pkgdown.yml b/_pkgdown.yml index cb24c84..95edf9d 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -1,4 +1,6 @@ url: https://flyconnectome.github.io/bancr +template: + bootstrap: 5 navbar: structure: left: