Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #347

Merged
merged 58 commits into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
235999e
Added handling of duplicates to ReadLanding
Aug 27, 2023
16b117a
Relaxed intercatch parser to accept more variants. Adressing #297
Aug 28, 2023
e93ba10
Fixed issue with too early return for ReadLandings with duplicates
Aug 28, 2023
aa33e9a
Added duplicate checking to convertLandings
Aug 28, 2023
36830b4
Added skeleton for PrepareNmdBioticTable
Aug 29, 2023
f9f349e
Implemented PrepareNmdBioticTable
Aug 29, 2023
e6100d5
Drafted vignette for working with biotic data
Sep 7, 2023
d9dbddc
Fixed DESCRIPTION field for vignette
Sep 8, 2023
09bbc52
Added dataset documentation for ecosystemsurvey_example
Sep 8, 2023
7f7b424
changed vignette builder
Sep 8, 2023
baa1afa
changed vignette builder
Sep 8, 2023
b34ed6b
merge
Sep 8, 2023
4e9e63e
fixed some typos
Sep 11, 2023
157e7fd
merged with develop
Oct 15, 2023
6b87428
merge with develop
Oct 15, 2023
9d1b371
Allowed source building for dependencies when necessary
Oct 15, 2023
c74f99b
Updated news and description to prep for a pre-release
Oct 15, 2023
1d1544e
force source when binary did not succeed
Oct 15, 2023
614e058
issue with big sur seems to be solved with CRAN drat now. Attempting …
Oct 15, 2023
5838078
Cleaned up check-full some
Oct 15, 2023
ce938cf
Try adding brew update as in FDA wf
Oct 16, 2023
9c3a2d2
Try explicitly adding install of evaluate.
Oct 17, 2023
8bd6799
Merge pull request #337 from StoXProject/fixesAug23ef
edvinf Oct 27, 2023
7333088
added ICESdatsusc function (not finnished) and WriteICESdatsus
sindrevatnehol Oct 30, 2023
253e64a
uodated datsusc mapping
sindrevatnehol Nov 3, 2023
042f7ec
Version 1.10.2-9002, see NEWS.md.
arnejohannesholmin Nov 6, 2023
dfbb21e
Fixed conflicts.
arnejohannesholmin Nov 6, 2023
713d6e0
Added install knitr in check-full.yaml.
arnejohannesholmin Nov 6, 2023
af6556a
No need to install from the repos in check-full.yaml, as RstoxData is…
arnejohannesholmin Nov 6, 2023
bf36099
Adding install udunits in check-full.yaml as units fails on R 4.0 and…
arnejohannesholmin Nov 7, 2023
e018362
Merge pull request #341 from StoXProject/removesp
arnejohannesholmin Nov 7, 2023
ef95273
Building package source and binary also on develop in check-full.yaml.
arnejohannesholmin Nov 7, 2023
99b91d9
Merge pull request #342 from StoXProject/removesp
arnejohannesholmin Nov 7, 2023
ce39a31
Fixing bug where develop deployed to testingRepo and not unstableRepo…
arnejohannesholmin Nov 7, 2023
fd843ed
Merge pull request #343 from StoXProject/removesp
arnejohannesholmin Nov 7, 2023
f9f70b4
Moved StoxDateTimeFormat from RstoxFramework to RstoxData.
arnejohannesholmin Nov 7, 2023
f01223a
Merge pull request #344 from StoXProject/removesp
arnejohannesholmin Nov 8, 2023
c4d06da
finalising DATSUSC function
sindrevatnehol Nov 14, 2023
0b81955
Minor update to the check-full.yaml.
arnejohannesholmin Nov 14, 2023
635a678
Adding special install of stringi in check-full.yaml.
arnejohannesholmin Nov 14, 2023
ad4eebc
Fixing special install of stringi in check-full.yaml.
arnejohannesholmin Nov 14, 2023
4aa71e0
Fixing again special install of stringi in check-full.yaml.
arnejohannesholmin Nov 14, 2023
14ac747
copyed several DATRAS function and made them to DATSUSC function
sindrevatnehol Nov 16, 2023
6f5149d
fixing a small bug
sindrevatnehol Nov 16, 2023
636d7e6
Removed R 3.6, 4.0 and 4.1 on Windows due to stringi failure.
arnejohannesholmin Nov 17, 2023
a607526
Merge pull request #346 from StoXProject/removesp
arnejohannesholmin Nov 17, 2023
7ba83c4
Removed R 4.0 on Mac due to fail in Install system dependencies on ma…
arnejohannesholmin Nov 23, 2023
927d8f2
Merge pull request #348 from StoXProject/removesp
arnejohannesholmin Nov 23, 2023
e1da511
Added rm '/usr/local/bin/2to3' in check-full.yaml.
arnejohannesholmin Nov 23, 2023
c788051
Added rm '/usr/local/bin/2to3-3.11' in check-full.yaml.
arnejohannesholmin Nov 23, 2023
6fb8d4b
Merge pull request #349 from StoXProject/removesp
arnejohannesholmin Nov 23, 2023
00279c8
Added all rm on macOS in check-full.yaml.
arnejohannesholmin Nov 23, 2023
72059c2
Added all rm on macOS in check-full.yaml.
arnejohannesholmin Nov 23, 2023
0ae9405
Merge pull request #350 from StoXProject/removesp
arnejohannesholmin Nov 23, 2023
2b97cf6
Fixed conflicts.
arnejohannesholmin Nov 23, 2023
d9cc48c
Fixed conflicts 2.
arnejohannesholmin Nov 23, 2023
bf22c7a
Minor.
arnejohannesholmin Nov 23, 2023
5d129b8
Merge pull request #345 from StoXProject/datsusc
arnejohannesholmin Nov 23, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
187 changes: 138 additions & 49 deletions .github/workflows/check-full.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,41 @@ on:
push:
branches:
- master
- testing
- develop
pull_request:
branches:
- master
- testing
- develop

name: R-CMD-check

jobs:
R-CMD-check:

# 0. Define the systems to run on:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

# We include 'release' in order to always test the altest release, but mac and Windows binaries are not deployed to the drat repo:
strategy:
fail-fast: false
matrix:
config:
- {os: macOS-latest, r: 'release', pkgext: '.tgz'}
- {os: macOS-latest, r: '4.3', pkgext: '.tgz'}
- {os: macOS-latest, r: '4.3', pkgext: '.tgz'}
- {os: macOS-latest, r: '4.2', pkgext: '.tgz'}
- {os: macOS-latest, r: '4.1', pkgext: '.tgz'}
- {os: macOS-latest, r: '4.0', pkgext: '.tgz'}
# - {os: macOS-latest, r: '4.0', pkgext: '.tgz'} # Failing in Install system dependencies on macOS
# Disccarded due to the following missing packages on Mac for R 3.6: tinytest, Rcpp, xml2, units, stringi, data.table:
#- {os: macOS-latest, r: '3.6', pkgext: '.tgz'}
- {os: windows-latest, r: 'release', pkgext: '.zip'}
- {os: windows-latest, r: '4.3', pkgext: '.zip'}
- {os: windows-latest, r: '4.2', pkgext: '.zip'}
- {os: windows-latest, r: '4.1', pkgext: '.zip'}
- {os: windows-latest, r: '4.0', pkgext: '.zip', rspm: "https://cloud.r-project.org"}
- {os: windows-latest, r: '3.6', pkgext: '.zip', rspm: "https://cloud.r-project.org"}
# - {os: windows-latest, r: '4.1', pkgext: '.zip'} # Disabled due to stringi failure
# - {os: windows-latest, r: '4.0', pkgext: '.zip', rspm: "https://cloud.r-project.org"} # Disabled due to stringi failure
# - {os: windows-latest, r: '3.6', pkgext: '.zip', rspm: "https://cloud.r-project.org"} # Disabled due to stringi failure
- {os: ubuntu-latest, r: 'release', pkgext: '.tar.gz', rspm: "https://cloud.r-project.org"}
- {os: ubuntu-20.04, r: '4.3', pkgext: '.tar.gz', rspm: "https://cloud.r-project.org"}
- {os: ubuntu-20.04, r: '4.2', pkgext: '.tar.gz', rspm: "https://cloud.r-project.org"}
Expand All @@ -48,11 +50,20 @@ jobs:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:

###################
#### 1. Setup: ####
###################

- uses: actions/checkout@v3

- name: Do autorelease increment, tagging, and environment setup
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
- name: Prepare for deployment at push
if: github.event_name == 'push'
run: |
curl "https://raw.githubusercontent.com/StoXProject/unstableRepo/main/scripts/checktag-actions.sh" --output unstableRepo_checktag.sh
curl "https://raw.githubusercontent.com/StoXProject/unstableRepo/main/scripts/deploy-actions.sh" --output unstableRepo_deploy.sh
chmod +x ./unstableRepo_checktag.sh ./unstableRepo_deploy.sh
. unstableRepo_checktag.sh
curl "https://raw.githubusercontent.com/StoXProject/testingRepo/main/scripts/checktag-actions.sh" --output testingRepo_checktag.sh
curl "https://raw.githubusercontent.com/StoXProject/testingRepo/main/scripts/deploy-actions.sh" --output testingRepo_deploy.sh
chmod +x ./testingRepo_checktag.sh ./testingRepo_deploy.sh
Expand All @@ -75,6 +86,13 @@ jobs:

- uses: r-lib/actions/setup-pandoc@v2



#############################################################################
#### 2. R package installation (with system and R package dependencies): ####
#############################################################################

## 2a. Cache R packages:
- name: Query R package dependencies
run: |
install.packages('remotes')
Expand All @@ -90,34 +108,37 @@ jobs:
key: ${{ env.cache-version }}-${{ runner.os }}-r-${{ matrix.config.r }}-${{ hashFiles('depends.Rds') }}
restore-keys: ${{ env.cache-version }}-${{ runner.os }}-r-${{ matrix.config.r }}-


## 2b. System dependencies:
- name: Install system dependencies on macOS
if: runner.os == 'macOS'
run: |
# gfortran may not exist in a period after a new R minor release:
gfortranFile='/usr/local/bin/gfortran'
if [ -f "$gfortranFile" ] ; then
rm "$gfortranFile"
fi
rm '/usr/local/bin/2to3'
rm '/usr/local/bin/2to3-3.11'
rm '/usr/local/bin/idle3.11'
rm '/usr/local/bin/idle3'
rm '/usr/local/bin/pydoc3'
rm '/usr/local/bin/python3'
rm '/usr/local/bin/python3-config'
rm '/usr/local/bin/pydoc3.11'
rm '/usr/local/bin/python3.11'
rm '/usr/local/bin/python3.11-config'
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=false # This prevents Homebrew from re-installing R, which will lead to .Platform$pkgType = "source".
brew install gdal udunits
shell: bash

- name: Install system dependencies on Linux
if: runner.os == 'Linux'
run: |
while read -r cmd
do
eval sudo $cmd
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "18.04"))')

- name: Install R package dependencies on Linux
if: runner.os == 'Linux'
run: |
remotes::install_deps(dependencies = TRUE)
shell: Rscript {0}

- name: Install R package dependencies on Windows and macOS
if: runner.os != 'Linux'
run: |
# Show the repos:
getOption("repos")

# Make sure Rcpp is >= 1.0.10 due to deprecation of sprintf in c++:
install.packages("Rcpp")

# Install the rest of the dependencies:
options(install.packages.compile.from.source = "never") # Avoid installing sources which need compilation
# dependencies = TRUE installs "Depends", "Imports", "LinkingTo" and "Suggests", and the "Depends", "Imports" and "LinkingTo" recursively from those dependencies
remotes::install_deps(dependencies = TRUE, type = "both")
shell: Rscript {0}
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))')

- name: Prepare for CRANdependencies on Linux
if: runner.os == 'Linux'
Expand All @@ -126,24 +147,52 @@ jobs:
sudo apt-get install -y libudunits2-dev
shell: bash


## 2c. R packages needed for this yaml script (not related to the Rstox package itself):
- name: Install CRANdependencies
run: |
remotes::install_cran("rcmdcheck")
remotes::install_cran("git2r")
remotes::install_cran("sessioninfo")
#remotes::install_cran("drat")
# Using the modfied drat that supports big sur:
#remotes::install_github(repo = "stoxproject/drat", dependencies = FALSE)
install.packages(c("rcmdcheck", "git2r", "sessioninfo", "knitr"))

# Using the latest drat that supports big sur (after inputs from us).
# When the next drat appears on CRAN this can be changed to install from CRAN:
remotes::install_github(repo = 'eddelbuettel/drat', dependencies = FALSE)
shell: Rscript {0}


## 2d. Install dependencies:
- name: Install R package dependencies
run: |
remotes::install_deps(dependencies = TRUE, repos = "https://cloud.r-project.org/")
shell: Rscript {0}


## 2e. Session info:
- name: Session info
run: |
options(width = 100)
pkgs <- installed.packages()[, "Package"]
sessioninfo::session_info(pkgs, include_base = TRUE)
shell: Rscript {0}


## 2f. Additional installs to secure specific versions to patch incompatibilities with older R versions:
- name: Additional installs to secure specific versions
run: |
pkgs <- installed.packages()[, "Package"]
s <- sessioninfo::session_info(pkgs, include_base = TRUE)
onlyStringi <- subset(s$packages, package == "stringi")
if("stringi" %in% as.data.frame(s$packages)$package && is.na(subset(s$packages, package == "stringi")$ondiskversion)) {
remotes::install_github("gagolews/stringi")
}
shell: Rscript {0}




#####################################
#### 3. Check the Rstox package: ####
#####################################

- name: Check
env:
_R_CHECK_CRAN_INCOMING_: false
Expand All @@ -157,15 +206,21 @@ jobs:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check

- name: Build package source archive
if: runner.os == 'Linux' && matrix.config.r == 'release' && github.event_name == 'push' && github.ref == 'refs/heads/master'


#######################################################
#### 4. Build the package source and binary files: ####
#######################################################

- name: Build package source archive from branches testing and master
if: runner.os == 'Linux' && matrix.config.r == 'release' && github.event_name == 'push' && (github.ref_name == 'master' || github.ref_name == 'testing' || github.ref_name == 'develop')
run: |
pkgbuild::build(".", dest_path = ".", binary = FALSE)
system(paste0("PKG_FREL=", Sys.getenv("PKG_FILE"), " >> ", Sys.getenv("GITHUB_ENV")))
shell: Rscript {0}

- name: Build package binary archive
if: (runner.os == 'Windows' || runner.os == 'macOS') && github.event_name == 'push' && github.ref == 'refs/heads/master'
- name: Build package binary archive from branches testing and master for Windows and macOS (this builds also on matrix.config.r = release, which can or can not be a duplicate)
if: (runner.os == 'Windows' || runner.os == 'macOS') && github.event_name == 'push' && (github.ref_name == 'master' || github.ref_name == 'testing' || github.ref_name == 'develop')
run: |
pkgbuild::build(".", dest_path = ".", binary = TRUE)
print("PKG_FILE")
Expand All @@ -175,31 +230,65 @@ jobs:
file.copy(Sys.getenv("PKG_FILE"), Sys.getenv("PKG_FREL"))
shell: Rscript {0}

# We include 'release' in order to always test the latest release, but (mac and Windows) binaries are not deployed to the drat repo:
- name: Upload to DRAT repo
if: ( (runner.os == 'Windows' && matrix.config.r != 'release') || (runner.os == 'macOS' && matrix.config.r != 'release') || (runner.os == 'Linux' && matrix.config.r == 'release') ) && github.event_name == 'push' && github.ref == 'refs/heads/master'


######################################
#### 5. Deploy to the drat repos: ####
######################################

## 5a. Upload to the official (DRAT) repo, but only from the master branch. Here we skip the matrix.config.r = release, as a new StoX release should be ready shortly after each R minor release and listed specifically in the matrix.config:
- name: Upload to the official (DRAT) repo
if: ( (runner.os == 'Windows' && matrix.config.r != 'release') || (runner.os == 'macOS' && matrix.config.r != 'release') || (runner.os == 'Linux' && matrix.config.r == 'release') ) && github.event_name == 'push' && github.ref_name == 'master'
env:
BUILD_NUMBER: ${{ github.sha }}
DRAT_DEPLOY_TOKEN: ${{ secrets.DRAT_DEPLOY_TOKEN }}
run: . repo_deploy.sh
shell: bash

# We include 'release' in order to always test the latest release, but (mac and Windows) binaries are not deployed to the drat repo:
- name: Upload to DRAT testingRepo
if: ( (runner.os == 'Windows' && matrix.config.r != 'release') || (runner.os == 'macOS' && matrix.config.r != 'release') || (runner.os == 'Linux' && matrix.config.r == 'release') ) && github.event_name == 'push' && github.ref == 'refs/heads/master'

## 5b. Upload to the (DRAT) testingRepo, but only from the testing branch. Here we skip the matrix.config.r = release, as a new StoX release should be ready shortly after each R minor release and listed specifically in the matrix.config:
- name: Upload to the testing (DRAT) repo
if: ( (runner.os == 'Windows' && matrix.config.r != 'release') || (runner.os == 'macOS' && matrix.config.r != 'release') || (runner.os == 'Linux' && matrix.config.r == 'release') ) && github.event_name == 'push' && github.ref_name == 'testing'
env:
BUILD_NUMBER: ${{ github.sha }}
DRAT_DEPLOY_TOKEN: ${{ secrets.DRAT_DEPLOY_TOKEN }}
run: . testingRepo_deploy.sh
shell: bash

- name: Create release and upload files
if: ( (runner.os == 'Windows' && matrix.config.r != 'release') || (runner.os == 'macOS' && matrix.config.r != 'release') || (runner.os == 'Linux' && matrix.config.r == 'release') ) && github.event_name == 'push' && github.ref == 'refs/heads/master'

## 5c. Upload to the (DRAT) unstableRepo, but only from the develop branch. Here we skip the matrix.config.r = release, as a new StoX release should be ready shortly after each R minor release and listed specifically in the matrix.config:
- name: Upload to the unstable (DRAT) repo
if: ( (runner.os == 'Windows' && matrix.config.r != 'release') || (runner.os == 'macOS' && matrix.config.r != 'release') || (runner.os == 'Linux' && matrix.config.r == 'release') ) && github.event_name == 'push' && github.ref_name == 'develop'
env:
BUILD_NUMBER: ${{ github.sha }}
DRAT_DEPLOY_TOKEN: ${{ secrets.DRAT_DEPLOY_TOKEN }}
run: . unstableRepo_deploy.sh
shell: bash



###############################
#### 6. Release on GitHub: ####
###############################

- name: Create release on GitHub and upload files for testing branch
if: ( (runner.os == 'Windows' && matrix.config.r != 'release') || (runner.os == 'macOS' && matrix.config.r != 'release') || (runner.os == 'Linux' && matrix.config.r == 'release') ) && github.event_name == 'push' && github.ref_name == 'testing'
uses: ncipollo/release-action@v1
with:
allowUpdates: true
commit: master
commit: testing
tag: ${{ env.FINAL_TAG }}
name: ${{ env.FINAL_TAG }}
artifacts: ${{ env.PKG_REPO }}/${{ env.PKG_FREL }}
token: ${{ secrets.GITHUB_TOKEN }}

- name: Create release on GitHub and upload files for master branch
if: ( (runner.os == 'Windows' && matrix.config.r != 'release') || (runner.os == 'macOS' && matrix.config.r != 'release') || (runner.os == 'Linux' && matrix.config.r == 'release') ) && github.event_name == 'push' && github.ref_name == 'master'
uses: ncipollo/release-action@v1
with:
allowUpdates: true
commit: master
tag: ${{ env.FINAL_TAG }}
name: ${{ env.FINAL_TAG }}
artifacts: ${{ env.PKG_REPO }}/${{ env.PKG_FREL }}
token: ${{ secrets.GITHUB_TOKEN }}
8 changes: 6 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: RstoxData
Version: 1.10.2-9001
Date: 2023-10-13
Version: 1.10.2-9003
Date: 2023-11-23
Title: Tools to Read and Manipulate Fisheries Data
Authors@R: c(
person(given = "Edvin",
Expand Down Expand Up @@ -36,13 +36,17 @@ BugReports: https://github.com/StoXProject/RstoxData/issues
License: LGPL-3
LazyData: true
Encoding: UTF-8
VignetteBuilder: knitr
Imports:
data.table (>= 1.12.0),
Rcpp (>= 1.0.0),
stringi (>= 1.4.0),
units (>= 0.7),
xml2 (>= 1.2.0)
Suggests:
httr,
knitr,
rmarkdown,
tinytest (>= 1.2.0)
LinkingTo:
Rcpp
Expand Down
5 changes: 5 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export(CopyBiotic)
export(CopyICESAcoustic)
export(CopyICESBiotic)
export(CopyICESDatras)
export(CopyICESDatsusc)
export(CopyLanding)
export(CopyStoxAcoustic)
export(CopyStoxBiotic)
Expand All @@ -21,16 +22,19 @@ export(FilterBiotic)
export(FilterICESAcoustic)
export(FilterICESBiotic)
export(FilterICESDatras)
export(FilterICESDatsusc)
export(FilterLanding)
export(FilterStoxAcoustic)
export(FilterStoxBiotic)
export(FilterStoxLanding)
export(ICESAcoustic)
export(ICESBiotic)
export(ICESDatras)
export(ICESDatsusc)
export(MergeAcoustic)
export(MergeStoxAcoustic)
export(MergeStoxBiotic)
export(PrepareNmdBioticTable)
export(ReadAcoustic)
export(ReadBiotic)
export(ReadLanding)
Expand All @@ -44,6 +48,7 @@ export(TranslateBiotic)
export(TranslateICESAcoustic)
export(TranslateICESBiotic)
export(TranslateICESDatras)
export(TranslateICESDatsusc)
export(TranslateLanding)
export(TranslateStoxAcoustic)
export(TranslateStoxBiotic)
Expand Down
9 changes: 9 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# RstoxData v1.10.2-9002 (2023-11-06)
* Added parameter format class "folderPath".
* Added branch "testing" which will deploy to the testingRepo.
* Structured the check-full.yaml.
* Fixed issue with parsing some valid variants of the xml landings format (landingerv2)
* Fixed issue with parsing some valid variants of the InterCatch Exchange format
* Added functions for extracting some standard tables from NMD biotic
* Added vignette for guiding data users at IMR to locate and parse biological samples.

# RstoxData v1.10.2-9001 (2023-10-13)
* Moved functions for setting precision to RstoxFramework, which actually assumed an sp object.
* Changed definition of CatchFractionNumber and SampleNumber to numeric instead of integer, as this was the result from runProcess() used in runModel().
Expand Down
Loading