Skip to content

Commit 611471a

Browse files
Adding new badge/codecov action
1 parent 790b7ce commit 611471a

2 files changed

Lines changed: 27 additions & 10 deletions

File tree

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Reusable workflow to calculate coverage add it to a badge that is stored on
2+
# a branch in the repo called badges.
3+
# note that this has only been tested to build a badge with the main branch
4+
# coverage; it may not work to calculate coverage from other branches.
5+
name: call-create-cov-badge
6+
# on specifies the build triggers. See more info at https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows
7+
# other option would be to run this on a schedule. Other build trigger options may not work well.
8+
on:
9+
push:
10+
branches:
11+
- main
12+
jobs:
13+
call-workflow:
14+
uses: nmfs-fish-tools/ghactions4r/.github/workflows/create-cov-badge.yml@create-cov-badge # change to main

README.Rmd

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
output: github_document
33
---
44

5+
`[![coverage](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/nmfs-ost/nmfspalette/refs/heads/badges/coverage-badge.json)](https://github.com/nmfs-ost/nmfspalette/tree/badges)`
6+
57
<!-- README.md is generated from README.Rmd. Please edit README.Rmd -->
68

79
```{r, echo = FALSE, warning=FALSE, message=FALSE}
@@ -14,13 +16,13 @@ knitr::opts_chunk$set(
1416
require(ggplot2)
1517
```
1618

17-
# nmfspalette <a href={https:://nmfs-ost.github.io/nmfspalette}><img src="man/figures/logo.png" align="right" width=139 height=139 alt="logo with an image of a fish in multiple palette colors" />
19+
# nmfspalette <a href={https:://nmfs-ost.github.io/nmfspalette}><img src="man/figures/logo.png" alt="logo with an image of a fish in multiple palette colors" align="right" width="139" height="139"/>
1820

1921
An R color palette for `{ggplot2}` using NOAA Fisheries branding colors
2022

2123
[![call-r-cmd-check](https://github.com/nmfs-ost/nmfspalette/actions/workflows/call-r-cmd-check.yml/badge.svg)](https://github.com/nmfs-ost/nmfspalette/actions/workflows/call-r-cmd-check.yml)
2224

23-
**************
25+
------------------------------------------------------------------------
2426

2527
`{nmfspalette}` implements these [steps](https://drsimonj.svbtle.com/creating-corporate-colour-palettes-for-ggplot2) to create a `{ggplot2}` compatible palette according to [NOAA Fisheries branding](https://drive.google.com/file/d/1lXHmfGWCj6pI_Dr3C-Dwcnf1pXOIOztp/view?usp=sharing) (NOAA internal only).
2628

@@ -39,13 +41,14 @@ library(nmfspalette)
3941
```
4042

4143
## Contributing
42-
We welcome contributions to `{nmfspalette}`. You are welcome to make any changes you would like on a fork and submit a pull request. For more substantial changes or to create a branch, please contact sophie.breitbart@noaa.gov (NOAA Affiliates only). We ask that all contributors adhere to The NOAA Fisheries Integrated Toolbox [code of conduct](https://github.com/nmfs-fish-tools/Resources/blob/main/CONTRIBUTING.md).
4344

45+
We welcome contributions to `{nmfspalette}`. You are welcome to make any changes you would like on a fork and submit a pull request. For more substantial changes or to create a branch, please contact [sophie.breitbart\@noaa.gov](mailto:sophie.breitbart@noaa.gov){.email} (NOAA Affiliates only). We ask that all contributors adhere to The NOAA Fisheries Integrated Toolbox [code of conduct](https://github.com/nmfs-fish-tools/Resources/blob/main/CONTRIBUTING.md).
46+
47+
## Usage
4448

45-
## Usage
4649
To learn how to use `nmfspalette`, please check out the [interactive `learnr` tutorial](https://connect.fisheries.noaa.gov/colors/).
4750

48-
Extract an interpolated color palette from the default "oceans" palette.
51+
Extract an interpolated color palette from the default "oceans" palette.
4952

5053
You can change the number of colors (10 shown below).
5154

@@ -191,14 +194,14 @@ ggplot(faithfuld, aes(waiting, eruptions)) +
191194
scale_fill_nmfs(palette = "crustacean", discrete = FALSE, reverse = TRUE)
192195
```
193196

194-
**************
197+
------------------------------------------------------------------------
195198

196199
## Disclaimer
197200

198201
“The United States Department of Commerce (DOC) GitHub project code is provided on an ‘as is’ basis and the user assumes responsibility for its use. DOC has relinquished control of the information and no longer has responsibility to protect the integrity, confidentiality, or availability of the information. Any claims against the Department of Commerce stemming from the use of its GitHub project will be governed by all applicable Federal law. Any reference to specific commercial products, processes, or services by service mark, trademark, manufacturer, or otherwise, does not constitute or imply their endorsement, recommendation or favoring by the Department of Commerce. The Department of Commerce seal and logo, or the seal and logo of a DOC bureau, shall not be used in any manner to imply endorsement of any commercial product or activity by DOC or the United States Government.”
199202

200-
***** *******
201-
<a href="https://www.fisheries.noaa.gov/"><img src="man/figures/noaa-fisheries-rgb-2line-horizontal-small.png" height=75 alt="NOAA Fisheries" />
203+
------------------------------------------------------------------------
204+
205+
<a href="https://www.fisheries.noaa.gov/"><img src="man/figures/noaa-fisheries-rgb-2line-horizontal-small.png" alt="NOAA Fisheries" height="75"/>
202206

203-
204-
[U.S. Department of Commerce](https://www.commerce.gov/) | [National Oceanographic and Atmospheric Administration](https://www.noaa.gov) | [NOAA Fisheries](https://www.fisheries.noaa.gov/)
207+
[U.S. Department of Commerce](https://www.commerce.gov/) \| [National Oceanographic and Atmospheric Administration](https://www.noaa.gov) \| [NOAA Fisheries](https://www.fisheries.noaa.gov/)

0 commit comments

Comments
 (0)