-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from r-quantities/codata2018
close #6: update to version 8.1
- Loading branch information
Showing
23 changed files
with
664 additions
and
489 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
^.*\.gcda$ | ||
^.*\.gcno$ | ||
^.*\.gcov$ | ||
csv | ||
wdir | ||
.gitmodules | ||
.gitignore | ||
.git | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
on: [push, pull_request] | ||
|
||
name: build | ||
|
||
jobs: | ||
build: | ||
if: ${{ !contains(github.event.head_commit.message, '[ci skip]') }} | ||
runs-on: ${{ matrix.config.os }} | ||
name: ${{ matrix.config.os }} (${{ matrix.config.r }}) | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
config: | ||
- {os: macOS-latest, r: 'devel'} | ||
- {os: macOS-latest, r: 'release'} | ||
- {os: windows-latest, r: 'release'} | ||
- {os: ubuntu-latest, r: 'release', covr: 'yes'} | ||
- {os: ubuntu-latest, r: 'oldrel'} | ||
|
||
env: | ||
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true | ||
_R_CHECK_CRAN_INCOMING_REMOTE_: false | ||
|
||
steps: | ||
- name: Configure git | ||
if: ${{ runner.os == 'Windows' }} | ||
run: git config --global core.autocrlf false | ||
|
||
- uses: actions/checkout@v2 | ||
- uses: r-lib/actions/setup-r@v1 | ||
with: | ||
r-version: ${{ matrix.config.r }} | ||
- uses: r-lib/actions/setup-pandoc@v1 | ||
|
||
- name: Query dependencies | ||
run: | | ||
install.packages('remotes') | ||
saveRDS(remotes::dev_package_deps(dependencies=TRUE), ".github/depends.Rds", version=2) | ||
shell: Rscript {0} | ||
|
||
- name: Cache R packages | ||
if: ${{ runner.os != 'Windows' }} | ||
uses: actions/cache@v1 | ||
with: | ||
path: ${{ env.R_LIBS_USER }} | ||
key: ${{ matrix.config.os }}-r-${{ matrix.config.r }}-1-${{ hashFiles('.github/depends.Rds') }} | ||
restore-keys: ${{ matrix.config.os }}-r-${{ matrix.config.r }}-1- | ||
|
||
- name: Install Linux dependencies | ||
if: ${{ runner.os == 'Linux' }} | ||
run: sudo apt-get install devscripts libcurl4-openssl-dev libudunits2-dev | ||
|
||
- name: Install macOS dependencies | ||
if: ${{ runner.os == 'macOS' }} | ||
run: brew install automake udunits | ||
|
||
- name: Install dependencies | ||
run: | | ||
remotes::install_deps(dependencies=TRUE) | ||
remotes::install_cran(c("rcmdcheck", "covr")) | ||
shell: Rscript {0} | ||
|
||
- name: Check | ||
run: | | ||
rcmdcheck::rcmdcheck(args=c("--no-manual", "--as-cran"), | ||
error_on="warning", check_dir="check") | ||
shell: Rscript {0} | ||
|
||
- name: Upload check results | ||
if: ${{ failure() }} | ||
uses: actions/upload-artifact@master | ||
with: | ||
name: ${{ matrix.config.os }}-r${{ matrix.config.r }}-results | ||
path: check | ||
|
||
- name: Test coverage | ||
if: ${{ success() && matrix.config.covr == 'yes' }} | ||
run: covr::codecov() | ||
shell: Rscript {0} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
on: | ||
release: | ||
types: [published, edited] | ||
|
||
name: pkgdown | ||
|
||
jobs: | ||
pkgdown: | ||
runs-on: macOS-latest | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: r-lib/actions/setup-r@v1 | ||
- uses: r-lib/actions/setup-pandoc@v1 | ||
|
||
- name: Install macOS dependencies | ||
run: brew install automake udunits | ||
|
||
- name: Install dependencies | ||
run: | | ||
install.packages("remotes", type="binary") | ||
remotes::install_deps(dependencies=TRUE, type="binary") | ||
install.packages("pkgdown", type="binary") | ||
shell: Rscript {0} | ||
|
||
- name: Install package | ||
run: R CMD INSTALL . | ||
|
||
- name: Deploy site | ||
run: pkgdown::deploy_to_branch(new_process=FALSE) | ||
shell: Rscript {0} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
.Rproj.user | ||
.Rhistory | ||
.RData | ||
wdir/tmp | ||
|
||
# Compiled Object files | ||
*.slo | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
Package: constants | ||
Type: Package | ||
Title: Reference on Constants, Units and Uncertainty | ||
Version: 0.0.2.9000 | ||
Version: 1.0.0 | ||
Authors@R: c( | ||
person("Iñaki", "Ucar", email="[email protected]", | ||
role=c("aut", "cph", "cre"), comment=c(ORCID="0000-0001-6403-5550"))) | ||
Description: CODATA internationally recommended values of the fundamental physical | ||
constants, provided as symbols for direct use within the R language. Optionally, | ||
the values with errors and/or the values with units are also provided if the | ||
'errors' and/or the 'units' packages are installed. The Committee on Data | ||
for Science and Technology (CODATA) is an interdisciplinary committee of the | ||
International Council for Science which periodically provides the internationally | ||
accepted set of values of the fundamental physical constants. This package | ||
contains the "2014 CODATA" version, published on 25 June 2015: | ||
Mohr, P. J., Newell, D. B. and Taylor, B. N. (2016) | ||
<DOI:10.1103/RevModPhys.88.035009>, <DOI:10.1063/1.4954402>. | ||
Description: CODATA internationally recommended values of the fundamental | ||
physical constants, provided as symbols for direct use within the R language. | ||
Optionally, the values with uncertainties and/or units are also provided if | ||
the 'errors', 'units' and/or 'quantities' packages are installed. | ||
The Committee on Data for Science and Technology (CODATA) is an | ||
interdisciplinary committee of the International Council for Science which | ||
periodically provides the internationally accepted set of values of the | ||
fundamental physical constants. This package contains the "2018 CODATA" | ||
version, published on May 2019: | ||
Eite Tiesinga, Peter J. Mohr, David B. Newell, and Barry N. Taylor (2020) | ||
<http://physics.nist.gov/constants>. | ||
License: MIT + file LICENSE | ||
Encoding: UTF-8 | ||
LazyData: true | ||
URL: https://github.com/r-quantities/constants | ||
BugReports: https://github.com/r-quantities/constants/issues | ||
Depends: R (>= 3.0.0) | ||
Imports: utils | ||
Suggests: errors, units, testthat | ||
Depends: R (>= 3.5.0) | ||
Suggests: errors (>= 0.3.6), units, quantities, testthat | ||
ByteCompile: yes | ||
RoxygenNote: 6.0.1 | ||
RoxygenNote: 7.1.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
YEAR: 2017-2018 | ||
YEAR: 2017-2020 | ||
COPYRIGHT HOLDER: Iñaki Ucar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,5 @@ | |
export(lookup) | ||
export(syms) | ||
export(syms_with_errors) | ||
export(syms_with_quantities) | ||
export(syms_with_units) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,36 @@ | ||
# constants 0.0.2 | ||
# constants 1.0.0 | ||
|
||
Update to version 8.1, the 2018 CODATA recommended values (#7 addressing #6). | ||
This version contains some breaking changes that are necessary to streamline | ||
future updates and provide a stable symbol table: | ||
|
||
- The `codata` table includes the absolute uncertainty instead of the relative | ||
one. Thus, the `rel_uncertainty` column has been dropped in favour of the new | ||
`uncertainty`. Also, columns have been slightly reordered. | ||
- Symbol names for constants have changed. The old ones were hand-crafted and | ||
thus unmanageable. This release adopts the ASCII symbols defined by NIST in | ||
their webpage, except for those that collide with some base R function. In | ||
particular, there are two cases: `c`, the speed of light, has been renamed as | ||
`c0`; `sigma`, the Stefan-Boltzmann constant, has been renamed as `sigma0`. | ||
- Constant types, or categories, (column `codata$type`) adopts the names defined | ||
by NIST in the webpage too. Some constants belong to more than one category | ||
(separated by comma); some others belong to no category (missing type). | ||
|
||
## Minor changes and fixes: | ||
There are some new features too: | ||
|
||
* Use `units::as_units()` instead of the deprecated `units::parse_unit()` (#1). | ||
* Install the speed of light as a unit (#2). | ||
* Unitless constants now show a `1` instead of `unitless` as unit (#3). | ||
* Unit `Ω` has been replaced by `ohm` (#4). | ||
- In addition to the `codata` data frame, this release includes `codata.cor`, a | ||
correlation matrix for all the constants. | ||
- In addition to `syms_with_errors` and `syms_with_units`, there is a new list | ||
of symbols called `syms_with_quantities` (available if the optional | ||
`quantities` package is installed), which provides constant values with | ||
uncertainty **and** units. | ||
- Experimental support for correlated values in `syms_with_errors` and | ||
`syms_with_quantities` is provided (disabled by default; see details in | ||
`help(syms)` for activation instructions). | ||
|
||
# constants 0.0.2 | ||
|
||
- Use `units::as_units()` instead of the deprecated `units::parse_unit()` (#1). | ||
- Install the speed of light as a unit (#2). | ||
- Unitless constants now show a `1` instead of `unitless` as unit (#3). | ||
- Unit `Ω` has been replaced by `ohm` (#4). |
Oops, something went wrong.