Skip to content

Commit

Permalink
migrate to Quarto qmd #266
Browse files Browse the repository at this point in the history
  • Loading branch information
bbest committed Sep 5, 2024
1 parent cf07a9a commit 4aa0d39
Show file tree
Hide file tree
Showing 56 changed files with 4,152 additions and 4,186 deletions.
Empty file removed .Rhistory
Empty file.
130 changes: 0 additions & 130 deletions .github/workflows/deploy_bookdown.yml

This file was deleted.

73 changes: 73 additions & 0 deletions .github/workflows/render_book.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Render Quarto book

on:
push:
branches:
- main
workflow_dispatch:

jobs:
bookdown:
name: Render & publish Quarto book
runs-on: macOS-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
submodules: 'recursive'

- name: Install Quarto
uses: quarto-dev/quarto-actions/setup@v2
with:
tinytex: true # for pdf

- name: Install librsvg (svg for pdf)
run: brew install librsvg

- name: Install R
uses: r-lib/actions/setup-r@v2
with:
r-version: '4.4.1' # 2024-09-04

- name: Install R dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: 2

- name: Render and Publish
# TODO: `quarto publish gh-pages` https://quarto.org/docs/publishing/github-pages.html#publishing
uses: quarto-dev/quarto-actions/publish@v2
with:
target: gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}



# Need to first create an empty gh-pages branch
# see https://pkgdown.r-lib.org/reference/deploy_site_github.html
# and also add secrets for a GH_PAT and EMAIL to the repository
# gh-action from Cecilapp/GitHub-Pages-deploy

checkout-and-deploy:
runs-on: ubuntu-latest
needs: bookdown

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

steps:
- name: Checkout
uses: actions/checkout@master

- name: Download artifact
uses: actions/download-artifact@v4
with:
# Artifact name
name: _book # optional
# Destination path
path: 'bio-data-guide/docs' # see _bookdown.yml: output_dir


8 changes: 5 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/bio-data-guide/docs
/bio-data-guide/bio-data-guide.rds
.Rproj.user
/_book
.Rproj.user
/.quarto/
.DS_Store
.Rhistory
File renamed without changes.
24 changes: 23 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,26 @@ Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.2
Imports:
bookdown
bookdown,
dm,
glue,
here,
httr,
leaflet,
librarian,
lubridate,
mapdata,
obistools (>= 0.1.0),
rmarkdown,
rnoaa (>= 1.4.0),
sf,
stringr,
terra,
tidync,
vroom,
worms,
worrms,
xfun
Remotes:
ropensci/rnoaa,
iobis/obistools
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# BioDataGuide

Hello and welcome to the Darwin Core Marine Example Compendium! (We're calling it the BioDataGuide for short.) Here, we document relevant resources and standards
which apply to various marine biological data types. This is a growing guide that is put together by scientists and
data managers responsible for transforming their data to meet international standards.

This guide is meant for data managers, scientists, or technicians new to transforming/publishing/mobilizing data.
There is a general introduction to the world of international data integration, followed by some specific examples of
data transformations.

To contribute to this guide see (CONTRIBUTING.md)[https://github.com/ioos/bio_data_guide/blob/master/Standardizing%20Marine%20Biological%20Data/CONTRIBUTING.md]

# Standardizing Marine Biological Data Working Group (SMBD)

## Purpose
Expand Down Expand Up @@ -96,7 +108,7 @@ This is a work in progress, a growing guide that is being put together by scient
The Guide is exported into multiple formats, including a [pdf](https://github.com/ioos/bio_data_guide/raw/gh-pages/darwin-core-guide.pdf) and an [epub](https://github.com/ioos/bio_data_guide/raw/gh-pages/darwin-core-guide.epub) document.
Chapters are written in R Markdown files; [contributions are welcome!](https://github.com/ioos/bio_data_guide/blob/main/CONTRIBUTING.md)

Technical details of how to work with the book can be found in [`/building-the-data-guide.md`](https://github.com/ioos/bio_data_guide/blob/main/building-the-guide.md).
Technical details of how to work with the book can be found in [`/refs/building-the-data-guide.md`](https://github.com/ioos/bio_data_guide/blob/main/refs/building-the-guide.md).

<!--
Expand Down
65 changes: 65 additions & 0 deletions _quarto.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
project:
type: book
pre-render: lib/pre-render.R
output-dir: _book
resources:
- "/.nojekyll"

book:
title: "BioDataGuide"
subtitle: "Darwin Core Marine Example Compendium"
description: "Scaling multiple dimensions of diversity in biological data"
author:
- "By: [Standardizing Marine Biological Data Working Group](https://github.com/ioos/bio_data_guide/graphs/contributors)"
- "![](figs/contrib.rocks.svg)"
date: today
date-format: "YYYY-MM-DD"
site-url: https://ioos.github.io/bio_data_guide/
repo-url: https://github.com/ioos/bio_data_guide/
repo-actions: [edit]
downloads: [pdf, docx, epub]
sharing: [twitter, facebook, linkedin]
# google-analytics: "G-V3HZN14Z8G" # TODO: add Google Analytics
search: true
page-navigation: true
chapters:
- index.qmd
- intro.qmd
- part: apps.qmd
chapters:
- datasets/TPWD_HARC_BagSeine/TPWD_HARC_BagSeine_OBISENV.qmd
- datasets/hakai_salmon_data/salmon-darwin-core-remap.qmd
- datasets/hakai_seagrass_data/hakaiSeagrassToDWC.qmd
- datasets/trawl_catch_data/trawl-catch-data.qmd
- datasets/dataset-edna/README.md
- datasets/atn_satellite_telemetry/atn_satellite_telemetry_netCDF2DwC.qmd
appendices:
- faq.qmd
- tools.qmd
- extras.qmd
- references.qmd

bibliography: ["lib/book.bib", "lib/packages.bib", "lib/OBIS_data_examples.bib"]
bibliographystyle: apa
link-citations: true

format:
html:
theme: cosmo
css: lib/style.css
toc: true
number-sections: true
pdf:
documentclass: scrreprt
# keep-tex: true # for debugging
include-in-header: lib/preamble.tex
nocite: |
@*
docx:
toc: true
number-sections: true
highlight-style: github
epub: default



6 changes: 6 additions & 0 deletions apps.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Applications

This chapter contains a series of example applications to convert source data to the Darwin Core standard. You can find
these examples (and more!) in the GitHub repository under the [`datasets/`](https://github.com/ioos/bio_data_guide/tree/main/datasets)
directory.

11 changes: 0 additions & 11 deletions bio-data-guide/02-application.Rmd

This file was deleted.

5 changes: 0 additions & 5 deletions bio-data-guide/06-references.Rmd

This file was deleted.

13 changes: 0 additions & 13 deletions bio-data-guide/README.md

This file was deleted.

7 changes: 0 additions & 7 deletions bio-data-guide/_bookdown.yml

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 4aa0d39

Please sign in to comment.